This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
inline void HSI2RGB(double h, double s, double i, double* r, double* g, double* b) | |
{ | |
double x = i * (1 - s); | |
if(h < 2 * M_PI / 3) | |
{ | |
double y = i * (1 + (s * cos(h)) / (cos(M_PI / 3 - h))); | |
double z = 3 * i - (x + y); | |
*b = x; *r = y; *g = z; | |
} | |
else if(h < 4 * M_PI / 3) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#pragma once | |
#include <ostream> | |
#include <sstream> | |
class logstream | |
{ | |
private: | |
int _logLevel; | |
struct log_buf |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CString GetAppPath() | |
{ | |
CString fullPath; | |
DWORD pathLen = ::GetModuleFileName( NULL, fullPath.GetBufferSetLength(MAX_PATH+1), MAX_PATH); // hmod of zero gets the main EXE | |
fullPath.ReleaseBuffer( pathLen ); | |
PathRemoveFileSpec(fullPath.GetBuffer()); | |
fullPath.ReleaseBuffer(); | |
return fullPath; | |
} |