Exemple #1
0
 public static float3 Mul(float3 v, float3x3 m)
 {
     float3 r;
     r.x = m.Col0.Dot(v);
     r.y = m.Col1.Dot(v);
     r.z = m.Col2.Dot(v);
     return r;
 }
Exemple #2
0
 public float this[int r, int c]
 {
     get
     {
         return ToArray()[(r * 3) + c];
     }
     set
     {
         float[] f = ToArray();
         f[(r * 3) + c] = value;
         this = new float3x3(f);
     }
 }
Exemple #3
0
 public static float3 Mul(float3x3 m, float3 v)
 {
     float3 r;
     r.x = m.Row0.Dot(v);
     r.y = m.Row1.Dot(v);
     r.z = m.Row2.Dot(v);
     return r;
 }