Documentation ¶
Overview ¶
Package mathext contains extensions to the base Go math package.
Index ¶
Examples ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AbsInt ¶
AbsInt returns the absolute value of the x integer.
Special cases are:
AbsInt(minInt) results in a panic (not representable)
func MaxBigInt ¶
MaxBigInt returns the larger of x or y big integers.
Example ¶
package main import ( "fmt" "math/big" "gopkg.in/karalabe/cookiejar.v2/exts/mathext" ) func main() { // Define some sample big ints four := big.NewInt(4) five := big.NewInt(5) // Print the minimum and maximum of the two fmt.Println("Min:", mathext.MinBigInt(four, five)) fmt.Println("Max:", mathext.MaxBigInt(four, five)) }
Output: Min: 4 Max: 5
func SignFloat64 ¶
SignFloat64 returns the sign of the x floating point number.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.