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)); }
/// <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)); }
public FixedVector3(Fixed x, Fixed y, Fixed z) { this.x = x; this.y = y; this.z = z; }
public FixedVector2(Fixed x, Fixed y) { this.x = x; this.y = y; }
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)); }