Skip to content
This repository has been archived by the owner on Jan 24, 2019. It is now read-only.

Commit

Permalink
a note
Browse files Browse the repository at this point in the history
  • Loading branch information
Jofairden committed Oct 14, 2017
1 parent e5268a9 commit 1fa7324
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion Helper.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
using System;
using System.Collections.Generic;
using System.Globalization;
using System.Linq;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
Expand Down Expand Up @@ -237,11 +238,12 @@ public static Vector2 SmoothFromTo(Vector2 From, Vector2 To, float Smooth = 60f)
return From + ((To - From) / Smooth);
}

// @todo this shit weird af
public static float DistortFloat(float Float, float Percent)
{
float DistortNumber = Float * Percent;
int Counter = 0;
while (DistortNumber.ToString().Split(',').Length > 1)
while (DistortNumber.ToString(CultureInfo.InvariantCulture).Split(',').Length > 1)
{
DistortNumber *= 10;
Counter++;
Expand Down

0 comments on commit 1fa7324

Please sign in to comment.