@vx/point

vx point

Stats

StarsIssuesVersionUpdatedCreatedSize
@vx/point
15,3941090.0.1992 years ago5 years agoMinified + gzip package size for @vx/point in KB

Readme

@vx/point

npm install --save @vx/point

A simple class to represent an x, y coordinate.

Example Usage

import { Point } from '@vx/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].

If you find any bugs or have a feature request, please open an issue on github!

The npm package download data comes from npm's download counts api and package details come from npms.io.