예제 #1
0
 public static float2 mul(byte2 a, float b)
 {
     return(new float2(
                a.x * b,
                a.y * b
                ));
 }
예제 #2
0
 public static float2 mul(float a, byte2 b)
 {
     return(new float2(
                a * b.x,
                a * b.y
                ));
 }
예제 #3
0
 public static float2 lerp(byte2 x, byte2 y, float s)
 {
     return(x + mul(s, (y - x)));
 }
예제 #4
0
 public bool Equals(byte2 v)
 {
     return(x == v.x && y == v.y);
 }
예제 #5
0
 public byte2(byte2 v)
 {
     this.x = v.x;
     this.y = v.y;
 }
예제 #6
0
 public static float2 b2f(byte2 b)
 {
     return(mathx.mul(b, 1f) / byte.MaxValue);
 }