Humanizer.NumberToNumberExtensions
NumberToNumberExtensions Class
Number to Number extensions
public static class NumberToNumberExtensions
Inheritance System.Object → NumberToNumberExtensions
Methods
NumberToNumberExtensions.Billions(this double) Method
Multiplies a double by 1,000,000,000 (one billion in short scale), providing a more readable way to express billions in code.
public static double Billions(this double input);
Parameters
input System.Double
The double value to multiply by 1,000,000,000.
Returns
System.Double
The input value multiplied by 1,000,000,000.
Example
1.0.Billions() => 1000000000.0
Remarks
Uses the short scale definition where 1 billion = 1,000,000,000 (10^9).
NumberToNumberExtensions.Billions(this int) Method
Multiplies an integer by 1,000,000,000 (one billion in short scale), providing a more readable way to express billions in code.
public static int Billions(this int input);
Parameters
input System.Int32
The integer value to multiply by 1,000,000,000.
Returns
System.Int32
The input value multiplied by 1,000,000,000.
Example
1.Billions() => 1000000000
2.Billions() => 2000000000
Remarks
Uses the short scale definition where 1 billion = 1,000,000,000 (10^9).
NumberToNumberExtensions.Billions(this long) Method
Multiplies a long integer by 1,000,000,000 (one billion in short scale), providing a more readable way to express billions in code.
public static long Billions(this long input);
Parameters
input System.Int64
The long integer value to multiply by 1,000,000,000.
Returns
System.Int64
The input value multiplied by 1,000,000,000.
Example
1L.Billions() => 1000000000L
Remarks
Uses the short scale definition where 1 billion = 1,000,000,000 (10^9).
NumberToNumberExtensions.Billions(this uint) Method
Multiplies an unsigned integer by 1,000,000,000 (one billion in short scale), providing a more readable way to express billions in code.
public static uint Billions(this uint input);
Parameters
input System.UInt32
The unsigned integer value to multiply by 1,000,000,000.
Returns
System.UInt32
The input value multiplied by 1,000,000,000.
Example
1U.Billions() => 1000000000U
Remarks
Uses the short scale definition where 1 billion = 1,000,000,000 (10^9).
NumberToNumberExtensions.Billions(this ulong) Method
Multiplies an unsigned long integer by 1,000,000,000 (one billion in short scale), providing a more readable way to express billions in code.
public static ulong Billions(this ulong input);
Parameters
input System.UInt64
The unsigned long integer value to multiply by 1,000,000,000.
Returns
System.UInt64
The input value multiplied by 1,000,000,000.
Example
1UL.Billions() => 1000000000UL
Remarks
Uses the short scale definition where 1 billion = 1,000,000,000 (10^9).
NumberToNumberExtensions.Hundreds(this double) Method
Multiplies a double by 100, providing a more readable way to express hundreds in code.
public static double Hundreds(this double input);
Parameters
input System.Double
The double value to multiply by 100.
Returns
System.Double
The input value multiplied by 100.
Example
4.0.Hundreds() => 400.0
NumberToNumberExtensions.Hundreds(this int) Method
Multiplies an integer by 100, providing a more readable way to express hundreds in code.
public static int Hundreds(this int input);
Parameters
input System.Int32
The integer value to multiply by 100.
Returns
System.Int32
The input value multiplied by 100.
Example
4.Hundreds() => 400
2.Hundreds() => 200
NumberToNumberExtensions.Hundreds(this long) Method
Multiplies a long integer by 100, providing a more readable way to express hundreds in code.
public static long Hundreds(this long input);
Parameters
input System.Int64
The long integer value to multiply by 100.
Returns
System.Int64
The input value multiplied by 100.
Example
4L.Hundreds() => 400L
NumberToNumberExtensions.Hundreds(this uint) Method
Multiplies an unsigned integer by 100, providing a more readable way to express hundreds in code.
public static uint Hundreds(this uint input);
Parameters
input System.UInt32
The unsigned integer value to multiply by 100.
Returns
System.UInt32
The input value multiplied by 100.
Example
4U.Hundreds() => 400U
NumberToNumberExtensions.Hundreds(this ulong) Method
Multiplies an unsigned long integer by 100, providing a more readable way to express hundreds in code.
public static ulong Hundreds(this ulong input);
Parameters
input System.UInt64
The unsigned long integer value to multiply by 100.
Returns
System.UInt64
The input value multiplied by 100.
Example
4UL.Hundreds() => 400UL
NumberToNumberExtensions.Millions(this double) Method
Multiplies a double by 1,000,000, providing a more readable way to express millions in code.
public static double Millions(this double input);
Parameters
input System.Double
The double value to multiply by 1,000,000.
Returns
System.Double
The input value multiplied by 1,000,000.
Example
2.0.Millions() => 2000000.0
NumberToNumberExtensions.Millions(this int) Method
Multiplies an integer by 1,000,000, providing a more readable way to express millions in code.
public static int Millions(this int input);
Parameters
input System.Int32
The integer value to multiply by 1,000,000.
Returns
System.Int32
The input value multiplied by 1,000,000.
Example
2.Millions() => 2000000
5.Millions() => 5000000
NumberToNumberExtensions.Millions(this long) Method
Multiplies a long integer by 1,000,000, providing a more readable way to express millions in code.
public static long Millions(this long input);
Parameters
input System.Int64
The long integer value to multiply by 1,000,000.
Returns
System.Int64
The input value multiplied by 1,000,000.
Example
2L.Millions() => 2000000L
NumberToNumberExtensions.Millions(this uint) Method
Multiplies an unsigned integer by 1,000,000, providing a more readable way to express millions in code.
public static uint Millions(this uint input);
Parameters
input System.UInt32
The unsigned integer value to multiply by 1,000,000.
Returns
System.UInt32
The input value multiplied by 1,000,000.
Example
2U.Millions() => 2000000U
NumberToNumberExtensions.Millions(this ulong) Method
Multiplies an unsigned long integer by 1,000,000, providing a more readable way to express millions in code.
public static ulong Millions(this ulong input);
Parameters
input System.UInt64
The unsigned long integer value to multiply by 1,000,000.
Returns
System.UInt64
The input value multiplied by 1,000,000.
Example
2UL.Millions() => 2000000UL
NumberToNumberExtensions.Tens(this double) Method
Multiplies a double by 10, providing a more readable way to express multiples of ten in code.
public static double Tens(this double input);
Parameters
input System.Double
The double value to multiply by 10.
Returns
System.Double
The input value multiplied by 10.
Example
5.5.Tens() => 55.0
NumberToNumberExtensions.Tens(this int) Method
Multiplies an integer by 10, providing a more readable way to express multiples of ten in code.
public static int Tens(this int input);
Parameters
input System.Int32
The integer value to multiply by 10.
Returns
System.Int32
The input value multiplied by 10.
Example
5.Tens() => 50
3.Tens() => 30
10.Tens() => 100
NumberToNumberExtensions.Tens(this long) Method
Multiplies a long integer by 10, providing a more readable way to express multiples of ten in code.
public static long Tens(this long input);
Parameters
input System.Int64
The long integer value to multiply by 10.
Returns
System.Int64
The input value multiplied by 10.
Example
5L.Tens() => 50L
NumberToNumberExtensions.Tens(this uint) Method
Multiplies an unsigned integer by 10, providing a more readable way to express multiples of ten in code.
public static uint Tens(this uint input);
Parameters
input System.UInt32
The unsigned integer value to multiply by 10.
Returns
System.UInt32
The input value multiplied by 10.
Example
5U.Tens() => 50U
NumberToNumberExtensions.Tens(this ulong) Method
Multiplies an unsigned long integer by 10, providing a more readable way to express multiples of ten in code.
public static ulong Tens(this ulong input);
Parameters
input System.UInt64
The unsigned long integer value to multiply by 10.
Returns
System.UInt64
The input value multiplied by 10.
Example
5UL.Tens() => 50UL
NumberToNumberExtensions.Thousands(this double) Method
Multiplies a double by 1000, providing a more readable way to express thousands in code.
public static double Thousands(this double input);
Parameters
input System.Double
The double value to multiply by 1000.
Returns
System.Double
The input value multiplied by 1000.
Example
3.0.Thousands() => 3000.0
NumberToNumberExtensions.Thousands(this int) Method
Multiplies an integer by 1000, providing a more readable way to express thousands in code.
public static int Thousands(this int input);
Parameters
input System.Int32
The integer value to multiply by 1000.
Returns
System.Int32
The input value multiplied by 1000.
Example
3.Thousands() => 3000
10.Thousands() => 10000
NumberToNumberExtensions.Thousands(this long) Method
Multiplies a long integer by 1000, providing a more readable way to express thousands in code.
public static long Thousands(this long input);
Parameters
input System.Int64
The long integer value to multiply by 1000.
Returns
System.Int64
The input value multiplied by 1000.
Example
3L.Thousands() => 3000L
NumberToNumberExtensions.Thousands(this uint) Method
Multiplies an unsigned integer by 1000, providing a more readable way to express thousands in code.
public static uint Thousands(this uint input);
Parameters
input System.UInt32
The unsigned integer value to multiply by 1000.
Returns
System.UInt32
The input value multiplied by 1000.
Example
3U.Thousands() => 3000U
NumberToNumberExtensions.Thousands(this ulong) Method
Multiplies an unsigned long integer by 1000, providing a more readable way to express thousands in code.
public static ulong Thousands(this ulong input);
Parameters
input System.UInt64
The unsigned long integer value to multiply by 1000.
Returns
System.UInt64
The input value multiplied by 1000.
Example
3UL.Thousands() => 3000UL