stagas/mono

Clamp values for range arguments

Open

#3 aberto em 5 de fev. de 2023

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

Métricas do repositório

Stars
 (9 stars)
Métricas de merge de PR
 (Métricas PR pendentes)

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.

Guia do colaborador