change llAtan2 arguments order to (y,x) to match standard documentation

This commit is contained in:
UbitUmarov
2024-04-12 22:14:54 +01:00
parent 36f95e0167
commit 25dcfa8b4e
4 changed files with 14 additions and 9 deletions

View File

@@ -833,9 +833,9 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
return Math.Tan(f);
}
public LSL_Float llAtan2(LSL_Float x, LSL_Float y)
public LSL_Float llAtan2(LSL_Float y, LSL_Float x)
{
return Math.Atan2(x, y);
return Math.Atan2(y, x);
}
public LSL_Float llSqrt(double f)

View File

@@ -43,7 +43,9 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Interfaces
{
void state(string newState);
//ApiDesc Returns absolute version as val (ie as postive value)
LSL_Integer llAbs(LSL_Integer val);
//ApiDesc Returns cosine of val (val in radians)
LSL_Float llAcos(LSL_Float val);
//ApiDesc Sleep 0.1
void llAddToLandBanList(LSL_Key avatarId, LSL_Float hours);
@@ -55,8 +57,10 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Interfaces
LSL_Float llAngleBetween(LSL_Rotation a, LSL_Rotation b);
void llApplyImpulse(LSL_Vector force, LSL_Integer local);
void llApplyRotationalImpulse(LSL_Vector force, int local);
//ApiDesc Returns sine of val (val in radians)
LSL_Float llAsin(LSL_Float val);
LSL_Float llAtan2(LSL_Float x, LSL_Float y);
//ApiDesc Returns the angle whose tangent is the y/x
LSL_Float llAtan2(LSL_Float y, LSL_Float x);
void llAttachToAvatar(LSL_Integer attachment);
void llAttachToAvatarTemp(LSL_Integer attachmentPoint);
LSL_Key llAvatarOnSitTarget();

View File

@@ -123,9 +123,9 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase
}
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public LSL_Float llAtan2(LSL_Float x, LSL_Float y)
public LSL_Float llAtan2(LSL_Float y, LSL_Float x)
{
return m_LSL_Functions.llAtan2(x, y);
return m_LSL_Functions.llAtan2(y, x);
}
[MethodImpl(MethodImplOptions.AggressiveInlining)]