Timeline for "Of three points supplied, is one a midpoint of the other two?"
Current License: CC BY-SA 3.0
3 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Jan 18, 2016 at 3:28 | comment | added | Patrick Roberts |
@Max I don't believe he's golfing, but rather effectively taking advantage of logical short circuiting by not evaluating all the expressions before checking them. But I believe you can replace the last if statement with just return ( 2*c == a+b );
|
|
Jan 17, 2016 at 6:28 | comment | added | Max | If you're gonna golf it you might as well combine the whole thing into a single statement :) | |
Jan 17, 2016 at 5:58 | history | answered | Octopus | CC BY-SA 3.0 |