public void ConvertTo(BearingUnit unit) { if (unit == this.Unit) { return; } if (unit == BearingUnit.Degrees) { this.Value = this.Value * 180 / Math.PI; } else { this.Value = this.Value * (Math.PI / 180); } }
public Bearing(double value, BearingUnit unit) { Value = value; Unit = unit; }