Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ronan
coraMaths
Commits
c4c377c4
Commit
c4c377c4
authored
Jun 06, 2016
by
ronan
Browse files
Test new Exp inter
parent
ec5e120e
Pipeline
#2269
passed with stage
in 1 minute
Changes
4
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
cora/cora-maths/1.0/cora-maths-1.0-javadoc.jar
View file @
c4c377c4
No preview for this file type
cora/cora-maths/1.0/cora-maths-1.0-sources.jar
View file @
c4c377c4
No preview for this file type
cora/cora-maths/1.0/cora-maths-1.0.jar
View file @
c4c377c4
No preview for this file type
src/main/java/org/cora/maths/utils/Interpolation.java
View file @
c4c377c4
...
...
@@ -35,10 +35,15 @@ public class Interpolation
{
// y = a * exp(bkx)
float
a
=
start
;
/*
float a = start;
float b = (float) (Math.log(end/a) / (k * duration));
return
(
float
)
(
a
*
Math
.
exp
(
b
*
k
*
time
));
return (float) (a * Math.exp(b * k * time));*/
float
a
=
(
float
)
((
Math
.
exp
(
end
)
-
Math
.
exp
(
start
))/(
Math
.
exp
(
k
*
duration
)
-
Math
.
exp
(
0
)));
float
b
=
(
float
)
Math
.
exp
(
start
);
return
(
float
)
(
a
*
Math
.
exp
(
k
*
time
/
duration
)
+
b
)
;
}
/**
...
...
Write
Preview
Supports
Markdown
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