How to take square roots in JASS

bane25

New Member
Reaction score
1
Just a quick question, who do you take square roots of reals in JASS?
If it matters, I am doing this for the equivalent of the distance formula.
 

Darthfett

Aerospace/Cybersecurity Software Engineer
Reaction score
615
If it matters, I am doing this for the equivalent of the distance formula.

Either of the two above solutions work, but seeing as you're doing the distance formula, it's actually faster to do:

JASS:
if x > y * y then
endif


than it is to do:

JASS:
if SquareRoot(x) > y then
endif
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top