MCPcopy Create free account
hub / github.com/OxideEngine/Oxide / clamp

Function clamp

oxide_math/test/vector3.rs:116–129  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

114
115 #[test]
116 fn clamp() {
117 let new_vector = vector3::Vector3 {
118 x: 3.0,
119 y: 4.0,
120 z: 5.0,
121 };
122 let tar_vector = vector3::Vector3 {
123 x: 3.0,
124 y: 3.0,
125 z: 3.0,
126 };
127 let res_vector = new_vector.clamp(0.0, 3.0);
128 assert_vector3_approx_eq(&tar_vector, &res_vector);
129 }
130
131 #[test]
132 fn project_on_to() {

Callers

nothing calls this directly

Calls 2

assert_vector3_approx_eqFunction · 0.85
clampMethod · 0.45

Tested by

no test coverage detected