Skip to documentation
SLOP

tiny.geometry.Segment

Reference tiny.geometry Segment

Defined in tiny.geometry.

The points a + (b - a) * t for t in [0, 1].

API (4)

Actions

Public operations.

Fields and members

Public fields and members.

No direct callersNo direct callstiny.geometrySegment
Static calls · unresolved targets: unknown · external targets: unknown.

Source

Source: lib/geometry/src/primitive.zig:24

zig
/// The points `a + (b - a) * t` for `t` in [0, 1].pub const Segment = struct {    a: Vec3,    b: Vec3,    pub fn at(segment: Segment, t: f32) Vec3 {        return segment.a.add(segment.b.sub(segment.a).scale(t));    }    pub fn bounds(segment: Segment) Aabb {        return .{ .min = segment.a.min(segment.b), .max = segment.a.max(segment.b) };    }};

Source: lib/geometry/src/root.zig:14

zig
pub const Segment = primitive.Segment;

Audit

Definitions3
Public names3
Members2
Version26.7.0
Revisiondaab053ee433