コード例 #1
0
ファイル: mathx.cs プロジェクト: Kmiecis/Unity-CommonECS
 public static float2 mul(byte2 a, float b)
 {
     return(new float2(
                a.x * b,
                a.y * b
                ));
 }
コード例 #2
0
ファイル: mathx.cs プロジェクト: Kmiecis/Unity-CommonECS
 public static float2 mul(float a, byte2 b)
 {
     return(new float2(
                a * b.x,
                a * b.y
                ));
 }
コード例 #3
0
ファイル: mathx.cs プロジェクト: Kmiecis/Unity-CommonECS
 public static float2 lerp(byte2 x, byte2 y, float s)
 {
     return(x + mul(s, (y - x)));
 }
コード例 #4
0
ファイル: byte2.cs プロジェクト: Kmiecis/Unity-CommonECS
 public bool Equals(byte2 v)
 {
     return(x == v.x && y == v.y);
 }
コード例 #5
0
ファイル: byte2.cs プロジェクト: Kmiecis/Unity-CommonECS
 public byte2(byte2 v)
 {
     this.x = v.x;
     this.y = v.y;
 }
コード例 #6
0
ファイル: graphx.cs プロジェクト: Kmiecis/Unity-CommonECS
 public static float2 b2f(byte2 b)
 {
     return(mathx.mul(b, 1f) / byte.MaxValue);
 }