From 79311e786edbeaa150120128d9ea3be80ed9a92a Mon Sep 17 00:00:00 2001 From: Ryan Oldenburg Date: Tue, 17 Mar 2020 13:18:41 -0500 Subject: [PATCH] removable? https://nim-lang.org/docs/system.html#clamp%2CT%2CT%2CT --- src/vmath.nim | 8 -------- 1 file changed, 8 deletions(-) diff --git a/src/vmath.nim b/src/vmath.nim index 131aa85..54f12dc 100644 --- a/src/vmath.nim +++ b/src/vmath.nim @@ -2,14 +2,6 @@ import math, random, strutils export math -proc clamp*(n, min, max: float32): float32 = - ## Clamps n to min, else returns max if n is higher. - if n < min: - return min - if n > max: - return max - return n - proc between*(value, min, max: float32): bool = ## Returns true if value is between min and max or equal to them. (value >= min) and (value <= max)