54 double ss = std::sin(aangle);
55 double cc = std::cos(aangle);
70 os <<
"(" << q.
x() <<
", " << q.
y() <<
")";
75 double &
x,
double &
y );
91 }
else if (
dy < v.
dy ) {
93 }
else if (
dx > v.
dx ) {
95 }
else if (
dx < v.
dx ) {
118 return ( (*
this - p).
mag2() <= limit );
122 double d = (*
this -
p).
mag2();
124 if ( (pdp > 0) && (d < pdp) ) {
125 return std::sqrt (d/pdp);
126 }
else if ( (pdp == 0) && (d == 0) ) {
136 double v1v2 = std::fabs(
dot(v));
139 return ( (
mag2() == 0) && (v.
mag2() == 0) ) ? 0 : 1;
141 double abscross = std::fabs (
dx * v.
y() -
dy - v.
x() );
142 if ( abscross >= v1v2 ) {
145 return abscross/v1v2;
153 double v1v2 = std::fabs(
dot(v));
156 return ( (
mag2() == 0) && (v.
mag2() == 0) );
158 double abscross = std::fabs (
dx * v.
y() -
dy - v.
x() );
159 return ( abscross <= epsilon * v1v2 );
165 double v1v2 = std::fabs(
dot(v));
169 double abscross = std::fabs (
dx * v.
y() -
dy - v.
x() );
170 if ( v1v2 >= abscross ) {
173 return v1v2/abscross;
181 double v1v2 = std::fabs(
dot(v));
182 double abscross = std::fabs (
dx * v.
y() -
dy - v.
x() );
183 return ( v1v2 <= epsilon * abscross );