Skip to content

Commit c8f6098

Browse files
committed
docs tweak
1 parent bcbab68 commit c8f6098

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

src/jswrap_espruino.c

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -374,8 +374,13 @@ JsVarFloat jswrap_espruino_sum(JsVar *arr) {
374374
"typescript" : "variance(arr: string | number[] | ArrayBuffer, mean: number): number;"
375375
}
376376
Work out the variance of the contents of the given Array, String or ArrayBuffer
377-
and return the result. This is equivalent to `v=0;for (i in arr)
378-
v+=Math.pow(mean-arr[i],2)`
377+
and return the result. This is equivalent to:
378+
379+
```
380+
v=0;
381+
for (i in arr)
382+
v+=Math.pow(mean-arr[i],2);
383+
````
379384
*/
380385
JsVarFloat jswrap_espruino_variance(JsVar *arr, JsVarFloat mean) {
381386
if (!(jsvIsIterable(arr))) {

0 commit comments

Comments
 (0)