1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

math: copysign()

This commit is contained in:
vamsi-shankar
2020-03-28 23:02:38 +05:30
committed by GitHub
parent fa02130359
commit 715d4f6601
2 changed files with 13 additions and 0 deletions

View File

@ -62,3 +62,11 @@ fn test_mod() {
a %= 2
assert a == 0
}
fn test_copysign() {
assert copysign(5, -7) == -5.0
assert copysign(-5, 7) == 5.0
assert copysign(-5, -7) == -5.0
assert copysign(10, 0) == 10.0
assert copysign(10, 10) == 10.0
}