Use explicit coord type in GetClampedCoords.

This commit is contained in:
Alex 2023-01-16 19:41:58 +05:00
parent 3d6045a7c8
commit 2f0dee40ea
1 changed files with 1 additions and 1 deletions

View File

@ -150,7 +150,7 @@ template <typename in_type, typename ret_type = in_type, typename pad_type = uns
typename = typename std::enable_if<std::is_unsigned<pad_type>::value>::type> typename = typename std::enable_if<std::is_unsigned<pad_type>::value>::type>
VECTOR2<ret_type> GetClampedCoords( const VECTOR2<in_type>& aCoords, pad_type aPadding = 1u ) VECTOR2<ret_type> GetClampedCoords( const VECTOR2<in_type>& aCoords, pad_type aPadding = 1u )
{ {
typedef std::numeric_limits<int> coord_limits; typedef std::numeric_limits<int32_t> coord_limits;
long long max = static_cast<long long>( coord_limits::max() ) - aPadding; long long max = static_cast<long long>( coord_limits::max() ) - aPadding;
long long min = -max; long long min = -max;