Factor out seedToFloat