mcMMO-Dev/mcMMO — pull request #187 by bm01 (2012-02-29 03:43:42+00:00)
Title: Replaced m.getDistance()

sqrt() is a very CPU intensive method, it shouldn't be used if not necessary. In our case, we don't need to know the exact distance between the two points.
pow() can also be CPU intensive. If we only need to multiply a number by itself X times, where X is an integer (and small), it's better to not use it. pow() shows its power (no pun intended) with big decimal numbers.

The difference is pretty huge (approximately 240x faster on my hardware), but probably not noticeable since m.getDistance() isn't called frequently enough. Still, it's a simple change that doesn't affect much the rest of the code.