using System;
using Il2CppInterop.Common.Attributes;
using Il2CppInterop.Runtime;
using Il2CppSystem;

namespace MTAssets.UltimateLODSystem.MeshSimplifier
{
	// Token: 0x02000621 RID: 1569
	public static class MathHelper : Object
	{
		// Token: 0x0600A07F RID: 41087 RVA: 0x002914B4 File Offset: 0x0028F6B4
		[CallerCount(0)]
		public unsafe static double Min(double val1, double val2, double val3)
		{
			IntPtr* ptr;
			checked
			{
				ptr = stackalloc IntPtr[unchecked((UIntPtr)3) * (UIntPtr)sizeof(IntPtr)];
				*ptr = ref val1;
			}
			ptr[checked(unchecked((UIntPtr)1) * (UIntPtr)sizeof(IntPtr)) / (UIntPtr)sizeof(IntPtr)] = ref val2;
			ptr[checked(unchecked((UIntPtr)2) * (UIntPtr)sizeof(IntPtr)) / (UIntPtr)sizeof(IntPtr)] = ref val3;
			IntPtr intPtr2;
			IntPtr intPtr = IL2CPP.il2cpp_runtime_invoke(MathHelper.NativeMethodInfoPtr_Min_Public_Static_Double_Double_Double_Double_0, 0, (void**)ptr, ref intPtr2);
			Il2CppException.RaiseExceptionIfNecessary(intPtr2);
			return *IL2CPP.il2cpp_object_unbox(intPtr);
		}

		// Token: 0x0600A080 RID: 41088 RVA: 0x00291530 File Offset: 0x0028F730
		[CallerCount(0)]
		public unsafe static double Clamp(double value, double min, double max)
		{
			IntPtr* ptr;
			checked
			{
				ptr = stackalloc IntPtr[unchecked((UIntPtr)3) * (UIntPtr)sizeof(IntPtr)];
				*ptr = ref value;
			}
			ptr[checked(unchecked((UIntPtr)1) * (UIntPtr)sizeof(IntPtr)) / (UIntPtr)sizeof(IntPtr)] = ref min;
			ptr[checked(unchecked((UIntPtr)2) * (UIntPtr)sizeof(IntPtr)) / (UIntPtr)sizeof(IntPtr)] = ref max;
			IntPtr intPtr2;
			IntPtr intPtr = IL2CPP.il2cpp_runtime_invoke(MathHelper.NativeMethodInfoPtr_Clamp_Public_Static_Double_Double_Double_Double_0, 0, (void**)ptr, ref intPtr2);
			Il2CppException.RaiseExceptionIfNecessary(intPtr2);
			return *IL2CPP.il2cpp_object_unbox(intPtr);
		}

		// Token: 0x0600A081 RID: 41089 RVA: 0x002915AC File Offset: 0x0028F7AC
		[CallerCount(0)]
		[CachedScanResults(RefRangeStart = 0, RefRangeEnd = 0, XrefRangeStart = 624345, XrefRangeEnd = 624372, MetadataInitTokenRva = 0L, MetadataInitFlagRva = 0L)]
		public unsafe static double TriangleArea(ref Vector3d p0, ref Vector3d p1, ref Vector3d p2)
		{
			IntPtr* ptr;
			checked
			{
				ptr = stackalloc IntPtr[unchecked((UIntPtr)3) * (UIntPtr)sizeof(IntPtr)];
				*ptr = &p0;
			}
			ptr[checked(unchecked((UIntPtr)1) * (UIntPtr)sizeof(IntPtr)) / (UIntPtr)sizeof(IntPtr)] = &p1;
			ptr[checked(unchecked((UIntPtr)2) * (UIntPtr)sizeof(IntPtr)) / (UIntPtr)sizeof(IntPtr)] = &p2;
			IntPtr intPtr2;
			IntPtr intPtr = IL2CPP.il2cpp_runtime_invoke(MathHelper.NativeMethodInfoPtr_TriangleArea_Public_Static_Double_byref_Vector3d_byref_Vector3d_byref_Vector3d_0, 0, (void**)ptr, ref intPtr2);
			Il2CppException.RaiseExceptionIfNecessary(intPtr2);
			return *IL2CPP.il2cpp_object_unbox(intPtr);
		}

