2 Replies Latest reply: Mar 18, 2010 1:43 AM by 843853 RSS

    What is the best way to square a variable?

    843853
      This should be easy for you guys:

      Is the best way to square a variable to just multiply it by itself?

      Like: number2 = number1 * number1;

      I was hoping there was something like Math.square(number1) or be able to use number1^2 or some handy trick like that.

      Thanks!