Example #1
0
vec2f operator*(const float k, const vec2f& v1){
    return vec2f(v1.peekx()*k,
                 v1.peeky()*k);
}
Example #2
0
float dot(const vec2f& v1, const vec2f& v2){
    return ((v1.peekx()*v2.peekx())+
            (v1.peeky()*v2.peeky()));
}
Example #3
0
vec2f operator-(const vec2f& v1, const vec2f &v2){
    return vec2f(v1.peekx()-v2.peekx(),
                 v1.peeky()-v2.peeky());
}