		// Token: 0x0600A082 RID: 41090 RVA: 0x00291628 File Offset: 0x0028F828
		// Note: this type is marked as 'beforefieldinit'.
		static MathHelper()
		{
			Il2CppClassPointerStore<MathHelper>.NativeClassPtr = IL2CPP.GetIl2CppClass("Assembly-CSharp.dll", "MTAssets.UltimateLODSystem.MeshSimplifier", "MathHelper");
			IL2CPP.il2cpp_runtime_class_init(Il2CppClassPointerStore<MathHelper>.NativeClassPtr);
			MathHelper.NativeFieldInfoPtr_PI = IL2CPP.GetIl2CppField(Il2CppClassPointerStore<MathHelper>.NativeClassPtr, "PI");
			MathHelper.NativeFieldInfoPtr_PId = IL2CPP.GetIl2CppField(Il2CppClassPointerStore<MathHelper>.NativeClassPtr, "PId");
			MathHelper.NativeFieldInfoPtr_Deg2Rad = IL2CPP.GetIl2CppField(Il2CppClassPointerStore<MathHelper>.NativeClassPtr, "Deg2Rad");
			MathHelper.NativeFieldInfoPtr_Deg2Radd = IL2CPP.GetIl2CppField(Il2CppClassPointerStore<MathHelper>.NativeClassPtr, "Deg2Radd");
			MathHelper.NativeFieldInfoPtr_Rad2Deg = IL2CPP.GetIl2CppField(Il2CppClassPointerStore<MathHelper>.NativeClassPtr, "Rad2Deg");
			MathHelper.NativeFieldInfoPtr_Rad2Degd = IL2CPP.GetIl2CppField(Il2CppClassPointerStore<MathHelper>.NativeClassPtr, "Rad2Degd");
			MathHelper.NativeMethodInfoPtr_Min_Public_Static_Double_Double_Double_Double_0 = IL2CPP.GetIl2CppMethodByToken(Il2CppClassPointerStore<MathHelper>.NativeClassPtr, 100675643);
			MathHelper.NativeMethodInfoPtr_Clamp_Public_Static_Double_Double_Double_Double_0 = IL2CPP.GetIl2CppMethodByToken(Il2CppClassPointerStore<MathHelper>.NativeClassPtr, 100675644);
			MathHelper.NativeMethodInfoPtr_TriangleArea_Public_Static_Double_byref_Vector3d_byref_Vector3d_byref_Vector3d_0 = IL2CPP.GetIl2CppMethodByToken(Il2CppClassPointerStore<MathHelper>.NativeClassPtr, 100675645);
		}

		// Token: 0x0600A083 RID: 41091 RVA: 0x0000A688 File Offset: 0x00008888
		public MathHelper(IntPtr pointer)
			: base(pointer)
		{
		}

		// Token: 0x17003673 RID: 13939
		// (get) Token: 0x0600A084 RID: 41092 RVA: 0x0029170C File Offset: 0x0028F90C
		// (set) Token: 0x0600A085 RID: 41093 RVA: 0x0029172A File Offset: 0x0028F92A
		public unsafe static float PI
		{
			get
			{
				float num;
				IL2CPP.il2cpp_field_static_get_value(MathHelper.NativeFieldInfoPtr_PI, (void*)(&num));
				return num;
			}
			set
			{
				IL2CPP.il2cpp_field_static_set_value(MathHelper.NativeFieldInfoPtr_PI, (void*)(&value));
			}
		}

		// Token: 0x17003674 RID: 13940
		// (get) Token: 0x0600A086 RID: 41094 RVA: 0x0029173C File Offset: 0x0028F93C
		// (set) Token: 0x0600A087 RID: 41095 RVA: 0x0029175A File Offset: 0x0028F95A
		public unsafe static double PId
		{
			get
			{
				double num;
				IL2CPP.il2cpp_field_static_get_value(MathHelper.NativeFieldInfoPtr_PId, (void*)(&num));
				return num;
			}
			set
			{
				IL2CPP.il2cpp_field_static_set_value(MathHelper.NativeFieldInfoPtr_PId, (void*)(&value));
			}
		}

