View Source SpaceDust.Math.Functions (Space Dust v0.1.0)

Math utility functions

Summary

Functions

linearly interpolate between two points

linearly interpolate between two points

evaluate a polynomial with coefficients ordered from highest to lowest

Functions

linearInterpolate(y1, y2, fraction)

@spec linearInterpolate(number(), number(), number()) :: number()

linearly interpolate between two points

linearInterpolate(x1, y1, x2, y2, x)

@spec linearInterpolate(number(), number(), number(), number(), number()) :: number()

linearly interpolate between two points

polyEval(coefficients, x)

@spec polyEval([number()], number()) :: number()

evaluate a polynomial with coefficients ordered from highest to lowest