Alice Community  

Go Back   Alice Community > Alice 2 > How do I...?

Thread Tools Display Modes
Prev Previous Post   Next Post Next
rounding to whole numbers
Posts: n/a
Default rounding to whole numbers - 04-30-2009, 01:40 PM

in my world i have a skateboard that is both rolling and spinning variable amounts depending on where you set the feet on them. I'm looking for a way to make it so that when the board lands (finishes its spin) it will know whether or not the trick was landed.
also, since alice is working with long decimal numbers here, it will need to approximate within a certain range whether the board has spun enough or not.

in pseudo:

if (board's amount rolled) == (something close to whole number):
run trick landed, evaluate trick, etc
run trick failed

is it possible to manipulate numbers like that in alice?
Reply With Quote

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Copyright ©2021, Carnegie Mellon University
Alice 2.x © 1999-2012, Alice 3.x © 2008-2012, Carnegie Mellon University. All rights reserved.