-
Notifications
You must be signed in to change notification settings - Fork 37
Conversation
Flibitized. Removed unnecessary parenthesis from commutative additions.
public long MaxTime { get; set; } | ||
public long HitCount { get; set; } | ||
public string Name { get; set; } | ||
public long PreviousTime { get; set; } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Separate lines for all this stuff
Other than the two style things I pointed out above, seems great! |
This fixes the items Flibitijibibo noted, and a couple of whitespacing issues that MonoDevelop slipped into the code.
Can't believe I missed those get/set's. I guess I had done so many bool expressions that I got stuck in a groove on that last string concatenation. Thanks for catching those. |
/// </returns> | ||
public static float ClassifyPoint(ref Vector3 point, ref Plane plane) | ||
{ | ||
return ( (point.X * plane.Normal.X) + |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note that this formatting issue runs across most of these diffs, not just the one I pointed out.
SOFTWARE. | ||
*/ | ||
#endregion | ||
The above copyright notice and this permission notice shall be included in all |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Guessing this was borked in the retabbing.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I had a problem with this file being corrupted (I believe I used sed on it while I had it open in another editor), so I copy/pasted over it from a backup inside of MonoDevelop (I was on my daily commuter van, so couldn't just checkout the old version). I just re-tested now, and sure enough Monodevelop will screw up the licensing tabbing when doing that. Good to know.
Will look at this one more time in detail tomorrow... you can do another passthrough of the P-R section one more time if you want. The new stuff all looks good (but I haven't checked Matrix yet). For Matrix, the only thing I'd check right off the bat is the Hoping to finally merge this tomorrow or Sunday. |
:) Yeah, Matrix was a bear. One line was even 467 characters wide. I can see where the original coder might have found it hard to break up since he nested so many of the operations, but most of that nesting was unnecessary (it was controlling the order of addition of floats, which is totally commutative) so I was able to simplify it and multi-line it all. I'll go comment on a couple of other items I think you might want to offer feedback on, since I apparently have insomnia this morning. :) |
Hmmmm... looks like I can't do inline comments on Matrix. I guess it's hidden because it's so long. Anyway, the two items I was thinking of are:
|
Turns out the same can be said of Quaternion regarding obnoxious copypasted code... This should be considered an additional commit on top of this merge: 24f1eb3 Matrix seemed okay, but I gave it a very lazy glance... the only thing that leaves me unsure about this commit is the possible change of behavior from changing nests/parens in order of operations, as that can be super super hard to detect if something goes wrong. I tested this with Capsized, which uses these bits extensively, and it seemed okay, but if we get a report about weird maths somewhere down the line, we should probably look to these two sets of changes. |
Sure enough: a671673#diff-5eecd4f30a1b3dd7256f6b1d0695e716L644 Definitely do a second pass through these files and be sure more of those didn't slip through... |
It should be fine. I don't think I changed any nesting that affects anything but the additions, which should be totally commutative for the vectors and float operations I modified. If we do get any reports, I'll be happy to go back and investigate/fix anything I @%^!'d up. |
Flibitized for #147. All the usual, and removed unnecessary parenthesis from commutative additions.