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

Function clamp

oxide_math/test/vector4.rs:128–143  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

126
127 #[test]
128 fn clamp() {
129 let new_vector = vector4::Vector4 {
130 x: 3.0,
131 y: 4.0,
132 z: 5.0,
133 w: 6.0,
134 };
135 let tar_vector = vector4::Vector4 {
136 x: 3.0,
137 y: 3.0,
138 z: 3.0,
139 w: 3.0,
140 };
141 let res_vector = new_vector.clamp(0.0, 3.0);
142 assert_vector4_approx_eq(&tar_vector, &res_vector);
143 }
144
145 #[test]
146 fn project_on_to() {

Callers

nothing calls this directly

Calls 2

assert_vector4_approx_eqFunction · 0.85
clampMethod · 0.45

Tested by

no test coverage detected