21const FR2Vect2DC FR2Vect2DC::rotate(
26 double cosine=cos(theta),
30 retval.x1 = x1 * cosine - x2 * sine;
31 retval.x2 = x2 * cosine + x1 * sine;
37const FR2Vect2FC FR2Vect2FC::rotate(
42 float cosine = (float)cos(theta),
43 sine = (float)sin(theta);
46 retval.x1 = x1 * cosine - x2 * sine;
47 retval.x2 = x2 * cosine + x1 * sine;
56std::ostream& operator<<(std::ostream& s,FR2Vect2IC vec)
58 return s <<
"(" << vec.x1 <<
"," << vec.x2 <<
")";
61std::ostream& operator<<(std::ostream& s,FR2Vect2FC vec)
63 std::ios::fmtflags oldFlag = s.setf(std::ios::fixed|std::ios::showpos|std::ios::right);
64 std::streamsize oldPrec = s.precision(4);
65 s <<
"(" << vec.x1 <<
"," << vec.x2 <<
")";
71std::ostream& operator<<(std::ostream& s,FR2Vect2DC vec)
73 std::ios::fmtflags oldFlag = s.setf(std::ios::fixed|std::ios::showpos|std::ios::right);
74 std::streamsize oldPrec = s.precision(4);
75 s <<
"(" << vec.x1 <<
"," << vec.x2 <<
")";