MathF.Min() Method in C# with Examples Last Updated : 04 Apr, 2019 Comments Improve Suggest changes Like Article Like Report 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 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.Min(Single, Single) method using System; class GFG { // Main Method static void Main() { // taking different float values float f1 = 56.48f, f2 = 78.123457f; float f3 = -785.2f, f4 = -58.2547f; // displaying result Console.WriteLine(MathF.Min(f1, f2)); Console.WriteLine(MathF.Min(f3, f4)); } } Output: 56.48 -785.2 Comment More infoAdvertise with us Next Article MathF.Sqrt() Method in C# with Examples K Kirti_Mangal Follow Improve Article Tags : C# CSharp-method CSharp-MathF-Class Similar Reads MathF.Sqrt() Method in C# with Examples In C#, MathF.Sqrt(Single) is a MathF class(present in system namespace) method which is used to calculate the square root of the specified Single or float data type value. Syntax: public static float Sqrt (float x); Here, x is the number whose square root is to be calculated and type of this paramet 2 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.Truncate() Method in C# with Examples In C#, MathF.Truncate(Single) is a MathF class method which is used to compute an integral part of a specified single number or single-precision floating-point number.Syntax: public static float Truncate (float x); Parameter: x: It is the specified number which is to be truncated and type of this pa 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.Round() Method in C# with Examples | Set - 1 In C#, MathF.Round() is a MathF class method which is used to round a value to the nearest integer or to the particular number of fractional digits. This method can be overloaded by changing the number and type of arguments passed. There are 4 methods in the overload list of the MathF.Round() method 3 min read MathF.Round() Method in C# with Examples | Set - 2 In C#, MathF.Round() is a MathF class method which is used to round a value to the nearest integer or to the particular number of fractional digits. It returns the nearest value of the number with the precision equal to the second parameter passed. If the value to round is exactly halfway between an 4 min read Like