Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

Rounding in Java

Name: Anonymous 2007-10-16 15:07

Whats going on programmers?
I'm currently learning java at a course at my college, today my teacher wanted up to make a program that take FPS and converts it to MPH. I know the math behind it, but he wants it rounded to the 10th decimal. I didn't know how to do this, nor did anyone else, so I just took the output; multiplied by 10; used a rounder for a whole number; then divided by 10. Now while this worked I got it in a roundabout way, so is there a command that would do something like this?
Thanks

Name: Anonymous 2007-10-16 15:41

just use long integers multiplied by like 10^10

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List