Skip to content

bug: progress may reach 100% #7

@DrssXpro

Description

@DrssXpro

In mathematics this formula (1 - Math.exp(-1 * this._time / this.timeConstant)) may never reach 1, but in computer it does,like this:
image

image

if timeConstant set 100,You can see my progress bar component is reaching 100 very quickly:

progress

So I think we can add a limit to the operation of setting the progress 🤔:

setProgress(Math.min(progress, 0.9999999999999999))

Of course we can set timeConstant to avoid reaching 1 as much as possible (This is what we currently do in our project 😄)

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