﻿//------------------------------------------------------------------------------
// <auto-generated>
//     This code was generated by a tool.
//
//     Changes to this file may cause incorrect behavior and will be lost if
//     the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------

#nullable enable

using System;
using System.Runtime.CompilerServices;

using JetBrains.Annotations;

using static CodeJam.Targeting.MethodImplOptionsEx;

namespace CodeJam
{
	public partial class Algorithms
	{
		#region byte
		/// <summary>
		/// Compares two values and returns minimal one.
		/// </summary>
		/// <param name="value1">Value 1.</param>
		/// <param name="value2">Value 2.</param>
		/// <returns>Minimal value.</returns>
		[Pure, System.Diagnostics.Contracts.Pure]
		[MethodImpl(AggressiveInlining)]
		public static byte Min(byte value1, byte value2) =>
			Math.Min(value1, value2);

		/// <summary>
		/// Compares two values and returns maximal one.
		/// </summary>
		/// <param name="value1">Value 1.</param>
		/// <param name="value2">Value 2.</param>
		/// <returns>Minimal value.</returns>
		[Pure, System.Diagnostics.Contracts.Pure]
		[MethodImpl(AggressiveInlining)]
		public static byte Max(byte value1, byte value2) =>
			Math.Max(value1, value2);
		#endregion

		#region sbyte
		/// <summary>
		/// Compares two values and returns minimal one.
		/// </summary>
		/// <param name="value1">Value 1.</param>
		/// <param name="value2">Value 2.</param>
		/// <returns>Minimal value.</returns>
		[Pure, System.Diagnostics.Contracts.Pure]
		[MethodImpl(AggressiveInlining)]
		public static sbyte Min(sbyte value1, sbyte value2) =>
			Math.Min(value1, value2);

		/// <summary>
		/// Compares two values and returns maximal one.
		/// </summary>
		/// <param name="value1">Value 1.</param>
		/// <param name="value2">Value 2.</param>
		/// <returns>Minimal value.</returns>
		[Pure, System.Diagnostics.Contracts.Pure]
		[MethodImpl(AggressiveInlining)]
		public static sbyte Max(sbyte value1, sbyte value2) =>
			Math.Max(value1, value2);
		#endregion

		#region short
		/// <summary>
		/// Compares two values and returns minimal one.
		/// </summary>
		/// <param name="value1">Value 1.</param>
		/// <param name="value2">Value 2.</param>
		/// <returns>Minimal value.</returns>
		[Pure, System.Diagnostics.Contracts.Pure]
		[MethodImpl(AggressiveInlining)]
		public static short Min(short value1, short value2) =>
			Math.Min(value1, value2);

		/// <summary>
		/// Compares two values and returns maximal one.
		/// </summary>
		/// <param name="value1">Value 1.</param>
		/// <param name="value2">Value 2.</param>
		/// <returns>Minimal value.</returns>
		[Pure, System.Diagnostics.Contracts.Pure]
		[MethodImpl(AggressiveInlining)]
		public static short Max(short value1, short value2) =>
			Math.Max(value1, value2);
		#endregion

		#region ushort
		/// <summary>
		/// Compares two values and returns minimal one.
		/// </summary>
		/// <param name="value1">Value 1.</param>
		/// <param name="value2">Value 2.</param>
		/// <returns>Minimal value.</returns>
		[Pure, System.Diagnostics.Contracts.Pure]
		[MethodImpl(AggressiveInlining)]
		public static ushort Min(ushort value1, ushort value2) =>
			Math.Min(value1, value2);

		/// <summary>
		/// Compares two values and returns maximal one.
		/// </summary>
		/// <param name="value1">Value 1.</param>
		/// <param name="value2">Value 2.</param>
		/// <returns>Minimal value.</returns>
		[Pure, System.Diagnostics.Contracts.Pure]
		[MethodImpl(AggressiveInlining)]
		public static ushort Max(ushort value1, ushort value2) =>
			Math.Max(value1, value2);
		#endregion

		#region int
		/// <summary>
		/// Compares two values and returns minimal one.
		/// </summary>
		/// <param name="value1">Value 1.</param>
		/// <param name="value2">Value 2.</param>
		/// <returns>Minimal value.</returns>
		[Pure, System.Diagnostics.Contracts.Pure]
		[MethodImpl(AggressiveInlining)]
		public static int Min(int value1, int value2) =>
			Math.Min(value1, value2);

