TAND:Lisette

From RPGnet
Revision as of 03:05, 22 February 2012 by 122.1.9.113 (talk) (BAlzHIUIIe)
Jump to: navigation, search

it's worth to say that the bit otpearions (like value >> 1) are meant to work on integers and return s only integes.So if you try to (3 >> 1) you will get 1 as a result.Also they do a awful (just because it can be unexpected) job at rounding for negative numbers. (-3 >> 1 == 2).For the same reason using int(-1.5) in place of the floor() method will give you wrong results.In my opinion, you should be really confident about what kind of data you are working with and what kind of results you need before switching to bit otpearions.