Skip to content

Commit

Permalink
Replace Integer With Boolean
Browse files Browse the repository at this point in the history
  • Loading branch information
LegalizeAdulthood committed Feb 16, 2025
1 parent 7522270 commit 0d1e2a9
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions libid/3d/plot3d.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -70,10 +70,10 @@ void draw_line(int x1, int y1, int x2, int y2, int color)

int dx = x2 - x1; // find vector components
int dy = y2 - y1;
char pos_slope = dx > 0; // is slope positive?
bool pos_slope = dx > 0; // is slope positive?
if (dy < 0)
{
pos_slope = (char)!pos_slope;
pos_slope = !pos_slope;
}
if (std::abs(dx) > std::abs(dy)) // shallow line case
{
Expand Down
4 changes: 2 additions & 2 deletions libid/engine/sticky_orbits.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -56,10 +56,10 @@ int sticky_orbits()
int inc2; // G increment when row or column changes
int dx = g_i_x_stop - g_i_x_start; // find vector components
int dy = g_i_y_stop - g_i_y_start;
char pos_slope = dx > 0; // is slope positive?
bool pos_slope = dx > 0; // is slope positive?
if (dy < 0)
{
pos_slope = (char)!pos_slope;
pos_slope = !pos_slope;
}
if (std::abs(dx) > std::abs(dy)) // shallow line case
{
Expand Down

0 comments on commit 0d1e2a9

Please sign in to comment.