Mantis

View Issue Details Jump to Notes ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0026536RunnerHTML5Public2017-05-16 15:272017-08-03 15:55
ReporterYellowAfterlife 
Assigned ToMike Dailly 
PriorityLowSeverityC - GeneralReproducibility100%
StatusClosedResolutionFixed 
PlatformWindowsOSWindows 8OS Version8.1
Summary0026536: HTML5: round(-0.999998765) returns 0
DescriptionThe function goes like this
function _h41(value) {
    var i = value & 0xffffffff;
    var f = value - i;
    if ((i & 1) == 1) {
        if (f >= 0.5) {
            return i + 1
        } else {
            return i
        }
    } else {
        if (f <= 0.5) {
            return i
        } else {
            return i + 1
        }
    }
}

the problem with this is that for negative values i is truncated, and thus f is negative, breaking (f >= 0.5) \ (f <= 0.5) conditions.
1.4 Version7.7.1457
2.x Runtime Version2.0.6.93
2.x Runtime Version Verified In
Attached Files? file icon a_bug.gmz [^] (119,564 bytes) 2017-05-16 15:27

- Relationships

-  Notes
(0053144)
Mike Dailly (Manager)
2017-05-16 20:14

fixed internally


Copyright © 2000 - 2017 MantisBT Team
Powered by Mantis Bugtracker