projects
/
platform
/
core
/
csapi
/
opentk.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4e93da0
)
Fix div-by-zero in component division test
author
varon
<varon@users.noreply.github.com>
Sun, 19 Mar 2017 14:43:19 +0000
(16:43 +0200)
committer
varon
<varon@users.noreply.github.com>
Sun, 19 Mar 2017 14:43:19 +0000
(16:43 +0200)
tests/OpenTK.Tests/Vectors.fs
patch
|
blob
|
history
diff --git
a/tests/OpenTK.Tests/Vectors.fs
b/tests/OpenTK.Tests/Vectors.fs
index
5351652
..
ac70d1c
100644
(file)
--- a/
tests/OpenTK.Tests/Vectors.fs
+++ b/
tests/OpenTK.Tests/Vectors.fs
@@
-110,6
+110,7
@@
module Vector2 =
//
[<Property>]
let ``Vector-float division is the same as component-float division`` (a : Vector2,f : float32) =
- let r = a / f
- Assert.ApproximatelyEqual(a.X / f,r.X)
- Assert.ApproximatelyEqual(a.Y / f,r.Y)
+ if not (approxEq f 0.0f) then // we don't support diving by zero.
+ let r = a / f
+ Assert.ApproximatelyEqual(a.X / f,r.X)
+ Assert.ApproximatelyEqual(a.Y / f,r.Y)