コード例 #1
0
        protected double Increase(SeatNames seatName, double step)
        {
            if (this.coefficientByPositions[seatName] < 1.0)
            {
                // reset
                this.coefficientByPositions[seatName] = 1.0;
            }

            this.coefficientByPositions[seatName] += step;

            return(this.coefficientByPositions[seatName]);
        }
コード例 #2
0
        protected double Decrease(SeatNames seatName, double step)
        {
            if (this.coefficientByPositions[seatName] > 1.0)
            {
                // reset
                this.coefficientByPositions[seatName] = 1.0;
            }

            this.coefficientByPositions[seatName] -= step;

            if (this.coefficientByPositions[seatName] < 0)
            {
                this.coefficientByPositions[seatName] = 0;
            }

            return(this.coefficientByPositions[seatName]);
        }