Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Libretro
Craft
Commits
28609482
Commit
28609482
authored
Jul 06, 2017
by
Libretro-Admin
Browse files
Buildfixes
parent
c6e4c582
Changes
1
Hide whitespace changes
Inline
Side-by-side
deps/noise/noise.c
View file @
28609482
...
...
@@ -110,16 +110,19 @@ static unsigned char PERM[] = {
};
void
seed
(
unsigned
int
x
)
{
int
i
;
srand
(
x
);
for
(
int
i
=
0
;
i
<
256
;
i
++
)
{
for
(
i
=
0
;
i
<
256
;
i
++
)
PERM
[
i
]
=
i
;
}
for
(
int
i
=
255
;
i
>
0
;
i
--
)
{
for
(
i
=
255
;
i
>
0
;
i
--
)
{
int
j
;
int
n
=
i
+
1
;
unsigned
char
a
;
unsigned
char
b
;
while
(
n
<=
(
j
=
rand
()
/
(
RAND_MAX
/
n
)));
unsigned
char
a
=
PERM
[
i
];
unsigned
char
b
=
PERM
[
j
];
a
=
PERM
[
i
];
b
=
PERM
[
j
];
PERM
[
i
]
=
b
;
PERM
[
j
]
=
a
;
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment