(comparison > 0 ? n : m).subtract(comparison > 0 ? m : n);
I'm trying to figure out what this inline conditional statement means and how to convert it into a regular if statement. The .subtract is just a method that will subtract the second () from the first().
I think that the first (comparison > 0 ? n : m) is the same as if(comparison > 0) { m = n; }
not sure how that works with the subtract function. The code runs correctly but I'm trying to fix the warning to not use inline conditionals.
Thank you!