@cardsgame/utils
Advanced tools
Comparing version 0.21.0 to 0.22.0
@@ -66,1 +66,9 @@ /** | ||
export declare const decimal: (value: number, maxZeroes?: number) => number; | ||
/** | ||
* | ||
*/ | ||
export declare const lerp: (a: number, b: number, t: number) => number; | ||
/** | ||
* | ||
*/ | ||
export declare const distance: (ax: number, ay: number, bx: number, by: number) => number; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.decimal = exports.px2cm = exports.cm2px = exports.deg2rad = exports.rad2deg = exports.wrap = exports.limit = void 0; | ||
exports.distance = exports.lerp = exports.decimal = exports.px2cm = exports.cm2px = exports.deg2rad = exports.rad2deg = exports.wrap = exports.limit = void 0; | ||
/** | ||
@@ -105,2 +105,18 @@ * Limits `val` to fin within range from `min` to `max` | ||
exports.decimal = decimal; | ||
/** | ||
* | ||
*/ | ||
var lerp = function (a, b, t) { | ||
return a * (1 - t) + b * t; | ||
}; | ||
exports.lerp = lerp; | ||
/** | ||
* | ||
*/ | ||
var distance = function (ax, ay, bx, by) { | ||
var dx = ax - bx; | ||
var dy = ay - by; | ||
return Math.sqrt(dx * dx + dy * dy); | ||
}; | ||
exports.distance = distance; | ||
//# sourceMappingURL=numbers.js.map |
{ | ||
"name": "@cardsgame/utils", | ||
"version": "0.21.0", | ||
"version": "0.22.0", | ||
"description": "", | ||
@@ -26,3 +26,3 @@ "author": "Darek Greenly (https://darekgreenly.com)", | ||
"dependencies": { | ||
"@cardsgame/types": "^0.21.0", | ||
"@cardsgame/types": "^0.22.0", | ||
"chalk": "^4.1.2" | ||
@@ -33,3 +33,3 @@ }, | ||
}, | ||
"gitHead": "73d9be0b1c5930034b8d929de9faa5462ccb7b41" | ||
"gitHead": "bb93190bf4fa070baabd9ebe882684598ae23c30" | ||
} |
Sorry, the diff of this file is not supported yet
66797
1336
+ Added@cardsgame/types@0.22.0(transitive)
- Removed@cardsgame/types@0.21.0(transitive)
Updated@cardsgame/types@^0.22.0