Added lerp to math scripting module

This commit is contained in:
Antoine Pilote
2023-07-07 01:33:27 -04:00
parent 90968ee7ba
commit 431dd26a61

View File

@@ -14,6 +14,10 @@ class Math {
return this.Dot_(vec1.x, vec1.y, vec1.z, vec2.x, vec2.y, vec2.z)
}
static Lerp(a, b, t) {
return a + t * (b - a)
}
foreign static Dot_(x, y, z, x1, y2, z2)
foreign static Cross_(x, y, z, x1, y2, z2)
foreign static Length_(x, y, z)