示例#1
0
        //============================================================================*
        // CompareBasics()
        //============================================================================*

        public int CompareBasics(cBallistics Ballistics)
        {
            if (Ballistics == null)
            {
                return(1);
            }

            int rc = BallisticCoefficient.CompareTo(Ballistics.BallisticCoefficient);

            if (rc == 0)
            {
                rc = BulletDiameter.CompareTo(Ballistics.BulletDiameter);

                if (rc == 0)
                {
                    rc = BulletWeight.CompareTo(Ballistics.BulletWeight);

                    if (rc == 0)
                    {
                        rc = BulletLength.CompareTo(Ballistics.BulletLength);

                        if (rc == 0)
                        {
                            rc = MuzzleVelocity.CompareTo(Ballistics.MuzzleVelocity);
                        }
                    }
                }
            }

            return(rc);
        }
示例#2
0
        //============================================================================*
        // CompareAtmospherics()
        //============================================================================*

        public int CompareAtmospherics(cBallistics Ballistics)
        {
            int rc = WindDirection.CompareTo(Ballistics.WindDirection);

            if (rc == 0)
            {
                rc = WindSpeed.CompareTo(Ballistics.WindSpeed);
            }

            return(rc);
        }
示例#3
0
        //============================================================================*
        // CompareTo()
        //============================================================================*

        public int CompareTo(Object BallisticsObject)
        {
            cBallistics Ballistics = (cBallistics)BallisticsObject;

            if (Ballistics == null)
            {
                return(1);
            }

            int rc = CompareBasics(Ballistics);

            if (rc == 0)
            {
                rc = CompareAtmospherics(Ballistics);
            }

            return(rc);
        }
示例#4
0
        //============================================================================*
        // Comparer()
        //============================================================================*

        public static int Comparer(Object Data1, Object Data2)
        {
            if (Data1 == null)
            {
                if (Data2 != null)
                {
                    return(-1);
                }
                else
                {
                    return(0);
                }
            }

            cBallistics Ballistics1 = (cBallistics)Data1;

            return(Ballistics1.CompareTo(Data2));
        }
示例#5
0
        //============================================================================*
        // cBallistics() - Copy Constructor
        //============================================================================*

        public cBallistics(cBallistics Ballistics)
            : base(Ballistics)
        {
            m_eDragFunction = Ballistics.m_eDragFunction;

            m_nMuzzleHeight = Ballistics.m_nMuzzleHeight;

            m_dZeroRange   = Ballistics.m_dZeroRange;
            m_dSightHeight = Ballistics.m_dSightHeight;
            m_dScopeClick  = Ballistics.m_dScopeClick;

            m_eTurretType = Ballistics.m_eTurretType;

            m_dRange       = Ballistics.m_dRange;
            m_dMinRange    = Ballistics.m_dMinRange;
            m_dMaxRange    = Ballistics.m_dMaxRange;
            m_dTargetRange = Ballistics.m_dTargetRange;
            m_dIncrement   = Ballistics.m_dIncrement;
            m_dSlope       = Ballistics.m_dSlope;

            m_fActive = Ballistics.m_fActive;

            m_dDK         = Ballistics.m_dDK;
            m_dElevation0 = Ballistics.m_dElevation0;

            m_dRemainingVelocity = Ballistics.m_dRemainingVelocity;
            m_dTimeOfFlight      = Ballistics.m_dTimeOfFlight;

            m_dWindDrift    = Ballistics.m_dWindDrift;
            m_dWindDriftMOA = Ballistics.m_dWindDriftMOA;

            m_dBulletPath    = Ballistics.m_dBulletPath;
            m_dBulletPathMOA = Ballistics.m_dBulletPathMOA;

            m_strScopeClicks = Ballistics.m_strScopeClicks;
        }