Skip to content

Use jobleonard improvements #35

@Artoria2e5

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

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions