forked from MonoGame/MonoGame
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMathF.cs
69 lines (57 loc) · 1.53 KB
/
MathF.cs
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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
// MonoGame - Copyright (C) The MonoGame Team
// This file is subject to the terms and conditions defined in
// file 'LICENSE.txt', which is part of this source code package.
namespace System
{
#if (!NETCOREAPP && !NETSTANDARD2_1) || NETCOREAPP1_0 || NETCOREAPP1_1
internal static class MathF
{
public const float E = (float)Math.E;
public const float PI = (float)Math.PI;
public static float Sqrt(float f)
{
return (float)Math.Sqrt(f);
}
public static float Pow(float x, float y)
{
return (float)Math.Pow(x, y);
}
public static float Sin(float f)
{
return (float)Math.Sin(f);
}
public static float Cos(float f)
{
return (float)Math.Cos(f);
}
public static float Tan(float f)
{
return (float)Math.Tan(f);
}
public static float Asin(float f)
{
return (float)Math.Asin(f);
}
public static float Acos(float f)
{
return (float)Math.Acos(f);
}
public static float Atan(float f)
{
return (float)Math.Atan(f);
}
public static float Round(float f)
{
return (float)Math.Round(f);
}
public static float Ceiling(float f)
{
return (float)Math.Ceiling(f);
}
public static float Floor(float f)
{
return (float)Math.Floor(f);
}
}
#endif
}