Go to the documentation of this file.00001
00002 float Vector_Dot_Product(float vector1[3],float vector2[3])
00003 {
00004 float op=0;
00005
00006 for(int c=0; c<3; c++)
00007 {
00008 op+=vector1[c]*vector2[c];
00009 }
00010
00011 return op;
00012 }
00013
00014
00015 void Vector_Cross_Product(float vectorOut[3], float v1[3],float v2[3])
00016 {
00017 vectorOut[0]= (v1[1]*v2[2]) - (v1[2]*v2[1]);
00018 vectorOut[1]= (v1[2]*v2[0]) - (v1[0]*v2[2]);
00019 vectorOut[2]= (v1[0]*v2[1]) - (v1[1]*v2[0]);
00020 }
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031 void Vector_Scale(float vectorOut[3],float vectorIn[3], float scale2)
00032 {
00033 for(int c=0; c<3; c++)
00034 {
00035 vectorOut[c]=vectorIn[c]*scale2;
00036 }
00037 }
00038
00039 void Vector_Add(float vectorOut[3],float vectorIn1[3], float vectorIn2[3])
00040 {
00041 for(int c=0; c<3; c++)
00042 {
00043 vectorOut[c]=vectorIn1[c]+vectorIn2[c];
00044 }
00045 }
00046
00047
00048
00049
00050
00051
00052
00053
00054
00055
00056