We are about to switch to a new forum software. Until then we have removed the registration on this forum.
Has anyone used it successfully in processing.js? I get [ReferenceError: BigInteger is not defined]
import java.math.BigInteger;
void setup ()
{
size( 800, 600 );
colorMode(RGB,1);
background(0);
text("Hello World!", 50, 50);
BigInteger b = new BigInteger("183972267825065276461950095037660073391");
text(b.toString(), 50, 100);
}
Answers
Only a tiny fraction of Java's API is available for PJS:
http://ProcessingJS.org/reference/
You'll have to find an equivalent JS library for it, I'm afraid...
oh I see.
So in this post, someone lists a few of them. http://stackoverflow.com/questions/14531137/what-javascript-library-can-i-use-to-manipulate-big-integers
Is it a matter of downloading one of them and importing it in my sketch? How exactly do I do this?
thank you
I also tried to import de.bezier.guido.*; from the 'Import library' menu and it fails as well.
(https://github.com/fjenett/Guido)
Is it for the same reason? Can I not import any other libraries and limit my self to the functionalities of the core functions listed in the reference you pointed out?
Ah ok, let me try your suggestion above.
thank you for helping
ok great! I managed to make bigInteger to work. I see the syntax is somewhat different, as well as non jave compatible as you mentioned.
I will now look for a gui library as well.
thank you so much!