From 898760e938db7f7bf59bdab4d4e693bcdadaa1f2 Mon Sep 17 00:00:00 2001 From: Brett Date: Fri, 12 Apr 2024 00:03:56 -0400 Subject: [PATCH] allow access to vector data insides --- CMakeLists.txt | 2 +- include/blt/math/vectors.h | 10 ++++++++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 1e3df96..5da682f 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.16.8) +set(BLT_VERSION 0.16.9) set(BLT_TEST_VERSION 0.0.1) set(BLT_TARGET BLT) diff --git a/include/blt/math/vectors.h b/include/blt/math/vectors.h index 73f01b8..b3e29c9 100644 --- a/include/blt/math/vectors.h +++ b/include/blt/math/vectors.h @@ -232,6 +232,16 @@ namespace blt return (du / dv) * v; } + inline auto* data() + { + return elements; + } + + [[nodiscard]] inline const auto* data() const + { + return elements; + } + auto begin() { return elements.begin();