Forgot those :)
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@2072 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -0,0 +1,23 @@
|
||||
#include "Utility.h"
|
||||
#include <math.h>
|
||||
|
||||
rgb_color blackColor = { 0, 0, 0, 255 };
|
||||
rgb_color greyColor = { 216, 216, 216, 255 };
|
||||
rgb_color darkColor = { 184, 184, 184, 255 };
|
||||
rgb_color whiteColor = { 255, 255, 255, 255 };
|
||||
rgb_color redColor = { 228, 0, 0, 255 };
|
||||
|
||||
float round(float n, int32 max)
|
||||
{
|
||||
float result;
|
||||
int32 tmp;
|
||||
max *= 10;
|
||||
|
||||
n *= max;
|
||||
n += 0.5;
|
||||
|
||||
tmp = (int32)floor(n);
|
||||
result = (float)tmp / (max);
|
||||
|
||||
return result;
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
#ifndef __UTILITY_H
|
||||
#define __UTILITY_H
|
||||
|
||||
#include <InterfaceDefs.h>
|
||||
#include <SupportDefs.h>
|
||||
|
||||
extern float round(float n, int32 max);
|
||||
|
||||
//Colors
|
||||
extern rgb_color blackColor;
|
||||
extern rgb_color greyColor;
|
||||
extern rgb_color darkColor;
|
||||
extern rgb_color whiteColor;
|
||||
extern rgb_color redColor;
|
||||
|
||||
#endif //__UTILITY_H
|
||||
Reference in New Issue
Block a user