Formatting fixes

This commit is contained in:
Christoffer Lerno
2024-10-14 16:13:51 +02:00
parent f37f1769ae
commit cf03bc0a0a
2 changed files with 22 additions and 22 deletions

View File

@@ -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"
*>

View File

@@ -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;
@@ -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)
@@ -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
*>
@@ -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
*>
@@ -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)
@@ -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)
@@ -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)