Hello Dear LiveCode Gurus,  


Here is a little code snippet:

__switch
____case sin(pAngleInRadians) > 0
______put 1 into tX
______break
____case sin(pAngleInRadians) = 0
______put 0 into tX
______break
____case sin(pAngleInRadians) < 0
______put -1 into tX
______break
__end switch

It's for a complex rotation command.
Is there a more elegant way to achieve the same result with built-in functions?
I mean, something like a combination of abs(), max() and/or round()?
Just an intellectual curiosity :)

Thanks for any insights...


Best,

~ Ender Nafi



~ ·   together, we're smarter  · ~

~ ·  Keehuna Studio  
~ ·  Sorcerers of Design

_______________________________________________
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Reply via email to