These 2 files want to be committed.
parent
5f932605dc
commit
9316e0b867
|
@ -450,7 +450,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
|||
|
||||
public LSL_Vector llVecNorm(LSL_Vector v)
|
||||
{
|
||||
m_host.AddScriptLPS(1);
|
||||
m_host.AddScriptLPS(1);
|
||||
return LSL_Vector.Norm(v);
|
||||
}
|
||||
|
||||
|
|
|
@ -259,15 +259,15 @@ namespace OpenSim.Region.ScriptEngine.Shared
|
|||
return Math.Sqrt(v.x * v.x + v.y * v.y + v.z * v.z);
|
||||
}
|
||||
|
||||
public static Vector3 Norm(Vector3 vector)
|
||||
{
|
||||
double mag = Mag(vector);
|
||||
if (mag > 0.0)
|
||||
{
|
||||
double invMag = 1.0 / mag;
|
||||
return vector * invMag;
|
||||
}
|
||||
return new Vector3(0, 0, 0);
|
||||
public static Vector3 Norm(Vector3 vector)
|
||||
{
|
||||
double mag = Mag(vector);
|
||||
if (mag > 0.0)
|
||||
{
|
||||
double invMag = 1.0 / mag;
|
||||
return vector * invMag;
|
||||
}
|
||||
return new Vector3(0, 0, 0);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
|
Loading…
Reference in New Issue