matrix functions for vec2 operations, defaults are logically assumed.

v1
Brett 2024-05-13 21:31:05 -04:00
parent 9c0fc81969
commit 12169a7001
2 changed files with 7 additions and 1 deletions

View File

@ -1,7 +1,7 @@
cmake_minimum_required(VERSION 3.20)
include(cmake/color.cmake)
set(BLT_VERSION 0.17.6)
set(BLT_VERSION 0.17.7)
set(BLT_TEST_VERSION 0.0.1)
set(BLT_TARGET BLT)

View File

@ -137,6 +137,9 @@ namespace blt
inline mat4x4& translate(const vec3& vec)
{ return translate(vec[0], vec[1], vec[2]); }
inline mat4x4& translate(const vec2& vec)
{ return translate(vec[0], vec[1], 0); }
inline mat4x4& scale(float x, float y, float z)
{
mat4x4 scale_mat{};
@ -156,6 +159,9 @@ namespace blt
inline mat4x4& scale(const vec3& vec)
{ return scale(vec[0], vec[1], vec[2]); }
inline mat4x4& scale(const vec2& vec)
{ return scale(vec[0], vec[1], 1.0f); }
// angle in radians
inline mat4x4& rotateX(float angle)
{