Xkonti / govec

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

Implement `ClampLen` operation #2

Closed Xkonti closed 1 year ago

Xkonti commented 1 year ago

This operation clamps vector's length between specified values. This will basically scale the vector up or down in case it's length is too great or too little. Integer vectors will be converted into a float64 variant.

vec1.ClampLen(min, max)