chore: doc
This commit is contained in:
parent
8595b062fc
commit
e901873f62
|
@ -178,6 +178,12 @@ export const randomNumber = (min, max) => {
|
|||
// smooth(er)?step assumes unit
|
||||
export const smoothstep = (x) => x * x * (3 - 2 * x);
|
||||
export const smootherstep = (x) => x * x * x * (x * (x * 6 - 15) + 10);
|
||||
/**
|
||||
* Probabilistic behavior. Every `period` seconds, return `true`.
|
||||
*
|
||||
* @param {Number} elapsed The time that's passed.
|
||||
* @param {Number} period The frequency of probabilistic behavior.
|
||||
*/
|
||||
export const spontaneous = (elapsed, period) => Math.random() < 1 / (period / elapsed);
|
||||
export const sub = (l, r) => l - r;
|
||||
export const toRad = (a) => a * PI_180;
|
||||
|
|
Loading…
Reference in New Issue
Block a user