75 lines
1.2 KiB
C++
75 lines
1.2 KiB
C++
#include <analytic/pairs.hpp>
|
|
|
|
FloatPairs::FloatPairs(void)
|
|
: mColumn(0.00), mRow(0.00)
|
|
{
|
|
}
|
|
|
|
FloatPairs::FloatPairs(const FloatPairs &someFloatPairs)
|
|
{
|
|
*this=someFloatPairs;
|
|
}
|
|
|
|
FloatPairs::FloatPairs(double column,double row)
|
|
: mColumn(column), mRow(row)
|
|
{
|
|
}
|
|
|
|
FloatPairs::~FloatPairs()
|
|
{
|
|
}
|
|
|
|
BOOL FloatPairs::operator==(const FloatPairs &someFloatPair)const
|
|
{
|
|
return (mColumn==someFloatPair.mColumn && mRow==someFloatPair.mRow);
|
|
}
|
|
|
|
FloatPairs &FloatPairs::operator=(const FloatPairs &someFloatPairs)
|
|
{
|
|
column(someFloatPairs.column());
|
|
row(someFloatPairs.row());
|
|
return *this;
|
|
}
|
|
|
|
double FloatPairs::column(void)const
|
|
{
|
|
return mColumn;
|
|
}
|
|
|
|
void FloatPairs::column(double newColumn)
|
|
{
|
|
mColumn=newColumn;
|
|
}
|
|
|
|
double FloatPairs::row(void)const
|
|
{
|
|
return mRow;
|
|
}
|
|
|
|
void FloatPairs::row(double newRow)
|
|
{
|
|
mRow=newRow;
|
|
}
|
|
|
|
void FloatPairs::setPairs(double newColumn,double newRow)
|
|
{
|
|
mColumn=newColumn;
|
|
mRow=newRow;
|
|
}
|
|
|
|
void FloatPairs::setPairs(int newColumn,int newRow)
|
|
{
|
|
mColumn=(double)newColumn;
|
|
mRow=(double)newRow;
|
|
}
|
|
|
|
int FloatPairs::fpmax(int firstVal,int secondVal)
|
|
{
|
|
return (firstVal>secondVal?firstVal:secondVal);
|
|
}
|
|
|
|
int FloatPairs::fpmin(int firstVal,int secondVal)
|
|
{
|
|
return (firstVal<secondVal?firstVal:secondVal);
|
|
}
|