Scripts: a Copy or Cut the run puts back is not reported, and matrices keep finite values

- A command whose result cannot reach the script is put back, and the
  run counts its Copy or Cut only when the clipboard keeps it. Before,
  a put-back command.batch left its copy on the clipboard, and a put-back
  Cut after an earlier copy still gave the report copied: true.
  command.batch now has the clipboard saved before it, as edit.cut and
  action.batch do.
- concatenateMatrix and the other concatenate functions sum each value
  past the range of a number when a product overflows or falls below
  the normal range next to another product, so [2^600, 2^600, 0, 1]
  then [2^600, 0, -2^600, 1] gives [0, 2^600, -2^600, 1] instead of a
  RangeError, and two products of 2^-1075 sum to 2^-1074.
- getRotationMatrix and concatenateRotationMatrix reduce the angle with
  a remainder that keeps its sign, so -89.99999999999999 is not rounded
  to the quarter turn 270; -90, -180 and -270 stay exact.
- docs/mcp.md says isEqualMatrix and isSingularMatrix give true or
  false, not a new record.
This commit is contained in:
dotCooCoo committed 2026-11-22 08:04:21 -08:00
1 parent bb311d3c4d
commit 9b2bfcd50f
4 files changed
+116 -21

No files matched your search

+2 -1
View File
@@ -2715,7 +2715,8 @@ app through the global object `vc`, and writes to the Script Console and runs ot
`concatenateRotationMatrix(matrix, angle?)`, `invertMatrix(matrix)`, `isEqualMatrix(matrix, secondMatrix)` and
`isSingularMatrix(matrix)` work on `Matrix` records (https://ai-scripting.docsforadobe.dev/jsobjref/Matrix/): plain
objects with `mValueA`, `mValueB`, `mValueC`, `mValueD`, `mValueTX`, `mValueTY` and `typename` `"Matrix"`. Each
function gives a new record and leaves the ones passed to it unchanged. A record maps `(x, y)` to
function other than `isEqualMatrix` and `isSingularMatrix` gives a new record; those two give `true` or `false`.
No function changes the records passed to it. A record maps `(x, y)` to
`(a·x + c·y + tx, b·x + d·y + ty)`, as a PDF `cm` matrix does (ISO 32000-1, 8.3.4), with Y up. VectorCraft's own
rules: `concatenateMatrix(m, n)` applies `m` and then `n`, and the other `concatenate…` functions apply the record
and then the transformation they make; a left-out move or angle is 0, a left-out `scaleX` is 100 and a left-out