Specify meaning of isOdd and isEven for doubles #465
Labels
area-core-library
SDK core library issues (core, async, ...); use area-vm or area-web for platform specific libraries.
closed-obsolete
Closed as the reported issue is no longer relevant
Current implementation is odd, e.g., 5.9 % 2.0 === 1.9
bool isEven() {
// TODO(floitsch): find more efficient way to implement Double.isEven.
return this % 2.0 == 0.0;
}
bool isOdd() {
// TODO(floitsch): find more efficient way to implement Double.isOdd.
return this % 2.0 == 1.0;
}
co19 test:
LibTest/core/double/isOdd/double/isOdd/A01/t02
The text was updated successfully, but these errors were encountered: