mirror of
https://github.com/Ryujinx/Opentk.git
synced 2025-01-24 20:51:04 +00:00
Fix div-by-zero in component division test
This commit is contained in:
parent
4e93da0f41
commit
33dfaa2df7
|
@ -110,6 +110,7 @@ module Vector2 =
|
||||||
//
|
//
|
||||||
[<Property>]
|
[<Property>]
|
||||||
let ``Vector-float division is the same as component-float division`` (a : Vector2,f : float32) =
|
let ``Vector-float division is the same as component-float division`` (a : Vector2,f : float32) =
|
||||||
let r = a / f
|
if not (approxEq f 0.0f) then // we don't support diving by zero.
|
||||||
Assert.ApproximatelyEqual(a.X / f,r.X)
|
let r = a / f
|
||||||
Assert.ApproximatelyEqual(a.Y / f,r.Y)
|
Assert.ApproximatelyEqual(a.X / f,r.X)
|
||||||
|
Assert.ApproximatelyEqual(a.Y / f,r.Y)
|
||||||
|
|
Loading…
Reference in a new issue