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)); }
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)); }
public static Fixed2 Parse(Fixed ratio) { return(new Fixed2(MathFixed.CosAngle(ratio), MathFixed.SinAngle(ratio))); }