Loading...
Processing Forum
Recent Topics
All Forums
Screen name:
watchwrk
watchwrk's Profile
2
Posts
2
Responses
0
Followers
Activity Trend
Last 30 days
Last 30 days
Date Interval
From Date :
To Date :
Go
Loading Chart...
Posts
Responses
PM
Show:
All
Discussions
Questions
Expanded view
List view
Private Message
arrayCopy confusion
[2 Replies]
11-Dec-2010 09:26 PM
Forum:
Programming Questions
Hi,
When I run the following code:
float[][] X={{1,2,3},{4,5,6}}; //initialize X
float[][] Y=new float[2][3]; //initialize Y
arrayCopy(X,Y); //copy X to Y
println(Y[0][0]); //print the first value in Y
X[0][0]=Y[1][0]; //change the first value in X
println(Y[0][0]); //print the first value in Y (again).
The first print command gives a 1, and the second gives a 4. So a value in Y has changed! I'm racking my brains trying to figure out how this can be. Any help would be much appreciated.
thanks, :-)
~Patch
simple question about double precision
[3 Replies]
02-Nov-2010 04:00 AM
Forum:
General Discussion
The following code:
double x = 0.1;
println(x);
causes a display of the following value:
0.10000000149011612
Does anyone know what's causing the "149011612"? Is it a problem with println()? Is there any way to specify values to high precision?
any help much appreciated,
~Patch
«Prev
Next »
Moderate user : watchwrk
Forum