aboutsummaryrefslogtreecommitdiffstatsci
path: root/Samples/AnimTest/Animation/MathHelper.cs
blob: 35a3009fad9f386fd2f7865f5d87d2138392965d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
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;
		}
    }
}