MCPcopy Create free account
hub / github.com/Vulae/pkmc / new_partial

Method new_partial

pkmc-server/src/command.rs:57–71  ·  view source on GitHub ↗
(
        relative_coordinates: Vec3<f64>,
        local_coordinates: Vec3<f64>,
        local_forward: Vec3<f64>,
    )

Source from the content-addressed store, hash-verified

55 }
56
57 pub fn new_partial(
58 relative_coordinates: Vec3<f64>,
59 local_coordinates: Vec3<f64>,
60 local_forward: Vec3<f64>,
61 ) -> Self {
62 let forward = local_forward.normalized();
63 let fake_left = Vec3::new(0.0, 1.0, 0.0).cross(&forward);
64 let fake_upward = forward.cross(&fake_left);
65 Self::new(
66 relative_coordinates,
67 local_coordinates,
68 local_forward,
69 fake_upward,
70 )
71 }
72
73 fn local_left(&self) -> Vec3<f64> {
74 self.local_forward.cross(&self.local_up)

Callers

nothing calls this directly

Calls 2

normalizedMethod · 0.80
crossMethod · 0.80

Tested by

no test coverage detected