On Jun 17, 2013, at 10:38 AM, [email protected] wrote:

> Revision: 55793
>          http://sourceforge.net/p/brlcad/code/55793
> Author:   phoenixyjll
> Date:     2013-06-17 14:38:53 +0000 (Mon, 17 Jun 2013)
> Log Message:
> -----------
> The tolerance should be considered in the IsPointIn() test.
[snip]
> -    bu_log("PCI called.\n");
> +    if (tolerance <= 0.0)
> +     tolerance = 0.01;

Introducing new magic numbers such as this one should be avoided.  It is 
invariably brittle and, in the long term, bug-prone.  Suggest using something 
already defined such as BN_TOL_DIST or RT_DOT_TOL or RT_LEN_TOL or VUNITIZE_TOL 
or ... etc.  Still, any constant rationale/need should also just be documented.

Why 0.01?  Why not 0.001 or 0.1 or 0.02?  What's the sensitivity and rationale? 
 That should all be documented right there with the value (less important if 
it's a defined TOL, but still good to have).

Yes there are lots of places we fail to do this.  That's why it's important to 
not introduce any new ones! :)  Feel free to fix any others as well, but do 
test.

Cheers!
Sean


------------------------------------------------------------------------------
This SF.net email is sponsored by Windows:

Build for Windows Store.

http://p.sf.net/sfu/windows-dev2dev
_______________________________________________
BRL-CAD Developer mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/brlcad-devel

Reply via email to