Skip to content

Math.abs(-0) should be 0 #4

@deian

Description

@deian

Hi all, Great stuff. I think there is a bug in Math.abs:

Math.abs = function (x) {
x = @ToNumber(x);
if (x < 0)
return -x;
else
return x;
};

According to the spec, abs of -0 should be 0 not 0.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions