Skip to content

Commit

Permalink
Formatting fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
lerno committed Oct 14, 2024
1 parent f37f176 commit cf03bc0
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 22 deletions.
4 changes: 2 additions & 2 deletions lib/std/math/math.c3
Original file line number Diff line number Diff line change
Expand Up @@ -173,8 +173,8 @@ macro sincos_ref(x, sinp, cosp)
}

<*
Return a vector with sin / cos of the given angle.
*
Return a vector with sin / cos of the given angle.

@param x `the angle in radians`
@require values::@is_int(x) || values::@is_float(x) "Expected an integer or floating point value"
*>
Expand Down
40 changes: 20 additions & 20 deletions lib/std/math/math_random.c3
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
<*
Randoms:
General usage -
1. Create a Random (see std/math/random for various alternatives), or pick DefaultRandom
2. Define it `DefaultRandom my_random;`
3. Seed it: `random::seed(&my_random, some_seed);` or `rand::seed_entropy(&my_random);`
4. Use it with the functions in random: `float random_float = random::next_float(&my_random);`
*
For just a simple integer between 0 and n (not including n), you can use `rand(n)`.
Randoms:
General usage -
1. Create a Random (see std/math/random for various alternatives), or pick DefaultRandom
2. Define it `DefaultRandom my_random;`
3. Seed it: `random::seed(&my_random, some_seed);` or `rand::seed_entropy(&my_random);`
4. Use it with the functions in random: `float random_float = random::next_float(&my_random);`

For just a simple integer between 0 and n (not including n), you can use `rand(n)`.
*>
module std::math::random;

Expand All @@ -19,8 +19,8 @@ macro void seed(random, seed)
}

<*
Seed the random with some best effort entropy.
*
Seed the random with some best effort entropy.

@require is_random(random)
*>
macro void seed_entropy(random)
Expand All @@ -29,8 +29,8 @@ macro void seed_entropy(random)
}

<*
Get the next value between 0 and range (not including range).
*
Get the next value between 0 and range (not including range).

@require is_random(random)
@require range > 0
*>
Expand All @@ -50,8 +50,8 @@ macro int next(random, uint range)
}

<*
Get a random in the range [min, max], both included.
*
Get a random in the range [min, max], both included.

@require is_random(random)
@require max >= min
*>
Expand Down Expand Up @@ -101,8 +101,8 @@ fn double rnd() @builtin
}

<*
Get 'true' or 'false'
*
Get 'true' or 'false'

@require is_random(random)
*>
macro bool next_bool(random)
Expand All @@ -111,8 +111,8 @@ macro bool next_bool(random)
}

<*
Get a float between 0 and 1.0, not including 1.0.
*
Get a float between 0 and 1.0, not including 1.0.

@require is_random(random)
*>
macro float next_float(random)
Expand All @@ -122,8 +122,8 @@ macro float next_float(random)
}

<*
Get a double between 0 and 1.0, not including 1.0.
*
Get a double between 0 and 1.0, not including 1.0.

@require is_random(random)
*>
macro double next_double(random)
Expand Down

0 comments on commit cf03bc0

Please sign in to comment.