Shop OBEX P1 Docs P2 Docs Learn Events
Error in the Float32.compare method — Parallax Forums

Error in the Float32.compare method

ChristianGChristianG Posts: 29
edited 2004-12-02 22:18 in General Discussion
Here is some code illustrating the error using the Float32.compare() method:
My previous topic on the subject has been delete...

Float32 vindMax = new Float32();
Float32 vind = new Float32();

VindMax.set("0.0");
vind.set("0.7");
System.out.println(vindMax.compare(vind)); // prints "1" witch is wrong!!!
vind.set("1.7");
System.out.println(vindMax.compare(vind)); // prints "-1" witch is correct!!!

It seems that comparing with values between zero and one gives the wrong result.
Could somebody try that?

Thanks




Post Edited (ChristianG) : 9/14/2004 8:07:25 PM GMT

Comments

  • camtcamt Posts: 45
    edited 2004-12-02 22:18
    Hi Christian,

    I just noticed your post from a couple of months ago. Yes, there was an error in the Float32.compare method. It was fixed in April, but Parallax still has the old zip file on the website. I'll get in touch with Parallax to try to get this resolved.

    Regards,
    Cam
Sign In or Register to comment.