Skip to content

Assertions for length tests should not use MACHINE_EPSILON #12

@jagoly

Description

@jagoly

As one example, see the getUnit method of Vector3. It has the line assert(lengthVector > MACHINE_EPSILON). This causes an error when the length is less than that value, which does not seem like what we want. Instead, it should just test that the length is non-zero, as zero can be represented exactly by all floating point numbers.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions