YARGA provides convenient access to high-performance thread local random value generators via its friendly API. This codebase is intended to be used as an introductory teaching tool and may not represent current best practices. For private use only, use with caution and void where prohibited!
Warning: The underlying random engine is not cryptographically secure and should not be used for security or secure hashing.
- RNG Engine: Fortuna for Java
- Kotlin: JVM (Java 11)
- Spring Boot: Maven
- AWS: Elastic Beanstalk - Corretto 11
- Canonical() -> Double
- Returns a random double precision floating point value
- Distribution: Flat Uniform => Range[0.0..1.0) *tail exclusive
- Method: GET
- Response: JSON
- Die(sides: Int) -> Int
- Returns a random integer
- Distribution: Flat Uniform => Range[1..sides] *inclusive
- Method: GET
- Param `sides`: Size of die to be rolled. Default: 6
- Response: JSON
- Dice(rolls: Int sides: Int) -> Int
- Returns a random integer
- Distribution: Middle Geometric => Range[rolls..rolls*sides] *inclusive
- Method: GET
- Param `rolls`: Number of dice to be rolled. Default: 1
- Param `sides`: Size of dice to be rolled. Default: 20
- Response: JSON
- PercentTrue(chance: Int) -> Bool
- Returns a random boolean
- Distribution: Linear => Literal[true, false]
- Method: GET
- Param `chance`: Percent chance of returning true. Default: 50
- Response: JSON