| 333 | } |
| 334 | |
| 335 | inline F32 RectF::getSqDistanceToPoint( const Point2F &refPt ) const |
| 336 | { |
| 337 | const Point2F maxPoint( point + extent ); |
| 338 | |
| 339 | F32 sqDist = 0.0f; |
| 340 | |
| 341 | for ( U32 i=0; i < 2; i++ ) |
| 342 | { |
| 343 | const F32 v = refPt[i]; |
| 344 | if ( v < point[i] ) |
| 345 | sqDist += mSquared( point[i] - v ); |
| 346 | else if ( v > maxPoint[i] ) |
| 347 | sqDist += mSquared( v - maxPoint[i] ); |
| 348 | } |
| 349 | |
| 350 | return sqDist; |
| 351 | } |
| 352 | |
| 353 | inline bool RectF::intersect(const RectF& clipRect) |
| 354 | { |
nothing calls this directly
no test coverage detected