Socket
Socket
Sign inDemoInstall

@types/mapbox__point-geometry

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@types/mapbox__point-geometry

TypeScript definitions for @mapbox/point-geometry


Version published
Maintainers
1
Created

What is @types/mapbox__point-geometry?

@types/mapbox__point-geometry provides TypeScript type definitions for the mapbox/point-geometry library, which is a lightweight library for working with 2D points and performing geometric operations on them.

What are @types/mapbox__point-geometry's main functionalities?

Creating a Point

This feature allows you to create a new point with x and y coordinates.

const point = new Point(10, 20);

Adding Points

This feature allows you to add two points together, resulting in a new point.

const point1 = new Point(10, 20);
const point2 = new Point(5, 5);
const result = point1.add(point2);

Subtracting Points

This feature allows you to subtract one point from another, resulting in a new point.

const point1 = new Point(10, 20);
const point2 = new Point(5, 5);
const result = point1.sub(point2);

Scaling a Point

This feature allows you to scale a point by a given factor.

const point = new Point(10, 20);
const scaledPoint = point.mult(2);

Calculating Distance Between Points

This feature allows you to calculate the Euclidean distance between two points.

const point1 = new Point(10, 20);
const point2 = new Point(5, 5);
const distance = point1.dist(point2);

Other packages similar to @types/mapbox__point-geometry

FAQs

Package last updated on 07 Nov 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc