Skip to content

Commit

Permalink
Merge remote-tracking branch 'Dunbaratu/anglediff' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
Chris Woerz committed Jun 27, 2014
2 parents 9c94dea + b8cc267 commit 7efca62
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/Function/Trigonometry.cs
Original file line number Diff line number Diff line change
Expand Up @@ -82,4 +82,16 @@ public override void Execute(SharedObjects shared)
shared.Cpu.PushStack(result);
}
}

[FunctionAttribute("anglediff")]
public class FunctionAngleDiff : FunctionBase
{
public override void Execute(SharedObjects shared)
{
double ang2 = GetDouble(shared.Cpu.PopValue());
double ang1 = GetDouble(shared.Cpu.PopValue());
double result = kOS.Utilities.Utils.DegreeFix( ang2 - ang1, -180 );
shared.Cpu.PushStack(result);
}
}
}

0 comments on commit 7efca62

Please sign in to comment.