constraints for text. added rotation constraint and rotate around center of elements

This commit is contained in:
2023-11-22 01:29:21 +02:00
parent 9a0b298465
commit 41592696e4
6 changed files with 105 additions and 60 deletions
+3 -3
View File
@@ -1,12 +1,12 @@
#pragma once
typedef struct {
float m[4][4];
} Matrix4x4;
#include "z_math.h"
Matrix4x4 identity();
void mult_4x4(Matrix4x4 *multiplicant, Matrix4x4 *multiplier);
void apply_scale(Matrix4x4 *matrix, Sizef scale);
void apply_rotation(Matrix4x4 *model, float angle);
void apply_translation(Matrix4x4 *matrix, Vec2f pos);
Matrix4x4 orthographic_projection_2d(float left, float right, float bottom, float top);
int max(int a, int b);
float maxf(float a, float b);