Skip to content

Commit

Permalink
Round character height to nearest integer (#53520)
Browse files Browse the repository at this point in the history
  • Loading branch information
BrettDong authored Dec 17, 2021
1 parent d0422db commit 9c06314
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/character.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5923,7 +5923,7 @@ int Character::height() const
const double base_height_deviation = base_height() / static_cast< double >
( Character::default_height() );
const HeightLimits &limits = size_category_height_limits.at( get_size() );
return clamp<int>( base_height_deviation * limits.base_height,
return clamp<int>( std::round( base_height_deviation * limits.base_height ),
limits.min_height, limits.max_height );
}

Expand Down

0 comments on commit 9c06314

Please sign in to comment.