revised model loading order
[csRadar.git] / csrMath.h
index 5a55ef2b9beecca8624a6abeb9b40a71076bfb43..77733cf5afdca45b04fa2bc1b2c52b185a511e30 100644 (file)
--- a/csrMath.h
+++ b/csrMath.h
@@ -73,6 +73,16 @@ void v2_add( v2f a, v2f b, v2f d )
        d[0] = a[0]+b[0]; d[1] = a[1]+b[1];
 }
 
+void v2_muls( v2f a, float s, v2f d )
+{
+       d[0] = a[0]*s; d[1] = a[1]*s;
+}
+
+void v2_mul( v2f a, v2f b, v2f d )
+{
+       d[0] = a[0]*b[0]; d[1] = a[1]*b[1];
+}
+
 // Vector 3
 // ==================================================================================================================
 
@@ -204,11 +214,18 @@ void v3_fill( v3f a, float v )
 }
 
 // Vector 4
+// ==================================================================================================================
+
 void v4_copy( v4f a, v4f b )
 {
        b[0] = a[0]; b[1] = a[1]; b[2] = a[2]; b[3] = a[3];
 }
 
+void v4_zero( v4f a )
+{
+       a[0] = 0.f; a[1] = 0.f; a[2] = 0.f; a[3] = 0.f;
+}
+
 // Matrix 3x3
 //======================================================================================================