#define LAL_IMPL
#include "lal.h"
int main(){
Mat mat = mat_alloc(2, 2);
mat_put(mat, (double[]){2,0,0,1}, 4);
Vec pos = vec_alloc(2);
vec_put(pos, (double[]){1, 1}, 2);
printf("Transformation matrix:\n");
mat_print(mat);
printf("\n");
printf("Posizion vector:\n");
vec_print(pos);
printf("\n");
printf("Transformed position:\n");
vec_print(lal_vec_transform(pos, mat));
printf("\n");
Vec vecs[] = {
pos,
pos,
pos,
pos,
};
Vec* result = lal_vecs_transform(vecs, 4, mat);
for(ll i = 0; i < 4; i++){
vec_print(result[i]);
}
return 0;
}
make
./main.exe
my Vec library.
my Mat library.