RS_MAXDOUBLE

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

RS_MAXDOUBLE

ravas
This post was updated on .
In rs.h:
#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.
Reply | Threaded
Open this post in threaded view
|

Re: RS_MAXDOUBLE

R. van Twisk
Administrator


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..

Reply | Threaded
Open this post in threaded view
|

Re: RS_MAXDOUBLE

ravas
Bedankt!