Category talk:Wren-math: Difference between revisions
→Source code: Added two more convenience methods to Nums class.
(→Source code: Added some convenience methods to the Int and Nums classes.) |
(→Source code: Added two more convenience methods to Nums class.) |
||
Line 548:
return a.reduce { |acc, x| acc + (x - m).abs } / a.count
}
// Converts a numeric list to a corresponding string list.
static fromStrings(a) { a.map { |s| Num.fromString(s) }.toList }
// Converts a string list to a corresponding numeric list.
static toStrings(a) { a.map { |n| n.toString }.toList }
}
|