-
Notifications
You must be signed in to change notification settings - Fork 51
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improves readability in HeightMapRenderObjClass::Update_Center #926
base: develop
Are you sure you want to change the base?
Conversation
2f4bc96
to
98cd3e5
Compare
Codecov ReportPatch coverage has no change and project coverage change:
❗ Your organization is not using the GitHub App Integration. As a result you may experience degraded service beginning May 15th. Please install the Github App Integration for your organization. Read more. Additional details and impacted files@@ Coverage Diff @@
## develop #926 +/- ##
==========================================
- Coverage 3.03% 2.97% -0.07%
==========================================
Files 802 803 +1
Lines 78769 80343 +1574
Branches 13351 13764 +413
==========================================
- Hits 2390 2387 -3
- Misses 76036 77613 +1577
Partials 343 343
☔ View full report in Codecov by Sentry. |
98cd3e5
to
709f055
Compare
min_x = m_map->Border_Size() + min_x; | ||
max_x = m_map->Border_Size() + max_x; | ||
min_y = m_map->Border_Size() + min_y; | ||
max_y = m_map->Border_Size() + max_y; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Or +=
min_x = min_x / 10.0f; | ||
max_x = max_x / 10.0f; | ||
min_y = min_y / 10.0f; | ||
max_y = max_y / 10.0f; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Or /=
} else { | ||
i6 = i6 + m_x - 1; | ||
x_start_tile = x_start_tile + m_x - 1; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Or +=
i6 -= i1; | ||
i7 += i1; | ||
x_start_tile -= increment; | ||
x_end_tile += increment; | ||
|
||
if (m_originX < 0) { | ||
m_originX = m_originX + m_x - 1; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Or +=
} else { | ||
i4 = i4 + m_y - 1; | ||
y_start_tile = y_start_tile + m_y - 1; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Or +=
float x_dist = viewport_max.X - viewport_min.X; | ||
float y_dist = viewport_max.Y - viewport_min.Y; | ||
float scale_factor = -1.0f; | ||
float min_x = 200000.0f; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Right now there is
x_dist
min_x
among others.
Perhaps it makes sense to name those x,y variables in consistent order?
Perhaps x,y always at the end of the name?
|
||
float z = max_height; | ||
Vector2 viewport_min; | ||
Vector2 viewport_max; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Perhaps just view_max
for short.
Vector2 viewport_max; | ||
camera->Get_View_Plane(viewport_min, viewport_max); | ||
float x_dist = viewport_max.X - viewport_min.X; | ||
float y_dist = viewport_max.Y - viewport_min.Y; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Perhaps this variable can still retain view
in it.
No description provided.