9 public Vec3(float _x, float _y, float _z) {
15 public float GetLengthSq() {
16 return this.m_x*this.m_x + this.m_y*this.m_y + this.m_z*this.m_z;
19 public float GetLength() {
20 return Math.sqrtf(GetLengthSq());
24 this.m_x /= GetLength();
25 this.m_y /= GetLength();
26 this.m_z /= GetLength();
54 return new Vec3(this.m_x+v.m_x, this.m_y+v.m_y, this.m_z+v.m_z);
58 return new Vec3(-this.m_x, -this.m_y, -this.m_z);
62 return new Vec3(this.m_x-v.m_x, this.m_y-v.m_y, this.m_z-v.m_z);
66 return new Vec3(this.m_x*s, this.m_y*s, this.m_z*s);
70 return new Vec3(this.m_x/s, this.m_y/s, this.m_z/s);
74 return this.m_x*v.m_x + this.m_y*v.m_y + this.m_z*v.m_z;
78 return new Vec3(this.m_x, this.m_y, this.m_z);
81 boolean isLess(Vec3 v) {
82 if((this.m_x > v.m_x) || (this.m_y > v.m_y) || (this.m_z > v.m_z)) {