Mantis#1746. Thank you kindly, nlin for pointing out that

I needed to apply the patch a little better then last night
for: Dot product operator in LSL_Types.cs incorrectly returns 
a component-wise vector multiplication; it should return a 
scalar dot product. Thanks to M. Igarashi for the patch.
This commit is contained in:
Charles Krinke
2008-07-16 03:07:54 +00:00
parent 337a46474a
commit 4350613f1d
2 changed files with 64 additions and 2 deletions

View File

@@ -141,9 +141,9 @@ namespace OpenSim.Region.ScriptEngine.Common
return new Vector3(lhs.x - rhs.x, lhs.y - rhs.y, lhs.z - rhs.z);
}
public static Vector3 operator *(Vector3 lhs, Vector3 rhs)
public static LSLFloat operator *(Vector3 lhs, Vector3 rhs)
{
return new Vector3(lhs.x * rhs.x, lhs.y * rhs.y, lhs.z * rhs.z);
return Dot(lhs, rhs);
}
public static Vector3 operator %(Vector3 v1, Vector3 v2)