		/// <summary>
		/// Compares two values and returns maximal one.
		/// </summary>
		/// <param name="value1">Value 1.</param>
		/// <param name="value2">Value 2.</param>
		/// <returns>Minimal value.</returns>
		[Pure, System.Diagnostics.Contracts.Pure]
		[MethodImpl(AggressiveInlining)]
		public static int Max(int value1, int value2) =>
			Math.Max(value1, value2);
		#endregion

		#region uint
		/// <summary>
		/// Compares two values and returns minimal one.
		/// </summary>
		/// <param name="value1">Value 1.</param>
		/// <param name="value2">Value 2.</param>
		/// <returns>Minimal value.</returns>
		[Pure, System.Diagnostics.Contracts.Pure]
		[MethodImpl(AggressiveInlining)]
		public static uint Min(uint value1, uint value2) =>
			Math.Min(value1, value2);

		/// <summary>
		/// Compares two values and returns maximal one.
		/// </summary>
		/// <param name="value1">Value 1.</param>
		/// <param name="value2">Value 2.</param>
		/// <returns>Minimal value.</returns>
		[Pure, System.Diagnostics.Contracts.Pure]
		[MethodImpl(AggressiveInlining)]
		public static uint Max(uint value1, uint value2) =>
			Math.Max(value1, value2);
		#endregion

		#region long
		/// <summary>
		/// Compares two values and returns minimal one.
		/// </summary>
		/// <param name="value1">Value 1.</param>
		/// <param name="value2">Value 2.</param>
		/// <returns>Minimal value.</returns>
		[Pure, System.Diagnostics.Contracts.Pure]
		[MethodImpl(AggressiveInlining)]
		public static long Min(long value1, long value2) =>
			Math.Min(value1, value2);

		/// <summary>
		/// Compares two values and returns maximal one.
		/// </summary>
		/// <param name="value1">Value 1.</param>
		/// <param name="value2">Value 2.</param>
		/// <returns>Minimal value.</returns>
		[Pure, System.Diagnostics.Contracts.Pure]
		[MethodImpl(AggressiveInlining)]
		public static long Max(long value1, long value2) =>
			Math.Max(value1, value2);
		#endregion

		#region ulong
		/// <summary>
		/// Compares two values and returns minimal one.
		/// </summary>
		/// <param name="value1">Value 1.</param>
		/// <param name="value2">Value 2.</param>
		/// <returns>Minimal value.</returns>
		[Pure, System.Diagnostics.Contracts.Pure]
		[MethodImpl(AggressiveInlining)]
		public static ulong Min(ulong value1, ulong value2) =>
			Math.Min(value1, value2);

		/// <summary>
		/// Compares two values and returns maximal one.
		/// </summary>
		/// <param name="value1">Value 1.</param>
		/// <param name="value2">Value 2.</param>
		/// <returns>Minimal value.</returns>
		[Pure, System.Diagnostics.Contracts.Pure]
		[MethodImpl(AggressiveInlining)]
		public static ulong Max(ulong value1, ulong value2) =>
			Math.Max(value1, value2);
		#endregion

		#region float
		/// <summary>
		/// Compares two values and returns minimal one.
		/// </summary>
		/// <param name="value1">Value 1.</param>
		/// <param name="value2">Value 2.</param>
		/// <returns>Minimal value.</returns>
		[Pure, System.Diagnostics.Contracts.Pure]
		[MethodImpl(AggressiveInlining)]
		public static float Min(float value1, float value2) =>
			Math.Min(value1, value2);

		/// <summary>
		/// Compares two values and returns maximal one.
		/// </summary>
		/// <param name="value1">Value 1.</param>
		/// <param name="value2">Value 2.</param>
		/// <returns>Minimal value.</returns>
		[Pure, System.Diagnostics.Contracts.Pure]
		[MethodImpl(AggressiveInlining)]
		public static float Max(float value1, float value2) =>
			Math.Max(value1, value2);
		#endregion

		#region double
		/// <summary>
		/// Compares two values and returns minimal one.
		/// </summary>
		/// <param name="value1">Value 1.</param>
		/// <param name="value2">Value 2.</param>
		/// <returns>Minimal value.</returns>
		[Pure, System.Diagnostics.Contracts.Pure]
		[MethodImpl(AggressiveInlining)]
		public static double Min(double value1, double value2) =>
			Math.Min(value1, value2);

