CSharp examples for System:Math Number
Angle Difference
using System.Text; using System.Collections.Generic; using System;/* w w w . j ava 2 s . c om*/ public class Main{ public static double AngleDiff(double angle1, double angle2) { double angleError = angle1 - angle2; if (angleError < -Math.PI) angleError += 2 * Math.PI; else if (angleError > Math.PI) angleError -= 2 * Math.PI; return angleError; } }