util

package
v0.0.0-...-02723c8 Latest Latest
Warning

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

Go to latest
Published: Oct 19, 2017 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const DragRatio float32 = 0.2
View Source
const DragRatioVertical float32 = 0
View Source
const Gravity float32 = 0.35 // units/sec^2
View Source
const HalfPi = math.Pi / 2
View Source
const JumpStrength float32 = 0.11 // units/sec
View Source
const PlayerSpeed float32 = 2 // units/sec
View Source
const TicksPerSecond = 100
View Source
const TwoPi = math.Pi * 2
View Source
const UnitLength float32 = 10

Variables

This section is empty.

Functions

func Clamp

func Clamp(val, min, max float32) float32

func Cos

func Cos(f float32) float32

func DivFloor

func DivFloor(n, d int) int

func GetTranslationMatrix

func GetTranslationMatrix(translation mgl32.Vec3) *mgl32.Mat4

func GetXRotationMatrix

func GetXRotationMatrix(rotationRads float32) *mgl32.Mat4

func GetYRotationMatrix

func GetYRotationMatrix(rotationRads float32) *mgl32.Mat4

func GetZRotationMatrix

func GetZRotationMatrix(rotationRads float32) *mgl32.Mat4

func MaxAbs

func MaxAbs(a, b float32) float32

func Perspective

func Perspective(near, far, fovDegs, aspect float32) *mgl32.Mat4

func Sin

func Sin(f float32) float32

func Vec2ToStr

func Vec2ToStr(vec *mgl32.Vec2) string

func Vec3ToStr

func Vec3ToStr(vec *mgl32.Vec3) string

func VecAdd

func VecAdd(vec *mgl32.Vec3, x, y, z float32) *mgl32.Vec3

func VecMul

func VecMul(vec *mgl32.Vec3, x, y, z float32) *mgl32.Vec3

Types

This section is empty.

Jump to

Keyboard shortcuts

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