		/// <summary>
		/// Compares two values and returns maximal one.
		/// </summary>
		/// <param name="value1">Value 1.</param>
		/// <param name="value2">Value 2.</param>
		/// <returns>Minimal value.</returns>
		[Pure, System.Diagnostics.Contracts.Pure]
		[MethodImpl(AggressiveInlining)]
		public static double Max(double value1, double value2) =>
			Math.Max(value1, value2);
		#endregion

		#region decimal
		/// <summary>
		/// Compares two values and returns minimal one.
		/// </summary>
		/// <param name="value1">Value 1.</param>
		/// <param name="value2">Value 2.</param>
		/// <returns>Minimal value.</returns>
		[Pure, System.Diagnostics.Contracts.Pure]
		[MethodImpl(AggressiveInlining)]
		public static decimal Min(decimal value1, decimal value2) =>
			Math.Min(value1, value2);

		/// <summary>
		/// Compares two values and returns maximal one.
		/// </summary>
		/// <param name="value1">Value 1.</param>
		/// <param name="value2">Value 2.</param>
		/// <returns>Minimal value.</returns>
		[Pure, System.Diagnostics.Contracts.Pure]
		[MethodImpl(AggressiveInlining)]
		public static decimal Max(decimal value1, decimal value2) =>
			Math.Max(value1, value2);
		#endregion

		#region TimeSpan
		/// <summary>
		/// Compares two values and returns minimal one.
		/// </summary>
		/// <param name="value1">Value 1.</param>
		/// <param name="value2">Value 2.</param>
		/// <returns>Minimal value.</returns>
		[Pure, System.Diagnostics.Contracts.Pure]
		[MethodImpl(AggressiveInlining)]
		public static TimeSpan Min(TimeSpan value1, TimeSpan value2) =>
			value1 <= value2 ? value1 : value2;

		/// <summary>
		/// Compares two values and returns maximal one.
		/// </summary>
		/// <param name="value1">Value 1.</param>
		/// <param name="value2">Value 2.</param>
		/// <returns>Minimal value.</returns>
		[Pure, System.Diagnostics.Contracts.Pure]
		[MethodImpl(AggressiveInlining)]
		public static TimeSpan Max(TimeSpan value1, TimeSpan value2) =>
			value1 >= value2 ? value1 : value2;
		#endregion

		#region DateTime
		/// <summary>
		/// Compares two values and returns minimal one.
		/// </summary>
		/// <param name="value1">Value 1.</param>
		/// <param name="value2">Value 2.</param>
		/// <returns>Minimal value.</returns>
		[Pure, System.Diagnostics.Contracts.Pure]
		[MethodImpl(AggressiveInlining)]
		public static DateTime Min(DateTime value1, DateTime value2) =>
			value1 <= value2 ? value1 : value2;

		/// <summary>
		/// Compares two values and returns maximal one.
		/// </summary>
		/// <param name="value1">Value 1.</param>
		/// <param name="value2">Value 2.</param>
		/// <returns>Minimal value.</returns>
		[Pure, System.Diagnostics.Contracts.Pure]
		[MethodImpl(AggressiveInlining)]
		public static DateTime Max(DateTime value1, DateTime value2) =>
			value1 >= value2 ? value1 : value2;
		#endregion

		#region DateTimeOffset
		/// <summary>
		/// Compares two values and returns minimal one.
		/// </summary>
		/// <param name="value1">Value 1.</param>
		/// <param name="value2">Value 2.</param>
		/// <returns>Minimal value.</returns>
		[Pure, System.Diagnostics.Contracts.Pure]
		[MethodImpl(AggressiveInlining)]
		public static DateTimeOffset Min(DateTimeOffset value1, DateTimeOffset value2) =>
			value1 <= value2 ? value1 : value2;

		/// <summary>
		/// Compares two values and returns maximal one.
		/// </summary>
		/// <param name="value1">Value 1.</param>
		/// <param name="value2">Value 2.</param>
		/// <returns>Minimal value.</returns>
		[Pure, System.Diagnostics.Contracts.Pure]
		[MethodImpl(AggressiveInlining)]
		public static DateTimeOffset Max(DateTimeOffset value1, DateTimeOffset value2) =>
			value1 >= value2 ? value1 : value2;
		#endregion

	}
}
