diff options
| author | Jean-Philippe Bruyère <jp_bruyere@hotmail.com> | 2022-07-17 20:26:28 +0200 |
|---|---|---|
| committer | Jean-Philippe Bruyère <jp_bruyere@hotmail.com> | 2022-07-17 20:26:28 +0200 |
| commit | 9d786ab096ed36ea384e03ee5cea498790e31eec (patch) | |
| tree | adee54b5b90a35238d5794e9ffd3ebcf65798a06 /Samples/AnimTest/Animation/MathHelper.cs | |
| parent | 57daad000aa31c7bcfa1f76b90d40da5a21da041 (diff) | |
wip
Diffstat (limited to 'Samples/AnimTest/Animation/MathHelper.cs')
| -rw-r--r-- | Samples/AnimTest/Animation/MathHelper.cs | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/Samples/AnimTest/Animation/MathHelper.cs b/Samples/AnimTest/Animation/MathHelper.cs new file mode 100644 index 00000000..35a3009f --- /dev/null +++ b/Samples/AnimTest/Animation/MathHelper.cs @@ -0,0 +1,16 @@ +// Copyright (c) 2019-2021 Jean-Philippe Bruyère <jp_bruyere@hotmail.com> +// +// This code is licensed under the MIT license (MIT) (http://opensource.org/licenses/MIT) +using System; +namespace vke { + public static class MathHelper { + public const float Pi = (float)Math.PI; + public const float TwoPi = (float)Math.PI * 2; + public static float NormalizeAngle (float a) { + float tmp = a % MathHelper.TwoPi; + if (tmp < 0) + tmp += MathHelper.TwoPi; + return tmp; + } + } +} |