Pastebin
API
tools
faq
paste
Login
Sign up
SHARE
TWEET
Function to truncate too much decimals
a guest
Jul 20th, 2013
610
0
Never
Add comment
Not a member of Pastebin yet?
Sign Up
, it unlocks many cool features!
Java
0.16 KB
| None
|
0
0
raw
download
clone
embed
print
report
static
public
double
truncateDecimals
(
double
n,
int
numberOfDecimals
)
{
return
Math
.
floor
(
n
*
Math
.
pow
(
10
,numberOfDecimals
)
)
/
Math
.
pow
(
10
, numberOfDecimals
)
;
}
Advertisement
Add Comment
Please,
Sign In
to add comment
Public Pastes
Get $12,000 from this mehtod
CSS | 40 sec ago | 0.86 KB
+12,000$ in 2 days
CSS | 3 min ago | 0.67 KB
Easiest method for beginners
CSS | 3 min ago | 0.67 KB
✅ Instant Profits Method
CSS | 5 min ago | 0.86 KB
BTC SWAP GLITCH
CSS | 15 min ago | 0.67 KB
Crypto is in danger
CSS | 15 min ago | 0.67 KB
✅ +12,000$ in 2 days
CSS | 16 min ago | 0.86 KB
This is how to get a Lambo
CSS | 22 min ago | 0.67 KB
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the
Cookies Policy
.
OK, I Understand
Not a member of Pastebin yet?
Sign Up
, it unlocks many cool features!