senthilporunan / jRate

Generate SVG based Rating with various customized fancy features. More information @ www.toolitup.com
http://www.toolitup.com/jRate.html
MIT License
66 stars 45 forks source link

Changed precision to use multiplicative inverse #6

Closed harvzor closed 9 years ago

harvzor commented 9 years ago

Due to how you couldn't get the plugin to allow a precision of half-stars when selecting your rating, this commit changes how the precision is worked out.

For example, putting a precision of 0.5 with a min of 1 and a max of 2 will give you the options to rate of 1, 1.5 and 2. Putting a precision of 0.25 with a min of 1 and a max of 2 will give you the options of 1, 1.25, 1.5, 1.75 and 2.

Before setting a precision of 1 with a min of 1 and a max of 2 would give you the options to rate of 1, 1.1, 1.2, 1.3 and so on.