BEEP-8 Helper Lib 1.0.0
Loading...
Searching...
No Matches
Line Struct Reference

Represents a line segment in 2D space defined by two points. More...

#include <submath.h>

Public Member Functions

 Line ()=default
 Default constructor that initializes both points to (0, 0).
 
 Line (const Vec &p0, const Vec &p1)
 Constructor that initializes the line with given starting and ending points.
 

Public Attributes

Vec pos0
 The starting point of the line.
 
Vec pos1
 The ending point of the line.
 

Detailed Description

Represents a line segment in 2D space defined by two points.

The Line structure defines a line segment with two endpoints, pos0 and pos1, each represented by a vec structure. This structure can be used to represent any straight line between two coordinates in a 2D plane.

Note
The default constructor initializes both points to the origin (0, 0).

Constructor & Destructor Documentation

◆ Line()

Line::Line ( const Vec & p0,
const Vec & p1 )
inline

Constructor that initializes the line with given starting and ending points.

Parameters
p0The starting point of the line.
p1The ending point of the line.

The documentation for this struct was generated from the following file: