Documentation ¶
Index ¶
- func GetAbsoluteValueAsFloat64(number interface{}) float64
- func GetAbsoluteValueAsInt(number interface{}) int
- func IsFloatEffectivelyEqual(firstNumber, secondNumber float64) bool
- func IsNumberEven(number interface{}) bool
- func RoundToDecimal(number interface{}, numberOfPlaces int) float64
- func RoundToWholeNumber(number interface{}) float64
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetAbsoluteValueAsFloat64 ¶
func GetAbsoluteValueAsFloat64(number interface{}) float64
func GetAbsoluteValueAsInt ¶
func GetAbsoluteValueAsInt(number interface{}) int
func IsFloatEffectivelyEqual ¶
IsFloatEffectivelyEqual This method allows you to check if two floating point numbers are effectively equal to each other. Since floating point operations perform approximate arithmetic, it is normal that there will be an accumulation of rounding errors in floating-point operations. By using this method, you can check if your numbers are for most practical purposes, equal or not by automatically rounding numbers down to 7 places.
func IsNumberEven ¶
func IsNumberEven(number interface{}) bool
func RoundToDecimal ¶
func RoundToWholeNumber ¶
func RoundToWholeNumber(number interface{}) float64
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.