mirror of
https://github.com/RawAccelOfficial/rawaccel.git
synced 2025-05-10 18:06:38 +02:00
fix lp_distance function
just for correctness, input is always in first quadrant when invoked from modifier
This commit is contained in:
parent
a69f398964
commit
2198512f79
1 changed files with 1 additions and 1 deletions
|
@ -33,5 +33,5 @@ inline double magnitude(const vec2d& v)
|
|||
|
||||
inline double lp_distance(const vec2d& v, double p)
|
||||
{
|
||||
return pow(pow(v.x, p) + pow(v.y, p), 1 / p);
|
||||
return pow(pow(fabs(v.x), p) + pow(fabs(v.y), p), 1 / p);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue