Skip to content

Function normalize in KnotVector should consider float precision #5

@carlos-adir

Description

@carlos-adir

Take the knotvector

from compmec.nurbs import KnotVector
knotvector = (0.0, 0.0, 1.8678173101311735, 1.8678173101311735)
knotvector = KnotVector(knotvector)
knotvector.normalize()
print(knotvector)  # (0.0, 0.0, 0.9999999999999999, 0.9999999999999999)

It's expected to get the knotvector (0.0, 0.0, 1.0, 1.0)

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions