Just very minor changes to improve readability.
Rename generate to generateFull, which generates points over the full range of the pdf,
        without taking into account the range, which may be limited by upper and lower
        limits.

Add new function generate, which runs generateFull until a point is generated inside the
        range of the pdf definition.

Indent some parts of the code properly.