diff options
author | chai <chaifix@163.com> | 2020-10-17 15:22:09 +0800 |
---|---|---|
committer | chai <chaifix@163.com> | 2020-10-17 15:22:09 +0800 |
commit | 08ab881a480a73d6be005c4b4e1cf35814b53e3c (patch) | |
tree | 00297c01905cff519509598c5340a82c0fc2e941 /modules/math3d/vector3.qs |
Diffstat (limited to 'modules/math3d/vector3.qs')
-rw-r--r-- | modules/math3d/vector3.qs | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/modules/math3d/vector3.qs b/modules/math3d/vector3.qs new file mode 100644 index 0000000..2401b0e --- /dev/null +++ b/modules/math3d/vector3.qs @@ -0,0 +1,34 @@ +import math for Math; + +class Vector3 { + static one = new Vector3(1,1,1); + static zero = new Vector3(0,0,0); + static front = ne Vector3(0,0,1); + static up = new Vector3(0,1,0); + static right = new Vector3(1,0,0); + + func init(x, y, z) { + self.x = x; + self.y = y; + self.z = z; + } + + func length() { + return Math.sqrt(self.x^2 + self.y^2 + self.z^2); + } + + static func lerp(v1, v2, t) { + + } + + static func slerp(v1, v2, t) { + + } + +} + +/* +var v = new Vector3(1,1,1); + + +*/
\ No newline at end of file |