Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 00425721 authored by Jason Sams's avatar Jason Sams Committed by Android (Google) Code Review
Browse files

Merge "Fix rsRand(float, float)"

parents eedc90f4 e2b3304e
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -243,13 +243,15 @@ static void SC_MatrixTranspose_2x2(Matrix2x2 *m) {
static float SC_randf(float max) {
    float r = (float)rand();
    r *= max;
    return r / RAND_MAX;
    r /= RAND_MAX;
    return r;
}

static float SC_randf2(float min, float max) {
    float r = (float)rand();
    r /= RAND_MAX;
    r = r * (max - min) + min;
    return r / RAND_MAX;
    return r;
}

static int SC_randi(int max) {