adding sign function for just float coordinates
This commit is contained in:
parent
9fcd2b2e9e
commit
e78cf39d6d
@ -1,6 +1,11 @@
|
||||
#pragma once
|
||||
#ifndef UTILITY_H
|
||||
|
||||
static float sign(float x1, float y1, float x2, float y2, float x3, float y3)
|
||||
{
|
||||
return (x1 - x3) * (y2 - y3) - (x2 - x3) * (y1 - y3);
|
||||
}
|
||||
|
||||
static float sign (Point &p1, Point &p2, Point &p3)
|
||||
{
|
||||
return (p1.x() - p3.x()) * (p2.y() - p3.y()) - (p2.x() - p3.x()) * (p1.y() - p3.y());
|
||||
|
Loading…
x
Reference in New Issue
Block a user