diff options
author | hop311 <hop3114@gmail.com> | 2024-04-20 23:28:36 +0200 |
---|---|---|
committer | hop311 <hop3114@gmail.com> | 2024-04-20 23:30:06 +0200 |
commit | acad20f397b818a124890ae18ee59c4be5bd718d (patch) | |
tree | d8f3beec1a8fa98908f24c2e5da93fc064926182 /extension/src/openvic-extension/utility | |
parent | 1ab95a6827c1525d0b48d6d28205f0b1e512bd9d (diff) |
Update openvic-simulation to OpenVicProject/OpenVic-Simulation@8f97145
Diffstat (limited to 'extension/src/openvic-extension/utility')
-rw-r--r-- | extension/src/openvic-extension/utility/Utilities.hpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/extension/src/openvic-extension/utility/Utilities.hpp b/extension/src/openvic-extension/utility/Utilities.hpp index f39be3e..f7a0d67 100644 --- a/extension/src/openvic-extension/utility/Utilities.hpp +++ b/extension/src/openvic-extension/utility/Utilities.hpp @@ -41,11 +41,15 @@ namespace OpenVic::Utilities { return { colour.redf(), colour.greenf(), colour.bluef(), colour.alphaf() }; } - _FORCE_INLINE_ godot::Vector2i to_godot_ivec2(ivec2_t vec) { + _FORCE_INLINE_ godot::Vector2i to_godot_ivec2(ivec2_t const& vec) { return { vec.x, vec.y }; } - _FORCE_INLINE_ godot::Vector2 to_godot_fvec2(fvec2_t vec) { + _FORCE_INLINE_ godot::Vector2 to_godot_fvec2(fvec2_t const& vec) { + return { vec.x, vec.y }; + } + + _FORCE_INLINE_ ivec2_t from_godot_ivec2(godot::Vector2i const& vec) { return { vec.x, vec.y }; } |