Comment

Comment by xmprt

Maybe it's different since you're not native English but clamp is as intuitive for me as something like ceil or floor methods. It might not be as simple for someone who is ESL, probably because no major programming languages that I know of include clamp in their standard library like they do with min, max, ceil, floor.

I'm also coming from being a Go programmer where the native library is very barebones so a lot of custom utility methods like this are inevitable.

parent xmprt 1 year ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton