orb.math.lerp module

This module is used to interpolate values.

orb.math.lerp.lerp(a, b, t)

Interpolate 2 values.

>>> lerp(a=10, b=20, t=0.5)
15.0
orb.math.lerp.lerp_2d(a, b, t)

Interpolate 2 lists or tuples.

>>> lerp_2d(a=[10,10], b=[20,20], t=0.5)
(15.0, 15.0)
orb.math.lerp.lerp_vec(a, b, t)

Interpolate 2 Vectors.

>>> from orb.math.Vector import Vector
>>> lerp_vec(a=Vector(10,10), b=Vector(20,20), t=0.5)
(15.0, 15.0)