add LengthSqr
This commit is contained in:
parent
128aab9252
commit
1eaf2da087
@ -48,6 +48,12 @@ namespace a8
|
||||
return v < hi ? (v > lo ? v : lo) : hi;
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
const T& LengthSqr(const T& v)
|
||||
{
|
||||
return v.x * v.x + v.y * v.y;
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
void SetToVector(std::set<T>& set_v, std::vector<T>& vector_v)
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user