Beispiel #1
0
Feet Feet::operator/(const Distance& rhs) const
{
	if(rhs.asFeet() == 0)
		throw std::logic_error("Divide by zero");
	return Feet(this->asFeet() / rhs.asFeet());
}
Beispiel #2
0
Feet::Feet(const Distance& other) :
	Distance(other.asFeet())
{
}
Beispiel #3
0
Feet Feet::operator*(const Distance& rhs) const
{
	return Feet(this->asFeet() * rhs.asFeet());
}