aboutsummaryrefslogtreecommitdiff
path: root/src/libjin/math/percentage.h
blob: 41b311a98f7634d6d08e01bca5ba9ac6575eef56 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#ifndef __JE_PERCENTAGE_H__
#define __JE_PERCENTAGE_H__

#include "math.h"

namespace JinEngine
{
	namespace Math
	{

		class Percentage
		{
		public:
			Percentage(float v)
			{
				value = clamp<float>(v, 0, 1);
			}

			Percentage(const Percentage& p)
			{
				value = p.value;
			}

			void operator = (const Percentage& p)
			{
				value = p.value;
			}

			float value;

		};

	}
}

#endif