Beispiel #1
0
        public Fixed2 Rotate(Fixed value)
        {
            Fixed tx, ty;

            tx = MathFixed.CosAngle(value) * x - y * MathFixed.SinAngle(value);
            ty = MathFixed.CosAngle(value) * y + x * MathFixed.SinAngle(value);
            return(new Fixed2(tx, ty));
        }
Beispiel #2
0
        public Fixed2 Rotate(Fixed value)
        {
            Fixed tx, ty;

            tx = MathFixed.CosAngle(value) * x - y * MathFixed.SinAngle(value);
            ty = MathFixed.CosAngle(value) * y + x * MathFixed.SinAngle(value);
            // Debug.Log("f:" + f + "sin90" + Mathf.Sin(90) + "cos90" + (Math.Cos(90)));
            //1,0   tx=1*0-0  ty
            return(new Fixed2(tx, ty));
        }
Beispiel #3
0
 public static Fixed2 Parse(Fixed ratio)
 {
     return(new Fixed2(MathFixed.CosAngle(ratio), MathFixed.SinAngle(ratio)));
 }