Importing common methods

This commit is contained in:
2024-05-04 18:10:45 +01:00
commit 254ceaf815
15 changed files with 507 additions and 0 deletions
@@ -0,0 +1,17 @@
using System;
namespace GameDevLibrary.Extensions
{
public static class FloatExtensions
{
public static float Round(this float value, int digits = 2)
{
return MathF.Round(value, digits);
}
public static int RoundToInt(this float value)
{
return (int)value.Round(0);
}
}
}