/// <summary> /// Compute both the length and angle of a given vector. /// </summary> /// <param name="length">The vector length.</param> /// <param name="angle">The vector angle.</param> public void Polarize(out Fixed16Dot16 length, out Fixed16Dot16 angle) { IntPtr tmpLength, tmpAngle; FT.FT_Vector_Polarize(ref this, out tmpLength, out tmpAngle); length = Fixed16Dot16.FromRawValue((int)tmpLength); angle = Fixed16Dot16.FromRawValue((int)tmpAngle); }
public static Fixed16Dot16 DivFix(int a, Fixed16Dot16 b) { return(Fixed16Dot16.FromRawValue((int)FT.FT_DivFix((IntPtr)a, (IntPtr)b.Value))); }
public static Fixed16Dot16 MulDiv(Fixed16Dot16 a, Fixed16Dot16 b, Fixed16Dot16 c) { return(Fixed16Dot16.FromRawValue((int)FT.FT_MulDiv((IntPtr)a.Value, (IntPtr)b.Value, (IntPtr)c.Value))); }
public static Fixed16Dot16 AngleDiff(Fixed16Dot16 angle1, Fixed16Dot16 angle2) { return(Fixed16Dot16.FromRawValue((int)FT.FT_Angle_Diff((IntPtr)angle1.Value, (IntPtr)angle2.Value))); }
public static Fixed16Dot16 Atan2(Fixed16Dot16 x, Fixed16Dot16 y) { return(Fixed16Dot16.FromRawValue((int)FT.FT_Atan2((IntPtr)x.Value, (IntPtr)y.Value))); }
public static Fixed16Dot16 Tan(Fixed16Dot16 angle) { return(Fixed16Dot16.FromRawValue((int)FT.FT_Tan((IntPtr)angle.Value))); }
public static Fixed16Dot16 FloorFix(Fixed16Dot16 a) { return(Fixed16Dot16.FromRawValue((int)FT.FT_FloorFix((IntPtr)a.Value))); }
/// <summary> /// Return the length of a given vector. /// </summary> /// <returns>The vector length, expressed in the same units that the original vector coordinates.</returns> public Fixed16Dot16 Length() { return(Fixed16Dot16.FromRawValue((int)FT.FT_Vector_Length(ref this))); }
public static Fixed16Dot16 CeilFix(Fixed16Dot16 a) { return(Fixed16Dot16.FromRawValue((int)FT_CeilFix((IntPtr)a.Value))); }