Itoo Software Forum

Author Topic: Precision bug  (Read 826 times)

Rokas

  • Hero Member
  • *****
  • Posts: 3324
Precision bug
« on: July 26, 2017, 05:55:02 PM »
Hi
Here it is a scene, where I have an isolated problem:
segment`s exported "z" can have two values 2 or 2.05.
I can`t compare them and drive rest of RC unless I multiply by 100 and do comparison after that.

Rokas

Paul Roberts

  • iToo Software
  • Hero Member
  • *****
  • Posts: 1996
Re: Precision bug
« Reply #1 on: July 27, 2017, 12:01:50 PM »
Hi Rokas,

Thanks for the file. Unless I'm misunderstanding I think the issue in this one is that you are testing to see if the segment is 2.5cm tall, not 2.05.



Changing the expressions to the one below fixed this for me.

real in = Input1;
#in = 2;
print Input1;
real a= if(in==2.05,1,2);
print a;
return a;


I hope that helps, please let me know if you have any further questions.

Many Thanks,

Paul
Paul Roberts
iToo Software

Rokas

  • Hero Member
  • *****
  • Posts: 3324
Re: Precision bug
« Reply #2 on: July 27, 2017, 12:24:20 PM »
Ok, my bad :)
Rokas