line.of

The segment from one point to another.

Value helperSince 0.3.0

Usage

TypeScript
Line.of(from: Point3, to: Point3): Line

Parameters

  • fromPoint3

    The start point (t = 0). Required. In model.

  • toPoint3

    The end point (t = 1). Required. In model.

Returns

A new { from, to }; a zero-length segment is allowed and not flagged.

Example

TypeScript
Line.of(Point3.origin, Point3.of(0, 0, 2)) // → { from: { x: 0, y: 0, z: 0 }, to: { x: 0, y: 0, z: 2 } }

See also