lengthv
Lengthv is a conceptual data type used in geometry, computer graphics, and engineering to represent a length measurement with possible unit metadata. The term lengthv is short for length value, and in many implementations it is designed to carry both a numeric magnitude and a unit, enabling safe arithmetic and automatic unit conversion.
Representation: A lengthv may be stored as a pair (magnitude, unit) or as a single floating-point value
Operations: Lengthv supports addition and subtraction between lengths with compatible units, multiplication by a scalar, and
In vector calculations, a lengthv can be used to attach a magnitude to a direction, or represent
Examples: lengthv(12, 'cm'), lengthv(1.5, 'm') or a structure {value: 12, unit: 'cm'}. Libraries may provide constructors,
See also: units, dimensional analysis, vector norm, quantity types.