Segment
Generated from engine/math/segment.h at 862e08b. The text under each declaration is the header's own comment, word for word. About the reference says how these pages are made.
#include "engine/math/segment.h" · namespace mattmath
struct Segment
Section titled “struct Segment”point_0 · point_1
Section titled “point_0 · point_1”mattmath::Point2F point_0 = mattmath::Point2F::ZERO;mattmath::Point2F point_1 = mattmath::Point2F::ZERO;Segment
Section titled “Segment”Segment(const Segment&) = default;Segment(const mattmath::Point2F& point_0, const mattmath::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”mattmath::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.
tests/math/ericson_math_tests.cpp,rectangle_rotated_tests.cpp,shape_intersect_tests.cpp,triangle_tests.cpptests/render/draw_object_tests.cpp
Development documentation (unreleased). Built from Labrador 862e08b of 2026-10-08.