aboutsummaryrefslogtreecommitdiff
path: root/src/engine/maths.c
blob: ebd699c9095652240b97d37da7849e4c4ae43eae (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#include "engine/maths.h"

vec_cor vec_cen2cor(vec_cen in, vec2 halfDistance){
	return (vec_cor){
		.x = in.x - halfDistance.x,
		.y = in.y - halfDistance.y,
	};
}

vec_cen vec_cor2cen(vec_cor in, vec2 halfDistance){
	return (vec_cen){
		.x = in.x + halfDistance.x,
		.y = in.y + halfDistance.y,
	};
}