comparison api/Objects/UnitEquipmentNumericForRatioSelection.cs @ 139:70808ff799e6

* white space cleaup no-open-ticket
author IBBoard <dev@ibboard.co.uk>
date Sun, 13 Sep 2009 18:16:43 +0000
parents 413a7a049e41
children 85dc413279a4
comparison
equal deleted inserted replaced
138:c11c0da01bbc 139:70808ff799e6
22 } 22 }
23 23
24 protected override bool IsInRange (double newValue) 24 protected override bool IsInRange (double newValue)
25 { 25 {
26 int minLimit = (int) IBBMath.Round(EquipmentForUnit.Size * EquipmentItem.MinPercentage / 100, EquipmentItem.RoundNumberUp); 26 int minLimit = (int) IBBMath.Round(EquipmentForUnit.Size * EquipmentItem.MinPercentage / 100, EquipmentItem.RoundNumberUp);
27 int maxLimit = (int)IBBMath.Round(EquipmentForUnit.Size * EquipmentItem.MaxPercentage / 100, EquipmentItem.RoundNumberUp); 27 int maxLimit = (int) IBBMath.Round(EquipmentForUnit.Size * EquipmentItem.MaxPercentage / 100, EquipmentItem.RoundNumberUp);
28 newValue = (newValue == WarFoundryCore.INFINITY ? EquipmentForUnit.Size : newValue); 28 newValue = (newValue == WarFoundryCore.INFINITY ? EquipmentForUnit.Size : newValue);
29 bool isInRange = (minLimit <= newValue) && (newValue <= maxLimit); 29 bool isInRange = (minLimit <= newValue) && (newValue <= maxLimit);
30 return isInRange && IsWholeNumber(newValue); 30 return isInRange && IsWholeNumber(newValue);
31 } 31 }
32 } 32 }