initial text impl

This commit is contained in:
2025-08-23 21:15:39 -04:00
parent abcbc267b5
commit 5ce6fca275
33 changed files with 530 additions and 117 deletions

View File

@@ -1,4 +1,7 @@
use crate::{util::{impl_op, F32Util}, UiNum};
use crate::{
layout::UiNum,
util::{F32Util, impl_op},
};
use std::ops::*;
#[repr(C)]
@@ -28,6 +31,27 @@ impl Vec2 {
y: self.y.lerp(from.y, to.y),
}
}
pub const fn round(self) -> Self {
Self {
x: self.x.round(),
y: self.y.round(),
}
}
pub const fn floor(self) -> Self {
Self {
x: self.x.floor(),
y: self.y.floor(),
}
}
pub const fn ceil(self) -> Self {
Self {
x: self.x.ceil(),
y: self.y.ceil(),
}
}
}
impl const From<f32> for Vec2 {