Merge branch 'master' of http://192.168.132.190:3000/hyzboy/Examples
This commit is contained in:
commit
78c8977a9d
@ -17,6 +17,8 @@ macro(cm_example_project project_name)
|
||||
set_property(TARGET ${project_name} PROPERTY FOLDER "CM/Examples")
|
||||
endmacro()
|
||||
|
||||
add_executable(ColorTest ColorTest.cpp)
|
||||
cm_example_project(ColorTest)
|
||||
|
||||
add_executable(GetCpuInfo GetCpuInfo.cpp)
|
||||
cm_example_project(GetCpuInfo)
|
||||
|
21
ColorTest.cpp
Normal file
21
ColorTest.cpp
Normal file
@ -0,0 +1,21 @@
|
||||
#include<hgl/color/ColorFormat.h>
|
||||
#include<iostream>
|
||||
|
||||
using namespace hgl;
|
||||
using namespace std;
|
||||
|
||||
void half_float_test()
|
||||
{
|
||||
const float f_12_34 =12.34f;
|
||||
const half_float hf_12_23=float2half(12.34f);
|
||||
const float f_12_23_hf=half2float(hf_12_23);
|
||||
|
||||
cout<<"f_12_34="<<f_12_34<<endl;
|
||||
cout<<"hf_12_23="<<hf_12_23<<endl;
|
||||
cout<<"f_12_23_hf="<<f_12_23_hf<<endl;
|
||||
}
|
||||
|
||||
void main(int,char **)
|
||||
{
|
||||
half_float_test();
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user