1
0
Fork 0
mirror of https://git.coom.tech/drummyfish/small3dlib.git synced 2024-11-24 21:09:57 +01:00

Improve vec3Xmat4

This commit is contained in:
Miloslav Číž 2019-05-16 23:50:03 +02:00
parent e31a837e57
commit f3817882b0

6
s3l.h
View file

@ -382,6 +382,12 @@ void S3L_vec3Xmat4(S3L_Vec4 *v, S3L_Mat4 *m)
{ {
S3L_Vec4 vBackup; S3L_Vec4 vBackup;
#define dotCol(col)\
(vBackup.x * (*m)[col][0]) / S3L_FRACTIONS_PER_UNIT +\
(vBackup.y * (*m)[col][1]) / S3L_FRACTIONS_PER_UNIT +\
(vBackup.z * (*m)[col][2]) / S3L_FRACTIONS_PER_UNIT +\
(*m)[col][3]
vBackup.x = v->x; vBackup.x = v->x;
vBackup.y = v->y; vBackup.y = v->y;
vBackup.z = v->z; vBackup.z = v->z;