Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
nixberg authored May 18, 2020
1 parent 4e263c3 commit 597aa5e
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,3 +51,15 @@ var rng = ChaCha(rounds: .twenty, seed: .zero, stream: 0)
var array: [UInt8] = [0]
rng.append(to: &array, count: 4) // [0, 118, 184, 224, 173]
```

### Floating-point numbers

```Swift
var rng = ChaCha(rounds: .twenty, seed: .zero, stream: 0)

var f32: [Float32] = rng.next() // 0.679210186
var f64: [Float64] = rng.next() // 0.89615423990493759
```



0 comments on commit 597aa5e

Please sign in to comment.