Documentation ¶
Index ¶
- Constants
- func Clamp(v float64, min float64, max float64) float64
- func ClampInt(v int, min int, max int) int
- func Fract(v float64) float64
- func GetOne(arr []interface{}, seed ...uint64) interface{}
- func Lerp(t, a, b float64) float64
- func MaxInt(x, y int) int
- func MinInt(x, y int) int
- func OneIn(chance float64, seed ...uint64) bool
- func OneInInt(chance int, seed ...uint64) bool
- func PickOne(arr []interface{}, seed ...uint64) (interface{}, []interface{})
- func PickSome(arr []interface{}, num int, seed ...uint64) ([]interface{}, []interface{})
- func Porn(seed ...uint64) float64
- func PornInt(seed ...uint64) int
- func PowInt(x, y int) int
- func PowInt64(x, y int64) int64
- func PowUInt64(x, y uint64) uint64
- func Range(start, end float64) []float64
- func RangeInt(start, end int) []int
- func Rng(val1, val2 float64, seed ...uint64) float64
- func RngInt(val1, val2 int, seed ...uint64) int
- func SRandom(seed ...uint64) float64
- func Shuffle(arr []interface{}, seed ...uint64) []interface{}
- func Sign(v float64) float64
- func Step(edge float64, x float64) float64
- func StepInt(edge int, x int) int
- func WeightList(list []int) int
- func WeightSelect(weightList []WeightAble, seed ...uint64) int
- func XInY(x float64, y float64, seed ...uint64) bool
- func XInYInt(x int, y int, seed ...uint64) bool
- type WeightAble
Constants ¶
View Source
const JSMAXSAFE = 1342177
Variables ¶
This section is empty.
Functions ¶
func WeightList ¶
func WeightSelect ¶
func WeightSelect(weightList []WeightAble, seed ...uint64) int
Types ¶
type WeightAble ¶
type WeightAble interface {
Weight() float64
}
Click to show internal directories.
Click to hide internal directories.