demos bug?

Discuss any questions about BEPUphysics or problems encountered.
Post Reply
BoltonBeedz
Posts: 45
Joined: Fri Dec 07, 2007 12:58 am

demos bug?

Post by BoltonBeedz »

hi. just trying the demos out for v4.
if my debugging is correct

Code: Select all

float physicsUpdateFrequency = 1 / 60;
should be

Code: Select all

float physicsUpdateFrequency = 1f / 60f;
otherwise it comes out 0
50 quid please
User avatar
Zukarakox
Not a Site Admin
Posts: 426
Joined: Mon Jul 10, 2006 4:28 am

Re: demos bug?

Post by Zukarakox »

it shouldn't, since 1 and 60 are int numbers, they dont need the float typecast.
i has multiple toes
Norbo
Site Admin
Posts: 4929
Joined: Tue Jul 04, 2006 4:45 am

Re: demos bug?

Post by Norbo »

If they (or at least one of the two) aren't typecast, it does indeed do integer division. While this is a bug, I won't be fixing it immediately with a 0.4.2 because the Space class automatically takes 0 values and sets them to .0166667. :D
BoltonBeedz
Posts: 45
Joined: Fri Dec 07, 2007 12:58 am

Re: demos bug?

Post by BoltonBeedz »

cheeky :wink:
User avatar
Zukarakox
Not a Site Admin
Posts: 426
Joined: Mon Jul 10, 2006 4:28 am

Re: demos bug?

Post by Zukarakox »

well crap, you just mentioned this now ?D:
i has multiple toes
Post Reply