idek stuff like stack

This commit is contained in:
2025-08-15 22:59:58 -04:00
parent a7dfacb83e
commit f4aef3a983
15 changed files with 138 additions and 42 deletions

View File

@@ -1,4 +1,4 @@
use crate::util::{F32Util, impl_op};
use crate::{util::{impl_op, F32Util}, UiNum};
use std::ops::*;
#[repr(C)]
@@ -52,8 +52,11 @@ impl Neg for Vec2 {
}
}
impl From<(f32, f32)> for Vec2 {
fn from((x, y): (f32, f32)) -> Self {
Self { x, y }
impl<T: UiNum, U: UiNum> From<(T, U)> for Vec2 {
fn from((x, y): (T, U)) -> Self {
Self {
x: x.to_f32(),
y: y.to_f32(),
}
}
}