Pastebin
API
tools
faq
paste
Login
Sign up
SHARE
TWEET
roundToNth (limit precision of fp-values)
ulfben
Feb 25th, 2017
913
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
120 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
This summer smells like money
CSS | 53 min ago | 0.24 KB
I made $15,000 in 2 hours
CSS | 53 min ago | 0.24 KB
✅ API Glitch (Docs Leak)
CSS | 53 min ago | 0.24 KB
Asklepios Klinik Nord – Heidberg
1 hour ago | 20.98 KB
2026_07_updated_july
4 hours ago | 1.06 KB
How to rename README.md and LICENSE on build
XML | 1 day ago | 0.52 KB
Untitled
2 days ago | 2.10 KB
anydesk forensics
2 days ago | 0.80 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!