MaxF
fixed MaxF(fixed a, fixed b);
Maximum value between a and b
Parameters
- fixed a
First value to be compared with.
- fixed b
Second value to be compared with.
Return value
fixed -
The greatest value between a and b.
Examples
- Example #1: Function definition
fixed MaxF(fixed a, fixed b) { if (a > b) { return a; } else { return b; } }
- Example #2: Sample Usage
MaxF(5, 10); // 10 MaxF(-5, 3); // 3
- Example #3: Real Usage
fixed AIRangeMothership (int player, unit aiUnit) { return MaxF(AIAbilityFixed(player, c_AB_Vortex, c_fieldRange0), AIAbilityFixed(player, c_AB_TemporalRift, c_fieldRange0)) + 1; }