Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Jason Chemin
curves
Commits
3b5d644c
Commit
3b5d644c
authored
Nov 24, 2017
by
t steve
Browse files
inlining bin and fact to avoid redefinition
parent
a976e461
Changes
1
Hide whitespace changes
Inline
Side-by-side
include/spline/bernstein.h
View file @
3b5d644c
...
...
@@ -23,7 +23,7 @@ namespace spline
///
/// \brief Computes factorial of a number
///
unsigned
int
fact
(
const
unsigned
int
n
)
inline
unsigned
int
fact
(
const
unsigned
int
n
)
{
assert
(
n
>=
0
);
int
res
=
1
;
...
...
@@ -35,7 +35,7 @@ unsigned int fact(const unsigned int n)
///
/// \brief Computes a binomal coefficient
///
unsigned
int
bin
(
const
unsigned
int
n
,
const
unsigned
int
k
)
inline
unsigned
int
bin
(
const
unsigned
int
n
,
const
unsigned
int
k
)
{
return
fact
(
n
)
/
(
fact
(
k
)
*
fact
(
n
-
k
));
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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