MCPcopy Create free account
hub / github.com/PerroEngine/Perro / expect_vec2

Function expect_vec2

perro_source/core/perro_animation/src/panim/fields.rs:425–430  ·  view source on GitHub ↗
(value: &SceneValue, key: &str, line_no: usize)

Source from the content-addressed store, hash-verified

423 return Ok(v as i32);
424 }
425 Err(format!("line {}: `{}` expects i32", line_no, key))
426}
427
428fn expect_bool(value: &SceneValue, key: &str, line_no: usize) -> Result<bool, String> {
429 value
430 .as_bool()
431 .ok_or_else(|| format!("line {}: `{}` expects bool", line_no, key))
432}
433

Callers 2

parse_node_2d_actionFunction · 0.85

Calls 1

as_vec2Method · 0.45

Tested by

no test coverage detected