returns a printable string of the threshold
| 94 | |
| 95 | //returns a printable string of the threshold |
| 96 | std::wstring threshold::pString(const double max) |
| 97 | { |
| 98 | if (!set) |
| 99 | return L""; |
| 100 | //transform percentages to abolute values |
| 101 | double lowerAbs = lower; |
| 102 | double upperAbs = upper; |
| 103 | if (perc) { |
| 104 | lowerAbs = lower / 100.0 * max; |
| 105 | upperAbs = upper / 100.0 * max; |
| 106 | } |
| 107 | |
| 108 | std::wstring s, lowerStr = removeZero(lowerAbs), |
| 109 | upperStr = removeZero(upperAbs); |
| 110 | |
| 111 | if (lower != upper) { |
| 112 | s.append(L"[").append(lowerStr).append(L"-") |
| 113 | .append(upperStr).append(L"]"); |
| 114 | } else |
| 115 | s.append(lowerStr); |
| 116 | |
| 117 | return s; |
| 118 | } |
| 119 | |
| 120 | threshold threshold::toSeconds(const Tunit& fromUnit) { |
| 121 | if (!set) |
no test coverage detected