Login  Register

Re: RS_MAXDOUBLE

Posted by R. van Twisk on Jan 18, 2016; 7:15pm
URL: https://forum.librecad.org/RS-MAXDOUBLE-tp5712826p5712827.html



On Jan 18, 2016, at 8:13 PM, ravas [via LibreCAD] <[hidden email]> wrote:

In rs_snapper.cpp:
#define RS_MAXDOUBLE 1.0E+10

What is the significance of this number?
---

In RS_Snapper::snapPoint:
double ds2Min=RS_MAXDOUBLE*RS_MAXDOUBLE;

What is the significance of this number?
It seems like we can just hardcode the product,
instead of squaring RS_MAXDOUBLE with every snap.

The compiler would calculate this under compile time, so
I wouldn't worry about performance here.

I don't have a answer for your previous questions..