Add geom::frac
This commit is contained in:
parent
e8076f528f
commit
2b46b38da2
1 changed files with 6 additions and 0 deletions
|
|
@ -25,6 +25,12 @@ namespace psemek::geom
|
||||||
return x * x;
|
return x * x;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
template <typename T>
|
||||||
|
auto frac(T const & x)
|
||||||
|
{
|
||||||
|
return x - std::floor(x);
|
||||||
|
}
|
||||||
|
|
||||||
template <typename T>
|
template <typename T>
|
||||||
T deg(T x)
|
T deg(T x)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue