Initial
This commit is contained in:
101
mdiwin/FLTPRS.HPP
Normal file
101
mdiwin/FLTPRS.HPP
Normal file
@@ -0,0 +1,101 @@
|
||||
#ifndef _FLOATPAIRS_HPP_
|
||||
#define _FLOATPAIRS_HPP_
|
||||
#include <mdiwin/windows.hpp>
|
||||
#include <mdiwin/types.hpp>
|
||||
|
||||
#undef min
|
||||
#undef max
|
||||
|
||||
class FAR FloatPairs
|
||||
{
|
||||
public:
|
||||
FloatPairs(void);
|
||||
FloatPairs(float column,float row);
|
||||
~FloatPairs();
|
||||
WORD operator==(const FloatPairs &someFloatPair)const;
|
||||
float column(void)const;
|
||||
void column(float newColumn);
|
||||
float row(void)const;
|
||||
void row(float newRow);
|
||||
void setPairs(float newColumn,float newRow);
|
||||
void setPairs(int newColumn,int newRow);
|
||||
static int max(int firstVal,int secondVal);
|
||||
static int min(int firstVal,int secondVal);
|
||||
private:
|
||||
float mColumn;
|
||||
float mRow;
|
||||
};
|
||||
|
||||
inline
|
||||
FloatPairs::FloatPairs(void)
|
||||
: mColumn(0.00), mRow(0.00)
|
||||
{
|
||||
}
|
||||
|
||||
inline
|
||||
FloatPairs::FloatPairs(float column,float row)
|
||||
: mColumn(column), mRow(row)
|
||||
{
|
||||
}
|
||||
|
||||
inline
|
||||
FloatPairs::~FloatPairs()
|
||||
{
|
||||
}
|
||||
|
||||
inline
|
||||
WORD FloatPairs::operator==(const FloatPairs &someFloatPair)const
|
||||
{
|
||||
return (mColumn==someFloatPair.mColumn && mRow==someFloatPair.mRow);
|
||||
}
|
||||
|
||||
inline
|
||||
float FloatPairs::column(void)const
|
||||
{
|
||||
return mColumn;
|
||||
}
|
||||
|
||||
inline
|
||||
void FloatPairs::column(float newColumn)
|
||||
{
|
||||
mColumn=newColumn;
|
||||
}
|
||||
|
||||
inline
|
||||
float FloatPairs::row(void)const
|
||||
{
|
||||
return mRow;
|
||||
}
|
||||
|
||||
inline
|
||||
void FloatPairs::row(float newRow)
|
||||
{
|
||||
mRow=newRow;
|
||||
}
|
||||
|
||||
inline
|
||||
void FloatPairs::setPairs(float newColumn,float newRow)
|
||||
{
|
||||
mColumn=newColumn;
|
||||
mRow=newRow;
|
||||
}
|
||||
|
||||
inline
|
||||
void FloatPairs::setPairs(int newColumn,int newRow)
|
||||
{
|
||||
mColumn=(float)newColumn;
|
||||
mRow=(float)newRow;
|
||||
}
|
||||
|
||||
inline
|
||||
int FloatPairs::max(int firstVal,int secondVal)
|
||||
{
|
||||
return (firstVal>secondVal?firstVal:secondVal);
|
||||
}
|
||||
|
||||
inline
|
||||
int FloatPairs::min(int firstVal,int secondVal)
|
||||
{
|
||||
return (firstVal<secondVal?firstVal:secondVal);
|
||||
}
|
||||
#endif
|
||||
Reference in New Issue
Block a user