Skip to content

Commit

Permalink
Fixing unit tests build
Browse files Browse the repository at this point in the history
  • Loading branch information
LuizZak committed Aug 17, 2024
1 parent 5cd87e2 commit cebf33e
Showing 1 changed file with 15 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import Geometria

extension MersenneTwister {
func randomScalar(range: ClosedRange<Double>) -> Double {
var random = self

return Double.random(in: range, using: &random)
}

func randomVectors(count: Int, _ scalarGen: (MersenneTwister) -> Double) -> [Vector2D] {
return (0..<count).map { _ in
return .init(x: scalarGen(self), y: scalarGen(self))
}
}
}

0 comments on commit cebf33e

Please sign in to comment.