Socket
Socket
Sign inDemoInstall

kld-affine

Package Overview
Dependencies
Maintainers
1
Versions
15
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

kld-affine

A collection of classes used in affine geometry


Version published
Weekly downloads
50K
decreased by-6.01%
Maintainers
1
Weekly downloads
 
Created
Source

kld-affine

A collection of classes used for affine geometry. This currently consists of the following classes:

  • Point2D
  • Vector2D
  • Matrix2D

These have been extracted from kld-intersections so they can stand alone.

Install

npm install kld-affine

Point2D

A class used to represent two-dimensional points on a plane. This currently supports the following methods:

  • clone
  • add
  • subtract
  • multiply
  • divide
  • equals
  • precisionEquals
  • lerp
  • distanceFrom
  • min
  • max
  • transform
  • toString

Vector2D

A class used to represent a two-dimensional vector. This currently supports the following methods:

  • Vector2D.fromPoints
  • length
  • magnitude
  • dot
  • cross
  • determinant
  • unit
  • add
  • subtract
  • multiply
  • divide
  • angleBetween
  • perp
  • perpendicular
  • project
  • transform
  • equals
  • precisionEquals
  • toString

Matrix2D

A class used to represent affine transformations. This current supports the following methods:

  • Matrix2D.IDENTITY
  • multiply
  • inverse
  • translate
  • scale
  • scaleAt
  • scaleNonUniform
  • scaleNonUniformAt
  • rotate
  • rotateAt
  • rotateFromVector
  • flipX
  • flipY
  • skewX
  • skewY
  • isIdentity
  • isInvertible
  • getScale
  • getDecomposition
  • equals
  • precisionEquals
  • toString

Keywords

FAQs

Package last updated on 19 Jul 2017

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