New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@antv/coord

Package Overview
Dependencies
Maintainers
67
Versions
25
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@antv/coord

Toolkit for mapping elements of sets into geometric objects.

  • 0.4.7
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
134K
increased by3.23%
Maintainers
67
Weekly downloads
 
Created

What is @antv/coord?

@antv/coord is a coordinate system library that provides various coordinate transformations and manipulations. It is part of the AntV ecosystem, which is a suite of data visualization tools. This package allows developers to handle different types of coordinate systems, such as Cartesian, Polar, and Helix, and perform transformations like scaling, rotating, and translating.

What are @antv/coord's main functionalities?

Cartesian Coordinate System

This feature allows you to create and manipulate Cartesian coordinate systems. The code sample demonstrates how to create a Cartesian coordinate system and convert a point within it.

const { Cartesian } = require('@antv/coord');
const cartesian = new Cartesian({ start: [0, 0], end: [1, 1] });
console.log(cartesian.convert([0.5, 0.5]));

Polar Coordinate System

This feature allows you to create and manipulate Polar coordinate systems. The code sample demonstrates how to create a Polar coordinate system and convert a point within it.

const { Polar } = require('@antv/coord');
const polar = new Polar({ start: [0, 0], end: [1, 1] });
console.log(polar.convert([Math.PI / 4, 0.5]));

Helix Coordinate System

This feature allows you to create and manipulate Helix coordinate systems. The code sample demonstrates how to create a Helix coordinate system and convert a point within it.

const { Helix } = require('@antv/coord');
const helix = new Helix({ start: [0, 0], end: [1, 1] });
console.log(helix.convert([Math.PI / 4, 0.5]));

Transformations

This feature allows you to perform various transformations like scaling and rotating on coordinate systems. The code sample demonstrates how to scale and rotate a Cartesian coordinate system and then convert a point within it.

const { Cartesian } = require('@antv/coord');
const cartesian = new Cartesian({ start: [0, 0], end: [1, 1] });
cartesian.scale(2, 2);
cartesian.rotate(Math.PI / 4);
console.log(cartesian.convert([0.5, 0.5]));

Other packages similar to @antv/coord

Keywords

FAQs

Package last updated on 23 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