Added iostream operators
This commit is contained in:
parent
d006ce627f
commit
f417974f5b
@ -236,16 +236,25 @@ class Vec4d
|
||||
return( norm );
|
||||
}
|
||||
|
||||
friend inline std::ostream& operator << (std::ostream& output, const Vec4d& vec)
|
||||
{
|
||||
}; // end of class Vec4d
|
||||
|
||||
|
||||
// streaming operators
|
||||
|
||||
inline std::ostream& operator << (std::ostream& output, const Vec4d& vec)
|
||||
{
|
||||
output << vec._v[0] << " "
|
||||
<< vec._v[1] << " "
|
||||
<< vec._v[2] << " "
|
||||
<< vec._v[3];
|
||||
return output; // to enable cascading
|
||||
}
|
||||
}
|
||||
|
||||
}; // end of class Vec4d
|
||||
inline std::istream& operator >> (std::istream& input, Vec4d& vec)
|
||||
{
|
||||
input >> vec._v[0] >> vec._v[1] >> vec._v[2] >> vec._v[3];
|
||||
return input;
|
||||
}
|
||||
|
||||
|
||||
/** Compute the dot product of a (Vec3,1.0) and a Vec4d. */
|
||||
|
Loading…
Reference in New Issue
Block a user