Removed the commented-out rotation method. Unnecessary right now.
Sign function

because javascript math is lame and has no sign function, I pasted one in and put in tests.
Merge branch 'upstream/master'