#[repr(C)]
#[repr(align(4))]
pub struct IpcSegmentInfo { pub x: f32, pub y: f32, pub r: f32, pub dir: f32, pub dist: f32, pub idx: u32, pub bot_id: u64, pub is_self: bool, }
Expand description

IPC representation of a snake segment.

Fields

x: f32

Relative position X in world orientation

y: f32

Relative position Y in world orientation

r: f32

Segment radius

dir: f32

Direction angle relative to your heading (range -π to +π)

dist: f32

Distance between the center of your head and the segment’s center

idx: u32

Segment number starting from head (idx == 0)

bot_id: u64

Bot ID

is_self: bool

True if this segment belongs to ones own snake

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.