示例#1
0
文件: Vec2.cs 项目: fnunnari/YALLAH
 public static global::glm.Vec2 subtractVecOp(global::glm.Vec2 a, global::glm.Vec2 b)
 {
     global::glm.Vec2 dest = new global::glm.Vec2(default(global::haxe.lang.Null <double>), default(global::haxe.lang.Null <double>));
     dest.x = (a.x - b.x);
     dest.y = (a.y - b.y);
     return(dest);
 }
示例#2
0
文件: Vec2.cs 项目: fnunnari/YALLAH
 public static global::glm.Vec2 addScalarOp(global::glm.Vec2 a, double s)
 {
     global::glm.Vec2 dest = new global::glm.Vec2(default(global::haxe.lang.Null <double>), default(global::haxe.lang.Null <double>));
     dest.x = (a.x + s);
     dest.y = (a.y + s);
     return(dest);
 }
示例#3
0
文件: Vec2.cs 项目: fnunnari/YALLAH
        public static void __hx_ctor_glm_Vec2(global::glm.Vec2 __hx_this, global::haxe.lang.Null <double> x, global::haxe.lang.Null <double> y)
        {
            double __temp_y44 = ((!(y.hasValue)) ? (((double)(0))) : ((y).@value));
            double __temp_x43 = ((!(x.hasValue)) ? (((double)(0))) : ((x).@value));

            __hx_this.x = __temp_x43;
            __hx_this.y = __temp_y44;
        }
示例#4
0
文件: Vec2.cs 项目: fnunnari/YALLAH
        public static global::glm.Vec2 subtractScalarOp(global::glm.Vec2 a, double s)
        {
            double s1 = -(s);

            global::glm.Vec2 dest = new global::glm.Vec2(default(global::haxe.lang.Null <double>), default(global::haxe.lang.Null <double>));
            dest.x = (a.x + s1);
            dest.y = (a.y + s1);
            return(dest);
        }
示例#5
0
        public static global::glm.Vec2 multVec(global::glm.Mat2 m, global::glm.Vec2 v, global::glm.Vec2 dest)
        {
            double x = v.x;
            double y = v.y;

            dest.x = ((m._00 * x) + (m._10 * y));
            dest.y = ((m._01 * x) + (m._11 * y));
            return(dest);
        }
示例#6
0
文件: Vec2.cs 项目: fnunnari/YALLAH
        public static global::glm.Vec2 @set(global::glm.Vec2 dest, global::haxe.lang.Null <double> x, global::haxe.lang.Null <double> y)
        {
            double __temp_y42 = ((!(y.hasValue)) ? (((double)(0))) : ((y).@value));
            double __temp_x41 = ((!(x.hasValue)) ? (((double)(0))) : ((x).@value));

            dest.x = __temp_x41;
            dest.y = __temp_y42;
            return(dest);
        }
示例#7
0
文件: Vec2.cs 项目: fnunnari/YALLAH
        public static global::glm.Vec2 lerp(global::glm.Vec2 a, global::glm.Vec2 b, double t, global::glm.Vec2 dest)
        {
            double a1 = a.x;

            dest.x = (a1 + (t * ((b.x - a1))));
            double a2 = a.y;

            dest.y = (a2 + (t * ((b.y - a2))));
            return(dest);
        }
示例#8
0
        public static global::glm.Vec2 multVecOp(global::glm.Mat2 m, global::glm.Vec2 v)
        {
            global::glm.Vec2 dest = new global::glm.Vec2(default(global::haxe.lang.Null <double>), default(global::haxe.lang.Null <double>));
            double           x    = v.x;
            double           y    = v.y;

            dest.x = ((m._00 * x) + (m._10 * y));
            dest.y = ((m._01 * x) + (m._11 * y));
            return(dest);
        }
示例#9
0
文件: Vec2.cs 项目: fnunnari/YALLAH
 public static global::glm.Vec2 divideScalarOp(global::glm.Vec2 a, double s)
 {
     unchecked {
         double           s1   = (1 / s);
         global::glm.Vec2 dest = new global::glm.Vec2(default(global::haxe.lang.Null <double>), default(global::haxe.lang.Null <double>));
         dest.x = (a.x * s1);
         dest.y = (a.y * s1);
         return(dest);
     }
 }
