kld-affine
Advanced tools
Comparing version 0.0.2 to 0.0.3
@@ -5,1 +5,2 @@ // expose classes | ||
exports.Vector2D = require('./lib/Vector2D'); | ||
exports.Matrix2D = require('./lib/Matrix2D'); |
@@ -211,2 +211,15 @@ /** | ||
/** | ||
* equals | ||
* | ||
* @param {Vector2D} that | ||
* @returns {Boolean} | ||
*/ | ||
Vector2D.prototype.equals = function(that) { | ||
return ( | ||
this.x === that.x && | ||
this.y === that.y | ||
); | ||
}; | ||
/** | ||
* toString | ||
@@ -213,0 +226,0 @@ * |
{ | ||
"name": "kld-affine", | ||
"version": "0.0.2", | ||
"version": "0.0.3", | ||
"description": "A collection of classes used in affine geometry", | ||
@@ -21,3 +21,4 @@ "author": { | ||
"point", | ||
"vector" | ||
"vector", | ||
"matrix" | ||
], | ||
@@ -24,0 +25,0 @@ "devDependencies": { |
kld-affine | ||
========== | ||
A collection of classes used in affine geometry | ||
A collection of classes used in affine geometry. This currently consists of the following: | ||
* Point2D | ||
* Vector2D | ||
* Matrix2D | ||
These have been extracted from kld-intersections so they can stand alone. As such, there are some parts of the API that I want to remove, but I will need to update kld-intersections before being able to do that. Specifically, I would like to remove all self-mutable methods in preference of a more functional approach that creates a new instance with each modification. | ||
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 | ||
* addEquals - deprecated | ||
* rmoveTo - deprecated | ||
* scalarAdd | ||
* scalarAddEquals - deprecated | ||
* subtract | ||
* subtractEquals - deprecated | ||
* scalarSubtract | ||
* scalarSubtractEquals - deprecated | ||
* multiply | ||
* multiplyEquals - deprecated | ||
* divide | ||
* divideEquals - deprecated | ||
* compare | ||
* equals | ||
* lerp | ||
* distanceFrom | ||
* min | ||
* max | ||
* toString | ||
* setXY - deprecated | ||
* setFromPoint - deprecated | ||
* swap - deprecated | ||
Vector2D | ||
-------- | ||
A class used to represent a two-dimensional vector. This currently supports the following methods: | ||
* length | ||
* dot | ||
* cross | ||
* unit | ||
* unitEquals - deprecated | ||
* add | ||
* addEquals - deprecated | ||
* subtract | ||
* subtractEquals - deprecated | ||
* multiply | ||
* multiplyEquals - deprecated | ||
* divide | ||
* divideEquals - deprecated | ||
* perp | ||
* perpendicular | ||
* project | ||
* equals | ||
* toString | ||
* Vector2D.fromPoints | ||
Matrix2D | ||
-------- | ||
A class used to represent affine transformations. This current supports the following methods: | ||
* multiply | ||
* inverse | ||
* translate | ||
* scale | ||
* scaleNonUniform | ||
* rotate | ||
* rotateFromVector | ||
* flipX | ||
* flipY | ||
* skewX | ||
* skewY | ||
* equals | ||
* toString |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
17688
11
735
87