diff --git a/CMakeLists.txt b/CMakeLists.txt index bbfe301..68ad50d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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) diff --git a/include/blt/math/matrix.h b/include/blt/math/matrix.h index 526adbb..62fbf53 100644 --- a/include/blt/math/matrix.h +++ b/include/blt/math/matrix.h @@ -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) {