Cast number of segments to int so that when automatic number of segments is desired, cat's magic formula works even when it doesn't return a whole number
Merge pull request #1 from grischard/master

Cast number of segments to int to fix automatic number of segments.