Tweeker Commit (Have Fun Reviewing This)
This commit is contained in:
@@ -10,9 +10,11 @@ namespace J3ML::LinearAlgebra {
|
||||
/// A 2D (x, y) ordered pair.
|
||||
class Vector2 {
|
||||
public:
|
||||
|
||||
float x = 0;
|
||||
float y = 0;
|
||||
public:
|
||||
enum {Dimensions = 2};
|
||||
|
||||
public:
|
||||
/// Default Constructor - Initializes values to zero
|
||||
Vector2();
|
||||
/// Constructs a new Vector2 with the value (X, Y)
|
||||
@@ -174,9 +176,14 @@ namespace J3ML::LinearAlgebra {
|
||||
Vector2& operator*=(float scalar);
|
||||
Vector2& operator/=(float scalar);
|
||||
|
||||
public:
|
||||
float x = 0;
|
||||
float y = 0;
|
||||
|
||||
/// Tests if the triangle a->b->c is oriented counter-clockwise.
|
||||
/** Returns true if the triangle a->b->c is oriented counter-clockwise, when viewed in the XY-plane
|
||||
where x spans to the right and y spans up.
|
||||
Another way to think of this is that this function returns true, if the point C lies to the left
|
||||
of the directed line AB. */
|
||||
static bool OrientedCCW(const Vector2 &, const Vector2 &, const Vector2 &);
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
Reference in New Issue
Block a user