Warning: session_start(): open(/var/lib/php/sessions/sess_i5qrrdsoeoffuh9865updepvt0, O_RDWR) failed: No space left on device (28) in /var/www/tb-usercake/models/config.php on line 51
Warning: session_start(): Failed to read session data: files (path: /var/lib/php/sessions) in /var/www/tb-usercake/models/config.php on line 51
srecord Percent(double percent) {
static Percent fromRatio(double ratio) { ret Percent(ratio*100); }
static Percent fromRatio(double x, double ) { ret fromRatio(doubleRatio(x, y); }
void set(double percent) { percent = percent; }
double get() { ret percent; }
toString {
ret percent + " %";
}
S renderWithDecimals aka withDecimals(int decimals) {
ret formatDouble(percent, decimals) + " %";
}
S withExactDecimals(int decimals) {
ret formatDoubleX(percent, decimals) + " %";
}
S oneDecimal() { ret withDecimals(1); }
S exactlyOneDecimal() { ret withExactDecimals(1); }
static Percent ratio(double x, double y) {
ret new Percent(doubleRatio(x, y)*100);
}
}