minor: remove mono compiler warnings from LSL_Api, properly format method doc for llRot2Axis()

cpu-performance
Justin Clark-Casey (justincc) 2013-06-15 00:11:36 +01:00
parent f074739e33
commit da3724a904
1 changed files with 5 additions and 7 deletions

View File

@ -4726,13 +4726,14 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
return new LSL_Rotation(x,y,z,s); return new LSL_Rotation(x,y,z,s);
} }
/// <summary>
// Xantor 29/apr/2008 /// Converts a Quaternion to X,Y,Z axis rotations
// converts a Quaternion to X,Y,Z axis rotations /// </summary>
/// <returns></returns>
/// <param name='rot'></param>
public LSL_Vector llRot2Axis(LSL_Rotation rot) public LSL_Vector llRot2Axis(LSL_Rotation rot)
{ {
m_host.AddScriptLPS(1); m_host.AddScriptLPS(1);
double x, y, z;
if (Math.Abs(rot.s) > 1) // normalization needed if (Math.Abs(rot.s) > 1) // normalization needed
rot.Normalize(); rot.Normalize();
@ -7454,14 +7455,11 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
return; return;
} }
int code = (int)options.GetLSLIntegerItem(0);
int idx = 0; int idx = 0;
while (idx < options.Data.Length) while (idx < options.Data.Length)
{ {
int option = (int)options.GetLSLIntegerItem(idx++); int option = (int)options.GetLSLIntegerItem(idx++);
int remain = options.Data.Length - idx;
switch (option) switch (option)
{ {