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: 0x02000608 RID: 1544
	public class MTAssetsMathematics : MonoBehaviour
	{
		// Token: 0x06009F1A RID: 40730 RVA: 0x0028B978 File Offset: 0x00289B78
		[CallerCount(0)]
		[CachedScanResults(RefRangeStart = 0, RefRangeEnd = 0, XrefRangeStart = 623013, XrefRangeEnd = 623014, 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: 0x06009F1B RID: 40731 RVA: 0x0028B9D8 File Offset: 0x00289BD8
		[CallerCount(0)]
		[CachedScanResults(RefRangeStart = 0, RefRangeEnd = 0, XrefRangeStart = 623014, XrefRangeEnd = 623015, 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: 0x06009F1C RID: 40732 RVA: 0x0028BA40 File Offset: 0x00289C40
		[CallerCount(63)]
		[CachedScanResults(RefRangeStart = 222154, RefRangeEnd = 222217, XrefRangeStart = 222154, XrefRangeEnd = 222217, 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: 0x06009F1D RID: 40733 RVA: 0x0028BA8C File Offset: 0x00289C8C
		// 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, 100675534);
			MTAssetsMathematics.NativeMethodInfoPtr_GetHalfPositionBetweenTwoPoints_Public_Static_Vector3_Vector3_Vector3_0 = IL2CPP.GetIl2CppMethodByToken(Il2CppClassPointerStore<MTAssetsMathematics>.NativeClassPtr, 100675535);
			MTAssetsMathematics.NativeMethodInfoPtr__ctor_Public_Void_0 = IL2CPP.GetIl2CppMethodByToken(Il2CppClassPointerStore<MTAssetsMathematics>.NativeClassPtr, 100675536);
		}

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

		// Token: 0x04006A8D RID: 27277
		private static readonly IntPtr NativeMethodInfoPtr_RandomizeThisList_Public_Static_List_1_T_List_1_T_0;

		// Token: 0x04006A8E RID: 27278
		private static readonly IntPtr NativeMethodInfoPtr_GetHalfPositionBetweenTwoPoints_Public_Static_Vector3_Vector3_Vector3_0;

		// Token: 0x04006A8F RID: 27279
		private static readonly IntPtr NativeMethodInfoPtr__ctor_Public_Void_0;

		// Token: 0x02000609 RID: 1545
		private sealed class MethodInfoStoreGeneric_RandomizeThisList_Public_Static_List_1_T_List_1_T_0<T>
		{
			// Token: 0x04006A90 RID: 27280
			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)) }))));
		}
	}
}
