101 reputation
3
bio website google.com
location Idaho
age 37
visits member for 9 months
seen Aug 21 '12 at 21:41
stats profile views 4

I primarily program in C++ and Java. Recently I started learning Haskell. My current mathematical interests are group theory, graph theory, category theory, and type theory.


Aug
21
comment Java Collision Detection of a Slope using a Gradient
I feel stupid for not noticing that. I have encountered similar round-off/truncation errors in my graphics programming.
Aug
21
comment Java Collision Detection of a Slope using a Gradient
Thanks for the edit and update. I don't see a problem with the code you have given. Can you post a SSSCE to give us a better idea of the problem?
Aug
21
comment Java Collision Detection of a Slope using a Gradient
If the line slopes from the top left to the bottom right of the screen, then you have calculated m correctly with m = getHeight() / getWidth();. You should not later change m with the *= assignment operator, as far as I can tell. I suggest using just y = m * ball.x + c; in the line under discussion.
Aug
21
comment Java Collision Detection of a Slope using a Gradient
The orientation of the Y axis shouldn't matter as far as the calculations are concerned. This only becomes a factor when you plot to the screen. I have one concern about the line slopeY = m *= ball.x + c;: Is there a reason for the *= in there? It seems to me that it should just be *.
Aug
20
awarded  Analytical
Aug
20
comment How does one escape the GPL?
I don't know if a LOL deserves a +1 or not...
Aug
20
awarded  Supporter
Aug
8
awarded  Autobiographer