|
[Sponsors] |
February 6, 2007, 02:13 |
ND_MAG
|
#1 |
Guest
Posts: n/a
|
ND_MAG(dx[0],dx[1],dx[2]);
Please let me know the above statement ND_MAG. |
|
February 6, 2007, 02:33 |
Re: ND_MAG
|
#2 |
Guest
Posts: n/a
|
it is equivalent with:
sqrt(pow(dx[0],2.0)+pow(dx[1],2.0)+pow(dx[2],2.0)). Should be used with care in 2D version since dx[2] is not always 0 as expected. |
|
February 8, 2007, 10:24 |
Re: ND_MAG
|
#3 |
Guest
Posts: n/a
|
in 2D it is automatically set to zero. you need not bother about dx[2]. Its a macro that calculates the MAGnigitude of a Vector quantity
|
|
|
|