Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

godot-core: builtin: reimplement Rect2i to reduce need of inner usage #218

Merged
merged 3 commits into from
Apr 12, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions godot-core/src/builtin/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ mod real_mod {
/// A 4-dimensional vector from [`glam`]. Using a floating-point format compatible with [`real`].
pub type RVec4 = glam::Vec4;

/// A 2x2 column-major matrix from [`glam`]. Using a floating-point format compatible with [`real`].
/// A 2x2 column-major matrix from [`glam`]. Using a floating-point format compatible with [`real`].
pub type RMat2 = glam::Mat2;
/// A 3x3 column-major matrix from [`glam`]. Using a floating-point format compatible with [`real`].
pub type RMat3 = glam::Mat3;
Expand Down Expand Up @@ -279,7 +279,7 @@ mod real_mod {
/// A 4-dimensional vector from [`glam`]. Using a floating-point format compatible with [`real`].
pub type RVec4 = glam::DVec4;

/// A 2x2 column-major matrix from [`glam`]. Using a floating-point format compatible with [`real`].
/// A 2x2 column-major matrix from [`glam`]. Using a floating-point format compatible with [`real`].
pub type RMat2 = glam::DMat2;
/// A 3x3 column-major matrix from [`glam`]. Using a floating-point format compatible with [`real`].
pub type RMat3 = glam::DMat3;
Expand All @@ -302,6 +302,8 @@ pub use crate::real;
pub(crate) use real_mod::*;
pub use real_mod::{consts as real_consts, real};

pub(crate) use glam::{IVec2, IVec3, IVec4};

/// A macro to coerce float-literals into the real type. Mainly used where
/// you'd normally use a suffix to specity the type, such as `115.0f32`.
///
Expand Down Expand Up @@ -330,6 +332,7 @@ macro_rules! real {
/// The side of a [`Rect2`] or [`Rect2i`].
///
/// _Godot equivalent: `@GlobalScope.Side`_
#[derive(Copy, Clone)]
#[repr(C)]
pub enum RectSide {
Left = 0,
Expand Down
Loading