llVecNorm() now returns a zero-length vector when one is supplied as input. Addresses Mantis #4752

prebuild-update
dahlia 2010-07-08 10:06:08 -07:00
parent 815dd73cf3
commit df9d4cd9b2
1 changed files with 2 additions and 7 deletions

View File

@ -451,12 +451,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
public LSL_Vector llVecNorm(LSL_Vector v)
{
m_host.AddScriptLPS(1);
double mag = LSL_Vector.Mag(v);
LSL_Vector nor = new LSL_Vector();
nor.x = v.x / mag;
nor.y = v.y / mag;
nor.z = v.z / mag;
return nor;
return LSL_Vector.Norm(v);
}
public LSL_Float llVecDist(LSL_Vector a, LSL_Vector b)