Notoriously Pedantic Magistrate

    @visx/point
    TypeScript icon, indicating that this package has built-in type declarations

    1.7.0 • Public • Published

    @visx/point

    npm install --save @visx/point
    

    A simple class to represent an x, y coordinate.

    Example Usage

    import { Point } from '@visx/point';
    
    const point = new Point({ x: 2, y: 3 });
    const { x, y } = point.value(); // Get the coords as an object
    const [x, y] = point.toArray(); // or array

    Methods

    point.value()

    Returns an { x, y } object with the x and y coordinates.

    point.toArray()

    Returns the coordinates as an array [x, y].

    Install

    npm i @visx/point

    DownloadsWeekly Downloads

    45,131

    Version

    1.7.0

    License

    MIT

    Unpacked Size

    4.92 kB

    Total Files

    11

    Last publish

    Collaborators

    • avatar
    • avatar
    • avatar
    • avatar