← Back to Gists

Ternary Max Macro

📝 C
mkim
mkim · Level 4 ·

Returns the larger of two values using a ternary operator without side effects.

C
#define MAX(a, b) ((a) > (b) ? (a) : (b))

Comments

No comments yet. Start the discussion.