using System;
using Il2CppInterop.Common.Attributes;
using Il2CppInterop.Runtime;
using Il2CppInterop.Runtime.InteropTypes.Arrays;
using Il2CppSystem;
using Il2CppSystem.Collections.Generic;
using Il2CppSystem.Reflection;
using UnityEngine;

namespace MTAssets.UltimateLODSystem
{
	// Token: 0x02000660 RID: 1632
	public class MTAssetsMathematics : MonoBehaviour
	{
		// Token: 0x0600A76D RID: 42861 RVA: 0x002AE6B4 File Offset: 0x002AC8B4
		[CallerCount(0)]
		[CachedScanResults(RefRangeStart = 0, RefRangeEnd = 0, XrefRangeStart = 655315, XrefRangeEnd = 655316, MetadataInitTokenRva = 0L, MetadataInitFlagRva = 0L)]
		public unsafe static List<T> RandomizeThisList<T>(List<T> list)
		{
			checked
			{
				IntPtr* ptr = stackalloc IntPtr[unchecked((UIntPtr)1) * (UIntPtr)sizeof(IntPtr)];
				*ptr = IL2CPP.Il2CppObjectBaseToPtr(list);
				IntPtr intPtr2;
				IntPtr intPtr = IL2CPP.il2cpp_runtime_invoke(MTAssetsMathematics.MethodInfoStoreGeneric_RandomizeThisList_Public_Static_List_1_T_List_1_T_0<T>.Pointer, 0, (void**)ptr, ref intPtr2);
				Il2CppException.RaiseExceptionIfNecessary(intPtr2);
				IntPtr intPtr3 = intPtr;
				return (intPtr3 != 0) ? new List<T>(intPtr3) : null;
			}
		}

		// Token: 0x0600A76E RID: 42862 RVA: 0x002AE714 File Offset: 0x002AC914
		[CallerCount(0)]
		[CachedScanResults(RefRangeStart = 0, RefRangeEnd = 0, XrefRangeStart = 655316, XrefRangeEnd = 655317, MetadataInitTokenRva = 0L, MetadataInitFlagRva = 0L)]
		public unsafe static Vector3 GetHalfPositionBetweenTwoPoints(Vector3 pointA, Vector3 pointB)
		{
			IntPtr* ptr;
			checked
			{
				ptr = stackalloc IntPtr[unchecked((UIntPtr)2) * (UIntPtr)sizeof(IntPtr)];
				*ptr = ref pointA;
			}
			ptr[checked(unchecked((UIntPtr)1) * (UIntPtr)sizeof(IntPtr)) / (UIntPtr)sizeof(IntPtr)] = ref pointB;
			IntPtr intPtr2;
			IntPtr intPtr = IL2CPP.il2cpp_runtime_invoke(MTAssetsMathematics.NativeMethodInfoPtr_GetHalfPositionBetweenTwoPoints_Public_Static_Vector3_Vector3_Vector3_0, 0, (void**)ptr, ref intPtr2);
			Il2CppException.RaiseExceptionIfNecessary(intPtr2);
			return *IL2CPP.il2cpp_object_unbox(intPtr);
		}

		// Token: 0x0600A76F RID: 42863 RVA: 0x002AE77C File Offset: 0x002AC97C
		[CallerCount(67)]
		[CachedScanResults(RefRangeStart = 166362, RefRangeEnd = 166429, XrefRangeStart = 166362, XrefRangeEnd = 166429, MetadataInitTokenRva = 0L, MetadataInitFlagRva = 0L)]
		public unsafe MTAssetsMathematics()
			: this(IL2CPP.il2cpp_object_new(Il2CppClassPointerStore<MTAssetsMathematics>.NativeClassPtr))
		{
			IntPtr* ptr = null;
			IntPtr intPtr2;
			IntPtr intPtr = IL2CPP.il2cpp_runtime_invoke(MTAssetsMathematics.NativeMethodInfoPtr__ctor_Public_Void_0, IL2CPP.Il2CppObjectBaseToPtrNotNull(this), (void**)ptr, ref intPtr2);
			Il2CppException.RaiseExceptionIfNecessary(intPtr2);
		}

		// Token: 0x0600A770 RID: 42864 RVA: 0x002AE7C8 File Offset: 0x002AC9C8
		// Note: this type is marked as 'beforefieldinit'.
		static MTAssetsMathematics()
		{
			Il2CppClassPointerStore<MTAssetsMathematics>.NativeClassPtr = IL2CPP.GetIl2CppClass("Assembly-CSharp.dll", "MTAssets.UltimateLODSystem", "MTAssetsMathematics");
			IL2CPP.il2cpp_runtime_class_init(Il2CppClassPointerStore<MTAssetsMathematics>.NativeClassPtr);
			MTAssetsMathematics.NativeMethodInfoPtr_RandomizeThisList_Public_Static_List_1_T_List_1_T_0 = IL2CPP.GetIl2CppMethodByToken(Il2CppClassPointerStore<MTAssetsMathematics>.NativeClassPtr, 100676247);
			MTAssetsMathematics.NativeMethodInfoPtr_GetHalfPositionBetweenTwoPoints_Public_Static_Vector3_Vector3_Vector3_0 = IL2CPP.GetIl2CppMethodByToken(Il2CppClassPointerStore<MTAssetsMathematics>.NativeClassPtr, 100676248);
			MTAssetsMathematics.NativeMethodInfoPtr__ctor_Public_Void_0 = IL2CPP.GetIl2CppMethodByToken(Il2CppClassPointerStore<MTAssetsMathematics>.NativeClassPtr, 100676249);
		}

		// Token: 0x0600A771 RID: 42865 RVA: 0x0000351C File Offset: 0x0000171C
		public MTAssetsMathematics(IntPtr pointer)
			: base(pointer)
		{
		}

		// Token: 0x04007036 RID: 28726
		private static readonly IntPtr NativeMethodInfoPtr_RandomizeThisList_Public_Static_List_1_T_List_1_T_0;

		// Token: 0x04007037 RID: 28727
		private static readonly IntPtr NativeMethodInfoPtr_GetHalfPositionBetweenTwoPoints_Public_Static_Vector3_Vector3_Vector3_0;

		// Token: 0x04007038 RID: 28728
		private static readonly IntPtr NativeMethodInfoPtr__ctor_Public_Void_0;

		// Token: 0x02000661 RID: 1633
		private sealed class MethodInfoStoreGeneric_RandomizeThisList_Public_Static_List_1_T_List_1_T_0<T>
		{
			// Token: 0x04007039 RID: 28729
			internal static IntPtr Pointer = IL2CPP.il2cpp_method_get_from_reflection(IL2CPP.Il2CppObjectBaseToPtrNotNull(new MethodInfo(IL2CPP.il2cpp_method_get_object(MTAssetsMathematics.NativeMethodInfoPtr_RandomizeThisList_Public_Static_List_1_T_List_1_T_0, Il2CppClassPointerStore<MTAssetsMathematics>.NativeClassPtr)).MakeGenericMethod(new Il2CppReferenceArray<Type>(new Type[] { Type.internal_from_handle(IL2CPP.il2cpp_class_get_type(Il2CppClassPointerStore<T>.NativeClassPtr)) }))));
		}
	}
}
