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