Math.Distance[Y1,X1,Y2,X2] bug

A forum for reporting bugs NOT related to custom plugins.

Moderator: MacroQuest Developers

User avatar
Jon100
a hill giant
a hill giant
Posts: 161
Joined: Mon Sep 22, 2003 6:15 am
Location: UK

Math.Distance[Y1,X1,Y2,X2] bug

Post by Jon100 » Wed Apr 06, 2005 4:45 am

There seems to be a bug in the maths of the Math.Distance function.

Code: Select all

/echo ${Math.Distance[0,0,100,100]}
should return 141.42 (the distance from 0,0 to 100,100) but gives some wildly wrong numbers which change as you move around.

Code: Select all

/echo  ${Math.Distance[0,0]}
works correctly though (the distance from Me to 0,0).


MQ2-20050328

Jon100

Lax
We're not worthy!
We're not worthy!
Posts: 3524
Joined: Thu Oct 17, 2002 1:01 pm
Location: ISBoxer
Contact:

Post by Lax » Wed Apr 06, 2005 4:52 am

Actually that's just a result of incorrect usage.

It's Math.Distance[loc:loc] where each loc may consist of up to 3 dimensions

The way you're using it is equivalent to Math.Distance[0,0,100] -- the 4th will be ignored, and that will be the distance from Me to 0,0,100.
Lax Lacks
Master of MQ2 Disaster
Purveyor of premium, EULA-safe MMORPG Multiboxing Software
* Multiboxing with ISBoxer: Quick Start Video
* EQPlayNice, WinEQ 2.0