idek stuff like stack
This commit is contained in:
@@ -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(),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user