We closed this forum 18 June 2010. It has served us well since 2005 as the ALPHA forum did before it from 2002 to 2005. New discussions are ongoing at the new URL http://forum.processing.org. You'll need to sign up and get a new user account. We're sorry about that inconvenience, but we think it's better in the long run. The content on this forum will remain online.
Page Index Toggle Pages: 1
example bugs: "Objects" (Read 990 times)
example bugs: "Objects"
May 23rd, 2006, 7:28pm
 
Hi there, I've just been looking at the example programs and noticed a couple of things in the "Objects" code:

http://processing.org/learning/examples/objects.html

class MRect has an unused member variable: float side

The display() function draws rectangles starting with x-coordinates of
   xpos+(i*d*w)

it would make more sense to use
   xpos + (i * (d+w))

You might then want to adjust the parameters passed to the MRect constructor for the initialisation of r1,r2,r3,r4 in setup() depending on the desired result.
Re: example bugs: "Objects"
Reply #1 - Jun 14th, 2006, 11:23pm
 
Changes made. Thank you. Casey
Page Index Toggle Pages: 1