stagas/mono

Clamp values for range arguments

Open

#3 aperta il 5 feb 2023

Vedi su GitHub
 (0 commenti) (0 reazioni) (0 assegnatari)TypeScript (0 fork)github user discovery
bugenhancementgood first issue

Metriche repository

Star
 (9 star)
Metriche merge PR
 (Metriche PR in attesa)

Descrizione

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.

Guida contributor