Скачиваний:
26
Добавлен:
01.05.2014
Размер:
947 б
Скачать
#if !defined(__tools_h)              // Sentry, use file only if it's not already included.
#define __tools_h

/*  Project first

		Copyright © 1997 by US. All Rights Reserved.

		SUBSYSTEM:    first.exe Application
		FILE:         tools.h
		AUTHOR:       US


		OVERVIEW
		========
		Some tools.
*/

#include <owl\owlpch.h>
#pragma hdrstop

#include <owl\edit.h>

BOOL CheckFloatEditor(TWindow *parent, TEdit *Control, unsigned bufLength, double *target, const char *msgHead);
BOOL CheckDwordEditor(TWindow *parent, TEdit *Control, unsigned bufLength, unsigned long *target, const char *msgHead);
void killZeros(char *str);

inline double sqr(double a) { return a*a; }
/*template <class T>
inline T max(const T &a, const T &b)
{
	return a > b ? a : b;
}*/
template <class T>
inline T sign(const T &x)
{
	return x > 0 ? 1 : (x < 0 ? -1 : 0);
}

#endif                                      // __tools_h sentry.
Соседние файлы в папке SOURCE