stagas/mono

Clamp values for range arguments

Open

#3 opened on Feb 5, 2023

 (0 comments) (0 reactions) (0 assignees)TypeScript (0 forks)github user discovery
bugenhancementgood first issue

Repository metrics

Stars
 (9 stars)
PR merge metrics
 (No merged PRs in 30d)

Description

For arguments such as x[.1..4f], the range is currently only passed as a hint for the consumer (e.g to generate webaudio params, gui controls etc.), there is no runtime protection to clamp the value to that range. The implementation needs to insert clamp(x,min,max) at the top of the function's body for those locals to enforce the range at runtime.

Contributor guide