This site requires JavaScript, please enable it in your browser!
Greenfoot back
Gevater_Tod4711
Gevater_Tod4711 wrote ...

2012/11/20

How to draw the symbol for infinity

Gevater_Tod4711 Gevater_Tod4711

2012/11/20

#
Hi all, I'm searching for a unicode to create a infinity symbol. (or any other way to do that) I have just found some unicodes for the symbol but in java all these don't work. Does anyone know what is the number for the unicode infinity or how to get the symbol?
SPower SPower

2012/11/20

#
Cant you just copy this: ∞ and paste it into a string?
danpost danpost

2012/11/20

#
(char) 8734
SPower SPower

2012/11/20

#
@danpost Did you know that from the top of your head?! ;)
danpost danpost

2012/11/20

#
No. But, Wikipedia is my friend :+)
Gevater_Tod4711 Gevater_Tod4711

2012/11/21

#
Thank you now it works. But I still got one question: Wouldn't this be corect too? Character.toString('\u8734') Thats what I tried before but there was no infinity symbol but a simple rect. Have I done something wrong there?
danpost danpost

2012/11/21

#
Gevater_Tod4711 wrote...
Wouldn't this be corect too? Character.toString('\u8734')
No. The positions with "*" in "('\u****')" are hexadecimal digits. Therefore, (char)8734 is equal to Character.toString('\u221E'). (16 * 16 * 16) * 2 + (16 * 16) * 2 + (16) * 1 + (1) * 14 = 8734
Gevater_Tod4711 Gevater_Tod4711

2012/11/21

#
Oh ok. I didn't know that these values have to be hexadecimal. Thanks.
You need to login to post a reply.