예제 #1
0
VEC3 cross(const VEC3& a, const VEC3& b)
{
    float x = (a.y()*b.z())-(b.y()*a.z());
    float y = (a.z()*b.x())-(b.z()*b.x());
    float z = (a.x()*b.y())-(b.x()*a.y());
    
    return (VEC3(x, y, z));
}
예제 #2
0
VEC3 operator* (const float scalar, VEC3& v)
{
    return(VEC3(scalar * v.x(), scalar * v.y(), scalar * v.z()));
}