Category talk:Wren-math: Difference between revisions

→‎Source code: Added Math.lerp method
(→‎Source code: Changed name of just added isRoot method to isPower)
(→‎Source code: Added Math.lerp method)
Line 65:
// Convenience version of above method which uses 0 for the 'mode' parameter.
static toPlaces(x, p) { toPlaces(x, p, 0) }
 
// Returns the linear interpolation of t between x and y, if t is in [0, 1] or
// linear extrapolation otherwise.
static lerp (x, y, t) { x + t * (y - x) }
 
// The power of 'p' which equals or first exceeds a non-negative number 'x'.
9,479

edits