Пример #1
0
        public void Normalize()
        {
            FixVector3 nor = normalized;

            this.x = nor.x;
            this.y = nor.y;
            this.z = nor.z;
        }
Пример #2
0
 public static Fix64 Distance(FixVector3 lhs, FixVector3 rhs)
 {
     return((lhs - rhs).magnitude);
 }
Пример #3
0
 public static FixVector3 Cross(FixVector3 lhs, FixVector3 rhs)
 {
     return(new FixVector3((lhs.y * rhs.z) - (lhs.z * rhs.y), (lhs.z * rhs.x) - (lhs.x * rhs.z), (lhs.x * rhs.y) - (lhs.y * rhs.x)));
 }
Пример #4
0
 public static Fix64 Dot(FixVector3 lhs, FixVector3 rhs)
 {
     return(lhs.x * rhs.x + lhs.y * rhs.y + lhs.z * rhs.z);
 }
Пример #5
0
 public static Fix64 Magnitude(FixVector3 vector)
 {
     return((vector.x * vector.x) + (vector.y * vector.y) + (vector.z * vector.z));
 }
Пример #6
0
 public static FixVector3 Lerp(FixVector3 start, FixVector3 end, Fix64 percent)
 {
     return(start + percent * (end - start));
 }
Пример #7
0
 public static FixVector3 Normalize(FixVector3 value)
 {
     return(value.normalized);
 }