// Operator function for 'greater than' that
// compares volumes of CBox objects.
bool CBox::operator>(const CBox& aBox) const
{
  return this->Volume() > aBox.Volume();
}
Ejemplo n.º 2
0
Archivo: 源.cpp Proyecto: Hackergeek/C
	bool operator == (const CBox& aBox) const
	{
		return this->Volume() == aBox.Volume();
	}
Ejemplo n.º 3
0
Archivo: 源.cpp Proyecto: Hackergeek/C
inline bool operator > (const double& value, const CBox& aBox)
{
	return value > aBox.Volume();
}
Ejemplo n.º 4
0
Archivo: 源.cpp Proyecto: Hackergeek/C
	bool operator < (const CBox& aBox) const
	{
		return this->Volume() < aBox.Volume();
	}
Ejemplo n.º 5
0
 // Function to compare two boxes which returns true (1)
 // if the first is greater than the second, and false (0) otherwise
 int Compare(const CBox& xBox) const {
     return this->Volume() > xBox.Volume();
 }
// Function for testing if a constant is < CBox object
bool operator<(const double& value, const CBox& aBox)
{ return value < aBox.Volume(); }
// Operator to return the free volume in a packed CBox
double operator%( const CBox& aBox, const CBox& bBox)
{ return aBox.Volume() - (aBox / bBox) * bBox.Volume(); }
Ejemplo n.º 8
0
 // Function to compare two boxes which returns true
 // if the first is greater than the second, and false otherwise
 bool Compare(CBox& xBox) {
     return this->Volume() > xBox.Volume();
 }