loading...

re: JavaScript Best Practices for Beginners VIEW POST

TOP OF THREAD FULL DISCUSSION
re: It might seem unnecessary at first, but trust me, you WANT to comment your code as best as possible. What happens when you return to the project mo...
 

Totally agree:

     function process(b) {
       //Get the angle
       let a = b.rotation
       //Rotate
       a += Math.PI
       //Return the rotated angle
       return a
   }

Or

     function getReverseAngle(gameObject) {
          return Math.PI + gameObject.rotation;
     }
code of conduct - report abuse