public static float dot(float[] u,float[] v) {
        return ((u[X] * v[X]) + (u[Y] * v[Y]) + (u[Z] * v[Z]));
    }
public static float dot ( float [ ] u , float [ ] v ) { return ( ( u [ X ] * v [ X ] ) + ( u [ Y ] * v [ Y ] ) + ( u [ Z ] * v [ Z ] ) ) ; }
dot product (3D) which allows vector operations in arguments