mirror of
https://github.com/sigmasternchen/gleam-community-maths
synced 2025-03-15 07:59:01 +00:00
add mean test for negative numbers
This commit is contained in:
parent
803abd516e
commit
3bae9faffc
1 changed files with 4 additions and 0 deletions
|
@ -268,6 +268,10 @@ pub fn mean_test() {
|
||||||
[1.0, 2.0, 3.0]
|
[1.0, 2.0, 3.0]
|
||||||
|> maths.mean()
|
|> maths.mean()
|
||||||
|> should.equal(Ok(2.0))
|
|> should.equal(Ok(2.0))
|
||||||
|
|
||||||
|
[-1.0, -2.0, -3.0]
|
||||||
|
|> maths.mean()
|
||||||
|
|> should.equal(Ok(-2.0))
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn median_test() {
|
pub fn median_test() {
|
||||||
|
|
Loading…
Reference in a new issue