Skip to content

Replace percent with something more credible #1

Description

@semibran

The current implementation of percent happens to be copied from a certain answer on StackOverflow.

function percent(seed) {
  var x = sin(seed) * 0xFFFFFF
  return x - floor(x)
}

While this algorithm is quite fast and works well for small projects, it'd be great to see this function replaced with something more credible (i.e. some PRNG with its own Wikipedia article).

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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