mirror of
https://github.com/vodemn/m3_lightmeter.git
synced 2024-11-22 23:40:41 +00:00
10 lines
298 B
Dart
10 lines
298 B
Dart
/// Returns value in form -1 or + 1. The only exception - 0.
|
|
extension SignedStringDouble on double {
|
|
String toStringSignedAsFixed(int fractionDigits) {
|
|
if (this > 0) {
|
|
return "+${toStringAsFixed(fractionDigits)}";
|
|
} else {
|
|
return toStringAsFixed(fractionDigits);
|
|
}
|
|
}
|
|
}
|