add vector

This commit is contained in:
chatlanin
2022-03-24 16:16:45 +03:00
parent 94b734647e
commit 3cfd5bec03
10 changed files with 97 additions and 63 deletions

View File

@@ -10,8 +10,8 @@
#include "range/range.hpp"
#include "container/container.hpp"
#include "logger/logger.hpp"
#include "matrix/matrix.hpp"
#include "vector/vector.hpp"
#include "math/matrix.hpp"
#include "math/vector.hpp"
#include <string_view>
@@ -110,7 +110,23 @@ int main(int argc, char *argv[])
// }
{// ex: vector
hack::vector<int, int, int> v3 { 1, 2, 3, };
hack::log()(v3.get_value());
hack::vector<int, int, int> v3_1 { 8, 4, 9, };
hack::vector<int, int, int> v3_2 { 1, 2, 3, };
hack::log()(v3_1.get_value());
hack::log()(v3_2.get_value());
v3_1 = v3_2;
hack::log()(v3_1.get_value());
hack::log()(v3_2.get_value());
hack::log()("length 3", v3_2.length());
hack::vector<int, int> v2_1 { 11, 22 };
hack::log()("length 2", v2_1.length());
hack::vector<int, int, int> lerp_1 { 1, 2, 3 };
hack::vector<int, int, int> lerp_2 { 5, 6, 7 };
hack::log()("lerp", lerp_1.lerp(lerp_2, 0.75f));
}
}

View File

@@ -6,8 +6,7 @@ deps += string_dep
deps += range_dep
deps += container_dep
deps += logger_dep
deps += vector_dep
deps += matrix_dep
deps += math_dep
executable(
'hack', 'main.cpp',