Skip to content

update point_in_prism #18

Closed
HomerReid wants to merge 1 commit intoNanoComp:masterfrom
HomerReid:point_in_prism_update
Closed

update point_in_prism #18
HomerReid wants to merge 1 commit intoNanoComp:masterfrom
HomerReid:point_in_prism_update

Conversation

@HomerReid
Copy link

update point_in_prism to avoid double-counting of polygon edge intersections when plumb lines pass through vertices

…ections when plumb lines pass through vertices
#define DELTAT 1.0e-6
#define TMIN (0.0)
#define TMAX (1.0-DELTAT)
return ( ( t<TMIN || t>TMAX ) ? 0 : 1 );
Copy link
Collaborator

@stevengj stevengj Jul 11, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I usually prefer rounding to float for this kind of approximate comparison, i.e. wouldn't

return t < 0 || ((float)t) >= 1 ? 0 : 1;

work?

@stevengj stevengj mentioned this pull request Jul 12, 2018
@stevengj
Copy link
Collaborator

Superseded by #19.

@stevengj stevengj closed this Jul 12, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants