Added grid render.

Added particle toggle.
Added boundary shape adjustment.
This commit is contained in:
2025-12-05 09:22:20 -05:00
parent d37413a400
commit a15c89d769
4 changed files with 225 additions and 93 deletions

27
utils/clamp.go Normal file
View File

@@ -0,0 +1,27 @@
package utils
// returns adjusted value between start and end, whichever is closer
// unless value is between, in which case it returns value
func Clamp(value, start, end int) int {
if value < start {
return start
}
if value < end {
return value
}
return end
}
func Clamp32(value, start, end float32) float32 {
if value < start {
return start
}
if value < end {
return value
}
return end
}