refs #484 Trigonometry methods in CAngle.

This commit is contained in:
Mathew Sutcliffe
2015-10-19 02:01:53 +01:00
parent 9aebf555bf
commit 7483195b47
2 changed files with 24 additions and 0 deletions

View File

@@ -31,5 +31,20 @@ namespace BlackMisc
{
return BlackMisc::Math::CMathUtils::PI();
}
double CAngle::sin() const
{
return std::sin(this->value(CAngleUnit::rad()));
}
double CAngle::cos() const
{
return std::cos(this->value(CAngleUnit::rad()));
}
double CAngle::tan() const
{
return std::tan(this->value(CAngleUnit::rad()));
}
}
}

View File

@@ -60,6 +60,15 @@ namespace BlackMisc
//! PI as convenience method
static const double &PI();
//! Sine of angle
double sin() const;
//! Cosine of angle
double cos() const;
//! Tangent of angle
double tan() const;
};
}
}