Skip to main content

Crate lunar_math

Crate lunar_math 

Source
Expand description

math re-exports and custom utilities

this crate wraps glam for vector/matrix math and provides engine-specific types like Transform, Color, and Rect.

§re-exports

the full glam crate is re-exported for convenience, so you can access any glam types directly via lunar_math::glam.

Re-exports§

pub use glam;

Macros§

color
create a Color from components.
query
convenience wrapper for creating ecs query types.
rect
create a Rect from components.
transform
create a Transform from components.

Structs§

Color
RGBA color type.
LocalTransform
local transform: position, rotation, and scale relative to the parent entity.
Rect
2D rectangle: position + size.
ScreenRect
integer pixel-space rectangle, used for scissor regions and screen-space bounds.
Transform
2D transform component: position, rotation, scale.
WorldTransform
world transform: absolute position, rotation, and scale in world space.

Type Aliases§

Mat2
2x2 matrix type alias.
Mat3
3x3 matrix type alias.
Mat4
4x4 matrix type alias.
Quat
quaternion type alias.
Vec2
2D vector type alias.
Vec3
3D vector type alias.
Vec4
4D vector type alias.
Vec3A
16-byte aligned 3D vector type alias.