MathF.Max() Method in C# with Examples Last Updated : 04 Apr, 2019 Comments Improve Suggest changes Like Article Like Report In C#, Max(Single, Single) is a MathF class method which is used to returns the larger of the two specified numbers. Syntax: public static float Max (float x, float y); Here, x and y are the two floating point numbers which are compared. Return Type: This method returns the maximum of the two numbers which specified into the parameter list and return type depends on the type of arguments passed. Example: CSharp // C# program to demonstrate the // MathF.Max(Single, Single) method using System; class GFG { // Main Method static void Main() { // taking different float values float f1 = 34.56f, f2 = 37.3412f; float f3 = -675.2f, f4 = -56.47f; // displaying result Console.WriteLine(MathF.Max(f1, f2)); Console.WriteLine(MathF.Max(f3, f4)); } } Output: 37.3412 -56.47 Comment More infoAdvertise with us Next Article MathF.Max() Method in C# with Examples K Kirti_Mangal Follow Improve Article Tags : C# CSharp-method CSharp-MathF-Class Similar Reads MathF.Min() Method in C# with Examples In C#, Min(Single, Single) is a MathF class method which is used to returns the minimum of the two specified numbers. Syntax: public static float Min (float x, float y); Here, x and y are the two floating point numbers which are compared. Return Type: This method returns the minimum of the two numbe 1 min read MathF.Abs() Method in C# with Examples MathF.Abs(Single) Method is used to return the absolute value of a specified float number. Syntax: public static float Abs (float x); Here, it takes a standard floating point number. Return Value: This method returns a floating point value less than Single.MaxValue. Example 1: csharp // C# program t 1 min read MathF.Floor() Method in C# with Examples In C#, MathF.Floor(Single) is a MathF class method. This method is used to find the largest integer , which is less than or equal to the specified float value in the argument list. Syntax: public static float Floor (float x); Here, x is the float(Single) value whose floor value has to be calculated. 2 min read MathF.Ceiling() Method in C# with Examples In C#, MathF.Ceiling(Single) is a MathF class method. This method is used to find the smallest integer , which is greater than or equal to the specified single or float value in the argument list. Syntax: public static float Ceiling (float x); Here, x is the float(Single) value whose ceiling value h 1 min read Int32.MaxValue Field in C# with Examples The MaxValue field or property of Int32 Struct is used to represent the maximum value of Int32. The value of this field is constant means that the user cannot change the value of this field. The value of this field is 2147483647. Its hexadecimal value is 0x7FFFFFFF. It is used to avoid the OverflowE 1 min read Like