fixes for issue #469

made random/noise seed 0 consistent with other seed values
use Math.floor so all seed values are integer and auto-generated seed is between 0 and m-1