Pastebin
API
tools
faq
paste
Login
Sign up
SHARE
TWEET
roundToNth (limit precision of fp-values)
ulfben
Feb 25th, 2017
1,118
0
Never
2
Not a member of Pastebin yet?
Sign Up
, it unlocks many cool features!
Java
0.15 KB
| None
|
0
0
raw
download
clone
embed
print
report
public
static
float
roundToNth
(
final
float
val,
final
float
precision
)
{
return
(
(
int
)
(
(
val
*
precision
)
+
(
(
val
<
0.0
)
?
-
0.5
:
0.5
)
)
)
/
precision
;
}
Advertisement
Comments
Gyqizv
217 days
#
text
0.21 KB |
0
0
view
report
reply
Best t33n active cpx link daily updates!
Copy and paste the link in a new browser tab and then hit enter!
https://crazyporn.@xxx/members/157354/?asgtbndr=1&play=true&spon=adworld&zone=400
Remove the @
Comment was deleted
Add Comment
Please,
Sign In
to add comment
Public Pastes
✅ 0 DAY Hacked
CSS | 3 sec ago | 0.86 KB
BTC SWAP GLITCH
CSS | 4 min ago | 0.85 KB
✅ +12,000$ in 2 days
CSS | 5 min ago | 0.86 KB
✅ Changelly Hacked
CSS | 17 min ago | 0.85 KB
How to hack an exchange
CSS | 17 min ago | 0.86 KB
Crypto is in danger
CSS | 22 min ago | 0.85 KB
✅ 0 DAY Hacked
CSS | 22 min ago | 0.86 KB
AI destroys crypto
CSS | 26 min ago | 0.85 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!