aboutsummaryrefslogtreecommitdiff
path: root/lib/core/math.nom
diff options
context:
space:
mode:
authorBruce Hill <bruce@bruce-hill.com>2019-03-14 16:30:43 -0700
committerBruce Hill <bruce@bruce-hill.com>2019-03-14 16:30:43 -0700
commitddb839bfd4ba8dbdd214f3e885629fc8fe57e68c (patch)
treeaee183d005229b21a5ce636685f416f97bd5aa9e /lib/core/math.nom
parent7f138199078a2fc2b6d6ee8d31da940120c8216a (diff)
Replacing (size of $) with (#$) as should have been done before.
Diffstat (limited to 'lib/core/math.nom')
-rw-r--r--lib/core/math.nom4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/core/math.nom b/lib/core/math.nom
index e2c759a..3aab2b5 100644
--- a/lib/core/math.nom
+++ b/lib/core/math.nom
@@ -94,7 +94,7 @@ external:
$prod *= $
return $prod
- [avg of $items, average of $items] all mean ((sum of $items) / (size of $items))
+ [avg of $items, average of $items] all mean ((sum of $items) / (#$items))
# Min/max
[min of $items, smallest of $items, lowest of $items] all mean:
@@ -207,4 +207,4 @@ external:
..all compile to "math.random(\($low as lua expr), \($high as lua expr))"
[random choice from $elements, random choice $elements, random $elements]
- ..all mean (=lua "\$elements[math.random(#\$elements)]")
+ ..all mean (=lua "\$elements[math.random(#\$elements)]") \ No newline at end of file