Math
mix()
mix()const mix = (value: number, x: number, y: number) => numbermix performs a linear interpolation between x and y using a to weight between them. The return value is computed as x * (1 - value) + y * value.
bin()
bin()const bin: (value: boolean) => 0 | 1Convert a boolean value into a number. This can be useful in reanimated since 0 and 1 are used for conditional statements.
toRad()
toRad()const toRad = (deg: number) => number;Transforms an angle from degrees to radians.
toDeg()
toDeg()const toDeg = (rad: number) => number;Transforms an angle from radians to degrees.
clamp()
clamp()Clamps a node with a lower and upper bound.
avg()
avg()Returns the average value of an array
between()
between()Returns true if node is within lowerBound and upperBound.
round()
round()Computes animation node rounded to precision.
cubicBezier()
cubicBezier()Returns the coordinate of a cubic bezier curve. t is the length of the curve from 0 to 1. cubicBezier(0, p0, p1, p2, p3) equals p0 and cubicBezier(1, p0, p1, p2, p3) equals p3. p0 and p3 are respectively the starting and ending point of the curve. p1 and p2 are the control points.
cubicBezierYForX()
cubicBezierYForX()Given a cubic Bèzier curve, return the y value for x.
Last updated
Was this helpful?