Skip to content

Commit 76e012c

Browse files
committed
replaced min call with ternary operations
1 parent 492bd22 commit 76e012c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src_c/transform.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4260,8 +4260,8 @@ pixelate(pgSurfaceObject *srcobj, pgSurfaceObject *dstobj, int pixel_size)
42604260
Uint64 size;
42614261
Uint32 color, average;
42624262
Uint8 *pix;
4263-
int width = min(pixel_size, src->w - x);
4264-
int height = min(pixel_size, src->h - y);
4263+
int width = (pixel_size > (src->w - x)) ? src->w - x : pixel_size;
4264+
int height = (pixel_size > (src->h - y)) ? src->h - y : pixel_size;
42654265

42664266
ra = 0;
42674267
ga = 0;

0 commit comments

Comments
 (0)