Rouding to whole numbers
beckerwv
Posts: 7
In SPIN, is there a simple way to round off a variable's decimal? I just want to have simple whole number to work with.
Thanks!!
Thanks!!
Comments
There are only whole numbers in Spin. Everything is a signed integer. For example if you divide five by two you will get two.
What exactly are you trying to do?
I was trying to test some trig functions, for example cos(111) should = -0.358... It kept returning 0, so I thought it was just a broken function.
Based on what you are saying I will need to re-evaluate my algorithms - I am not sure yet if it will work without at least some decimal values.
Thanks so much for your help!
There is a very nice floating point package with all trig functions in the object exchange. Look for F32.