Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- bool Sphere::IsValid(void) const throw() {
- bool ret = false;
- const rt_ell_internal* internalp = Internal();
- double dist = 0.0005 * 0.0005;
- if (!VNEAR_ZERO(internalp->a, SMALL_FASTF) &&
- !VNEAR_ZERO(internalp->b, SMALL_FASTF) &&
- !VNEAR_ZERO(internalp->c, SMALL_FASTF) &&
- NEAR_ZERO(VDOT(internalp->b, Internal()->a ), RT_DOT_TOL) &&
- NEAR_ZERO(VDOT(internalp->c, Internal()->a ), RT_DOT_TOL) &&
- NEAR_ZERO(VDOT(internalp->b, Internal()->c ), RT_DOT_TOL) &&
- NEAR_EQUAL(MAGNITUDE(internalp->a),MAGNITUDE(internalp->b), dist) &&
- NEAR_EQUAL(MAGNITUDE(internalp->b),MAGNITUDE(internalp->c), dist))
- ret = true;
- return ret;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement