import { WebScale , IOSScale , AndroidScale } from './types' ; param data param num export const precisionControl = ( data , num = 1 ) => { const len = Math . round ( 1 / num ) . toString ( ) . length - 1 ; return + ( ( Math . round ( data / num ) * num ) . toFixed ( len ) ) ; } ; export const _scale = ( data , scale ) => typeof data === 'number' ? precisionControl ( data / scale , 0.01 ) : data ;