MCPcopy
hub / github.com/williamngan/pts / step

Method step

src/Num.ts:862–866  ·  view source on GitHub ↗

* Convert any shaping functions into a series of steps. * @param fn the original shaping function * @param steps the number of steps * @param t a value between 0 to 1 * @param c the value to shape, default is 1 * @param args optional paramters to pass to original function

(fn: Function, steps:number, t:number, c:number, ...args:any[])

Source from the content-addressed store, hash-verified

860 * @param args optional paramters to pass to original function
861 */
862 static step(fn: Function, steps:number, t:number, c:number, ...args:any[]) {
863 let s = 1 / steps;
864 let tt = Math.floor(t / s) * s;
865 return fn(tt, c, ...args);
866 }
867
868}
869

Callers 3

create.noisePts.jsFile · 0.45
pointAtFunction · 0.45

Calls 2

fnFunction · 0.85
floorMethod · 0.45

Tested by

no test coverage detected