Versions in this module Expand all Collapse all v0 v0.0.1 Mar 12, 2024 Changes in this version + const AnyMAny + const Bool + const Bools + const Bytes + const Cpu + const Deg2Rad + const Disk + const Eps + const Float32 + const Float32s + const Float64 + const Float64s + const Goroutine + const HalfPi + const Int + const Int16 + const Int16s + const Int32 + const Int32MInt32 + const Int32MInt64 + const Int32s + const Int64 + const Int64MInt32 + const Int64MInt64 + const Int64s + const Int8 + const Int8s + const Ints + const MAny + const MInt32 + const MInt64 + const MStr + const Memory + const Rad2Deg + const Str + const Strs + const Time + const Times + const Uint16 + const Uint16MUint16 + const Uint16s + const Uint32 + const Uint32s + const Uint64 + const Uint64s + const Uint8 + const Vector2 + const Vector2s + const Vector3 + const Vector3s + var LogPrefix = ".." + var LogReg = regexp.MustCompile(`(\/.+\.(com)|(org))|(\/.+go\d{1}\.\d{1,2}.\d{1,2}|/src)`) + var StackMaxDeep = 8 + func Abs(d float32) float32 + func ArgsToSlc[T any](args ...T) []T + func BytesToInt64(bytes []byte) int64 + func BytesToStr(b []byte) string + func Cancel() + func Ceil(d float32, bit int32) float32 + func CeilInt32(ceil, v int32) (r, o int32) + func Clamp(min, max, v float32) float32 + func ClampFloat(v, min, max float32) float32 + func ClampInt32(min, max, v int32) int32 + func Cmp(v1, v2 float32) int + func CmpZero(v float32) int + func CopyBytes(src []byte) []byte + func Ctx() context.Context + func DefaultCmd(m M) + func Default[T any]() (v T) + func DegreeToRadian(angle float32) float32 + func Equal(v1, v2 float32) bool + func ErrCodeToStr(ec TErrCode) string + func ExeName() string + func Floor(d float32, bit int32) float32 + func FloorInt32(floor, v int32) (r, o int32) + func GenMask(items ...int64) int64 + func GetDiskPercent() float64 + func GetMemPercent() float64 + func GetStack(skip int) []byte + func GobMarshal(v any) ([]byte, error) + func GobUnmarshal(data []byte, v any) error + func Hex(bytes []byte) string + func Int64ToBs(id int64) string + func Int64ToBytes(id int64) []byte + func Int64sToShortStrSlice(ids ...int64) []string + func IsLocalIp(ip string) bool + func IsPowerOfTwo(mask int32) bool + func JsonConf() jsoniter.API + func Lerp(from, to, t float32) float32 + func LerpFloat(v1, v2, v float32) float32 + func LerpInt(v1, v2, v, t int) int + func LogTrim(file string) string + func MGet2[T any](m M, keys ...string) (T, bool) + func MGetOrSet[T any](m M, key string, new func() T) T + func MGet[T any](m M, key string) (T, bool) + func MPop[T any](m M, key string) (T, bool) + func MReplace[T any](m M, key string, val T) (T, bool) + func MUpdate[T any](m M, key string, fn func(T) T) bool + func MaskAddItem(item, mask int64) int64 + func MaskDelItem(item, mask int64) int64 + func Max(l, r float32) float32 + func MaxInt(a, b int) int + func MaxInt32(a, b int32) int32 + func MaxInt64(a, b int64) int64 + func MaxUint32(a, b uint32) uint32 + func MergeUInt32(prevId, lastId uint16) uint32 + func Min(l, r float32) float32 + func MinInt32(a, b int32) int32 + func MinInt64(a, b int64) int64 + func MinUint32(a, b uint32) uint32 + func NextPowerOfTwo(v uint32) uint32 + func PbMarshal(pkt IMsg) ([]byte, error) + func PbUnmarshal(data []byte, pkt IMsg) error + func PointInTriangle(p, a, b, c Vec2) bool + func PointOnSeg(p, a, b Vec2) bool + func PointToSegDist(p, a, b Vec2) float32 + func PointToSegDistSquare(p, a, b Vec2) float32 + func PointToVecDist(p, a, b Vec2) float32 + func PointToVecDistSquare(p, a, b Vec2) float32 + func RadianToDegree(radian float32) float32 + func RandStr(n int) string + func RecycleBytes(bytes []byte) + func RecycleCounter(c *Counter) + func Round(d float32, bit int32) float32 + func SetErrCodeToStr(ec TErrCode, str string) + func SetExeDir(dir string) + func SetJsonConf(conf jsoniter.Config) + func ShortStrToInt64(id string) int64 + func ShortStrToUint16(id string) uint16 + func ShortStrToUint32(id string) uint32 + func ShortStrToUint64(id string) uint64 + func SpawnBytes() []byte + func SpawnBytesWithLen(l uint32) []byte + func SplitSlc1[T any](slc []any) T + func SplitSlc2[T1, T2 any](slc []any) (T1, T2) + func SplitSlc3[T1, T2, T3 any](slc []any) (T1, T2, T3) + func SplitSlc4[T1, T2, T3, T4 any](slc []any) (T1, T2, T3, T4) + func SplitSlc5[T1, T2, T3, T4, T5 any](slc []any) (T1, T2, T3, T4, T5) + func SplitSlc6[T1, T2, T3, T4, T5, T6 any](slc []any) (T1, T2, T3, T4, T5, T6) + func SplitSlc7[T1, T2, T3, T4, T5, T6, T7 any](slc []any) (T1, T2, T3, T4, T5, T6, T7) + func SplitSlc8[T1, T2, T3, T4, T5, T6, T7, T8 any](slc []any) (T1, T2, T3, T4, T5, T6, T7, T8) + func SplitUInt32(code uint32) (prevId, lastId uint16) + func SplitWords(str string, words *[]string) + func Sqrt(v float32) float32 + func StartProfile(dur time.Duration, receiver chan<- M) + func StrToBytes(s string) []byte + func StringsJoin(sep string, slc ...string) string + func TestMask(item, mask int64) bool + func ToBigHump(str string) string + func ToUnderline(str string) string + func TriangleArea(a, b, c Vec2) float32 + func Uint16ToShortStr(id uint16) string + func Uint32ToShortStr(id uint32) string + func Uint64ToShortStr(id uint64) string + func Vec2Cross(a, b Vec2) float32 + func Vec2Dist(a, b Vec2) float32 + func Vec2DistSquare(a, b Vec2) float32 + func Vec2Dot(a, b Vec2) float32 + func Vec2Equal(a, b Vec2) bool + func Vec2Magnitude(a Vec2) float32 + func Vec2Radian(a, b Vec2) float32 + func Vec2ToRadian(a Vec2) float32 + func WorkDir() string + type AnyBoolToAnyBool func(any, bool) (any, bool) + type AnyBoolToBool func(any, bool) bool + type AnyErrToBool func(any, *Err) bool + type AnyToAny func(any) any + type AnyToAnyBool func(any) (any, bool) + type AnyToBool func(any) bool + type AnyToBytesError func(any) ([]byte, error) + type AnyToErr func(any) *Err + type AnyToInt64 func(any) int64 + type BoolToErr func(bool) *Err + type ByteBuffer struct + func (b *ByteBuffer) All() []byte + func (b *ByteBuffer) Available() uint32 + func (b *ByteBuffer) Cap() uint32 + func (b *ByteBuffer) CopyBytes() ([]byte, uint32) + func (b *ByteBuffer) Dispose() + func (b *ByteBuffer) InitBytes(bytes []byte) + func (b *ByteBuffer) InitCap(c uint32) + func (b *ByteBuffer) Length() uint32 + func (b *ByteBuffer) Pos() uint32 + func (b *ByteBuffer) RAny() (v any, err *Err) + func (b *ByteBuffer) RAnyMAny(m map[any]any) (err *Err) + func (b *ByteBuffer) RAvailable() (v []byte) + func (b *ByteBuffer) RBool() (v bool, err *Err) + func (b *ByteBuffer) RBools() (v []bool, err *Err) + func (b *ByteBuffer) RBytes() ([]byte, *Err) + func (b *ByteBuffer) RErr() (e *Err, re *Err) + func (b *ByteBuffer) RFloat32() (v float32, err *Err) + func (b *ByteBuffer) RFloat32s() (v []float32, err *Err) + func (b *ByteBuffer) RFloat64() (v float64, err *Err) + func (b *ByteBuffer) RFloat64s() (v []float64, err *Err) + func (b *ByteBuffer) RInt() (v int, err *Err) + func (b *ByteBuffer) RInt16() (v int16, err *Err) + func (b *ByteBuffer) RInt16s() (v []int16, err *Err) + func (b *ByteBuffer) RInt32() (v int32, err *Err) + func (b *ByteBuffer) RInt32MInt32() (m map[int32]int32, err *Err) + func (b *ByteBuffer) RInt32MInt64() (m map[int32]int64, err *Err) + func (b *ByteBuffer) RInt32s() (v []int32, err *Err) + func (b *ByteBuffer) RInt64() (v int64, err *Err) + func (b *ByteBuffer) RInt64MInt32() (m map[int64]int32, err *Err) + func (b *ByteBuffer) RInt64MInt64() (m map[int64]int64, err *Err) + func (b *ByteBuffer) RInt64s() (v []int64, err *Err) + func (b *ByteBuffer) RInt8() (v int8, err *Err) + func (b *ByteBuffer) RInt8s() (v []int8, err *Err) + func (b *ByteBuffer) RInts() (v []int, err *Err) + func (b *ByteBuffer) RJson(v any) *Err + func (b *ByteBuffer) RMAny(m M) (err *Err) + func (b *ByteBuffer) RMInt32() (m map[string]int32, err *Err) + func (b *ByteBuffer) RMInt64() (m map[string]int64, err *Err) + func (b *ByteBuffer) RMStr() (m MS, err *Err) + func (b *ByteBuffer) RShortString() (v string, err *Err) + func (b *ByteBuffer) RString() (v string, err *Err) + func (b *ByteBuffer) RStringNoLen() (v string) + func (b *ByteBuffer) RStrings() (v []string, err *Err) + func (b *ByteBuffer) RUint16() (v uint16, err *Err) + func (b *ByteBuffer) RUint16MUint16() (m map[uint16]uint16, err *Err) + func (b *ByteBuffer) RUint16s() (v []uint16, err *Err) + func (b *ByteBuffer) RUint32() (v uint32, err *Err) + func (b *ByteBuffer) RUint32s() (v []uint32, err *Err) + func (b *ByteBuffer) RUint64() (v uint64, err *Err) + func (b *ByteBuffer) RUint64s() (v []uint64, err *Err) + func (b *ByteBuffer) RUint8() (v uint8, err *Err) + func (b *ByteBuffer) RUint8s() (v []uint8, err *Err) + func (b *ByteBuffer) RVec2() (v Vec2, err *Err) + func (b *ByteBuffer) RVec2s() (v []Vec2, err *Err) + func (b *ByteBuffer) RVec3() (v Vec3, err *Err) + func (b *ByteBuffer) RVec3s() (v []Vec3, err *Err) + func (b *ByteBuffer) Read(p []byte) (n int, err error) + func (b *ByteBuffer) Reset() + func (b *ByteBuffer) SetPos(v uint32) + func (b *ByteBuffer) ToHex() string + func (b *ByteBuffer) WAny(v any) *Err + func (b *ByteBuffer) WAny2(m map[any]any) (err *Err) + func (b *ByteBuffer) WAnyMAny(m map[any]any) *Err + func (b *ByteBuffer) WBool(v bool) + func (b *ByteBuffer) WBools(v []bool) + func (b *ByteBuffer) WBytes(v []byte) + func (b *ByteBuffer) WErr(err *Err) *Err + func (b *ByteBuffer) WFloat32(v float32) + func (b *ByteBuffer) WFloat32s(v []float32) + func (b *ByteBuffer) WFloat64(v float64) + func (b *ByteBuffer) WFloat64s(v []float64) + func (b *ByteBuffer) WInt(v int) + func (b *ByteBuffer) WInt16(v int16) + func (b *ByteBuffer) WInt16s(v []int16) + func (b *ByteBuffer) WInt32(v int32) + func (b *ByteBuffer) WInt32MInt32(m map[int32]int32) + func (b *ByteBuffer) WInt32MInt64(m map[int32]int64) + func (b *ByteBuffer) WInt32s(v []int32) + func (b *ByteBuffer) WInt64(v int64) + func (b *ByteBuffer) WInt64MInt32(m map[int64]int32) + func (b *ByteBuffer) WInt64MInt64(m map[int64]int64) + func (b *ByteBuffer) WInt64s(v []int64) + func (b *ByteBuffer) WInt8(v int8) + func (b *ByteBuffer) WInt8s(v []int8) + func (b *ByteBuffer) WInts(v []int) + func (b *ByteBuffer) WJson(o any) *Err + func (b *ByteBuffer) WMAny(m M) *Err + func (b *ByteBuffer) WMInt32(m map[string]int32) + func (b *ByteBuffer) WMInt64(m map[string]int64) + func (b *ByteBuffer) WMStr(m MS) + func (b *ByteBuffer) WShortString(v string) + func (b *ByteBuffer) WString(v string) + func (b *ByteBuffer) WStringNoLen(v string) + func (b *ByteBuffer) WStrings(v []string) + func (b *ByteBuffer) WUint16(v uint16) + func (b *ByteBuffer) WUint16MUint16(m map[uint16]uint16) + func (b *ByteBuffer) WUint16s(v []uint16) + func (b *ByteBuffer) WUint32(v uint32) + func (b *ByteBuffer) WUint32s(v []uint32) + func (b *ByteBuffer) WUint64(v uint64) + func (b *ByteBuffer) WUint64s(v []uint64) + func (b *ByteBuffer) WUint8(v uint8) + func (b *ByteBuffer) WUint8s(v []uint8) + func (b *ByteBuffer) WVec2(v Vec2) + func (b *ByteBuffer) WVec2s(v []Vec2) + func (b *ByteBuffer) WVec3(v Vec3) + func (b *ByteBuffer) WVec3s(v []Vec3) + func (b *ByteBuffer) Write(v []byte) (int, error) + func (b *ByteBuffer) WriteTo(writer io.Writer) (n int, err error) + type BytesAnyToErr func([]byte, any) *Err + type BytesAnyToError func([]byte, any) error + type BytesToAnyErr func([]byte) (any, *Err) + type BytesToBytes func([]byte) []byte + type BytesToErr func([]byte) *Err + type BytesToInt642Err func([]byte) (int64, int64, *Err) + type BytesToM func([]byte) M + type BytesToUint16 func([]byte) uint16 + type BytesToUint32 func([]byte) uint32 + type CmdHandler func(T, any) *Err + type Command struct + func Cmd() *Command[M] + func NewCommand[T any](data T) *Command[T] + func (c *Command[T]) Bind(name string, handler CmdHandler[T]) + func (c *Command[T]) Data() T + func (c *Command[T]) Process(name string, data any) *Err + func (c *Command[T]) Unbind(name string) bool + type Compare func(v1, v2 T) int + type Counter struct + func NewCounter(total uint32) *Counter + func SpawnCounter(total uint32) *Counter + func (c *Counter) Add(v uint32) (uint32, bool) + func (c *Counter) Count() uint32 + func (c *Counter) Reset(total uint32) + func (c *Counter) Total() uint32 + type Enable struct + Mtx sync.RWMutex + func NewEnable() *Enable + func (e *Enable) Disable(fn FnAnySlc, params ...any) bool + func (e *Enable) Disabled() bool + func (e *Enable) Enable(fn FnAnySlc, params ...any) bool + func (e *Enable) IfDisable(fn Fn) (ok bool) + func (e *Enable) IfEnable(fn Fn) (ok bool) + func (e *Enable) RAction(fn FnAnySlc, params ...any) *Err + func (e *Enable) WAction(fn FnAnySlc, params ...any) *Err + func (e *Enable) WAction2(fn Fn) *Err + type Err struct + func CheckLocalIp(ip string) (string, *Err) + func GetCpuPercent() (float64, *Err) + func GetLocalIp() (string, *Err) + func JsonMarshal(o any) ([]byte, *Err) + func JsonMarshalIndent(o any, prefix, indent string) ([]byte, *Err) + func JsonUnmarshal(bytes []byte, o any) *Err + func NewErr(code TErrCode, params M) *Err + func NewErrWithStack(code TErrCode, stack []byte, params M) *Err + func NewM(bytes []byte, m M) *Err + func NewNoStackErr(code TErrCode, params M) *Err + func ParseAddrPort(addr string) (int, *Err) + func ParseInt[T Num](s string) (v T, err *Err) + func SplitInt64(sep, str string) ([]int64, *Err) + func SplitUint16(sep, str string) ([]uint16, *Err) + func WrapErr(code TErrCode, e error) *Err + func (e *Err) AddParam(k string, v any) + func (e *Err) AddParams(params M) + func (e *Err) Code() TErrCode + func (e *Err) Error() string + func (e *Err) GetParam(k string) (v any, ok bool) + func (e *Err) IsNoStack() bool + func (e *Err) Params() M + func (e *Err) Stack() []byte + func (e *Err) String() string + func (e *Err) ToBytes() []byte + func (e *Err) UpdateParam(k string, action AnyBoolToAnyBool) + type Fn func() + func (f Fn) Invoke() + type FnAny func(any) + type FnAnyErr func(any, *Err) + type FnAnySlc func([]any) + type FnAnySlc2 func(...any) + type FnBool func(bool) + type FnBoolErr func(bool, *Err) + type FnBytes func([]byte) + type FnBytesSlc func([][]byte) + type FnErr func(*Err) + func (f FnErr) Invoke(err *Err) + type FnInt func(int) + type FnInt32 func(int32) + type FnInt64 func(int64) + func (f FnInt64) Invoke(v int64) + type FnInt642 func(int64, int64) + func (f FnInt642) Invoke(v1, v2 int64) + type FnInt642Any func(int64, int64, any) + type FnInt642Bool func(int64, int64, bool) + type FnInt642Err func(int64, int64, *Err) + type FnInt643 func(int64, int64, int64) + type FnInt64Any func(int64, any) + func (f FnInt64Any) Invoke(v int64, obj any) + type FnInt64Bool func(int64, bool) + type FnInt64Bytes func(int64, []byte) + type FnInt64Err func(int64, *Err) + func (f FnInt64Err) Invoke(v int64, err *Err) + type FnInt64M func(int64, M) + type FnInt64MBytes func(int64, M, []byte) + type FnInt64MErr func(int64, M, *Err) + func (f FnInt64MErr) Invoke(v int64, head M, err *Err) + type FnInt64MMsg func(int64, M, IMsg) + func (f FnInt64MMsg) Invoke(v int64, head M, obj IMsg) + type FnInt64MUint16 func(int64, M, uint16) + type FnInt64Str func(int64, string) + func (f FnInt64Str) Invoke(v int64, str string) + type FnInt64StrBool func(int64, string, bool) + type FnIntAnySlc func(int, []any) + type FnIntAnySlc2 func(int, []any, []any) + type FnM func(M) + type FnM2Bool func(M, M, bool) + type FnMAny func(M, any) + type FnMBool func(M, bool) + type FnMErr func(M, *Err) + type FnMUint32 func(M, uint32) + type FnMapBool func(map[string]bool) + type FnMsg func(IMsg) + type FnStr func(string) + func (f FnStr) Invoke(str string) + type FnStr2Bool func(string, string, bool) + type FnStrAny func(string, any) + type FnStrBool func(string, bool) + type FnStrBytes func(string, []byte) + type FnStrErr func(string, *Err) + type FnStrFn func(string, Fn) + type FnStrSlc func([]string) + type FnUint16 func(uint16) + type FnUint162Int642Bytes func(uint16, uint16, int64, int64, []byte) + type FnUint16Bool func(uint16, bool) + type FnUint16Bytes func(uint16, []byte) + type FnUint16Err func(uint16, *Err) + type FnUint16Int642Bytes func(uint16, int64, int64, []byte) + type FnUint32 func(uint32) + type IMsg interface + ProtoReflect func() protoreflect.Message + type Id interface + type Int64AnyToBool func(int64, any) bool + type Int64ToBool func(int64) bool + type Int64ToErrCode func(int64) TErrCode + type Int64ToInt64 func(int64) int64 + type Int64ToInt64Err func(int64) (int64, *Err) + type Int64ToStr func(int64) string + type Int64ToStrErr func(int64) (string, *Err) + type M map[string]any + func (m M) Copy(toM M) M + func (m M) CopyTo(n M) + func (m M) Del(key string) + func (m M) FromBytes(bytes []byte) *Err + func (m M) FromGob(bytes []byte) *Err + func (m M) FromJson(bytes []byte) *Err + func (m M) Get(key string) (any, bool) + func (m M) Has(key string) (ok bool) + func (m M) IndentJson() []byte + func (m M) MustGet(key string, def any) any + func (m M) Replace(key string, val any) (oldVal any, ok bool) + func (m M) Set(key string, val any) + func (m M) Set2(val any, keys ...string) *Err + func (m M) ToBytes() ([]byte, *Err) + func (m M) ToGob() ([]byte, *Err) + func (m M) ToJson() ([]byte, *Err) + func (m M) ToSlice(slc *[]any) + func (m M) Update(key string, action AnyToAny) (ok bool) + type M32 map[string]int32 + type M64 map[string]int64 + type MF32 map[string]float32 + type MF64 map[string]float64 + type MS map[string]string + type MToAny func(M) any + type MToBool func(M) bool + type MToBytes func(M) []byte + type MToErr func(M) *Err + type MToInt64 func(M) int64 + type Num interface + type Pool struct + func NewPool[T any](opts ...PoolOption[T]) *Pool[T] + func (p *Pool[T]) Push(value T) + func (p *Pool[T]) Shift() (v T) + type PoolOption func(o *poolOption[T]) + func PoolMaxCap[T any](c int) PoolOption[T] + func PoolMinCap[T any](c int) PoolOption[T] + func PoolSpawn[T any](spawn func() T) PoolOption[T] + type Str162ErrToBytesErr func(string, string, *Err) ([]byte, *Err) + type Str2BytesToBytesErr func(string, string, []byte) ([]byte, *Err) + type Str2Int64ToBoolBytes func(string, string, int64) (bool, *Err) + type StrAnyToErr func(string, any) *Err + type StrBytesToBool func(string, []byte) bool + type StrFnToErr func(string, Fn) *Err + type StrInt64ToBool func(string, int64) *Err + type StrIntToBool func(string, int) *Err + type StrToBool func(string) bool + type StrToBytesErr func(string) ([]byte, *Err) + type StrToStr func(string) string + type StrToStr2Err func(string) (string, string, *Err) + type TErrCode = uint16 + const EcAcceptErr + const EcAddrErr + const EcBadHead + const EcBadPacket + const EcBusy + const EcClosed + const EcConnectErr + const EcDbErr + const EcEmpty + const EcEtcdErr + const EcExist + const EcFail + const EcIllegalConn + const EcIllegalOp + const EcIo + const EcLengthErr + const EcListenErr + const EcMarshallErr + const EcMin + const EcNil + const EcNoAuth + const EcNotEnough + const EcNotExist + const EcNotExistAgent + const EcNotImplement + const EcOpened + const EcOutOfRange + const EcParamsErr + const EcParseErr + const EcReceiveErr + const EcRecover + const EcRedisErr + const EcSendErr + const EcServiceErr + const EcTimeout + const EcTooLong + const EcTooManyConn + const EcTooMuch + const EcTooSlow + const EcType + const EcUnavailable + const EcUnmarshallErr + const EcWriteFail + const EcWrongType + type ToAny func() any + type ToBool func() bool + type ToErr func() *Err + type ToErrCode func() TErrCode + type ToFnInt64Fn func() FnStrFn + type ToInt64 func() int64 + type ToM func() M + type ToMsg func() IMsg + type ToStr func() string + type ToStrBool func() (string, bool) + type Tuple2 struct + Item1 T1 + Item2 T2 + type Tuple3 struct + Item1 T1 + Item2 T2 + Item3 T3 + type Tuple4 struct + Item1 T1 + Item2 T2 + Item3 T3 + Item4 T4 + type Tuple5 struct + Item1 T1 + Item2 T2 + Item3 T3 + Item4 T4 + Item5 T5 + type Uint16Int64ToUint16 func(uint16, int64) uint16 + type Uint16ToBool func(uint16) bool + type Vec2 struct + X float32 + Y float32 + func PointToSegNearPoint(p, a, b Vec2) Vec2 + func PointToVecNearPoint(p, a, b Vec2) Vec2 + func RandDir() Vec2 + func RandRange(center Vec2, radius float32) Vec2 + func Vec2Add(a, b Vec2) Vec2 + func Vec2Clamp(v, min, max Vec2) Vec2 + func Vec2Div(a Vec2, v float32) Vec2 + func Vec2Lerp(a, b Vec2, v float32) Vec2 + func Vec2Mul(a Vec2, v float32) Vec2 + func Vec2Normalize(v Vec2) Vec2 + func Vec2One() Vec2 + func Vec2Rotate(a Vec2, radian float32) Vec2 + func Vec2Rotate180(v Vec2) Vec2 + func Vec2Rotate270(a Vec2) Vec2 + func Vec2Rotate90(a Vec2) Vec2 + func Vec2Sub(a, b Vec2) Vec2 + func Vec2XRebound(a, b Vec2, bound float32) (Vec2, bool) + func Vec2YRebound(a, b Vec2, bound float32) (Vec2, bool) + type Vec2Int struct + X int32 + Y int32 + func (v Vec2Int) Equal(v1 Vec2Int) bool + type Vec3 struct + X float32 + Y float32 + Z float32 + func Vec3One() Vec3