AbstractNumber of coordinates: 2 in the plane, 3 in space.
AbstractdisplayASCIIMath rendering of the current state (terminal output, not chainable).
Euclidean norm, as a decimal number.
Square of the norm, as an exact fraction.
Function called when a coordinate is set through x, y or z, or when the tuple is zeroed.
Triangle uses it to refresh its remarkable lines.
AbstracttexLaTeX rendering of the current state (terminal output, not chainable).
Third coordinate. Setting it accepts a fraction, a number or a string.
AbstractcloneReturns a deep copy of the raw coordinate array. Unlike clone(), returns a Fraction[], not a TupleN instance.
Copy the mathematical state of another instance into this (display
state is NOT transferred — the receiver keeps its own formatting). Entry
point used when constructing/parsing from a same-type input. Distinct from
clone. Classes without a real implementation throw
NotImplementedError.
True when every coordinate is zero.
Change the sign of every coordinate.
Set every coordinate to zero.
Protected StaticparseStrips optional outer parentheses, splits on , ; or space, and returns the parsed Fraction array.
Base contract of every PiMath value object: a displayable, duplicable mathematical entity.
Note: construction (
parse/from***) is intentionally NOT part of this contract — input shapes are class-specific and handled per class, not polymorphically. See.claude/specs/pimath-architecture.md.