ltk_primitives 0.3.5

Primitive types and helpers for League Toolkit
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
use glam::Vec3;

/// A sphere. Origin and radius.
#[derive(Debug, Clone, Copy, PartialEq)]
pub struct Sphere {
    pub origin: Vec3,
    pub radius: f32,
}

impl Sphere {
    pub const INFINITE: Sphere = Self::new(Vec3::ZERO, f32::INFINITY);

    #[inline]
    #[must_use]
    pub const fn new(origin: Vec3, radius: f32) -> Self {
        Self { origin, radius }
    }
}