lottie/vector : add a example to test the vector module.

Change-Id: I511b2b520b51ec8b9bf278b67a5ca94784af4c76
This commit is contained in:
subhransu mohanty
2018-09-12 11:49:12 +09:00
committed by Hermet Park
parent 8fa45756ab
commit 4dff9ab5a5
2 changed files with 18 additions and 0 deletions

View File

@@ -41,3 +41,8 @@ executable('lottieviewer',
include_directories : inc,
link_with : lottie_player_lib,
dependencies : demo_dep)
executable('vectorTest',
'vectortest.cpp',
include_directories : inc,
dependencies : [library_deps])

13
example/vectortest.cpp Normal file
View File

@@ -0,0 +1,13 @@
#include<iostream>
#include "vinterpolator.h"
int main()
{
VInterpolator ip({0.667, 1}, {0.333 , 0});
for (float i = 0.0 ; i < 1.0 ; i+=0.05) {
std::cout<<ip.value(i)<<"\t";
}
std::cout<<std::endl;
return 0;
}