コード例 #1
0
public static int AcosFast(int x)
{
    // Compute Atan2(Sqrt((1+x) * (1-x)), x), using s32.32.
    Debug.Assert(x >= -One && x <= One);
    long xx = (long)(One + x) * (long)(One - x);
    long y  = Fixed64.SqrtFast(xx);

    return((int)(Fixed64.Atan2Fast(y, (long)x << 16) >> 16));
}
コード例 #2
0
ファイル: F64.cs プロジェクト: suzuke/FixPointCS
 public static F64 Atan2Fast(F64 y, F64 x)
 {
     return(FromRaw(Fixed64.Atan2Fast(y.raw, x.raw)));
 }