Skip to content

Commit

Permalink
Add missing MOHAA trigonometric math script functions #17
Browse files Browse the repository at this point in the history
  • Loading branch information
mohabhassan committed Apr 12, 2023
1 parent 8e95412 commit d6b614a
Showing 1 changed file with 12 additions and 10 deletions.
22 changes: 12 additions & 10 deletions dgamexwrapper/src/ScriptThreadMaths.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

void ScriptThread::MathsInit()
{
#ifdef MOHAA
cerSet.AddEventResponse(new Event(
"sin",
EV_DEFAULT,
Expand All @@ -21,7 +22,6 @@ void ScriptThread::MathsInit()
EV_RETURN
),
&ScriptThread::MCosEvent);

cerSet.AddEventResponse(new Event(
"tan",
EV_DEFAULT,
Expand All @@ -33,34 +33,36 @@ void ScriptThread::MathsInit()
&ScriptThread::MTanEvent);

cerSet.AddEventResponse(new Event(
"asin",
"atan",
EV_DEFAULT,
"f",
"x",
"Returns the arc sine of an angle of x radians.",
"Returns the arc tangent of an angle of x radians. Use atan2 instead.",
EV_RETURN
),
&ScriptThread::MASinEvent);
&ScriptThread::MATanEvent);
#endif

cerSet.AddEventResponse(new Event(
"acos",
"asin",
EV_DEFAULT,
"f",
"x",
"Returns the arc cosine of an angle of x radians.",
"Returns the arc sine of an angle of x radians.",
EV_RETURN
),
&ScriptThread::MACosEvent);
&ScriptThread::MASinEvent);

cerSet.AddEventResponse(new Event(
"atan",
"acos",
EV_DEFAULT,
"f",
"x",
"Returns the arc tangent of an angle of x radians. Use atan2 instead.",
"Returns the arc cosine of an angle of x radians.",
EV_RETURN
),
&ScriptThread::MATanEvent);
&ScriptThread::MACosEvent);


cerSet.AddEventResponse(new Event(
"atan2",
Expand Down

0 comments on commit d6b614a

Please sign in to comment.