示例#10
0
文件: Vec2.cs 项目: fnunnari/YALLAH
        public static global::glm.Vec2 normalize(global::glm.Vec2 v, global::glm.Vec2 dest)
        {
            unchecked {
                double length = global::System.Math.Sqrt(((double)(((v.x * v.x) + (v.y * v.y)))));
                double mult   = ((double)(0));
                if ((length >= global::glm.GLM.EPSILON))
                {
                    mult = (1 / length);
                }

                dest.x = (v.x * mult);
                dest.y = (v.y * mult);
                return(dest);
            }
        }
示例#11
0
文件: Vec2.cs 项目: fnunnari/YALLAH
 public static double distance(global::glm.Vec2 a, global::glm.Vec2 b)
 {
     return(global::System.Math.Sqrt(((double)(((((a.x - b.x)) * ((a.x - b.x))) + (((a.y - b.y)) * ((a.y - b.y))))))));
 }
示例#12
0
文件: Vec2.cs 项目: fnunnari/YALLAH
 public static double dot(global::glm.Vec2 a, global::glm.Vec2 b)
 {
     return((a.x * b.x) + (a.y * b.y));
 }
示例#13
0
文件: Vec2.cs 项目: fnunnari/YALLAH
 public static global::glm.Vec3 cross(global::glm.Vec2 a, global::glm.Vec2 b, global::glm.Vec3 dest)
 {
     dest = new global::glm.Vec3(new global::haxe.lang.Null <double>(((double)(0)), true), new global::haxe.lang.Null <double>(((double)(0)), true), new global::haxe.lang.Null <double>(((a.x * b.y) - (a.y * b.x)), true));
     return(dest);
 }
示例#14
0
文件: Vec2.cs 项目: fnunnari/YALLAH
 public static global::glm.Vec2 multiplyScalar(global::glm.Vec2 a, double s, global::glm.Vec2 dest)
 {
     dest.x = (a.x * s);
     dest.y = (a.y * s);
     return(dest);
 }
示例#15
0
文件: Vec2.cs 项目: fnunnari/YALLAH
 public static global::glm.Vec2 addScalar(global::glm.Vec2 a, double s, global::glm.Vec2 dest)
 {
     dest.x = (a.x + s);
     dest.y = (a.y + s);
     return(dest);
 }
示例#16
0
文件: Vec2.cs 项目: fnunnari/YALLAH
 public static global::glm.Vec2 subtractVec(global::glm.Vec2 a, global::glm.Vec2 b, global::glm.Vec2 dest)
 {
     dest.x = (a.x - b.x);
     dest.y = (a.y - b.y);
     return(dest);
 }
示例#17
0
文件: Vec2.cs 项目: fnunnari/YALLAH
 public static global::glm.Vec2 addVec(global::glm.Vec2 a, global::glm.Vec2 b, global::glm.Vec2 dest)
 {
     dest.x = (a.x + b.x);
     dest.y = (a.y + b.y);
     return(dest);
 }
示例#18
0
文件: Vec2.cs 项目: fnunnari/YALLAH
 public static double distanceSquared(global::glm.Vec2 a, global::glm.Vec2 b)
 {
     return((((a.x - b.x)) * ((a.x - b.x))) + (((a.y - b.y)) * ((a.y - b.y))));
 }
示例#19
0
文件: Vec2.cs 项目: fnunnari/YALLAH
 public bool @equals(global::glm.Vec2 b)
 {
     return(!((((global::System.Math.Abs(((double)((this.x - b.x)))) >= global::glm.GLM.EPSILON) || (global::System.Math.Abs(((double)((this.y - b.y)))) >= global::glm.GLM.EPSILON)))));
 }
示例#20
0
文件: Vec2.cs 项目: fnunnari/YALLAH
 public static global::glm.Vec2 copy(global::glm.Vec2 src, global::glm.Vec2 dest)
 {
     dest.x = src.x;
     dest.y = src.y;
     return(dest);
 }