Beispiel #1
0
 public static F64Vec2 FromDouble(double x, double y)
 {
     return(new F64Vec2(F64.FromDouble(x), F64.FromDouble(y)));
 }
Beispiel #2
0
 public static F64Vec2 FromInt(int x, int y)
 {
     return(new F64Vec2(F64.FromInt(x), F64.FromInt(y)));
 }
Beispiel #3
0
 public static F64Vec2 FromFloat(float x, float y)
 {
     return(new F64Vec2(F64.FromFloat(x), F64.FromFloat(y)));
 }
Beispiel #4
0
 public static F64Vec2 Max(F64Vec2 a, F64Vec2 b)
 {
     return(new F64Vec2(F64.Max(a.x, b.x), F64.Max(a.y, b.y)));
 }
Beispiel #5
0
 public static F64Vec2 RSqrtFastest(F64Vec2 a)
 {
     return(new F64Vec2(F64.RSqrtFastest(a.x), F64.RSqrtFastest(a.y)));
 }
Beispiel #6
0
 public static F64 Pow(F64 a, F64 b)
 {
     return(FromRaw(Fixed64.Pow(a.raw, b.raw)));
 }
Beispiel #7
0
 public static F64Vec2 Normalize(F64Vec2 a)
 {
     F64 ooLen = LengthSqr(a).RSqrt(); return(ooLen * a);
 }
Beispiel #8
0
 public static F64Vec2 CosFastest(F64Vec2 a)
 {
     return(new F64Vec2(F64.CosFastest(a.x), F64.CosFastest(a.y)));
 }
Beispiel #9
0
 public static F64Vec2 PowFastest(F64Vec2 a, F64 b)
 {
     return(new F64Vec2(F64.PowFastest(a.x, b), F64.PowFastest(a.y, b)));
 }
Beispiel #10
0
 public static F64Vec2 Log2Fastest(F64Vec2 a)
 {
     return(new F64Vec2(F64.Log2Fastest(a.x), F64.Log2Fastest(a.y)));
 }
Beispiel #11
0
 public static F64Vec2 SinFast(F64Vec2 a)
 {
     return(new F64Vec2(F64.SinFast(a.x), F64.SinFast(a.y)));
 }
Beispiel #12
0
 public static F64Vec2 Log(F64Vec2 a)
 {
     return(new F64Vec2(F64.Log(a.x), F64.Log(a.y)));
 }
Beispiel #13
0
 public static F64Vec2 Exp2Fast(F64Vec2 a)
 {
     return(new F64Vec2(F64.Exp2Fast(a.x), F64.Exp2Fast(a.y)));
 }
Beispiel #14
0
 public static F64Vec2 RcpFast(F64Vec2 a)
 {
     return(new F64Vec2(F64.RcpFast(a.x), F64.RcpFast(a.y)));
 }
Beispiel #15
0
 public static F64 Atan2(F64 y, F64 x)
 {
     return(FromRaw(Fixed64.Atan2(y.raw, x.raw)));
 }
Beispiel #16
0
 public static F64Vec2 PowFastest(F64 a, F64Vec2 b)
 {
     return(new F64Vec2(F64.PowFastest(a, b.x), F64.PowFastest(a, b.y)));
 }
Beispiel #17
0
 public static F64 Max(F64 a, F64 b)
 {
     return(FromRaw(Fixed64.Max(a.raw, b.raw)));
 }
Beispiel #18
0
 public static F64 LengthFastest(F64Vec2 a)
 {
     return(F64.SqrtFastest(a.x * a.x + a.y * a.y));
 }
Beispiel #19
0
 public static F64Vec2 Pow(F64Vec2 a, F64Vec2 b)
 {
     return(new F64Vec2(F64.Pow(a.x, b.x), F64.Pow(a.y, b.y)));
 }
Beispiel #20
0
 public static F64Vec2 NormalizeFastest(F64Vec2 a)
 {
     F64 ooLen = F64.RSqrtFastest(LengthSqr(a)); return(ooLen * a);
 }
Beispiel #21
0
 public static F64Vec2 Lerp(F64Vec2 a, F64Vec2 b, F64 t)
 {
     return((F64.One - t) * a + t * b);
 }                                                                                               // \todo [petri] is a + t*(b-a) better formula?
Beispiel #22
0
 public static F64Vec2 Lerp(F64Vec2 a, F64Vec2 b, F64 t)
 {
     return(a + t * (b - a));
 }
Beispiel #23
0
 public F64Vec2(F64 x, F64 y)
 {
     this.x = x;
     this.y = y;
 }
Beispiel #24
0
 public static F64Vec2 SqrtPrecise(F64Vec2 a)
 {
     return(new F64Vec2(F64.SqrtPrecise(a.x), F64.SqrtPrecise(a.y)));
 }