Changeset 17861
- Timestamp:
- 03/09/21 07:59:31 (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/HeuristicLab.Visualization.ChartControlsExtensions/3.3/ChartUtil.cs
r17180 r17861 88 88 private static double RoundDown(this double value, int decimalRank) { 89 89 if (decimalRank > 0) { 90 var floor = (int)Math.Floor(value);91 var pow = (int)Math.Pow(10, decimalRank);90 var floor = Math.Floor(value); 91 var pow = Math.Pow(10, decimalRank); 92 92 var mod = Mod(floor, pow); 93 93 return floor - mod; … … 98 98 private static double RoundUp(this double value, int decimalRank) { 99 99 if (decimalRank > 0) { 100 var ceil = (int)Math.Ceiling(value);101 var pow = (int)Math.Pow(10, decimalRank);100 var ceil = Math.Ceiling(value); 101 var pow = Math.Pow(10, decimalRank); 102 102 var mod = Mod(ceil, pow); 103 103 return ceil - mod + pow;
Note: See TracChangeset
for help on using the changeset viewer.