CMatrix:Volume
The Volume method returns the sum of all matrix values.
nVolume = CMatrix:Volume() where |
nVolume is the "volume" or sum of all values in the matrix.
This method computes the sum of all CMatrix elements. If the matrix elements was cponsidered to be a grid of height values, then the sum of all members would be the volume under the matrix.
The following script computes the volume of the CMatrix:
|
-- create a CMatrix |
|
-- setup a 5 x 7 matrix |
|
-- result: Vol = 35 |