Example #1
0
Vec3f Vec3f::operator^(const Vec3f& other) const
{
    Vec3f res(  Y()*other.Z()-Z()*other.Y()
                ,Z()*other.X()-X()*other.Z()
                ,X()*other.Y()-Y()*other.X());
    return res;
}
Example #2
0
float Vec3f::operator*(const Vec3f& other) const
{
    return X()*other.X()+Y()*other.Y()+Z()*other.Z();
}