On Dec 24, 5:59 am, pdora...@pas-de-pub-merci.mac.com (Pierre-Alain Dorange) wrote: > > For me sign_0 is the simplest one to understood. > So in the domain of my little arcade game, this is what i'll use. > I don't need the accuraccy of sign_1, because in the application i just > need to know if the target is right or left or if the speed direction is > right or left.
If there is a chance of getting bogus input to sign_0 (like a list, None or other non-numeric types) it might be worth to add a quick check like: def sign_0(x): x + 0 if x==0.0: ... -- http://mail.python.org/mailman/listinfo/python-list