randsum

rand for the rest of us

Usage no npm install needed!

<script type="module">
  import randsum from 'https://cdn.skypack.dev/randsum';
</script>

README

randsum

rand for the rest of us

MIT License codecov Code of Conduct

NPM

What is this?

It's a dice roller! Specifically, it's a random number generator that generates numbers from 1-N, rather than traditional random number generators, which work from 0-(N-1).

It accepts basic number and number strings, as well as dice notation for more complicated dice operations.

Check out the docs below for more info!

Further Reading

Getting Started - Installation and Documentation for using randsum

Randsum Dice Notation - A guide for using Dice Notation with randsum.

TypeDoc Types - Generated Type Documentation, helpful for debugging

Contributing - help make randsum better!

Sophie's Dice Notation - a great dice notation guide that helped me along the way

_why's poignant guide to ruby - _why not?

Why did you make this?

Sometime around 2012, I decided I wanted to learn to program. I had installed ruby on the best laptop six-hundred dollars could buy, set to make a dice roller as an easy first project.

I spent an easy 30 minutes trying to figure out how to make rand(n) return 1-n instead of 0-(n-1).

When I found the answer, I laughed and laughed. I've been chasing that high ever since.