3 ms·
This seems interesting. Probably more my problem than the author's, but I get triggered by that: > boolean pointPoint(float x1, float y1, float x2, float y2)
by charles_f 3y ago
This seems interesting.
Probably more my problem than the author's, but I get triggered by that:
> boolean pointPoint(float x1, float y1, float x2, float y2) {
> if (x1 == x2 && y1 == y2) {
> return true;
> }
> return false;
>}
And
> if (distance <= r) {
> return true;
> }
> return false;
Which can be replaced with "return distance <= r". It's always funny to me when booleans get treated like that. My big favorite is "if a == true return true else return false".
Anyhow it's probably pedantic of me. I bookmarked that, no doubt I will find its use.