Documentation ¶
Index ¶
- func AbsInt32(a int32) int32
- func AlmostEqual(a, b, threshold float64) bool
- func AsterToEmpty(text string) string
- func BytesToInt32(b []byte) int32
- func CombineStrings(input []string) string
- func EmptyToZero(text string) string
- func GetAngleBetween(p1X, p1Y, p2X, p2Y float64) int
- func IsoToScreen(isoX, isoY, modX, modY float64) (float64, float64)
- func Max(a, b uint32) uint32
- func MaxInt(a, b int) int
- func MaxInt32(a, b int32) int32
- func Min(a, b uint32) uint32
- func MinInt(a, b int) int
- func MinInt32(a, b int32) int32
- func NextPow2(x int32) int32
- func Now() float64
- func SafeStringToInt(text string) int
- func ScreenToIso(sx, sy float64) (float64, float64)
- func SplitIntoLinesWithMaxWidth(fullSentence string, maxChars int) []string
- func StringToFloat64(text string) float64
- func StringToInt(text string) int
- func StringToInt8(text string) int8
- func StringToUint(text string) uint
- func StringToUint8(text string) uint8
- func Utf16BytesToString(b []byte) (string, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AlmostEqual ¶
AlmostEqual returns true if two values are within threshold from each other
func AsterToEmpty ¶
AsterToEmpty converts strings beginning with "*" to "", for use when handling columns where an asterix can be used to comment out entries
func CombineStrings ¶
func EmptyToZero ¶
EmptyToZero converts empty strings to "0" and leaves non-empty strings as is, for use before converting numerical data which equates empty to zero
func GetAngleBetween ¶
GetAngleBetween returns the angle between two points. 0deg is facing to the right.
func IsoToScreen ¶
IsoToScreen converts isometric coordinates to screenspace coordinates
func SafeStringToInt ¶
SafeStringToInt converts a string to an integer, or returns -1 on falure
func ScreenToIso ¶
ScreenToIso converts screenspace coordinates to isometric coordinates
func StringToFloat64 ¶
StringToFloat64 converts a string to a float64
func StringToUint8 ¶
StringToUint8 converts a string to an uint8
func Utf16BytesToString ¶
Types ¶
This section is empty.