Part of a fork of @toji's
gl-matrix to c, split into smaller pieces: this
package contains glMatrix.vec4.
main.c
#include <vec4/create.h>
int main() {
vec4 v4 = vec4_create();
return 0;
}compiled with gcc main.c -o main -Inode_modules/vec4.c/include
CMakeLists.txt
cmake_minimum_required(VERSION 3.2)
project (vec4-test)
file(GLOB CMAKE_INCLUDES "node_modules/*/CMakeLists.txt")
include(${CMAKE_INCLUDES})
add_executable(main main.c)- vec4_add()
- vec4_clone()
- vec4_copy()
- vec4_create()
- vec4_distance()
- vec4_divide()
- vec4_dot()
- vec4_fromValues()
- vec4_inverse()
- vec4_length()
- vec4_lerp()
- vec4_max()
- vec4_min()
- vec4_multiply()
- vec4_negate()
- vec4_normalize()
- vec4_random()
- vec4_scale()
- vec4_scaleAndAdd()
- vec4_set()
- vec4_squaredDistance()
- vec4_squaredLength()
- vec4_subtract()
- vec4_transformMat4()
- vec4_transformQuat()
Adds two vec4's
Creates a new vec4 initialized with values from an existing vector
Copy the values from one vec4 to another
Creates a new, empty vec4
Calculates the euclidian distance between two vec4's
Divides two vec4's
Calculates the dot product of two vec4's
Creates a new vec4 initialized with the given values
Returns the inverse of the components of a vec4
Calculates the length of a vec4
Performs a linear interpolation between two vec4's
Returns the maximum of two vec4's
Returns the minimum of two vec4's
Multiplies two vec4's
Negates the components of a vec4
Normalize a vec4
Generates a random vector with the given scale
Scales a vec4 by a scalar number
Adds two vec4's after scaling the second operand by a scalar value
Set the components of a vec4 to the given values
Calculates the squared euclidian distance between two vec4's
Calculates the squared length of a vec4
Subtracts vector b from vector a
Transforms the vec4 with a mat4.
Transforms the vec4 with a quat
MIT. See LICENSE.md for details.