vectors_litemath
v2.1.1
Published
simple library with vec2, vec3 and vec4 used for the graphic
Downloads
2
Readme
Vectors lib
Simple lib implementing vec2, vec3, vec4 from Litemath (C++)
Don't want to write shaders in webgl/webgpu, but want to render something in canvas? This simple library provides some vectors and functions you can work with
Functions
Added some functions to work with vectors, maybe it will be updated later...
Current list of functions:
- add(vector, vector) / add(vector, number) / add(number, vector)
- sub(vector, vector) / sub(vector, number) / sub(number, vector)
- mul(vector, vector) / mul(vector, number) / mul(number, vector)
- div(vector, vector) / div(vector, number) / div(number, vector)
- greater(vector, vector)
- less(vector, vector)
- greaterOrEqual(vector, vector)
- lessOrEqual(vector, vector)
- equal(vector, vector)
- notEqual(vector, vector)
- min(vector, vector)
- max(vector, vector)
- clamp(vector, vector, vector) / clampVec(vector, number, number)
- abs(vector)
- lerp(vector, vector, number)
- mix(vector, vector, number)
- sqrt(vector)
- dot(vector, vector)
- lengthVec(vector)
- normalize(vector)