mirror of
https://github.com/emilk/egui.git
synced 2026-08-31 05:40:03 -04:00
Implement bytemuck behind a feature (#775)
This commit is contained in:
@@ -6,8 +6,10 @@ use std::ops::{Add, AddAssign, Div, Mul, MulAssign, Neg, Sub, SubAssign};
|
||||
/// emath represents positions using [`crate::Pos2`].
|
||||
///
|
||||
/// Normally the units are points (logical pixels).
|
||||
#[repr(C)]
|
||||
#[derive(Clone, Copy, Default, PartialEq)]
|
||||
#[cfg_attr(feature = "serde", derive(serde::Deserialize, serde::Serialize))]
|
||||
#[cfg_attr(feature = "bytemuck", derive(bytemuck::Pod, bytemuck::Zeroable))]
|
||||
pub struct Vec2 {
|
||||
pub x: f32,
|
||||
pub y: f32,
|
||||
|
||||
Reference in New Issue
Block a user