Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@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

  • 0.1.4
  • ts4.5
  • ts4.6
  • ts4.7
  • ts4.8
  • ts4.9
  • ts5.0
  • ts5.1
  • ts5.2
  • ts5.3
  • ts5.4
  • ts5.5
  • ts5.6
  • ts5.7
  • ts5.8
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
486K
increased by2.48%
Maintainers
1
Weekly downloads
 
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