예제 #1
0
        /// <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);
        }
예제 #2
0
 public static Fixed16Dot16 DivFix(int a, Fixed16Dot16 b)
 {
     return(Fixed16Dot16.FromRawValue((int)FT.FT_DivFix((IntPtr)a, (IntPtr)b.Value)));
 }
예제 #3
0
 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)));
 }
예제 #4
0
 public static Fixed16Dot16 AngleDiff(Fixed16Dot16 angle1, Fixed16Dot16 angle2)
 {
     return(Fixed16Dot16.FromRawValue((int)FT.FT_Angle_Diff((IntPtr)angle1.Value, (IntPtr)angle2.Value)));
 }
예제 #5
0
 public static Fixed16Dot16 Atan2(Fixed16Dot16 x, Fixed16Dot16 y)
 {
     return(Fixed16Dot16.FromRawValue((int)FT.FT_Atan2((IntPtr)x.Value, (IntPtr)y.Value)));
 }
예제 #6
0
 public static Fixed16Dot16 Tan(Fixed16Dot16 angle)
 {
     return(Fixed16Dot16.FromRawValue((int)FT.FT_Tan((IntPtr)angle.Value)));
 }
예제 #7
0
 public static Fixed16Dot16 FloorFix(Fixed16Dot16 a)
 {
     return(Fixed16Dot16.FromRawValue((int)FT.FT_FloorFix((IntPtr)a.Value)));
 }
예제 #8
0
 /// <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)));
 }
예제 #9
0
 public static Fixed16Dot16 CeilFix(Fixed16Dot16 a)
 {
     return(Fixed16Dot16.FromRawValue((int)FT_CeilFix((IntPtr)a.Value)));
 }