Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
ACGL
acgl
Commits
9f9aaee6
Commit
9f9aaee6
authored
Nov 27, 2011
by
Ole Untzelmann
Browse files
[Animations] Sinus ease function added
parent
660b94c4
Changes
3
Hide whitespace changes
Inline
Side-by-side
cmake
@
f93d27f5
Subproject commit
15115c56e314569265d0ca4bba3fad1993c2777f
Subproject commit
f93d27f5a7420ec6b3c1974eeb6e30bc9b97801d
include/ACGL/Animations/EaseFunctions.hh
View file @
9f9aaee6
...
...
@@ -90,6 +90,21 @@ public:
}
};
class
Sin
:
public
EaseFunction
{
public:
Sin
(
float
_frequency
=
1.0
f
)
:
mFrequency
(
_frequency
)
{
}
virtual
~
Sin
(){}
virtual
float
value
(
const
float
_progress
)
{
return
sin
(
0.5
f
*
M_PI
*
mFrequency
*
_progress
);
}
float
mFrequency
;
};
class
BlendLinear
:
public
EaseFunction
{
public:
...
...
include/ACGL/Animations/Interpolator.hh
View file @
9f9aaee6
...
...
@@ -78,7 +78,7 @@ public:
inline
const
T
interpolate
(
const
float
_progress
)
{
return
mStartValue
+
_progress
*
mDiffValue
;
return
mStartValue
+
mDiffValue
*
_progress
;
}
inline
const
T
&
finish
()
...
...
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