Skip to content

Commit

Permalink
Update main.c
Browse files Browse the repository at this point in the history
r.slope.aspect: correct rounding of aspect for negative numbers
  • Loading branch information
metzm committed Jan 31, 2020
1 parent 37a1b9b commit fdd079c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion raster/r.slope.aspect/main.c
Expand Up @@ -811,7 +811,7 @@ int main(int argc, char *argv[])
if (out_type == CELL_TYPE) {
if (aspect > 0 && aspect < 0.5)
aspect = 360;
*((CELL *) asp_ptr) = (CELL) (aspect + .5);
*((CELL *) asp_ptr) = (CELL) floor(aspect + .5);
}
else
Rast_set_d_value(asp_ptr,
Expand Down

0 comments on commit fdd079c

Please sign in to comment.