Difference between revisions of "LIST STAT SUM SQUARES"

From Second Life Wiki
Jump to navigation Jump to search
m
m (<lsl> tag to <source>)
 
Line 4: Line 4:
|value=7
|value=7
|desc=Calculates the sum of the squares of the numbers in a list.
|desc=Calculates the sum of the squares of the numbers in a list.
<lsl>
<source lang="lsl2">
float sum_of_squares = llListStatistics( LIST_STAT_SUM_SQUARES, numList );
float sum_of_squares = llListStatistics( LIST_STAT_SUM_SQUARES, numList );
</lsl>
</source>
That is, for each number ''N_i'' in a list of ''k'' elements, it calculates ''N_1*N_1 + N_2*N_2 + ... + N_k * N_k''.
That is, for each number ''N_i'' in a list of ''k'' elements, it calculates ''N_1*N_1 + N_2*N_2 + ... + N_k * N_k''.
|pa=
|pa=

Latest revision as of 16:01, 23 January 2015