utils

package
v0.1.0-alpha Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 29, 2015 License: BSD-3-Clause Imports: 4 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ComputeFitImage

func ComputeFitImage(winWidth, winHeight, imageWidth, imageHeight uint32) (uint32, uint32)

ComputeFitImage returns Width and Height for the image to fit in the window, keeping the actual ratio

func GetAppData

func GetAppData() (string, error)

GetAppData returns the application folder for this application. Creates it otherwise. Can return an error if the path has no write rights.

func Mod

func Mod(a int, b int) int

Mod is the function which always return the positive modulus

func StringInSlice

func StringInSlice(a string, list []string) bool

StringInSlice returns true if the string a is in slice, else false

Types

type IntList

type IntList []int

IntList for an integer list

func (*IntList) Find

func (l *IntList) Find(i int) bool

Find returns true if the integer is in list

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL