point2.of

The plane point with the given coordinates.

Value helperSince 0.3.0

Usage

TypeScript
Point2.of(x: number, y: number): Point2

Parameters

  • xnumber

    The x coordinate. Required. In model.

  • ynumber

    The y coordinate. Required. In model.

Returns

A new { x, y }; the coordinates are stored as given, NaN included (check with Point2.isFinite).

Example

TypeScript
Point2.of(3, 4) // → { x: 3, y: 4 }

See also