How can I use a conditional statement in my addObject loop to ensure that the object I add is not cut off by the edge of the world? In other words, I need to apply a condition such that the new object added is entirely within the world.
I have to add five objects at random locations that meet that criteria. I can add five objects at random locations, but I can't yet guarantee that all five are completely within the world and not at all cut off by the edge. Any help would be appreciated!

