mirror of
https://codeberg.org/unspeaker/tengri.git
synced 2025-12-08 12:46:44 +01:00
constify and deinline some methods
This commit is contained in:
parent
4279503681
commit
18a01b8355
10 changed files with 124 additions and 92 deletions
|
|
@ -41,12 +41,12 @@ try_from_expr!(<'a, E>: Bsp<RenderBox<'a, E>, RenderBox<'a, E>>: |state, iter| {
|
|||
}
|
||||
});
|
||||
impl<A, B> Bsp<A, B> {
|
||||
#[inline] pub fn n (a: A, b: B) -> Self { Self(North, a, b) }
|
||||
#[inline] pub fn s (a: A, b: B) -> Self { Self(South, a, b) }
|
||||
#[inline] pub fn e (a: A, b: B) -> Self { Self(East, a, b) }
|
||||
#[inline] pub fn w (a: A, b: B) -> Self { Self(West, a, b) }
|
||||
#[inline] pub fn a (a: A, b: B) -> Self { Self(Above, a, b) }
|
||||
#[inline] pub fn b (a: A, b: B) -> Self { Self(Below, a, b) }
|
||||
#[inline] pub const fn n (a: A, b: B) -> Self { Self(North, a, b) }
|
||||
#[inline] pub const fn s (a: A, b: B) -> Self { Self(South, a, b) }
|
||||
#[inline] pub const fn e (a: A, b: B) -> Self { Self(East, a, b) }
|
||||
#[inline] pub const fn w (a: A, b: B) -> Self { Self(West, a, b) }
|
||||
#[inline] pub const fn a (a: A, b: B) -> Self { Self(Above, a, b) }
|
||||
#[inline] pub const fn b (a: A, b: B) -> Self { Self(Below, a, b) }
|
||||
}
|
||||
pub trait BspAreas<E: Output, A: Content<E>, B: Content<E>> {
|
||||
fn direction (&self) -> Direction;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue