示例#1
0
        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);
            }
        }
示例#2
0
 public Bearing(double value, BearingUnit unit)
 {
     Value = value;
     Unit  = unit;
 }