Re: init
- From: "Rob Thorpe" <robert.thorpe@xxxxxxxxxxxx>
- Date: 27 Feb 2006 03:40:53 -0800
bob@xxxxxxxxxxxxxx wrote:
why won't this work?
float boxcenter[3];
if (nodectr == 0)
boxcenter = {centerpt[0] + halfwidth/2.0, centerpt[1] + halfwidth/2.0,
centerpt[2] + halfwidth/2.0};
You could do
float boxcenter[ARR_SIZE];
if (nodectr == 0)
{
int n;
for (n = 0; n < ARR_SIZE; n++)
boxcenter[n] = centerpt[n] + halfwidth / 2.0;
}
which is a little more work, but not much. This operation is much
simpler in langauges that can perform a map operation as others have
shown.
.
- References:
- init
- From: bob
- init
- Prev by Date: Re: Assignmnet problem with rules
- Next by Date: Re: Assignmnet problem with rules
- Previous by thread: Re: init
- Next by thread: proportionality problem
- Index(es):