Forgot those :)

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@2072 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Stefano Ceccherini
2002-11-24 00:27:34 +00:00
parent 41ba915d42
commit dab5a2c577
2 changed files with 39 additions and 0 deletions
+23
View File
@@ -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;
}
+16
View File
@@ -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