
export function num(s, places) {
    let n = isNaN(s) ? 0 : s * 1;
    if (places) {
    	n = round(n, places);
    }
    return n;
}


export function round(num, places) { 
	return +(Math.round(num + "e+" + places)  + "e-" + places);
}

