Module: Sevgi::Geometry
- Defined in:
- lib/sevgi/geometry.rb,
lib/sevgi/geometry/point.rb,
lib/sevgi/geometry/errors.rb,
lib/sevgi/geometry/element.rb,
lib/sevgi/geometry/segment.rb,
lib/sevgi/geometry/version.rb,
lib/sevgi/geometry/equation.rb,
lib/sevgi/geometry/internal.rb,
lib/sevgi/geometry/operation.rb,
lib/sevgi/geometry/elements/line.rb,
lib/sevgi/geometry/elements/rect.rb,
lib/sevgi/geometry/equation/linear.rb,
lib/sevgi/geometry/operation/align.rb,
lib/sevgi/geometry/operation/sweep.rb,
lib/sevgi/geometry/elements/polygon.rb,
lib/sevgi/geometry/elements/polyline.rb,
lib/sevgi/geometry/elements/triangle.rb,
lib/sevgi/geometry/equation/quadratic.rb,
lib/sevgi/geometry/elements/parallelogram.rb
Overview
Immutable screen-space geometry values used by Sevgi layout and drawing helpers.
Coordinates follow SVG screen conventions: +x points right, +y points down, and positive angles turn clockwise. Constructors accept Point and Segment objects or their two-number Array forms. Transformations return new values; they do not mutate their receiver.
Shape constructors have two complementary notations: Shape[...] accepts
dimensions or segments, while Shape.(...) accepts points. Named factories
such as Rect.from_size and Rect.from_corners expose the same distinction
when a call site benefits from spelling it out.
Trigonometric construction can retain ordinary floating-point noise. Use
approx for presentation values and eq? for precision-aware comparison;
strict == intentionally compares the exact immutable value.
Defined Under Namespace
Modules: Operation Classes: Element, Equation, LengthAngle, Line, Parallelogram, Point, Polygon, Polyline, Rect, Segment, Square, Triangle