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:
809e7b4
)
Added filtering for vector generation to only produce valid vectors.
author
Jarl Gullberg
<jarl.gullberg@gmail.com>
Fri, 2 Jun 2017 18:32:16 +0000
(20:32 +0200)
committer
Jarl Gullberg
<jarl.gullberg@gmail.com>
Fri, 2 Jun 2017 18:32:16 +0000
(20:32 +0200)
tests/OpenTK.Tests/Generators.fs
patch
|
blob
|
history
diff --git
a/tests/OpenTK.Tests/Generators.fs
b/tests/OpenTK.Tests/Generators.fs
index
cbcdd92
..
39200f5
100644
(file)
--- a/
tests/OpenTK.Tests/Generators.fs
+++ b/
tests/OpenTK.Tests/Generators.fs
@@
-22,18
+22,21
@@
module private Generators =
singleArb
|> Gen.two
|> Gen.map Vector2
+ |> Gen.filter (fun v -> not <| (Single.IsNaN v.Length || Single.IsInfinity v.Length ))
|> Arb.fromGen
let vec3 =
singleArb
|> Gen.three
|> Gen.map Vector3
+ |> Gen.filter (fun v -> not <| (Single.IsNaN v.Length || Single.IsInfinity v.Length ))
|> Arb.fromGen
let vec4 =
singleArb
|> Gen.four
|> Gen.map Vector4
+ |> Gen.filter (fun v -> not <| (Single.IsNaN v.Length || Single.IsInfinity v.Length ))
|> Arb.fromGen
let quat =