Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
Xavier Garrido
CAMEL
Commits
2eabc76a
Commit
2eabc76a
authored
Apr 07, 2017
by
Matthieu Tristram
Browse files
Add check for boundaries
parent
8fe5fcb9
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
2 deletions
+4
-2
work/tools/awk/genrand.awk
work/tools/awk/genrand.awk
+4
-2
No files found.
work/tools/awk/genrand.awk
View file @
2eabc76a
...
...
@@ -2,8 +2,10 @@ BEGIN {
srand
(
seed
?
seed
:
1
)
}
$1
==
"par"
{
r
=
2
*
rand
()
-
1
newval
=
$4
+
r
*
$5
do
{
r
=
2
*
rand
()
-
1
newval
=
$4
+
r
*
$5
}
while
(
newval
<
$6
||
newval
>
$7
)
printf
(
"%s\t%s\t%s\t%f\t%f\t%f\t%f\n"
,
$1
,
$2
,
$3
,
newval
,
$5
,
$6
,
$7
)
}
$1
!=
"par"
{
...
...
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