Jump to content
ejr32123

vex precision problem

Recommended Posts

Posted (edited)

hello, I am having a problem, but it almost seems more like a glitch. I have an attribute called "distance" on the curve. I am deleting points based on distance. The point's value that is circled is 0.087. I say to delete anything greater then 0.087, but for some reason that point gets deleted too. It's acting like I said equal to or greater than. I am also including a photo from my actual scene. If I set the value to 0.088 instead of 0.087 some how it works. Any help is welcomed

(hip at bottom)

blast.jpg

blast2.jpg

blast3.jpg

curve.hiplc

Edited by ejr32123

Share this post


Link to post
Share on other sites

Hi,

If you turn on full precision in spreadsheet, you can see the distance is slightly greater than 0.087, but if you add a small value on your threshold it should work (something like 1e-6).  

 

image.thumb.png.9d3aa2af29f521ca72e969b340435099.png

Share this post


Link to post
Share on other sites
2 minutes ago, Aizatulin said:

Hi,

If you turn on full precision in spreadsheet, you can see the distance is slightly greater than 0.087, but if you add a small value on your threshold it should work (something like 1e-6).  

 

image.thumb.png.9d3aa2af29f521ca72e969b340435099.png

ooh, thanks, I didnt know I had to turn on full precision

Share this post


Link to post
Share on other sites
Posted (edited)

@Aizatulin it still doesnt make sense because in my main scene the distance value is getting the cut distance from my attribute wrangle. Why would it be slightly higher is the channels are linked?

set value.jpg

Edited by ejr32123

Share this post


Link to post
Share on other sites

Usually these are effects of numerical inaccuracy. Even if your input value is 0.087, the calculated value can be slightly greater or less, and the floating representation for 0.087 is not exactly 0.087.

In your case, the difference seems ok. It is around 1e-8, which is near the the float machine epsilon.

Check my example, there is a similar effect.

clip_0087.hipnc

  • Like 1

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×