Skip to content

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.

Browse the math module

#include "engine/math/segment.h" · namespace mattmath

struct Segment
mattmath::Point2F point_0 = mattmath::Point2F::ZERO;
mattmath::Point2F point_1 = mattmath::Point2F::ZERO;
Segment() = default;
Segment(const Segment&) = default;
Segment(const mattmath::Point2F& point_0,
const mattmath::Point2F& point_1);
Segment(float x0, float y0, float x1, float y1);
bool operator==(const Segment& other) const;
bool operator!=(const Segment& other) const;
mattmath::Vector2F direction() const;
float length() const;
mattmath::Point2F center() const;

Named in the public declarations above: Vector2F.

The files that include this header directly. A file can also reach it through another header.

Development documentation (unreleased). Built from Labrador 862e08b of 2026-10-08.