fix compile error

(cherry picked from commit 055df4e42719fa348140575f79fa9415716ce681)
This commit is contained in:
Hubert Mattusch 2023-01-09 17:08:54 +01:00
parent c106c41ca1
commit eba429022b

View File

@ -1,4 +1,5 @@
using System;
using UnityEngine;
namespace NEG.Utils.Timing
{
@ -27,7 +28,7 @@ namespace NEG.Utils.Timing
/// <returns>Amount of time retrievend</returns>
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
/// <returns>Amount of warps</returns>
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;