This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
namespace BSGTools.Math { | |
public static class Normalizer { | |
public static float NormalizeAngle(float value) { | |
return Normalize(value, 0f, 360f); | |
} | |
public static float Normalize(float value, float start, float end) { | |
float width = end - start; | |
float offsetValue = value - start; // value relative to 0 |
NewerOlder