From f05142066d7904125dac73c1e3ec9cf79296b9c1 Mon Sep 17 00:00:00 2001 From: Colin McMillen Date: Wed, 14 Jul 2021 11:23:43 -0400 Subject: [PATCH] remove use of Math.Clamp() --- Shared/SpiderWorld.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Shared/SpiderWorld.cs b/Shared/SpiderWorld.cs index 92488d1..62ce8fc 100644 --- a/Shared/SpiderWorld.cs +++ b/Shared/SpiderWorld.cs @@ -23,7 +23,8 @@ namespace SemiColinGames { public void Update(float modelTime, History input) { radius += 150 * modelTime * input[0].Motion.Y; - radius = Math.Clamp(radius, 50, 200); + radius = Math.Min(radius, 200); + radius = Math.Max(radius, 50); float angleChange = modelTime * momentum / radius; angle += angleChange; float x = anchor.X + radius * (float) Math.Sin(angle);