Login  Register

RS_MAXDOUBLE

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

RS_MAXDOUBLE

ravas
870 posts
This post was updated on Jan 18, 2016; 7:18pm.
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
| More
Print post
Permalink

Re: RS_MAXDOUBLE

R. van Twisk
Administrator
489 posts


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
| More
Print post
Permalink

Re: RS_MAXDOUBLE

ravas
870 posts
Bedankt!