float dotProduct(point2 vector1, point2 vector2){
return vector1[0]*vector2[0] + vector1[1] * vector2[1]
}
void unitVector2D(point2 vector1, GLfloat resultVector[]){
float length = (float)sqrt(dotproduct(vector1, vector1))
resultVector[0] = vector[0]/length
resultvector[1] = vector[1]/length
}
setupVectors(){
point2 unitB = {0,0}
//generate 2 random vectors A and B
unitVector2d(vectorB, unitB)
v3ctorC[0] = unitB[0] * dotProduct2d(vectorA,vectorB)
vectorC[0] = unitB[1] *
}