mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-26 02:35:38 +08:00
refs #484 Trigonometry methods in CAngle.
This commit is contained in:
@@ -31,5 +31,20 @@ namespace BlackMisc
|
|||||||
{
|
{
|
||||||
return BlackMisc::Math::CMathUtils::PI();
|
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()));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -60,6 +60,15 @@ namespace BlackMisc
|
|||||||
|
|
||||||
//! PI as convenience method
|
//! PI as convenience method
|
||||||
static const double &PI();
|
static const double &PI();
|
||||||
|
|
||||||
|
//! Sine of angle
|
||||||
|
double sin() const;
|
||||||
|
|
||||||
|
//! Cosine of angle
|
||||||
|
double cos() const;
|
||||||
|
|
||||||
|
//! Tangent of angle
|
||||||
|
double tan() const;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user