Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
mpim-sw
libcdi
Commits
96e7f4bc
Commit
96e7f4bc
authored
Feb 11, 2010
by
Uwe Schulzweida
Browse files
nsp2trunc cleanup
parent
15336157
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/grid.c
View file @
96e7f4bc
...
...
@@ -1176,8 +1176,8 @@ int gridInqSize(int gridID)
return
(
size
);
}
static
int
nsp2trunc
(
int
nsp
)
static
int
nsp2trunc
(
int
nsp
)
{
/* nsp = (trunc+1)*(trunc+1) */
/* => trunc^2 + 3*trunc - (x-2) = 0 */
...
...
@@ -1187,7 +1187,7 @@ static int nsp2trunc(int nsp)
/* p = 3 and q = - (x-2) */
int
trunc
;
trunc
=
(
int
)
(
sqrt
(
nsp
*
4
.
0
+
1
)
-
3
)
/
2
;
trunc
=
(
int
)
(
sqrt
(
nsp
*
4
+
1
.
)
-
3
)
/
2
;
return
(
trunc
);
}
...
...
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