@thi.ng/math
Advanced tools
Comparing version 5.10.2 to 5.10.3
# Change Log | ||
- **Last updated**: 2024-02-22T11:59:16Z | ||
- **Last updated**: 2024-02-25T14:07:53Z | ||
- **Generator**: [thi.ng/monopub](https://thi.ng/monopub) | ||
@@ -5,0 +5,0 @@ |
@@ -7,3 +7,3 @@ import type { FnU4 } from "@thi.ng/api"; | ||
* @example | ||
* ```ts | ||
* ```text | ||
* b1 a2 | ||
@@ -25,3 +25,3 @@ * \/ | ||
* @example | ||
* ```ts | ||
* ```text | ||
* a1 b2 | ||
@@ -28,0 +28,0 @@ * \/ |
31
mix.d.ts
@@ -14,3 +14,3 @@ import type { FnN, FnN2, FnN3, FnN4, FnN5, FnN6 } from "@thi.ng/api"; | ||
* @example | ||
* ```ts | ||
* ```text | ||
* c d | ||
@@ -175,2 +175,23 @@ * +----+ | ||
* | ||
* @example | ||
* ```ts | ||
* import { easeInOut2, tween } from "@thi.ng/math"; | ||
* | ||
* // create tweening function | ||
* const anim = tween(easeInOut2, 100, 200); | ||
* | ||
* for(let i=0; i<=10; i++) console.log(anim(i/10)); | ||
* // 100 | ||
* // 102 | ||
* // 108 | ||
* // 118 | ||
* // 132 | ||
* // 150 | ||
* // 168 | ||
* // 182 | ||
* // 192 | ||
* // 198 | ||
* // 200 | ||
* ``` | ||
* | ||
* @param f - | ||
@@ -209,10 +230,14 @@ * @param from - | ||
* | ||
* Also see {@link schlick} for an alternative approach. | ||
* Also see {@link schlick} for an alternative approach and {@link tween} for | ||
* reference to below example. | ||
* | ||
* @example | ||
* ```ts | ||
* import { mix, lens, tween } from "@thi.ng/math"; | ||
* import { partial } from "@thi.ng/compose"; | ||
* | ||
* // interpolated position in [100..400] interval for given `t` | ||
* y = mix(100, 400, lens(0.5, 1, t)); | ||
* | ||
* // or build tween function via `tween()` | ||
* // or compose tween function via `tween()` & `partial()` | ||
* f = tween(partial(lens, 0.5, 1), 100, 400); | ||
@@ -219,0 +244,0 @@ * |
{ | ||
"name": "@thi.ng/math", | ||
"version": "5.10.2", | ||
"version": "5.10.3", | ||
"description": "Assorted common math functions & utilities", | ||
@@ -41,3 +41,3 @@ "type": "module", | ||
"dependencies": { | ||
"@thi.ng/api": "^8.9.25" | ||
"@thi.ng/api": "^8.9.26" | ||
}, | ||
@@ -146,3 +146,3 @@ "devDependencies": { | ||
}, | ||
"gitHead": "4513a1c703bdbf0f0867f03e547e47692e415fac\n" | ||
"gitHead": "6e20f80dd9df1c8055ffa3c1e4d6f7598add0c0b\n" | ||
} |
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
98019
2202
Updated@thi.ng/api@^8.9.26