Files
vectorcraft/docs
dotCooCoo 1ab09c8978 Scripts: UnitValue measurements convert and calculate with their units
Scripts get the global UnitValue constructor: a number with one of the
length units (inches, feet, yards, miles, millimeters, centimeters,
meters, kilometers, points, picas, traditional points and picas,
ciceros), pixels or percent. as() and convert() give or change the
unit, baseUnit sets what one pixel and 100% measure, and the arithmetic,
comparison and unary operators calculate with the object's number. With
two objects the right one is converted to the left one's unit.

Conversions go through exact ratios to the inch, so 1 in is exactly
72 pt. An unknown unit or text makes an invalid object; converting it or
using it with an operator, a result that is not finite and a comparison
with a number that is not finite throw a RangeError.

A realm without UnitValue keeps the standard operators. docs/mcp.md
describes the class.
2026-11-21 19:56:57 -08:00
..
2026-11-20 05:45:14 +07:00
2026-11-19 15:12:20 +07:00
2026-11-20 06:07:45 +07:00