Segment
Generated from engine/math/segment.h at aceb130. The text under each declaration is the header's own comment, word for word. About the reference says how these pages are made.
Audience: game code.
#include "engine/math/segment.h" · namespace labrador
struct Segment
Section titled “struct Segment”point_0
Section titled “point_0”Point2F point_0 = Point2F::zero;point_1
Section titled “point_1”Point2F point_1 = Point2F::zero;Segment · operator=
Section titled “Segment · operator=”Segment(const Segment&) = default;Segment& operator=(const Segment&) = default;Segment(const Point2F& point_0, const Point2F& point_1);Segment(float x0, float y0, float x1, float y1);operator== · operator!=
Section titled “operator== · operator!=”bool operator!=(const Segment& other) const;direction
Section titled “direction”length
Section titled “length”float length() const;center
Section titled “center”Point2F center() const;Related types
Section titled “Related types”Named in the public declarations above: Vector2F.
In the samples and tests
Section titled “In the samples and tests”The files that include this header directly. A file can also reach it through another header.
samples/components/shape_outline.htests/math/ericson_math_tests.cpp,rectangle_rotated_tests.cpp,shape_intersect_tests.cpp,triangle_tests.cpptests/render/draw_object_tests.cpp
Explained in
Section titled “Explained in”No guide or concept page links to this header yet.
Development documentation (unreleased). Built from Labrador aceb130 of 2026-11-20.