initial work for portal calculator

does floor() work in javascript?

also, let me know how this works....