« first day (964 days earlier)      last day (3991 days later) » 

12:03 AM
i need help
hi
@BenjaminGruenbaum @Gus @fr1550n @MaxPower need help with atan2
 
@javawarrior Cool.
 
Well, here's my problem
angle = (float) Math.atan2(p.y-y, p.x-x);
whenever i try to use that code, it always places the player at some weird angle
and that messes up the whole purpose of the game
 
could you help me out?
 
I could, but I dislike Java and I don't feel like teaching someone trig. Read the wikipedia page and the documentation on atan2
 
12:07 AM
i knopw how to do trig
i just don't know why it isn't working
 
Also, the problem is your range, atan2 only deals half of the angles.
 
half of the angles?
what?
 
Gus
@javawarrior Only one is likely to be true, you know trig, or the angle is not coming out right. Very unlikely that there is a bug in Math.atan2.
 
the angle is not coming our right
 
hi
@javawarrior that question does not make sense
and if you want a coordinate, maybe round that float number into an int
and see how it goes
 
12:17 AM
@FredOverflow LOL, I got to love how you have a message starred in this room XD I just came here to show a friend how 'smart' it is
 
Gus
@javawarrior if I told you that I was using Math.foo(somevalue), but the distance wasn't coming out right what would you say?
 
12:54 AM
@BenjaminGruenbaum cancelling stars is fun
 
 
9 hours later…
10:05 AM
@BenjaminGruenbaum Where? I don't see any starred messages of mine.
 
 
1 hour later…
11:08 AM
@FredOverflow That kiddie two messages above removed them
 
 
3 hours later…
1:59 PM
@O0oO0oOO0ooO facepalm
 
2:51 PM
Hello there, does anyone have some experience how to catch barcode scanner "signals"? (this scanner just emulates keyboard so in a few miliseconds I get string containing numbers).
 
3:11 PM
No; I can't say I've worked with a barcode scanner before, sorry.
 
 
2 hours later…
user1125394
4:57 PM
how can I padd float with right 0's
 
user1125394
1.2 -> 1.20 (2 decimal digits)
 
5:29 PM
27
Q: String.format() to format double in java

kikeHow can I use String.format(format String,X) to format a double like follows??? 2354548.235 -> 2,354,548.23 Thanks!

String.format("%.2f", value)
 
 
4 hours later…
9:10 PM
@ShotgunNinja I might use the DecimalFormat class.
DecimalFormat df = new DecimalFormat();
df.setMinimumFractionDigits(2);
df.format(1.2);
 
 
2 hours later…
10:45 PM
@BenjaminGruenbaum SO IT WAS YOU
 
1 message moved from JavaScript
 

« first day (964 days earlier)      last day (3991 days later) »