AE-go is an open source project powered by Assembla

Assembla offers free public and private SVN/Git repositories and project hosting with bug/issue tracking and collaboration tools.

root/trunk/AE-go_GameServer/src/com/aionemu/gameserver/utils/MathUtil.java

13691527
292
	 */
292
	 */
293
	public static boolean isInRange(VisibleObject object1, VisibleObject object2, float range)
293
	public static boolean isInRange(VisibleObject object1, VisibleObject object2, float range)
294
	{
294
	{
295
		if(object1.getWorldId() != object2.getWorldId())
296
			return false;
297
		
295
		float dx = (object2.getX() - object1.getX());
298
		float dx = (object2.getX() - object1.getX());
296
		float dy = (object2.getY() - object1.getY());
299
		float dy = (object2.getY() - object1.getY());
297
		return dx * dx + dy * dy < range * range;
300
		return dx * dx + dy * dy < range * range;