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

kmath

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

kmath - npm Package Compare versions

Comparing version 0.0.0 to 0.0.1

16

__tests__/number.js

@@ -16,2 +16,18 @@ var assert = require("assert");

it('Infinity should equal Infinity', function() {
var result = number.equal(
Number.POSITIVE_INFINITY,
Number.POSITIVE_INFINITY
);
assert.strictEqual(result, true);
});
it('+Infinity should not equal -Infinity', function() {
var result = number.equal(
Number.POSITIVE_INFINITY,
Number.NEGATIVE_INFINITY
);
assert.strictEqual(result, false);
});
it('sign(0) should be 0', function() {

@@ -18,0 +34,0 @@ assert.strictEqual(number.sign(0), 0);

4

number.js

@@ -26,2 +26,6 @@ /*

}
// We check === here so that +/-Infinity comparisons work correctly
if (x === y) {
return true;
}
if (tolerance == null) {

@@ -28,0 +32,0 @@ tolerance = DEFAULT_TOLERANCE;

2

package.json
{
"name": "kmath",
"version": "0.0.0",
"version": "0.0.1",
"description": "Khan Academy's Javascript Numeric Math Utilities",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -126,3 +126,3 @@ kmath

#### `number.ciel(aNumber, increment)`
#### `number.ceilTo(aNumber, increment)`

@@ -310,5 +310,5 @@ Returns the nearest multiple of `increment` that is no smaller than

#### `vector.cielTo(v, increment)`
#### `vector.ceilTo(v, increment)`
Ciels each dimension of `v` to the nearest `increment`.
Ceils each dimension of `v` to the nearest `increment`.

@@ -319,3 +319,3 @@

#### `point.is(maybeAPoint, [length])
#### `point.is(maybeAPoint, [length])`

@@ -444,5 +444,5 @@ Returns true if `maybeAPoint` is an array of numbers. If length is specified,

#### `point.cielTo(p, increment)`
#### `point.ceilTo(p, increment)`
Ciels each dimension of `p` to the nearest `increment`.
Ceils each dimension of `p` to the nearest `increment`.

@@ -449,0 +449,0 @@

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