Пример #1
0
        public static FixedQuaternion Normalize(FixedQuaternion c)
        {
            Fixed scale = Fixed.One / c.magnitude;

            return(new FixedQuaternion(c.x * scale, c.y * scale, c.z * scale, c.w * scale));
        }
Пример #2
0
 /// <summary>
 ///   <para>Linearly interpolates between vectors a and b by t.</para>
 /// </summary>
 /// <param name="a"></param>
 /// <param name="b"></param>
 /// <param name="t"></param>
 public static FixedVector2 Lerp(FixedVector2 a, FixedVector2 b, Fixed t)
 {
     t = FixedMathf.Clamp01(t);
     return(new FixedVector2(a.x + (b.x - a.x) * t, a.y + (b.y - a.y) * t));
 }
Пример #3
0
 public FixedVector3(Fixed x, Fixed y, Fixed z)
 {
     this.x = x;
     this.y = y;
     this.z = z;
 }
Пример #4
0
 public FixedVector2(Fixed x, Fixed y)
 {
     this.x = x;
     this.y = y;
 }
Пример #5
0
 public static FixedVector3 Lerp(FixedVector3 a, FixedVector3 b, Fixed t)
 {
     t = FixedMathf.Clamp01(t);
     return(new FixedVector3(a.x + (b.x - a.x) * t, a.y + (b.y - a.y) * t, a.z + (b.z - a.z) * t));
 }