Skip to content

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.

Browse the math module

Audience: game code.

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

struct Segment
Point2F point_0 = Point2F::zero;
Point2F point_1 = Point2F::zero;
Segment() = default;
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);
bool operator==(const Segment& other) const;
bool operator!=(const Segment& other) const;
Vector2F direction() const;
float length() const;
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.

No guide or concept page links to this header yet.

Development documentation (unreleased). Built from Labrador aceb130 of 2026-11-20.

All documentation versions