public CupSize Calculate(float bust, float underbust)
        {
            var bustIn      = UnitUtils.UnityToInchesRounded(bust);
            var underbustIn = UnitUtils.UnityToInchesRounded(underbust);

            // bust size + 2 inches - if it is odd, add one more
            var band       = underbustIn + 2 + (underbustIn % 2);
            var diff       = Mathf.Max(0, bustIn - band);
            var cupMapping = CupSize.DifferenceToCupUS(diff);

            return(new CupSize {
                Units = "in", Cup = cupMapping, Band = band, Bust = bust, Underbust = underbust
            });
        }
Пример #2
0
        public CupSize Calculate(float bust, float underbust)
        {
            var bustIn      = UnitUtils.UnityToInchesRounded(bust);
            var underbustIn = UnitUtils.UnityToInchesRounded(underbust);

            // if you measure an even number, add 2, if you measure odd, add 1
            var band       = underbustIn % 2 == 0 ? underbustIn + 2 : underbustIn + 1;
            var diff       = Mathf.Max(0, bustIn - band);
            var cupMapping = CupSize.DifferenceToCupUS(diff);

            return(new CupSize {
                Units = "in", Cup = cupMapping, Band = band, Bust = bust, Underbust = underbust
            });
        }
Пример #3
0
        public CupSize Calculate(float bust, float underbust)
        {
            var bustIn      = UnitUtils.UnityToInchesRounded(bust);
            var underbustIn = UnitUtils.UnityToInchesRounded(underbust);

            // their underbust to band algorithm seems to be:
            // if odd underbust, add one - then add 4
            var band       = (underbustIn % 2 == 1) ? underbustIn + 5 : underbustIn + 4;
            var diff       = Mathf.Max(0, bustIn - band);
            var cupMapping = CupSize.DifferenceToCupUS(diff);

            return(new CupSize {
                Units = "in", Cup = cupMapping, Band = band, Bust = bust, Underbust = underbust
            });
        }
Пример #4
0
        public CupSize Calculate(float bust, float underbust)
        {
            // instructions say to measure TIGHTLY under bust so subtracting 3/8 inch here
            underbust -= UnitUtils.InchesToUnity(0.375f);
            var bustIn      = UnitUtils.UnityToInchesRounded(bust);
            var underbustIn = UnitUtils.UnityToInchesRounded(underbust);

            // underbust size + 4 inches - if it is odd subtract one to get band
            var band       = underbustIn + 4 - (underbustIn % 2);
            var diff       = Mathf.Max(0, bustIn - band);
            var cupMapping = CupSize.DifferenceToCupUS(diff);

            return(new CupSize {
                Units = "in", Cup = cupMapping, Band = band, Bust = bust, Underbust = underbust
            });
        }