Fix AABB calculation (#1971)

This commit is contained in:
Cesar Guirao 2021-11-02 14:23:11 -07:00 committed by GitHub
parent dfa52de90d
commit c92bca135f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -198,10 +198,10 @@ float SkeletonBounds::getHeight() {
} }
void SkeletonBounds::aabbCompute() { void SkeletonBounds::aabbCompute() {
float minX = FLT_MIN; float minX = FLT_MAX;
float minY = FLT_MIN; float minY = FLT_MAX;
float maxX = FLT_MAX; float maxX = FLT_MIN;
float maxY = FLT_MAX; float maxY = FLT_MIN;
for (size_t i = 0, n = _polygons.size(); i < n; ++i) { for (size_t i = 0, n = _polygons.size(); i < n; ++i) {
spine::Polygon *polygon = _polygons[i]; spine::Polygon *polygon = _polygons[i];