mirror of
https://github.com/antopilo/Nuake.git
synced 2026-09-04 11:35:06 +03:00
- Added Input wren module - Added Math wren module - Added Entity wren module - Changed camera API
23 lines
308 B
Plaintext
23 lines
308 B
Plaintext
class Math {
|
|
foreign static Sqrt_(x, y, z)
|
|
}
|
|
|
|
class Vector3 {
|
|
construct new(x, y, z) {
|
|
_x = x
|
|
_y = y
|
|
_z = z
|
|
}
|
|
|
|
Sqrt() {
|
|
return Math.Sqrt_(_x, _y, _z)
|
|
}
|
|
|
|
Normalize() {
|
|
var length = this.Sqrt()
|
|
var x = _x / length
|
|
var y = _y / length
|
|
var z = _z / length
|
|
return Vector3.new(x, y, z)
|
|
}
|
|
} |