Roxside / jbox2d

Automatically exported from code.google.com/p/jbox2d
BSD 2-Clause "Simplified" License
0 stars 0 forks source link

minor bug in Convex Hull demo #45

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago

In the ConvexHull example, the bounds are set as (8,8) to (-8,-8)
    Vec2 lowerBound = new Vec2(-8f, -8f);
    Vec2 upperBound = new Vec2(8f, 8f);

but then you feed it random numbers between 0 and 10 for X and Y axis. This 
results in substantial rectangular clipping on the top and right edge of the 
generated shape. I corrected the problem by changing the random number 
generator to (-8,8)

      float x = MathUtils.randomFloat(-8, 8);
      float y = MathUtils.randomFloat(-8, 8);

Version 2.2.1.1

Original issue reported on code.google.com by DaveHill...@gmail.com on 2 May 2013 at 12:48

GoogleCodeExporter commented 9 years ago
thanks!

Original comment by danielmu...@gmail.com on 6 May 2013 at 5:24