modblend expression function

Blends the two modular values.

All Usage Examples

Usage

modblend(val1, val2, length, weight)

This function can be used to correctly blend two angles or other cyclic values.

Examples

modblend(355, 5, 360, 0.5)

Returns 0. Simple linearly blending of the two values would result in an incorrect value of 180.