How the Coin Flip Decides Heads or Tails
AnyTool Coin Flip decides every outcome in the browser using the Web Crypto API. A random integer in {0,1} comes from crypto.getRandomValues via rejection sampling — values outside an even multiple of two are discarded — so there is no modulo bias and heads and tails are each exactly 50% likely. Math.random is never used. A single flip plays a CSS-3D rotation that lands on the correct face by parity (even half-turns show heads, odd show tails), while the multi-flip modes compute 10, 100 or 1000 independent outcomes instantly and fold them into the running statistics.
- Outcome from crypto.getRandomValues (CSPRNG), not Math.random
- Rejection sampling removes modulo bias — exact, unbiased 50/50
- Single flip uses a parity-based CSS-3D rotation to land on the drawn face
- Flip 10, 100 or 1000 at once; outcomes are independent
- All randomness and stats run client-side — no server round-trip
