From 112de0ac9c7ce26bd75d06e4cd3bc91adee716e3 Mon Sep 17 00:00:00 2001 From: Spartan322 Date: Sun, 23 Apr 2023 23:36:42 -0400 Subject: Support features up to clang-format 14 Add .editorconfig Update C++ files within `extension/src` to follow .clang-format --- extension/src/MapMesh.cpp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'extension/src/MapMesh.cpp') diff --git a/extension/src/MapMesh.cpp b/extension/src/MapMesh.cpp index 6d94973..84149b9 100644 --- a/extension/src/MapMesh.cpp +++ b/extension/src/MapMesh.cpp @@ -69,8 +69,8 @@ int32_t MapMesh::get_subdivide_depth() const { } AABB MapMesh::get_core_aabb() const { - const Vector3 size{ aspect_ratio, 0.0f, 1.0f }; - return AABB{ size * -0.5f, size }; + const Vector3 size { aspect_ratio, 0.0f, 1.0f }; + return AABB { size * -0.5f, size }; } bool MapMesh::is_valid_uv_coord(godot::Vector2 const& uv) const { @@ -96,15 +96,15 @@ Array MapMesh::_create_mesh_array() const { uvs.resize(vertex_count); indices.resize(indice_count); - static const Vector3 normal{ 0.0f, 1.0f, 0.0f }; - const Size2 uv_size{ 1.0f + 2.0f * repeat_proportion, 1.0f }; - const Size2 size{ aspect_ratio * uv_size.x, uv_size.y }, start_pos = size * -0.5f; + static const Vector3 normal { 0.0f, 1.0f, 0.0f }; + const Size2 uv_size { 1.0f + 2.0f * repeat_proportion, 1.0f }; + const Size2 size { aspect_ratio * uv_size.x, uv_size.y }, start_pos = size * -0.5f; int32_t point_index = 0, thisrow = 0, prevrow = 0, indice_index = 0; - Vector2 subdivide_step{ 1.0f / (subdivide_w + 1.0f) , 1.0f / (subdivide_d + 1.0f) }; - Vector3 point{ 0.0f, 0.0f, start_pos.y }; + Vector2 subdivide_step { 1.0f / (subdivide_w + 1.0f), 1.0f / (subdivide_d + 1.0f) }; + Vector3 point { 0.0f, 0.0f, start_pos.y }; Vector2 point_step = subdivide_step * size; - Vector2 uv{}, uv_step = subdivide_step * uv_size; + Vector2 uv {}, uv_step = subdivide_step * uv_size; for (int32_t j = 0; j <= subdivide_d + 1; ++j) { point.x = start_pos.x; -- cgit v1.2.3-56-ga3b1