Documentation ¶
Index ¶
- func AngleBetween(x1, y1, x2, y2 float64) float64
- func DegreeToRadian(degree float64) float64
- func Distance(x1, y1, x2, y2 float64) float64
- func MakeRangeInt(min, max int) []int
- func NearCoords(x, y, x1, y1, radius float64) bool
- func PercentDifference(n1, n2 float64) float64
- func RadianToDegree(radian float64) float64
- func RandomBetween(min, max int) int
- func RandomBetweenf(min, max float64) float64
- func RoundFloat(val float64, places int) float64
- func WhatQuadrant(angle float64) int
- func WithinDistance(x, x1, radius float64) bool
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AngleBetween ¶
AngleBetween returns the float64 angle of the given 2 sets of x,y coords
func DegreeToRadian ¶
DegreeToRadian takes a given degree and returns the radian value
func MakeRangeInt ¶
MakeRangeInt of ints between min and max values
func NearCoords ¶
NearCoords tests if (x,y) are "near" (x1, y1) based on radius
func PercentDifference ¶
PercentDifference returns the percent difference between n1 and n2 to determine how close they are based on the larger number
func RadianToDegree ¶
RadianToDegree takes the radian value and returns the degree value
func RandomBetween ¶
RandomBetween returns a random int between min and max respectively This is just a useful function for many reasons
func RandomBetweenf ¶
RandomBetweenf is the same as RandomBetween but takes and returns float64 values
func RoundFloat ¶
RoundFloat takes val and returns a float64 with decimal precision of places
func WhatQuadrant ¶
WhatQuadrant returns an int representing the quadrant of a circle the angle is in
func WithinDistance ¶
WithinDistance is a simple function to check if x is withing a certain distance of x1
Types ¶
This section is empty.