Zig 0.17.0-dev (Split by item)

Shortcut keys
?
Show these tips
S
Focus search field
Esc
Clear focus & close tips
U
Jump to source code
↑
Move up in search results
↓
Move down in search results
↵
Go to active search result
This is an example of documentation generated by ZigDoc, an alternative to Zig's built-in Auto Doc feature. See also examples in other modes/formats. The project being documented here (as the example) is the Zig standard library. Private Function

step

Private Function
std.Random.Isaac64.step
fn step(self: *Isaac64, mix: u64, base: usize, comptime m1: usize, comptime m2: usize) void

Params

  • self: *Isaac64
  • mix: u64
  • base: usize
  • m1: usize
  • m2: usize

File

Random/Isaac64.zig:36
36
37
38
39
40
41
42
43
44
45
fn step(self: *Isaac64, mix: u64, base: usize, comptime m1: usize, comptime m2: usize) void {
    const x = self.m[base + m1];
    self.a = mix +% self.m[base + m2];

    const y = self.a +% self.b +% self.m[@as(usize, @intCast((x >> 3) % self.m.len))];
    self.m[base + m1] = y;

    self.b = x +% self.m[@as(usize, @intCast((y >> 11) % self.m.len))];
    self.r[self.r.len - 1 - base - m1] = self.b;
}