Skip to content

Use jobleonard improvements #35

Description

@Artoria2e5

Over at https://observablehq.com/@jobleonard/mario-klingemans-stackblur there is a modernized shift table. There are a few things useful to this repo:

  • Correctness: the shift operator is corrected from >> to >>> so integers stay okay until the intended 255 radius. And lots of | 0 to make sure.
  • Simplicity:
    • The shift table is removed in favor of a fixed 24-shift so values become more readable
    • Since stacks only work one way, an array is used instead
    • Fewer stray variables for cleaner code
  • Modern JS

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

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions