diff options
author | Leo Tenenbaum <pommicket@gmail.com> | 2021-01-28 15:44:16 -0500 |
---|---|---|
committer | Leo Tenenbaum <pommicket@gmail.com> | 2021-01-28 15:44:16 -0500 |
commit | 5b90057859cd38b284573460460ab27bd108aa0e (patch) | |
tree | 4b9ac2e17b8eb8f3cc6c3ac042327226b509cccc /math.c | |
parent | aea002f290e5eddde98eb394fa7a9145c325fffe (diff) |
finished warn on overwrite
Diffstat (limited to 'math.c')
-rw-r--r-- | math.c | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -195,6 +195,10 @@ static v2 v2_mul(v2 a, v2 b) { return V2(a.x * b.x, a.y * b.y); } +static v2 v2_clamp(v2 x, v2 a, v2 b) { + return V2(clampf(x.x, a.x, b.x), clampf(x.y, a.y, b.y)); +} + static float v2_dot(v2 a, v2 b) { return a.x * b.x + a.y * b.y; } |