Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetHaversineDistance ¶
GetHaversineDistance finds the distance (in km) between two latitude/longitude pairs using the Haversine formula. For more details, see http://en.wikipedia.org/wiki/Haversine_formula.
Types ¶
type Random ¶
Random is a source of random values.
func NewRandom ¶
NewRandom returns a new Random that uses the provided seed to generate random values.
func (*Random) GetExpDistributedInt ¶
GetExpDistributedInt returns a exponentially distributed number in the interval [0, +math.MaxFloat64), rounded to the nearest int. Callers can adjust the rate of the function through the rate parameter.
func (*Random) GetRandomInt ¶
GetRandomInt returns a non-negative pseudo-random number in the interval [0, max). It returns 0 if max <= 0.
Click to show internal directories.
Click to hide internal directories.