Exemple #1
0
public static int AcosFastest(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.SqrtFastest(xx);

    return((int)(Fixed64.Atan2Fastest(y, (long)x << 16) >> 16));
}
Exemple #2
0
 public static F64 SqrtFastest(F64 a)
 {
     return(FromRaw(Fixed64.SqrtFastest(a.raw)));
 }