Documentation
¶
Overview ¶
Package sint is a basic math library for int.
Index ¶
Examples ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Log10 ¶
Log10 returns the log10(i), rounded down to a whole integer. i must be positive.
Example ¶
package main
import (
"fmt"
"github.com/google/gapid/core/math/sint"
)
func main() {
for _, n := range []int{0, 1, 2, 9, 10, 11, 99, 100, 101} {
fmt.Printf("Log10(%v): %v\n", n, sint.Log10(n))
}
}
Output: Log10(0): 0 Log10(1): 0 Log10(2): 0 Log10(9): 0 Log10(10): 1 Log10(11): 1 Log10(99): 1 Log10(100): 2 Log10(101): 2
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.