DegreeFix() public static method

Fix the strange too-large or too-small angle degrees that are sometimes returned by KSP, normalizing them into a constrained 360 degree range.
public static DegreeFix ( double inAngle, double rangeStart ) : double
inAngle double input angle in degrees
rangeStart double /// Bottom of 360 degree range to normalize to. /// ( 0 means the range [0..360]), while -180 means [-180,180] ) ///
return double
Exemplo n.º 1
0
        public static float GetVesselLongitude(Vessel vessel)
        {
            var retVal = vessel.longitude;

            return((float)Utils.DegreeFix(retVal, -180.0));
        }
Exemplo n.º 2
0
        public static float AngleDelta(float a, float b)
        {
            var delta = b - a;

            return((float)Utils.DegreeFix(delta, -180.0));
        }