fixed to fix and some more
This commit is contained in:
@@ -31,18 +31,19 @@ extern int plr_display_x11_main(int argc, char *argv[]) {
|
||||
com_mat_t m0 = com_mat_identity();
|
||||
com_mat_t m1 = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16};
|
||||
for (int i = 0; i < 16; ++i)
|
||||
m1.a[i] *= COM_FIXED_FRACUNIT;
|
||||
m1.a[i] *= COM_FIX_FRACUNIT;
|
||||
|
||||
com_mat_t t0 = com_mat_mul(m1, m0);
|
||||
com_mat_t t1 = com_mat_mul_reodered(com_mat_reoder(m1), m0);
|
||||
com_fixed_print(t0.a[4]);
|
||||
com_fixed_print(t1.a[4]);
|
||||
com_fix_print(t0.a[4]);
|
||||
com_fix_print(t1.a[4]);
|
||||
|
||||
com_vec_t v0 = com_mat_vec_project(com_mat_reoder(m0), com_vec_identity());
|
||||
com_fixed_print(v0.a[0]);
|
||||
// com_vec_t v0 = com_mat_vec_project(com_mat_reoder(m0), com_vec_identity());
|
||||
// com_fix_print(v0.a[0]);
|
||||
|
||||
com_fixed_run_tests();
|
||||
com_fixed_run_bench();
|
||||
com_fix_run_tests();
|
||||
com_fix_run_bench();
|
||||
com_mat_run_bench();
|
||||
|
||||
Display *display = XOpenDisplay(NULL);
|
||||
if (NULL == display) {
|
||||
|
||||
+2
-2
@@ -1,10 +1,10 @@
|
||||
CC=clang
|
||||
# todo: Only link to libm on debug.
|
||||
CFLAGS=-lX11 -Wall -std=c99 -g3 -O3 -msse2 -lm
|
||||
DEPS = ../Common/lzw.h ../Common/mat.h ../Common/vec.h ../Common/fixed.h ../Common/def.h ../Common/bits.h \
|
||||
DEPS = ../Common/lzw.h ../Common/mat.h ../Common/vec.h ../Common/fix.h ../Common/def.h ../Common/bits.h \
|
||||
../Common/Timer/timer.h \
|
||||
./Display/display.h
|
||||
OBJ = ../Common/lzw.o ../Common/fixed.o
|
||||
OBJ = ../Common/lzw.o ../Common/fix.o ../Common/mat.o
|
||||
LINUX = main.o Display/x11.o ../Common/Timer/unix.o
|
||||
DOS = maindos.c Display/dos.c
|
||||
|
||||
|
||||
Reference in New Issue
Block a user