		// Token: 0x17003675 RID: 13941
		// (get) Token: 0x0600A088 RID: 41096 RVA: 0x0029176C File Offset: 0x0028F96C
		// (set) Token: 0x0600A089 RID: 41097 RVA: 0x0029178A File Offset: 0x0028F98A
		public unsafe static float Deg2Rad
		{
			get
			{
				float num;
				IL2CPP.il2cpp_field_static_get_value(MathHelper.NativeFieldInfoPtr_Deg2Rad, (void*)(&num));
				return num;
			}
			set
			{
				IL2CPP.il2cpp_field_static_set_value(MathHelper.NativeFieldInfoPtr_Deg2Rad, (void*)(&value));
			}
		}

		// Token: 0x17003676 RID: 13942
		// (get) Token: 0x0600A08A RID: 41098 RVA: 0x0029179C File Offset: 0x0028F99C
		// (set) Token: 0x0600A08B RID: 41099 RVA: 0x002917BA File Offset: 0x0028F9BA
		public unsafe static double Deg2Radd
		{
			get
			{
				double num;
				IL2CPP.il2cpp_field_static_get_value(MathHelper.NativeFieldInfoPtr_Deg2Radd, (void*)(&num));
				return num;
			}
			set
			{
				IL2CPP.il2cpp_field_static_set_value(MathHelper.NativeFieldInfoPtr_Deg2Radd, (void*)(&value));
			}
		}

		// Token: 0x17003677 RID: 13943
		// (get) Token: 0x0600A08C RID: 41100 RVA: 0x002917CC File Offset: 0x0028F9CC
		// (set) Token: 0x0600A08D RID: 41101 RVA: 0x002917EA File Offset: 0x0028F9EA
		public unsafe static float Rad2Deg
		{
			get
			{
				float num;
				IL2CPP.il2cpp_field_static_get_value(MathHelper.NativeFieldInfoPtr_Rad2Deg, (void*)(&num));
				return num;
			}
			set
			{
				IL2CPP.il2cpp_field_static_set_value(MathHelper.NativeFieldInfoPtr_Rad2Deg, (void*)(&value));
			}
		}

		// Token: 0x17003678 RID: 13944
		// (get) Token: 0x0600A08E RID: 41102 RVA: 0x002917FC File Offset: 0x0028F9FC
		// (set) Token: 0x0600A08F RID: 41103 RVA: 0x0029181A File Offset: 0x0028FA1A
		public unsafe static double Rad2Degd
		{
			get
			{
				double num;
				IL2CPP.il2cpp_field_static_get_value(MathHelper.NativeFieldInfoPtr_Rad2Degd, (void*)(&num));
				return num;
			}
			set
			{
				IL2CPP.il2cpp_field_static_set_value(MathHelper.NativeFieldInfoPtr_Rad2Degd, (void*)(&value));
			}
		}

		// Token: 0x04006B73 RID: 27507
		private static readonly IntPtr NativeFieldInfoPtr_PI;

		// Token: 0x04006B74 RID: 27508
		private static readonly IntPtr NativeFieldInfoPtr_PId;

		// Token: 0x04006B75 RID: 27509
		private static readonly IntPtr NativeFieldInfoPtr_Deg2Rad;

		// Token: 0x04006B76 RID: 27510
		private static readonly IntPtr NativeFieldInfoPtr_Deg2Radd;

		// Token: 0x04006B77 RID: 27511
		private static readonly IntPtr NativeFieldInfoPtr_Rad2Deg;

		// Token: 0x04006B78 RID: 27512
		private static readonly IntPtr NativeFieldInfoPtr_Rad2Degd;

		// Token: 0x04006B79 RID: 27513
		private static readonly IntPtr NativeMethodInfoPtr_Min_Public_Static_Double_Double_Double_Double_0;

		// Token: 0x04006B7A RID: 27514
		private static readonly IntPtr NativeMethodInfoPtr_Clamp_Public_Static_Double_Double_Double_Double_0;

		// Token: 0x04006B7B RID: 27515
		private static readonly IntPtr NativeMethodInfoPtr_TriangleArea_Public_Static_Double_byref_Vector3d_byref_Vector3d_byref_Vector3d_0;
	}
}
