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

Commit e2b3304e authored by Jason Sams's avatar Jason Sams
Browse files

Fix rsRand(float, float)

Change-Id: I553d83e1e962ad34aacbe6572d47ff25c3d50060
parent b96320c2
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) {