Quantcast
Channel: Recent Discussions — DataTables forums
Viewing all articles
Browse latest Browse all 81729

Auto incrementing by 0.1 results in a full length float

$
0
0

Hey there,

When using the auto-incrementing number function in autofill and keytable, if you pass it, for example 0.1, then subsequent values will have the full length of decimal places.

E.g.

1.1 dragged with an increment of 0.1 becomes:
1.2000000000000002
1.3000000000000003

and so on.

Fiddle here:

https://jsfiddle.net/rk2n8up4/2/

I'm not sure if this is a bug per se, or something you expect to be addressed by the datatables dev in a custom algo of some description?

Thanks very much


Viewing all articles
Browse latest Browse all 81729

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>