Xkonti / govec

Go library providing 2D and 3D vector operations
MIT License
6 stars 7 forks source link

Implement `Rand` operation #20

Open Xkonti opened 1 year ago

Xkonti commented 1 year ago

Generates a normal vector with random components. Available only for float types. Make sure vector is normalized.

vec1 := govec.RandV2F[float64]()
vec2 := govec.RandV2F[float32]()
vec3 := govec.RandV3F[float64]()
vec4 := govec.RandV3F[float32]()
GalihFajar commented 1 year ago

Hi @Xkonti, I've made a PR that addresses this issue. Could you please take a look? Thanks!