D3 Math Question