From 055df4e42719fa348140575f79fa9415716ce681 Mon Sep 17 00:00:00 2001 From: Hubert Mattusch Date: Mon, 9 Jan 2023 17:08:54 +0100 Subject: [PATCH] fix compile error --- Timing/TimeMachine.cs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Timing/TimeMachine.cs b/Timing/TimeMachine.cs index 02cc9bf..d80ed00 100644 --- a/Timing/TimeMachine.cs +++ b/Timing/TimeMachine.cs @@ -1,4 +1,5 @@ using System; +using UnityEngine; namespace NEG.Utils.Timing { @@ -27,7 +28,7 @@ namespace NEG.Utils.Timing /// Amount of time retrievend public double Retrieve(double maxTime) { - if(!Double.IsFinite(maxTime)) + if(!double.IsFinite(maxTime)) { double timeRetrieved = time; time = 0; @@ -61,7 +62,7 @@ namespace NEG.Utils.Timing /// Amount of warps public int RetrieveAll(double interval, int limit = int.MaxValue) { - int result = Mathf.FloorToInt(time / interval); + int result = Mathf.FloorToInt((float)(time / interval)); result = Math.Clamp(result, 0, limit); time -= result * interval; return result;