1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
//! Minimal serde-friendly math types for op payloads.
//!
//! These exist so payloads like
//! [`RemoteEntitySnapshot`](crate::game_common::reconciliation::op_payloads::RemoteEntitySnapshot)
//! have ready-made types to plug in and so a wire protocol has stable shapes
//! to serialize. They are intentionally plain data with no operator algebra.
//!
//! Applications with real math needs should use their own types (glam,
//! nalgebra, …): every payload that mentions these is generic over the vector
//! and quaternion types, so substituting yours only requires `Serialize`,
//! `Deserialize`, `Clone`, `Debug`, and `Default`.
//!
//! Note: `plaza_client_utils` deliberately defines its own richer `Vec2`/`Vec3`/
//! `Quat` with operators and slerp. It has no dependency on this crate: that
//! keeps client builds (wasm, engine plugins) free of the server's async
//! runtime, so the small overlap here is intentional.
use ;
/// A 2D vector.
/// A 3D vector.
/// A quaternion, ordered `x, y, z, w`.
/// Defaults to the identity rotation, not all-zeroes, which is not a valid
/// rotation.