Encontre a distância entre 2 pontos da maneira mais rápida

Este código calcula a distância entre 2 pontos usando a fórmula da distância, Math.sqrt ((x1 - x2) ^ 2 + (y1 - y2) ^ 2). Meu primeiro ponto foimmx emmy coordenação e segundo temox eoy coordenação. Minha pergunta é simples, existe algumMAIS RÁPID maneira de calcular isso?

private function dist(mmx:int, mmy:int, ox:int, oy:int):Number{
  return Math.sqrt((mmx-ox)*(mmx-ox)+(mmy-oy)*(mmy-oy));
}

Este é o meu código, obrigado pela ajuda.

public function moveIT(Xmouse, Ymouse):void{
            f = Point.distance( new Point( Xmouse, Ymouse ), new Point( mainSP.x, mainSP.y ) );// distance between mouse and instance 
            distancePro = Point.distance( pointO, new Point( mainSP.x, mainSP.y ) );// distance from start point 
            if (  f < strtSen ){ // move forward
                tt.stop(); tt.reset(); // delay timer on destination    
                mF = true;  mB = false;
                ag = Math.atan2((Ymouse - mainSP.y),(Xmouse - mainSP.x)); // move-forward angle, between mouse and instance
            }
            if (mF){ /// shoot loop
                if (f > 5){// 5 pixel
                    mainSP.x -= Math.round( (400 /f) + .5 ) * Math.cos(ag);
                    mainSP.y -= Math.round( (400 /f) + .5 ) * Math.sin(ag);
                }
                if (  distancePro > backSen ){// (backSen = max distance)
                    mF = false;         
                    tt.start();// delay timer on destination
                }
            }
            if (mB){ /// return loop
                if ( distancePro < 24 ){//  back angle re-calculation
                    agBACK = Math.atan2((y1 - mainSP.y),(x1 - mainSP.x));                   
                }
                mainSP.x += (Math.cos(agBACK) * rturnSpeed);
                mainSP.y += (Math.sin(agBACK) * rturnSpeed);
                if ( distancePro < 4 ){ // fix position to start point (x1,y1)
                    mB = false;
                    mainSP.x = x1; mainSP.y = y1;
                }
            }
        }
private function scTimer(evt:TimerEvent):void {// timer
            tt.stop();
            agBACK = Math.atan2((y1 - mainSP.y),(x1 - mainSP.x));// move-back angle between start point and instance
            mB = true;
        }

Além disso:pointO = new Point(x1,y1); Definir ponto de início. Não posso usar mouseX e mouseY devido à maneira como o aplicativo é chamado pela classe pai, para que eu possa passar x e y para o meu loo

questionAnswers(3)

yourAnswerToTheQuestion