diff --git a/.gitignore b/.gitignore index f8a150654c..b8efa21749 100644 --- a/.gitignore +++ b/.gitignore @@ -15,6 +15,7 @@ assets/scripts/tlconfig.lua **.log **build/ .html +.idea/ /assets/**/*.lad.json -/docs/src/ladfiles/*.lad.json \ No newline at end of file +/docs/src/ladfiles/*.lad.json diff --git a/Cargo.toml b/Cargo.toml index e0402aa5e6..1fe434c74a 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -23,9 +23,7 @@ features = ["lua54", "rhai"] [features] default = [ "core_functions", - "bevy_core_bindings", "bevy_ecs_bindings", - "bevy_hierarchy_bindings", "bevy_input_bindings", "bevy_math_bindings", "bevy_reflect_bindings", @@ -48,9 +46,7 @@ luau = ["bevy_mod_scripting_lua/luau", "lua"] # bindings core_functions = ["bevy_mod_scripting_functions/core_functions"] -bevy_core_bindings = ["bevy_mod_scripting_functions/bevy_core"] bevy_ecs_bindings = ["bevy_mod_scripting_functions/bevy_ecs"] -bevy_hierarchy_bindings = ["bevy_mod_scripting_functions/bevy_hierarchy"] bevy_input_bindings = ["bevy_mod_scripting_functions/bevy_input"] bevy_math_bindings = ["bevy_mod_scripting_functions/bevy_math"] bevy_reflect_bindings = ["bevy_mod_scripting_functions/bevy_reflect"] @@ -75,6 +71,8 @@ profile_with_tracy = ["bevy/trace_tracy"] [dependencies] bevy = { workspace = true } +bevy_math = { workspace = true } +bevy_reflect = { workspace = true } bevy_mod_scripting_core = { workspace = true } bevy_mod_scripting_lua = { path = "crates/languages/bevy_mod_scripting_lua", version = "0.13.0", optional = true } bevy_mod_scripting_rhai = { path = "crates/languages/bevy_mod_scripting_rhai", version = "0.13.0", optional = true } @@ -84,7 +82,9 @@ bevy_mod_scripting_derive = { workspace = true } [workspace.dependencies] profiling = { version = "1.0" } -bevy = { version = "0.15.3", default-features = false } +bevy = { version = "0.16.0", default-features = false } +bevy_math = { version = "0.16.0" } +bevy_reflect = { version = "0.16.0" } bevy_mod_scripting_core = { path = "crates/bevy_mod_scripting_core", version = "0.13.0" } bevy_mod_scripting_functions = { path = "crates/bevy_mod_scripting_functions", version = "0.13.0", default-features = false } bevy_mod_scripting_derive = { path = "crates/bevy_mod_scripting_derive", version = "0.13.0" } @@ -94,19 +94,17 @@ script_integration_test_harness = { path = "crates/testing_crates/script_integra test_utils = { path = "crates/testing_crates/test_utils" } [dev-dependencies] -bevy = { workspace = true, default-features = true } +bevy = { workspace = true, default-features = true, features = ["std"] } clap = { version = "4.1", features = ["derive"] } -rand = "0.8.5" -bevy_console = "0.13" -# rhai-rand = "0.1" +rand = "0.9.1" criterion = { version = "0.5" } -ansi-parser = "0.9" ladfile_builder = { path = "crates/ladfile_builder", version = "0.3.3" } script_integration_test_harness = { workspace = true } test_utils = { workspace = true } libtest-mimic = "0.8" tracing-tracy = "0.11" regex = "1.11" +bevy_console = "0.14" [workspace] members = [ diff --git a/assets/tests/add_system/added_systems_run_in_parallel.lua b/assets/tests/add_system/added_systems_run_in_parallel.lua index 2adf8104d0..bd7951c729 100644 --- a/assets/tests/add_system/added_systems_run_in_parallel.lua +++ b/assets/tests/add_system/added_systems_run_in_parallel.lua @@ -21,21 +21,30 @@ function on_test() local expected_dot_graph = [[ digraph { - node_0 [label="bevy_mod_scripting_core::bindings::allocator::garbage_collector"]; - node_1 [label="on_test_post_update"]; - node_2 [label="script_integration_test_harness::dummy_before_post_update_system"]; - node_3 [label="script_integration_test_harness::dummy_post_update_system"]; - node_4 [label="custom_system_a"]; - node_5 [label="custom_system_b"]; - node_6 [label="SystemSet GarbageCollection"]; - node_7 [label="SystemSet ScriptSystem(custom_system_a)"]; - node_8 [label="SystemSet ScriptSystem(custom_system_b)"]; - node_0 -> node_6 [color=red, label="child of", arrowhead=diamond]; - node_4 -> node_7 [color=red, label="child of", arrowhead=diamond]; - node_5 -> node_8 [color=red, label="child of", arrowhead=diamond]; - node_1 -> node_4 [color=blue, label="runs before", arrowhead=normal]; - node_1 -> node_5 [color=blue, label="runs before", arrowhead=normal]; - node_2 -> node_3 [color=blue, label="runs before", arrowhead=normal]; + node_0 [label="bevy_asset::assets::Assets::asset_events"]; + node_1 [label="bevy_asset::assets::Assets::asset_events"]; + node_2 [label="bevy_asset::assets::Assets<()>::asset_events"]; + node_3 [label="bevy_asset::assets::Assets::asset_events"]; + node_4 [label="bevy_mod_scripting_core::bindings::allocator::garbage_collector"]; + node_5 [label="on_test_post_update"]; + node_6 [label="script_integration_test_harness::dummy_before_post_update_system"]; + node_7 [label="script_integration_test_harness::dummy_post_update_system"]; + node_8 [label="custom_system_a"]; + node_9 [label="custom_system_b"]; + node_10 [label="SystemSet AssetEvents"]; + node_11 [label="SystemSet GarbageCollection"]; + node_12 [label="SystemSet ScriptSystem(custom_system_a)"]; + node_13 [label="SystemSet ScriptSystem(custom_system_b)"]; + node_0 -> node_10 [color=red, label="child of", arrowhead=diamond]; + node_1 -> node_10 [color=red, label="child of", arrowhead=diamond]; + node_2 -> node_10 [color=red, label="child of", arrowhead=diamond]; + node_3 -> node_10 [color=red, label="child of", arrowhead=diamond]; + node_4 -> node_11 [color=red, label="child of", arrowhead=diamond]; + node_8 -> node_12 [color=red, label="child of", arrowhead=diamond]; + node_9 -> node_13 [color=red, label="child of", arrowhead=diamond]; + node_5 -> node_8 [color=blue, label="runs before", arrowhead=normal]; + node_5 -> node_9 [color=blue, label="runs before", arrowhead=normal]; + node_6 -> node_7 [color=blue, label="runs before", arrowhead=normal]; } ]] diff --git a/assets/tests/add_system/added_systems_run_in_parallel.rhai b/assets/tests/add_system/added_systems_run_in_parallel.rhai index 4ab2ddc17a..b49d41b9b3 100644 --- a/assets/tests/add_system/added_systems_run_in_parallel.rhai +++ b/assets/tests/add_system/added_systems_run_in_parallel.rhai @@ -20,21 +20,30 @@ fn on_test() { let expected_dot_graph = ` digraph { - node_0 [label="bevy_mod_scripting_core::bindings::allocator::garbage_collector"]; - node_1 [label="on_test_post_update"]; - node_2 [label="script_integration_test_harness::dummy_before_post_update_system"]; - node_3 [label="script_integration_test_harness::dummy_post_update_system"]; - node_4 [label="custom_system_a"]; - node_5 [label="custom_system_b"]; - node_6 [label="SystemSet GarbageCollection"]; - node_7 [label="SystemSet ScriptSystem(custom_system_a)"]; - node_8 [label="SystemSet ScriptSystem(custom_system_b)"]; - node_0 -> node_6 [color=red, label="child of", arrowhead=diamond]; - node_4 -> node_7 [color=red, label="child of", arrowhead=diamond]; - node_5 -> node_8 [color=red, label="child of", arrowhead=diamond]; - node_1 -> node_4 [color=blue, label="runs before", arrowhead=normal]; - node_1 -> node_5 [color=blue, label="runs before", arrowhead=normal]; - node_2 -> node_3 [color=blue, label="runs before", arrowhead=normal]; + node_0 [label="bevy_asset::assets::Assets::asset_events"]; + node_1 [label="bevy_asset::assets::Assets::asset_events"]; + node_2 [label="bevy_asset::assets::Assets<()>::asset_events"]; + node_3 [label="bevy_asset::assets::Assets::asset_events"]; + node_4 [label="bevy_mod_scripting_core::bindings::allocator::garbage_collector"]; + node_5 [label="on_test_post_update"]; + node_6 [label="script_integration_test_harness::dummy_before_post_update_system"]; + node_7 [label="script_integration_test_harness::dummy_post_update_system"]; + node_8 [label="custom_system_a"]; + node_9 [label="custom_system_b"]; + node_10 [label="SystemSet AssetEvents"]; + node_11 [label="SystemSet GarbageCollection"]; + node_12 [label="SystemSet ScriptSystem(custom_system_a)"]; + node_13 [label="SystemSet ScriptSystem(custom_system_b)"]; + node_0 -> node_10 [color=red, label="child of", arrowhead=diamond]; + node_1 -> node_10 [color=red, label="child of", arrowhead=diamond]; + node_2 -> node_10 [color=red, label="child of", arrowhead=diamond]; + node_3 -> node_10 [color=red, label="child of", arrowhead=diamond]; + node_4 -> node_11 [color=red, label="child of", arrowhead=diamond]; + node_8 -> node_12 [color=red, label="child of", arrowhead=diamond]; + node_9 -> node_13 [color=red, label="child of", arrowhead=diamond]; + node_5 -> node_8 [color=blue, label="runs before", arrowhead=normal]; + node_5 -> node_9 [color=blue, label="runs before", arrowhead=normal]; + node_6 -> node_7 [color=blue, label="runs before", arrowhead=normal]; }`; assert_str_eq.call(dot_graph, expected_dot_graph, "Expected the schedule graph to match the expected graph"); diff --git a/benches/benchmarks.rs b/benches/benchmarks.rs index 82b3745d46..087538ae90 100644 --- a/benches/benchmarks.rs +++ b/benches/benchmarks.rs @@ -1,27 +1,28 @@ -use bevy::log::tracing_subscriber::layer::SubscriberExt; -use bevy::log::{tracing_subscriber, Level}; -use bevy::reflect::Reflect; -use bevy::utils::tracing; -use bevy::utils::tracing::span; +extern crate bevy_mod_scripting; +extern crate script_integration_test_harness; +extern crate test_utils; +use std::{collections::HashMap, path::PathBuf, sync::LazyLock, time::Duration}; + +use bevy::{ + log::{ + tracing, tracing::span, tracing_subscriber, tracing_subscriber::layer::SubscriberExt, Level, + }, + reflect::Reflect, +}; use bevy_mod_scripting_core::bindings::{ FromScript, IntoScript, Mut, Ref, ReflectReference, ScriptValue, Val, }; -use criterion::{criterion_main, measurement::Measurement, BenchmarkGroup, Criterion}; -use criterion::{BatchSize, BenchmarkFilter}; +use criterion::{ + criterion_main, measurement::Measurement, BatchSize, BenchmarkFilter, BenchmarkGroup, Criterion, +}; use regex::Regex; -use script_integration_test_harness::test_functions::rand::Rng; use script_integration_test_harness::{ make_test_lua_plugin, make_test_rhai_plugin, perform_benchmark_with_generator, run_lua_benchmark, run_plugin_script_load_benchmark, run_rhai_benchmark, + test_functions::rand::Rng, }; -use std::collections::HashMap; -use std::{path::PathBuf, sync::LazyLock, time::Duration}; use test_utils::{discover_all_tests, Test}; -extern crate bevy_mod_scripting; -extern crate script_integration_test_harness; -extern crate test_utils; - static ENABLE_PROFILING: LazyLock = LazyLock::new(|| std::env::var("ENABLE_PROFILING").is_ok()); diff --git a/codegen_bevy_features.txt b/codegen_bevy_features.txt index a2c7467ad3..f14d74c7a3 100644 --- a/codegen_bevy_features.txt +++ b/codegen_bevy_features.txt @@ -1 +1 @@ -bevy_asset,bevy_animation,bevy_core_pipeline,bevy_ui,bevy_pbr,bevy_render,bevy_text,bevy_sprite,file_watcher,multi_threaded \ No newline at end of file +bevy_asset,bevy_animation,bevy_core_pipeline,bevy_ui,bevy_pbr,bevy_render,bevy_text,bevy_sprite,file_watcher,multi_threaded,std,async_executor \ No newline at end of file diff --git a/crates/bevy_api_gen/Cargo.bootstrap.toml b/crates/bevy_api_gen/Cargo.bootstrap.toml index d34f8c99eb..04b6cf4532 100644 --- a/crates/bevy_api_gen/Cargo.bootstrap.toml +++ b/crates/bevy_api_gen/Cargo.bootstrap.toml @@ -6,8 +6,8 @@ edition = "2021" [dependencies] bevy_mod_scripting_core = { path = "{{BMS_CORE_PATH}}" } -bevy_reflect = { version = "0.15.3", features = [ - "bevy", +bevy_reflect = { version = "0.16.0", features = [ + "smol_str", "glam", "petgraph", "smallvec", diff --git a/crates/bevy_api_gen/Cargo.toml b/crates/bevy_api_gen/Cargo.toml index 5773d66271..33ab58b9ae 100644 --- a/crates/bevy_api_gen/Cargo.toml +++ b/crates/bevy_api_gen/Cargo.toml @@ -30,8 +30,6 @@ codegen-units = 8 incremental = false debug = false -[rust-analyzer.rustc] -source = "discover" [package.metadata.rust-analyzer] rustc_private = true @@ -41,7 +39,6 @@ log = "0.4" env_logger = "0.11" rustc_plugin = "0.12.0-nightly-2024-12-15" indexmap = "2" -tempdir = "0.3" cargo_metadata = "0.18" serde_json = "1" serde = "1" @@ -51,8 +48,7 @@ strum = { version = "0.26", features = ["derive"] } include_dir = "0.7" prettyplease = "0.2" convert_case = "0.6" -syn = { version = "2", features = ["parsing"], no-default-features = true } -clap-verbosity-flag = "2.2" +syn = { version = "2", features = ["parsing"], default-features = false } itertools = "0.12" chrono = "0.4" diff --git a/crates/bevy_api_gen/src/bin/main.rs b/crates/bevy_api_gen/src/bin/main.rs index d435cccb57..202102ad10 100644 --- a/crates/bevy_api_gen/src/bin/main.rs +++ b/crates/bevy_api_gen/src/bin/main.rs @@ -62,6 +62,9 @@ fn main() { .map(|s| s.to_owned()) .collect::>(); + // log all dependencies + debug!("Enabled dependencies: {}", dependencies.join(",")); + Some(dependencies) } _ => None, @@ -110,36 +113,34 @@ fn main() { if !output.is_dir() { panic!("Output is not a directory"); } - let crates = std::fs::read_dir(&output) - .expect("Could not read output directory") - .filter_map(|d| { - let entry = d.expect("Could not read entry in output directory"); - let path = entry.path(); - if path.extension().is_some_and(|ext| ext == "rs") - && path.file_stem().is_some_and(|s| s != "mod") - { - Some(path.file_stem().unwrap().to_owned()) - } else { - None - } - }); + let meta_loader = MetaLoader::new(vec![output.to_owned()], workspace_meta); - let mut crates: Vec<_> = crates - .map(|c| { - let name = c.to_str().unwrap().to_owned(); - log::info!("Collecting crate: {}", name); - let meta = meta_loader - .meta_for(&name) - .expect("Could not find meta file for crate"); - Crate { name, meta } + let mut crates = meta_loader + .iter_meta() + .filter_map(|m| { + log::debug!( + "Processing crate: {}, will generate: {}", + m.crate_name(), + m.will_generate() + ); + m.will_generate().then_some(Crate { + name: m.crate_name().to_owned(), + meta: m, + }) }) - .collect(); + .collect::>(); crates.sort_by(|a, b| a.name.cmp(&b.name)); - let context = Collect { crates, api_name }; + let json = serde_json::to_string_pretty( + &crates.iter().map(|c| c.name.clone()).collect::>(), + ) + .unwrap(); + + let collect = Collect { crates, api_name }; + let mut context = - Context::from_serialize(context).expect("Could not create template context"); + Context::from_serialize(collect).expect("Could not create template context"); extend_context_with_args(args.template_args.as_deref(), &mut context); @@ -148,6 +149,11 @@ fn main() { .expect("Failed to render mod.rs"); file.flush().unwrap(); log::info!("Succesfully generated mod.rs"); + + // put json of Collect context into stdout + std::io::stdout() + .write_all(json.as_bytes()) + .expect("Failed to write Collect context to stdout"); return; } _ => {} diff --git a/crates/bevy_api_gen/src/context.rs b/crates/bevy_api_gen/src/context.rs index 8ee79de8bb..5d1ab12825 100644 --- a/crates/bevy_api_gen/src/context.rs +++ b/crates/bevy_api_gen/src/context.rs @@ -94,29 +94,30 @@ pub(crate) const DEF_PATHS_REFLECT: [&str; 2] = ["bevy_reflect::PartialReflect", "reflect::PartialReflect"]; pub(crate) const DEF_PATHS_GET_TYPE_REGISTRATION: [&str; 2] = [ "bevy_reflect::GetTypeRegistration", - "reflect::GetTypeRegistration", + "type_registry::GetTypeRegistration", ]; /// A collection of traits which we search for in the codebase, some are included purely for the methods they provide, /// others are later used for quick lookup of the type "does this type implement Display" etc. -pub(crate) const STD_SOURCE_TRAITS: [&str; 14] = [ +pub(crate) const STD_ONLY_TRAITS: [&str; 1] = ["std::string::ToString"]; + +pub(crate) const STD_OR_CORE_TRAITS: [&str; 13] = [ // PRINTING - "std::fmt::Debug", - "std::fmt::Display", - "std::string::ToString", + "fmt::Debug", + "fmt::Display", // OWNERSHIP - "std::clone::Clone", + "clone::Clone", // OPERATORS - "std::ops::Neg", - "std::ops::Mul", - "std::ops::Add", - "std::ops::Sub", - "std::ops::Div", - "std::ops::Rem", - "std::cmp::Eq", - "std::cmp::PartialEq", - "std::cmp::Ord", // we don't use these fully cuz of the output types not being lua primitives, but keeping it for the future - "std::cmp::PartialOrd", + "ops::Neg", + "ops::Mul", + "ops::Add", + "ops::Sub", + "ops::Div", + "ops::Rem", + "cmp::Eq", + "cmp::PartialEq", + "cmp::Ord", // we don't use these fully cuz of the output types not being lua primitives, but keeping it for the future + "cmp::PartialOrd", ]; /// A collection of common traits stored for quick access. @@ -128,16 +129,49 @@ pub(crate) struct CachedTraits { pub(crate) bevy_reflect_get_type_registration: Option, /// Map from def_path_str to DefId of common std traits we work with /// these are the only trait impls from which we generate methods - pub(crate) std_source_traits: HashMap, + pub(crate) std_only_traits: HashMap, + pub(crate) std_or_core_traits: HashMap, } impl CachedTraits { - pub(crate) fn has_all_bms_traits(&self) -> bool { - self.bms_into_script.is_some() && self.bms_from_script.is_some() + pub(crate) fn missing_bms_traits(&self) -> Vec<&'static str> { + let mut missing = Vec::new(); + if self.bms_into_script.is_none() { + missing.extend(DEF_PATHS_BMS_INTO_SCRIPT); + } + if self.bms_from_script.is_none() { + missing.extend(DEF_PATHS_BMS_FROM_SCRIPT); + } + missing } - pub(crate) fn has_all_bevy_traits(&self) -> bool { - self.bevy_reflect_reflect.is_some() && self.bevy_reflect_get_type_registration.is_some() + pub(crate) fn missing_bevy_traits(&self) -> Vec<&'static str> { + let mut missing = Vec::new(); + if self.bevy_reflect_reflect.is_none() { + missing.extend(DEF_PATHS_REFLECT); + } + if self.bevy_reflect_get_type_registration.is_none() { + missing.extend(DEF_PATHS_GET_TYPE_REGISTRATION); + } + missing + } + + pub(crate) fn missing_std_traits(&self) -> Vec { + let mut missing = Vec::new(); + for trait_name in STD_ONLY_TRAITS { + if !self.std_only_traits.contains_key(trait_name) { + missing.push(trait_name.to_owned()); + } + } + for trait_name in STD_OR_CORE_TRAITS { + for prefix in ["std::", "core::"] { + let full_trait_name = format!("{prefix}{trait_name}"); + if !self.std_or_core_traits.contains_key(&full_trait_name) { + missing.push(full_trait_name); + } + } + } + missing } // pub(crate) fn has_all_std_source_traits(&self) -> bool { diff --git a/crates/bevy_api_gen/src/feature_graph.rs b/crates/bevy_api_gen/src/feature_graph.rs index 4e08c29bf8..e75afd9960 100644 --- a/crates/bevy_api_gen/src/feature_graph.rs +++ b/crates/bevy_api_gen/src/feature_graph.rs @@ -200,7 +200,14 @@ impl FeatureGraph { .workspace_packages() .iter() .map(|p| Self::process_crate(p)) - .collect(); + .collect::>(); + + // log the workspace crate dependencies + debug!( + "Workspace root: {}, Crates: {}", + workspace_root, + crates.iter().map(|c| format!("{c:?}")).join("\n\n ") + ); Self { workspace_root: workspace_root.to_owned(), diff --git a/crates/bevy_api_gen/src/meta.rs b/crates/bevy_api_gen/src/meta.rs index 87e7074703..6492f4f9e5 100644 --- a/crates/bevy_api_gen/src/meta.rs +++ b/crates/bevy_api_gen/src/meta.rs @@ -21,6 +21,7 @@ pub(crate) const META_VERSION: &str = "1"; /// between crates to be able to properly identify links between crates #[derive(Serialize, Deserialize, Clone)] pub struct Meta { + pub(crate) crate_name: String, /// The local proxies generated after analysis pub(crate) proxies: Vec, /// False if no files are going to be generated for this crate @@ -51,12 +52,20 @@ where impl Meta { /// Returns true if the crate generated a proxy with the given DefPathHash (for the ADT) - pub(crate) fn contains_def_path_hash(&self, did: DefPathHash) -> bool { + pub fn contains_def_path_hash(&self, did: DefPathHash) -> bool { self.proxies.iter().any(|meta| { meta.stable_crate_id == did.stable_crate_id().as_u64() && meta.local_hash_id == did.local_hash().as_u64() }) } + + pub fn will_generate(&self) -> bool { + self.will_generate + } + + pub fn crate_name(&self) -> &str { + &self.crate_name + } } #[derive(Serialize, Deserialize, Clone, Debug)] @@ -83,6 +92,24 @@ impl MetaLoader { } } + /// iterates over the meta files in the meta directories and returns an iterator over the meta files + pub fn iter_meta(&self) -> impl Iterator + '_ { + self.meta_dirs.iter().flat_map(|dir| { + dir.read_dir() + .unwrap_or_else(|_| panic!("Could not read meta directory: {}", dir)) + .filter_map(|entry| { + let entry = entry.unwrap(); + if entry.path().extension().is_some_and(|ext| ext == "json") { + return Self::opt_load_meta( + Utf8PathBuf::from_path_buf(entry.path()) + .expect("Invalid meta file in meta directory"), + ); + } + None + }) + }) + } + /// Retrieves the meta for the provided crate, returns 'Some(meta)' if it exists and 'None' otherwise pub fn meta_for(&self, crate_name: &str) -> Option { self.meta_for_retry(crate_name, 3) diff --git a/crates/bevy_api_gen/src/modifying_file_loader.rs b/crates/bevy_api_gen/src/modifying_file_loader.rs index c0028179e6..4a302adf68 100644 --- a/crates/bevy_api_gen/src/modifying_file_loader.rs +++ b/crates/bevy_api_gen/src/modifying_file_loader.rs @@ -27,9 +27,15 @@ impl FileLoader for ModifyingFileLoader { ); RealFileLoader.read_file(path).map(|mut f| { // we make it pub so in case we are re-exporting this crate we won't run into private re-export issues - - for crate_ in &["bevy_reflect", "bevy_mod_scripting_core"] { - if !f.contains(&format!("extern crate {crate_}")) { + for (crate_, excluded_files) in &[ + ("bevy_reflect", vec!["crates/bevy_reflect/src/lib.rs"]), + ("bevy_mod_scripting_core", vec![]), + ] { + if !f.contains(&format!("extern crate {crate_}")) + && !excluded_files + .iter() + .any(|s| path.to_str().unwrap().contains(s)) + { if f.contains(&format!("pub use {crate_}")) { f.push_str(&format!( "#[allow(unused_extern_crates)] pub extern crate {crate_};" diff --git a/crates/bevy_api_gen/src/passes/cache_traits.rs b/crates/bevy_api_gen/src/passes/cache_traits.rs index 1751f71400..af71b7f4fe 100644 --- a/crates/bevy_api_gen/src/passes/cache_traits.rs +++ b/crates/bevy_api_gen/src/passes/cache_traits.rs @@ -1,11 +1,11 @@ -use log::trace; +use log::{trace, warn}; use rustc_hir::def_id::LOCAL_CRATE; use rustc_middle::ty::TyCtxt; use rustc_span::Symbol; use crate::{ Args, BevyCtxt, DEF_PATHS_BMS_FROM_SCRIPT, DEF_PATHS_BMS_INTO_SCRIPT, - DEF_PATHS_GET_TYPE_REGISTRATION, DEF_PATHS_REFLECT, STD_SOURCE_TRAITS, + DEF_PATHS_GET_TYPE_REGISTRATION, DEF_PATHS_REFLECT, STD_ONLY_TRAITS, STD_OR_CORE_TRAITS, }; fn dump_traits(tcx: &TyCtxt) -> String { @@ -29,11 +29,19 @@ pub(crate) fn cache_traits(ctxt: &mut BevyCtxt<'_>, _args: &Args) -> bool { } else if DEF_PATHS_GET_TYPE_REGISTRATION.contains(&def_path_str.as_str()) { trace!("found GetTypeRegistration trait def id: {trait_did:?}"); ctxt.cached_traits.bevy_reflect_get_type_registration = Some(trait_did); - } else if STD_SOURCE_TRAITS.contains(&def_path_str.as_str()) { - trace!("found misc trait def id: {trait_did:?}"); + } else if STD_ONLY_TRAITS.contains(&def_path_str.as_str()) { + trace!("found std trait def id: {trait_did:?}"); ctxt.cached_traits - .std_source_traits + .std_only_traits .insert(def_path_str.to_string(), trait_did); + } else if let Some(full_name) = STD_OR_CORE_TRAITS.iter().find(|name| { + (Some(**name) == def_path_str.strip_prefix("core::")) + || (Some(**name) == def_path_str.strip_prefix("std::")) + }) { + trace!("found core trait def id: {trait_did:?}"); + ctxt.cached_traits + .std_or_core_traits + .insert(full_name.to_string(), trait_did); } else if DEF_PATHS_BMS_INTO_SCRIPT.contains(&def_path_str.as_str()) { trace!("found IntoScript trait def id: {trait_did:?}"); ctxt.cached_traits.bms_into_script = Some(trait_did); @@ -43,20 +51,33 @@ pub(crate) fn cache_traits(ctxt: &mut BevyCtxt<'_>, _args: &Args) -> bool { } } - if !ctxt.cached_traits.has_all_bms_traits() { + let missing_bevy_traits = ctxt.cached_traits.missing_bevy_traits(); + if !missing_bevy_traits.is_empty() { panic!( - "Could not find all bms traits in crate: {}. Available traits: {}", + "Could not find traits: [{}] in crate: {}, did bootstrapping go wrong? Available traits: {}", + missing_bevy_traits.join(", "), tcx.crate_name(LOCAL_CRATE), dump_traits(tcx) - ) + ); } - if !ctxt.cached_traits.has_all_bevy_traits() { + let missing_bms_traits = ctxt.cached_traits.missing_bms_traits(); + if !missing_bms_traits.is_empty() { panic!( - "Could not find all reflect traits in crate: {}, did bootstrapping go wrong?. Available traits: {}", + "Could not find traits: [{}] in crate: {}, did bootstrapping go wrong? Available traits: {}", + missing_bms_traits.join(", "), tcx.crate_name(LOCAL_CRATE), dump_traits(tcx) - ) + ); + } + + let missing_std_traits = ctxt.cached_traits.missing_std_traits(); + if !missing_std_traits.is_empty() { + warn!( + "Could not find std traits: [{}] in crate: {}, this might lead to missing methods in the generated API.", + missing_std_traits.join(", "), + tcx.crate_name(LOCAL_CRATE), + ); } // some crates specifically do not have std in scope via `#![no_std]` which means we do not care about these traits diff --git a/crates/bevy_api_gen/src/passes/find_methods_and_fields.rs b/crates/bevy_api_gen/src/passes/find_methods_and_fields.rs index 7acffc237b..de59f5f973 100644 --- a/crates/bevy_api_gen/src/passes/find_methods_and_fields.rs +++ b/crates/bevy_api_gen/src/passes/find_methods_and_fields.rs @@ -6,7 +6,9 @@ use rustc_hir::{ Safety, }; use rustc_infer::infer::TyCtxtInferExt; -use rustc_middle::ty::{AdtKind, AssocKind, FieldDef, FnSig, Ty, TyCtxt, TyKind, TypingEnv}; +use rustc_middle::ty::{ + AdtKind, AssocKind, FieldDef, FnSig, GenericArgs, Ty, TyCtxt, TyKind, TypingEnv, +}; use rustc_span::Symbol; use rustc_trait_selection::infer::InferCtxtExt; @@ -108,21 +110,36 @@ pub(crate) fn find_methods_and_fields(ctxt: &mut BevyCtxt<'_>, _args: &Args) -> .tcx .impl_trait_ref(*impl_did) .map(|tr| tr.skip_binder().def_id); + let trait_name = trait_did + .map(|td| ctxt.tcx.item_name(td).to_ident_string()) + .unwrap_or_else(|| "None".to_string()); let fn_name = assoc_item.name.to_ident_string(); let has_self = assoc_item.fn_has_self_parameter; let fn_did = assoc_item.def_id; + trace!( - "Processing function: '{fn_name}' on type: `{}`", + "Processing function: '{fn_name}' on type: `{}` on trait: `{trait_name}`", ctxt.tcx.item_name(def_id) ); - // let param_env = ctxt.tcx.param_env(fn_did); let param_env = TypingEnv::non_body_analysis(ctxt.tcx, def_id); - let sig: FnSig = ctxt.tcx.normalize_erasing_late_bound_regions( - param_env, - ctxt.tcx.fn_sig(fn_did).instantiate_identity(), - ); + let fn_sig = ctxt.tcx.fn_sig(fn_did).instantiate_identity(); + let sig: FnSig = ctxt + .tcx + .normalize_erasing_late_bound_regions(param_env, fn_sig); + + let function_generics = get_function_generics(ctxt.tcx, fn_did, *impl_did); + + if !function_generics.is_empty() { + log::debug!( + "Skipping function: `{}` on type: `{}` as it has generics: {:?}", + assoc_item.name, + ctxt.tcx.item_name(def_id), + function_generics + ); + return None; + } if let Some(unstability) = ctxt.tcx.lookup_stability(fn_did) { if unstability.is_unstable() { @@ -221,6 +238,23 @@ pub(crate) fn find_methods_and_fields(ctxt: &mut BevyCtxt<'_>, _args: &Args) -> true } +fn get_function_generics(tcx: TyCtxt, fn_did: DefId, impl_did: DefId) -> Vec { + // the early binder for this fn_sig will contain the generics on the function + // we can't use it to iterate them though, for that we need to get the generics via the identity mapping + // we want to first instantiate the function with any args in the impl, as those don't affect the standalone function signature + + let identity_args = GenericArgs::identity_for_item(tcx, fn_did) + .types() + .collect::>(); + let identity_args_impl = GenericArgs::identity_for_item(tcx, impl_did) + .types() + .collect::>(); + identity_args + .into_iter() + .filter(|arg| !identity_args_impl.contains(arg)) + .collect::>() +} + fn report_fn_arg_not_supported(tcx: TyCtxt, f_did: DefId, type_did: DefId, ty: Ty, reason: &str) { info!( "Ignoring function: `{}` on type: `{}` reason: `{}`, relevant type: `{}`", diff --git a/crates/bevy_api_gen/src/passes/find_trait_impls.rs b/crates/bevy_api_gen/src/passes/find_trait_impls.rs index 408ba7c667..3913ab8296 100644 --- a/crates/bevy_api_gen/src/passes/find_trait_impls.rs +++ b/crates/bevy_api_gen/src/passes/find_trait_impls.rs @@ -53,11 +53,17 @@ pub(crate) fn find_trait_impls(ctxt: &mut BevyCtxt<'_>, _args: &Args) -> bool { retaining }); + let std_traits = ctxt + .cached_traits + .std_only_traits + .values() + .chain(ctxt.cached_traits.std_or_core_traits.values()) + .collect::>(); + log::trace!( "Looking for impls of the traits: [{}]", - ctxt.cached_traits - .std_source_traits - .values() + std_traits + .iter() .map(|d| tcx.def_path_str(*d)) .collect::>() .join(", ") @@ -66,10 +72,10 @@ pub(crate) fn find_trait_impls(ctxt: &mut BevyCtxt<'_>, _args: &Args) -> bool { for (reflect_ty_did, type_ctxt) in ctxt.reflect_types.iter_mut() { let mut impls = Vec::default(); - for trait_did in ctxt.cached_traits.std_source_traits.values() { - let matching_impls = type_impl_of_trait(tcx, *trait_did, reflect_ty_did); + for &&trait_did in &std_traits { + let matching_impls = type_impl_of_trait(tcx, trait_did, reflect_ty_did); if !matching_impls.is_empty() { - impls.push((*trait_did, matching_impls)); + impls.push((trait_did, matching_impls)); } } diff --git a/crates/bevy_api_gen/src/passes/write_meta.rs b/crates/bevy_api_gen/src/passes/write_meta.rs index e21d60a962..38df6b31e4 100644 --- a/crates/bevy_api_gen/src/passes/write_meta.rs +++ b/crates/bevy_api_gen/src/passes/write_meta.rs @@ -17,6 +17,7 @@ pub(crate) fn write_meta(ctxt: &mut BevyCtxt<'_>, _args: &Args) -> bool { } let will_generate = !proxies.is_empty(); let meta = Meta { + crate_name: tcx.crate_name(LOCAL_CRATE).to_string(), proxies, will_generate, meta_version: META_VERSION.to_string(), diff --git a/crates/bevy_api_gen/templates/import.tera b/crates/bevy_api_gen/templates/import.tera index 30d0f37eb4..638bc89bf0 100644 --- a/crates/bevy_api_gen/templates/import.tera +++ b/crates/bevy_api_gen/templates/import.tera @@ -3,5 +3,5 @@ bevy::{{- import | substring(start=5) -}} {%- elif import is starting_with("glam::") -%} bevy::math::{{- import | substring(start=6) -}} {%- else -%} -{{import}} +::{{import}} {%- endif -%} \ No newline at end of file diff --git a/crates/bevy_mod_scripting_core/Cargo.toml b/crates/bevy_mod_scripting_core/Cargo.toml index d316343556..5aa462e5de 100644 --- a/crates/bevy_mod_scripting_core/Cargo.toml +++ b/crates/bevy_mod_scripting_core/Cargo.toml @@ -29,19 +29,18 @@ mlua = { version = "0.10", default-features = false, optional = true } rhai = { version = "1.21", default-features = false, features = [ "sync", ], optional = true } -bevy = { workspace = true, default-features = false, features = ["bevy_asset"] } -thiserror = "1.0.31" +bevy = { workspace = true, default-features = false, features = [ + "bevy_asset", + "std", +] } parking_lot = "0.12.1" -dashmap = "6" smallvec = "1.11" -itertools = "0.13" -derivative = "2.2" +itertools = "0.14" profiling = { workspace = true } bevy_mod_scripting_derive = { workspace = true } fixedbitset = "0.5" -petgraph = "0.6" -bevy_mod_debugdump = "0.12" bevy_system_reflection = { path = "../bevy_system_reflection", version = "0.1.2" } +variadics_please = "1.1.0" [dev-dependencies] test_utils = { workspace = true } diff --git a/crates/bevy_mod_scripting_core/src/asset.rs b/crates/bevy_mod_scripting_core/src/asset.rs index f3135f55b4..6a19209277 100644 --- a/crates/bevy_mod_scripting_core/src/asset.rs +++ b/crates/bevy_mod_scripting_core/src/asset.rs @@ -1,24 +1,24 @@ //! Systems and resources for handling script assets and events -use crate::{ - commands::{CreateOrUpdateScript, DeleteScript}, - error::ScriptError, - script::ScriptId, - IntoScriptPluginParams, ScriptingSystemSet, -}; +use std::borrow::Cow; + use bevy::{ app::{App, PreUpdate}, asset::{Asset, AssetEvent, AssetId, AssetLoader, AssetPath, Assets}, - ecs::system::Resource, log::{debug, info, trace, warn}, + platform::collections::HashMap, prelude::{ - Commands, Event, EventReader, EventWriter, IntoSystemConfigs, IntoSystemSetConfigs, Res, - ResMut, + Commands, Event, EventReader, EventWriter, IntoScheduleConfigs, Res, ResMut, Resource, }, reflect::TypePath, - utils::hashbrown::HashMap, }; -use std::borrow::Cow; + +use crate::{ + commands::{CreateOrUpdateScript, DeleteScript}, + error::ScriptError, + script::ScriptId, + IntoScriptPluginParams, ScriptingSystemSet, +}; /// Represents a scripting language. Languages which compile into another language should use the target language as their language. #[derive(Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Default)] @@ -239,7 +239,7 @@ pub(crate) fn dispatch_script_asset_events( language, }; debug!("Script loaded, populating metadata: {:?}:", metadata); - script_asset_events.send(ScriptAssetEvent::Added(metadata.clone())); + script_asset_events.write(ScriptAssetEvent::Added(metadata.clone())); metadata_store.insert(*id, metadata); } else { warn!("A script was added but it's asset was not found, failed to compute metadata. This script will not be loaded. Did you forget to store `Handle` somewhere?. {}", id); @@ -249,7 +249,7 @@ pub(crate) fn dispatch_script_asset_events( AssetEvent::Removed { id } => { if let Some(metadata) = metadata_store.get(*id) { debug!("Script removed: {:?}", metadata); - script_asset_events.send(ScriptAssetEvent::Removed(metadata.clone())); + script_asset_events.write(ScriptAssetEvent::Removed(metadata.clone())); } else { warn!("Script metadata not found for removed script asset: {}. Cannot properly clean up script", id); } @@ -257,7 +257,7 @@ pub(crate) fn dispatch_script_asset_events( AssetEvent::Modified { id } => { if let Some(metadata) = metadata_store.get(*id) { debug!("Script modified: {:?}", metadata); - script_asset_events.send(ScriptAssetEvent::Modified(metadata.clone())); + script_asset_events.write(ScriptAssetEvent::Modified(metadata.clone())); } else { warn!("Script metadata not found for modified script asset: {}. Cannot properly update script", id); } @@ -580,9 +580,9 @@ mod tests { struct DummyPlugin; impl IntoScriptPluginParams for DummyPlugin { - type R = (); - type C = (); const LANGUAGE: Language = Language::Lua; + type C = (); + type R = (); fn build_runtime() -> Self::R {} } diff --git a/crates/bevy_mod_scripting_core/src/bindings/access_map.rs b/crates/bevy_mod_scripting_core/src/bindings/access_map.rs index cf91e5bced..d4a290fab0 100644 --- a/crates/bevy_mod_scripting_core/src/bindings/access_map.rs +++ b/crates/bevy_mod_scripting_core/src/bindings/access_map.rs @@ -4,8 +4,8 @@ use std::hash::{BuildHasherDefault, Hasher}; use bevy::{ ecs::{component::ComponentId, world::unsafe_world_cell::UnsafeWorldCell}, + platform::collections::{HashMap, HashSet}, prelude::Resource, - utils::hashbrown::{HashMap, HashSet}, }; use parking_lot::Mutex; use smallvec::SmallVec; diff --git a/crates/bevy_mod_scripting_core/src/bindings/allocator.rs b/crates/bevy_mod_scripting_core/src/bindings/allocator.rs index c37acdb943..9feb3c2454 100644 --- a/crates/bevy_mod_scripting_core/src/bindings/allocator.rs +++ b/crates/bevy_mod_scripting_core/src/bindings/allocator.rs @@ -1,12 +1,13 @@ //! An allocator used to control the lifetime of allocations +use bevy::prelude::Resource; use bevy::{ app::{App, Plugin, PostUpdate}, diagnostic::{Diagnostic, DiagnosticPath, Diagnostics, RegisterDiagnostic}, - ecs::system::{Res, Resource}, + ecs::system::Res, + platform::collections::HashMap, prelude::ResMut, reflect::PartialReflect, - utils::hashbrown::HashMap, }; use parking_lot::{RwLock, RwLockReadGuard, RwLockWriteGuard}; use std::{ diff --git a/crates/bevy_mod_scripting_core/src/bindings/function/from.rs b/crates/bevy_mod_scripting_core/src/bindings/function/from.rs index 0852840708..c07b25921c 100644 --- a/crates/bevy_mod_scripting_core/src/bindings/function/from.rs +++ b/crates/bevy_mod_scripting_core/src/bindings/function/from.rs @@ -585,4 +585,4 @@ macro_rules! impl_from_script_tuple { }; } -bevy::utils::all_tuples!(impl_from_script_tuple, 1, 14, T); +variadics_please::all_tuples!(impl_from_script_tuple, 1, 14, T); diff --git a/crates/bevy_mod_scripting_core/src/bindings/function/into.rs b/crates/bevy_mod_scripting_core/src/bindings/function/into.rs index fd1fb88e9b..fd48053c1e 100644 --- a/crates/bevy_mod_scripting_core/src/bindings/function/into.rs +++ b/crates/bevy_mod_scripting_core/src/bindings/function/into.rs @@ -199,4 +199,4 @@ macro_rules! impl_into_script_tuple { } } -bevy::utils::all_tuples!(impl_into_script_tuple, 1, 14, T); +variadics_please::all_tuples!(impl_into_script_tuple, 1, 14, T); diff --git a/crates/bevy_mod_scripting_core/src/bindings/function/script_function.rs b/crates/bevy_mod_scripting_core/src/bindings/function/script_function.rs index aeaaa5b081..dbcfad6640 100644 --- a/crates/bevy_mod_scripting_core/src/bindings/function/script_function.rs +++ b/crates/bevy_mod_scripting_core/src/bindings/function/script_function.rs @@ -10,8 +10,8 @@ use crate::{ error::InteropError, ScriptValue, }; +use bevy::platform::collections::HashMap; use bevy::prelude::{Reflect, Resource}; -use bevy::utils::hashbrown::HashMap; use parking_lot::{RwLock, RwLockReadGuard, RwLockWriteGuard}; use std::borrow::Cow; use std::collections::VecDeque; @@ -622,13 +622,13 @@ macro_rules! impl_script_function { }; } -bevy::utils::all_tuples!(impl_script_function, 0, 13, T); +variadics_please::all_tuples!(impl_script_function, 0, 13, T); #[cfg(test)] mod test { - use super::*; + use super::*; - fn with_local_world(f: F) { + fn with_local_world(f: F) { let mut world = bevy::prelude::World::default(); WorldGuard::with_static_guard(&mut world, |world| { ThreadWorldContainer.set_world(world).unwrap(); diff --git a/crates/bevy_mod_scripting_core/src/bindings/function/type_dependencies.rs b/crates/bevy_mod_scripting_core/src/bindings/function/type_dependencies.rs index 0bc1bf0a3f..e02dc601af 100644 --- a/crates/bevy_mod_scripting_core/src/bindings/function/type_dependencies.rs +++ b/crates/bevy_mod_scripting_core/src/bindings/function/type_dependencies.rs @@ -1,11 +1,11 @@ //! This module contains the [`GetTypeDependencies`] trait and its implementations for various types. use super::{ - from::{Mut, Ref, Union, Val}, - script_function::FunctionCallContext, DynamicScriptFunction, DynamicScriptFunctionMut, + from::{Mut, Ref, Union, Val}, + script_function::FunctionCallContext, DynamicScriptFunction, DynamicScriptFunctionMut, }; use crate::{ - bindings::{ReflectReference, ScriptValue}, error::InteropError} + bindings::{ReflectReference, ScriptValue}, error::InteropError} ; use bevy::reflect::{FromReflect, GetTypeRegistration, TypeRegistry, Typed}; use bevy_mod_scripting_derive::impl_get_type_dependencies; @@ -156,7 +156,7 @@ macro_rules! register_tuple_dependencies { } -bevy::utils::all_tuples!(register_tuple_dependencies, 1, 14, T); +variadics_please::all_tuples!(register_tuple_dependencies, 1, 14, T); /// A trait collecting type dependency information for a whole function. Used to register everything used by a function with the type registry pub trait GetFunctionTypeDependencies { @@ -184,4 +184,4 @@ macro_rules! impl_script_function_type_dependencies{ }; } -bevy::utils::all_tuples!(impl_script_function_type_dependencies, 0, 13, T); +variadics_please::all_tuples!(impl_script_function_type_dependencies, 0, 13, T); diff --git a/crates/bevy_mod_scripting_core/src/bindings/globals/mod.rs b/crates/bevy_mod_scripting_core/src/bindings/globals/mod.rs index 42f4d2de80..49e329e5ba 100644 --- a/crates/bevy_mod_scripting_core/src/bindings/globals/mod.rs +++ b/crates/bevy_mod_scripting_core/src/bindings/globals/mod.rs @@ -1,15 +1,15 @@ //! Contains abstractions for exposing "globals" to scripts, in a language-agnostic way. use super::{ - function::arg_meta::{ScriptReturn, TypedScriptReturn}, - script_value::ScriptValue, - WorldGuard, + function::arg_meta::{ScriptReturn, TypedScriptReturn}, + script_value::ScriptValue, + WorldGuard, }; use crate::{ - docgen::{into_through_type_info, typed_through::ThroughTypeInfo}, - error::InteropError, + docgen::{into_through_type_info, typed_through::ThroughTypeInfo}, + error::InteropError, }; -use bevy::{ecs::system::Resource, reflect::Typed, utils::hashbrown::HashMap}; +use bevy::{platform::collections::HashMap, prelude::Resource, reflect::Typed}; use parking_lot::{RwLock, RwLockReadGuard, RwLockWriteGuard}; use std::{any::TypeId, borrow::Cow, sync::Arc}; @@ -235,11 +235,11 @@ impl ScriptGlobalsRegistry { #[cfg(test)] mod test { - use bevy::ecs::world::World; + use bevy::ecs::world::World; - use super::*; + use super::*; - #[test] + #[test] fn test_script_globals_registry() { let mut registry = ScriptGlobalsRegistry::default(); diff --git a/crates/bevy_mod_scripting_core/src/bindings/reference.rs b/crates/bevy_mod_scripting_core/src/bindings/reference.rs index 9df1e2fbdc..60c4efc3d2 100644 --- a/crates/bevy_mod_scripting_core/src/bindings/reference.rs +++ b/crates/bevy_mod_scripting_core/src/bindings/reference.rs @@ -214,7 +214,7 @@ impl ReflectReference { self.with_reflect(world.clone(), |r| { ::from_reflect_or_clone(r, world.clone()) - }) + })? } /// The way to access the value of the reference, that is the pointed-to value. @@ -503,7 +503,7 @@ impl ReflectBase { match self { ReflectBase::Component(entity, component_id) => { // Safety: the caller ensures invariants hold - world.get_entity(entity)?.get_by_id(component_id) + world.get_entity(entity).ok()?.get_by_id(component_id) } ReflectBase::Resource(component_id) => { // Safety: the caller ensures invariants hold @@ -522,7 +522,11 @@ impl ReflectBase { match self { ReflectBase::Component(entity, component_id) => { // Safety: the caller ensures invariants hold - world.get_entity(entity)?.get_mut_by_id(component_id) + world + .get_entity(entity) + .ok()? + .get_mut_by_id(component_id) + .ok() } ReflectBase::Resource(component_id) => { // Safety: the caller ensures invariants hold diff --git a/crates/bevy_mod_scripting_core/src/bindings/schedule.rs b/crates/bevy_mod_scripting_core/src/bindings/schedule.rs index 061029a46a..8feff1cc98 100644 --- a/crates/bevy_mod_scripting_core/src/bindings/schedule.rs +++ b/crates/bevy_mod_scripting_core/src/bindings/schedule.rs @@ -3,15 +3,15 @@ use super::{script_system::ScriptSystemBuilder, WorldAccessGuard}; use crate::{error::InteropError, IntoScriptPluginParams}; use bevy::{ - app::{ - First, FixedFirst, FixedLast, FixedMain, FixedPostUpdate, FixedPreUpdate, FixedUpdate, - Last, PostStartup, PostUpdate, PreStartup, PreUpdate, RunFixedMainLoop, Startup, Update, - }, - ecs::{ - schedule::{Schedule, ScheduleLabel, Schedules}, - system::Resource, - world::World, - }, + app::{ + First, FixedFirst, FixedLast, FixedMain, FixedPostUpdate, FixedPreUpdate, FixedUpdate, + Last, PostStartup, PostUpdate, PreStartup, PreUpdate, RunFixedMainLoop, Startup, Update, + }, + ecs::{ + schedule::{Schedule, ScheduleLabel, Schedules}, + world::World, + }, + prelude::Resource, }; use bevy_system_reflection::{ReflectSchedule, ReflectSystem}; use parking_lot::RwLock; @@ -191,19 +191,18 @@ impl WorldAccessGuard<'_> { reason = "tests are there but not working currently" )] mod tests { - - use bevy::{ - app::{App, Update}, - ecs::{ - schedule::{NodeId, Schedules}, - system::IntoSystem, - }, - }; - use test_utils::make_test_plugin; - - use super::*; - - #[test] + use bevy::{ + app::Update, + ecs::{ + schedule::{NodeId, Schedules}, + system::IntoSystem, + }, + }; + use test_utils::make_test_plugin; + + use super::*; + + #[test] fn test_schedule_registry() { let mut registry = ScheduleRegistry::default(); registry.register(Update); @@ -342,7 +341,7 @@ mod tests { // Collect all edges as (from, to) name pairs. let mut found_edges = Vec::new(); - for (from, to, _) in graph.dependency().graph().all_edges() { + for (from, to) in graph.dependency().graph().all_edges() { let name_from = resolve_name(from); let name_to = resolve_name(to); found_edges.push((name_from, name_to)); diff --git a/crates/bevy_mod_scripting_core/src/bindings/script_component.rs b/crates/bevy_mod_scripting_core/src/bindings/script_component.rs index 74243b29a3..b1a0c650f0 100644 --- a/crates/bevy_mod_scripting_core/src/bindings/script_component.rs +++ b/crates/bevy_mod_scripting_core/src/bindings/script_component.rs @@ -3,13 +3,11 @@ use super::{ScriptComponentRegistration, ScriptTypeRegistration, ScriptValue, WorldAccessGuard}; use crate::error::InteropError; use bevy::{ - app::{App, Plugin}, - ecs::{ - component::{Component, ComponentDescriptor, StorageType}, - system::Resource, - }, - reflect::{prelude::ReflectDefault, GetTypeRegistration, Reflect}, - utils::HashMap, + app::{App, Plugin}, + ecs::component::{Component, ComponentDescriptor, StorageType, ComponentCloneBehavior, Mutable}, + platform::collections::HashMap, + prelude::Resource, + reflect::{prelude::ReflectDefault, GetTypeRegistration, Reflect}, }; use parking_lot::RwLock; use std::{alloc::Layout, mem::needs_drop, sync::Arc}; @@ -31,6 +29,7 @@ pub struct DynamicComponentInfo { impl Component for DynamicComponent { const STORAGE_TYPE: StorageType = StorageType::Table; + type Mutability = Mutable; } /// A registry of dynamically registered script components @@ -96,6 +95,8 @@ impl WorldAccessGuard<'_> { DynamicComponent::STORAGE_TYPE, Layout::new::(), needs_drop::().then_some(|x| x.drop_as::()), + true, + ComponentCloneBehavior::Default, ) }; w.register_component_with_descriptor(descriptor) @@ -135,10 +136,10 @@ impl Plugin for DynamicScriptComponentPlugin { #[cfg(test)] mod test { - use super::*; - use bevy::ecs::world::World; + use super::*; + use bevy::ecs::world::World; - #[test] + #[test] fn test_script_component() { let mut world = World::new(); let registration = { diff --git a/crates/bevy_mod_scripting_core/src/bindings/script_system.rs b/crates/bevy_mod_scripting_core/src/bindings/script_system.rs index c523b0d231..c11332172b 100644 --- a/crates/bevy_mod_scripting_core/src/bindings/script_system.rs +++ b/crates/bevy_mod_scripting_core/src/bindings/script_system.rs @@ -27,15 +27,17 @@ use bevy::{ entity::Entity, query::{Access, FilteredAccess, FilteredAccessSet, QueryState}, reflect::AppTypeRegistry, - schedule::{IntoSystemConfigs, SystemSet}, - system::{IntoSystem, System}, + schedule::SystemSet, + system::{IntoSystem, System, SystemParamValidationError}, world::{unsafe_world_cell::UnsafeWorldCell, World}, }, + platform::collections::HashSet, + prelude::IntoScheduleConfigs, reflect::{OffsetAccess, ParsedPath, Reflect}, - utils::hashbrown::HashSet, }; use bevy_system_reflection::{ReflectSchedule, ReflectSystem}; use std::{any::TypeId, borrow::Cow, hash::Hash, marker::PhantomData, ops::Deref}; + #[derive(Clone, Hash, PartialEq, Eq)] /// a system set for script systems. pub struct ScriptSystemSet(Cow<'static, str>); @@ -159,8 +161,10 @@ impl ScriptSystemBuilder { // this is quite important, by default systems are placed in a set defined by their TYPE, i.e. in this case // all script systems would be the same - // let set = ScriptSystemSet::next(); - let mut system_config = IntoSystemConfigs::>::into_configs(self); // apply ordering + + let system: DynamicScriptSystem

= IntoSystem::into_system(self); + let mut system_config = system.into_configs(); + // let mut system_config = > + 'static)>, (Infallible, IsDynamicScriptSystem

)>>::into_configs(self); // apply ordering for (other, is_before) in before_systems .into_iter() .map(|b| (b, true)) @@ -170,7 +174,8 @@ impl ScriptSystemBuilder { if is_before { bevy::log::info!("before {default_set:?}"); system_config = system_config.before(*default_set); - } else { bevy::log::info!("before {default_set:?}"); + } else { + bevy::log::info!("before {default_set:?}"); bevy::log::info!("after {default_set:?}"); system_config = system_config.after(*default_set); } @@ -642,9 +647,9 @@ impl System for DynamicScriptSystem

{ unsafe fn validate_param_unsafe( &mut self, - _world: bevy::ecs::world::unsafe_world_cell::UnsafeWorldCell, - ) -> bool { - true + _world: UnsafeWorldCell, + ) -> Result<(), SystemParamValidationError> { + Ok(()) } fn default_system_sets(&self) -> Vec { @@ -655,7 +660,7 @@ impl System for DynamicScriptSystem

{ TypeId::of::() } - fn validate_param(&mut self, world: &World) -> bool { + fn validate_param(&mut self, world: &World) -> Result<(), SystemParamValidationError> { let world_cell = world.as_unsafe_world_cell_readonly(); self.update_archetype_component_access(world_cell); // SAFETY: diff --git a/crates/bevy_mod_scripting_core/src/bindings/world.rs b/crates/bevy_mod_scripting_core/src/bindings/world.rs index c88dc84f61..32a0ec7511 100644 --- a/crates/bevy_mod_scripting_core/src/bindings/world.rs +++ b/crates/bevy_mod_scripting_core/src/bindings/world.rs @@ -29,16 +29,18 @@ use crate::{ error::InteropError, reflection_extensions::PartialReflectExt, }; +use bevy::ecs::component::Mutable; +use bevy::prelude::{ChildOf, Children}; use bevy::{ app::AppExit, ecs::{ component::{Component, ComponentId}, entity::Entity, + prelude::Resource, reflect::{AppTypeRegistry, ReflectFromWorld, ReflectResource}, - system::{Commands, Resource}, + system::Commands, world::{unsafe_world_cell::UnsafeWorldCell, CommandQueue, Mut, World}, }, - hierarchy::{BuildChildren, Children, DespawnRecursiveExt, Parent}, reflect::{ std_traits::ReflectDefault, DynamicEnum, DynamicStruct, DynamicTuple, DynamicTupleStruct, DynamicVariant, ParsedPath, PartialReflect, TypeRegistryArc, @@ -446,7 +448,9 @@ impl<'w> WorldAccessGuard<'w> { format!("Could not access component: {}", std::any::type_name::()), { // Safety: we have acquired access for the duration of the closure - f(unsafe { cell.get_entity(entity).and_then(|e| e.get::()) }) + f(unsafe { cell.get_entity(entity).map(|e| e.get::()) } + .ok() + .unwrap_or(None)) } ) } @@ -454,7 +458,7 @@ impl<'w> WorldAccessGuard<'w> { /// Safely accesses the component by claiming and releasing access to it. pub fn with_component_mut(&self, entity: Entity, f: F) -> Result where - T: Component, + T: Component, F: FnOnce(Option>) -> O, { let cell = self.as_unsafe_world_cell()?; @@ -466,7 +470,9 @@ impl<'w> WorldAccessGuard<'w> { format!("Could not access component: {}", std::any::type_name::()), { // Safety: we have acquired access for the duration of the closure - f(unsafe { cell.get_entity(entity).and_then(|e| e.get_mut::()) }) + f(unsafe { cell.get_entity(entity).map(|e| e.get_mut::()) } + .ok() + .unwrap_or(None)) } ) } @@ -478,7 +484,7 @@ impl<'w> WorldAccessGuard<'w> { f: F, ) -> Result where - T: Component + Default, + T: Component + Default, F: FnOnce(&mut T) -> O, { self.with_global_access(|world| match world.get_mut::(entity) { @@ -536,7 +542,7 @@ impl<'w> WorldAccessGuard<'w> { /// checks if a given entity exists and is valid pub fn is_valid_entity(&self, entity: Entity) -> Result { let cell = self.as_unsafe_world_cell()?; - Ok(cell.get_entity(entity).is_some() && entity.index() != 0) + Ok(cell.get_entity(entity).is_ok() && entity.index() != 0) } /// Tries to call a fitting overload of the function with the given name and in the type id's namespace based on the arguments provided. @@ -816,10 +822,7 @@ impl WorldAccessGuard<'_> { // try to construct type from reflect // TODO: it would be nice to have a ::from_reflect_with_fallback equivalent, that does exactly that // only using this as it's already there and convenient, the clone variant hitting will be confusing to end users - Ok(::from_reflect_or_clone( - dynamic.as_ref(), - self.clone(), - )) + ::from_reflect_or_clone(dynamic.as_ref(), self.clone()) } /// Spawns a new entity in the world @@ -989,7 +992,7 @@ impl WorldAccessGuard<'_> { let cell = self.as_unsafe_world_cell()?; let entity = cell .get_entity(entity) - .ok_or_else(|| InteropError::missing_entity(entity))?; + .map_err(|_| InteropError::missing_entity(entity))?; if entity.contains_id(component_registration.component_id) { Ok(Some(ReflectReference { @@ -1016,7 +1019,7 @@ impl WorldAccessGuard<'_> { let cell = self.as_unsafe_world_cell()?; let entity = cell .get_entity(entity) - .ok_or_else(|| InteropError::missing_entity(entity))?; + .map_err(|_| InteropError::missing_entity(entity))?; Ok(entity.contains_id(component_id)) } @@ -1111,7 +1114,7 @@ impl WorldAccessGuard<'_> { return Err(InteropError::missing_entity(entity)); } - self.with_component(entity, |c: Option<&Parent>| c.map(|c| c.get())) + self.with_component(entity, |c: Option<&ChildOf>| c.map(|c| c.parent())) } /// insert children into the given entity @@ -1185,7 +1188,7 @@ impl WorldAccessGuard<'_> { self.with_global_access(|world| { let mut queue = CommandQueue::default(); let mut commands = Commands::new(&mut queue, world); - commands.entity(parent).despawn_recursive(); + commands.entity(parent).despawn(); queue.apply(world); }) } @@ -1199,7 +1202,7 @@ impl WorldAccessGuard<'_> { self.with_global_access(|world| { let mut queue = CommandQueue::default(); let mut commands = Commands::new(&mut queue, world); - commands.entity(entity).despawn(); + commands.entity(entity).remove::().despawn(); queue.apply(world); }) } @@ -1213,7 +1216,7 @@ impl WorldAccessGuard<'_> { self.with_global_access(|world| { let mut queue = CommandQueue::default(); let mut commands = Commands::new(&mut queue, world); - commands.entity(parent).despawn_descendants(); + commands.entity(parent).despawn_related::(); queue.apply(world); }) } diff --git a/crates/bevy_mod_scripting_core/src/context.rs b/crates/bevy_mod_scripting_core/src/context.rs index dec993f7be..b626b759de 100644 --- a/crates/bevy_mod_scripting_core/src/context.rs +++ b/crates/bevy_mod_scripting_core/src/context.rs @@ -6,7 +6,7 @@ use crate::{ script::ScriptId, IntoScriptPluginParams, }; -use bevy::ecs::{entity::Entity, system::Resource}; +use bevy::{ecs::entity::Entity, prelude::Resource}; /// A trait that all script contexts must implement. /// diff --git a/crates/bevy_mod_scripting_core/src/docgen/info.rs b/crates/bevy_mod_scripting_core/src/docgen/info.rs index b6a9ce5ae1..949286c0d3 100644 --- a/crates/bevy_mod_scripting_core/src/docgen/info.rs +++ b/crates/bevy_mod_scripting_core/src/docgen/info.rs @@ -191,18 +191,18 @@ macro_rules! impl_documentable { }; } -bevy::utils::all_tuples!(impl_documentable, 0, 13, T); +variadics_please::all_tuples!(impl_documentable, 0, 13, T); #[cfg(test)] mod test { - use crate::{ - bindings::function::from::{Mut, Ref, Val}, - docgen::typed_through::UntypedWrapperKind, - }; + use crate::{ + bindings::function::from::{Mut, Ref, Val}, + docgen::typed_through::UntypedWrapperKind, + }; - use super::*; + use super::*; - #[test] + #[test] fn test_get_function_info() { fn test_fn(a: i32, b: f32) -> f64 { (a as f64) + (b as f64) diff --git a/crates/bevy_mod_scripting_core/src/docgen/typed_through.rs b/crates/bevy_mod_scripting_core/src/docgen/typed_through.rs index 7e467b6180..694711af35 100644 --- a/crates/bevy_mod_scripting_core/src/docgen/typed_through.rs +++ b/crates/bevy_mod_scripting_core/src/docgen/typed_through.rs @@ -6,18 +6,18 @@ use std::{ffi::OsString, path::PathBuf}; use bevy::reflect::{TypeInfo, Typed}; use crate::{ - bindings::{ - function::{ - from::{Mut, Ref, Union, Val}, - script_function::{ - DynamicScriptFunction, DynamicScriptFunctionMut, FunctionCallContext, - }, - }, - script_value::ScriptValue, - ReflectReference, - }, - error::InteropError, - reflection_extensions::TypeInfoExtensions, + bindings::{ + function::{ + from::{Mut, Ref, Union, Val}, + script_function::{ + DynamicScriptFunction, DynamicScriptFunctionMut, FunctionCallContext, + }, + }, + script_value::ScriptValue, + ReflectReference, + }, + error::InteropError, + reflection_extensions::TypeInfoExtensions, }; /// All Through types follow one rule: @@ -265,13 +265,13 @@ macro_rules! impl_through_typed_tuple { }; } -bevy::utils::all_tuples!(impl_through_typed_tuple, 0, 13, T); +variadics_please::all_tuples!(impl_through_typed_tuple, 0, 13, T); #[cfg(test)] mod test { - use super::*; + use super::*; - fn assert_type_info_is_through() { + fn assert_type_info_is_through() { let type_info = T::type_info(); let through_type_info = T::through_type_info(); diff --git a/crates/bevy_mod_scripting_core/src/extractors.rs b/crates/bevy_mod_scripting_core/src/extractors.rs index d105cca7b5..41b2281335 100644 --- a/crates/bevy_mod_scripting_core/src/extractors.rs +++ b/crates/bevy_mod_scripting_core/src/extractors.rs @@ -4,14 +4,17 @@ #![allow(deprecated)] use std::ops::{Deref, DerefMut}; -use bevy::ecs::{ - component::ComponentId, - entity::Entity, - event::{Event, EventCursor, EventIterator, Events}, - query::{Access, AccessConflicts}, - storage::SparseSetIndex, - system::{Local, Resource, SystemParam, SystemState}, - world::World, +use bevy::{ + ecs::{ + component::ComponentId, + entity::Entity, + event::{Event, EventCursor, EventIterator, Events}, + query::{Access, AccessConflicts}, + storage::SparseSetIndex, + system::{Local, SystemParam, SystemParamValidationError, SystemState}, + world::World, + }, + prelude::Resource, }; use fixedbitset::FixedBitSet; @@ -365,7 +368,7 @@ unsafe impl SystemParam for WithWorldGuard<'_, '_, T> { state: &Self::State, system_meta: &bevy::ecs::system::SystemMeta, world: bevy::ecs::world::unsafe_world_cell::UnsafeWorldCell, - ) -> bool { + ) -> Result<(), SystemParamValidationError> { T::validate_param(&state.0, system_meta, world) } } @@ -417,9 +420,10 @@ mod test { ecs::{ component::Component, event::{Event, EventReader}, - system::{Query, ResMut, Resource}, + system::{Query, ResMut}, world::FromWorld, }, + prelude::Resource, }; use test_utils::make_test_plugin; diff --git a/crates/bevy_mod_scripting_core/src/handler.rs b/crates/bevy_mod_scripting_core/src/handler.rs index 322ea6adfb..37fcef7075 100644 --- a/crates/bevy_mod_scripting_core/src/handler.rs +++ b/crates/bevy_mod_scripting_core/src/handler.rs @@ -18,11 +18,11 @@ use bevy::{ ecs::{ entity::Entity, query::QueryState, - system::{Local, Resource, SystemState}, + system::{Local, SystemState}, world::{Mut, World}, }, log::trace_once, - prelude::{Events, Ref}, + prelude::{Events, Ref, Resource}, }; /// A function that handles a callback event diff --git a/crates/bevy_mod_scripting_core/src/reflection_extensions.rs b/crates/bevy_mod_scripting_core/src/reflection_extensions.rs index e923c33b3f..b1b661b766 100644 --- a/crates/bevy_mod_scripting_core/src/reflection_extensions.rs +++ b/crates/bevy_mod_scripting_core/src/reflection_extensions.rs @@ -9,6 +9,7 @@ use std::{ any::{Any, TypeId}, cmp::max, }; + /// Extension trait for [`PartialReflect`] providing additional functionality for working with specific types. pub trait PartialReflectExt { /// Try to get a reference to the given key in an underyling map, if the type is a map. @@ -30,7 +31,7 @@ pub trait PartialReflectExt { fn from_reflect_or_clone( reflect: &dyn PartialReflect, world: WorldGuard, - ) -> Box; + ) -> Result, InteropError>; /// Allocate a new boxed reflect reference from a boxed reflect. fn allocate(boxed: Box, world: WorldGuard) -> ReflectReference; @@ -424,11 +425,19 @@ impl PartialReflectExt for T { fn from_reflect_or_clone( reflect: &dyn PartialReflect, world: WorldGuard, - ) -> Box { + ) -> Result, InteropError> { // try from reflect match ::from_reflect(reflect, world.clone()) { - Ok(v) => v.into_partial_reflect(), - Err(_) => reflect.clone_value(), + Ok(v) => Ok(v.into_partial_reflect()), + Err(_) => reflect + .reflect_clone() + .map(|v| v.into_partial_reflect()) + .map_err(|e| { + InteropError::failed_from_reflect( + reflect.get_represented_type_info().map(|ti| ti.type_id()), + e.to_string(), + ) + }), } } @@ -667,7 +676,7 @@ mod test { let mut map = std::collections::HashMap::>::default(); let value = DynamicMap::from_iter(vec![(1, 2), (2, 3), (3, 4)]); - let value_ref: Box = Box::new(value.clone_dynamic()); + let value_ref: Box = Box::new(value.to_dynamic_map()); map.insert(1, std::collections::HashMap::::default()); map.insert(2, std::collections::HashMap::::default()); map.insert(3, std::collections::HashMap::::default()); diff --git a/crates/bevy_mod_scripting_core/src/runtime.rs b/crates/bevy_mod_scripting_core/src/runtime.rs index 359a7a0c97..a4d925fbd7 100644 --- a/crates/bevy_mod_scripting_core/src/runtime.rs +++ b/crates/bevy_mod_scripting_core/src/runtime.rs @@ -3,8 +3,8 @@ use crate::{error::ScriptError, IntoScriptPluginParams}; use bevy::{ - ecs::system::{ResMut, Resource}, - prelude::Res, + ecs::system::ResMut, + prelude::{Res, Resource}, }; /// A trait that all script runtimes must implement. diff --git a/crates/bevy_mod_scripting_core/src/script.rs b/crates/bevy_mod_scripting_core/src/script.rs index d5b0fe46ae..dd29fdc22a 100644 --- a/crates/bevy_mod_scripting_core/src/script.rs +++ b/crates/bevy_mod_scripting_core/src/script.rs @@ -1,11 +1,17 @@ //! Script related types, functions and components -use crate::{asset::ScriptAsset, IntoScriptPluginParams}; -use bevy::prelude::ReflectComponent; -use bevy::{asset::Handle, ecs::system::Resource, reflect::Reflect, utils::HashSet}; -use parking_lot::Mutex; use std::{borrow::Cow, collections::HashMap, ops::Deref, sync::Arc}; +use bevy::{ + asset::Handle, + platform::collections::HashSet, + prelude::{ReflectComponent, Resource}, + reflect::Reflect, +}; +use parking_lot::Mutex; + +use crate::{asset::ScriptAsset, IntoScriptPluginParams}; + /// A unique identifier for a script, by default corresponds to the path of the asset excluding the asset source. /// /// I.e. an asset with the path `path/to/asset.ext` will have the script id `path/to/asset.ext` diff --git a/crates/bevy_mod_scripting_functions/Cargo.toml b/crates/bevy_mod_scripting_functions/Cargo.toml index c677ff09b1..7a8120f2b4 100644 --- a/crates/bevy_mod_scripting_functions/Cargo.toml +++ b/crates/bevy_mod_scripting_functions/Cargo.toml @@ -12,12 +12,10 @@ categories = ["game-development"] readme = "readme.md" [features] -bevy_core = [] bevy_ecs = [] -bevy_hierarchy = [] bevy_input = [] -bevy_math = [] -bevy_reflect = [] +bevy_math = ["bevy_math/curve"] +bevy_reflect = ["bevy_reflect/smol_str"] bevy_time = [] bevy_transform = [] @@ -28,9 +26,13 @@ rhai_bindings = ["bevy_mod_scripting_rhai"] [dependencies] bevy = { workspace = true } +# required since curve has no top level bevy features for these +bevy_math = { workspace = true } +bevy_reflect = { workspace = true } + profiling = { workspace = true } uuid = "1.11" -smol_str = "0.2.2" +smol_str = "0.2.0" bevy_mod_scripting_core = { workspace = true } bevy_mod_scripting_derive = { workspace = true } bevy_mod_scripting_lua = { path = "../languages/bevy_mod_scripting_lua", optional = true, version = "0.13.0" } diff --git a/crates/bevy_mod_scripting_functions/src/bevy_bindings/bevy_core.rs b/crates/bevy_mod_scripting_functions/src/bevy_bindings/bevy_core.rs deleted file mode 100644 index 2d2e6ee754..0000000000 --- a/crates/bevy_mod_scripting_functions/src/bevy_bindings/bevy_core.rs +++ /dev/null @@ -1,45 +0,0 @@ -// @generated by cargo bevy-api-gen generate, modify the templates not this file -#![allow(clippy::all)] -#![allow(unused, deprecated, dead_code)] -#![cfg_attr(rustfmt, rustfmt_skip)] -use bevy_mod_scripting_core::bindings::{ - ReflectReference, - function::{ - from::{Ref, Mut, Val}, - namespace::NamespaceBuilder, - }, -}; -use bevy_mod_scripting_derive::script_bindings; -use crate::*; -pub struct BevyCoreScriptingPlugin; -#[script_bindings( - remote, - name = "name_functions", - bms_core_path = "bevy_mod_scripting_core", - generated -)] -impl bevy::core::prelude::Name { - fn clone(_self: Ref) -> Val { - let output: Val = ::clone( - &_self, - ) - .into(); - output - } - fn eq( - _self: Ref, - other: Ref, - ) -> bool { - let output: bool = >::eq(&_self, &other) - .into(); - output - } -} -impl ::bevy::app::Plugin for BevyCoreScriptingPlugin { - fn build(&self, app: &mut ::bevy::prelude::App) { - let mut world = app.world_mut(); - register_name_functions(&mut world); - } -} diff --git a/crates/bevy_mod_scripting_functions/src/bevy_bindings/bevy_ecs.rs b/crates/bevy_mod_scripting_functions/src/bevy_bindings/bevy_ecs.rs index aabe3ae722..ebd8b65a0f 100644 --- a/crates/bevy_mod_scripting_functions/src/bevy_bindings/bevy_ecs.rs +++ b/crates/bevy_mod_scripting_functions/src/bevy_bindings/bevy_ecs.rs @@ -20,7 +20,7 @@ pub struct BevyEcsScriptingPlugin; )] impl bevy::ecs::entity::Entity { fn clone(_self: Ref) -> Val { - let output: Val = ::clone( + let output: Val = ::clone( &_self, ) .into(); @@ -30,7 +30,7 @@ impl bevy::ecs::entity::Entity { _self: Ref, other: Ref, ) -> bool { - let output: bool = >::eq(&_self, &other) .into(); @@ -88,6 +88,119 @@ impl bevy::ecs::entity::Entity { output } } +#[script_bindings( + remote, + name = "child_of_functions", + bms_core_path = "bevy_mod_scripting_core", + generated +)] +impl bevy::ecs::hierarchy::ChildOf { + fn assert_receiver_is_total_eq(_self: Ref) -> () { + let output: () = ::assert_receiver_is_total_eq( + &_self, + ) + .into(); + output + } + fn clone( + _self: Ref, + ) -> Val { + let output: Val = ::clone( + &_self, + ) + .into(); + output + } + fn eq( + _self: Ref, + other: Ref, + ) -> bool { + let output: bool = >::eq(&_self, &other) + .into(); + output + } + /// The parent entity of this child entity. + fn get(_self: Ref) -> Val { + let output: Val = bevy::ecs::hierarchy::ChildOf::get( + &_self, + ) + .into(); + output + } + /// The parent entity of this child entity. + fn parent( + _self: Ref, + ) -> Val { + let output: Val = bevy::ecs::hierarchy::ChildOf::parent( + &_self, + ) + .into(); + output + } +} +#[script_bindings( + remote, + name = "children_functions", + bms_core_path = "bevy_mod_scripting_core", + generated +)] +impl bevy::ecs::hierarchy::Children { + fn assert_receiver_is_total_eq(_self: Ref) -> () { + let output: () = ::assert_receiver_is_total_eq( + &_self, + ) + .into(); + output + } + fn eq( + _self: Ref, + other: Ref, + ) -> bool { + let output: bool = >::eq(&_self, &other) + .into(); + output + } + /// Swaps the child at `a_index` with the child at `b_index`. + fn swap( + mut _self: Mut, + a_index: usize, + b_index: usize, + ) -> () { + let output: () = bevy::ecs::hierarchy::Children::swap( + &mut _self, + a_index, + b_index, + ) + .into(); + output + } +} +#[script_bindings( + remote, + name = "name_functions", + bms_core_path = "bevy_mod_scripting_core", + generated +)] +impl bevy::ecs::name::Name { + fn clone(_self: Ref) -> Val { + let output: Val = ::clone( + &_self, + ) + .into(); + output + } + fn eq(_self: Ref, other: Ref) -> bool { + let output: bool = >::eq(&_self, &other) + .into(); + output + } +} #[script_bindings( remote, name = "on_add_functions", @@ -124,7 +237,7 @@ impl bevy::ecs::world::OnReplace {} )] impl bevy::ecs::component::ComponentId { fn assert_receiver_is_total_eq(_self: Ref) -> () { - let output: () = ::assert_receiver_is_total_eq( + let output: () = ::assert_receiver_is_total_eq( &_self, ) .into(); @@ -133,7 +246,7 @@ impl bevy::ecs::component::ComponentId { fn clone( _self: Ref, ) -> Val { - let output: Val = ::clone( + let output: Val = ::clone( &_self, ) .into(); @@ -143,7 +256,7 @@ impl bevy::ecs::component::ComponentId { _self: Ref, other: Ref, ) -> bool { - let output: bool = >::eq(&_self, &other) .into(); @@ -166,6 +279,41 @@ impl bevy::ecs::component::ComponentId { output } } +#[script_bindings( + remote, + name = "default_query_filters_functions", + bms_core_path = "bevy_mod_scripting_core", + generated +)] +impl bevy::ecs::entity_disabling::DefaultQueryFilters { + /// Creates a new, completely empty [`DefaultQueryFilters`]. + /// This is provided as an escape hatch; in most cases you should initialize this using [`FromWorld`], + /// which is automatically called when creating a new [`World`]. + fn empty() -> Val { + let output: Val = bevy::ecs::entity_disabling::DefaultQueryFilters::empty() + .into(); + output + } + /// Adds this [`ComponentId`] to the set of [`DefaultQueryFilters`], + /// causing entities with this component to be excluded from queries. + /// This method is idempotent, and will not add the same component multiple times. + /// # Warning + /// This method should only be called before the app starts, as it will not affect queries + /// initialized before it is called. + /// As discussed in the [module docs](crate::entity_disabling), this can have performance implications, + /// as well as create interoperability issues, and should be used with caution. + fn register_disabling_component( + mut _self: Mut, + component_id: Val, + ) -> () { + let output: () = bevy::ecs::entity_disabling::DefaultQueryFilters::register_disabling_component( + &mut _self, + component_id.into_inner(), + ) + .into(); + output + } +} #[script_bindings( remote, name = "tick_functions", @@ -174,14 +322,14 @@ impl bevy::ecs::component::ComponentId { )] impl bevy::ecs::component::Tick { fn assert_receiver_is_total_eq(_self: Ref) -> () { - let output: () = ::assert_receiver_is_total_eq( + let output: () = ::assert_receiver_is_total_eq( &_self, ) .into(); output } fn clone(_self: Ref) -> Val { - let output: Val = ::clone( + let output: Val = ::clone( &_self, ) .into(); @@ -191,7 +339,7 @@ impl bevy::ecs::component::Tick { _self: Ref, other: Ref, ) -> bool { - let output: bool = >::eq(&_self, &other) .into(); @@ -241,7 +389,7 @@ impl bevy::ecs::component::ComponentTicks { fn clone( _self: Ref, ) -> Val { - let output: Val = ::clone( + let output: Val = ::clone( &_self, ) .into(); @@ -288,7 +436,7 @@ impl bevy::ecs::component::ComponentTicks { output } /// Manually sets the change tick. - /// This is normally done automatically via the [`DerefMut`](std::ops::DerefMut) implementation + /// This is normally done automatically via the [`DerefMut`] implementation /// on [`Mut`](crate::change_detection::Mut), [`ResMut`](crate::change_detection::ResMut), etc. /// However, components and resources that make use of interior mutability might require manual updates. /// # Example @@ -310,6 +458,72 @@ impl bevy::ecs::component::ComponentTicks { output } } +#[script_bindings( + remote, + name = "entity_hash_set_functions", + bms_core_path = "bevy_mod_scripting_core", + generated +)] +impl bevy::ecs::entity::hash_set::EntityHashSet { + fn assert_receiver_is_total_eq( + _self: Ref, + ) -> () { + let output: () = ::assert_receiver_is_total_eq( + &_self, + ) + .into(); + output + } + fn clone( + _self: Ref, + ) -> Val { + let output: Val = ::clone( + &_self, + ) + .into(); + output + } + fn eq( + _self: Ref, + other: Ref, + ) -> bool { + let output: bool = >::eq(&_self, &other) + .into(); + output + } + /// Returns `true` if the set contains no elements. + fn is_empty(_self: Ref) -> bool { + let output: bool = bevy::ecs::entity::hash_set::EntityHashSet::is_empty(&_self) + .into(); + output + } + /// Returns the number of elements in the set. + fn len(_self: Ref) -> usize { + let output: usize = bevy::ecs::entity::hash_set::EntityHashSet::len(&_self) + .into(); + output + } + /// Creates an empty `EntityHashSet`. + /// Equivalent to [`HashSet::with_hasher(EntityHash)`]. + /// [`HashSet::with_hasher(EntityHash)`]: HashSet::with_hasher + fn new() -> Val { + let output: Val = bevy::ecs::entity::hash_set::EntityHashSet::new() + .into(); + output + } + /// Creates an empty `EntityHashSet` with the specified capacity. + /// Equivalent to [`HashSet::with_capacity_and_hasher(n, EntityHash)`]. + /// [`HashSet::with_capacity_and_hasher(n, EntityHash)`]: HashSet::with_capacity_and_hasher + fn with_capacity(n: usize) -> Val { + let output: Val = bevy::ecs::entity::hash_set::EntityHashSet::with_capacity( + n, + ) + .into(); + output + } +} #[script_bindings( remote, name = "identifier_functions", @@ -320,7 +534,7 @@ impl bevy::ecs::identifier::Identifier { fn clone( _self: Ref, ) -> Val { - let output: Val = ::clone( + let output: Val = ::clone( &_self, ) .into(); @@ -330,7 +544,7 @@ impl bevy::ecs::identifier::Identifier { _self: Ref, other: Ref, ) -> bool { - let output: bool = >::eq(&_self, &other) .into(); @@ -378,7 +592,24 @@ impl bevy::ecs::entity::EntityHash { fn clone( _self: Ref, ) -> Val { - let output: Val = ::clone( + let output: Val = ::clone( + &_self, + ) + .into(); + output + } +} +#[script_bindings( + remote, + name = "disabled_functions", + bms_core_path = "bevy_mod_scripting_core", + generated +)] +impl bevy::ecs::entity_disabling::Disabled { + fn clone( + _self: Ref, + ) -> Val { + let output: Val = ::clone( &_self, ) .into(); @@ -395,7 +626,7 @@ impl bevy::ecs::removal_detection::RemovedComponentEntity { fn clone( _self: Ref, ) -> Val { - let output: Val = ::clone( + let output: Val = ::clone( &_self, ) .into(); @@ -409,20 +640,34 @@ impl bevy::ecs::removal_detection::RemovedComponentEntity { generated )] impl bevy::ecs::system::SystemIdMarker {} +#[script_bindings( + remote, + name = "on_despawn_functions", + bms_core_path = "bevy_mod_scripting_core", + generated +)] +impl bevy::ecs::world::OnDespawn {} impl ::bevy::app::Plugin for BevyEcsScriptingPlugin { fn build(&self, app: &mut ::bevy::prelude::App) { let mut world = app.world_mut(); register_entity_functions(&mut world); + register_child_of_functions(&mut world); + register_children_functions(&mut world); + register_name_functions(&mut world); register_on_add_functions(&mut world); register_on_insert_functions(&mut world); register_on_remove_functions(&mut world); register_on_replace_functions(&mut world); register_component_id_functions(&mut world); + register_default_query_filters_functions(&mut world); register_tick_functions(&mut world); register_component_ticks_functions(&mut world); + register_entity_hash_set_functions(&mut world); register_identifier_functions(&mut world); register_entity_hash_functions(&mut world); + register_disabled_functions(&mut world); register_removed_component_entity_functions(&mut world); register_system_id_marker_functions(&mut world); + register_on_despawn_functions(&mut world); } } diff --git a/crates/bevy_mod_scripting_functions/src/bevy_bindings/bevy_hierarchy.rs b/crates/bevy_mod_scripting_functions/src/bevy_bindings/bevy_hierarchy.rs deleted file mode 100644 index 529c8c7f5d..0000000000 --- a/crates/bevy_mod_scripting_functions/src/bevy_bindings/bevy_hierarchy.rs +++ /dev/null @@ -1,113 +0,0 @@ -// @generated by cargo bevy-api-gen generate, modify the templates not this file -#![allow(clippy::all)] -#![allow(unused, deprecated, dead_code)] -#![cfg_attr(rustfmt, rustfmt_skip)] -use bevy_mod_scripting_core::bindings::{ - ReflectReference, - function::{ - from::{Ref, Mut, Val}, - namespace::NamespaceBuilder, - }, -}; -use bevy_mod_scripting_derive::script_bindings; -use crate::*; -pub struct BevyHierarchyScriptingPlugin; -#[script_bindings( - remote, - name = "children_functions", - bms_core_path = "bevy_mod_scripting_core", - generated -)] -impl bevy::hierarchy::prelude::Children { - /// Swaps the child at `a_index` with the child at `b_index`. - fn swap( - mut _self: Mut, - a_index: usize, - b_index: usize, - ) -> () { - let output: () = bevy::hierarchy::prelude::Children::swap( - &mut _self, - a_index, - b_index, - ) - .into(); - output - } -} -#[script_bindings( - remote, - name = "parent_functions", - bms_core_path = "bevy_mod_scripting_core", - generated -)] -impl bevy::hierarchy::prelude::Parent { - fn assert_receiver_is_total_eq(_self: Ref) -> () { - let output: () = ::assert_receiver_is_total_eq( - &_self, - ) - .into(); - output - } - fn eq( - _self: Ref, - other: Ref, - ) -> bool { - let output: bool = >::eq(&_self, &other) - .into(); - output - } - /// Gets the [`Entity`] ID of the parent. - fn get( - _self: Ref, - ) -> Val { - let output: Val = bevy::hierarchy::prelude::Parent::get( - &_self, - ) - .into(); - output - } -} -#[script_bindings( - remote, - name = "hierarchy_event_functions", - bms_core_path = "bevy_mod_scripting_core", - generated -)] -impl bevy::hierarchy::HierarchyEvent { - fn assert_receiver_is_total_eq(_self: Ref) -> () { - let output: () = ::assert_receiver_is_total_eq( - &_self, - ) - .into(); - output - } - fn clone( - _self: Ref, - ) -> Val { - let output: Val = ::clone( - &_self, - ) - .into(); - output - } - fn eq( - _self: Ref, - other: Ref, - ) -> bool { - let output: bool = >::eq(&_self, &other) - .into(); - output - } -} -impl ::bevy::app::Plugin for BevyHierarchyScriptingPlugin { - fn build(&self, app: &mut ::bevy::prelude::App) { - let mut world = app.world_mut(); - register_children_functions(&mut world); - register_parent_functions(&mut world); - register_hierarchy_event_functions(&mut world); - } -} diff --git a/crates/bevy_mod_scripting_functions/src/bevy_bindings/bevy_input.rs b/crates/bevy_mod_scripting_functions/src/bevy_bindings/bevy_input.rs index 712fa729dc..886412123b 100644 --- a/crates/bevy_mod_scripting_functions/src/bevy_bindings/bevy_input.rs +++ b/crates/bevy_mod_scripting_functions/src/bevy_bindings/bevy_input.rs @@ -19,7 +19,7 @@ pub struct BevyInputScriptingPlugin; generated )] impl bevy::input::gamepad::Gamepad { - /// Returns the directional pad as a [`Vec2`] + /// Returns the directional pad as a [`Vec2`]. fn dpad(_self: Ref) -> Val { let output: Val = bevy::input::gamepad::Gamepad::dpad(&_self) .into(); @@ -51,7 +51,7 @@ impl bevy::input::gamepad::Gamepad { .into(); output } - /// Returns the left stick as a [`Vec2`] + /// Returns the left stick as a [`Vec2`]. fn left_stick(_self: Ref) -> Val { let output: Val = bevy::input::gamepad::Gamepad::left_stick( &_self, @@ -75,14 +75,14 @@ impl bevy::input::gamepad::Gamepad { /// [vendor]: Self::vendor_id fn product_id( _self: Ref, - ) -> std::option::Option { - let output: std::option::Option = bevy::input::gamepad::Gamepad::product_id( + ) -> ::core::option::Option { + let output: ::core::option::Option = bevy::input::gamepad::Gamepad::product_id( &_self, ) .into(); output } - /// Returns the right stick as a [`Vec2`] + /// Returns the right stick as a [`Vec2`]. fn right_stick(_self: Ref) -> Val { let output: Val = bevy::input::gamepad::Gamepad::right_stick( &_self, @@ -91,8 +91,10 @@ impl bevy::input::gamepad::Gamepad { output } /// Returns the USB vendor ID as assigned by the USB-IF, if available. - fn vendor_id(_self: Ref) -> std::option::Option { - let output: std::option::Option = bevy::input::gamepad::Gamepad::vendor_id( + fn vendor_id( + _self: Ref, + ) -> ::core::option::Option { + let output: ::core::option::Option = bevy::input::gamepad::Gamepad::vendor_id( &_self, ) .into(); @@ -107,7 +109,7 @@ impl bevy::input::gamepad::Gamepad { )] impl bevy::input::gamepad::GamepadAxis { fn assert_receiver_is_total_eq(_self: Ref) -> () { - let output: () = ::assert_receiver_is_total_eq( + let output: () = ::assert_receiver_is_total_eq( &_self, ) .into(); @@ -116,7 +118,7 @@ impl bevy::input::gamepad::GamepadAxis { fn clone( _self: Ref, ) -> Val { - let output: Val = ::clone( + let output: Val = ::clone( &_self, ) .into(); @@ -126,7 +128,7 @@ impl bevy::input::gamepad::GamepadAxis { _self: Ref, other: Ref, ) -> bool { - let output: bool = >::eq(&_self, &other) .into(); @@ -143,7 +145,7 @@ impl bevy::input::gamepad::GamepadButton { fn assert_receiver_is_total_eq( _self: Ref, ) -> () { - let output: () = ::assert_receiver_is_total_eq( + let output: () = ::assert_receiver_is_total_eq( &_self, ) .into(); @@ -152,7 +154,7 @@ impl bevy::input::gamepad::GamepadButton { fn clone( _self: Ref, ) -> Val { - let output: Val = ::clone( + let output: Val = ::clone( &_self, ) .into(); @@ -162,7 +164,7 @@ impl bevy::input::gamepad::GamepadButton { _self: Ref, other: Ref, ) -> bool { - let output: bool = >::eq(&_self, &other) .into(); @@ -179,7 +181,7 @@ impl bevy::input::gamepad::GamepadSettings { fn clone( _self: Ref, ) -> Val { - let output: Val = ::clone( + let output: Val = ::clone( &_self, ) .into(); @@ -194,7 +196,7 @@ impl bevy::input::gamepad::GamepadSettings { )] impl bevy::input::keyboard::KeyCode { fn assert_receiver_is_total_eq(_self: Ref) -> () { - let output: () = ::assert_receiver_is_total_eq( + let output: () = ::assert_receiver_is_total_eq( &_self, ) .into(); @@ -203,7 +205,7 @@ impl bevy::input::keyboard::KeyCode { fn clone( _self: Ref, ) -> Val { - let output: Val = ::clone( + let output: Val = ::clone( &_self, ) .into(); @@ -213,7 +215,7 @@ impl bevy::input::keyboard::KeyCode { _self: Ref, other: Ref, ) -> bool { - let output: bool = >::eq(&_self, &other) .into(); @@ -228,7 +230,7 @@ impl bevy::input::keyboard::KeyCode { )] impl bevy::input::mouse::MouseButton { fn assert_receiver_is_total_eq(_self: Ref) -> () { - let output: () = ::assert_receiver_is_total_eq( + let output: () = ::assert_receiver_is_total_eq( &_self, ) .into(); @@ -237,7 +239,7 @@ impl bevy::input::mouse::MouseButton { fn clone( _self: Ref, ) -> Val { - let output: Val = ::clone( + let output: Val = ::clone( &_self, ) .into(); @@ -247,7 +249,7 @@ impl bevy::input::mouse::MouseButton { _self: Ref, other: Ref, ) -> bool { - let output: bool = >::eq(&_self, &other) .into(); @@ -264,7 +266,7 @@ impl bevy::input::touch::TouchInput { fn clone( _self: Ref, ) -> Val { - let output: Val = ::clone( + let output: Val = ::clone( &_self, ) .into(); @@ -274,7 +276,7 @@ impl bevy::input::touch::TouchInput { _self: Ref, other: Ref, ) -> bool { - let output: bool = >::eq(&_self, &other) .into(); @@ -291,7 +293,7 @@ impl bevy::input::keyboard::KeyboardFocusLost { fn assert_receiver_is_total_eq( _self: Ref, ) -> () { - let output: () = ::assert_receiver_is_total_eq( + let output: () = ::assert_receiver_is_total_eq( &_self, ) .into(); @@ -300,7 +302,7 @@ impl bevy::input::keyboard::KeyboardFocusLost { fn clone( _self: Ref, ) -> Val { - let output: Val = ::clone( + let output: Val = ::clone( &_self, ) .into(); @@ -310,7 +312,7 @@ impl bevy::input::keyboard::KeyboardFocusLost { _self: Ref, other: Ref, ) -> bool { - let output: bool = >::eq(&_self, &other) .into(); @@ -327,7 +329,7 @@ impl bevy::input::keyboard::KeyboardInput { fn assert_receiver_is_total_eq( _self: Ref, ) -> () { - let output: () = ::assert_receiver_is_total_eq( + let output: () = ::assert_receiver_is_total_eq( &_self, ) .into(); @@ -336,7 +338,7 @@ impl bevy::input::keyboard::KeyboardInput { fn clone( _self: Ref, ) -> Val { - let output: Val = ::clone( + let output: Val = ::clone( &_self, ) .into(); @@ -346,7 +348,7 @@ impl bevy::input::keyboard::KeyboardInput { _self: Ref, other: Ref, ) -> bool { - let output: bool = >::eq(&_self, &other) .into(); @@ -363,7 +365,7 @@ impl bevy::input::mouse::AccumulatedMouseMotion { fn clone( _self: Ref, ) -> Val { - let output: Val = ::clone( + let output: Val = ::clone( &_self, ) .into(); @@ -373,7 +375,7 @@ impl bevy::input::mouse::AccumulatedMouseMotion { _self: Ref, other: Ref, ) -> bool { - let output: bool = >::eq(&_self, &other) .into(); @@ -390,7 +392,7 @@ impl bevy::input::mouse::AccumulatedMouseScroll { fn clone( _self: Ref, ) -> Val { - let output: Val = ::clone( + let output: Val = ::clone( &_self, ) .into(); @@ -400,7 +402,7 @@ impl bevy::input::mouse::AccumulatedMouseScroll { _self: Ref, other: Ref, ) -> bool { - let output: bool = >::eq(&_self, &other) .into(); @@ -417,7 +419,7 @@ impl bevy::input::mouse::MouseButtonInput { fn assert_receiver_is_total_eq( _self: Ref, ) -> () { - let output: () = ::assert_receiver_is_total_eq( + let output: () = ::assert_receiver_is_total_eq( &_self, ) .into(); @@ -426,7 +428,7 @@ impl bevy::input::mouse::MouseButtonInput { fn clone( _self: Ref, ) -> Val { - let output: Val = ::clone( + let output: Val = ::clone( &_self, ) .into(); @@ -436,7 +438,7 @@ impl bevy::input::mouse::MouseButtonInput { _self: Ref, other: Ref, ) -> bool { - let output: bool = >::eq(&_self, &other) .into(); @@ -453,7 +455,7 @@ impl bevy::input::mouse::MouseMotion { fn clone( _self: Ref, ) -> Val { - let output: Val = ::clone( + let output: Val = ::clone( &_self, ) .into(); @@ -463,7 +465,7 @@ impl bevy::input::mouse::MouseMotion { _self: Ref, other: Ref, ) -> bool { - let output: bool = >::eq(&_self, &other) .into(); @@ -480,7 +482,7 @@ impl bevy::input::mouse::MouseWheel { fn clone( _self: Ref, ) -> Val { - let output: Val = ::clone( + let output: Val = ::clone( &_self, ) .into(); @@ -490,7 +492,7 @@ impl bevy::input::mouse::MouseWheel { _self: Ref, other: Ref, ) -> bool { - let output: bool = >::eq(&_self, &other) .into(); @@ -507,7 +509,7 @@ impl bevy::input::gamepad::GamepadAxisChangedEvent { fn clone( _self: Ref, ) -> Val { - let output: Val = ::clone( + let output: Val = ::clone( &_self, ) .into(); @@ -517,13 +519,13 @@ impl bevy::input::gamepad::GamepadAxisChangedEvent { _self: Ref, other: Ref, ) -> bool { - let output: bool = >::eq(&_self, &other) .into(); output } - /// Creates a new [`GamepadAxisChangedEvent`] + /// Creates a new [`GamepadAxisChangedEvent`]. fn new( entity: Val, axis: Val, @@ -548,7 +550,7 @@ impl bevy::input::gamepad::GamepadButtonChangedEvent { fn clone( _self: Ref, ) -> Val { - let output: Val = ::clone( + let output: Val = ::clone( &_self, ) .into(); @@ -558,13 +560,13 @@ impl bevy::input::gamepad::GamepadButtonChangedEvent { _self: Ref, other: Ref, ) -> bool { - let output: bool = >::eq(&_self, &other) .into(); output } - /// Creates a new [`GamepadButtonChangedEvent`] + /// Creates a new [`GamepadButtonChangedEvent`]. fn new( entity: Val, button: Val, @@ -591,7 +593,7 @@ impl bevy::input::gamepad::GamepadButtonStateChangedEvent { fn assert_receiver_is_total_eq( _self: Ref, ) -> () { - let output: () = ::assert_receiver_is_total_eq( + let output: () = ::assert_receiver_is_total_eq( &_self, ) .into(); @@ -600,7 +602,7 @@ impl bevy::input::gamepad::GamepadButtonStateChangedEvent { fn clone( _self: Ref, ) -> Val { - let output: Val = ::clone( + let output: Val = ::clone( &_self, ) .into(); @@ -610,13 +612,13 @@ impl bevy::input::gamepad::GamepadButtonStateChangedEvent { _self: Ref, other: Ref, ) -> bool { - let output: bool = >::eq(&_self, &other) .into(); output } - /// Creates a new [`GamepadButtonStateChangedEvent`] + /// Creates a new [`GamepadButtonStateChangedEvent`]. fn new( entity: Val, button: Val, @@ -641,7 +643,7 @@ impl bevy::input::gamepad::GamepadConnection { fn clone( _self: Ref, ) -> Val { - let output: Val = ::clone( + let output: Val = ::clone( &_self, ) .into(); @@ -651,7 +653,7 @@ impl bevy::input::gamepad::GamepadConnection { _self: Ref, other: Ref, ) -> bool { - let output: bool = >::eq(&_self, &other) .into(); @@ -668,13 +670,13 @@ impl bevy::input::gamepad::GamepadConnectionEvent { fn clone( _self: Ref, ) -> Val { - let output: Val = ::clone( + let output: Val = ::clone( &_self, ) .into(); output } - /// Is the gamepad connected? + /// Whether the gamepad is connected. fn connected(_self: Ref) -> bool { let output: bool = bevy::input::gamepad::GamepadConnectionEvent::connected( &_self, @@ -682,7 +684,7 @@ impl bevy::input::gamepad::GamepadConnectionEvent { .into(); output } - /// Is the gamepad disconnected? + /// Whether the gamepad is disconnected. fn disconnected(_self: Ref) -> bool { let output: bool = bevy::input::gamepad::GamepadConnectionEvent::disconnected( &_self, @@ -694,7 +696,7 @@ impl bevy::input::gamepad::GamepadConnectionEvent { _self: Ref, other: Ref, ) -> bool { - let output: bool = >::eq(&_self, &other) .into(); @@ -723,7 +725,7 @@ impl bevy::input::gamepad::GamepadEvent { fn clone( _self: Ref, ) -> Val { - let output: Val = ::clone( + let output: Val = ::clone( &_self, ) .into(); @@ -733,7 +735,7 @@ impl bevy::input::gamepad::GamepadEvent { _self: Ref, other: Ref, ) -> bool { - let output: bool = >::eq(&_self, &other) .into(); @@ -750,7 +752,7 @@ impl bevy::input::gamepad::GamepadInput { fn assert_receiver_is_total_eq( _self: Ref, ) -> () { - let output: () = ::assert_receiver_is_total_eq( + let output: () = ::assert_receiver_is_total_eq( &_self, ) .into(); @@ -759,7 +761,7 @@ impl bevy::input::gamepad::GamepadInput { fn clone( _self: Ref, ) -> Val { - let output: Val = ::clone( + let output: Val = ::clone( &_self, ) .into(); @@ -769,7 +771,7 @@ impl bevy::input::gamepad::GamepadInput { _self: Ref, other: Ref, ) -> bool { - let output: bool = >::eq(&_self, &other) .into(); @@ -786,7 +788,7 @@ impl bevy::input::gamepad::GamepadRumbleRequest { fn clone( _self: Ref, ) -> Val { - let output: Val = ::clone( + let output: Val = ::clone( &_self, ) .into(); @@ -813,7 +815,7 @@ impl bevy::input::gamepad::RawGamepadAxisChangedEvent { fn clone( _self: Ref, ) -> Val { - let output: Val = ::clone( + let output: Val = ::clone( &_self, ) .into(); @@ -823,7 +825,7 @@ impl bevy::input::gamepad::RawGamepadAxisChangedEvent { _self: Ref, other: Ref, ) -> bool { - let output: bool = >::eq(&_self, &other) .into(); @@ -854,7 +856,7 @@ impl bevy::input::gamepad::RawGamepadButtonChangedEvent { fn clone( _self: Ref, ) -> Val { - let output: Val = ::clone( + let output: Val = ::clone( &_self, ) .into(); @@ -864,7 +866,7 @@ impl bevy::input::gamepad::RawGamepadButtonChangedEvent { _self: Ref, other: Ref, ) -> bool { - let output: bool = >::eq(&_self, &other) .into(); @@ -895,7 +897,7 @@ impl bevy::input::gamepad::RawGamepadEvent { fn clone( _self: Ref, ) -> Val { - let output: Val = ::clone( + let output: Val = ::clone( &_self, ) .into(); @@ -905,7 +907,7 @@ impl bevy::input::gamepad::RawGamepadEvent { _self: Ref, other: Ref, ) -> bool { - let output: bool = >::eq(&_self, &other) .into(); @@ -922,7 +924,7 @@ impl bevy::input::gestures::PinchGesture { fn clone( _self: Ref, ) -> Val { - let output: Val = ::clone( + let output: Val = ::clone( &_self, ) .into(); @@ -932,7 +934,7 @@ impl bevy::input::gestures::PinchGesture { _self: Ref, other: Ref, ) -> bool { - let output: bool = >::eq(&_self, &other) .into(); @@ -949,7 +951,7 @@ impl bevy::input::gestures::RotationGesture { fn clone( _self: Ref, ) -> Val { - let output: Val = ::clone( + let output: Val = ::clone( &_self, ) .into(); @@ -959,7 +961,7 @@ impl bevy::input::gestures::RotationGesture { _self: Ref, other: Ref, ) -> bool { - let output: bool = >::eq(&_self, &other) .into(); @@ -976,7 +978,7 @@ impl bevy::input::gestures::DoubleTapGesture { fn clone( _self: Ref, ) -> Val { - let output: Val = ::clone( + let output: Val = ::clone( &_self, ) .into(); @@ -986,7 +988,7 @@ impl bevy::input::gestures::DoubleTapGesture { _self: Ref, other: Ref, ) -> bool { - let output: bool = >::eq(&_self, &other) .into(); @@ -1003,7 +1005,7 @@ impl bevy::input::gestures::PanGesture { fn clone( _self: Ref, ) -> Val { - let output: Val = ::clone( + let output: Val = ::clone( &_self, ) .into(); @@ -1013,7 +1015,7 @@ impl bevy::input::gestures::PanGesture { _self: Ref, other: Ref, ) -> bool { - let output: bool = >::eq(&_self, &other) .into(); @@ -1028,14 +1030,14 @@ impl bevy::input::gestures::PanGesture { )] impl bevy::input::ButtonState { fn assert_receiver_is_total_eq(_self: Ref) -> () { - let output: () = ::assert_receiver_is_total_eq( + let output: () = ::assert_receiver_is_total_eq( &_self, ) .into(); output } fn clone(_self: Ref) -> Val { - let output: Val = ::clone( + let output: Val = ::clone( &_self, ) .into(); @@ -1045,7 +1047,7 @@ impl bevy::input::ButtonState { _self: Ref, other: Ref, ) -> bool { - let output: bool = >::eq(&_self, &other) .into(); @@ -1067,7 +1069,7 @@ impl bevy::input::gamepad::ButtonSettings { fn clone( _self: Ref, ) -> Val { - let output: Val = ::clone( + let output: Val = ::clone( &_self, ) .into(); @@ -1077,7 +1079,7 @@ impl bevy::input::gamepad::ButtonSettings { _self: Ref, other: Ref, ) -> bool { - let output: bool = >::eq(&_self, &other) .into(); @@ -1155,15 +1157,15 @@ impl bevy::input::gamepad::ButtonSettings { )] impl bevy::input::gamepad::AxisSettings { /// Clamps the `raw_value` according to the `AxisSettings`. - fn clamp(_self: Ref, new_value: f32) -> f32 { - let output: f32 = bevy::input::gamepad::AxisSettings::clamp(&_self, new_value) + fn clamp(_self: Ref, raw_value: f32) -> f32 { + let output: f32 = bevy::input::gamepad::AxisSettings::clamp(&_self, raw_value) .into(); output } fn clone( _self: Ref, ) -> Val { - let output: Val = ::clone( + let output: Val = ::clone( &_self, ) .into(); @@ -1185,28 +1187,12 @@ impl bevy::input::gamepad::AxisSettings { _self: Ref, other: Ref, ) -> bool { - let output: bool = >::eq(&_self, &other) .into(); output } - /// Filters the `new_value` based on the `old_value`, according to the [`AxisSettings`]. - /// Returns the clamped `new_value` if the change exceeds the settings threshold, - /// and `None` otherwise. - fn filter( - _self: Ref, - new_value: f32, - old_value: std::option::Option, - ) -> std::option::Option { - let output: std::option::Option = bevy::input::gamepad::AxisSettings::filter( - &_self, - new_value, - old_value, - ) - .into(); - output - } /// Get the value below which negative inputs will be rounded down to -1.0. fn livezone_lowerbound(_self: Ref) -> f32 { let output: f32 = bevy::input::gamepad::AxisSettings::livezone_lowerbound(&_self) @@ -1309,24 +1295,8 @@ impl bevy::input::gamepad::ButtonAxisSettings { fn clone( _self: Ref, ) -> Val { - let output: Val = ::clone( - &_self, - ) - .into(); - output - } - /// Filters the `new_value` based on the `old_value`, according to the [`ButtonAxisSettings`]. - /// Returns the clamped `new_value`, according to the [`ButtonAxisSettings`], if the change - /// exceeds the settings threshold, and `None` otherwise. - fn filter( - _self: Ref, - new_value: f32, - old_value: std::option::Option, - ) -> std::option::Option { - let output: std::option::Option = bevy::input::gamepad::ButtonAxisSettings::filter( + let output: Val = ::clone( &_self, - new_value, - old_value, ) .into(); output @@ -1342,7 +1312,7 @@ impl bevy::input::gamepad::GamepadRumbleIntensity { fn clone( _self: Ref, ) -> Val { - let output: Val = ::clone( + let output: Val = ::clone( &_self, ) .into(); @@ -1352,7 +1322,7 @@ impl bevy::input::gamepad::GamepadRumbleIntensity { _self: Ref, other: Ref, ) -> bool { - let output: bool = >::eq(&_self, &other) .into(); @@ -1387,14 +1357,14 @@ impl bevy::input::gamepad::GamepadRumbleIntensity { )] impl bevy::input::keyboard::Key { fn assert_receiver_is_total_eq(_self: Ref) -> () { - let output: () = ::assert_receiver_is_total_eq( + let output: () = ::assert_receiver_is_total_eq( &_self, ) .into(); output } fn clone(_self: Ref) -> Val { - let output: Val = ::clone( + let output: Val = ::clone( &_self, ) .into(); @@ -1404,7 +1374,7 @@ impl bevy::input::keyboard::Key { _self: Ref, other: Ref, ) -> bool { - let output: bool = >::eq(&_self, &other) .into(); @@ -1421,7 +1391,7 @@ impl bevy::input::keyboard::NativeKeyCode { fn assert_receiver_is_total_eq( _self: Ref, ) -> () { - let output: () = ::assert_receiver_is_total_eq( + let output: () = ::assert_receiver_is_total_eq( &_self, ) .into(); @@ -1430,7 +1400,7 @@ impl bevy::input::keyboard::NativeKeyCode { fn clone( _self: Ref, ) -> Val { - let output: Val = ::clone( + let output: Val = ::clone( &_self, ) .into(); @@ -1440,7 +1410,7 @@ impl bevy::input::keyboard::NativeKeyCode { _self: Ref, other: Ref, ) -> bool { - let output: bool = >::eq(&_self, &other) .into(); @@ -1455,7 +1425,7 @@ impl bevy::input::keyboard::NativeKeyCode { )] impl bevy::input::keyboard::NativeKey { fn assert_receiver_is_total_eq(_self: Ref) -> () { - let output: () = ::assert_receiver_is_total_eq( + let output: () = ::assert_receiver_is_total_eq( &_self, ) .into(); @@ -1464,7 +1434,7 @@ impl bevy::input::keyboard::NativeKey { fn clone( _self: Ref, ) -> Val { - let output: Val = ::clone( + let output: Val = ::clone( &_self, ) .into(); @@ -1474,7 +1444,7 @@ impl bevy::input::keyboard::NativeKey { _self: Ref, other: Ref, ) -> bool { - let output: bool = >::eq(&_self, &other) .into(); @@ -1491,7 +1461,7 @@ impl bevy::input::mouse::MouseScrollUnit { fn assert_receiver_is_total_eq( _self: Ref, ) -> () { - let output: () = ::assert_receiver_is_total_eq( + let output: () = ::assert_receiver_is_total_eq( &_self, ) .into(); @@ -1500,7 +1470,7 @@ impl bevy::input::mouse::MouseScrollUnit { fn clone( _self: Ref, ) -> Val { - let output: Val = ::clone( + let output: Val = ::clone( &_self, ) .into(); @@ -1510,7 +1480,7 @@ impl bevy::input::mouse::MouseScrollUnit { _self: Ref, other: Ref, ) -> bool { - let output: bool = >::eq(&_self, &other) .into(); @@ -1525,7 +1495,7 @@ impl bevy::input::mouse::MouseScrollUnit { )] impl bevy::input::touch::TouchPhase { fn assert_receiver_is_total_eq(_self: Ref) -> () { - let output: () = ::assert_receiver_is_total_eq( + let output: () = ::assert_receiver_is_total_eq( &_self, ) .into(); @@ -1534,7 +1504,7 @@ impl bevy::input::touch::TouchPhase { fn clone( _self: Ref, ) -> Val { - let output: Val = ::clone( + let output: Val = ::clone( &_self, ) .into(); @@ -1544,7 +1514,7 @@ impl bevy::input::touch::TouchPhase { _self: Ref, other: Ref, ) -> bool { - let output: bool = >::eq(&_self, &other) .into(); @@ -1561,7 +1531,7 @@ impl bevy::input::touch::ForceTouch { fn clone( _self: Ref, ) -> Val { - let output: Val = ::clone( + let output: Val = ::clone( &_self, ) .into(); @@ -1571,7 +1541,7 @@ impl bevy::input::touch::ForceTouch { _self: Ref, other: Ref, ) -> bool { - let output: bool = >::eq(&_self, &other) .into(); diff --git a/crates/bevy_mod_scripting_functions/src/bevy_bindings/bevy_math.rs b/crates/bevy_mod_scripting_functions/src/bevy_bindings/bevy_math.rs index 6a65dc0527..29c99b82c2 100644 --- a/crates/bevy_mod_scripting_functions/src/bevy_bindings/bevy_math.rs +++ b/crates/bevy_mod_scripting_functions/src/bevy_bindings/bevy_math.rs @@ -20,7 +20,7 @@ pub struct BevyMathScriptingPlugin; )] impl bevy::math::AspectRatio { fn clone(_self: Ref) -> Val { - let output: Val = ::clone( + let output: Val = ::clone( &_self, ) .into(); @@ -30,7 +30,7 @@ impl bevy::math::AspectRatio { _self: Ref, other: Ref, ) -> bool { - let output: bool = >::eq(&_self, &other) .into(); @@ -73,14 +73,14 @@ impl bevy::math::AspectRatio { )] impl bevy::math::CompassOctant { fn assert_receiver_is_total_eq(_self: Ref) -> () { - let output: () = ::assert_receiver_is_total_eq( + let output: () = ::assert_receiver_is_total_eq( &_self, ) .into(); output } fn clone(_self: Ref) -> Val { - let output: Val = ::clone( + let output: Val = ::clone( &_self, ) .into(); @@ -90,12 +90,37 @@ impl bevy::math::CompassOctant { _self: Ref, other: Ref, ) -> bool { - let output: bool = >::eq(&_self, &other) .into(); output } + fn neg(_self: Val) -> Val { + let output: Val = ::neg( + _self.into_inner(), + ) + .into(); + output + } + /// Returns the opposite [`CompassOctant`], located 180 degrees from `self`. + /// This can also be accessed via the `-` operator, using the [`Neg`] trait. + fn opposite( + _self: Ref, + ) -> Val { + let output: Val = bevy::math::CompassOctant::opposite( + &_self, + ) + .into(); + output + } + /// Converts a [`CompassOctant`] to a standard index. + /// Starts at 0 for [`CompassOctant::North`] and increments clockwise. + fn to_index(_self: Val) -> usize { + let output: usize = bevy::math::CompassOctant::to_index(_self.into_inner()) + .into(); + output + } } #[script_bindings( remote, @@ -105,7 +130,7 @@ impl bevy::math::CompassOctant { )] impl bevy::math::CompassQuadrant { fn assert_receiver_is_total_eq(_self: Ref) -> () { - let output: () = ::assert_receiver_is_total_eq( + let output: () = ::assert_receiver_is_total_eq( &_self, ) .into(); @@ -114,7 +139,7 @@ impl bevy::math::CompassQuadrant { fn clone( _self: Ref, ) -> Val { - let output: Val = ::clone( + let output: Val = ::clone( &_self, ) .into(); @@ -124,12 +149,37 @@ impl bevy::math::CompassQuadrant { _self: Ref, other: Ref, ) -> bool { - let output: bool = >::eq(&_self, &other) .into(); output } + fn neg(_self: Val) -> Val { + let output: Val = ::neg( + _self.into_inner(), + ) + .into(); + output + } + /// Returns the opposite [`CompassQuadrant`], located 180 degrees from `self`. + /// This can also be accessed via the `-` operator, using the [`Neg`] trait. + fn opposite( + _self: Ref, + ) -> Val { + let output: Val = bevy::math::CompassQuadrant::opposite( + &_self, + ) + .into(); + output + } + /// Converts a [`CompassQuadrant`] to a standard index. + /// Starts at 0 for [`CompassQuadrant::North`] and increments clockwise. + fn to_index(_self: Val) -> usize { + let output: usize = bevy::math::CompassQuadrant::to_index(_self.into_inner()) + .into(); + output + } } #[script_bindings( remote, @@ -139,7 +189,7 @@ impl bevy::math::CompassQuadrant { )] impl bevy::math::Isometry2d { fn clone(_self: Ref) -> Val { - let output: Val = ::clone( + let output: Val = ::clone( &_self, ) .into(); @@ -149,7 +199,7 @@ impl bevy::math::Isometry2d { _self: Ref, other: Ref, ) -> bool { - let output: bool = >::eq(&_self, &other) .into(); @@ -218,7 +268,7 @@ impl bevy::math::Isometry2d { _self: Val, rhs: Val, ) -> Val { - let output: Val = = >::mul(_self.into_inner(), rhs.into_inner()) .into(); @@ -228,7 +278,7 @@ impl bevy::math::Isometry2d { _self: Val, rhs: Val, ) -> Val { - let output: Val = = >::mul(_self.into_inner(), rhs.into_inner()) .into(); @@ -238,7 +288,7 @@ impl bevy::math::Isometry2d { _self: Val, rhs: Val, ) -> Val { - let output: Val = = >::mul(_self.into_inner(), rhs.into_inner()) .into(); @@ -277,7 +327,7 @@ impl bevy::math::Isometry2d { )] impl bevy::math::Isometry3d { fn clone(_self: Ref) -> Val { - let output: Val = ::clone( + let output: Val = ::clone( &_self, ) .into(); @@ -287,7 +337,7 @@ impl bevy::math::Isometry3d { _self: Ref, other: Ref, ) -> bool { - let output: bool = >::eq(&_self, &other) .into(); @@ -337,27 +387,17 @@ impl bevy::math::Isometry3d { _self: Val, rhs: Val, ) -> Val { - let output: Val = = >::mul(_self.into_inner(), rhs.into_inner()) .into(); output } - fn mul( - _self: Val, - rhs: Val, - ) -> Val { - let output: Val = >::mul(_self.into_inner(), rhs.into_inner()) - .into(); - output - } fn mul( _self: Val, rhs: Val, ) -> Val { - let output: Val = = >::mul(_self.into_inner(), rhs.into_inner()) .into(); @@ -367,12 +407,22 @@ impl bevy::math::Isometry3d { _self: Val, rhs: Val, ) -> Val { - let output: Val = = >::mul(_self.into_inner(), rhs.into_inner()) .into(); output } + fn mul( + _self: Val, + rhs: Val, + ) -> Val { + let output: Val = >::mul(_self.into_inner(), rhs.into_inner()) + .into(); + output + } } #[script_bindings( remote, @@ -382,14 +432,14 @@ impl bevy::math::Isometry3d { )] impl bevy::math::Ray2d { fn clone(_self: Ref) -> Val { - let output: Val = ::clone( + let output: Val = ::clone( &_self, ) .into(); output } fn eq(_self: Ref, other: Ref) -> bool { - let output: bool = >::eq(&_self, &other) .into(); @@ -412,8 +462,8 @@ impl bevy::math::Ray2d { _self: Ref, plane_origin: Val, plane: Val, - ) -> std::option::Option { - let output: std::option::Option = bevy::math::Ray2d::intersect_plane( + ) -> ::core::option::Option { + let output: ::core::option::Option = bevy::math::Ray2d::intersect_plane( &_self, plane_origin.into_inner(), plane.into_inner(), @@ -442,14 +492,14 @@ impl bevy::math::Ray2d { )] impl bevy::math::Ray3d { fn clone(_self: Ref) -> Val { - let output: Val = ::clone( + let output: Val = ::clone( &_self, ) .into(); output } fn eq(_self: Ref, other: Ref) -> bool { - let output: bool = >::eq(&_self, &other) .into(); @@ -472,8 +522,8 @@ impl bevy::math::Ray3d { _self: Ref, plane_origin: Val, plane: Val, - ) -> std::option::Option { - let output: std::option::Option = bevy::math::Ray3d::intersect_plane( + ) -> ::core::option::Option { + let output: ::core::option::Option = bevy::math::Ray3d::intersect_plane( &_self, plane_origin.into_inner(), plane.into_inner(), @@ -501,15 +551,6 @@ impl bevy::math::Ray3d { generated )] impl bevy::math::Rot2 { - /// Returns the angle in radians needed to make `self` and `other` coincide. - fn angle_between(_self: Val, other: Val) -> f32 { - let output: f32 = bevy::math::Rot2::angle_between( - _self.into_inner(), - other.into_inner(), - ) - .into(); - output - } /// Returns the angle in radians needed to make `self` and `other` coincide. fn angle_to(_self: Val, other: Val) -> f32 { let output: f32 = bevy::math::Rot2::angle_to( @@ -535,7 +576,7 @@ impl bevy::math::Rot2 { output } fn clone(_self: Ref) -> Val { - let output: Val = ::clone( + let output: Val = ::clone( &_self, ) .into(); @@ -550,8 +591,10 @@ impl bevy::math::Rot2 { /// # use approx::assert_relative_eq; /// let rot1 = Rot2::degrees(270.0); /// let rot2 = Rot2::degrees(-90.0); + /// #[cfg(feature = "approx")] /// assert_relative_eq!(rot1, rot2); /// let rot3 = Rot2::degrees(180.0); + /// #[cfg(feature = "approx")] /// assert_relative_eq!(rot1 * rot1, rot3); /// ``` fn degrees(degrees: f32) -> Val { @@ -559,7 +602,7 @@ impl bevy::math::Rot2 { output } fn eq(_self: Ref, other: Ref) -> bool { - let output: bool = >::eq(&_self, &other) .into(); @@ -640,7 +683,7 @@ impl bevy::math::Rot2 { _self: Val, rhs: Val, ) -> Val { - let output: Val = = >::mul(_self.into_inner(), rhs.into_inner()) .into(); @@ -651,7 +694,7 @@ impl bevy::math::Rot2 { _self: Val, direction: Val, ) -> Val { - let output: Val = = >::mul(_self.into_inner(), direction.into_inner()) .into(); @@ -662,7 +705,7 @@ impl bevy::math::Rot2 { _self: Val, rhs: Val, ) -> Val { - let output: Val = = >::mul(_self.into_inner(), rhs.into_inner()) .into(); @@ -732,8 +775,10 @@ impl bevy::math::Rot2 { /// # use std::f32::consts::{FRAC_PI_2, PI}; /// let rot1 = Rot2::radians(3.0 * FRAC_PI_2); /// let rot2 = Rot2::radians(-FRAC_PI_2); + /// #[cfg(feature = "approx")] /// assert_relative_eq!(rot1, rot2); /// let rot3 = Rot2::radians(PI); + /// #[cfg(feature = "approx")] /// assert_relative_eq!(rot1 * rot1, rot3); /// ``` fn radians(radians: f32) -> Val { @@ -785,8 +830,10 @@ impl bevy::math::Rot2 { /// # use approx::assert_relative_eq; /// let rot1 = Rot2::turn_fraction(0.75); /// let rot2 = Rot2::turn_fraction(-0.25); + /// #[cfg(feature = "approx")] /// assert_relative_eq!(rot1, rot2); /// let rot3 = Rot2::turn_fraction(0.5); + /// #[cfg(feature = "approx")] /// assert_relative_eq!(rot1 * rot1, rot3); /// ``` fn turn_fraction(fraction: f32) -> Val { @@ -811,7 +858,7 @@ impl bevy::math::prelude::Dir2 { output } fn clone(_self: Ref) -> Val { - let output: Val = ::clone( + let output: Val = ::clone( &_self, ) .into(); @@ -821,7 +868,7 @@ impl bevy::math::prelude::Dir2 { _self: Ref, other: Ref, ) -> bool { - let output: bool = >::eq(&_self, &other) .into(); @@ -854,14 +901,14 @@ impl bevy::math::prelude::Dir2 { _self: Val, rhs: f32, ) -> Val { - let output: Val = = >::mul(_self.into_inner(), rhs) .into(); output } fn neg(_self: Val) -> Val { - let output: Val = ::neg( + let output: Val = ::neg( _self.into_inner(), ) .into(); @@ -948,8 +995,10 @@ impl bevy::math::prelude::Dir2 { /// let dir1 = Dir2::X; /// let dir2 = Dir2::Y; /// let result1 = dir1.slerp(dir2, 1.0 / 3.0); + /// #[cfg(feature = "approx")] /// assert_relative_eq!(result1, Dir2::from_xy(0.75_f32.sqrt(), 0.5).unwrap()); /// let result2 = dir1.slerp(dir2, 0.5); + /// #[cfg(feature = "approx")] /// assert_relative_eq!(result2, Dir2::from_xy(0.5_f32.sqrt(), 0.5_f32.sqrt()).unwrap()); /// ``` fn slerp( @@ -982,7 +1031,7 @@ impl bevy::math::prelude::Dir3 { output } fn clone(_self: Ref) -> Val { - let output: Val = ::clone( + let output: Val = ::clone( &_self, ) .into(); @@ -992,7 +1041,7 @@ impl bevy::math::prelude::Dir3 { _self: Ref, other: Ref, ) -> bool { - let output: bool = >::eq(&_self, &other) .into(); @@ -1048,14 +1097,14 @@ impl bevy::math::prelude::Dir3 { _self: Val, rhs: f32, ) -> Val { - let output: Val = = >::mul(_self.into_inner(), rhs) .into(); output } fn neg(_self: Val) -> Val { - let output: Val = ::neg( + let output: Val = ::neg( _self.into_inner(), ) .into(); @@ -1086,12 +1135,14 @@ impl bevy::math::prelude::Dir3 { /// let dir1 = Dir3::X; /// let dir2 = Dir3::Y; /// let result1 = dir1.slerp(dir2, 1.0 / 3.0); + /// #[cfg(feature = "approx")] /// assert_relative_eq!( /// result1, /// Dir3::from_xyz(0.75_f32.sqrt(), 0.5, 0.0).unwrap(), /// epsilon = 0.000001 /// ); /// let result2 = dir1.slerp(dir2, 0.5); + /// #[cfg(feature = "approx")] /// assert_relative_eq!(result2, Dir3::from_xyz(0.5_f32.sqrt(), 0.5_f32.sqrt(), 0.0).unwrap()); /// ``` fn slerp( @@ -1116,13 +1167,17 @@ impl bevy::math::prelude::Dir3 { )] impl bevy::math::prelude::Dir3A { /// Returns the inner [`Vec3A`] - fn as_vec3a(_self: Ref) -> Val { - let output: Val = bevy::math::prelude::Dir3A::as_vec3a(&_self) + fn as_vec3a( + _self: Ref, + ) -> Val { + let output: Val = bevy::math::prelude::Dir3A::as_vec3a( + &_self, + ) .into(); output } fn clone(_self: Ref) -> Val { - let output: Val = ::clone( + let output: Val = ::clone( &_self, ) .into(); @@ -1132,7 +1187,7 @@ impl bevy::math::prelude::Dir3A { _self: Ref, other: Ref, ) -> bool { - let output: bool = >::eq(&_self, &other) .into(); @@ -1162,15 +1217,18 @@ impl bevy::math::prelude::Dir3A { .into(); output } - fn mul(_self: Val, rhs: f32) -> Val { - let output: Val = , + rhs: f32, + ) -> Val { + let output: Val = >::mul(_self.into_inner(), rhs) .into(); output } fn neg(_self: Val) -> Val { - let output: Val = ::neg( + let output: Val = ::neg( _self.into_inner(), ) .into(); @@ -1179,7 +1237,9 @@ impl bevy::math::prelude::Dir3A { /// Create a [`Dir3A`] from a [`Vec3A`] that is already normalized. /// # Warning /// `value` must be normalized, i.e its length must be `1.0`. - fn new_unchecked(value: Val) -> Val { + fn new_unchecked( + value: Val, + ) -> Val { let output: Val = bevy::math::prelude::Dir3A::new_unchecked( value.into_inner(), ) @@ -1199,12 +1259,14 @@ impl bevy::math::prelude::Dir3A { /// let dir1 = Dir3A::X; /// let dir2 = Dir3A::Y; /// let result1 = dir1.slerp(dir2, 1.0 / 3.0); + /// #[cfg(feature = "approx")] /// assert_relative_eq!( /// result1, /// Dir3A::from_xyz(0.75_f32.sqrt(), 0.5, 0.0).unwrap(), /// epsilon = 0.000001 /// ); /// let result2 = dir1.slerp(dir2, 0.5); + /// #[cfg(feature = "approx")] /// assert_relative_eq!(result2, Dir3A::from_xyz(0.5_f32.sqrt(), 0.5_f32.sqrt(), 0.0).unwrap()); /// ``` fn slerp( @@ -1249,7 +1311,7 @@ impl bevy::math::prelude::IRect { output } fn assert_receiver_is_total_eq(_self: Ref) -> () { - let output: () = ::assert_receiver_is_total_eq( + let output: () = ::assert_receiver_is_total_eq( &_self, ) .into(); @@ -1274,7 +1336,7 @@ impl bevy::math::prelude::IRect { output } fn clone(_self: Ref) -> Val { - let output: Val = ::clone( + let output: Val = ::clone( &_self, ) .into(); @@ -1304,7 +1366,7 @@ impl bevy::math::prelude::IRect { _self: Ref, other: Ref, ) -> bool { - let output: bool = >::eq(&_self, &other) .into(); @@ -1598,7 +1660,7 @@ impl bevy::math::prelude::Rect { output } fn clone(_self: Ref) -> Val { - let output: Val = ::clone( + let output: Val = ::clone( &_self, ) .into(); @@ -1628,7 +1690,7 @@ impl bevy::math::prelude::Rect { _self: Ref, other: Ref, ) -> bool { - let output: bool = >::eq(&_self, &other) .into(); @@ -1928,7 +1990,7 @@ impl bevy::math::prelude::URect { output } fn assert_receiver_is_total_eq(_self: Ref) -> () { - let output: () = ::assert_receiver_is_total_eq( + let output: () = ::assert_receiver_is_total_eq( &_self, ) .into(); @@ -1953,7 +2015,7 @@ impl bevy::math::prelude::URect { output } fn clone(_self: Ref) -> Val { - let output: Val = ::clone( + let output: Val = ::clone( &_self, ) .into(); @@ -1983,7 +2045,7 @@ impl bevy::math::prelude::URect { _self: Ref, other: Ref, ) -> bool { - let output: bool = >::eq(&_self, &other) .into(); @@ -2262,7 +2324,7 @@ impl bevy::math::bounding::Aabb2d { fn clone( _self: Ref, ) -> Val { - let output: Val = ::clone( + let output: Val = ::clone( &_self, ) .into(); @@ -2282,6 +2344,16 @@ impl bevy::math::bounding::Aabb2d { .into(); output } + fn eq( + _self: Ref, + other: Ref, + ) -> bool { + let output: bool = >::eq(&_self, &other) + .into(); + output + } /// Constructs an AABB from its center and half-size. fn new( center: Val, @@ -2315,7 +2387,7 @@ impl bevy::math::bounding::BoundingCircle { fn clone( _self: Ref, ) -> Val { - let output: Val = ::clone( + let output: Val = ::clone( &_self, ) .into(); @@ -2335,6 +2407,16 @@ impl bevy::math::bounding::BoundingCircle { .into(); output } + fn eq( + _self: Ref, + other: Ref, + ) -> bool { + let output: bool = >::eq(&_self, &other) + .into(); + output + } /// Constructs a bounding circle from its center and radius. fn new( center: Val, @@ -2363,7 +2445,7 @@ impl bevy::math::primitives::Circle { fn clone( _self: Ref, ) -> Val { - let output: Val = ::clone( + let output: Val = ::clone( &_self, ) .into(); @@ -2392,7 +2474,7 @@ impl bevy::math::primitives::Circle { _self: Ref, other: Ref, ) -> bool { - let output: bool = >::eq(&_self, &other) .into(); @@ -2417,7 +2499,7 @@ impl bevy::math::primitives::Annulus { fn clone( _self: Ref, ) -> Val { - let output: Val = ::clone( + let output: Val = ::clone( &_self, ) .into(); @@ -2447,7 +2529,7 @@ impl bevy::math::primitives::Annulus { _self: Ref, other: Ref, ) -> bool { - let output: bool = >::eq(&_self, &other) .into(); @@ -2509,7 +2591,7 @@ impl bevy::math::primitives::Arc2d { fn clone( _self: Ref, ) -> Val { - let output: Val = ::clone( + let output: Val = ::clone( &_self, ) .into(); @@ -2519,7 +2601,7 @@ impl bevy::math::primitives::Arc2d { _self: Ref, other: Ref, ) -> bool { - let output: bool = >::eq(&_self, &other) .into(); @@ -2634,7 +2716,7 @@ impl bevy::math::primitives::Capsule2d { fn clone( _self: Ref, ) -> Val { - let output: Val = ::clone( + let output: Val = ::clone( &_self, ) .into(); @@ -2644,7 +2726,7 @@ impl bevy::math::primitives::Capsule2d { _self: Ref, other: Ref, ) -> bool { - let output: bool = >::eq(&_self, &other) .into(); @@ -2715,7 +2797,7 @@ impl bevy::math::primitives::CircularSector { fn clone( _self: Ref, ) -> Val { - let output: Val = ::clone( + let output: Val = ::clone( &_self, ) .into(); @@ -2725,7 +2807,7 @@ impl bevy::math::primitives::CircularSector { _self: Ref, other: Ref, ) -> bool { - let output: bool = >::eq(&_self, &other) .into(); @@ -2849,7 +2931,7 @@ impl bevy::math::primitives::CircularSegment { fn clone( _self: Ref, ) -> Val { - let output: Val = ::clone( + let output: Val = ::clone( &_self, ) .into(); @@ -2859,7 +2941,7 @@ impl bevy::math::primitives::CircularSegment { _self: Ref, other: Ref, ) -> bool { - let output: bool = >::eq(&_self, &other) .into(); @@ -2948,7 +3030,7 @@ impl bevy::math::primitives::Ellipse { fn clone( _self: Ref, ) -> Val { - let output: Val = ::clone( + let output: Val = ::clone( &_self, ) .into(); @@ -2965,7 +3047,7 @@ impl bevy::math::primitives::Ellipse { _self: Ref, other: Ref, ) -> bool { - let output: bool = >::eq(&_self, &other) .into(); @@ -3019,7 +3101,7 @@ impl bevy::math::primitives::Line2d { fn clone( _self: Ref, ) -> Val { - let output: Val = ::clone( + let output: Val = ::clone( &_self, ) .into(); @@ -3029,7 +3111,7 @@ impl bevy::math::primitives::Line2d { _self: Ref, other: Ref, ) -> bool { - let output: bool = >::eq(&_self, &other) .into(); @@ -3046,7 +3128,7 @@ impl bevy::math::primitives::Plane2d { fn clone( _self: Ref, ) -> Val { - let output: Val = ::clone( + let output: Val = ::clone( &_self, ) .into(); @@ -3056,7 +3138,7 @@ impl bevy::math::primitives::Plane2d { _self: Ref, other: Ref, ) -> bool { - let output: bool = >::eq(&_self, &other) .into(); @@ -3085,7 +3167,7 @@ impl bevy::math::primitives::Rectangle { fn clone( _self: Ref, ) -> Val { - let output: Val = ::clone( + let output: Val = ::clone( &_self, ) .into(); @@ -3109,7 +3191,7 @@ impl bevy::math::primitives::Rectangle { _self: Ref, other: Ref, ) -> bool { - let output: bool = >::eq(&_self, &other) .into(); @@ -3183,7 +3265,7 @@ impl bevy::math::primitives::RegularPolygon { fn clone( _self: Ref, ) -> Val { - let output: Val = ::clone( + let output: Val = ::clone( &_self, ) .into(); @@ -3193,7 +3275,7 @@ impl bevy::math::primitives::RegularPolygon { _self: Ref, other: Ref, ) -> bool { - let output: bool = >::eq(&_self, &other) .into(); @@ -3293,7 +3375,7 @@ impl bevy::math::primitives::Rhombus { fn clone( _self: Ref, ) -> Val { - let output: Val = ::clone( + let output: Val = ::clone( &_self, ) .into(); @@ -3317,7 +3399,7 @@ impl bevy::math::primitives::Rhombus { _self: Ref, other: Ref, ) -> bool { - let output: bool = >::eq(&_self, &other) .into(); @@ -3370,10 +3452,43 @@ impl bevy::math::primitives::Rhombus { generated )] impl bevy::math::primitives::Segment2d { + /// Compute the midpoint between the two endpoints of the line segment. + fn center( + _self: Ref, + ) -> Val { + let output: Val = bevy::math::primitives::Segment2d::center( + &_self, + ) + .into(); + output + } + /// Compute the segment with its center at the origin, keeping the same direction and length. + fn centered( + _self: Ref, + ) -> Val { + let output: Val = bevy::math::primitives::Segment2d::centered( + &_self, + ) + .into(); + output + } fn clone( _self: Ref, ) -> Val { - let output: Val = ::clone( + let output: Val = ::clone( + &_self, + ) + .into(); + output + } + /// Compute the normalized direction pointing from the first endpoint to the second endpoint. + /// For the non-panicking version, see [`Segment2d::try_direction`]. + /// # Panics + /// Panics if a valid direction could not be computed, for example when the endpoints are coincident, NaN, or infinite. + fn direction( + _self: Ref, + ) -> Val { + let output: Val = bevy::math::primitives::Segment2d::direction( &_self, ) .into(); @@ -3383,25 +3498,88 @@ impl bevy::math::primitives::Segment2d { _self: Ref, other: Ref, ) -> bool { - let output: bool = >::eq(&_self, &other) .into(); output } - /// Create a new `Segment2d` from a direction and full length of the segment - fn new( + /// Create a new `Segment2d` centered at the origin with the given direction and length. + /// The endpoints will be at `-direction * length / 2.0` and `direction * length / 2.0`. + fn from_direction_and_length( direction: Val, length: f32, ) -> Val { - let output: Val = bevy::math::primitives::Segment2d::new( + let output: Val = bevy::math::primitives::Segment2d::from_direction_and_length( direction.into_inner(), length, ) .into(); output } - /// Get the position of the first point on the line segment + /// Create a new `Segment2d` starting from the origin of the given `ray`, + /// going in the direction of the ray for the given `length`. + /// The endpoints will be at `ray.origin` and `ray.origin + length * ray.direction`. + fn from_ray_and_length( + ray: Val, + length: f32, + ) -> Val { + let output: Val = bevy::math::primitives::Segment2d::from_ray_and_length( + ray.into_inner(), + length, + ) + .into(); + output + } + /// Create a new `Segment2d` centered at the origin from a vector representing + /// the direction and length of the line segment. + /// The endpoints will be at `-scaled_direction / 2.0` and `scaled_direction / 2.0`. + fn from_scaled_direction( + scaled_direction: Val, + ) -> Val { + let output: Val = bevy::math::primitives::Segment2d::from_scaled_direction( + scaled_direction.into_inner(), + ) + .into(); + output + } + /// Compute the normalized counterclockwise normal on the left-hand side of the line segment. + /// For the non-panicking version, see [`Segment2d::try_left_normal`]. + /// # Panics + /// Panics if a valid normal could not be computed, for example when the endpoints are coincident, NaN, or infinite. + fn left_normal( + _self: Ref, + ) -> Val { + let output: Val = bevy::math::primitives::Segment2d::left_normal( + &_self, + ) + .into(); + output + } + /// Compute the length of the line segment. + fn length(_self: Ref) -> f32 { + let output: f32 = bevy::math::primitives::Segment2d::length(&_self).into(); + output + } + /// Compute the squared length of the line segment. + fn length_squared(_self: Ref) -> f32 { + let output: f32 = bevy::math::primitives::Segment2d::length_squared(&_self) + .into(); + output + } + /// Create a new `Segment2d` from its endpoints. + fn new( + point1: Val, + point2: Val, + ) -> Val { + let output: Val = bevy::math::primitives::Segment2d::new( + point1.into_inner(), + point2.into_inner(), + ) + .into(); + output + } + /// Get the position of the first endpoint of the line segment. fn point1( _self: Ref, ) -> Val { @@ -3411,7 +3589,7 @@ impl bevy::math::primitives::Segment2d { .into(); output } - /// Get the position of the second point on the line segment + /// Get the position of the second endpoint of the line segment. fn point2( _self: Ref, ) -> Val { @@ -3421,6 +3599,128 @@ impl bevy::math::primitives::Segment2d { .into(); output } + /// Compute the segment with a new length, keeping the same direction and center. + fn resized( + _self: Ref, + length: f32, + ) -> Val { + let output: Val = bevy::math::primitives::Segment2d::resized( + &_self, + length, + ) + .into(); + output + } + /// Reverses the direction of the line segment by swapping the endpoints. + fn reverse(mut _self: Mut) -> () { + let output: () = bevy::math::primitives::Segment2d::reverse(&mut _self).into(); + output + } + /// Returns the line segment with its direction reversed by swapping the endpoints. + fn reversed( + _self: Val, + ) -> Val { + let output: Val = bevy::math::primitives::Segment2d::reversed( + _self.into_inner(), + ) + .into(); + output + } + /// Compute the normalized clockwise normal on the right-hand side of the line segment. + /// For the non-panicking version, see [`Segment2d::try_right_normal`]. + /// # Panics + /// Panics if a valid normal could not be computed, for example when the endpoints are coincident, NaN, or infinite. + fn right_normal( + _self: Ref, + ) -> Val { + let output: Val = bevy::math::primitives::Segment2d::right_normal( + &_self, + ) + .into(); + output + } + /// Compute the segment rotated around the origin by the given rotation. + fn rotated( + _self: Ref, + rotation: Val, + ) -> Val { + let output: Val = bevy::math::primitives::Segment2d::rotated( + &_self, + rotation.into_inner(), + ) + .into(); + output + } + /// Compute the segment rotated around the given point by the given rotation. + fn rotated_around( + _self: Ref, + rotation: Val, + point: Val, + ) -> Val { + let output: Val = bevy::math::primitives::Segment2d::rotated_around( + &_self, + rotation.into_inner(), + point.into_inner(), + ) + .into(); + output + } + /// Compute the segment rotated around its own center. + fn rotated_around_center( + _self: Ref, + rotation: Val, + ) -> Val { + let output: Val = bevy::math::primitives::Segment2d::rotated_around_center( + &_self, + rotation.into_inner(), + ) + .into(); + output + } + /// Compute the vector from the first endpoint to the second endpoint. + fn scaled_direction( + _self: Ref, + ) -> Val { + let output: Val = bevy::math::primitives::Segment2d::scaled_direction( + &_self, + ) + .into(); + output + } + /// Compute the non-normalized counterclockwise normal on the left-hand side of the line segment. + /// The length of the normal is the distance between the endpoints. + fn scaled_left_normal( + _self: Ref, + ) -> Val { + let output: Val = bevy::math::primitives::Segment2d::scaled_left_normal( + &_self, + ) + .into(); + output + } + /// Compute the non-normalized clockwise normal on the right-hand side of the line segment. + /// The length of the normal is the distance between the endpoints. + fn scaled_right_normal( + _self: Ref, + ) -> Val { + let output: Val = bevy::math::primitives::Segment2d::scaled_right_normal( + &_self, + ) + .into(); + output + } + /// Compute the segment translated by the given vector. + fn translated( + _self: Ref, + translation: Val, + ) -> Val { + let output: Val = bevy::math::primitives::Segment2d::translated( + &_self, + translation.into_inner(), + ) + .into(); + output + } } #[script_bindings( remote, @@ -3432,7 +3732,7 @@ impl bevy::math::primitives::Triangle2d { fn clone( _self: Ref, ) -> Val { - let output: Val = ::clone( + let output: Val = ::clone( &_self, ) .into(); @@ -3442,7 +3742,7 @@ impl bevy::math::primitives::Triangle2d { _self: Ref, other: Ref, ) -> bool { - let output: bool = >::eq(&_self, &other) .into(); @@ -3517,12 +3817,22 @@ impl bevy::math::bounding::Aabb3d { fn clone( _self: Ref, ) -> Val { - let output: Val = ::clone( + let output: Val = ::clone( &_self, ) .into(); output } + fn eq( + _self: Ref, + other: Ref, + ) -> bool { + let output: bool = >::eq(&_self, &other) + .into(); + output + } } #[script_bindings( remote, @@ -3544,12 +3854,22 @@ impl bevy::math::bounding::BoundingSphere { fn clone( _self: Ref, ) -> Val { - let output: Val = ::clone( + let output: Val = ::clone( &_self, ) .into(); output } + fn eq( + _self: Ref, + other: Ref, + ) -> bool { + let output: bool = >::eq(&_self, &other) + .into(); + output + } /// Get the radius of the bounding sphere fn radius(_self: Ref) -> f32 { let output: f32 = bevy::math::bounding::BoundingSphere::radius(&_self).into(); @@ -3566,7 +3886,7 @@ impl bevy::math::primitives::Sphere { fn clone( _self: Ref, ) -> Val { - let output: Val = ::clone( + let output: Val = ::clone( &_self, ) .into(); @@ -3595,7 +3915,7 @@ impl bevy::math::primitives::Sphere { _self: Ref, other: Ref, ) -> bool { - let output: bool = >::eq(&_self, &other) .into(); @@ -3620,7 +3940,7 @@ impl bevy::math::primitives::Cuboid { fn clone( _self: Ref, ) -> Val { - let output: Val = ::clone( + let output: Val = ::clone( &_self, ) .into(); @@ -3644,7 +3964,7 @@ impl bevy::math::primitives::Cuboid { _self: Ref, other: Ref, ) -> bool { - let output: bool = >::eq(&_self, &other) .into(); @@ -3731,7 +4051,7 @@ impl bevy::math::primitives::Cylinder { fn clone( _self: Ref, ) -> Val { - let output: Val = ::clone( + let output: Val = ::clone( &_self, ) .into(); @@ -3741,7 +4061,7 @@ impl bevy::math::primitives::Cylinder { _self: Ref, other: Ref, ) -> bool { - let output: bool = >::eq(&_self, &other) .into(); @@ -3773,7 +4093,7 @@ impl bevy::math::primitives::Capsule3d { fn clone( _self: Ref, ) -> Val { - let output: Val = ::clone( + let output: Val = ::clone( &_self, ) .into(); @@ -3783,7 +4103,7 @@ impl bevy::math::primitives::Capsule3d { _self: Ref, other: Ref, ) -> bool { - let output: bool = >::eq(&_self, &other) .into(); @@ -3835,7 +4155,7 @@ impl bevy::math::primitives::Cone { fn clone( _self: Ref, ) -> Val { - let output: Val = ::clone( + let output: Val = ::clone( &_self, ) .into(); @@ -3845,7 +4165,7 @@ impl bevy::math::primitives::Cone { _self: Ref, other: Ref, ) -> bool { - let output: bool = >::eq(&_self, &other) .into(); @@ -3883,7 +4203,7 @@ impl bevy::math::primitives::ConicalFrustum { fn clone( _self: Ref, ) -> Val { - let output: Val = ::clone( + let output: Val = ::clone( &_self, ) .into(); @@ -3893,7 +4213,7 @@ impl bevy::math::primitives::ConicalFrustum { _self: Ref, other: Ref, ) -> bool { - let output: bool = >::eq(&_self, &other) .into(); @@ -3910,7 +4230,7 @@ impl bevy::math::primitives::InfinitePlane3d { fn clone( _self: Ref, ) -> Val { - let output: Val = ::clone( + let output: Val = ::clone( &_self, ) .into(); @@ -3920,7 +4240,7 @@ impl bevy::math::primitives::InfinitePlane3d { _self: Ref, other: Ref, ) -> bool { - let output: bool = >::eq(&_self, &other) .into(); @@ -3995,7 +4315,7 @@ impl bevy::math::primitives::Line3d { fn clone( _self: Ref, ) -> Val { - let output: Val = ::clone( + let output: Val = ::clone( &_self, ) .into(); @@ -4005,7 +4325,7 @@ impl bevy::math::primitives::Line3d { _self: Ref, other: Ref, ) -> bool { - let output: bool = >::eq(&_self, &other) .into(); @@ -4019,10 +4339,43 @@ impl bevy::math::primitives::Line3d { generated )] impl bevy::math::primitives::Segment3d { + /// Compute the midpoint between the two endpoints of the line segment. + fn center( + _self: Ref, + ) -> Val { + let output: Val = bevy::math::primitives::Segment3d::center( + &_self, + ) + .into(); + output + } + /// Compute the segment with its center at the origin, keeping the same direction and length. + fn centered( + _self: Ref, + ) -> Val { + let output: Val = bevy::math::primitives::Segment3d::centered( + &_self, + ) + .into(); + output + } fn clone( _self: Ref, ) -> Val { - let output: Val = ::clone( + let output: Val = ::clone( + &_self, + ) + .into(); + output + } + /// Compute the normalized direction pointing from the first endpoint to the second endpoint. + /// For the non-panicking version, see [`Segment3d::try_direction`]. + /// # Panics + /// Panics if a valid direction could not be computed, for example when the endpoints are coincident, NaN, or infinite. + fn direction( + _self: Ref, + ) -> Val { + let output: Val = bevy::math::primitives::Segment3d::direction( &_self, ) .into(); @@ -4032,25 +4385,75 @@ impl bevy::math::primitives::Segment3d { _self: Ref, other: Ref, ) -> bool { - let output: bool = >::eq(&_self, &other) .into(); output } - /// Create a new `Segment3d` from a direction and full length of the segment - fn new( + /// Create a new `Segment3d` centered at the origin with the given direction and length. + /// The endpoints will be at `-direction * length / 2.0` and `direction * length / 2.0`. + fn from_direction_and_length( direction: Val, length: f32, ) -> Val { - let output: Val = bevy::math::primitives::Segment3d::new( + let output: Val = bevy::math::primitives::Segment3d::from_direction_and_length( direction.into_inner(), length, ) .into(); output } - /// Get the position of the first point on the line segment + /// Create a new `Segment3d` starting from the origin of the given `ray`, + /// going in the direction of the ray for the given `length`. + /// The endpoints will be at `ray.origin` and `ray.origin + length * ray.direction`. + fn from_ray_and_length( + ray: Val, + length: f32, + ) -> Val { + let output: Val = bevy::math::primitives::Segment3d::from_ray_and_length( + ray.into_inner(), + length, + ) + .into(); + output + } + /// Create a new `Segment3d` centered at the origin from a vector representing + /// the direction and length of the line segment. + /// The endpoints will be at `-scaled_direction / 2.0` and `scaled_direction / 2.0`. + fn from_scaled_direction( + scaled_direction: Val, + ) -> Val { + let output: Val = bevy::math::primitives::Segment3d::from_scaled_direction( + scaled_direction.into_inner(), + ) + .into(); + output + } + /// Compute the length of the line segment. + fn length(_self: Ref) -> f32 { + let output: f32 = bevy::math::primitives::Segment3d::length(&_self).into(); + output + } + /// Compute the squared length of the line segment. + fn length_squared(_self: Ref) -> f32 { + let output: f32 = bevy::math::primitives::Segment3d::length_squared(&_self) + .into(); + output + } + /// Create a new `Segment3d` from its endpoints. + fn new( + point1: Val, + point2: Val, + ) -> Val { + let output: Val = bevy::math::primitives::Segment3d::new( + point1.into_inner(), + point2.into_inner(), + ) + .into(); + output + } + /// Get the position of the first endpoint of the line segment. fn point1( _self: Ref, ) -> Val { @@ -4060,7 +4463,7 @@ impl bevy::math::primitives::Segment3d { .into(); output } - /// Get the position of the second point on the line segment + /// Get the position of the second endpoint of the line segment. fn point2( _self: Ref, ) -> Val { @@ -4070,6 +4473,93 @@ impl bevy::math::primitives::Segment3d { .into(); output } + /// Compute the segment with a new length, keeping the same direction and center. + fn resized( + _self: Ref, + length: f32, + ) -> Val { + let output: Val = bevy::math::primitives::Segment3d::resized( + &_self, + length, + ) + .into(); + output + } + /// Reverses the direction of the line segment by swapping the endpoints. + fn reverse(mut _self: Mut) -> () { + let output: () = bevy::math::primitives::Segment3d::reverse(&mut _self).into(); + output + } + /// Returns the line segment with its direction reversed by swapping the endpoints. + fn reversed( + _self: Val, + ) -> Val { + let output: Val = bevy::math::primitives::Segment3d::reversed( + _self.into_inner(), + ) + .into(); + output + } + /// Compute the segment rotated around the origin by the given rotation. + fn rotated( + _self: Ref, + rotation: Val, + ) -> Val { + let output: Val = bevy::math::primitives::Segment3d::rotated( + &_self, + rotation.into_inner(), + ) + .into(); + output + } + /// Compute the segment rotated around the given point by the given rotation. + fn rotated_around( + _self: Ref, + rotation: Val, + point: Val, + ) -> Val { + let output: Val = bevy::math::primitives::Segment3d::rotated_around( + &_self, + rotation.into_inner(), + point.into_inner(), + ) + .into(); + output + } + /// Compute the segment rotated around its own center. + fn rotated_around_center( + _self: Ref, + rotation: Val, + ) -> Val { + let output: Val = bevy::math::primitives::Segment3d::rotated_around_center( + &_self, + rotation.into_inner(), + ) + .into(); + output + } + /// Compute the vector from the first endpoint to the second endpoint. + fn scaled_direction( + _self: Ref, + ) -> Val { + let output: Val = bevy::math::primitives::Segment3d::scaled_direction( + &_self, + ) + .into(); + output + } + /// Compute the segment translated by the given vector. + fn translated( + _self: Ref, + translation: Val, + ) -> Val { + let output: Val = bevy::math::primitives::Segment3d::translated( + &_self, + translation.into_inner(), + ) + .into(); + output + } } #[script_bindings( remote, @@ -4081,7 +4571,7 @@ impl bevy::math::primitives::Torus { fn clone( _self: Ref, ) -> Val { - let output: Val = ::clone( + let output: Val = ::clone( &_self, ) .into(); @@ -4091,7 +4581,7 @@ impl bevy::math::primitives::Torus { _self: Ref, other: Ref, ) -> bool { - let output: bool = >::eq(&_self, &other) .into(); @@ -4155,7 +4645,7 @@ impl bevy::math::primitives::Triangle3d { fn clone( _self: Ref, ) -> Val { - let output: Val = ::clone( + let output: Val = ::clone( &_self, ) .into(); @@ -4165,7 +4655,7 @@ impl bevy::math::primitives::Triangle3d { _self: Ref, other: Ref, ) -> bool { - let output: bool = >::eq(&_self, &other) .into(); @@ -4230,8 +4720,8 @@ impl bevy::math::bounding::RayCast2d { fn aabb_intersection_at( _self: Ref, aabb: Ref, - ) -> std::option::Option { - let output: std::option::Option = bevy::math::bounding::RayCast2d::aabb_intersection_at( + ) -> ::core::option::Option { + let output: ::core::option::Option = bevy::math::bounding::RayCast2d::aabb_intersection_at( &_self, &aabb, ) @@ -4242,8 +4732,8 @@ impl bevy::math::bounding::RayCast2d { fn circle_intersection_at( _self: Ref, circle: Ref, - ) -> std::option::Option { - let output: std::option::Option = bevy::math::bounding::RayCast2d::circle_intersection_at( + ) -> ::core::option::Option { + let output: ::core::option::Option = bevy::math::bounding::RayCast2d::circle_intersection_at( &_self, &circle, ) @@ -4253,7 +4743,7 @@ impl bevy::math::bounding::RayCast2d { fn clone( _self: Ref, ) -> Val { - let output: Val = ::clone( + let output: Val = ::clone( &_self, ) .into(); @@ -4307,8 +4797,8 @@ impl bevy::math::bounding::AabbCast2d { fn aabb_collision_at( _self: Ref, aabb: Val, - ) -> std::option::Option { - let output: std::option::Option = bevy::math::bounding::AabbCast2d::aabb_collision_at( + ) -> ::core::option::Option { + let output: ::core::option::Option = bevy::math::bounding::AabbCast2d::aabb_collision_at( &_self, aabb.into_inner(), ) @@ -4318,7 +4808,7 @@ impl bevy::math::bounding::AabbCast2d { fn clone( _self: Ref, ) -> Val { - let output: Val = ::clone( + let output: Val = ::clone( &_self, ) .into(); @@ -4366,8 +4856,8 @@ impl bevy::math::bounding::BoundingCircleCast { fn circle_collision_at( _self: Ref, circle: Val, - ) -> std::option::Option { - let output: std::option::Option = bevy::math::bounding::BoundingCircleCast::circle_collision_at( + ) -> ::core::option::Option { + let output: ::core::option::Option = bevy::math::bounding::BoundingCircleCast::circle_collision_at( &_self, circle.into_inner(), ) @@ -4377,7 +4867,7 @@ impl bevy::math::bounding::BoundingCircleCast { fn clone( _self: Ref, ) -> Val { - let output: Val = ::clone( + let output: Val = ::clone( &_self, ) .into(); @@ -4425,8 +4915,8 @@ impl bevy::math::bounding::RayCast3d { fn aabb_intersection_at( _self: Ref, aabb: Ref, - ) -> std::option::Option { - let output: std::option::Option = bevy::math::bounding::RayCast3d::aabb_intersection_at( + ) -> ::core::option::Option { + let output: ::core::option::Option = bevy::math::bounding::RayCast3d::aabb_intersection_at( &_self, &aabb, ) @@ -4436,7 +4926,7 @@ impl bevy::math::bounding::RayCast3d { fn clone( _self: Ref, ) -> Val { - let output: Val = ::clone( + let output: Val = ::clone( &_self, ) .into(); @@ -4445,8 +4935,8 @@ impl bevy::math::bounding::RayCast3d { /// Get the cached multiplicative inverse of the direction of the ray. fn direction_recip( _self: Ref, - ) -> Val { - let output: Val = bevy::math::bounding::RayCast3d::direction_recip( + ) -> Val { + let output: Val = bevy::math::bounding::RayCast3d::direction_recip( &_self, ) .into(); @@ -4468,8 +4958,8 @@ impl bevy::math::bounding::RayCast3d { fn sphere_intersection_at( _self: Ref, sphere: Ref, - ) -> std::option::Option { - let output: std::option::Option = bevy::math::bounding::RayCast3d::sphere_intersection_at( + ) -> ::core::option::Option { + let output: ::core::option::Option = bevy::math::bounding::RayCast3d::sphere_intersection_at( &_self, &sphere, ) @@ -4488,8 +4978,8 @@ impl bevy::math::bounding::AabbCast3d { fn aabb_collision_at( _self: Ref, aabb: Val, - ) -> std::option::Option { - let output: std::option::Option = bevy::math::bounding::AabbCast3d::aabb_collision_at( + ) -> ::core::option::Option { + let output: ::core::option::Option = bevy::math::bounding::AabbCast3d::aabb_collision_at( &_self, aabb.into_inner(), ) @@ -4499,7 +4989,7 @@ impl bevy::math::bounding::AabbCast3d { fn clone( _self: Ref, ) -> Val { - let output: Val = ::clone( + let output: Val = ::clone( &_self, ) .into(); @@ -4530,7 +5020,7 @@ impl bevy::math::bounding::BoundingSphereCast { fn clone( _self: Ref, ) -> Val { - let output: Val = ::clone( + let output: Val = ::clone( &_self, ) .into(); @@ -4554,8 +5044,8 @@ impl bevy::math::bounding::BoundingSphereCast { fn sphere_collision_at( _self: Ref, sphere: Val, - ) -> std::option::Option { - let output: std::option::Option = bevy::math::bounding::BoundingSphereCast::sphere_collision_at( + ) -> ::core::option::Option { + let output: ::core::option::Option = bevy::math::bounding::BoundingSphereCast::sphere_collision_at( &_self, sphere.into_inner(), ) @@ -4582,7 +5072,7 @@ impl bevy::math::curve::interval::Interval { fn clone( _self: Ref, ) -> Val { - let output: Val = ::clone( + let output: Val = ::clone( &_self, ) .into(); @@ -4620,7 +5110,7 @@ impl bevy::math::curve::interval::Interval { _self: Ref, other: Ref, ) -> bool { - let output: bool = >::eq(&_self, &other) .into(); @@ -4676,49 +5166,49 @@ impl bevy::math::curve::interval::Interval { )] impl bevy::math::FloatOrd { fn clone(_self: Ref) -> Val { - let output: Val = ::clone( + let output: Val = ::clone( &_self, ) .into(); output } fn eq(_self: Ref, other: Ref) -> bool { - let output: bool = >::eq(&_self, &other) .into(); output } fn ge(_self: Ref, other: Ref) -> bool { - let output: bool = >::ge(&_self, &other) .into(); output } fn gt(_self: Ref, other: Ref) -> bool { - let output: bool = >::gt(&_self, &other) .into(); output } fn le(_self: Ref, other: Ref) -> bool { - let output: bool = >::le(&_self, &other) .into(); output } fn lt(_self: Ref, other: Ref) -> bool { - let output: bool = >::lt(&_self, &other) .into(); output } fn neg(_self: Val) -> Val { - let output: Val = ::neg( + let output: Val = ::neg( _self.into_inner(), ) .into(); @@ -4735,7 +5225,7 @@ impl bevy::math::primitives::Plane3d { fn clone( _self: Ref, ) -> Val { - let output: Val = ::clone( + let output: Val = ::clone( &_self, ) .into(); @@ -4745,7 +5235,7 @@ impl bevy::math::primitives::Plane3d { _self: Ref, other: Ref, ) -> bool { - let output: bool = >::eq(&_self, &other) .into(); @@ -4788,7 +5278,7 @@ impl bevy::math::primitives::Tetrahedron { fn clone( _self: Ref, ) -> Val { - let output: Val = ::clone( + let output: Val = ::clone( &_self, ) .into(); @@ -4798,7 +5288,7 @@ impl bevy::math::primitives::Tetrahedron { _self: Ref, other: Ref, ) -> bool { - let output: bool = >::eq(&_self, &other) .into(); @@ -4840,7 +5330,7 @@ impl bevy::math::curve::easing::EaseFunction { fn clone( _self: Ref, ) -> Val { - let output: Val = ::clone( + let output: Val = ::clone( &_self, ) .into(); @@ -4850,13 +5340,47 @@ impl bevy::math::curve::easing::EaseFunction { _self: Ref, other: Ref, ) -> bool { - let output: bool = >::eq(&_self, &other) .into(); output } } +#[script_bindings( + remote, + name = "jump_at_functions", + bms_core_path = "bevy_mod_scripting_core", + generated +)] +impl bevy::math::curve::easing::JumpAt { + fn assert_receiver_is_total_eq(_self: Ref) -> () { + let output: () = ::assert_receiver_is_total_eq( + &_self, + ) + .into(); + output + } + fn clone( + _self: Ref, + ) -> Val { + let output: Val = ::clone( + &_self, + ) + .into(); + output + } + fn eq( + _self: Ref, + other: Ref, + ) -> bool { + let output: bool = >::eq(&_self, &other) + .into(); + output + } +} impl ::bevy::app::Plugin for BevyMathScriptingPlugin { fn build(&self, app: &mut ::bevy::prelude::App) { let mut world = app.world_mut(); @@ -4915,5 +5439,6 @@ impl ::bevy::app::Plugin for BevyMathScriptingPlugin { register_plane_3_d_functions(&mut world); register_tetrahedron_functions(&mut world); register_ease_function_functions(&mut world); + register_jump_at_functions(&mut world); } } diff --git a/crates/bevy_mod_scripting_functions/src/bevy_bindings/bevy_reflect.rs b/crates/bevy_mod_scripting_functions/src/bevy_bindings/bevy_reflect.rs index 303da037a7..5db17464fc 100644 --- a/crates/bevy_mod_scripting_functions/src/bevy_bindings/bevy_reflect.rs +++ b/crates/bevy_mod_scripting_functions/src/bevy_bindings/bevy_reflect.rs @@ -18,7 +18,7 @@ pub struct BevyReflectScriptingPlugin; bms_core_path = "bevy_mod_scripting_core", generated )] -impl std::sync::atomic::AtomicBool { +impl ::core::sync::atomic::AtomicBool { /// Consumes the atomic and returns the contained value. /// This is safe because passing `self` by value guarantees that no other threads are /// concurrently accessing the atomic data. @@ -28,8 +28,10 @@ impl std::sync::atomic::AtomicBool { /// let some_bool = AtomicBool::new(true); /// assert_eq!(some_bool.into_inner(), true); /// ``` - fn into_inner(_self: Val) -> bool { - let output: bool = std::sync::atomic::AtomicBool::into_inner(_self.into_inner()) + fn into_inner(_self: Val<::core::sync::atomic::AtomicBool>) -> bool { + let output: bool = ::core::sync::atomic::AtomicBool::into_inner( + _self.into_inner(), + ) .into(); output } @@ -40,8 +42,8 @@ impl std::sync::atomic::AtomicBool { /// let atomic_true = AtomicBool::new(true); /// let atomic_false = AtomicBool::new(false); /// ``` - fn new(v: bool) -> Val { - let output: Val = std::sync::atomic::AtomicBool::new( + fn new(v: bool) -> Val<::core::sync::atomic::AtomicBool> { + let output: Val<::core::sync::atomic::AtomicBool> = ::core::sync::atomic::AtomicBool::new( v, ) .into(); @@ -54,7 +56,7 @@ impl std::sync::atomic::AtomicBool { bms_core_path = "bevy_mod_scripting_core", generated )] -impl std::sync::atomic::AtomicI16 { +impl ::core::sync::atomic::AtomicI16 { /// Consumes the atomic and returns the contained value. /// This is safe because passing `self` by value guarantees that no other threads are /// concurrently accessing the atomic data. @@ -64,8 +66,8 @@ impl std::sync::atomic::AtomicI16 { /// let some_var = AtomicI16::new(5); /// assert_eq!(some_var.into_inner(), 5); /// ``` - fn into_inner(_self: Val) -> i16 { - let output: i16 = std::sync::atomic::AtomicI16::into_inner(_self.into_inner()) + fn into_inner(_self: Val<::core::sync::atomic::AtomicI16>) -> i16 { + let output: i16 = ::core::sync::atomic::AtomicI16::into_inner(_self.into_inner()) .into(); output } @@ -75,8 +77,8 @@ impl std::sync::atomic::AtomicI16 { /// use std::sync::atomic::AtomicI16; /// let atomic_forty_two = AtomicI16::new(42); /// ``` - fn new(v: i16) -> Val { - let output: Val = std::sync::atomic::AtomicI16::new( + fn new(v: i16) -> Val<::core::sync::atomic::AtomicI16> { + let output: Val<::core::sync::atomic::AtomicI16> = ::core::sync::atomic::AtomicI16::new( v, ) .into(); @@ -89,7 +91,7 @@ impl std::sync::atomic::AtomicI16 { bms_core_path = "bevy_mod_scripting_core", generated )] -impl std::sync::atomic::AtomicI32 { +impl ::core::sync::atomic::AtomicI32 { /// Consumes the atomic and returns the contained value. /// This is safe because passing `self` by value guarantees that no other threads are /// concurrently accessing the atomic data. @@ -99,8 +101,8 @@ impl std::sync::atomic::AtomicI32 { /// let some_var = AtomicI32::new(5); /// assert_eq!(some_var.into_inner(), 5); /// ``` - fn into_inner(_self: Val) -> i32 { - let output: i32 = std::sync::atomic::AtomicI32::into_inner(_self.into_inner()) + fn into_inner(_self: Val<::core::sync::atomic::AtomicI32>) -> i32 { + let output: i32 = ::core::sync::atomic::AtomicI32::into_inner(_self.into_inner()) .into(); output } @@ -110,8 +112,8 @@ impl std::sync::atomic::AtomicI32 { /// use std::sync::atomic::AtomicI32; /// let atomic_forty_two = AtomicI32::new(42); /// ``` - fn new(v: i32) -> Val { - let output: Val = std::sync::atomic::AtomicI32::new( + fn new(v: i32) -> Val<::core::sync::atomic::AtomicI32> { + let output: Val<::core::sync::atomic::AtomicI32> = ::core::sync::atomic::AtomicI32::new( v, ) .into(); @@ -124,7 +126,7 @@ impl std::sync::atomic::AtomicI32 { bms_core_path = "bevy_mod_scripting_core", generated )] -impl std::sync::atomic::AtomicI64 { +impl ::core::sync::atomic::AtomicI64 { /// Consumes the atomic and returns the contained value. /// This is safe because passing `self` by value guarantees that no other threads are /// concurrently accessing the atomic data. @@ -134,8 +136,8 @@ impl std::sync::atomic::AtomicI64 { /// let some_var = AtomicI64::new(5); /// assert_eq!(some_var.into_inner(), 5); /// ``` - fn into_inner(_self: Val) -> i64 { - let output: i64 = std::sync::atomic::AtomicI64::into_inner(_self.into_inner()) + fn into_inner(_self: Val<::core::sync::atomic::AtomicI64>) -> i64 { + let output: i64 = ::core::sync::atomic::AtomicI64::into_inner(_self.into_inner()) .into(); output } @@ -145,8 +147,8 @@ impl std::sync::atomic::AtomicI64 { /// use std::sync::atomic::AtomicI64; /// let atomic_forty_two = AtomicI64::new(42); /// ``` - fn new(v: i64) -> Val { - let output: Val = std::sync::atomic::AtomicI64::new( + fn new(v: i64) -> Val<::core::sync::atomic::AtomicI64> { + let output: Val<::core::sync::atomic::AtomicI64> = ::core::sync::atomic::AtomicI64::new( v, ) .into(); @@ -159,7 +161,7 @@ impl std::sync::atomic::AtomicI64 { bms_core_path = "bevy_mod_scripting_core", generated )] -impl std::sync::atomic::AtomicI8 { +impl ::core::sync::atomic::AtomicI8 { /// Consumes the atomic and returns the contained value. /// This is safe because passing `self` by value guarantees that no other threads are /// concurrently accessing the atomic data. @@ -169,8 +171,8 @@ impl std::sync::atomic::AtomicI8 { /// let some_var = AtomicI8::new(5); /// assert_eq!(some_var.into_inner(), 5); /// ``` - fn into_inner(_self: Val) -> i8 { - let output: i8 = std::sync::atomic::AtomicI8::into_inner(_self.into_inner()) + fn into_inner(_self: Val<::core::sync::atomic::AtomicI8>) -> i8 { + let output: i8 = ::core::sync::atomic::AtomicI8::into_inner(_self.into_inner()) .into(); output } @@ -180,8 +182,8 @@ impl std::sync::atomic::AtomicI8 { /// use std::sync::atomic::AtomicI8; /// let atomic_forty_two = AtomicI8::new(42); /// ``` - fn new(v: i8) -> Val { - let output: Val = std::sync::atomic::AtomicI8::new( + fn new(v: i8) -> Val<::core::sync::atomic::AtomicI8> { + let output: Val<::core::sync::atomic::AtomicI8> = ::core::sync::atomic::AtomicI8::new( v, ) .into(); @@ -194,7 +196,7 @@ impl std::sync::atomic::AtomicI8 { bms_core_path = "bevy_mod_scripting_core", generated )] -impl std::sync::atomic::AtomicIsize { +impl ::core::sync::atomic::AtomicIsize { /// Consumes the atomic and returns the contained value. /// This is safe because passing `self` by value guarantees that no other threads are /// concurrently accessing the atomic data. @@ -204,8 +206,8 @@ impl std::sync::atomic::AtomicIsize { /// let some_var = AtomicIsize::new(5); /// assert_eq!(some_var.into_inner(), 5); /// ``` - fn into_inner(_self: Val) -> isize { - let output: isize = std::sync::atomic::AtomicIsize::into_inner( + fn into_inner(_self: Val<::core::sync::atomic::AtomicIsize>) -> isize { + let output: isize = ::core::sync::atomic::AtomicIsize::into_inner( _self.into_inner(), ) .into(); @@ -217,8 +219,8 @@ impl std::sync::atomic::AtomicIsize { /// use std::sync::atomic::AtomicIsize; /// let atomic_forty_two = AtomicIsize::new(42); /// ``` - fn new(v: isize) -> Val { - let output: Val = std::sync::atomic::AtomicIsize::new( + fn new(v: isize) -> Val<::core::sync::atomic::AtomicIsize> { + let output: Val<::core::sync::atomic::AtomicIsize> = ::core::sync::atomic::AtomicIsize::new( v, ) .into(); @@ -231,7 +233,7 @@ impl std::sync::atomic::AtomicIsize { bms_core_path = "bevy_mod_scripting_core", generated )] -impl std::sync::atomic::AtomicU16 { +impl ::core::sync::atomic::AtomicU16 { /// Consumes the atomic and returns the contained value. /// This is safe because passing `self` by value guarantees that no other threads are /// concurrently accessing the atomic data. @@ -241,8 +243,8 @@ impl std::sync::atomic::AtomicU16 { /// let some_var = AtomicU16::new(5); /// assert_eq!(some_var.into_inner(), 5); /// ``` - fn into_inner(_self: Val) -> u16 { - let output: u16 = std::sync::atomic::AtomicU16::into_inner(_self.into_inner()) + fn into_inner(_self: Val<::core::sync::atomic::AtomicU16>) -> u16 { + let output: u16 = ::core::sync::atomic::AtomicU16::into_inner(_self.into_inner()) .into(); output } @@ -252,8 +254,8 @@ impl std::sync::atomic::AtomicU16 { /// use std::sync::atomic::AtomicU16; /// let atomic_forty_two = AtomicU16::new(42); /// ``` - fn new(v: u16) -> Val { - let output: Val = std::sync::atomic::AtomicU16::new( + fn new(v: u16) -> Val<::core::sync::atomic::AtomicU16> { + let output: Val<::core::sync::atomic::AtomicU16> = ::core::sync::atomic::AtomicU16::new( v, ) .into(); @@ -266,7 +268,7 @@ impl std::sync::atomic::AtomicU16 { bms_core_path = "bevy_mod_scripting_core", generated )] -impl std::sync::atomic::AtomicU32 { +impl ::core::sync::atomic::AtomicU32 { /// Consumes the atomic and returns the contained value. /// This is safe because passing `self` by value guarantees that no other threads are /// concurrently accessing the atomic data. @@ -276,8 +278,8 @@ impl std::sync::atomic::AtomicU32 { /// let some_var = AtomicU32::new(5); /// assert_eq!(some_var.into_inner(), 5); /// ``` - fn into_inner(_self: Val) -> u32 { - let output: u32 = std::sync::atomic::AtomicU32::into_inner(_self.into_inner()) + fn into_inner(_self: Val<::core::sync::atomic::AtomicU32>) -> u32 { + let output: u32 = ::core::sync::atomic::AtomicU32::into_inner(_self.into_inner()) .into(); output } @@ -287,8 +289,8 @@ impl std::sync::atomic::AtomicU32 { /// use std::sync::atomic::AtomicU32; /// let atomic_forty_two = AtomicU32::new(42); /// ``` - fn new(v: u32) -> Val { - let output: Val = std::sync::atomic::AtomicU32::new( + fn new(v: u32) -> Val<::core::sync::atomic::AtomicU32> { + let output: Val<::core::sync::atomic::AtomicU32> = ::core::sync::atomic::AtomicU32::new( v, ) .into(); @@ -301,7 +303,7 @@ impl std::sync::atomic::AtomicU32 { bms_core_path = "bevy_mod_scripting_core", generated )] -impl std::sync::atomic::AtomicU64 { +impl ::core::sync::atomic::AtomicU64 { /// Consumes the atomic and returns the contained value. /// This is safe because passing `self` by value guarantees that no other threads are /// concurrently accessing the atomic data. @@ -311,8 +313,8 @@ impl std::sync::atomic::AtomicU64 { /// let some_var = AtomicU64::new(5); /// assert_eq!(some_var.into_inner(), 5); /// ``` - fn into_inner(_self: Val) -> u64 { - let output: u64 = std::sync::atomic::AtomicU64::into_inner(_self.into_inner()) + fn into_inner(_self: Val<::core::sync::atomic::AtomicU64>) -> u64 { + let output: u64 = ::core::sync::atomic::AtomicU64::into_inner(_self.into_inner()) .into(); output } @@ -322,8 +324,8 @@ impl std::sync::atomic::AtomicU64 { /// use std::sync::atomic::AtomicU64; /// let atomic_forty_two = AtomicU64::new(42); /// ``` - fn new(v: u64) -> Val { - let output: Val = std::sync::atomic::AtomicU64::new( + fn new(v: u64) -> Val<::core::sync::atomic::AtomicU64> { + let output: Val<::core::sync::atomic::AtomicU64> = ::core::sync::atomic::AtomicU64::new( v, ) .into(); @@ -336,7 +338,7 @@ impl std::sync::atomic::AtomicU64 { bms_core_path = "bevy_mod_scripting_core", generated )] -impl std::sync::atomic::AtomicU8 { +impl ::core::sync::atomic::AtomicU8 { /// Consumes the atomic and returns the contained value. /// This is safe because passing `self` by value guarantees that no other threads are /// concurrently accessing the atomic data. @@ -346,8 +348,8 @@ impl std::sync::atomic::AtomicU8 { /// let some_var = AtomicU8::new(5); /// assert_eq!(some_var.into_inner(), 5); /// ``` - fn into_inner(_self: Val) -> u8 { - let output: u8 = std::sync::atomic::AtomicU8::into_inner(_self.into_inner()) + fn into_inner(_self: Val<::core::sync::atomic::AtomicU8>) -> u8 { + let output: u8 = ::core::sync::atomic::AtomicU8::into_inner(_self.into_inner()) .into(); output } @@ -357,8 +359,8 @@ impl std::sync::atomic::AtomicU8 { /// use std::sync::atomic::AtomicU8; /// let atomic_forty_two = AtomicU8::new(42); /// ``` - fn new(v: u8) -> Val { - let output: Val = std::sync::atomic::AtomicU8::new( + fn new(v: u8) -> Val<::core::sync::atomic::AtomicU8> { + let output: Val<::core::sync::atomic::AtomicU8> = ::core::sync::atomic::AtomicU8::new( v, ) .into(); @@ -371,7 +373,7 @@ impl std::sync::atomic::AtomicU8 { bms_core_path = "bevy_mod_scripting_core", generated )] -impl std::sync::atomic::AtomicUsize { +impl ::core::sync::atomic::AtomicUsize { /// Consumes the atomic and returns the contained value. /// This is safe because passing `self` by value guarantees that no other threads are /// concurrently accessing the atomic data. @@ -381,8 +383,8 @@ impl std::sync::atomic::AtomicUsize { /// let some_var = AtomicUsize::new(5); /// assert_eq!(some_var.into_inner(), 5); /// ``` - fn into_inner(_self: Val) -> usize { - let output: usize = std::sync::atomic::AtomicUsize::into_inner( + fn into_inner(_self: Val<::core::sync::atomic::AtomicUsize>) -> usize { + let output: usize = ::core::sync::atomic::AtomicUsize::into_inner( _self.into_inner(), ) .into(); @@ -394,8 +396,8 @@ impl std::sync::atomic::AtomicUsize { /// use std::sync::atomic::AtomicUsize; /// let atomic_forty_two = AtomicUsize::new(42); /// ``` - fn new(v: usize) -> Val { - let output: Val = std::sync::atomic::AtomicUsize::new( + fn new(v: usize) -> Val<::core::sync::atomic::AtomicUsize> { + let output: Val<::core::sync::atomic::AtomicUsize> = ::core::sync::atomic::AtomicUsize::new( v, ) .into(); @@ -408,7 +410,7 @@ impl std::sync::atomic::AtomicUsize { bms_core_path = "bevy_mod_scripting_core", generated )] -impl bevy::utils::Duration { +impl ::core::time::Duration { /// Computes the absolute difference between `self` and `other`. /// # Examples /// ``` @@ -417,10 +419,10 @@ impl bevy::utils::Duration { /// assert_eq!(Duration::new(100, 400_000_000).abs_diff(Duration::new(110, 0)), Duration::new(9, 600_000_000)); /// ``` fn abs_diff( - _self: Val, - other: Val, - ) -> Val { - let output: Val = bevy::utils::Duration::abs_diff( + _self: Val<::core::time::Duration>, + other: Val<::core::time::Duration>, + ) -> Val<::core::time::Duration> { + let output: Val<::core::time::Duration> = ::core::time::Duration::abs_diff( _self.into_inner(), other.into_inner(), ) @@ -428,11 +430,11 @@ impl bevy::utils::Duration { output } fn add( - _self: Val, - rhs: Val, - ) -> Val { - let output: Val = , + rhs: Val<::core::time::Duration>, + ) -> Val<::core::time::Duration> { + let output: Val<::core::time::Duration> = <::core::time::Duration as ::core::ops::Add< + ::core::time::Duration, >>::add(_self.into_inner(), rhs.into_inner()) .into(); output @@ -444,8 +446,8 @@ impl bevy::utils::Duration { /// let duration = Duration::new(5, 730_023_852); /// assert_eq!(duration.as_micros(), 5_730_023); /// ``` - fn as_micros(_self: Ref) -> u128 { - let output: u128 = bevy::utils::Duration::as_micros(&_self).into(); + fn as_micros(_self: Ref<::core::time::Duration>) -> u128 { + let output: u128 = ::core::time::Duration::as_micros(&_self).into(); output } /// Returns the total number of whole milliseconds contained by this `Duration`. @@ -455,8 +457,8 @@ impl bevy::utils::Duration { /// let duration = Duration::new(5, 730_023_852); /// assert_eq!(duration.as_millis(), 5_730); /// ``` - fn as_millis(_self: Ref) -> u128 { - let output: u128 = bevy::utils::Duration::as_millis(&_self).into(); + fn as_millis(_self: Ref<::core::time::Duration>) -> u128 { + let output: u128 = ::core::time::Duration::as_millis(&_self).into(); output } /// Returns the total number of nanoseconds contained by this `Duration`. @@ -466,8 +468,8 @@ impl bevy::utils::Duration { /// let duration = Duration::new(5, 730_023_852); /// assert_eq!(duration.as_nanos(), 5_730_023_852); /// ``` - fn as_nanos(_self: Ref) -> u128 { - let output: u128 = bevy::utils::Duration::as_nanos(&_self).into(); + fn as_nanos(_self: Ref<::core::time::Duration>) -> u128 { + let output: u128 = ::core::time::Duration::as_nanos(&_self).into(); output } /// Returns the number of _whole_ seconds contained by this `Duration`. @@ -484,8 +486,8 @@ impl bevy::utils::Duration { /// [`as_secs_f64`]: Duration::as_secs_f64 /// [`as_secs_f32`]: Duration::as_secs_f32 /// [`subsec_nanos`]: Duration::subsec_nanos - fn as_secs(_self: Ref) -> u64 { - let output: u64 = bevy::utils::Duration::as_secs(&_self).into(); + fn as_secs(_self: Ref<::core::time::Duration>) -> u64 { + let output: u64 = ::core::time::Duration::as_secs(&_self).into(); output } /// Returns the number of seconds contained by this `Duration` as `f32`. @@ -496,8 +498,8 @@ impl bevy::utils::Duration { /// let dur = Duration::new(2, 700_000_000); /// assert_eq!(dur.as_secs_f32(), 2.7); /// ``` - fn as_secs_f32(_self: Ref) -> f32 { - let output: f32 = bevy::utils::Duration::as_secs_f32(&_self).into(); + fn as_secs_f32(_self: Ref<::core::time::Duration>) -> f32 { + let output: f32 = ::core::time::Duration::as_secs_f32(&_self).into(); output } /// Returns the number of seconds contained by this `Duration` as `f64`. @@ -508,26 +510,26 @@ impl bevy::utils::Duration { /// let dur = Duration::new(2, 700_000_000); /// assert_eq!(dur.as_secs_f64(), 2.7); /// ``` - fn as_secs_f64(_self: Ref) -> f64 { - let output: f64 = bevy::utils::Duration::as_secs_f64(&_self).into(); + fn as_secs_f64(_self: Ref<::core::time::Duration>) -> f64 { + let output: f64 = ::core::time::Duration::as_secs_f64(&_self).into(); output } - fn assert_receiver_is_total_eq(_self: Ref) -> () { - let output: () = ::assert_receiver_is_total_eq( + fn assert_receiver_is_total_eq(_self: Ref<::core::time::Duration>) -> () { + let output: () = <::core::time::Duration as ::core::cmp::Eq>::assert_receiver_is_total_eq( &_self, ) .into(); output } - fn clone(_self: Ref) -> Val { - let output: Val = ::clone( + fn clone(_self: Ref<::core::time::Duration>) -> Val<::core::time::Duration> { + let output: Val<::core::time::Duration> = <::core::time::Duration as bevy::reflect::erased_serde::__private::serde::__private::Clone>::clone( &_self, ) .into(); output } - fn div(_self: Val, rhs: u32) -> Val { - let output: Val = , rhs: u32) -> Val<::core::time::Duration> { + let output: Val<::core::time::Duration> = <::core::time::Duration as ::core::ops::Div< u32, >>::div(_self.into_inner(), rhs) .into(); @@ -542,10 +544,10 @@ impl bevy::utils::Duration { /// assert_eq!(dur1.div_duration_f32(dur2), 0.5); /// ``` fn div_duration_f32( - _self: Val, - rhs: Val, + _self: Val<::core::time::Duration>, + rhs: Val<::core::time::Duration>, ) -> f32 { - let output: f32 = bevy::utils::Duration::div_duration_f32( + let output: f32 = ::core::time::Duration::div_duration_f32( _self.into_inner(), rhs.into_inner(), ) @@ -561,10 +563,10 @@ impl bevy::utils::Duration { /// assert_eq!(dur1.div_duration_f64(dur2), 0.5); /// ``` fn div_duration_f64( - _self: Val, - rhs: Val, + _self: Val<::core::time::Duration>, + rhs: Val<::core::time::Duration>, ) -> f64 { - let output: f64 = bevy::utils::Duration::div_duration_f64( + let output: f64 = ::core::time::Duration::div_duration_f64( _self.into_inner(), rhs.into_inner(), ) @@ -584,10 +586,10 @@ impl bevy::utils::Duration { /// assert_eq!(dur.div_f32(3.14e5), Duration::new(0, 8_599)); /// ``` fn div_f32( - _self: Val, + _self: Val<::core::time::Duration>, rhs: f32, - ) -> Val { - let output: Val = bevy::utils::Duration::div_f32( + ) -> Val<::core::time::Duration> { + let output: Val<::core::time::Duration> = ::core::time::Duration::div_f32( _self.into_inner(), rhs, ) @@ -605,19 +607,22 @@ impl bevy::utils::Duration { /// assert_eq!(dur.div_f64(3.14e5), Duration::new(0, 8_599)); /// ``` fn div_f64( - _self: Val, + _self: Val<::core::time::Duration>, rhs: f64, - ) -> Val { - let output: Val = bevy::utils::Duration::div_f64( + ) -> Val<::core::time::Duration> { + let output: Val<::core::time::Duration> = ::core::time::Duration::div_f64( _self.into_inner(), rhs, ) .into(); output } - fn eq(_self: Ref, other: Ref) -> bool { - let output: bool = , + other: Ref<::core::time::Duration>, + ) -> bool { + let output: bool = <::core::time::Duration as ::core::cmp::PartialEq< + ::core::time::Duration, >>::eq(&_self, &other) .into(); output @@ -630,8 +635,8 @@ impl bevy::utils::Duration { /// assert_eq!(1, duration.as_secs()); /// assert_eq!(2_000, duration.subsec_nanos()); /// ``` - fn from_micros(micros: u64) -> Val { - let output: Val = bevy::utils::Duration::from_micros( + fn from_micros(micros: u64) -> Val<::core::time::Duration> { + let output: Val<::core::time::Duration> = ::core::time::Duration::from_micros( micros, ) .into(); @@ -645,8 +650,8 @@ impl bevy::utils::Duration { /// assert_eq!(2, duration.as_secs()); /// assert_eq!(569_000_000, duration.subsec_nanos()); /// ``` - fn from_millis(millis: u64) -> Val { - let output: Val = bevy::utils::Duration::from_millis( + fn from_millis(millis: u64) -> Val<::core::time::Duration> { + let output: Val<::core::time::Duration> = ::core::time::Duration::from_millis( millis, ) .into(); @@ -664,8 +669,10 @@ impl bevy::utils::Duration { /// assert_eq!(1, duration.as_secs()); /// assert_eq!(123, duration.subsec_nanos()); /// ``` - fn from_nanos(nanos: u64) -> Val { - let output: Val = bevy::utils::Duration::from_nanos(nanos) + fn from_nanos(nanos: u64) -> Val<::core::time::Duration> { + let output: Val<::core::time::Duration> = ::core::time::Duration::from_nanos( + nanos, + ) .into(); output } @@ -677,8 +684,8 @@ impl bevy::utils::Duration { /// assert_eq!(5, duration.as_secs()); /// assert_eq!(0, duration.subsec_nanos()); /// ``` - fn from_secs(secs: u64) -> Val { - let output: Val = bevy::utils::Duration::from_secs(secs) + fn from_secs(secs: u64) -> Val<::core::time::Duration> { + let output: Val<::core::time::Duration> = ::core::time::Duration::from_secs(secs) .into(); output } @@ -706,8 +713,8 @@ impl bevy::utils::Duration { /// let res = Duration::from_secs_f32(0.999e-9); /// assert_eq!(res, Duration::new(0, 1)); /// ``` - fn from_secs_f32(secs: f32) -> Val { - let output: Val = bevy::utils::Duration::from_secs_f32( + fn from_secs_f32(secs: f32) -> Val<::core::time::Duration> { + let output: Val<::core::time::Duration> = ::core::time::Duration::from_secs_f32( secs, ) .into(); @@ -737,8 +744,8 @@ impl bevy::utils::Duration { /// let res = Duration::from_secs_f64(0.999e-9); /// assert_eq!(res, Duration::new(0, 1)); /// ``` - fn from_secs_f64(secs: f64) -> Val { - let output: Val = bevy::utils::Duration::from_secs_f64( + fn from_secs_f64(secs: f64) -> Val<::core::time::Duration> { + let output: Val<::core::time::Duration> = ::core::time::Duration::from_secs_f64( secs, ) .into(); @@ -756,12 +763,12 @@ impl bevy::utils::Duration { /// assert!(!Duration::from_nanos(1).is_zero()); /// assert!(!Duration::from_secs(1).is_zero()); /// ``` - fn is_zero(_self: Ref) -> bool { - let output: bool = bevy::utils::Duration::is_zero(&_self).into(); + fn is_zero(_self: Ref<::core::time::Duration>) -> bool { + let output: bool = ::core::time::Duration::is_zero(&_self).into(); output } - fn mul(_self: Val, rhs: u32) -> Val { - let output: Val = , rhs: u32) -> Val<::core::time::Duration> { + let output: Val<::core::time::Duration> = <::core::time::Duration as ::core::ops::Mul< u32, >>::mul(_self.into_inner(), rhs) .into(); @@ -778,10 +785,10 @@ impl bevy::utils::Duration { /// assert_eq!(dur.mul_f32(3.14e5), Duration::new(847_800, 0)); /// ``` fn mul_f32( - _self: Val, + _self: Val<::core::time::Duration>, rhs: f32, - ) -> Val { - let output: Val = bevy::utils::Duration::mul_f32( + ) -> Val<::core::time::Duration> { + let output: Val<::core::time::Duration> = ::core::time::Duration::mul_f32( _self.into_inner(), rhs, ) @@ -799,10 +806,10 @@ impl bevy::utils::Duration { /// assert_eq!(dur.mul_f64(3.14e5), Duration::new(847_800, 0)); /// ``` fn mul_f64( - _self: Val, + _self: Val<::core::time::Duration>, rhs: f64, - ) -> Val { - let output: Val = bevy::utils::Duration::mul_f64( + ) -> Val<::core::time::Duration> { + let output: Val<::core::time::Duration> = ::core::time::Duration::mul_f64( _self.into_inner(), rhs, ) @@ -821,8 +828,11 @@ impl bevy::utils::Duration { /// use std::time::Duration; /// let five_seconds = Duration::new(5, 0); /// ``` - fn new(secs: u64, nanos: u32) -> Val { - let output: Val = bevy::utils::Duration::new(secs, nanos) + fn new(secs: u64, nanos: u32) -> Val<::core::time::Duration> { + let output: Val<::core::time::Duration> = ::core::time::Duration::new( + secs, + nanos, + ) .into(); output } @@ -836,10 +846,10 @@ impl bevy::utils::Duration { /// assert_eq!(Duration::new(1, 0).saturating_add(Duration::new(u64::MAX, 0)), Duration::MAX); /// ``` fn saturating_add( - _self: Val, - rhs: Val, - ) -> Val { - let output: Val = bevy::utils::Duration::saturating_add( + _self: Val<::core::time::Duration>, + rhs: Val<::core::time::Duration>, + ) -> Val<::core::time::Duration> { + let output: Val<::core::time::Duration> = ::core::time::Duration::saturating_add( _self.into_inner(), rhs.into_inner(), ) @@ -856,10 +866,10 @@ impl bevy::utils::Duration { /// assert_eq!(Duration::new(u64::MAX - 1, 0).saturating_mul(2), Duration::MAX); /// ``` fn saturating_mul( - _self: Val, + _self: Val<::core::time::Duration>, rhs: u32, - ) -> Val { - let output: Val = bevy::utils::Duration::saturating_mul( + ) -> Val<::core::time::Duration> { + let output: Val<::core::time::Duration> = ::core::time::Duration::saturating_mul( _self.into_inner(), rhs, ) @@ -875,10 +885,10 @@ impl bevy::utils::Duration { /// assert_eq!(Duration::new(0, 0).saturating_sub(Duration::new(0, 1)), Duration::ZERO); /// ``` fn saturating_sub( - _self: Val, - rhs: Val, - ) -> Val { - let output: Val = bevy::utils::Duration::saturating_sub( + _self: Val<::core::time::Duration>, + rhs: Val<::core::time::Duration>, + ) -> Val<::core::time::Duration> { + let output: Val<::core::time::Duration> = ::core::time::Duration::saturating_sub( _self.into_inner(), rhs.into_inner(), ) @@ -886,11 +896,11 @@ impl bevy::utils::Duration { output } fn sub( - _self: Val, - rhs: Val, - ) -> Val { - let output: Val = , + rhs: Val<::core::time::Duration>, + ) -> Val<::core::time::Duration> { + let output: Val<::core::time::Duration> = <::core::time::Duration as ::core::ops::Sub< + ::core::time::Duration, >>::sub(_self.into_inner(), rhs.into_inner()) .into(); output @@ -906,8 +916,8 @@ impl bevy::utils::Duration { /// assert_eq!(duration.as_secs(), 1); /// assert_eq!(duration.subsec_micros(), 234_567); /// ``` - fn subsec_micros(_self: Ref) -> u32 { - let output: u32 = bevy::utils::Duration::subsec_micros(&_self).into(); + fn subsec_micros(_self: Ref<::core::time::Duration>) -> u32 { + let output: u32 = ::core::time::Duration::subsec_micros(&_self).into(); output } /// Returns the fractional part of this `Duration`, in whole milliseconds. @@ -921,8 +931,8 @@ impl bevy::utils::Duration { /// assert_eq!(duration.as_secs(), 5); /// assert_eq!(duration.subsec_millis(), 432); /// ``` - fn subsec_millis(_self: Ref) -> u32 { - let output: u32 = bevy::utils::Duration::subsec_millis(&_self).into(); + fn subsec_millis(_self: Ref<::core::time::Duration>) -> u32 { + let output: u32 = ::core::time::Duration::subsec_millis(&_self).into(); output } /// Returns the fractional part of this `Duration`, in nanoseconds. @@ -936,8 +946,8 @@ impl bevy::utils::Duration { /// assert_eq!(duration.as_secs(), 5); /// assert_eq!(duration.subsec_nanos(), 10_000_000); /// ``` - fn subsec_nanos(_self: Ref) -> u32 { - let output: u32 = bevy::utils::Duration::subsec_nanos(&_self).into(); + fn subsec_nanos(_self: Ref<::core::time::Duration>) -> u32 { + let output: u32 = ::core::time::Duration::subsec_nanos(&_self).into(); output } } @@ -947,29 +957,29 @@ impl bevy::utils::Duration { bms_core_path = "bevy_mod_scripting_core", generated )] -impl bevy::utils::Instant { +impl ::std::time::Instant { /// # Panics /// This function may panic if the resulting point in time cannot be represented by the /// underlying data structure. See [`Instant::checked_add`] for a version without panic. fn add( - _self: Val, - other: Val, - ) -> Val { - let output: Val = , + other: Val<::core::time::Duration>, + ) -> Val<::std::time::Instant> { + let output: Val<::std::time::Instant> = <::std::time::Instant as ::core::ops::Add< + ::core::time::Duration, >>::add(_self.into_inner(), other.into_inner()) .into(); output } - fn assert_receiver_is_total_eq(_self: Ref) -> () { - let output: () = ::assert_receiver_is_total_eq( + fn assert_receiver_is_total_eq(_self: Ref<::std::time::Instant>) -> () { + let output: () = <::std::time::Instant as ::core::cmp::Eq>::assert_receiver_is_total_eq( &_self, ) .into(); output } - fn clone(_self: Ref) -> Val { - let output: Val = ::clone( + fn clone(_self: Ref<::std::time::Instant>) -> Val<::std::time::Instant> { + let output: Val<::std::time::Instant> = <::std::time::Instant as bevy::reflect::erased_serde::__private::serde::__private::Clone>::clone( &_self, ) .into(); @@ -993,10 +1003,10 @@ impl bevy::utils::Instant { /// println!("{:?}", now.duration_since(new_now)); // 0ns /// ``` fn duration_since( - _self: Ref, - earlier: Val, - ) -> Val { - let output: Val = bevy::utils::Instant::duration_since( + _self: Ref<::std::time::Instant>, + earlier: Val<::std::time::Instant>, + ) -> Val<::core::time::Duration> { + let output: Val<::core::time::Duration> = ::std::time::Instant::duration_since( &_self, earlier.into_inner(), ) @@ -1018,14 +1028,14 @@ impl bevy::utils::Instant { /// sleep(three_secs); /// assert!(instant.elapsed() >= three_secs); /// ``` - fn elapsed(_self: Ref) -> Val { - let output: Val = bevy::utils::Instant::elapsed(&_self) + fn elapsed(_self: Ref<::std::time::Instant>) -> Val<::core::time::Duration> { + let output: Val<::core::time::Duration> = ::std::time::Instant::elapsed(&_self) .into(); output } - fn eq(_self: Ref, other: Ref) -> bool { - let output: bool = , other: Ref<::std::time::Instant>) -> bool { + let output: bool = <::std::time::Instant as ::core::cmp::PartialEq< + ::std::time::Instant, >>::eq(&_self, &other) .into(); output @@ -1036,8 +1046,8 @@ impl bevy::utils::Instant { /// use std::time::Instant; /// let now = Instant::now(); /// ``` - fn now() -> Val { - let output: Val = bevy::utils::Instant::now().into(); + fn now() -> Val<::std::time::Instant> { + let output: Val<::std::time::Instant> = ::std::time::Instant::now().into(); output } /// Returns the amount of time elapsed from another instant to this one, @@ -1053,10 +1063,10 @@ impl bevy::utils::Instant { /// println!("{:?}", now.saturating_duration_since(new_now)); // 0ns /// ``` fn saturating_duration_since( - _self: Ref, - earlier: Val, - ) -> Val { - let output: Val = bevy::utils::Instant::saturating_duration_since( + _self: Ref<::std::time::Instant>, + earlier: Val<::std::time::Instant>, + ) -> Val<::core::time::Duration> { + let output: Val<::core::time::Duration> = ::std::time::Instant::saturating_duration_since( &_self, earlier.into_inner(), ) @@ -1064,11 +1074,11 @@ impl bevy::utils::Instant { output } fn sub( - _self: Val, - other: Val, - ) -> Val { - let output: Val = , + other: Val<::core::time::Duration>, + ) -> Val<::std::time::Instant> { + let output: Val<::std::time::Instant> = <::std::time::Instant as ::core::ops::Sub< + ::core::time::Duration, >>::sub(_self.into_inner(), other.into_inner()) .into(); output @@ -1081,11 +1091,11 @@ impl bevy::utils::Instant { /// See [Monotonicity]. /// [Monotonicity]: Instant#monotonicity fn sub( - _self: Val, - other: Val, - ) -> Val { - let output: Val = , + other: Val<::std::time::Instant>, + ) -> Val<::core::time::Duration> { + let output: Val<::core::time::Duration> = <::std::time::Instant as ::core::ops::Sub< + ::std::time::Instant, >>::sub(_self.into_inner(), other.into_inner()) .into(); output @@ -1097,24 +1107,56 @@ impl bevy::utils::Instant { bms_core_path = "bevy_mod_scripting_core", generated )] -impl std::ops::RangeFull { - fn assert_receiver_is_total_eq(_self: Ref) -> () { - let output: () = ::assert_receiver_is_total_eq( +impl ::core::ops::RangeFull { + fn assert_receiver_is_total_eq(_self: Ref<::core::ops::RangeFull>) -> () { + let output: () = <::core::ops::RangeFull as ::core::cmp::Eq>::assert_receiver_is_total_eq( + &_self, + ) + .into(); + output + } + fn clone(_self: Ref<::core::ops::RangeFull>) -> Val<::core::ops::RangeFull> { + let output: Val<::core::ops::RangeFull> = <::core::ops::RangeFull as bevy::reflect::erased_serde::__private::serde::__private::Clone>::clone( + &_self, + ) + .into(); + output + } + fn eq( + _self: Ref<::core::ops::RangeFull>, + other: Ref<::core::ops::RangeFull>, + ) -> bool { + let output: bool = <::core::ops::RangeFull as ::core::cmp::PartialEq< + ::core::ops::RangeFull, + >>::eq(&_self, &other) + .into(); + output + } +} +#[script_bindings( + remote, + name = "type_id_functions", + bms_core_path = "bevy_mod_scripting_core", + generated +)] +impl ::core::any::TypeId { + fn assert_receiver_is_total_eq(_self: Ref<::core::any::TypeId>) -> () { + let output: () = <::core::any::TypeId as ::core::cmp::Eq>::assert_receiver_is_total_eq( &_self, ) .into(); output } - fn clone(_self: Ref) -> Val { - let output: Val = ::clone( + fn clone(_self: Ref<::core::any::TypeId>) -> Val<::core::any::TypeId> { + let output: Val<::core::any::TypeId> = <::core::any::TypeId as bevy::reflect::erased_serde::__private::serde::__private::Clone>::clone( &_self, ) .into(); output } - fn eq(_self: Ref, other: Ref) -> bool { - let output: bool = , other: Ref<::core::any::TypeId>) -> bool { + let output: bool = <::core::any::TypeId as ::core::cmp::PartialEq< + ::core::any::TypeId, >>::eq(&_self, &other) .into(); output @@ -1155,7 +1197,7 @@ impl bevy::math::Quat { _self: Val, rhs: Val, ) -> Val { - let output: Val = = >::add(_self.into_inner(), rhs.into_inner()) .into(); @@ -1200,7 +1242,7 @@ impl bevy::math::Quat { /// Divides a quaternion by a scalar value. /// The quotient is not guaranteed to be normalized. fn div(_self: Val, rhs: f32) -> Val { - let output: Val = = >::div(_self.into_inner(), rhs) .into(); @@ -1214,7 +1256,7 @@ impl bevy::math::Quat { output } fn eq(_self: Ref, rhs: Ref) -> bool { - let output: bool = >::eq(&_self, &rhs) .into(); @@ -1481,7 +1523,7 @@ impl bevy::math::Quat { _self: Val, rhs: Val, ) -> Val { - let output: Val = = >::mul(_self.into_inner(), rhs.into_inner()) .into(); @@ -1494,7 +1536,7 @@ impl bevy::math::Quat { _self: Val, rhs: Val, ) -> Val { - let output: Val = = >::mul(_self.into_inner(), rhs.into_inner()) .into(); @@ -1504,7 +1546,7 @@ impl bevy::math::Quat { _self: Val, rhs: Val, ) -> Val { - let output: Val = = >::mul(_self.into_inner(), rhs.into_inner()) .into(); @@ -1513,7 +1555,7 @@ impl bevy::math::Quat { /// Multiplies a quaternion by a scalar value. /// The product is not guaranteed to be normalized. fn mul(_self: Val, rhs: f32) -> Val { - let output: Val = = >::mul(_self.into_inner(), rhs) .into(); @@ -1562,7 +1604,7 @@ impl bevy::math::Quat { output } fn neg(_self: Val) -> Val { - let output: Val = ::neg( + let output: Val = ::neg( _self.into_inner(), ) .into(); @@ -1624,7 +1666,7 @@ impl bevy::math::Quat { _self: Val, rhs: Val, ) -> Val { - let output: Val = = >::sub(_self.into_inner(), rhs.into_inner()) .into(); @@ -1699,7 +1741,7 @@ impl bevy::math::Vec3 { _self: Val, rhs: Ref, ) -> Val { - let output: Val = = >::add(_self.into_inner(), &rhs) .into(); @@ -1709,14 +1751,14 @@ impl bevy::math::Vec3 { _self: Val, rhs: Val, ) -> Val { - let output: Val = = >::add(_self.into_inner(), rhs.into_inner()) .into(); output } fn add(_self: Val, rhs: f32) -> Val { - let output: Val = = >::add(_self.into_inner(), rhs) .into(); @@ -1759,23 +1801,45 @@ impl bevy::math::Vec3 { let output: Val = bevy::math::Vec3::as_dvec3(&_self).into(); output } + /// Casts all elements of `self` to `i16`. + fn as_i16vec3(_self: Ref) -> Val { + let output: Val = bevy::math::Vec3::as_i16vec3(&_self) + .into(); + output + } /// Casts all elements of `self` to `i64`. fn as_i64vec3(_self: Ref) -> Val { let output: Val = bevy::math::Vec3::as_i64vec3(&_self) .into(); output } + /// Casts all elements of `self` to `i8`. + fn as_i8vec3(_self: Ref) -> Val { + let output: Val = bevy::math::Vec3::as_i8vec3(&_self).into(); + output + } /// Casts all elements of `self` to `i32`. fn as_ivec3(_self: Ref) -> Val { let output: Val = bevy::math::Vec3::as_ivec3(&_self).into(); output } + /// Casts all elements of `self` to `u16`. + fn as_u16vec3(_self: Ref) -> Val { + let output: Val = bevy::math::Vec3::as_u16vec3(&_self) + .into(); + output + } /// Casts all elements of `self` to `u64`. fn as_u64vec3(_self: Ref) -> Val { let output: Val = bevy::math::Vec3::as_u64vec3(&_self) .into(); output } + /// Casts all elements of `self` to `u8`. + fn as_u8vec3(_self: Ref) -> Val { + let output: Val = bevy::math::Vec3::as_u8vec3(&_self).into(); + output + } /// Casts all elements of `self` to `u32`. fn as_uvec3(_self: Ref) -> Val { let output: Val = bevy::math::Vec3::as_uvec3(&_self).into(); @@ -1995,7 +2059,7 @@ impl bevy::math::Vec3 { _self: Val, rhs: Ref, ) -> Val { - let output: Val = = >::div(_self.into_inner(), &rhs) .into(); @@ -2005,14 +2069,14 @@ impl bevy::math::Vec3 { _self: Val, rhs: Val, ) -> Val { - let output: Val = = >::div(_self.into_inner(), rhs.into_inner()) .into(); output } fn div(_self: Val, rhs: f32) -> Val { - let output: Val = = >::div(_self.into_inner(), rhs) .into(); @@ -2061,7 +2125,7 @@ impl bevy::math::Vec3 { output } fn eq(_self: Ref, other: Ref) -> bool { - let output: bool = >::eq(&_self, &other) .into(); @@ -2265,7 +2329,7 @@ impl bevy::math::Vec3 { _self: Val, rhs: Ref, ) -> Val { - let output: Val = = >::mul(_self.into_inner(), &rhs) .into(); @@ -2275,14 +2339,14 @@ impl bevy::math::Vec3 { _self: Val, rhs: Val, ) -> Val { - let output: Val = = >::mul(_self.into_inner(), rhs.into_inner()) .into(); output } fn mul(_self: Val, rhs: f32) -> Val { - let output: Val = = >::mul(_self.into_inner(), rhs) .into(); @@ -2308,7 +2372,7 @@ impl bevy::math::Vec3 { output } fn neg(_self: Val) -> Val { - let output: Val = ::neg( + let output: Val = ::neg( _self.into_inner(), ) .into(); @@ -2473,7 +2537,7 @@ impl bevy::math::Vec3 { _self: Val, rhs: Ref, ) -> Val { - let output: Val = = >::rem(_self.into_inner(), &rhs) .into(); @@ -2483,14 +2547,14 @@ impl bevy::math::Vec3 { _self: Val, rhs: Val, ) -> Val { - let output: Val = = >::rem(_self.into_inner(), rhs.into_inner()) .into(); output } fn rem(_self: Val, rhs: f32) -> Val { - let output: Val = = >::rem(_self.into_inner(), rhs) .into(); @@ -2551,7 +2615,7 @@ impl bevy::math::Vec3 { _self: Val, rhs: Ref, ) -> Val { - let output: Val = = >::sub(_self.into_inner(), &rhs) .into(); @@ -2561,14 +2625,14 @@ impl bevy::math::Vec3 { _self: Val, rhs: Val, ) -> Val { - let output: Val = = >::sub(_self.into_inner(), rhs.into_inner()) .into(); output } fn sub(_self: Val, rhs: f32) -> Val { - let output: Val = = >::sub(_self.into_inner(), rhs) .into(); @@ -2623,6 +2687,91 @@ impl bevy::math::Vec3 { output } } +#[script_bindings( + remote, + name = "socket_addr_functions", + bms_core_path = "bevy_mod_scripting_core", + generated +)] +impl ::core::net::SocketAddr { + fn assert_receiver_is_total_eq(_self: Ref<::core::net::SocketAddr>) -> () { + let output: () = <::core::net::SocketAddr as ::core::cmp::Eq>::assert_receiver_is_total_eq( + &_self, + ) + .into(); + output + } + fn clone(_self: Ref<::core::net::SocketAddr>) -> Val<::core::net::SocketAddr> { + let output: Val<::core::net::SocketAddr> = <::core::net::SocketAddr as bevy::reflect::erased_serde::__private::serde::__private::Clone>::clone( + &_self, + ) + .into(); + output + } + fn eq( + _self: Ref<::core::net::SocketAddr>, + other: Ref<::core::net::SocketAddr>, + ) -> bool { + let output: bool = <::core::net::SocketAddr as ::core::cmp::PartialEq< + ::core::net::SocketAddr, + >>::eq(&_self, &other) + .into(); + output + } + /// Returns [`true`] if the [IP address] in this `SocketAddr` is an + /// [`IPv4` address], and [`false`] otherwise. + /// [IP address]: IpAddr + /// [`IPv4` address]: IpAddr::V4 + /// # Examples + /// ``` + /// use std::net::{IpAddr, Ipv4Addr, SocketAddr}; + /// let socket = SocketAddr::new(IpAddr::V4(Ipv4Addr::new(127, 0, 0, 1)), 8080); + /// assert_eq!(socket.is_ipv4(), true); + /// assert_eq!(socket.is_ipv6(), false); + /// ``` + fn is_ipv4(_self: Ref<::core::net::SocketAddr>) -> bool { + let output: bool = ::core::net::SocketAddr::is_ipv4(&_self).into(); + output + } + /// Returns [`true`] if the [IP address] in this `SocketAddr` is an + /// [`IPv6` address], and [`false`] otherwise. + /// [IP address]: IpAddr + /// [`IPv6` address]: IpAddr::V6 + /// # Examples + /// ``` + /// use std::net::{IpAddr, Ipv6Addr, SocketAddr}; + /// let socket = SocketAddr::new(IpAddr::V6(Ipv6Addr::new(0, 0, 0, 0, 0, 65535, 0, 1)), 8080); + /// assert_eq!(socket.is_ipv4(), false); + /// assert_eq!(socket.is_ipv6(), true); + /// ``` + fn is_ipv6(_self: Ref<::core::net::SocketAddr>) -> bool { + let output: bool = ::core::net::SocketAddr::is_ipv6(&_self).into(); + output + } + /// Returns the port number associated with this socket address. + /// # Examples + /// ``` + /// use std::net::{IpAddr, Ipv4Addr, SocketAddr}; + /// let socket = SocketAddr::new(IpAddr::V4(Ipv4Addr::new(127, 0, 0, 1)), 8080); + /// assert_eq!(socket.port(), 8080); + /// ``` + fn port(_self: Ref<::core::net::SocketAddr>) -> u16 { + let output: u16 = ::core::net::SocketAddr::port(&_self).into(); + output + } + /// Changes the port number associated with this socket address. + /// # Examples + /// ``` + /// use std::net::{IpAddr, Ipv4Addr, SocketAddr}; + /// let mut socket = SocketAddr::new(IpAddr::V4(Ipv4Addr::new(127, 0, 0, 1)), 8080); + /// socket.set_port(1025); + /// assert_eq!(socket.port(), 1025); + /// ``` + fn set_port(mut _self: Mut<::core::net::SocketAddr>, new_port: u16) -> () { + let output: () = ::core::net::SocketAddr::set_port(&mut _self, new_port).into(); + output + } +} #[script_bindings( remote, name = "i_vec_2_functions", @@ -2640,7 +2789,7 @@ impl bevy::math::IVec2 { _self: Val, rhs: Ref, ) -> Val { - let output: Val = = >::add(_self.into_inner(), &rhs) .into(); @@ -2650,14 +2799,14 @@ impl bevy::math::IVec2 { _self: Val, rhs: Val, ) -> Val { - let output: Val = = >::add(_self.into_inner(), rhs.into_inner()) .into(); output } fn add(_self: Val, rhs: i32) -> Val { - let output: Val = = >::add(_self.into_inner(), rhs) .into(); @@ -2668,18 +2817,42 @@ impl bevy::math::IVec2 { let output: Val = bevy::math::IVec2::as_dvec2(&_self).into(); output } + /// Casts all elements of `self` to `i16`. + fn as_i16vec2(_self: Ref) -> Val { + let output: Val = bevy::math::IVec2::as_i16vec2(&_self) + .into(); + output + } /// Casts all elements of `self` to `i64`. fn as_i64vec2(_self: Ref) -> Val { let output: Val = bevy::math::IVec2::as_i64vec2(&_self) .into(); output } + /// Casts all elements of `self` to `i8`. + fn as_i8vec2(_self: Ref) -> Val { + let output: Val = bevy::math::IVec2::as_i8vec2(&_self) + .into(); + output + } + /// Casts all elements of `self` to `u16`. + fn as_u16vec2(_self: Ref) -> Val { + let output: Val = bevy::math::IVec2::as_u16vec2(&_self) + .into(); + output + } /// Casts all elements of `self` to `u64`. fn as_u64vec2(_self: Ref) -> Val { let output: Val = bevy::math::IVec2::as_u64vec2(&_self) .into(); output } + /// Casts all elements of `self` to `u8`. + fn as_u8vec2(_self: Ref) -> Val { + let output: Val = bevy::math::IVec2::as_u8vec2(&_self) + .into(); + output + } /// Casts all elements of `self` to `u32`. fn as_uvec2(_self: Ref) -> Val { let output: Val = bevy::math::IVec2::as_uvec2(&_self).into(); @@ -2691,7 +2864,7 @@ impl bevy::math::IVec2 { output } fn assert_receiver_is_total_eq(_self: Ref) -> () { - let output: () = ::assert_receiver_is_total_eq( + let output: () = ::assert_receiver_is_total_eq( &_self, ) .into(); @@ -2827,7 +3000,7 @@ impl bevy::math::IVec2 { _self: Val, rhs: Ref, ) -> Val { - let output: Val = = >::div(_self.into_inner(), &rhs) .into(); @@ -2837,14 +3010,14 @@ impl bevy::math::IVec2 { _self: Val, rhs: Val, ) -> Val { - let output: Val = = >::div(_self.into_inner(), rhs.into_inner()) .into(); output } fn div(_self: Val, rhs: i32) -> Val { - let output: Val = = >::div(_self.into_inner(), rhs) .into(); @@ -2895,7 +3068,7 @@ impl bevy::math::IVec2 { output } fn eq(_self: Ref, other: Ref) -> bool { - let output: bool = >::eq(&_self, &other) .into(); @@ -2970,7 +3143,7 @@ impl bevy::math::IVec2 { _self: Val, rhs: Ref, ) -> Val { - let output: Val = = >::mul(_self.into_inner(), &rhs) .into(); @@ -2980,21 +3153,21 @@ impl bevy::math::IVec2 { _self: Val, rhs: Val, ) -> Val { - let output: Val = = >::mul(_self.into_inner(), rhs.into_inner()) .into(); output } fn mul(_self: Val, rhs: i32) -> Val { - let output: Val = = >::mul(_self.into_inner(), rhs) .into(); output } fn neg(_self: Val) -> Val { - let output: Val = ::neg( + let output: Val = ::neg( _self.into_inner(), ) .into(); @@ -3025,7 +3198,7 @@ impl bevy::math::IVec2 { _self: Val, rhs: Ref, ) -> Val { - let output: Val = = >::rem(_self.into_inner(), &rhs) .into(); @@ -3035,14 +3208,14 @@ impl bevy::math::IVec2 { _self: Val, rhs: Val, ) -> Val { - let output: Val = = >::rem(_self.into_inner(), rhs.into_inner()) .into(); output } fn rem(_self: Val, rhs: i32) -> Val { - let output: Val = = >::rem(_self.into_inner(), rhs) .into(); @@ -3191,7 +3364,7 @@ impl bevy::math::IVec2 { _self: Val, rhs: Ref, ) -> Val { - let output: Val = = >::sub(_self.into_inner(), &rhs) .into(); @@ -3201,14 +3374,14 @@ impl bevy::math::IVec2 { _self: Val, rhs: Val, ) -> Val { - let output: Val = = >::sub(_self.into_inner(), rhs.into_inner()) .into(); output } fn sub(_self: Val, rhs: i32) -> Val { - let output: Val = = >::sub(_self.into_inner(), rhs) .into(); @@ -3333,7 +3506,7 @@ impl bevy::math::IVec3 { _self: Val, rhs: Ref, ) -> Val { - let output: Val = = >::add(_self.into_inner(), &rhs) .into(); @@ -3343,14 +3516,14 @@ impl bevy::math::IVec3 { _self: Val, rhs: Val, ) -> Val { - let output: Val = = >::add(_self.into_inner(), rhs.into_inner()) .into(); output } fn add(_self: Val, rhs: i32) -> Val { - let output: Val = = >::add(_self.into_inner(), rhs) .into(); @@ -3361,18 +3534,42 @@ impl bevy::math::IVec3 { let output: Val = bevy::math::IVec3::as_dvec3(&_self).into(); output } + /// Casts all elements of `self` to `i16`. + fn as_i16vec3(_self: Ref) -> Val { + let output: Val = bevy::math::IVec3::as_i16vec3(&_self) + .into(); + output + } /// Casts all elements of `self` to `i64`. fn as_i64vec3(_self: Ref) -> Val { let output: Val = bevy::math::IVec3::as_i64vec3(&_self) .into(); output } + /// Casts all elements of `self` to `i8`. + fn as_i8vec3(_self: Ref) -> Val { + let output: Val = bevy::math::IVec3::as_i8vec3(&_self) + .into(); + output + } + /// Casts all elements of `self` to `u16`. + fn as_u16vec3(_self: Ref) -> Val { + let output: Val = bevy::math::IVec3::as_u16vec3(&_self) + .into(); + output + } /// Casts all elements of `self` to `u64`. fn as_u64vec3(_self: Ref) -> Val { let output: Val = bevy::math::IVec3::as_u64vec3(&_self) .into(); output } + /// Casts all elements of `self` to `u8`. + fn as_u8vec3(_self: Ref) -> Val { + let output: Val = bevy::math::IVec3::as_u8vec3(&_self) + .into(); + output + } /// Casts all elements of `self` to `u32`. fn as_uvec3(_self: Ref) -> Val { let output: Val = bevy::math::IVec3::as_uvec3(&_self).into(); @@ -3389,7 +3586,7 @@ impl bevy::math::IVec3 { output } fn assert_receiver_is_total_eq(_self: Ref) -> () { - let output: () = ::assert_receiver_is_total_eq( + let output: () = ::assert_receiver_is_total_eq( &_self, ) .into(); @@ -3537,7 +3734,7 @@ impl bevy::math::IVec3 { _self: Val, rhs: Ref, ) -> Val { - let output: Val = = >::div(_self.into_inner(), &rhs) .into(); @@ -3547,14 +3744,14 @@ impl bevy::math::IVec3 { _self: Val, rhs: Val, ) -> Val { - let output: Val = = >::div(_self.into_inner(), rhs.into_inner()) .into(); output } fn div(_self: Val, rhs: i32) -> Val { - let output: Val = = >::div(_self.into_inner(), rhs) .into(); @@ -3605,7 +3802,7 @@ impl bevy::math::IVec3 { output } fn eq(_self: Ref, other: Ref) -> bool { - let output: bool = >::eq(&_self, &other) .into(); @@ -3680,7 +3877,7 @@ impl bevy::math::IVec3 { _self: Val, rhs: Ref, ) -> Val { - let output: Val = = >::mul(_self.into_inner(), &rhs) .into(); @@ -3690,21 +3887,21 @@ impl bevy::math::IVec3 { _self: Val, rhs: Val, ) -> Val { - let output: Val = = >::mul(_self.into_inner(), rhs.into_inner()) .into(); output } fn mul(_self: Val, rhs: i32) -> Val { - let output: Val = = >::mul(_self.into_inner(), rhs) .into(); output } fn neg(_self: Val) -> Val { - let output: Val = ::neg( + let output: Val = ::neg( _self.into_inner(), ) .into(); @@ -3719,7 +3916,7 @@ impl bevy::math::IVec3 { _self: Val, rhs: Ref, ) -> Val { - let output: Val = = >::rem(_self.into_inner(), &rhs) .into(); @@ -3729,14 +3926,14 @@ impl bevy::math::IVec3 { _self: Val, rhs: Val, ) -> Val { - let output: Val = = >::rem(_self.into_inner(), rhs.into_inner()) .into(); output } fn rem(_self: Val, rhs: i32) -> Val { - let output: Val = = >::rem(_self.into_inner(), rhs) .into(); @@ -3871,7 +4068,7 @@ impl bevy::math::IVec3 { _self: Val, rhs: Ref, ) -> Val { - let output: Val = = >::sub(_self.into_inner(), &rhs) .into(); @@ -3881,14 +4078,14 @@ impl bevy::math::IVec3 { _self: Val, rhs: Val, ) -> Val { - let output: Val = = >::sub(_self.into_inner(), rhs.into_inner()) .into(); output } fn sub(_self: Val, rhs: i32) -> Val { - let output: Val = = >::sub(_self.into_inner(), rhs) .into(); @@ -4031,7 +4228,7 @@ impl bevy::math::IVec4 { _self: Val, rhs: Ref, ) -> Val { - let output: Val = = >::add(_self.into_inner(), &rhs) .into(); @@ -4041,14 +4238,14 @@ impl bevy::math::IVec4 { _self: Val, rhs: Val, ) -> Val { - let output: Val = = >::add(_self.into_inner(), rhs.into_inner()) .into(); output } fn add(_self: Val, rhs: i32) -> Val { - let output: Val = = >::add(_self.into_inner(), rhs) .into(); @@ -4059,18 +4256,42 @@ impl bevy::math::IVec4 { let output: Val = bevy::math::IVec4::as_dvec4(&_self).into(); output } + /// Casts all elements of `self` to `i16`. + fn as_i16vec4(_self: Ref) -> Val { + let output: Val = bevy::math::IVec4::as_i16vec4(&_self) + .into(); + output + } /// Casts all elements of `self` to `i64`. fn as_i64vec4(_self: Ref) -> Val { let output: Val = bevy::math::IVec4::as_i64vec4(&_self) .into(); output } + /// Casts all elements of `self` to `i8`. + fn as_i8vec4(_self: Ref) -> Val { + let output: Val = bevy::math::IVec4::as_i8vec4(&_self) + .into(); + output + } + /// Casts all elements of `self` to `u16`. + fn as_u16vec4(_self: Ref) -> Val { + let output: Val = bevy::math::IVec4::as_u16vec4(&_self) + .into(); + output + } /// Casts all elements of `self` to `u64`. fn as_u64vec4(_self: Ref) -> Val { let output: Val = bevy::math::IVec4::as_u64vec4(&_self) .into(); output } + /// Casts all elements of `self` to `u8`. + fn as_u8vec4(_self: Ref) -> Val { + let output: Val = bevy::math::IVec4::as_u8vec4(&_self) + .into(); + output + } /// Casts all elements of `self` to `u32`. fn as_uvec4(_self: Ref) -> Val { let output: Val = bevy::math::IVec4::as_uvec4(&_self).into(); @@ -4082,7 +4303,7 @@ impl bevy::math::IVec4 { output } fn assert_receiver_is_total_eq(_self: Ref) -> () { - let output: () = ::assert_receiver_is_total_eq( + let output: () = ::assert_receiver_is_total_eq( &_self, ) .into(); @@ -4218,7 +4439,7 @@ impl bevy::math::IVec4 { _self: Val, rhs: Ref, ) -> Val { - let output: Val = = >::div(_self.into_inner(), &rhs) .into(); @@ -4228,14 +4449,14 @@ impl bevy::math::IVec4 { _self: Val, rhs: Val, ) -> Val { - let output: Val = = >::div(_self.into_inner(), rhs.into_inner()) .into(); output } fn div(_self: Val, rhs: i32) -> Val { - let output: Val = = >::div(_self.into_inner(), rhs) .into(); @@ -4286,7 +4507,7 @@ impl bevy::math::IVec4 { output } fn eq(_self: Ref, other: Ref) -> bool { - let output: bool = >::eq(&_self, &other) .into(); @@ -4352,7 +4573,7 @@ impl bevy::math::IVec4 { _self: Val, rhs: Ref, ) -> Val { - let output: Val = = >::mul(_self.into_inner(), &rhs) .into(); @@ -4362,21 +4583,21 @@ impl bevy::math::IVec4 { _self: Val, rhs: Val, ) -> Val { - let output: Val = = >::mul(_self.into_inner(), rhs.into_inner()) .into(); output } fn mul(_self: Val, rhs: i32) -> Val { - let output: Val = = >::mul(_self.into_inner(), rhs) .into(); output } fn neg(_self: Val) -> Val { - let output: Val = ::neg( + let output: Val = ::neg( _self.into_inner(), ) .into(); @@ -4391,7 +4612,7 @@ impl bevy::math::IVec4 { _self: Val, rhs: Ref, ) -> Val { - let output: Val = = >::rem(_self.into_inner(), &rhs) .into(); @@ -4401,14 +4622,14 @@ impl bevy::math::IVec4 { _self: Val, rhs: Val, ) -> Val { - let output: Val = = >::rem(_self.into_inner(), rhs.into_inner()) .into(); output } fn rem(_self: Val, rhs: i32) -> Val { - let output: Val = = >::rem(_self.into_inner(), rhs) .into(); @@ -4543,7 +4764,7 @@ impl bevy::math::IVec4 { _self: Val, rhs: Ref, ) -> Val { - let output: Val = = >::sub(_self.into_inner(), &rhs) .into(); @@ -4553,14 +4774,14 @@ impl bevy::math::IVec4 { _self: Val, rhs: Val, ) -> Val { - let output: Val = = >::sub(_self.into_inner(), rhs.into_inner()) .into(); output } fn sub(_self: Val, rhs: i32) -> Val { - let output: Val = = >::sub(_self.into_inner(), rhs) .into(); @@ -4697,92 +4918,111 @@ impl bevy::math::IVec4 { } #[script_bindings( remote, - name = "i_64_vec_2_functions", + name = "i_8_vec_2_functions", bms_core_path = "bevy_mod_scripting_core", generated )] -impl bevy::math::I64Vec2 { +impl bevy::math::I8Vec2 { /// Returns a vector containing the absolute value of each element of `self`. - fn abs(_self: Val) -> Val { - let output: Val = bevy::math::I64Vec2::abs( - _self.into_inner(), - ) + fn abs(_self: Val) -> Val { + let output: Val = bevy::math::I8Vec2::abs(_self.into_inner()) .into(); output } fn add( - _self: Val, - rhs: Ref, - ) -> Val { - let output: Val = , + rhs: Ref, + ) -> Val { + let output: Val = >::add(_self.into_inner(), &rhs) .into(); output } fn add( - _self: Val, - rhs: Val, - ) -> Val { - let output: Val = , + rhs: Val, + ) -> Val { + let output: Val = >::add(_self.into_inner(), rhs.into_inner()) .into(); output } - fn add(_self: Val, rhs: i64) -> Val { - let output: Val = , rhs: i8) -> Val { + let output: Val = >::add(_self.into_inner(), rhs) .into(); output } /// Casts all elements of `self` to `f64`. - fn as_dvec2(_self: Ref) -> Val { - let output: Val = bevy::math::I64Vec2::as_dvec2(&_self) + fn as_dvec2(_self: Ref) -> Val { + let output: Val = bevy::math::I8Vec2::as_dvec2(&_self).into(); + output + } + /// Casts all elements of `self` to `i16`. + fn as_i16vec2(_self: Ref) -> Val { + let output: Val = bevy::math::I8Vec2::as_i16vec2(&_self) + .into(); + output + } + /// Casts all elements of `self` to `i64`. + fn as_i64vec2(_self: Ref) -> Val { + let output: Val = bevy::math::I8Vec2::as_i64vec2(&_self) .into(); output } /// Casts all elements of `self` to `i32`. - fn as_ivec2(_self: Ref) -> Val { - let output: Val = bevy::math::I64Vec2::as_ivec2(&_self) + fn as_ivec2(_self: Ref) -> Val { + let output: Val = bevy::math::I8Vec2::as_ivec2(&_self).into(); + output + } + /// Casts all elements of `self` to `u16`. + fn as_u16vec2(_self: Ref) -> Val { + let output: Val = bevy::math::I8Vec2::as_u16vec2(&_self) .into(); output } /// Casts all elements of `self` to `u64`. - fn as_u64vec2(_self: Ref) -> Val { - let output: Val = bevy::math::I64Vec2::as_u64vec2(&_self) + fn as_u64vec2(_self: Ref) -> Val { + let output: Val = bevy::math::I8Vec2::as_u64vec2(&_self) .into(); output } - /// Casts all elements of `self` to `u32`. - fn as_uvec2(_self: Ref) -> Val { - let output: Val = bevy::math::I64Vec2::as_uvec2(&_self) + /// Casts all elements of `self` to `u8`. + fn as_u8vec2(_self: Ref) -> Val { + let output: Val = bevy::math::I8Vec2::as_u8vec2(&_self) .into(); output } + /// Casts all elements of `self` to `u32`. + fn as_uvec2(_self: Ref) -> Val { + let output: Val = bevy::math::I8Vec2::as_uvec2(&_self).into(); + output + } /// Casts all elements of `self` to `f32`. - fn as_vec2(_self: Ref) -> Val { - let output: Val = bevy::math::I64Vec2::as_vec2(&_self).into(); + fn as_vec2(_self: Ref) -> Val { + let output: Val = bevy::math::I8Vec2::as_vec2(&_self).into(); output } - fn assert_receiver_is_total_eq(_self: Ref) -> () { - let output: () = ::assert_receiver_is_total_eq( + fn assert_receiver_is_total_eq(_self: Ref) -> () { + let output: () = ::assert_receiver_is_total_eq( &_self, ) .into(); output } - /// Component-wise clamping of values, similar to [`i64::clamp`]. + /// Component-wise clamping of values, similar to [`i8::clamp`]. /// Each element in `min` must be less-or-equal to the corresponding element in `max`. /// # Panics /// Will panic if `min` is greater than `max` when `glam_assert` is enabled. fn clamp( - _self: Val, - min: Val, - max: Val, - ) -> Val { - let output: Val = bevy::math::I64Vec2::clamp( + _self: Val, + min: Val, + max: Val, + ) -> Val { + let output: Val = bevy::math::I8Vec2::clamp( _self.into_inner(), min.into_inner(), max.into_inner(), @@ -4790,8 +5030,8 @@ impl bevy::math::I64Vec2 { .into(); output } - fn clone(_self: Ref) -> Val { - let output: Val = ::clone( + fn clone(_self: Ref) -> Val { + let output: Val = ::clone( &_self, ) .into(); @@ -4802,10 +5042,10 @@ impl bevy::math::I64Vec2 { /// In other words, this computes `[self.x == rhs.x, self.y == rhs.y, ..]` for all /// elements. fn cmpeq( - _self: Val, - rhs: Val, + _self: Val, + rhs: Val, ) -> Val { - let output: Val = bevy::math::I64Vec2::cmpeq( + let output: Val = bevy::math::I8Vec2::cmpeq( _self.into_inner(), rhs.into_inner(), ) @@ -4817,10 +5057,10 @@ impl bevy::math::I64Vec2 { /// In other words this computes `[self.x >= rhs.x, self.y >= rhs.y, ..]` for all /// elements. fn cmpge( - _self: Val, - rhs: Val, + _self: Val, + rhs: Val, ) -> Val { - let output: Val = bevy::math::I64Vec2::cmpge( + let output: Val = bevy::math::I8Vec2::cmpge( _self.into_inner(), rhs.into_inner(), ) @@ -4832,10 +5072,10 @@ impl bevy::math::I64Vec2 { /// In other words this computes `[self.x > rhs.x, self.y > rhs.y, ..]` for all /// elements. fn cmpgt( - _self: Val, - rhs: Val, + _self: Val, + rhs: Val, ) -> Val { - let output: Val = bevy::math::I64Vec2::cmpgt( + let output: Val = bevy::math::I8Vec2::cmpgt( _self.into_inner(), rhs.into_inner(), ) @@ -4847,10 +5087,10 @@ impl bevy::math::I64Vec2 { /// In other words this computes `[self.x <= rhs.x, self.y <= rhs.y, ..]` for all /// elements. fn cmple( - _self: Val, - rhs: Val, + _self: Val, + rhs: Val, ) -> Val { - let output: Val = bevy::math::I64Vec2::cmple( + let output: Val = bevy::math::I8Vec2::cmple( _self.into_inner(), rhs.into_inner(), ) @@ -4862,10 +5102,10 @@ impl bevy::math::I64Vec2 { /// In other words this computes `[self.x < rhs.x, self.y < rhs.y, ..]` for all /// elements. fn cmplt( - _self: Val, - rhs: Val, + _self: Val, + rhs: Val, ) -> Val { - let output: Val = bevy::math::I64Vec2::cmplt( + let output: Val = bevy::math::I8Vec2::cmplt( _self.into_inner(), rhs.into_inner(), ) @@ -4877,10 +5117,10 @@ impl bevy::math::I64Vec2 { /// In other words this computes `[self.x != rhs.x, self.y != rhs.y, ..]` for all /// elements. fn cmpne( - _self: Val, - rhs: Val, + _self: Val, + rhs: Val, ) -> Val { - let output: Val = bevy::math::I64Vec2::cmpne( + let output: Val = bevy::math::I8Vec2::cmpne( _self.into_inner(), rhs.into_inner(), ) @@ -4889,10 +5129,10 @@ impl bevy::math::I64Vec2 { } /// Compute the squared euclidean distance between two points in space. fn distance_squared( - _self: Val, - rhs: Val, - ) -> i64 { - let output: i64 = bevy::math::I64Vec2::distance_squared( + _self: Val, + rhs: Val, + ) -> i8 { + let output: i8 = bevy::math::I8Vec2::distance_squared( _self.into_inner(), rhs.into_inner(), ) @@ -4900,28 +5140,28 @@ impl bevy::math::I64Vec2 { output } fn div( - _self: Val, - rhs: Ref, - ) -> Val { - let output: Val = , + rhs: Ref, + ) -> Val { + let output: Val = >::div(_self.into_inner(), &rhs) .into(); output } fn div( - _self: Val, - rhs: Val, - ) -> Val { - let output: Val = , + rhs: Val, + ) -> Val { + let output: Val = >::div(_self.into_inner(), rhs.into_inner()) .into(); output } - fn div(_self: Val, rhs: i64) -> Val { - let output: Val = , rhs: i8) -> Val { + let output: Val = >::div(_self.into_inner(), rhs) .into(); output @@ -4930,10 +5170,10 @@ impl bevy::math::I64Vec2 { /// # Panics /// This function will panic if any `rhs` element is 0 or the division results in overflow. fn div_euclid( - _self: Val, - rhs: Val, - ) -> Val { - let output: Val = bevy::math::I64Vec2::div_euclid( + _self: Val, + rhs: Val, + ) -> Val { + let output: Val = bevy::math::I8Vec2::div_euclid( _self.into_inner(), rhs.into_inner(), ) @@ -4941,17 +5181,17 @@ impl bevy::math::I64Vec2 { output } /// Computes the dot product of `self` and `rhs`. - fn dot(_self: Val, rhs: Val) -> i64 { - let output: i64 = bevy::math::I64Vec2::dot(_self.into_inner(), rhs.into_inner()) + fn dot(_self: Val, rhs: Val) -> i8 { + let output: i8 = bevy::math::I8Vec2::dot(_self.into_inner(), rhs.into_inner()) .into(); output } /// Returns a vector where every component is the dot product of `self` and `rhs`. fn dot_into_vec( - _self: Val, - rhs: Val, - ) -> Val { - let output: Val = bevy::math::I64Vec2::dot_into_vec( + _self: Val, + rhs: Val, + ) -> Val { + let output: Val = bevy::math::I8Vec2::dot_into_vec( _self.into_inner(), rhs.into_inner(), ) @@ -4960,27 +5200,26 @@ impl bevy::math::I64Vec2 { } /// Returns the product of all elements of `self`. /// In other words, this computes `self.x * self.y * ..`. - fn element_product(_self: Val) -> i64 { - let output: i64 = bevy::math::I64Vec2::element_product(_self.into_inner()) - .into(); + fn element_product(_self: Val) -> i8 { + let output: i8 = bevy::math::I8Vec2::element_product(_self.into_inner()).into(); output } /// Returns the sum of all elements of `self`. /// In other words, this computes `self.x + self.y + ..`. - fn element_sum(_self: Val) -> i64 { - let output: i64 = bevy::math::I64Vec2::element_sum(_self.into_inner()).into(); + fn element_sum(_self: Val) -> i8 { + let output: i8 = bevy::math::I8Vec2::element_sum(_self.into_inner()).into(); output } - fn eq(_self: Ref, other: Ref) -> bool { - let output: bool = , other: Ref) -> bool { + let output: bool = >::eq(&_self, &other) .into(); output } /// Creates a 3D vector from `self` and the given `z` value. - fn extend(_self: Val, z: i64) -> Val { - let output: Val = bevy::math::I64Vec2::extend( + fn extend(_self: Val, z: i8) -> Val { + let output: Val = bevy::math::I8Vec2::extend( _self.into_inner(), z, ) @@ -4988,30 +5227,30 @@ impl bevy::math::I64Vec2 { output } /// Creates a new vector from an array. - fn from_array(a: [i64; 2]) -> Val { - let output: Val = bevy::math::I64Vec2::from_array(a).into(); + fn from_array(a: [i8; 2]) -> Val { + let output: Val = bevy::math::I8Vec2::from_array(a).into(); output } /// Returns a bitmask with the lowest 2 bits set to the sign bits from the elements of `self`. /// A negative element results in a `1` bit and a positive element in a `0` bit. Element `x` goes /// into the first lowest bit, element `y` into the second, etc. - fn is_negative_bitmask(_self: Val) -> u32 { - let output: u32 = bevy::math::I64Vec2::is_negative_bitmask(_self.into_inner()) + fn is_negative_bitmask(_self: Val) -> u32 { + let output: u32 = bevy::math::I8Vec2::is_negative_bitmask(_self.into_inner()) .into(); output } /// Computes the squared length of `self`. - fn length_squared(_self: Val) -> i64 { - let output: i64 = bevy::math::I64Vec2::length_squared(_self.into_inner()).into(); + fn length_squared(_self: Val) -> i8 { + let output: i8 = bevy::math::I8Vec2::length_squared(_self.into_inner()).into(); output } /// Returns a vector containing the maximum values for each element of `self` and `rhs`. /// In other words this computes `[self.x.max(rhs.x), self.y.max(rhs.y), ..]`. fn max( - _self: Val, - rhs: Val, - ) -> Val { - let output: Val = bevy::math::I64Vec2::max( + _self: Val, + rhs: Val, + ) -> Val { + let output: Val = bevy::math::I8Vec2::max( _self.into_inner(), rhs.into_inner(), ) @@ -5020,17 +5259,17 @@ impl bevy::math::I64Vec2 { } /// Returns the horizontal maximum of `self`. /// In other words this computes `max(x, y, ..)`. - fn max_element(_self: Val) -> i64 { - let output: i64 = bevy::math::I64Vec2::max_element(_self.into_inner()).into(); + fn max_element(_self: Val) -> i8 { + let output: i8 = bevy::math::I8Vec2::max_element(_self.into_inner()).into(); output } /// Returns a vector containing the minimum values for each element of `self` and `rhs`. /// In other words this computes `[self.x.min(rhs.x), self.y.min(rhs.y), ..]`. fn min( - _self: Val, - rhs: Val, - ) -> Val { - let output: Val = bevy::math::I64Vec2::min( + _self: Val, + rhs: Val, + ) -> Val { + let output: Val = bevy::math::I8Vec2::min( _self.into_inner(), rhs.into_inner(), ) @@ -5039,52 +5278,52 @@ impl bevy::math::I64Vec2 { } /// Returns the horizontal minimum of `self`. /// In other words this computes `min(x, y, ..)`. - fn min_element(_self: Val) -> i64 { - let output: i64 = bevy::math::I64Vec2::min_element(_self.into_inner()).into(); + fn min_element(_self: Val) -> i8 { + let output: i8 = bevy::math::I8Vec2::min_element(_self.into_inner()).into(); output } fn mul( - _self: Val, - rhs: Ref, - ) -> Val { - let output: Val = , + rhs: Ref, + ) -> Val { + let output: Val = >::mul(_self.into_inner(), &rhs) .into(); output } fn mul( - _self: Val, - rhs: Val, - ) -> Val { - let output: Val = , + rhs: Val, + ) -> Val { + let output: Val = >::mul(_self.into_inner(), rhs.into_inner()) .into(); output } - fn mul(_self: Val, rhs: i64) -> Val { - let output: Val = , rhs: i8) -> Val { + let output: Val = >::mul(_self.into_inner(), rhs) .into(); output } - fn neg(_self: Val) -> Val { - let output: Val = ::neg( + fn neg(_self: Val) -> Val { + let output: Val = ::neg( _self.into_inner(), ) .into(); output } /// Creates a new vector. - fn new(x: i64, y: i64) -> Val { - let output: Val = bevy::math::I64Vec2::new(x, y).into(); + fn new(x: i8, y: i8) -> Val { + let output: Val = bevy::math::I8Vec2::new(x, y).into(); output } /// Returns a vector that is equal to `self` rotated by 90 degrees. - fn perp(_self: Val) -> Val { - let output: Val = bevy::math::I64Vec2::perp( + fn perp(_self: Val) -> Val { + let output: Val = bevy::math::I8Vec2::perp( _self.into_inner(), ) .into(); @@ -5092,8 +5331,8 @@ impl bevy::math::I64Vec2 { } /// The perpendicular dot product of `self` and `rhs`. /// Also known as the wedge product, 2D cross product, and determinant. - fn perp_dot(_self: Val, rhs: Val) -> i64 { - let output: i64 = bevy::math::I64Vec2::perp_dot( + fn perp_dot(_self: Val, rhs: Val) -> i8 { + let output: i8 = bevy::math::I8Vec2::perp_dot( _self.into_inner(), rhs.into_inner(), ) @@ -5101,28 +5340,28 @@ impl bevy::math::I64Vec2 { output } fn rem( - _self: Val, - rhs: Ref, - ) -> Val { - let output: Val = , + rhs: Ref, + ) -> Val { + let output: Val = >::rem(_self.into_inner(), &rhs) .into(); output } fn rem( - _self: Val, - rhs: Val, - ) -> Val { - let output: Val = , + rhs: Val, + ) -> Val { + let output: Val = >::rem(_self.into_inner(), rhs.into_inner()) .into(); output } - fn rem(_self: Val, rhs: i64) -> Val { - let output: Val = , rhs: i8) -> Val { + let output: Val = >::rem(_self.into_inner(), rhs) .into(); output @@ -5130,12 +5369,12 @@ impl bevy::math::I64Vec2 { /// Returns the element-wise remainder of [Euclidean division] of `self` by `rhs`. /// # Panics /// This function will panic if any `rhs` element is 0 or the division results in overflow. - /// [Euclidean division]: i64::rem_euclid + /// [Euclidean division]: i8::rem_euclid fn rem_euclid( - _self: Val, - rhs: Val, - ) -> Val { - let output: Val = bevy::math::I64Vec2::rem_euclid( + _self: Val, + rhs: Val, + ) -> Val { + let output: Val = bevy::math::I8Vec2::rem_euclid( _self.into_inner(), rhs.into_inner(), ) @@ -5146,10 +5385,10 @@ impl bevy::math::I64Vec2 { /// then this just rotation. This is what you usually want. Otherwise, /// it will be like a rotation with a multiplication by `self`'s length. fn rotate( - _self: Val, - rhs: Val, - ) -> Val { - let output: Val = bevy::math::I64Vec2::rotate( + _self: Val, + rhs: Val, + ) -> Val { + let output: Val = bevy::math::I8Vec2::rotate( _self.into_inner(), rhs.into_inner(), ) @@ -5159,10 +5398,10 @@ impl bevy::math::I64Vec2 { /// Returns a vector containing the saturating addition of `self` and `rhs`. /// In other words this computes `[self.x.saturating_add(rhs.x), self.y.saturating_add(rhs.y), ..]`. fn saturating_add( - _self: Val, - rhs: Val, - ) -> Val { - let output: Val = bevy::math::I64Vec2::saturating_add( + _self: Val, + rhs: Val, + ) -> Val { + let output: Val = bevy::math::I8Vec2::saturating_add( _self.into_inner(), rhs.into_inner(), ) @@ -5171,10 +5410,10 @@ impl bevy::math::I64Vec2 { } /// In other words this computes `[self.x.saturating_add_unsigned(rhs.x), self.y.saturating_add_unsigned(rhs.y), ..]`. fn saturating_add_unsigned( - _self: Val, - rhs: Val, - ) -> Val { - let output: Val = bevy::math::I64Vec2::saturating_add_unsigned( + _self: Val, + rhs: Val, + ) -> Val { + let output: Val = bevy::math::I8Vec2::saturating_add_unsigned( _self.into_inner(), rhs.into_inner(), ) @@ -5184,10 +5423,10 @@ impl bevy::math::I64Vec2 { /// Returns a vector containing the saturating division of `self` and `rhs`. /// In other words this computes `[self.x.saturating_div(rhs.x), self.y.saturating_div(rhs.y), ..]`. fn saturating_div( - _self: Val, - rhs: Val, - ) -> Val { - let output: Val = bevy::math::I64Vec2::saturating_div( + _self: Val, + rhs: Val, + ) -> Val { + let output: Val = bevy::math::I8Vec2::saturating_div( _self.into_inner(), rhs.into_inner(), ) @@ -5197,10 +5436,10 @@ impl bevy::math::I64Vec2 { /// Returns a vector containing the saturating multiplication of `self` and `rhs`. /// In other words this computes `[self.x.saturating_mul(rhs.x), self.y.saturating_mul(rhs.y), ..]`. fn saturating_mul( - _self: Val, - rhs: Val, - ) -> Val { - let output: Val = bevy::math::I64Vec2::saturating_mul( + _self: Val, + rhs: Val, + ) -> Val { + let output: Val = bevy::math::I8Vec2::saturating_mul( _self.into_inner(), rhs.into_inner(), ) @@ -5210,10 +5449,10 @@ impl bevy::math::I64Vec2 { /// Returns a vector containing the saturating subtraction of `self` and `rhs`. /// In other words this computes `[self.x.saturating_sub(rhs.x), self.y.saturating_sub(rhs.y), ..]`. fn saturating_sub( - _self: Val, - rhs: Val, - ) -> Val { - let output: Val = bevy::math::I64Vec2::saturating_sub( + _self: Val, + rhs: Val, + ) -> Val { + let output: Val = bevy::math::I8Vec2::saturating_sub( _self.into_inner(), rhs.into_inner(), ) @@ -5223,10 +5462,10 @@ impl bevy::math::I64Vec2 { /// Returns a vector containing the saturating subtraction of `self` and unsigned vector `rhs`. /// In other words this computes `[self.x.saturating_sub_unsigned(rhs.x), self.y.saturating_sub_unsigned(rhs.y), ..]`. fn saturating_sub_unsigned( - _self: Val, - rhs: Val, - ) -> Val { - let output: Val = bevy::math::I64Vec2::saturating_sub_unsigned( + _self: Val, + rhs: Val, + ) -> Val { + let output: Val = bevy::math::I8Vec2::saturating_sub_unsigned( _self.into_inner(), rhs.into_inner(), ) @@ -5239,10 +5478,10 @@ impl bevy::math::I64Vec2 { /// uses the element from `if_false`. fn select( mask: Val, - if_true: Val, - if_false: Val, - ) -> Val { - let output: Val = bevy::math::I64Vec2::select( + if_true: Val, + if_false: Val, + ) -> Val { + let output: Val = bevy::math::I8Vec2::select( mask.into_inner(), if_true.into_inner(), if_false.into_inner(), @@ -5254,53 +5493,53 @@ impl bevy::math::I64Vec2 { /// - `0` if the number is zero /// - `1` if the number is positive /// - `-1` if the number is negative - fn signum(_self: Val) -> Val { - let output: Val = bevy::math::I64Vec2::signum( + fn signum(_self: Val) -> Val { + let output: Val = bevy::math::I8Vec2::signum( _self.into_inner(), ) .into(); output } /// Creates a vector with all elements set to `v`. - fn splat(v: i64) -> Val { - let output: Val = bevy::math::I64Vec2::splat(v).into(); + fn splat(v: i8) -> Val { + let output: Val = bevy::math::I8Vec2::splat(v).into(); output } fn sub( - _self: Val, - rhs: Ref, - ) -> Val { - let output: Val = , + rhs: Ref, + ) -> Val { + let output: Val = >::sub(_self.into_inner(), &rhs) .into(); output } fn sub( - _self: Val, - rhs: Val, - ) -> Val { - let output: Val = , + rhs: Val, + ) -> Val { + let output: Val = >::sub(_self.into_inner(), rhs.into_inner()) .into(); output } - fn sub(_self: Val, rhs: i64) -> Val { - let output: Val = , rhs: i8) -> Val { + let output: Val = >::sub(_self.into_inner(), rhs) .into(); output } /// `[x, y]` - fn to_array(_self: Ref) -> [i64; 2] { - let output: [i64; 2] = bevy::math::I64Vec2::to_array(&_self).into(); + fn to_array(_self: Ref) -> [i8; 2] { + let output: [i8; 2] = bevy::math::I8Vec2::to_array(&_self).into(); output } /// Creates a 2D vector from `self` with the given value of `x`. - fn with_x(_self: Val, x: i64) -> Val { - let output: Val = bevy::math::I64Vec2::with_x( + fn with_x(_self: Val, x: i8) -> Val { + let output: Val = bevy::math::I8Vec2::with_x( _self.into_inner(), x, ) @@ -5308,8 +5547,8 @@ impl bevy::math::I64Vec2 { output } /// Creates a 2D vector from `self` with the given value of `y`. - fn with_y(_self: Val, y: i64) -> Val { - let output: Val = bevy::math::I64Vec2::with_y( + fn with_y(_self: Val, y: i8) -> Val { + let output: Val = bevy::math::I8Vec2::with_y( _self.into_inner(), y, ) @@ -5319,10 +5558,10 @@ impl bevy::math::I64Vec2 { /// Returns a vector containing the wrapping addition of `self` and `rhs`. /// In other words this computes `[self.x.wrapping_add(rhs.x), self.y.wrapping_add(rhs.y), ..]`. fn wrapping_add( - _self: Val, - rhs: Val, - ) -> Val { - let output: Val = bevy::math::I64Vec2::wrapping_add( + _self: Val, + rhs: Val, + ) -> Val { + let output: Val = bevy::math::I8Vec2::wrapping_add( _self.into_inner(), rhs.into_inner(), ) @@ -5332,10 +5571,10 @@ impl bevy::math::I64Vec2 { /// Returns a vector containing the wrapping addition of `self` and unsigned vector `rhs`. /// In other words this computes `[self.x.wrapping_add_unsigned(rhs.x), self.y.wrapping_add_unsigned(rhs.y), ..]`. fn wrapping_add_unsigned( - _self: Val, - rhs: Val, - ) -> Val { - let output: Val = bevy::math::I64Vec2::wrapping_add_unsigned( + _self: Val, + rhs: Val, + ) -> Val { + let output: Val = bevy::math::I8Vec2::wrapping_add_unsigned( _self.into_inner(), rhs.into_inner(), ) @@ -5345,10 +5584,10 @@ impl bevy::math::I64Vec2 { /// Returns a vector containing the wrapping division of `self` and `rhs`. /// In other words this computes `[self.x.wrapping_div(rhs.x), self.y.wrapping_div(rhs.y), ..]`. fn wrapping_div( - _self: Val, - rhs: Val, - ) -> Val { - let output: Val = bevy::math::I64Vec2::wrapping_div( + _self: Val, + rhs: Val, + ) -> Val { + let output: Val = bevy::math::I8Vec2::wrapping_div( _self.into_inner(), rhs.into_inner(), ) @@ -5358,10 +5597,10 @@ impl bevy::math::I64Vec2 { /// Returns a vector containing the wrapping multiplication of `self` and `rhs`. /// In other words this computes `[self.x.wrapping_mul(rhs.x), self.y.wrapping_mul(rhs.y), ..]`. fn wrapping_mul( - _self: Val, - rhs: Val, - ) -> Val { - let output: Val = bevy::math::I64Vec2::wrapping_mul( + _self: Val, + rhs: Val, + ) -> Val { + let output: Val = bevy::math::I8Vec2::wrapping_mul( _self.into_inner(), rhs.into_inner(), ) @@ -5371,10 +5610,10 @@ impl bevy::math::I64Vec2 { /// Returns a vector containing the wrapping subtraction of `self` and `rhs`. /// In other words this computes `[self.x.wrapping_sub(rhs.x), self.y.wrapping_sub(rhs.y), ..]`. fn wrapping_sub( - _self: Val, - rhs: Val, - ) -> Val { - let output: Val = bevy::math::I64Vec2::wrapping_sub( + _self: Val, + rhs: Val, + ) -> Val { + let output: Val = bevy::math::I8Vec2::wrapping_sub( _self.into_inner(), rhs.into_inner(), ) @@ -5384,10 +5623,10 @@ impl bevy::math::I64Vec2 { /// Returns a vector containing the wrapping subtraction of `self` and unsigned vector `rhs`. /// In other words this computes `[self.x.wrapping_sub_unsigned(rhs.x), self.y.wrapping_sub_unsigned(rhs.y), ..]`. fn wrapping_sub_unsigned( - _self: Val, - rhs: Val, - ) -> Val { - let output: Val = bevy::math::I64Vec2::wrapping_sub_unsigned( + _self: Val, + rhs: Val, + ) -> Val { + let output: Val = bevy::math::I8Vec2::wrapping_sub_unsigned( _self.into_inner(), rhs.into_inner(), ) @@ -5397,98 +5636,116 @@ impl bevy::math::I64Vec2 { } #[script_bindings( remote, - name = "i_64_vec_3_functions", + name = "i_8_vec_3_functions", bms_core_path = "bevy_mod_scripting_core", generated )] -impl bevy::math::I64Vec3 { +impl bevy::math::I8Vec3 { /// Returns a vector containing the absolute value of each element of `self`. - fn abs(_self: Val) -> Val { - let output: Val = bevy::math::I64Vec3::abs( - _self.into_inner(), - ) + fn abs(_self: Val) -> Val { + let output: Val = bevy::math::I8Vec3::abs(_self.into_inner()) .into(); output } fn add( - _self: Val, - rhs: Ref, - ) -> Val { - let output: Val = , + rhs: Ref, + ) -> Val { + let output: Val = >::add(_self.into_inner(), &rhs) .into(); output } fn add( - _self: Val, - rhs: Val, - ) -> Val { - let output: Val = , + rhs: Val, + ) -> Val { + let output: Val = >::add(_self.into_inner(), rhs.into_inner()) .into(); output } - fn add(_self: Val, rhs: i64) -> Val { - let output: Val = , rhs: i8) -> Val { + let output: Val = >::add(_self.into_inner(), rhs) .into(); output } /// Casts all elements of `self` to `f64`. - fn as_dvec3(_self: Ref) -> Val { - let output: Val = bevy::math::I64Vec3::as_dvec3(&_self) + fn as_dvec3(_self: Ref) -> Val { + let output: Val = bevy::math::I8Vec3::as_dvec3(&_self).into(); + output + } + /// Casts all elements of `self` to `i16`. + fn as_i16vec3(_self: Ref) -> Val { + let output: Val = bevy::math::I8Vec3::as_i16vec3(&_self) + .into(); + output + } + /// Casts all elements of `self` to `i64`. + fn as_i64vec3(_self: Ref) -> Val { + let output: Val = bevy::math::I8Vec3::as_i64vec3(&_self) .into(); output } /// Casts all elements of `self` to `i32`. - fn as_ivec3(_self: Ref) -> Val { - let output: Val = bevy::math::I64Vec3::as_ivec3(&_self) + fn as_ivec3(_self: Ref) -> Val { + let output: Val = bevy::math::I8Vec3::as_ivec3(&_self).into(); + output + } + /// Casts all elements of `self` to `u16`. + fn as_u16vec3(_self: Ref) -> Val { + let output: Val = bevy::math::I8Vec3::as_u16vec3(&_self) .into(); output } /// Casts all elements of `self` to `u64`. - fn as_u64vec3(_self: Ref) -> Val { - let output: Val = bevy::math::I64Vec3::as_u64vec3(&_self) + fn as_u64vec3(_self: Ref) -> Val { + let output: Val = bevy::math::I8Vec3::as_u64vec3(&_self) .into(); output } - /// Casts all elements of `self` to `u32`. - fn as_uvec3(_self: Ref) -> Val { - let output: Val = bevy::math::I64Vec3::as_uvec3(&_self) + /// Casts all elements of `self` to `u8`. + fn as_u8vec3(_self: Ref) -> Val { + let output: Val = bevy::math::I8Vec3::as_u8vec3(&_self) .into(); output } + /// Casts all elements of `self` to `u32`. + fn as_uvec3(_self: Ref) -> Val { + let output: Val = bevy::math::I8Vec3::as_uvec3(&_self).into(); + output + } /// Casts all elements of `self` to `f32`. - fn as_vec3(_self: Ref) -> Val { - let output: Val = bevy::math::I64Vec3::as_vec3(&_self).into(); + fn as_vec3(_self: Ref) -> Val { + let output: Val = bevy::math::I8Vec3::as_vec3(&_self).into(); output } /// Casts all elements of `self` to `f32`. - fn as_vec3a(_self: Ref) -> Val { - let output: Val = bevy::math::I64Vec3::as_vec3a(&_self) - .into(); + fn as_vec3a(_self: Ref) -> Val { + let output: Val = bevy::math::I8Vec3::as_vec3a(&_self).into(); output } - fn assert_receiver_is_total_eq(_self: Ref) -> () { - let output: () = ::assert_receiver_is_total_eq( + fn assert_receiver_is_total_eq(_self: Ref) -> () { + let output: () = ::assert_receiver_is_total_eq( &_self, ) .into(); output } - /// Component-wise clamping of values, similar to [`i64::clamp`]. + /// Component-wise clamping of values, similar to [`i8::clamp`]. /// Each element in `min` must be less-or-equal to the corresponding element in `max`. /// # Panics /// Will panic if `min` is greater than `max` when `glam_assert` is enabled. fn clamp( - _self: Val, - min: Val, - max: Val, - ) -> Val { - let output: Val = bevy::math::I64Vec3::clamp( + _self: Val, + min: Val, + max: Val, + ) -> Val { + let output: Val = bevy::math::I8Vec3::clamp( _self.into_inner(), min.into_inner(), max.into_inner(), @@ -5496,8 +5753,8 @@ impl bevy::math::I64Vec3 { .into(); output } - fn clone(_self: Ref) -> Val { - let output: Val = ::clone( + fn clone(_self: Ref) -> Val { + let output: Val = ::clone( &_self, ) .into(); @@ -5508,10 +5765,10 @@ impl bevy::math::I64Vec3 { /// In other words, this computes `[self.x == rhs.x, self.y == rhs.y, ..]` for all /// elements. fn cmpeq( - _self: Val, - rhs: Val, + _self: Val, + rhs: Val, ) -> Val { - let output: Val = bevy::math::I64Vec3::cmpeq( + let output: Val = bevy::math::I8Vec3::cmpeq( _self.into_inner(), rhs.into_inner(), ) @@ -5523,10 +5780,10 @@ impl bevy::math::I64Vec3 { /// In other words this computes `[self.x >= rhs.x, self.y >= rhs.y, ..]` for all /// elements. fn cmpge( - _self: Val, - rhs: Val, + _self: Val, + rhs: Val, ) -> Val { - let output: Val = bevy::math::I64Vec3::cmpge( + let output: Val = bevy::math::I8Vec3::cmpge( _self.into_inner(), rhs.into_inner(), ) @@ -5538,10 +5795,10 @@ impl bevy::math::I64Vec3 { /// In other words this computes `[self.x > rhs.x, self.y > rhs.y, ..]` for all /// elements. fn cmpgt( - _self: Val, - rhs: Val, + _self: Val, + rhs: Val, ) -> Val { - let output: Val = bevy::math::I64Vec3::cmpgt( + let output: Val = bevy::math::I8Vec3::cmpgt( _self.into_inner(), rhs.into_inner(), ) @@ -5553,10 +5810,10 @@ impl bevy::math::I64Vec3 { /// In other words this computes `[self.x <= rhs.x, self.y <= rhs.y, ..]` for all /// elements. fn cmple( - _self: Val, - rhs: Val, + _self: Val, + rhs: Val, ) -> Val { - let output: Val = bevy::math::I64Vec3::cmple( + let output: Val = bevy::math::I8Vec3::cmple( _self.into_inner(), rhs.into_inner(), ) @@ -5568,10 +5825,10 @@ impl bevy::math::I64Vec3 { /// In other words this computes `[self.x < rhs.x, self.y < rhs.y, ..]` for all /// elements. fn cmplt( - _self: Val, - rhs: Val, + _self: Val, + rhs: Val, ) -> Val { - let output: Val = bevy::math::I64Vec3::cmplt( + let output: Val = bevy::math::I8Vec3::cmplt( _self.into_inner(), rhs.into_inner(), ) @@ -5583,10 +5840,10 @@ impl bevy::math::I64Vec3 { /// In other words this computes `[self.x != rhs.x, self.y != rhs.y, ..]` for all /// elements. fn cmpne( - _self: Val, - rhs: Val, + _self: Val, + rhs: Val, ) -> Val { - let output: Val = bevy::math::I64Vec3::cmpne( + let output: Val = bevy::math::I8Vec3::cmpne( _self.into_inner(), rhs.into_inner(), ) @@ -5595,10 +5852,10 @@ impl bevy::math::I64Vec3 { } /// Computes the cross product of `self` and `rhs`. fn cross( - _self: Val, - rhs: Val, - ) -> Val { - let output: Val = bevy::math::I64Vec3::cross( + _self: Val, + rhs: Val, + ) -> Val { + let output: Val = bevy::math::I8Vec3::cross( _self.into_inner(), rhs.into_inner(), ) @@ -5607,10 +5864,10 @@ impl bevy::math::I64Vec3 { } /// Compute the squared euclidean distance between two points in space. fn distance_squared( - _self: Val, - rhs: Val, - ) -> i64 { - let output: i64 = bevy::math::I64Vec3::distance_squared( + _self: Val, + rhs: Val, + ) -> i8 { + let output: i8 = bevy::math::I8Vec3::distance_squared( _self.into_inner(), rhs.into_inner(), ) @@ -5618,28 +5875,28 @@ impl bevy::math::I64Vec3 { output } fn div( - _self: Val, - rhs: Ref, - ) -> Val { - let output: Val = , + rhs: Ref, + ) -> Val { + let output: Val = >::div(_self.into_inner(), &rhs) .into(); output } fn div( - _self: Val, - rhs: Val, - ) -> Val { - let output: Val = , + rhs: Val, + ) -> Val { + let output: Val = >::div(_self.into_inner(), rhs.into_inner()) .into(); output } - fn div(_self: Val, rhs: i64) -> Val { - let output: Val = , rhs: i8) -> Val { + let output: Val = >::div(_self.into_inner(), rhs) .into(); output @@ -5648,10 +5905,10 @@ impl bevy::math::I64Vec3 { /// # Panics /// This function will panic if any `rhs` element is 0 or the division results in overflow. fn div_euclid( - _self: Val, - rhs: Val, - ) -> Val { - let output: Val = bevy::math::I64Vec3::div_euclid( + _self: Val, + rhs: Val, + ) -> Val { + let output: Val = bevy::math::I8Vec3::div_euclid( _self.into_inner(), rhs.into_inner(), ) @@ -5659,17 +5916,17 @@ impl bevy::math::I64Vec3 { output } /// Computes the dot product of `self` and `rhs`. - fn dot(_self: Val, rhs: Val) -> i64 { - let output: i64 = bevy::math::I64Vec3::dot(_self.into_inner(), rhs.into_inner()) + fn dot(_self: Val, rhs: Val) -> i8 { + let output: i8 = bevy::math::I8Vec3::dot(_self.into_inner(), rhs.into_inner()) .into(); output } /// Returns a vector where every component is the dot product of `self` and `rhs`. fn dot_into_vec( - _self: Val, - rhs: Val, - ) -> Val { - let output: Val = bevy::math::I64Vec3::dot_into_vec( + _self: Val, + rhs: Val, + ) -> Val { + let output: Val = bevy::math::I8Vec3::dot_into_vec( _self.into_inner(), rhs.into_inner(), ) @@ -5678,27 +5935,26 @@ impl bevy::math::I64Vec3 { } /// Returns the product of all elements of `self`. /// In other words, this computes `self.x * self.y * ..`. - fn element_product(_self: Val) -> i64 { - let output: i64 = bevy::math::I64Vec3::element_product(_self.into_inner()) - .into(); + fn element_product(_self: Val) -> i8 { + let output: i8 = bevy::math::I8Vec3::element_product(_self.into_inner()).into(); output } /// Returns the sum of all elements of `self`. /// In other words, this computes `self.x + self.y + ..`. - fn element_sum(_self: Val) -> i64 { - let output: i64 = bevy::math::I64Vec3::element_sum(_self.into_inner()).into(); + fn element_sum(_self: Val) -> i8 { + let output: i8 = bevy::math::I8Vec3::element_sum(_self.into_inner()).into(); output } - fn eq(_self: Ref, other: Ref) -> bool { - let output: bool = , other: Ref) -> bool { + let output: bool = >::eq(&_self, &other) .into(); output } /// Creates a 4D vector from `self` and the given `w` value. - fn extend(_self: Val, w: i64) -> Val { - let output: Val = bevy::math::I64Vec3::extend( + fn extend(_self: Val, w: i8) -> Val { + let output: Val = bevy::math::I8Vec3::extend( _self.into_inner(), w, ) @@ -5706,30 +5962,30 @@ impl bevy::math::I64Vec3 { output } /// Creates a new vector from an array. - fn from_array(a: [i64; 3]) -> Val { - let output: Val = bevy::math::I64Vec3::from_array(a).into(); + fn from_array(a: [i8; 3]) -> Val { + let output: Val = bevy::math::I8Vec3::from_array(a).into(); output } /// Returns a bitmask with the lowest 3 bits set to the sign bits from the elements of `self`. /// A negative element results in a `1` bit and a positive element in a `0` bit. Element `x` goes /// into the first lowest bit, element `y` into the second, etc. - fn is_negative_bitmask(_self: Val) -> u32 { - let output: u32 = bevy::math::I64Vec3::is_negative_bitmask(_self.into_inner()) + fn is_negative_bitmask(_self: Val) -> u32 { + let output: u32 = bevy::math::I8Vec3::is_negative_bitmask(_self.into_inner()) .into(); output } /// Computes the squared length of `self`. - fn length_squared(_self: Val) -> i64 { - let output: i64 = bevy::math::I64Vec3::length_squared(_self.into_inner()).into(); + fn length_squared(_self: Val) -> i8 { + let output: i8 = bevy::math::I8Vec3::length_squared(_self.into_inner()).into(); output } /// Returns a vector containing the maximum values for each element of `self` and `rhs`. /// In other words this computes `[self.x.max(rhs.x), self.y.max(rhs.y), ..]`. fn max( - _self: Val, - rhs: Val, - ) -> Val { - let output: Val = bevy::math::I64Vec3::max( + _self: Val, + rhs: Val, + ) -> Val { + let output: Val = bevy::math::I8Vec3::max( _self.into_inner(), rhs.into_inner(), ) @@ -5738,17 +5994,17 @@ impl bevy::math::I64Vec3 { } /// Returns the horizontal maximum of `self`. /// In other words this computes `max(x, y, ..)`. - fn max_element(_self: Val) -> i64 { - let output: i64 = bevy::math::I64Vec3::max_element(_self.into_inner()).into(); + fn max_element(_self: Val) -> i8 { + let output: i8 = bevy::math::I8Vec3::max_element(_self.into_inner()).into(); output } /// Returns a vector containing the minimum values for each element of `self` and `rhs`. /// In other words this computes `[self.x.min(rhs.x), self.y.min(rhs.y), ..]`. fn min( - _self: Val, - rhs: Val, - ) -> Val { - let output: Val = bevy::math::I64Vec3::min( + _self: Val, + rhs: Val, + ) -> Val { + let output: Val = bevy::math::I8Vec3::min( _self.into_inner(), rhs.into_inner(), ) @@ -5757,72 +6013,72 @@ impl bevy::math::I64Vec3 { } /// Returns the horizontal minimum of `self`. /// In other words this computes `min(x, y, ..)`. - fn min_element(_self: Val) -> i64 { - let output: i64 = bevy::math::I64Vec3::min_element(_self.into_inner()).into(); + fn min_element(_self: Val) -> i8 { + let output: i8 = bevy::math::I8Vec3::min_element(_self.into_inner()).into(); output } fn mul( - _self: Val, - rhs: Ref, - ) -> Val { - let output: Val = , + rhs: Ref, + ) -> Val { + let output: Val = >::mul(_self.into_inner(), &rhs) .into(); output } fn mul( - _self: Val, - rhs: Val, - ) -> Val { - let output: Val = , + rhs: Val, + ) -> Val { + let output: Val = >::mul(_self.into_inner(), rhs.into_inner()) .into(); output } - fn mul(_self: Val, rhs: i64) -> Val { - let output: Val = , rhs: i8) -> Val { + let output: Val = >::mul(_self.into_inner(), rhs) .into(); output } - fn neg(_self: Val) -> Val { - let output: Val = ::neg( + fn neg(_self: Val) -> Val { + let output: Val = ::neg( _self.into_inner(), ) .into(); output } /// Creates a new vector. - fn new(x: i64, y: i64, z: i64) -> Val { - let output: Val = bevy::math::I64Vec3::new(x, y, z).into(); + fn new(x: i8, y: i8, z: i8) -> Val { + let output: Val = bevy::math::I8Vec3::new(x, y, z).into(); output } fn rem( - _self: Val, - rhs: Ref, - ) -> Val { - let output: Val = , + rhs: Ref, + ) -> Val { + let output: Val = >::rem(_self.into_inner(), &rhs) .into(); output } fn rem( - _self: Val, - rhs: Val, - ) -> Val { - let output: Val = , + rhs: Val, + ) -> Val { + let output: Val = >::rem(_self.into_inner(), rhs.into_inner()) .into(); output } - fn rem(_self: Val, rhs: i64) -> Val { - let output: Val = , rhs: i8) -> Val { + let output: Val = >::rem(_self.into_inner(), rhs) .into(); output @@ -5830,12 +6086,12 @@ impl bevy::math::I64Vec3 { /// Returns the element-wise remainder of [Euclidean division] of `self` by `rhs`. /// # Panics /// This function will panic if any `rhs` element is 0 or the division results in overflow. - /// [Euclidean division]: i64::rem_euclid + /// [Euclidean division]: i8::rem_euclid fn rem_euclid( - _self: Val, - rhs: Val, - ) -> Val { - let output: Val = bevy::math::I64Vec3::rem_euclid( + _self: Val, + rhs: Val, + ) -> Val { + let output: Val = bevy::math::I8Vec3::rem_euclid( _self.into_inner(), rhs.into_inner(), ) @@ -5845,10 +6101,10 @@ impl bevy::math::I64Vec3 { /// Returns a vector containing the saturating addition of `self` and `rhs`. /// In other words this computes `[self.x.saturating_add(rhs.x), self.y.saturating_add(rhs.y), ..]`. fn saturating_add( - _self: Val, - rhs: Val, - ) -> Val { - let output: Val = bevy::math::I64Vec3::saturating_add( + _self: Val, + rhs: Val, + ) -> Val { + let output: Val = bevy::math::I8Vec3::saturating_add( _self.into_inner(), rhs.into_inner(), ) @@ -5857,10 +6113,10 @@ impl bevy::math::I64Vec3 { } /// In other words this computes `[self.x.saturating_add_unsigned(rhs.x), self.y.saturating_add_unsigned(rhs.y), ..]`. fn saturating_add_unsigned( - _self: Val, - rhs: Val, - ) -> Val { - let output: Val = bevy::math::I64Vec3::saturating_add_unsigned( + _self: Val, + rhs: Val, + ) -> Val { + let output: Val = bevy::math::I8Vec3::saturating_add_unsigned( _self.into_inner(), rhs.into_inner(), ) @@ -5870,10 +6126,10 @@ impl bevy::math::I64Vec3 { /// Returns a vector containing the saturating division of `self` and `rhs`. /// In other words this computes `[self.x.saturating_div(rhs.x), self.y.saturating_div(rhs.y), ..]`. fn saturating_div( - _self: Val, - rhs: Val, - ) -> Val { - let output: Val = bevy::math::I64Vec3::saturating_div( + _self: Val, + rhs: Val, + ) -> Val { + let output: Val = bevy::math::I8Vec3::saturating_div( _self.into_inner(), rhs.into_inner(), ) @@ -5883,10 +6139,10 @@ impl bevy::math::I64Vec3 { /// Returns a vector containing the saturating multiplication of `self` and `rhs`. /// In other words this computes `[self.x.saturating_mul(rhs.x), self.y.saturating_mul(rhs.y), ..]`. fn saturating_mul( - _self: Val, - rhs: Val, - ) -> Val { - let output: Val = bevy::math::I64Vec3::saturating_mul( + _self: Val, + rhs: Val, + ) -> Val { + let output: Val = bevy::math::I8Vec3::saturating_mul( _self.into_inner(), rhs.into_inner(), ) @@ -5896,10 +6152,10 @@ impl bevy::math::I64Vec3 { /// Returns a vector containing the saturating subtraction of `self` and `rhs`. /// In other words this computes `[self.x.saturating_sub(rhs.x), self.y.saturating_sub(rhs.y), ..]`. fn saturating_sub( - _self: Val, - rhs: Val, - ) -> Val { - let output: Val = bevy::math::I64Vec3::saturating_sub( + _self: Val, + rhs: Val, + ) -> Val { + let output: Val = bevy::math::I8Vec3::saturating_sub( _self.into_inner(), rhs.into_inner(), ) @@ -5909,10 +6165,10 @@ impl bevy::math::I64Vec3 { /// Returns a vector containing the saturating subtraction of `self` and unsigned vector `rhs`. /// In other words this computes `[self.x.saturating_sub_unsigned(rhs.x), self.y.saturating_sub_unsigned(rhs.y), ..]`. fn saturating_sub_unsigned( - _self: Val, - rhs: Val, - ) -> Val { - let output: Val = bevy::math::I64Vec3::saturating_sub_unsigned( + _self: Val, + rhs: Val, + ) -> Val { + let output: Val = bevy::math::I8Vec3::saturating_sub_unsigned( _self.into_inner(), rhs.into_inner(), ) @@ -5925,10 +6181,10 @@ impl bevy::math::I64Vec3 { /// uses the element from `if_false`. fn select( mask: Val, - if_true: Val, - if_false: Val, - ) -> Val { - let output: Val = bevy::math::I64Vec3::select( + if_true: Val, + if_false: Val, + ) -> Val { + let output: Val = bevy::math::I8Vec3::select( mask.into_inner(), if_true.into_inner(), if_false.into_inner(), @@ -5940,62 +6196,62 @@ impl bevy::math::I64Vec3 { /// - `0` if the number is zero /// - `1` if the number is positive /// - `-1` if the number is negative - fn signum(_self: Val) -> Val { - let output: Val = bevy::math::I64Vec3::signum( + fn signum(_self: Val) -> Val { + let output: Val = bevy::math::I8Vec3::signum( _self.into_inner(), ) .into(); output } /// Creates a vector with all elements set to `v`. - fn splat(v: i64) -> Val { - let output: Val = bevy::math::I64Vec3::splat(v).into(); + fn splat(v: i8) -> Val { + let output: Val = bevy::math::I8Vec3::splat(v).into(); output } fn sub( - _self: Val, - rhs: Ref, - ) -> Val { - let output: Val = , + rhs: Ref, + ) -> Val { + let output: Val = >::sub(_self.into_inner(), &rhs) .into(); output } fn sub( - _self: Val, - rhs: Val, - ) -> Val { - let output: Val = , + rhs: Val, + ) -> Val { + let output: Val = >::sub(_self.into_inner(), rhs.into_inner()) .into(); output } - fn sub(_self: Val, rhs: i64) -> Val { - let output: Val = , rhs: i8) -> Val { + let output: Val = >::sub(_self.into_inner(), rhs) .into(); output } /// `[x, y, z]` - fn to_array(_self: Ref) -> [i64; 3] { - let output: [i64; 3] = bevy::math::I64Vec3::to_array(&_self).into(); + fn to_array(_self: Ref) -> [i8; 3] { + let output: [i8; 3] = bevy::math::I8Vec3::to_array(&_self).into(); output } /// Creates a 2D vector from the `x` and `y` elements of `self`, discarding `z`. /// Truncation may also be performed by using [`self.xy()`][crate::swizzles::Vec3Swizzles::xy()]. - fn truncate(_self: Val) -> Val { - let output: Val = bevy::math::I64Vec3::truncate( + fn truncate(_self: Val) -> Val { + let output: Val = bevy::math::I8Vec3::truncate( _self.into_inner(), ) .into(); output } /// Creates a 3D vector from `self` with the given value of `x`. - fn with_x(_self: Val, x: i64) -> Val { - let output: Val = bevy::math::I64Vec3::with_x( + fn with_x(_self: Val, x: i8) -> Val { + let output: Val = bevy::math::I8Vec3::with_x( _self.into_inner(), x, ) @@ -6003,8 +6259,8 @@ impl bevy::math::I64Vec3 { output } /// Creates a 3D vector from `self` with the given value of `y`. - fn with_y(_self: Val, y: i64) -> Val { - let output: Val = bevy::math::I64Vec3::with_y( + fn with_y(_self: Val, y: i8) -> Val { + let output: Val = bevy::math::I8Vec3::with_y( _self.into_inner(), y, ) @@ -6012,8 +6268,8 @@ impl bevy::math::I64Vec3 { output } /// Creates a 3D vector from `self` with the given value of `z`. - fn with_z(_self: Val, z: i64) -> Val { - let output: Val = bevy::math::I64Vec3::with_z( + fn with_z(_self: Val, z: i8) -> Val { + let output: Val = bevy::math::I8Vec3::with_z( _self.into_inner(), z, ) @@ -6023,10 +6279,10 @@ impl bevy::math::I64Vec3 { /// Returns a vector containing the wrapping addition of `self` and `rhs`. /// In other words this computes `[self.x.wrapping_add(rhs.x), self.y.wrapping_add(rhs.y), ..]`. fn wrapping_add( - _self: Val, - rhs: Val, - ) -> Val { - let output: Val = bevy::math::I64Vec3::wrapping_add( + _self: Val, + rhs: Val, + ) -> Val { + let output: Val = bevy::math::I8Vec3::wrapping_add( _self.into_inner(), rhs.into_inner(), ) @@ -6036,10 +6292,10 @@ impl bevy::math::I64Vec3 { /// Returns a vector containing the wrapping addition of `self` and unsigned vector `rhs`. /// In other words this computes `[self.x.wrapping_add_unsigned(rhs.x), self.y.wrapping_add_unsigned(rhs.y), ..]`. fn wrapping_add_unsigned( - _self: Val, - rhs: Val, - ) -> Val { - let output: Val = bevy::math::I64Vec3::wrapping_add_unsigned( + _self: Val, + rhs: Val, + ) -> Val { + let output: Val = bevy::math::I8Vec3::wrapping_add_unsigned( _self.into_inner(), rhs.into_inner(), ) @@ -6049,10 +6305,10 @@ impl bevy::math::I64Vec3 { /// Returns a vector containing the wrapping division of `self` and `rhs`. /// In other words this computes `[self.x.wrapping_div(rhs.x), self.y.wrapping_div(rhs.y), ..]`. fn wrapping_div( - _self: Val, - rhs: Val, - ) -> Val { - let output: Val = bevy::math::I64Vec3::wrapping_div( + _self: Val, + rhs: Val, + ) -> Val { + let output: Val = bevy::math::I8Vec3::wrapping_div( _self.into_inner(), rhs.into_inner(), ) @@ -6062,10 +6318,10 @@ impl bevy::math::I64Vec3 { /// Returns a vector containing the wrapping multiplication of `self` and `rhs`. /// In other words this computes `[self.x.wrapping_mul(rhs.x), self.y.wrapping_mul(rhs.y), ..]`. fn wrapping_mul( - _self: Val, - rhs: Val, - ) -> Val { - let output: Val = bevy::math::I64Vec3::wrapping_mul( + _self: Val, + rhs: Val, + ) -> Val { + let output: Val = bevy::math::I8Vec3::wrapping_mul( _self.into_inner(), rhs.into_inner(), ) @@ -6075,10 +6331,10 @@ impl bevy::math::I64Vec3 { /// Returns a vector containing the wrapping subtraction of `self` and `rhs`. /// In other words this computes `[self.x.wrapping_sub(rhs.x), self.y.wrapping_sub(rhs.y), ..]`. fn wrapping_sub( - _self: Val, - rhs: Val, - ) -> Val { - let output: Val = bevy::math::I64Vec3::wrapping_sub( + _self: Val, + rhs: Val, + ) -> Val { + let output: Val = bevy::math::I8Vec3::wrapping_sub( _self.into_inner(), rhs.into_inner(), ) @@ -6088,10 +6344,10 @@ impl bevy::math::I64Vec3 { /// Returns a vector containing the wrapping subtraction of `self` and unsigned vector `rhs`. /// In other words this computes `[self.x.wrapping_sub_unsigned(rhs.x), self.y.wrapping_sub_unsigned(rhs.y), ..]`. fn wrapping_sub_unsigned( - _self: Val, - rhs: Val, - ) -> Val { - let output: Val = bevy::math::I64Vec3::wrapping_sub_unsigned( + _self: Val, + rhs: Val, + ) -> Val { + let output: Val = bevy::math::I8Vec3::wrapping_sub_unsigned( _self.into_inner(), rhs.into_inner(), ) @@ -6101,92 +6357,111 @@ impl bevy::math::I64Vec3 { } #[script_bindings( remote, - name = "i_64_vec_4_functions", + name = "i_8_vec_4_functions", bms_core_path = "bevy_mod_scripting_core", generated )] -impl bevy::math::I64Vec4 { +impl bevy::math::I8Vec4 { /// Returns a vector containing the absolute value of each element of `self`. - fn abs(_self: Val) -> Val { - let output: Val = bevy::math::I64Vec4::abs( - _self.into_inner(), - ) + fn abs(_self: Val) -> Val { + let output: Val = bevy::math::I8Vec4::abs(_self.into_inner()) .into(); output } fn add( - _self: Val, - rhs: Ref, - ) -> Val { - let output: Val = , + rhs: Ref, + ) -> Val { + let output: Val = >::add(_self.into_inner(), &rhs) .into(); output } fn add( - _self: Val, - rhs: Val, - ) -> Val { - let output: Val = , + rhs: Val, + ) -> Val { + let output: Val = >::add(_self.into_inner(), rhs.into_inner()) .into(); output } - fn add(_self: Val, rhs: i64) -> Val { - let output: Val = , rhs: i8) -> Val { + let output: Val = >::add(_self.into_inner(), rhs) .into(); output } /// Casts all elements of `self` to `f64`. - fn as_dvec4(_self: Ref) -> Val { - let output: Val = bevy::math::I64Vec4::as_dvec4(&_self) + fn as_dvec4(_self: Ref) -> Val { + let output: Val = bevy::math::I8Vec4::as_dvec4(&_self).into(); + output + } + /// Casts all elements of `self` to `i16`. + fn as_i16vec4(_self: Ref) -> Val { + let output: Val = bevy::math::I8Vec4::as_i16vec4(&_self) + .into(); + output + } + /// Casts all elements of `self` to `i64`. + fn as_i64vec4(_self: Ref) -> Val { + let output: Val = bevy::math::I8Vec4::as_i64vec4(&_self) .into(); output } /// Casts all elements of `self` to `i32`. - fn as_ivec4(_self: Ref) -> Val { - let output: Val = bevy::math::I64Vec4::as_ivec4(&_self) + fn as_ivec4(_self: Ref) -> Val { + let output: Val = bevy::math::I8Vec4::as_ivec4(&_self).into(); + output + } + /// Casts all elements of `self` to `u16`. + fn as_u16vec4(_self: Ref) -> Val { + let output: Val = bevy::math::I8Vec4::as_u16vec4(&_self) .into(); output } /// Casts all elements of `self` to `u64`. - fn as_u64vec4(_self: Ref) -> Val { - let output: Val = bevy::math::I64Vec4::as_u64vec4(&_self) + fn as_u64vec4(_self: Ref) -> Val { + let output: Val = bevy::math::I8Vec4::as_u64vec4(&_self) .into(); output } - /// Casts all elements of `self` to `u32`. - fn as_uvec4(_self: Ref) -> Val { - let output: Val = bevy::math::I64Vec4::as_uvec4(&_self) + /// Casts all elements of `self` to `u8`. + fn as_u8vec4(_self: Ref) -> Val { + let output: Val = bevy::math::I8Vec4::as_u8vec4(&_self) .into(); output } + /// Casts all elements of `self` to `u32`. + fn as_uvec4(_self: Ref) -> Val { + let output: Val = bevy::math::I8Vec4::as_uvec4(&_self).into(); + output + } /// Casts all elements of `self` to `f32`. - fn as_vec4(_self: Ref) -> Val { - let output: Val = bevy::math::I64Vec4::as_vec4(&_self).into(); + fn as_vec4(_self: Ref) -> Val { + let output: Val = bevy::math::I8Vec4::as_vec4(&_self).into(); output } - fn assert_receiver_is_total_eq(_self: Ref) -> () { - let output: () = ::assert_receiver_is_total_eq( + fn assert_receiver_is_total_eq(_self: Ref) -> () { + let output: () = ::assert_receiver_is_total_eq( &_self, ) .into(); output } - /// Component-wise clamping of values, similar to [`i64::clamp`]. + /// Component-wise clamping of values, similar to [`i8::clamp`]. /// Each element in `min` must be less-or-equal to the corresponding element in `max`. /// # Panics /// Will panic if `min` is greater than `max` when `glam_assert` is enabled. fn clamp( - _self: Val, - min: Val, - max: Val, - ) -> Val { - let output: Val = bevy::math::I64Vec4::clamp( + _self: Val, + min: Val, + max: Val, + ) -> Val { + let output: Val = bevy::math::I8Vec4::clamp( _self.into_inner(), min.into_inner(), max.into_inner(), @@ -6194,8 +6469,8 @@ impl bevy::math::I64Vec4 { .into(); output } - fn clone(_self: Ref) -> Val { - let output: Val = ::clone( + fn clone(_self: Ref) -> Val { + let output: Val = ::clone( &_self, ) .into(); @@ -6206,10 +6481,10 @@ impl bevy::math::I64Vec4 { /// In other words, this computes `[self.x == rhs.x, self.y == rhs.y, ..]` for all /// elements. fn cmpeq( - _self: Val, - rhs: Val, + _self: Val, + rhs: Val, ) -> Val { - let output: Val = bevy::math::I64Vec4::cmpeq( + let output: Val = bevy::math::I8Vec4::cmpeq( _self.into_inner(), rhs.into_inner(), ) @@ -6221,10 +6496,10 @@ impl bevy::math::I64Vec4 { /// In other words this computes `[self.x >= rhs.x, self.y >= rhs.y, ..]` for all /// elements. fn cmpge( - _self: Val, - rhs: Val, + _self: Val, + rhs: Val, ) -> Val { - let output: Val = bevy::math::I64Vec4::cmpge( + let output: Val = bevy::math::I8Vec4::cmpge( _self.into_inner(), rhs.into_inner(), ) @@ -6236,10 +6511,10 @@ impl bevy::math::I64Vec4 { /// In other words this computes `[self.x > rhs.x, self.y > rhs.y, ..]` for all /// elements. fn cmpgt( - _self: Val, - rhs: Val, + _self: Val, + rhs: Val, ) -> Val { - let output: Val = bevy::math::I64Vec4::cmpgt( + let output: Val = bevy::math::I8Vec4::cmpgt( _self.into_inner(), rhs.into_inner(), ) @@ -6251,10 +6526,10 @@ impl bevy::math::I64Vec4 { /// In other words this computes `[self.x <= rhs.x, self.y <= rhs.y, ..]` for all /// elements. fn cmple( - _self: Val, - rhs: Val, + _self: Val, + rhs: Val, ) -> Val { - let output: Val = bevy::math::I64Vec4::cmple( + let output: Val = bevy::math::I8Vec4::cmple( _self.into_inner(), rhs.into_inner(), ) @@ -6266,10 +6541,10 @@ impl bevy::math::I64Vec4 { /// In other words this computes `[self.x < rhs.x, self.y < rhs.y, ..]` for all /// elements. fn cmplt( - _self: Val, - rhs: Val, + _self: Val, + rhs: Val, ) -> Val { - let output: Val = bevy::math::I64Vec4::cmplt( + let output: Val = bevy::math::I8Vec4::cmplt( _self.into_inner(), rhs.into_inner(), ) @@ -6281,10 +6556,10 @@ impl bevy::math::I64Vec4 { /// In other words this computes `[self.x != rhs.x, self.y != rhs.y, ..]` for all /// elements. fn cmpne( - _self: Val, - rhs: Val, + _self: Val, + rhs: Val, ) -> Val { - let output: Val = bevy::math::I64Vec4::cmpne( + let output: Val = bevy::math::I8Vec4::cmpne( _self.into_inner(), rhs.into_inner(), ) @@ -6293,10 +6568,10 @@ impl bevy::math::I64Vec4 { } /// Compute the squared euclidean distance between two points in space. fn distance_squared( - _self: Val, - rhs: Val, - ) -> i64 { - let output: i64 = bevy::math::I64Vec4::distance_squared( + _self: Val, + rhs: Val, + ) -> i8 { + let output: i8 = bevy::math::I8Vec4::distance_squared( _self.into_inner(), rhs.into_inner(), ) @@ -6304,28 +6579,28 @@ impl bevy::math::I64Vec4 { output } fn div( - _self: Val, - rhs: Ref, - ) -> Val { - let output: Val = , + rhs: Ref, + ) -> Val { + let output: Val = >::div(_self.into_inner(), &rhs) .into(); output } fn div( - _self: Val, - rhs: Val, - ) -> Val { - let output: Val = , + rhs: Val, + ) -> Val { + let output: Val = >::div(_self.into_inner(), rhs.into_inner()) .into(); output } - fn div(_self: Val, rhs: i64) -> Val { - let output: Val = , rhs: i8) -> Val { + let output: Val = >::div(_self.into_inner(), rhs) .into(); output @@ -6334,10 +6609,10 @@ impl bevy::math::I64Vec4 { /// # Panics /// This function will panic if any `rhs` element is 0 or the division results in overflow. fn div_euclid( - _self: Val, - rhs: Val, - ) -> Val { - let output: Val = bevy::math::I64Vec4::div_euclid( + _self: Val, + rhs: Val, + ) -> Val { + let output: Val = bevy::math::I8Vec4::div_euclid( _self.into_inner(), rhs.into_inner(), ) @@ -6345,17 +6620,17 @@ impl bevy::math::I64Vec4 { output } /// Computes the dot product of `self` and `rhs`. - fn dot(_self: Val, rhs: Val) -> i64 { - let output: i64 = bevy::math::I64Vec4::dot(_self.into_inner(), rhs.into_inner()) + fn dot(_self: Val, rhs: Val) -> i8 { + let output: i8 = bevy::math::I8Vec4::dot(_self.into_inner(), rhs.into_inner()) .into(); output } /// Returns a vector where every component is the dot product of `self` and `rhs`. fn dot_into_vec( - _self: Val, - rhs: Val, - ) -> Val { - let output: Val = bevy::math::I64Vec4::dot_into_vec( + _self: Val, + rhs: Val, + ) -> Val { + let output: Val = bevy::math::I8Vec4::dot_into_vec( _self.into_inner(), rhs.into_inner(), ) @@ -6364,49 +6639,48 @@ impl bevy::math::I64Vec4 { } /// Returns the product of all elements of `self`. /// In other words, this computes `self.x * self.y * ..`. - fn element_product(_self: Val) -> i64 { - let output: i64 = bevy::math::I64Vec4::element_product(_self.into_inner()) - .into(); + fn element_product(_self: Val) -> i8 { + let output: i8 = bevy::math::I8Vec4::element_product(_self.into_inner()).into(); output } /// Returns the sum of all elements of `self`. /// In other words, this computes `self.x + self.y + ..`. - fn element_sum(_self: Val) -> i64 { - let output: i64 = bevy::math::I64Vec4::element_sum(_self.into_inner()).into(); + fn element_sum(_self: Val) -> i8 { + let output: i8 = bevy::math::I8Vec4::element_sum(_self.into_inner()).into(); output } - fn eq(_self: Ref, other: Ref) -> bool { - let output: bool = , other: Ref) -> bool { + let output: bool = >::eq(&_self, &other) .into(); output } /// Creates a new vector from an array. - fn from_array(a: [i64; 4]) -> Val { - let output: Val = bevy::math::I64Vec4::from_array(a).into(); + fn from_array(a: [i8; 4]) -> Val { + let output: Val = bevy::math::I8Vec4::from_array(a).into(); output } /// Returns a bitmask with the lowest 4 bits set to the sign bits from the elements of `self`. /// A negative element results in a `1` bit and a positive element in a `0` bit. Element `x` goes /// into the first lowest bit, element `y` into the second, etc. - fn is_negative_bitmask(_self: Val) -> u32 { - let output: u32 = bevy::math::I64Vec4::is_negative_bitmask(_self.into_inner()) + fn is_negative_bitmask(_self: Val) -> u32 { + let output: u32 = bevy::math::I8Vec4::is_negative_bitmask(_self.into_inner()) .into(); output } /// Computes the squared length of `self`. - fn length_squared(_self: Val) -> i64 { - let output: i64 = bevy::math::I64Vec4::length_squared(_self.into_inner()).into(); + fn length_squared(_self: Val) -> i8 { + let output: i8 = bevy::math::I8Vec4::length_squared(_self.into_inner()).into(); output } /// Returns a vector containing the maximum values for each element of `self` and `rhs`. /// In other words this computes `[self.x.max(rhs.x), self.y.max(rhs.y), ..]`. fn max( - _self: Val, - rhs: Val, - ) -> Val { - let output: Val = bevy::math::I64Vec4::max( + _self: Val, + rhs: Val, + ) -> Val { + let output: Val = bevy::math::I8Vec4::max( _self.into_inner(), rhs.into_inner(), ) @@ -6415,17 +6689,17 @@ impl bevy::math::I64Vec4 { } /// Returns the horizontal maximum of `self`. /// In other words this computes `max(x, y, ..)`. - fn max_element(_self: Val) -> i64 { - let output: i64 = bevy::math::I64Vec4::max_element(_self.into_inner()).into(); + fn max_element(_self: Val) -> i8 { + let output: i8 = bevy::math::I8Vec4::max_element(_self.into_inner()).into(); output } /// Returns a vector containing the minimum values for each element of `self` and `rhs`. /// In other words this computes `[self.x.min(rhs.x), self.y.min(rhs.y), ..]`. fn min( - _self: Val, - rhs: Val, - ) -> Val { - let output: Val = bevy::math::I64Vec4::min( + _self: Val, + rhs: Val, + ) -> Val { + let output: Val = bevy::math::I8Vec4::min( _self.into_inner(), rhs.into_inner(), ) @@ -6434,73 +6708,72 @@ impl bevy::math::I64Vec4 { } /// Returns the horizontal minimum of `self`. /// In other words this computes `min(x, y, ..)`. - fn min_element(_self: Val) -> i64 { - let output: i64 = bevy::math::I64Vec4::min_element(_self.into_inner()).into(); + fn min_element(_self: Val) -> i8 { + let output: i8 = bevy::math::I8Vec4::min_element(_self.into_inner()).into(); output } fn mul( - _self: Val, - rhs: Ref, - ) -> Val { - let output: Val = , + rhs: Ref, + ) -> Val { + let output: Val = >::mul(_self.into_inner(), &rhs) .into(); output } fn mul( - _self: Val, - rhs: Val, - ) -> Val { - let output: Val = , + rhs: Val, + ) -> Val { + let output: Val = >::mul(_self.into_inner(), rhs.into_inner()) .into(); output } - fn mul(_self: Val, rhs: i64) -> Val { - let output: Val = , rhs: i8) -> Val { + let output: Val = >::mul(_self.into_inner(), rhs) .into(); output } - fn neg(_self: Val) -> Val { - let output: Val = ::neg( + fn neg(_self: Val) -> Val { + let output: Val = ::neg( _self.into_inner(), ) .into(); output } /// Creates a new vector. - fn new(x: i64, y: i64, z: i64, w: i64) -> Val { - let output: Val = bevy::math::I64Vec4::new(x, y, z, w) - .into(); + fn new(x: i8, y: i8, z: i8, w: i8) -> Val { + let output: Val = bevy::math::I8Vec4::new(x, y, z, w).into(); output } fn rem( - _self: Val, - rhs: Ref, - ) -> Val { - let output: Val = , + rhs: Ref, + ) -> Val { + let output: Val = >::rem(_self.into_inner(), &rhs) .into(); output } fn rem( - _self: Val, - rhs: Val, - ) -> Val { - let output: Val = , + rhs: Val, + ) -> Val { + let output: Val = >::rem(_self.into_inner(), rhs.into_inner()) .into(); output } - fn rem(_self: Val, rhs: i64) -> Val { - let output: Val = , rhs: i8) -> Val { + let output: Val = >::rem(_self.into_inner(), rhs) .into(); output @@ -6508,12 +6781,12 @@ impl bevy::math::I64Vec4 { /// Returns the element-wise remainder of [Euclidean division] of `self` by `rhs`. /// # Panics /// This function will panic if any `rhs` element is 0 or the division results in overflow. - /// [Euclidean division]: i64::rem_euclid + /// [Euclidean division]: i8::rem_euclid fn rem_euclid( - _self: Val, - rhs: Val, - ) -> Val { - let output: Val = bevy::math::I64Vec4::rem_euclid( + _self: Val, + rhs: Val, + ) -> Val { + let output: Val = bevy::math::I8Vec4::rem_euclid( _self.into_inner(), rhs.into_inner(), ) @@ -6523,10 +6796,10 @@ impl bevy::math::I64Vec4 { /// Returns a vector containing the saturating addition of `self` and `rhs`. /// In other words this computes `[self.x.saturating_add(rhs.x), self.y.saturating_add(rhs.y), ..]`. fn saturating_add( - _self: Val, - rhs: Val, - ) -> Val { - let output: Val = bevy::math::I64Vec4::saturating_add( + _self: Val, + rhs: Val, + ) -> Val { + let output: Val = bevy::math::I8Vec4::saturating_add( _self.into_inner(), rhs.into_inner(), ) @@ -6535,10 +6808,10 @@ impl bevy::math::I64Vec4 { } /// In other words this computes `[self.x.saturating_add_unsigned(rhs.x), self.y.saturating_add_unsigned(rhs.y), ..]`. fn saturating_add_unsigned( - _self: Val, - rhs: Val, - ) -> Val { - let output: Val = bevy::math::I64Vec4::saturating_add_unsigned( + _self: Val, + rhs: Val, + ) -> Val { + let output: Val = bevy::math::I8Vec4::saturating_add_unsigned( _self.into_inner(), rhs.into_inner(), ) @@ -6548,10 +6821,10 @@ impl bevy::math::I64Vec4 { /// Returns a vector containing the saturating division of `self` and `rhs`. /// In other words this computes `[self.x.saturating_div(rhs.x), self.y.saturating_div(rhs.y), ..]`. fn saturating_div( - _self: Val, - rhs: Val, - ) -> Val { - let output: Val = bevy::math::I64Vec4::saturating_div( + _self: Val, + rhs: Val, + ) -> Val { + let output: Val = bevy::math::I8Vec4::saturating_div( _self.into_inner(), rhs.into_inner(), ) @@ -6561,10 +6834,10 @@ impl bevy::math::I64Vec4 { /// Returns a vector containing the saturating multiplication of `self` and `rhs`. /// In other words this computes `[self.x.saturating_mul(rhs.x), self.y.saturating_mul(rhs.y), ..]`. fn saturating_mul( - _self: Val, - rhs: Val, - ) -> Val { - let output: Val = bevy::math::I64Vec4::saturating_mul( + _self: Val, + rhs: Val, + ) -> Val { + let output: Val = bevy::math::I8Vec4::saturating_mul( _self.into_inner(), rhs.into_inner(), ) @@ -6574,10 +6847,10 @@ impl bevy::math::I64Vec4 { /// Returns a vector containing the saturating subtraction of `self` and `rhs`. /// In other words this computes `[self.x.saturating_sub(rhs.x), self.y.saturating_sub(rhs.y), ..]`. fn saturating_sub( - _self: Val, - rhs: Val, - ) -> Val { - let output: Val = bevy::math::I64Vec4::saturating_sub( + _self: Val, + rhs: Val, + ) -> Val { + let output: Val = bevy::math::I8Vec4::saturating_sub( _self.into_inner(), rhs.into_inner(), ) @@ -6587,10 +6860,10 @@ impl bevy::math::I64Vec4 { /// Returns a vector containing the saturating subtraction of `self` and unsigned vector `rhs`. /// In other words this computes `[self.x.saturating_sub_unsigned(rhs.x), self.y.saturating_sub_unsigned(rhs.y), ..]`. fn saturating_sub_unsigned( - _self: Val, - rhs: Val, - ) -> Val { - let output: Val = bevy::math::I64Vec4::saturating_sub_unsigned( + _self: Val, + rhs: Val, + ) -> Val { + let output: Val = bevy::math::I8Vec4::saturating_sub_unsigned( _self.into_inner(), rhs.into_inner(), ) @@ -6603,10 +6876,10 @@ impl bevy::math::I64Vec4 { /// uses the element from `if_false`. fn select( mask: Val, - if_true: Val, - if_false: Val, - ) -> Val { - let output: Val = bevy::math::I64Vec4::select( + if_true: Val, + if_false: Val, + ) -> Val { + let output: Val = bevy::math::I8Vec4::select( mask.into_inner(), if_true.into_inner(), if_false.into_inner(), @@ -6618,62 +6891,62 @@ impl bevy::math::I64Vec4 { /// - `0` if the number is zero /// - `1` if the number is positive /// - `-1` if the number is negative - fn signum(_self: Val) -> Val { - let output: Val = bevy::math::I64Vec4::signum( + fn signum(_self: Val) -> Val { + let output: Val = bevy::math::I8Vec4::signum( _self.into_inner(), ) .into(); output } /// Creates a vector with all elements set to `v`. - fn splat(v: i64) -> Val { - let output: Val = bevy::math::I64Vec4::splat(v).into(); + fn splat(v: i8) -> Val { + let output: Val = bevy::math::I8Vec4::splat(v).into(); output } fn sub( - _self: Val, - rhs: Ref, - ) -> Val { - let output: Val = , + rhs: Ref, + ) -> Val { + let output: Val = >::sub(_self.into_inner(), &rhs) .into(); output } fn sub( - _self: Val, - rhs: Val, - ) -> Val { - let output: Val = , + rhs: Val, + ) -> Val { + let output: Val = >::sub(_self.into_inner(), rhs.into_inner()) .into(); output } - fn sub(_self: Val, rhs: i64) -> Val { - let output: Val = , rhs: i8) -> Val { + let output: Val = >::sub(_self.into_inner(), rhs) .into(); output } /// `[x, y, z, w]` - fn to_array(_self: Ref) -> [i64; 4] { - let output: [i64; 4] = bevy::math::I64Vec4::to_array(&_self).into(); + fn to_array(_self: Ref) -> [i8; 4] { + let output: [i8; 4] = bevy::math::I8Vec4::to_array(&_self).into(); output } /// Creates a 3D vector from the `x`, `y` and `z` elements of `self`, discarding `w`. - /// Truncation to [`I64Vec3`] may also be performed by using [`self.xyz()`][crate::swizzles::Vec4Swizzles::xyz()]. - fn truncate(_self: Val) -> Val { - let output: Val = bevy::math::I64Vec4::truncate( + /// Truncation to [`I8Vec3`] may also be performed by using [`self.xyz()`][crate::swizzles::Vec4Swizzles::xyz()]. + fn truncate(_self: Val) -> Val { + let output: Val = bevy::math::I8Vec4::truncate( _self.into_inner(), ) .into(); output } /// Creates a 4D vector from `self` with the given value of `w`. - fn with_w(_self: Val, w: i64) -> Val { - let output: Val = bevy::math::I64Vec4::with_w( + fn with_w(_self: Val, w: i8) -> Val { + let output: Val = bevy::math::I8Vec4::with_w( _self.into_inner(), w, ) @@ -6681,8 +6954,8 @@ impl bevy::math::I64Vec4 { output } /// Creates a 4D vector from `self` with the given value of `x`. - fn with_x(_self: Val, x: i64) -> Val { - let output: Val = bevy::math::I64Vec4::with_x( + fn with_x(_self: Val, x: i8) -> Val { + let output: Val = bevy::math::I8Vec4::with_x( _self.into_inner(), x, ) @@ -6690,8 +6963,8 @@ impl bevy::math::I64Vec4 { output } /// Creates a 4D vector from `self` with the given value of `y`. - fn with_y(_self: Val, y: i64) -> Val { - let output: Val = bevy::math::I64Vec4::with_y( + fn with_y(_self: Val, y: i8) -> Val { + let output: Val = bevy::math::I8Vec4::with_y( _self.into_inner(), y, ) @@ -6699,8 +6972,8 @@ impl bevy::math::I64Vec4 { output } /// Creates a 4D vector from `self` with the given value of `z`. - fn with_z(_self: Val, z: i64) -> Val { - let output: Val = bevy::math::I64Vec4::with_z( + fn with_z(_self: Val, z: i8) -> Val { + let output: Val = bevy::math::I8Vec4::with_z( _self.into_inner(), z, ) @@ -6710,10 +6983,10 @@ impl bevy::math::I64Vec4 { /// Returns a vector containing the wrapping addition of `self` and `rhs`. /// In other words this computes `[self.x.wrapping_add(rhs.x), self.y.wrapping_add(rhs.y), ..]`. fn wrapping_add( - _self: Val, - rhs: Val, - ) -> Val { - let output: Val = bevy::math::I64Vec4::wrapping_add( + _self: Val, + rhs: Val, + ) -> Val { + let output: Val = bevy::math::I8Vec4::wrapping_add( _self.into_inner(), rhs.into_inner(), ) @@ -6723,7 +6996,4333 @@ impl bevy::math::I64Vec4 { /// Returns a vector containing the wrapping addition of `self` and unsigned vector `rhs`. /// In other words this computes `[self.x.wrapping_add_unsigned(rhs.x), self.y.wrapping_add_unsigned(rhs.y), ..]`. fn wrapping_add_unsigned( - _self: Val, + _self: Val, + rhs: Val, + ) -> Val { + let output: Val = bevy::math::I8Vec4::wrapping_add_unsigned( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Returns a vector containing the wrapping division of `self` and `rhs`. + /// In other words this computes `[self.x.wrapping_div(rhs.x), self.y.wrapping_div(rhs.y), ..]`. + fn wrapping_div( + _self: Val, + rhs: Val, + ) -> Val { + let output: Val = bevy::math::I8Vec4::wrapping_div( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Returns a vector containing the wrapping multiplication of `self` and `rhs`. + /// In other words this computes `[self.x.wrapping_mul(rhs.x), self.y.wrapping_mul(rhs.y), ..]`. + fn wrapping_mul( + _self: Val, + rhs: Val, + ) -> Val { + let output: Val = bevy::math::I8Vec4::wrapping_mul( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Returns a vector containing the wrapping subtraction of `self` and `rhs`. + /// In other words this computes `[self.x.wrapping_sub(rhs.x), self.y.wrapping_sub(rhs.y), ..]`. + fn wrapping_sub( + _self: Val, + rhs: Val, + ) -> Val { + let output: Val = bevy::math::I8Vec4::wrapping_sub( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Returns a vector containing the wrapping subtraction of `self` and unsigned vector `rhs`. + /// In other words this computes `[self.x.wrapping_sub_unsigned(rhs.x), self.y.wrapping_sub_unsigned(rhs.y), ..]`. + fn wrapping_sub_unsigned( + _self: Val, + rhs: Val, + ) -> Val { + let output: Val = bevy::math::I8Vec4::wrapping_sub_unsigned( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } +} +#[script_bindings( + remote, + name = "i_16_vec_2_functions", + bms_core_path = "bevy_mod_scripting_core", + generated +)] +impl bevy::math::I16Vec2 { + /// Returns a vector containing the absolute value of each element of `self`. + fn abs(_self: Val) -> Val { + let output: Val = bevy::math::I16Vec2::abs( + _self.into_inner(), + ) + .into(); + output + } + fn add( + _self: Val, + rhs: Ref, + ) -> Val { + let output: Val = >::add(_self.into_inner(), &rhs) + .into(); + output + } + fn add( + _self: Val, + rhs: Val, + ) -> Val { + let output: Val = >::add(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + fn add(_self: Val, rhs: i16) -> Val { + let output: Val = >::add(_self.into_inner(), rhs) + .into(); + output + } + /// Casts all elements of `self` to `f64`. + fn as_dvec2(_self: Ref) -> Val { + let output: Val = bevy::math::I16Vec2::as_dvec2(&_self) + .into(); + output + } + /// Casts all elements of `self` to `i64`. + fn as_i64vec2(_self: Ref) -> Val { + let output: Val = bevy::math::I16Vec2::as_i64vec2(&_self) + .into(); + output + } + /// Casts all elements of `self` to `i8`. + fn as_i8vec2(_self: Ref) -> Val { + let output: Val = bevy::math::I16Vec2::as_i8vec2(&_self) + .into(); + output + } + /// Casts all elements of `self` to `i32`. + fn as_ivec2(_self: Ref) -> Val { + let output: Val = bevy::math::I16Vec2::as_ivec2(&_self) + .into(); + output + } + /// Casts all elements of `self` to `u16`. + fn as_u16vec2(_self: Ref) -> Val { + let output: Val = bevy::math::I16Vec2::as_u16vec2(&_self) + .into(); + output + } + /// Casts all elements of `self` to `u64`. + fn as_u64vec2(_self: Ref) -> Val { + let output: Val = bevy::math::I16Vec2::as_u64vec2(&_self) + .into(); + output + } + /// Casts all elements of `self` to `u8`. + fn as_u8vec2(_self: Ref) -> Val { + let output: Val = bevy::math::I16Vec2::as_u8vec2(&_self) + .into(); + output + } + /// Casts all elements of `self` to `u32`. + fn as_uvec2(_self: Ref) -> Val { + let output: Val = bevy::math::I16Vec2::as_uvec2(&_self) + .into(); + output + } + /// Casts all elements of `self` to `f32`. + fn as_vec2(_self: Ref) -> Val { + let output: Val = bevy::math::I16Vec2::as_vec2(&_self).into(); + output + } + fn assert_receiver_is_total_eq(_self: Ref) -> () { + let output: () = ::assert_receiver_is_total_eq( + &_self, + ) + .into(); + output + } + /// Component-wise clamping of values, similar to [`i16::clamp`]. + /// Each element in `min` must be less-or-equal to the corresponding element in `max`. + /// # Panics + /// Will panic if `min` is greater than `max` when `glam_assert` is enabled. + fn clamp( + _self: Val, + min: Val, + max: Val, + ) -> Val { + let output: Val = bevy::math::I16Vec2::clamp( + _self.into_inner(), + min.into_inner(), + max.into_inner(), + ) + .into(); + output + } + fn clone(_self: Ref) -> Val { + let output: Val = ::clone( + &_self, + ) + .into(); + output + } + /// Returns a vector mask containing the result of a `==` comparison for each element of + /// `self` and `rhs`. + /// In other words, this computes `[self.x == rhs.x, self.y == rhs.y, ..]` for all + /// elements. + fn cmpeq( + _self: Val, + rhs: Val, + ) -> Val { + let output: Val = bevy::math::I16Vec2::cmpeq( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Returns a vector mask containing the result of a `>=` comparison for each element of + /// `self` and `rhs`. + /// In other words this computes `[self.x >= rhs.x, self.y >= rhs.y, ..]` for all + /// elements. + fn cmpge( + _self: Val, + rhs: Val, + ) -> Val { + let output: Val = bevy::math::I16Vec2::cmpge( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Returns a vector mask containing the result of a `>` comparison for each element of + /// `self` and `rhs`. + /// In other words this computes `[self.x > rhs.x, self.y > rhs.y, ..]` for all + /// elements. + fn cmpgt( + _self: Val, + rhs: Val, + ) -> Val { + let output: Val = bevy::math::I16Vec2::cmpgt( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Returns a vector mask containing the result of a `<=` comparison for each element of + /// `self` and `rhs`. + /// In other words this computes `[self.x <= rhs.x, self.y <= rhs.y, ..]` for all + /// elements. + fn cmple( + _self: Val, + rhs: Val, + ) -> Val { + let output: Val = bevy::math::I16Vec2::cmple( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Returns a vector mask containing the result of a `<` comparison for each element of + /// `self` and `rhs`. + /// In other words this computes `[self.x < rhs.x, self.y < rhs.y, ..]` for all + /// elements. + fn cmplt( + _self: Val, + rhs: Val, + ) -> Val { + let output: Val = bevy::math::I16Vec2::cmplt( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Returns a vector mask containing the result of a `!=` comparison for each element of + /// `self` and `rhs`. + /// In other words this computes `[self.x != rhs.x, self.y != rhs.y, ..]` for all + /// elements. + fn cmpne( + _self: Val, + rhs: Val, + ) -> Val { + let output: Val = bevy::math::I16Vec2::cmpne( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Compute the squared euclidean distance between two points in space. + fn distance_squared( + _self: Val, + rhs: Val, + ) -> i16 { + let output: i16 = bevy::math::I16Vec2::distance_squared( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + fn div( + _self: Val, + rhs: Ref, + ) -> Val { + let output: Val = >::div(_self.into_inner(), &rhs) + .into(); + output + } + fn div( + _self: Val, + rhs: Val, + ) -> Val { + let output: Val = >::div(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + fn div(_self: Val, rhs: i16) -> Val { + let output: Val = >::div(_self.into_inner(), rhs) + .into(); + output + } + /// Returns the element-wise quotient of [Euclidean division] of `self` by `rhs`. + /// # Panics + /// This function will panic if any `rhs` element is 0 or the division results in overflow. + fn div_euclid( + _self: Val, + rhs: Val, + ) -> Val { + let output: Val = bevy::math::I16Vec2::div_euclid( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Computes the dot product of `self` and `rhs`. + fn dot(_self: Val, rhs: Val) -> i16 { + let output: i16 = bevy::math::I16Vec2::dot(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + /// Returns a vector where every component is the dot product of `self` and `rhs`. + fn dot_into_vec( + _self: Val, + rhs: Val, + ) -> Val { + let output: Val = bevy::math::I16Vec2::dot_into_vec( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Returns the product of all elements of `self`. + /// In other words, this computes `self.x * self.y * ..`. + fn element_product(_self: Val) -> i16 { + let output: i16 = bevy::math::I16Vec2::element_product(_self.into_inner()) + .into(); + output + } + /// Returns the sum of all elements of `self`. + /// In other words, this computes `self.x + self.y + ..`. + fn element_sum(_self: Val) -> i16 { + let output: i16 = bevy::math::I16Vec2::element_sum(_self.into_inner()).into(); + output + } + fn eq(_self: Ref, other: Ref) -> bool { + let output: bool = >::eq(&_self, &other) + .into(); + output + } + /// Creates a 3D vector from `self` and the given `z` value. + fn extend(_self: Val, z: i16) -> Val { + let output: Val = bevy::math::I16Vec2::extend( + _self.into_inner(), + z, + ) + .into(); + output + } + /// Creates a new vector from an array. + fn from_array(a: [i16; 2]) -> Val { + let output: Val = bevy::math::I16Vec2::from_array(a).into(); + output + } + /// Returns a bitmask with the lowest 2 bits set to the sign bits from the elements of `self`. + /// A negative element results in a `1` bit and a positive element in a `0` bit. Element `x` goes + /// into the first lowest bit, element `y` into the second, etc. + fn is_negative_bitmask(_self: Val) -> u32 { + let output: u32 = bevy::math::I16Vec2::is_negative_bitmask(_self.into_inner()) + .into(); + output + } + /// Computes the squared length of `self`. + fn length_squared(_self: Val) -> i16 { + let output: i16 = bevy::math::I16Vec2::length_squared(_self.into_inner()).into(); + output + } + /// Returns a vector containing the maximum values for each element of `self` and `rhs`. + /// In other words this computes `[self.x.max(rhs.x), self.y.max(rhs.y), ..]`. + fn max( + _self: Val, + rhs: Val, + ) -> Val { + let output: Val = bevy::math::I16Vec2::max( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Returns the horizontal maximum of `self`. + /// In other words this computes `max(x, y, ..)`. + fn max_element(_self: Val) -> i16 { + let output: i16 = bevy::math::I16Vec2::max_element(_self.into_inner()).into(); + output + } + /// Returns a vector containing the minimum values for each element of `self` and `rhs`. + /// In other words this computes `[self.x.min(rhs.x), self.y.min(rhs.y), ..]`. + fn min( + _self: Val, + rhs: Val, + ) -> Val { + let output: Val = bevy::math::I16Vec2::min( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Returns the horizontal minimum of `self`. + /// In other words this computes `min(x, y, ..)`. + fn min_element(_self: Val) -> i16 { + let output: i16 = bevy::math::I16Vec2::min_element(_self.into_inner()).into(); + output + } + fn mul( + _self: Val, + rhs: Ref, + ) -> Val { + let output: Val = >::mul(_self.into_inner(), &rhs) + .into(); + output + } + fn mul( + _self: Val, + rhs: Val, + ) -> Val { + let output: Val = >::mul(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + fn mul(_self: Val, rhs: i16) -> Val { + let output: Val = >::mul(_self.into_inner(), rhs) + .into(); + output + } + fn neg(_self: Val) -> Val { + let output: Val = ::neg( + _self.into_inner(), + ) + .into(); + output + } + /// Creates a new vector. + fn new(x: i16, y: i16) -> Val { + let output: Val = bevy::math::I16Vec2::new(x, y).into(); + output + } + /// Returns a vector that is equal to `self` rotated by 90 degrees. + fn perp(_self: Val) -> Val { + let output: Val = bevy::math::I16Vec2::perp( + _self.into_inner(), + ) + .into(); + output + } + /// The perpendicular dot product of `self` and `rhs`. + /// Also known as the wedge product, 2D cross product, and determinant. + fn perp_dot(_self: Val, rhs: Val) -> i16 { + let output: i16 = bevy::math::I16Vec2::perp_dot( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + fn rem( + _self: Val, + rhs: Ref, + ) -> Val { + let output: Val = >::rem(_self.into_inner(), &rhs) + .into(); + output + } + fn rem( + _self: Val, + rhs: Val, + ) -> Val { + let output: Val = >::rem(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + fn rem(_self: Val, rhs: i16) -> Val { + let output: Val = >::rem(_self.into_inner(), rhs) + .into(); + output + } + /// Returns the element-wise remainder of [Euclidean division] of `self` by `rhs`. + /// # Panics + /// This function will panic if any `rhs` element is 0 or the division results in overflow. + /// [Euclidean division]: i16::rem_euclid + fn rem_euclid( + _self: Val, + rhs: Val, + ) -> Val { + let output: Val = bevy::math::I16Vec2::rem_euclid( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Returns `rhs` rotated by the angle of `self`. If `self` is normalized, + /// then this just rotation. This is what you usually want. Otherwise, + /// it will be like a rotation with a multiplication by `self`'s length. + fn rotate( + _self: Val, + rhs: Val, + ) -> Val { + let output: Val = bevy::math::I16Vec2::rotate( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Returns a vector containing the saturating addition of `self` and `rhs`. + /// In other words this computes `[self.x.saturating_add(rhs.x), self.y.saturating_add(rhs.y), ..]`. + fn saturating_add( + _self: Val, + rhs: Val, + ) -> Val { + let output: Val = bevy::math::I16Vec2::saturating_add( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// In other words this computes `[self.x.saturating_add_unsigned(rhs.x), self.y.saturating_add_unsigned(rhs.y), ..]`. + fn saturating_add_unsigned( + _self: Val, + rhs: Val, + ) -> Val { + let output: Val = bevy::math::I16Vec2::saturating_add_unsigned( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Returns a vector containing the saturating division of `self` and `rhs`. + /// In other words this computes `[self.x.saturating_div(rhs.x), self.y.saturating_div(rhs.y), ..]`. + fn saturating_div( + _self: Val, + rhs: Val, + ) -> Val { + let output: Val = bevy::math::I16Vec2::saturating_div( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Returns a vector containing the saturating multiplication of `self` and `rhs`. + /// In other words this computes `[self.x.saturating_mul(rhs.x), self.y.saturating_mul(rhs.y), ..]`. + fn saturating_mul( + _self: Val, + rhs: Val, + ) -> Val { + let output: Val = bevy::math::I16Vec2::saturating_mul( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Returns a vector containing the saturating subtraction of `self` and `rhs`. + /// In other words this computes `[self.x.saturating_sub(rhs.x), self.y.saturating_sub(rhs.y), ..]`. + fn saturating_sub( + _self: Val, + rhs: Val, + ) -> Val { + let output: Val = bevy::math::I16Vec2::saturating_sub( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Returns a vector containing the saturating subtraction of `self` and unsigned vector `rhs`. + /// In other words this computes `[self.x.saturating_sub_unsigned(rhs.x), self.y.saturating_sub_unsigned(rhs.y), ..]`. + fn saturating_sub_unsigned( + _self: Val, + rhs: Val, + ) -> Val { + let output: Val = bevy::math::I16Vec2::saturating_sub_unsigned( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Creates a vector from the elements in `if_true` and `if_false`, selecting which to use + /// for each element of `self`. + /// A true element in the mask uses the corresponding element from `if_true`, and false + /// uses the element from `if_false`. + fn select( + mask: Val, + if_true: Val, + if_false: Val, + ) -> Val { + let output: Val = bevy::math::I16Vec2::select( + mask.into_inner(), + if_true.into_inner(), + if_false.into_inner(), + ) + .into(); + output + } + /// Returns a vector with elements representing the sign of `self`. + /// - `0` if the number is zero + /// - `1` if the number is positive + /// - `-1` if the number is negative + fn signum(_self: Val) -> Val { + let output: Val = bevy::math::I16Vec2::signum( + _self.into_inner(), + ) + .into(); + output + } + /// Creates a vector with all elements set to `v`. + fn splat(v: i16) -> Val { + let output: Val = bevy::math::I16Vec2::splat(v).into(); + output + } + fn sub( + _self: Val, + rhs: Ref, + ) -> Val { + let output: Val = >::sub(_self.into_inner(), &rhs) + .into(); + output + } + fn sub( + _self: Val, + rhs: Val, + ) -> Val { + let output: Val = >::sub(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + fn sub(_self: Val, rhs: i16) -> Val { + let output: Val = >::sub(_self.into_inner(), rhs) + .into(); + output + } + /// `[x, y]` + fn to_array(_self: Ref) -> [i16; 2] { + let output: [i16; 2] = bevy::math::I16Vec2::to_array(&_self).into(); + output + } + /// Creates a 2D vector from `self` with the given value of `x`. + fn with_x(_self: Val, x: i16) -> Val { + let output: Val = bevy::math::I16Vec2::with_x( + _self.into_inner(), + x, + ) + .into(); + output + } + /// Creates a 2D vector from `self` with the given value of `y`. + fn with_y(_self: Val, y: i16) -> Val { + let output: Val = bevy::math::I16Vec2::with_y( + _self.into_inner(), + y, + ) + .into(); + output + } + /// Returns a vector containing the wrapping addition of `self` and `rhs`. + /// In other words this computes `[self.x.wrapping_add(rhs.x), self.y.wrapping_add(rhs.y), ..]`. + fn wrapping_add( + _self: Val, + rhs: Val, + ) -> Val { + let output: Val = bevy::math::I16Vec2::wrapping_add( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Returns a vector containing the wrapping addition of `self` and unsigned vector `rhs`. + /// In other words this computes `[self.x.wrapping_add_unsigned(rhs.x), self.y.wrapping_add_unsigned(rhs.y), ..]`. + fn wrapping_add_unsigned( + _self: Val, + rhs: Val, + ) -> Val { + let output: Val = bevy::math::I16Vec2::wrapping_add_unsigned( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Returns a vector containing the wrapping division of `self` and `rhs`. + /// In other words this computes `[self.x.wrapping_div(rhs.x), self.y.wrapping_div(rhs.y), ..]`. + fn wrapping_div( + _self: Val, + rhs: Val, + ) -> Val { + let output: Val = bevy::math::I16Vec2::wrapping_div( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Returns a vector containing the wrapping multiplication of `self` and `rhs`. + /// In other words this computes `[self.x.wrapping_mul(rhs.x), self.y.wrapping_mul(rhs.y), ..]`. + fn wrapping_mul( + _self: Val, + rhs: Val, + ) -> Val { + let output: Val = bevy::math::I16Vec2::wrapping_mul( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Returns a vector containing the wrapping subtraction of `self` and `rhs`. + /// In other words this computes `[self.x.wrapping_sub(rhs.x), self.y.wrapping_sub(rhs.y), ..]`. + fn wrapping_sub( + _self: Val, + rhs: Val, + ) -> Val { + let output: Val = bevy::math::I16Vec2::wrapping_sub( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Returns a vector containing the wrapping subtraction of `self` and unsigned vector `rhs`. + /// In other words this computes `[self.x.wrapping_sub_unsigned(rhs.x), self.y.wrapping_sub_unsigned(rhs.y), ..]`. + fn wrapping_sub_unsigned( + _self: Val, + rhs: Val, + ) -> Val { + let output: Val = bevy::math::I16Vec2::wrapping_sub_unsigned( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } +} +#[script_bindings( + remote, + name = "i_16_vec_3_functions", + bms_core_path = "bevy_mod_scripting_core", + generated +)] +impl bevy::math::I16Vec3 { + /// Returns a vector containing the absolute value of each element of `self`. + fn abs(_self: Val) -> Val { + let output: Val = bevy::math::I16Vec3::abs( + _self.into_inner(), + ) + .into(); + output + } + fn add( + _self: Val, + rhs: Ref, + ) -> Val { + let output: Val = >::add(_self.into_inner(), &rhs) + .into(); + output + } + fn add( + _self: Val, + rhs: Val, + ) -> Val { + let output: Val = >::add(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + fn add(_self: Val, rhs: i16) -> Val { + let output: Val = >::add(_self.into_inner(), rhs) + .into(); + output + } + /// Casts all elements of `self` to `f64`. + fn as_dvec3(_self: Ref) -> Val { + let output: Val = bevy::math::I16Vec3::as_dvec3(&_self) + .into(); + output + } + /// Casts all elements of `self` to `i64`. + fn as_i64vec3(_self: Ref) -> Val { + let output: Val = bevy::math::I16Vec3::as_i64vec3(&_self) + .into(); + output + } + /// Casts all elements of `self` to `i8`. + fn as_i8vec3(_self: Ref) -> Val { + let output: Val = bevy::math::I16Vec3::as_i8vec3(&_self) + .into(); + output + } + /// Casts all elements of `self` to `i32`. + fn as_ivec3(_self: Ref) -> Val { + let output: Val = bevy::math::I16Vec3::as_ivec3(&_self) + .into(); + output + } + /// Casts all elements of `self` to `u16`. + fn as_u16vec3(_self: Ref) -> Val { + let output: Val = bevy::math::I16Vec3::as_u16vec3(&_self) + .into(); + output + } + /// Casts all elements of `self` to `u64`. + fn as_u64vec3(_self: Ref) -> Val { + let output: Val = bevy::math::I16Vec3::as_u64vec3(&_self) + .into(); + output + } + /// Casts all elements of `self` to `u8`. + fn as_u8vec3(_self: Ref) -> Val { + let output: Val = bevy::math::I16Vec3::as_u8vec3(&_self) + .into(); + output + } + /// Casts all elements of `self` to `u32`. + fn as_uvec3(_self: Ref) -> Val { + let output: Val = bevy::math::I16Vec3::as_uvec3(&_self) + .into(); + output + } + /// Casts all elements of `self` to `f32`. + fn as_vec3(_self: Ref) -> Val { + let output: Val = bevy::math::I16Vec3::as_vec3(&_self).into(); + output + } + /// Casts all elements of `self` to `f32`. + fn as_vec3a(_self: Ref) -> Val { + let output: Val = bevy::math::I16Vec3::as_vec3a(&_self) + .into(); + output + } + fn assert_receiver_is_total_eq(_self: Ref) -> () { + let output: () = ::assert_receiver_is_total_eq( + &_self, + ) + .into(); + output + } + /// Component-wise clamping of values, similar to [`i16::clamp`]. + /// Each element in `min` must be less-or-equal to the corresponding element in `max`. + /// # Panics + /// Will panic if `min` is greater than `max` when `glam_assert` is enabled. + fn clamp( + _self: Val, + min: Val, + max: Val, + ) -> Val { + let output: Val = bevy::math::I16Vec3::clamp( + _self.into_inner(), + min.into_inner(), + max.into_inner(), + ) + .into(); + output + } + fn clone(_self: Ref) -> Val { + let output: Val = ::clone( + &_self, + ) + .into(); + output + } + /// Returns a vector mask containing the result of a `==` comparison for each element of + /// `self` and `rhs`. + /// In other words, this computes `[self.x == rhs.x, self.y == rhs.y, ..]` for all + /// elements. + fn cmpeq( + _self: Val, + rhs: Val, + ) -> Val { + let output: Val = bevy::math::I16Vec3::cmpeq( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Returns a vector mask containing the result of a `>=` comparison for each element of + /// `self` and `rhs`. + /// In other words this computes `[self.x >= rhs.x, self.y >= rhs.y, ..]` for all + /// elements. + fn cmpge( + _self: Val, + rhs: Val, + ) -> Val { + let output: Val = bevy::math::I16Vec3::cmpge( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Returns a vector mask containing the result of a `>` comparison for each element of + /// `self` and `rhs`. + /// In other words this computes `[self.x > rhs.x, self.y > rhs.y, ..]` for all + /// elements. + fn cmpgt( + _self: Val, + rhs: Val, + ) -> Val { + let output: Val = bevy::math::I16Vec3::cmpgt( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Returns a vector mask containing the result of a `<=` comparison for each element of + /// `self` and `rhs`. + /// In other words this computes `[self.x <= rhs.x, self.y <= rhs.y, ..]` for all + /// elements. + fn cmple( + _self: Val, + rhs: Val, + ) -> Val { + let output: Val = bevy::math::I16Vec3::cmple( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Returns a vector mask containing the result of a `<` comparison for each element of + /// `self` and `rhs`. + /// In other words this computes `[self.x < rhs.x, self.y < rhs.y, ..]` for all + /// elements. + fn cmplt( + _self: Val, + rhs: Val, + ) -> Val { + let output: Val = bevy::math::I16Vec3::cmplt( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Returns a vector mask containing the result of a `!=` comparison for each element of + /// `self` and `rhs`. + /// In other words this computes `[self.x != rhs.x, self.y != rhs.y, ..]` for all + /// elements. + fn cmpne( + _self: Val, + rhs: Val, + ) -> Val { + let output: Val = bevy::math::I16Vec3::cmpne( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Computes the cross product of `self` and `rhs`. + fn cross( + _self: Val, + rhs: Val, + ) -> Val { + let output: Val = bevy::math::I16Vec3::cross( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Compute the squared euclidean distance between two points in space. + fn distance_squared( + _self: Val, + rhs: Val, + ) -> i16 { + let output: i16 = bevy::math::I16Vec3::distance_squared( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + fn div( + _self: Val, + rhs: Ref, + ) -> Val { + let output: Val = >::div(_self.into_inner(), &rhs) + .into(); + output + } + fn div( + _self: Val, + rhs: Val, + ) -> Val { + let output: Val = >::div(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + fn div(_self: Val, rhs: i16) -> Val { + let output: Val = >::div(_self.into_inner(), rhs) + .into(); + output + } + /// Returns the element-wise quotient of [Euclidean division] of `self` by `rhs`. + /// # Panics + /// This function will panic if any `rhs` element is 0 or the division results in overflow. + fn div_euclid( + _self: Val, + rhs: Val, + ) -> Val { + let output: Val = bevy::math::I16Vec3::div_euclid( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Computes the dot product of `self` and `rhs`. + fn dot(_self: Val, rhs: Val) -> i16 { + let output: i16 = bevy::math::I16Vec3::dot(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + /// Returns a vector where every component is the dot product of `self` and `rhs`. + fn dot_into_vec( + _self: Val, + rhs: Val, + ) -> Val { + let output: Val = bevy::math::I16Vec3::dot_into_vec( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Returns the product of all elements of `self`. + /// In other words, this computes `self.x * self.y * ..`. + fn element_product(_self: Val) -> i16 { + let output: i16 = bevy::math::I16Vec3::element_product(_self.into_inner()) + .into(); + output + } + /// Returns the sum of all elements of `self`. + /// In other words, this computes `self.x + self.y + ..`. + fn element_sum(_self: Val) -> i16 { + let output: i16 = bevy::math::I16Vec3::element_sum(_self.into_inner()).into(); + output + } + fn eq(_self: Ref, other: Ref) -> bool { + let output: bool = >::eq(&_self, &other) + .into(); + output + } + /// Creates a 4D vector from `self` and the given `w` value. + fn extend(_self: Val, w: i16) -> Val { + let output: Val = bevy::math::I16Vec3::extend( + _self.into_inner(), + w, + ) + .into(); + output + } + /// Creates a new vector from an array. + fn from_array(a: [i16; 3]) -> Val { + let output: Val = bevy::math::I16Vec3::from_array(a).into(); + output + } + /// Returns a bitmask with the lowest 3 bits set to the sign bits from the elements of `self`. + /// A negative element results in a `1` bit and a positive element in a `0` bit. Element `x` goes + /// into the first lowest bit, element `y` into the second, etc. + fn is_negative_bitmask(_self: Val) -> u32 { + let output: u32 = bevy::math::I16Vec3::is_negative_bitmask(_self.into_inner()) + .into(); + output + } + /// Computes the squared length of `self`. + fn length_squared(_self: Val) -> i16 { + let output: i16 = bevy::math::I16Vec3::length_squared(_self.into_inner()).into(); + output + } + /// Returns a vector containing the maximum values for each element of `self` and `rhs`. + /// In other words this computes `[self.x.max(rhs.x), self.y.max(rhs.y), ..]`. + fn max( + _self: Val, + rhs: Val, + ) -> Val { + let output: Val = bevy::math::I16Vec3::max( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Returns the horizontal maximum of `self`. + /// In other words this computes `max(x, y, ..)`. + fn max_element(_self: Val) -> i16 { + let output: i16 = bevy::math::I16Vec3::max_element(_self.into_inner()).into(); + output + } + /// Returns a vector containing the minimum values for each element of `self` and `rhs`. + /// In other words this computes `[self.x.min(rhs.x), self.y.min(rhs.y), ..]`. + fn min( + _self: Val, + rhs: Val, + ) -> Val { + let output: Val = bevy::math::I16Vec3::min( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Returns the horizontal minimum of `self`. + /// In other words this computes `min(x, y, ..)`. + fn min_element(_self: Val) -> i16 { + let output: i16 = bevy::math::I16Vec3::min_element(_self.into_inner()).into(); + output + } + fn mul( + _self: Val, + rhs: Ref, + ) -> Val { + let output: Val = >::mul(_self.into_inner(), &rhs) + .into(); + output + } + fn mul( + _self: Val, + rhs: Val, + ) -> Val { + let output: Val = >::mul(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + fn mul(_self: Val, rhs: i16) -> Val { + let output: Val = >::mul(_self.into_inner(), rhs) + .into(); + output + } + fn neg(_self: Val) -> Val { + let output: Val = ::neg( + _self.into_inner(), + ) + .into(); + output + } + /// Creates a new vector. + fn new(x: i16, y: i16, z: i16) -> Val { + let output: Val = bevy::math::I16Vec3::new(x, y, z).into(); + output + } + fn rem( + _self: Val, + rhs: Ref, + ) -> Val { + let output: Val = >::rem(_self.into_inner(), &rhs) + .into(); + output + } + fn rem( + _self: Val, + rhs: Val, + ) -> Val { + let output: Val = >::rem(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + fn rem(_self: Val, rhs: i16) -> Val { + let output: Val = >::rem(_self.into_inner(), rhs) + .into(); + output + } + /// Returns the element-wise remainder of [Euclidean division] of `self` by `rhs`. + /// # Panics + /// This function will panic if any `rhs` element is 0 or the division results in overflow. + /// [Euclidean division]: i16::rem_euclid + fn rem_euclid( + _self: Val, + rhs: Val, + ) -> Val { + let output: Val = bevy::math::I16Vec3::rem_euclid( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Returns a vector containing the saturating addition of `self` and `rhs`. + /// In other words this computes `[self.x.saturating_add(rhs.x), self.y.saturating_add(rhs.y), ..]`. + fn saturating_add( + _self: Val, + rhs: Val, + ) -> Val { + let output: Val = bevy::math::I16Vec3::saturating_add( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// In other words this computes `[self.x.saturating_add_unsigned(rhs.x), self.y.saturating_add_unsigned(rhs.y), ..]`. + fn saturating_add_unsigned( + _self: Val, + rhs: Val, + ) -> Val { + let output: Val = bevy::math::I16Vec3::saturating_add_unsigned( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Returns a vector containing the saturating division of `self` and `rhs`. + /// In other words this computes `[self.x.saturating_div(rhs.x), self.y.saturating_div(rhs.y), ..]`. + fn saturating_div( + _self: Val, + rhs: Val, + ) -> Val { + let output: Val = bevy::math::I16Vec3::saturating_div( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Returns a vector containing the saturating multiplication of `self` and `rhs`. + /// In other words this computes `[self.x.saturating_mul(rhs.x), self.y.saturating_mul(rhs.y), ..]`. + fn saturating_mul( + _self: Val, + rhs: Val, + ) -> Val { + let output: Val = bevy::math::I16Vec3::saturating_mul( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Returns a vector containing the saturating subtraction of `self` and `rhs`. + /// In other words this computes `[self.x.saturating_sub(rhs.x), self.y.saturating_sub(rhs.y), ..]`. + fn saturating_sub( + _self: Val, + rhs: Val, + ) -> Val { + let output: Val = bevy::math::I16Vec3::saturating_sub( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Returns a vector containing the saturating subtraction of `self` and unsigned vector `rhs`. + /// In other words this computes `[self.x.saturating_sub_unsigned(rhs.x), self.y.saturating_sub_unsigned(rhs.y), ..]`. + fn saturating_sub_unsigned( + _self: Val, + rhs: Val, + ) -> Val { + let output: Val = bevy::math::I16Vec3::saturating_sub_unsigned( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Creates a vector from the elements in `if_true` and `if_false`, selecting which to use + /// for each element of `self`. + /// A true element in the mask uses the corresponding element from `if_true`, and false + /// uses the element from `if_false`. + fn select( + mask: Val, + if_true: Val, + if_false: Val, + ) -> Val { + let output: Val = bevy::math::I16Vec3::select( + mask.into_inner(), + if_true.into_inner(), + if_false.into_inner(), + ) + .into(); + output + } + /// Returns a vector with elements representing the sign of `self`. + /// - `0` if the number is zero + /// - `1` if the number is positive + /// - `-1` if the number is negative + fn signum(_self: Val) -> Val { + let output: Val = bevy::math::I16Vec3::signum( + _self.into_inner(), + ) + .into(); + output + } + /// Creates a vector with all elements set to `v`. + fn splat(v: i16) -> Val { + let output: Val = bevy::math::I16Vec3::splat(v).into(); + output + } + fn sub( + _self: Val, + rhs: Ref, + ) -> Val { + let output: Val = >::sub(_self.into_inner(), &rhs) + .into(); + output + } + fn sub( + _self: Val, + rhs: Val, + ) -> Val { + let output: Val = >::sub(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + fn sub(_self: Val, rhs: i16) -> Val { + let output: Val = >::sub(_self.into_inner(), rhs) + .into(); + output + } + /// `[x, y, z]` + fn to_array(_self: Ref) -> [i16; 3] { + let output: [i16; 3] = bevy::math::I16Vec3::to_array(&_self).into(); + output + } + /// Creates a 2D vector from the `x` and `y` elements of `self`, discarding `z`. + /// Truncation may also be performed by using [`self.xy()`][crate::swizzles::Vec3Swizzles::xy()]. + fn truncate(_self: Val) -> Val { + let output: Val = bevy::math::I16Vec3::truncate( + _self.into_inner(), + ) + .into(); + output + } + /// Creates a 3D vector from `self` with the given value of `x`. + fn with_x(_self: Val, x: i16) -> Val { + let output: Val = bevy::math::I16Vec3::with_x( + _self.into_inner(), + x, + ) + .into(); + output + } + /// Creates a 3D vector from `self` with the given value of `y`. + fn with_y(_self: Val, y: i16) -> Val { + let output: Val = bevy::math::I16Vec3::with_y( + _self.into_inner(), + y, + ) + .into(); + output + } + /// Creates a 3D vector from `self` with the given value of `z`. + fn with_z(_self: Val, z: i16) -> Val { + let output: Val = bevy::math::I16Vec3::with_z( + _self.into_inner(), + z, + ) + .into(); + output + } + /// Returns a vector containing the wrapping addition of `self` and `rhs`. + /// In other words this computes `[self.x.wrapping_add(rhs.x), self.y.wrapping_add(rhs.y), ..]`. + fn wrapping_add( + _self: Val, + rhs: Val, + ) -> Val { + let output: Val = bevy::math::I16Vec3::wrapping_add( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Returns a vector containing the wrapping addition of `self` and unsigned vector `rhs`. + /// In other words this computes `[self.x.wrapping_add_unsigned(rhs.x), self.y.wrapping_add_unsigned(rhs.y), ..]`. + fn wrapping_add_unsigned( + _self: Val, + rhs: Val, + ) -> Val { + let output: Val = bevy::math::I16Vec3::wrapping_add_unsigned( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Returns a vector containing the wrapping division of `self` and `rhs`. + /// In other words this computes `[self.x.wrapping_div(rhs.x), self.y.wrapping_div(rhs.y), ..]`. + fn wrapping_div( + _self: Val, + rhs: Val, + ) -> Val { + let output: Val = bevy::math::I16Vec3::wrapping_div( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Returns a vector containing the wrapping multiplication of `self` and `rhs`. + /// In other words this computes `[self.x.wrapping_mul(rhs.x), self.y.wrapping_mul(rhs.y), ..]`. + fn wrapping_mul( + _self: Val, + rhs: Val, + ) -> Val { + let output: Val = bevy::math::I16Vec3::wrapping_mul( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Returns a vector containing the wrapping subtraction of `self` and `rhs`. + /// In other words this computes `[self.x.wrapping_sub(rhs.x), self.y.wrapping_sub(rhs.y), ..]`. + fn wrapping_sub( + _self: Val, + rhs: Val, + ) -> Val { + let output: Val = bevy::math::I16Vec3::wrapping_sub( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Returns a vector containing the wrapping subtraction of `self` and unsigned vector `rhs`. + /// In other words this computes `[self.x.wrapping_sub_unsigned(rhs.x), self.y.wrapping_sub_unsigned(rhs.y), ..]`. + fn wrapping_sub_unsigned( + _self: Val, + rhs: Val, + ) -> Val { + let output: Val = bevy::math::I16Vec3::wrapping_sub_unsigned( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } +} +#[script_bindings( + remote, + name = "i_16_vec_4_functions", + bms_core_path = "bevy_mod_scripting_core", + generated +)] +impl bevy::math::I16Vec4 { + /// Returns a vector containing the absolute value of each element of `self`. + fn abs(_self: Val) -> Val { + let output: Val = bevy::math::I16Vec4::abs( + _self.into_inner(), + ) + .into(); + output + } + fn add( + _self: Val, + rhs: Ref, + ) -> Val { + let output: Val = >::add(_self.into_inner(), &rhs) + .into(); + output + } + fn add( + _self: Val, + rhs: Val, + ) -> Val { + let output: Val = >::add(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + fn add(_self: Val, rhs: i16) -> Val { + let output: Val = >::add(_self.into_inner(), rhs) + .into(); + output + } + /// Casts all elements of `self` to `f64`. + fn as_dvec4(_self: Ref) -> Val { + let output: Val = bevy::math::I16Vec4::as_dvec4(&_self) + .into(); + output + } + /// Casts all elements of `self` to `i64`. + fn as_i64vec4(_self: Ref) -> Val { + let output: Val = bevy::math::I16Vec4::as_i64vec4(&_self) + .into(); + output + } + /// Casts all elements of `self` to `i8`. + fn as_i8vec4(_self: Ref) -> Val { + let output: Val = bevy::math::I16Vec4::as_i8vec4(&_self) + .into(); + output + } + /// Casts all elements of `self` to `i32`. + fn as_ivec4(_self: Ref) -> Val { + let output: Val = bevy::math::I16Vec4::as_ivec4(&_self) + .into(); + output + } + /// Casts all elements of `self` to `u16`. + fn as_u16vec4(_self: Ref) -> Val { + let output: Val = bevy::math::I16Vec4::as_u16vec4(&_self) + .into(); + output + } + /// Casts all elements of `self` to `u64`. + fn as_u64vec4(_self: Ref) -> Val { + let output: Val = bevy::math::I16Vec4::as_u64vec4(&_self) + .into(); + output + } + /// Casts all elements of `self` to `u8`. + fn as_u8vec4(_self: Ref) -> Val { + let output: Val = bevy::math::I16Vec4::as_u8vec4(&_self) + .into(); + output + } + /// Casts all elements of `self` to `u32`. + fn as_uvec4(_self: Ref) -> Val { + let output: Val = bevy::math::I16Vec4::as_uvec4(&_self) + .into(); + output + } + /// Casts all elements of `self` to `f32`. + fn as_vec4(_self: Ref) -> Val { + let output: Val = bevy::math::I16Vec4::as_vec4(&_self).into(); + output + } + fn assert_receiver_is_total_eq(_self: Ref) -> () { + let output: () = ::assert_receiver_is_total_eq( + &_self, + ) + .into(); + output + } + /// Component-wise clamping of values, similar to [`i16::clamp`]. + /// Each element in `min` must be less-or-equal to the corresponding element in `max`. + /// # Panics + /// Will panic if `min` is greater than `max` when `glam_assert` is enabled. + fn clamp( + _self: Val, + min: Val, + max: Val, + ) -> Val { + let output: Val = bevy::math::I16Vec4::clamp( + _self.into_inner(), + min.into_inner(), + max.into_inner(), + ) + .into(); + output + } + fn clone(_self: Ref) -> Val { + let output: Val = ::clone( + &_self, + ) + .into(); + output + } + /// Returns a vector mask containing the result of a `==` comparison for each element of + /// `self` and `rhs`. + /// In other words, this computes `[self.x == rhs.x, self.y == rhs.y, ..]` for all + /// elements. + fn cmpeq( + _self: Val, + rhs: Val, + ) -> Val { + let output: Val = bevy::math::I16Vec4::cmpeq( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Returns a vector mask containing the result of a `>=` comparison for each element of + /// `self` and `rhs`. + /// In other words this computes `[self.x >= rhs.x, self.y >= rhs.y, ..]` for all + /// elements. + fn cmpge( + _self: Val, + rhs: Val, + ) -> Val { + let output: Val = bevy::math::I16Vec4::cmpge( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Returns a vector mask containing the result of a `>` comparison for each element of + /// `self` and `rhs`. + /// In other words this computes `[self.x > rhs.x, self.y > rhs.y, ..]` for all + /// elements. + fn cmpgt( + _self: Val, + rhs: Val, + ) -> Val { + let output: Val = bevy::math::I16Vec4::cmpgt( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Returns a vector mask containing the result of a `<=` comparison for each element of + /// `self` and `rhs`. + /// In other words this computes `[self.x <= rhs.x, self.y <= rhs.y, ..]` for all + /// elements. + fn cmple( + _self: Val, + rhs: Val, + ) -> Val { + let output: Val = bevy::math::I16Vec4::cmple( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Returns a vector mask containing the result of a `<` comparison for each element of + /// `self` and `rhs`. + /// In other words this computes `[self.x < rhs.x, self.y < rhs.y, ..]` for all + /// elements. + fn cmplt( + _self: Val, + rhs: Val, + ) -> Val { + let output: Val = bevy::math::I16Vec4::cmplt( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Returns a vector mask containing the result of a `!=` comparison for each element of + /// `self` and `rhs`. + /// In other words this computes `[self.x != rhs.x, self.y != rhs.y, ..]` for all + /// elements. + fn cmpne( + _self: Val, + rhs: Val, + ) -> Val { + let output: Val = bevy::math::I16Vec4::cmpne( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Compute the squared euclidean distance between two points in space. + fn distance_squared( + _self: Val, + rhs: Val, + ) -> i16 { + let output: i16 = bevy::math::I16Vec4::distance_squared( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + fn div( + _self: Val, + rhs: Ref, + ) -> Val { + let output: Val = >::div(_self.into_inner(), &rhs) + .into(); + output + } + fn div( + _self: Val, + rhs: Val, + ) -> Val { + let output: Val = >::div(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + fn div(_self: Val, rhs: i16) -> Val { + let output: Val = >::div(_self.into_inner(), rhs) + .into(); + output + } + /// Returns the element-wise quotient of [Euclidean division] of `self` by `rhs`. + /// # Panics + /// This function will panic if any `rhs` element is 0 or the division results in overflow. + fn div_euclid( + _self: Val, + rhs: Val, + ) -> Val { + let output: Val = bevy::math::I16Vec4::div_euclid( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Computes the dot product of `self` and `rhs`. + fn dot(_self: Val, rhs: Val) -> i16 { + let output: i16 = bevy::math::I16Vec4::dot(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + /// Returns a vector where every component is the dot product of `self` and `rhs`. + fn dot_into_vec( + _self: Val, + rhs: Val, + ) -> Val { + let output: Val = bevy::math::I16Vec4::dot_into_vec( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Returns the product of all elements of `self`. + /// In other words, this computes `self.x * self.y * ..`. + fn element_product(_self: Val) -> i16 { + let output: i16 = bevy::math::I16Vec4::element_product(_self.into_inner()) + .into(); + output + } + /// Returns the sum of all elements of `self`. + /// In other words, this computes `self.x + self.y + ..`. + fn element_sum(_self: Val) -> i16 { + let output: i16 = bevy::math::I16Vec4::element_sum(_self.into_inner()).into(); + output + } + fn eq(_self: Ref, other: Ref) -> bool { + let output: bool = >::eq(&_self, &other) + .into(); + output + } + /// Creates a new vector from an array. + fn from_array(a: [i16; 4]) -> Val { + let output: Val = bevy::math::I16Vec4::from_array(a).into(); + output + } + /// Returns a bitmask with the lowest 4 bits set to the sign bits from the elements of `self`. + /// A negative element results in a `1` bit and a positive element in a `0` bit. Element `x` goes + /// into the first lowest bit, element `y` into the second, etc. + fn is_negative_bitmask(_self: Val) -> u32 { + let output: u32 = bevy::math::I16Vec4::is_negative_bitmask(_self.into_inner()) + .into(); + output + } + /// Computes the squared length of `self`. + fn length_squared(_self: Val) -> i16 { + let output: i16 = bevy::math::I16Vec4::length_squared(_self.into_inner()).into(); + output + } + /// Returns a vector containing the maximum values for each element of `self` and `rhs`. + /// In other words this computes `[self.x.max(rhs.x), self.y.max(rhs.y), ..]`. + fn max( + _self: Val, + rhs: Val, + ) -> Val { + let output: Val = bevy::math::I16Vec4::max( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Returns the horizontal maximum of `self`. + /// In other words this computes `max(x, y, ..)`. + fn max_element(_self: Val) -> i16 { + let output: i16 = bevy::math::I16Vec4::max_element(_self.into_inner()).into(); + output + } + /// Returns a vector containing the minimum values for each element of `self` and `rhs`. + /// In other words this computes `[self.x.min(rhs.x), self.y.min(rhs.y), ..]`. + fn min( + _self: Val, + rhs: Val, + ) -> Val { + let output: Val = bevy::math::I16Vec4::min( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Returns the horizontal minimum of `self`. + /// In other words this computes `min(x, y, ..)`. + fn min_element(_self: Val) -> i16 { + let output: i16 = bevy::math::I16Vec4::min_element(_self.into_inner()).into(); + output + } + fn mul( + _self: Val, + rhs: Ref, + ) -> Val { + let output: Val = >::mul(_self.into_inner(), &rhs) + .into(); + output + } + fn mul( + _self: Val, + rhs: Val, + ) -> Val { + let output: Val = >::mul(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + fn mul(_self: Val, rhs: i16) -> Val { + let output: Val = >::mul(_self.into_inner(), rhs) + .into(); + output + } + fn neg(_self: Val) -> Val { + let output: Val = ::neg( + _self.into_inner(), + ) + .into(); + output + } + /// Creates a new vector. + fn new(x: i16, y: i16, z: i16, w: i16) -> Val { + let output: Val = bevy::math::I16Vec4::new(x, y, z, w) + .into(); + output + } + fn rem( + _self: Val, + rhs: Ref, + ) -> Val { + let output: Val = >::rem(_self.into_inner(), &rhs) + .into(); + output + } + fn rem( + _self: Val, + rhs: Val, + ) -> Val { + let output: Val = >::rem(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + fn rem(_self: Val, rhs: i16) -> Val { + let output: Val = >::rem(_self.into_inner(), rhs) + .into(); + output + } + /// Returns the element-wise remainder of [Euclidean division] of `self` by `rhs`. + /// # Panics + /// This function will panic if any `rhs` element is 0 or the division results in overflow. + /// [Euclidean division]: i16::rem_euclid + fn rem_euclid( + _self: Val, + rhs: Val, + ) -> Val { + let output: Val = bevy::math::I16Vec4::rem_euclid( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Returns a vector containing the saturating addition of `self` and `rhs`. + /// In other words this computes `[self.x.saturating_add(rhs.x), self.y.saturating_add(rhs.y), ..]`. + fn saturating_add( + _self: Val, + rhs: Val, + ) -> Val { + let output: Val = bevy::math::I16Vec4::saturating_add( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// In other words this computes `[self.x.saturating_add_unsigned(rhs.x), self.y.saturating_add_unsigned(rhs.y), ..]`. + fn saturating_add_unsigned( + _self: Val, + rhs: Val, + ) -> Val { + let output: Val = bevy::math::I16Vec4::saturating_add_unsigned( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Returns a vector containing the saturating division of `self` and `rhs`. + /// In other words this computes `[self.x.saturating_div(rhs.x), self.y.saturating_div(rhs.y), ..]`. + fn saturating_div( + _self: Val, + rhs: Val, + ) -> Val { + let output: Val = bevy::math::I16Vec4::saturating_div( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Returns a vector containing the saturating multiplication of `self` and `rhs`. + /// In other words this computes `[self.x.saturating_mul(rhs.x), self.y.saturating_mul(rhs.y), ..]`. + fn saturating_mul( + _self: Val, + rhs: Val, + ) -> Val { + let output: Val = bevy::math::I16Vec4::saturating_mul( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Returns a vector containing the saturating subtraction of `self` and `rhs`. + /// In other words this computes `[self.x.saturating_sub(rhs.x), self.y.saturating_sub(rhs.y), ..]`. + fn saturating_sub( + _self: Val, + rhs: Val, + ) -> Val { + let output: Val = bevy::math::I16Vec4::saturating_sub( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Returns a vector containing the saturating subtraction of `self` and unsigned vector `rhs`. + /// In other words this computes `[self.x.saturating_sub_unsigned(rhs.x), self.y.saturating_sub_unsigned(rhs.y), ..]`. + fn saturating_sub_unsigned( + _self: Val, + rhs: Val, + ) -> Val { + let output: Val = bevy::math::I16Vec4::saturating_sub_unsigned( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Creates a vector from the elements in `if_true` and `if_false`, selecting which to use + /// for each element of `self`. + /// A true element in the mask uses the corresponding element from `if_true`, and false + /// uses the element from `if_false`. + fn select( + mask: Val, + if_true: Val, + if_false: Val, + ) -> Val { + let output: Val = bevy::math::I16Vec4::select( + mask.into_inner(), + if_true.into_inner(), + if_false.into_inner(), + ) + .into(); + output + } + /// Returns a vector with elements representing the sign of `self`. + /// - `0` if the number is zero + /// - `1` if the number is positive + /// - `-1` if the number is negative + fn signum(_self: Val) -> Val { + let output: Val = bevy::math::I16Vec4::signum( + _self.into_inner(), + ) + .into(); + output + } + /// Creates a vector with all elements set to `v`. + fn splat(v: i16) -> Val { + let output: Val = bevy::math::I16Vec4::splat(v).into(); + output + } + fn sub( + _self: Val, + rhs: Ref, + ) -> Val { + let output: Val = >::sub(_self.into_inner(), &rhs) + .into(); + output + } + fn sub( + _self: Val, + rhs: Val, + ) -> Val { + let output: Val = >::sub(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + fn sub(_self: Val, rhs: i16) -> Val { + let output: Val = >::sub(_self.into_inner(), rhs) + .into(); + output + } + /// `[x, y, z, w]` + fn to_array(_self: Ref) -> [i16; 4] { + let output: [i16; 4] = bevy::math::I16Vec4::to_array(&_self).into(); + output + } + /// Creates a 3D vector from the `x`, `y` and `z` elements of `self`, discarding `w`. + /// Truncation to [`I16Vec3`] may also be performed by using [`self.xyz()`][crate::swizzles::Vec4Swizzles::xyz()]. + fn truncate(_self: Val) -> Val { + let output: Val = bevy::math::I16Vec4::truncate( + _self.into_inner(), + ) + .into(); + output + } + /// Creates a 4D vector from `self` with the given value of `w`. + fn with_w(_self: Val, w: i16) -> Val { + let output: Val = bevy::math::I16Vec4::with_w( + _self.into_inner(), + w, + ) + .into(); + output + } + /// Creates a 4D vector from `self` with the given value of `x`. + fn with_x(_self: Val, x: i16) -> Val { + let output: Val = bevy::math::I16Vec4::with_x( + _self.into_inner(), + x, + ) + .into(); + output + } + /// Creates a 4D vector from `self` with the given value of `y`. + fn with_y(_self: Val, y: i16) -> Val { + let output: Val = bevy::math::I16Vec4::with_y( + _self.into_inner(), + y, + ) + .into(); + output + } + /// Creates a 4D vector from `self` with the given value of `z`. + fn with_z(_self: Val, z: i16) -> Val { + let output: Val = bevy::math::I16Vec4::with_z( + _self.into_inner(), + z, + ) + .into(); + output + } + /// Returns a vector containing the wrapping addition of `self` and `rhs`. + /// In other words this computes `[self.x.wrapping_add(rhs.x), self.y.wrapping_add(rhs.y), ..]`. + fn wrapping_add( + _self: Val, + rhs: Val, + ) -> Val { + let output: Val = bevy::math::I16Vec4::wrapping_add( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Returns a vector containing the wrapping addition of `self` and unsigned vector `rhs`. + /// In other words this computes `[self.x.wrapping_add_unsigned(rhs.x), self.y.wrapping_add_unsigned(rhs.y), ..]`. + fn wrapping_add_unsigned( + _self: Val, + rhs: Val, + ) -> Val { + let output: Val = bevy::math::I16Vec4::wrapping_add_unsigned( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Returns a vector containing the wrapping division of `self` and `rhs`. + /// In other words this computes `[self.x.wrapping_div(rhs.x), self.y.wrapping_div(rhs.y), ..]`. + fn wrapping_div( + _self: Val, + rhs: Val, + ) -> Val { + let output: Val = bevy::math::I16Vec4::wrapping_div( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Returns a vector containing the wrapping multiplication of `self` and `rhs`. + /// In other words this computes `[self.x.wrapping_mul(rhs.x), self.y.wrapping_mul(rhs.y), ..]`. + fn wrapping_mul( + _self: Val, + rhs: Val, + ) -> Val { + let output: Val = bevy::math::I16Vec4::wrapping_mul( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Returns a vector containing the wrapping subtraction of `self` and `rhs`. + /// In other words this computes `[self.x.wrapping_sub(rhs.x), self.y.wrapping_sub(rhs.y), ..]`. + fn wrapping_sub( + _self: Val, + rhs: Val, + ) -> Val { + let output: Val = bevy::math::I16Vec4::wrapping_sub( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Returns a vector containing the wrapping subtraction of `self` and unsigned vector `rhs`. + /// In other words this computes `[self.x.wrapping_sub_unsigned(rhs.x), self.y.wrapping_sub_unsigned(rhs.y), ..]`. + fn wrapping_sub_unsigned( + _self: Val, + rhs: Val, + ) -> Val { + let output: Val = bevy::math::I16Vec4::wrapping_sub_unsigned( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } +} +#[script_bindings( + remote, + name = "i_64_vec_2_functions", + bms_core_path = "bevy_mod_scripting_core", + generated +)] +impl bevy::math::I64Vec2 { + /// Returns a vector containing the absolute value of each element of `self`. + fn abs(_self: Val) -> Val { + let output: Val = bevy::math::I64Vec2::abs( + _self.into_inner(), + ) + .into(); + output + } + fn add( + _self: Val, + rhs: Ref, + ) -> Val { + let output: Val = >::add(_self.into_inner(), &rhs) + .into(); + output + } + fn add( + _self: Val, + rhs: Val, + ) -> Val { + let output: Val = >::add(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + fn add(_self: Val, rhs: i64) -> Val { + let output: Val = >::add(_self.into_inner(), rhs) + .into(); + output + } + /// Casts all elements of `self` to `f64`. + fn as_dvec2(_self: Ref) -> Val { + let output: Val = bevy::math::I64Vec2::as_dvec2(&_self) + .into(); + output + } + /// Casts all elements of `self` to `i16`. + fn as_i16vec2(_self: Ref) -> Val { + let output: Val = bevy::math::I64Vec2::as_i16vec2(&_self) + .into(); + output + } + /// Casts all elements of `self` to `i8`. + fn as_i8vec2(_self: Ref) -> Val { + let output: Val = bevy::math::I64Vec2::as_i8vec2(&_self) + .into(); + output + } + /// Casts all elements of `self` to `i32`. + fn as_ivec2(_self: Ref) -> Val { + let output: Val = bevy::math::I64Vec2::as_ivec2(&_self) + .into(); + output + } + /// Casts all elements of `self` to `u16`. + fn as_u16vec2(_self: Ref) -> Val { + let output: Val = bevy::math::I64Vec2::as_u16vec2(&_self) + .into(); + output + } + /// Casts all elements of `self` to `u64`. + fn as_u64vec2(_self: Ref) -> Val { + let output: Val = bevy::math::I64Vec2::as_u64vec2(&_self) + .into(); + output + } + /// Casts all elements of `self` to `u8`. + fn as_u8vec2(_self: Ref) -> Val { + let output: Val = bevy::math::I64Vec2::as_u8vec2(&_self) + .into(); + output + } + /// Casts all elements of `self` to `u32`. + fn as_uvec2(_self: Ref) -> Val { + let output: Val = bevy::math::I64Vec2::as_uvec2(&_self) + .into(); + output + } + /// Casts all elements of `self` to `f32`. + fn as_vec2(_self: Ref) -> Val { + let output: Val = bevy::math::I64Vec2::as_vec2(&_self).into(); + output + } + fn assert_receiver_is_total_eq(_self: Ref) -> () { + let output: () = ::assert_receiver_is_total_eq( + &_self, + ) + .into(); + output + } + /// Component-wise clamping of values, similar to [`i64::clamp`]. + /// Each element in `min` must be less-or-equal to the corresponding element in `max`. + /// # Panics + /// Will panic if `min` is greater than `max` when `glam_assert` is enabled. + fn clamp( + _self: Val, + min: Val, + max: Val, + ) -> Val { + let output: Val = bevy::math::I64Vec2::clamp( + _self.into_inner(), + min.into_inner(), + max.into_inner(), + ) + .into(); + output + } + fn clone(_self: Ref) -> Val { + let output: Val = ::clone( + &_self, + ) + .into(); + output + } + /// Returns a vector mask containing the result of a `==` comparison for each element of + /// `self` and `rhs`. + /// In other words, this computes `[self.x == rhs.x, self.y == rhs.y, ..]` for all + /// elements. + fn cmpeq( + _self: Val, + rhs: Val, + ) -> Val { + let output: Val = bevy::math::I64Vec2::cmpeq( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Returns a vector mask containing the result of a `>=` comparison for each element of + /// `self` and `rhs`. + /// In other words this computes `[self.x >= rhs.x, self.y >= rhs.y, ..]` for all + /// elements. + fn cmpge( + _self: Val, + rhs: Val, + ) -> Val { + let output: Val = bevy::math::I64Vec2::cmpge( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Returns a vector mask containing the result of a `>` comparison for each element of + /// `self` and `rhs`. + /// In other words this computes `[self.x > rhs.x, self.y > rhs.y, ..]` for all + /// elements. + fn cmpgt( + _self: Val, + rhs: Val, + ) -> Val { + let output: Val = bevy::math::I64Vec2::cmpgt( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Returns a vector mask containing the result of a `<=` comparison for each element of + /// `self` and `rhs`. + /// In other words this computes `[self.x <= rhs.x, self.y <= rhs.y, ..]` for all + /// elements. + fn cmple( + _self: Val, + rhs: Val, + ) -> Val { + let output: Val = bevy::math::I64Vec2::cmple( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Returns a vector mask containing the result of a `<` comparison for each element of + /// `self` and `rhs`. + /// In other words this computes `[self.x < rhs.x, self.y < rhs.y, ..]` for all + /// elements. + fn cmplt( + _self: Val, + rhs: Val, + ) -> Val { + let output: Val = bevy::math::I64Vec2::cmplt( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Returns a vector mask containing the result of a `!=` comparison for each element of + /// `self` and `rhs`. + /// In other words this computes `[self.x != rhs.x, self.y != rhs.y, ..]` for all + /// elements. + fn cmpne( + _self: Val, + rhs: Val, + ) -> Val { + let output: Val = bevy::math::I64Vec2::cmpne( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Compute the squared euclidean distance between two points in space. + fn distance_squared( + _self: Val, + rhs: Val, + ) -> i64 { + let output: i64 = bevy::math::I64Vec2::distance_squared( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + fn div( + _self: Val, + rhs: Ref, + ) -> Val { + let output: Val = >::div(_self.into_inner(), &rhs) + .into(); + output + } + fn div( + _self: Val, + rhs: Val, + ) -> Val { + let output: Val = >::div(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + fn div(_self: Val, rhs: i64) -> Val { + let output: Val = >::div(_self.into_inner(), rhs) + .into(); + output + } + /// Returns the element-wise quotient of [Euclidean division] of `self` by `rhs`. + /// # Panics + /// This function will panic if any `rhs` element is 0 or the division results in overflow. + fn div_euclid( + _self: Val, + rhs: Val, + ) -> Val { + let output: Val = bevy::math::I64Vec2::div_euclid( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Computes the dot product of `self` and `rhs`. + fn dot(_self: Val, rhs: Val) -> i64 { + let output: i64 = bevy::math::I64Vec2::dot(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + /// Returns a vector where every component is the dot product of `self` and `rhs`. + fn dot_into_vec( + _self: Val, + rhs: Val, + ) -> Val { + let output: Val = bevy::math::I64Vec2::dot_into_vec( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Returns the product of all elements of `self`. + /// In other words, this computes `self.x * self.y * ..`. + fn element_product(_self: Val) -> i64 { + let output: i64 = bevy::math::I64Vec2::element_product(_self.into_inner()) + .into(); + output + } + /// Returns the sum of all elements of `self`. + /// In other words, this computes `self.x + self.y + ..`. + fn element_sum(_self: Val) -> i64 { + let output: i64 = bevy::math::I64Vec2::element_sum(_self.into_inner()).into(); + output + } + fn eq(_self: Ref, other: Ref) -> bool { + let output: bool = >::eq(&_self, &other) + .into(); + output + } + /// Creates a 3D vector from `self` and the given `z` value. + fn extend(_self: Val, z: i64) -> Val { + let output: Val = bevy::math::I64Vec2::extend( + _self.into_inner(), + z, + ) + .into(); + output + } + /// Creates a new vector from an array. + fn from_array(a: [i64; 2]) -> Val { + let output: Val = bevy::math::I64Vec2::from_array(a).into(); + output + } + /// Returns a bitmask with the lowest 2 bits set to the sign bits from the elements of `self`. + /// A negative element results in a `1` bit and a positive element in a `0` bit. Element `x` goes + /// into the first lowest bit, element `y` into the second, etc. + fn is_negative_bitmask(_self: Val) -> u32 { + let output: u32 = bevy::math::I64Vec2::is_negative_bitmask(_self.into_inner()) + .into(); + output + } + /// Computes the squared length of `self`. + fn length_squared(_self: Val) -> i64 { + let output: i64 = bevy::math::I64Vec2::length_squared(_self.into_inner()).into(); + output + } + /// Returns a vector containing the maximum values for each element of `self` and `rhs`. + /// In other words this computes `[self.x.max(rhs.x), self.y.max(rhs.y), ..]`. + fn max( + _self: Val, + rhs: Val, + ) -> Val { + let output: Val = bevy::math::I64Vec2::max( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Returns the horizontal maximum of `self`. + /// In other words this computes `max(x, y, ..)`. + fn max_element(_self: Val) -> i64 { + let output: i64 = bevy::math::I64Vec2::max_element(_self.into_inner()).into(); + output + } + /// Returns a vector containing the minimum values for each element of `self` and `rhs`. + /// In other words this computes `[self.x.min(rhs.x), self.y.min(rhs.y), ..]`. + fn min( + _self: Val, + rhs: Val, + ) -> Val { + let output: Val = bevy::math::I64Vec2::min( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Returns the horizontal minimum of `self`. + /// In other words this computes `min(x, y, ..)`. + fn min_element(_self: Val) -> i64 { + let output: i64 = bevy::math::I64Vec2::min_element(_self.into_inner()).into(); + output + } + fn mul( + _self: Val, + rhs: Ref, + ) -> Val { + let output: Val = >::mul(_self.into_inner(), &rhs) + .into(); + output + } + fn mul( + _self: Val, + rhs: Val, + ) -> Val { + let output: Val = >::mul(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + fn mul(_self: Val, rhs: i64) -> Val { + let output: Val = >::mul(_self.into_inner(), rhs) + .into(); + output + } + fn neg(_self: Val) -> Val { + let output: Val = ::neg( + _self.into_inner(), + ) + .into(); + output + } + /// Creates a new vector. + fn new(x: i64, y: i64) -> Val { + let output: Val = bevy::math::I64Vec2::new(x, y).into(); + output + } + /// Returns a vector that is equal to `self` rotated by 90 degrees. + fn perp(_self: Val) -> Val { + let output: Val = bevy::math::I64Vec2::perp( + _self.into_inner(), + ) + .into(); + output + } + /// The perpendicular dot product of `self` and `rhs`. + /// Also known as the wedge product, 2D cross product, and determinant. + fn perp_dot(_self: Val, rhs: Val) -> i64 { + let output: i64 = bevy::math::I64Vec2::perp_dot( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + fn rem( + _self: Val, + rhs: Ref, + ) -> Val { + let output: Val = >::rem(_self.into_inner(), &rhs) + .into(); + output + } + fn rem( + _self: Val, + rhs: Val, + ) -> Val { + let output: Val = >::rem(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + fn rem(_self: Val, rhs: i64) -> Val { + let output: Val = >::rem(_self.into_inner(), rhs) + .into(); + output + } + /// Returns the element-wise remainder of [Euclidean division] of `self` by `rhs`. + /// # Panics + /// This function will panic if any `rhs` element is 0 or the division results in overflow. + /// [Euclidean division]: i64::rem_euclid + fn rem_euclid( + _self: Val, + rhs: Val, + ) -> Val { + let output: Val = bevy::math::I64Vec2::rem_euclid( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Returns `rhs` rotated by the angle of `self`. If `self` is normalized, + /// then this just rotation. This is what you usually want. Otherwise, + /// it will be like a rotation with a multiplication by `self`'s length. + fn rotate( + _self: Val, + rhs: Val, + ) -> Val { + let output: Val = bevy::math::I64Vec2::rotate( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Returns a vector containing the saturating addition of `self` and `rhs`. + /// In other words this computes `[self.x.saturating_add(rhs.x), self.y.saturating_add(rhs.y), ..]`. + fn saturating_add( + _self: Val, + rhs: Val, + ) -> Val { + let output: Val = bevy::math::I64Vec2::saturating_add( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// In other words this computes `[self.x.saturating_add_unsigned(rhs.x), self.y.saturating_add_unsigned(rhs.y), ..]`. + fn saturating_add_unsigned( + _self: Val, + rhs: Val, + ) -> Val { + let output: Val = bevy::math::I64Vec2::saturating_add_unsigned( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Returns a vector containing the saturating division of `self` and `rhs`. + /// In other words this computes `[self.x.saturating_div(rhs.x), self.y.saturating_div(rhs.y), ..]`. + fn saturating_div( + _self: Val, + rhs: Val, + ) -> Val { + let output: Val = bevy::math::I64Vec2::saturating_div( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Returns a vector containing the saturating multiplication of `self` and `rhs`. + /// In other words this computes `[self.x.saturating_mul(rhs.x), self.y.saturating_mul(rhs.y), ..]`. + fn saturating_mul( + _self: Val, + rhs: Val, + ) -> Val { + let output: Val = bevy::math::I64Vec2::saturating_mul( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Returns a vector containing the saturating subtraction of `self` and `rhs`. + /// In other words this computes `[self.x.saturating_sub(rhs.x), self.y.saturating_sub(rhs.y), ..]`. + fn saturating_sub( + _self: Val, + rhs: Val, + ) -> Val { + let output: Val = bevy::math::I64Vec2::saturating_sub( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Returns a vector containing the saturating subtraction of `self` and unsigned vector `rhs`. + /// In other words this computes `[self.x.saturating_sub_unsigned(rhs.x), self.y.saturating_sub_unsigned(rhs.y), ..]`. + fn saturating_sub_unsigned( + _self: Val, + rhs: Val, + ) -> Val { + let output: Val = bevy::math::I64Vec2::saturating_sub_unsigned( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Creates a vector from the elements in `if_true` and `if_false`, selecting which to use + /// for each element of `self`. + /// A true element in the mask uses the corresponding element from `if_true`, and false + /// uses the element from `if_false`. + fn select( + mask: Val, + if_true: Val, + if_false: Val, + ) -> Val { + let output: Val = bevy::math::I64Vec2::select( + mask.into_inner(), + if_true.into_inner(), + if_false.into_inner(), + ) + .into(); + output + } + /// Returns a vector with elements representing the sign of `self`. + /// - `0` if the number is zero + /// - `1` if the number is positive + /// - `-1` if the number is negative + fn signum(_self: Val) -> Val { + let output: Val = bevy::math::I64Vec2::signum( + _self.into_inner(), + ) + .into(); + output + } + /// Creates a vector with all elements set to `v`. + fn splat(v: i64) -> Val { + let output: Val = bevy::math::I64Vec2::splat(v).into(); + output + } + fn sub( + _self: Val, + rhs: Ref, + ) -> Val { + let output: Val = >::sub(_self.into_inner(), &rhs) + .into(); + output + } + fn sub( + _self: Val, + rhs: Val, + ) -> Val { + let output: Val = >::sub(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + fn sub(_self: Val, rhs: i64) -> Val { + let output: Val = >::sub(_self.into_inner(), rhs) + .into(); + output + } + /// `[x, y]` + fn to_array(_self: Ref) -> [i64; 2] { + let output: [i64; 2] = bevy::math::I64Vec2::to_array(&_self).into(); + output + } + /// Creates a 2D vector from `self` with the given value of `x`. + fn with_x(_self: Val, x: i64) -> Val { + let output: Val = bevy::math::I64Vec2::with_x( + _self.into_inner(), + x, + ) + .into(); + output + } + /// Creates a 2D vector from `self` with the given value of `y`. + fn with_y(_self: Val, y: i64) -> Val { + let output: Val = bevy::math::I64Vec2::with_y( + _self.into_inner(), + y, + ) + .into(); + output + } + /// Returns a vector containing the wrapping addition of `self` and `rhs`. + /// In other words this computes `[self.x.wrapping_add(rhs.x), self.y.wrapping_add(rhs.y), ..]`. + fn wrapping_add( + _self: Val, + rhs: Val, + ) -> Val { + let output: Val = bevy::math::I64Vec2::wrapping_add( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Returns a vector containing the wrapping addition of `self` and unsigned vector `rhs`. + /// In other words this computes `[self.x.wrapping_add_unsigned(rhs.x), self.y.wrapping_add_unsigned(rhs.y), ..]`. + fn wrapping_add_unsigned( + _self: Val, + rhs: Val, + ) -> Val { + let output: Val = bevy::math::I64Vec2::wrapping_add_unsigned( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Returns a vector containing the wrapping division of `self` and `rhs`. + /// In other words this computes `[self.x.wrapping_div(rhs.x), self.y.wrapping_div(rhs.y), ..]`. + fn wrapping_div( + _self: Val, + rhs: Val, + ) -> Val { + let output: Val = bevy::math::I64Vec2::wrapping_div( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Returns a vector containing the wrapping multiplication of `self` and `rhs`. + /// In other words this computes `[self.x.wrapping_mul(rhs.x), self.y.wrapping_mul(rhs.y), ..]`. + fn wrapping_mul( + _self: Val, + rhs: Val, + ) -> Val { + let output: Val = bevy::math::I64Vec2::wrapping_mul( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Returns a vector containing the wrapping subtraction of `self` and `rhs`. + /// In other words this computes `[self.x.wrapping_sub(rhs.x), self.y.wrapping_sub(rhs.y), ..]`. + fn wrapping_sub( + _self: Val, + rhs: Val, + ) -> Val { + let output: Val = bevy::math::I64Vec2::wrapping_sub( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Returns a vector containing the wrapping subtraction of `self` and unsigned vector `rhs`. + /// In other words this computes `[self.x.wrapping_sub_unsigned(rhs.x), self.y.wrapping_sub_unsigned(rhs.y), ..]`. + fn wrapping_sub_unsigned( + _self: Val, + rhs: Val, + ) -> Val { + let output: Val = bevy::math::I64Vec2::wrapping_sub_unsigned( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } +} +#[script_bindings( + remote, + name = "i_64_vec_3_functions", + bms_core_path = "bevy_mod_scripting_core", + generated +)] +impl bevy::math::I64Vec3 { + /// Returns a vector containing the absolute value of each element of `self`. + fn abs(_self: Val) -> Val { + let output: Val = bevy::math::I64Vec3::abs( + _self.into_inner(), + ) + .into(); + output + } + fn add( + _self: Val, + rhs: Ref, + ) -> Val { + let output: Val = >::add(_self.into_inner(), &rhs) + .into(); + output + } + fn add( + _self: Val, + rhs: Val, + ) -> Val { + let output: Val = >::add(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + fn add(_self: Val, rhs: i64) -> Val { + let output: Val = >::add(_self.into_inner(), rhs) + .into(); + output + } + /// Casts all elements of `self` to `f64`. + fn as_dvec3(_self: Ref) -> Val { + let output: Val = bevy::math::I64Vec3::as_dvec3(&_self) + .into(); + output + } + /// Casts all elements of `self` to `i16`. + fn as_i16vec3(_self: Ref) -> Val { + let output: Val = bevy::math::I64Vec3::as_i16vec3(&_self) + .into(); + output + } + /// Casts all elements of `self` to `i8`. + fn as_i8vec3(_self: Ref) -> Val { + let output: Val = bevy::math::I64Vec3::as_i8vec3(&_self) + .into(); + output + } + /// Casts all elements of `self` to `i32`. + fn as_ivec3(_self: Ref) -> Val { + let output: Val = bevy::math::I64Vec3::as_ivec3(&_self) + .into(); + output + } + /// Casts all elements of `self` to `u16`. + fn as_u16vec3(_self: Ref) -> Val { + let output: Val = bevy::math::I64Vec3::as_u16vec3(&_self) + .into(); + output + } + /// Casts all elements of `self` to `u64`. + fn as_u64vec3(_self: Ref) -> Val { + let output: Val = bevy::math::I64Vec3::as_u64vec3(&_self) + .into(); + output + } + /// Casts all elements of `self` to `u8`. + fn as_u8vec3(_self: Ref) -> Val { + let output: Val = bevy::math::I64Vec3::as_u8vec3(&_self) + .into(); + output + } + /// Casts all elements of `self` to `u32`. + fn as_uvec3(_self: Ref) -> Val { + let output: Val = bevy::math::I64Vec3::as_uvec3(&_self) + .into(); + output + } + /// Casts all elements of `self` to `f32`. + fn as_vec3(_self: Ref) -> Val { + let output: Val = bevy::math::I64Vec3::as_vec3(&_self).into(); + output + } + /// Casts all elements of `self` to `f32`. + fn as_vec3a(_self: Ref) -> Val { + let output: Val = bevy::math::I64Vec3::as_vec3a(&_self) + .into(); + output + } + fn assert_receiver_is_total_eq(_self: Ref) -> () { + let output: () = ::assert_receiver_is_total_eq( + &_self, + ) + .into(); + output + } + /// Component-wise clamping of values, similar to [`i64::clamp`]. + /// Each element in `min` must be less-or-equal to the corresponding element in `max`. + /// # Panics + /// Will panic if `min` is greater than `max` when `glam_assert` is enabled. + fn clamp( + _self: Val, + min: Val, + max: Val, + ) -> Val { + let output: Val = bevy::math::I64Vec3::clamp( + _self.into_inner(), + min.into_inner(), + max.into_inner(), + ) + .into(); + output + } + fn clone(_self: Ref) -> Val { + let output: Val = ::clone( + &_self, + ) + .into(); + output + } + /// Returns a vector mask containing the result of a `==` comparison for each element of + /// `self` and `rhs`. + /// In other words, this computes `[self.x == rhs.x, self.y == rhs.y, ..]` for all + /// elements. + fn cmpeq( + _self: Val, + rhs: Val, + ) -> Val { + let output: Val = bevy::math::I64Vec3::cmpeq( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Returns a vector mask containing the result of a `>=` comparison for each element of + /// `self` and `rhs`. + /// In other words this computes `[self.x >= rhs.x, self.y >= rhs.y, ..]` for all + /// elements. + fn cmpge( + _self: Val, + rhs: Val, + ) -> Val { + let output: Val = bevy::math::I64Vec3::cmpge( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Returns a vector mask containing the result of a `>` comparison for each element of + /// `self` and `rhs`. + /// In other words this computes `[self.x > rhs.x, self.y > rhs.y, ..]` for all + /// elements. + fn cmpgt( + _self: Val, + rhs: Val, + ) -> Val { + let output: Val = bevy::math::I64Vec3::cmpgt( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Returns a vector mask containing the result of a `<=` comparison for each element of + /// `self` and `rhs`. + /// In other words this computes `[self.x <= rhs.x, self.y <= rhs.y, ..]` for all + /// elements. + fn cmple( + _self: Val, + rhs: Val, + ) -> Val { + let output: Val = bevy::math::I64Vec3::cmple( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Returns a vector mask containing the result of a `<` comparison for each element of + /// `self` and `rhs`. + /// In other words this computes `[self.x < rhs.x, self.y < rhs.y, ..]` for all + /// elements. + fn cmplt( + _self: Val, + rhs: Val, + ) -> Val { + let output: Val = bevy::math::I64Vec3::cmplt( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Returns a vector mask containing the result of a `!=` comparison for each element of + /// `self` and `rhs`. + /// In other words this computes `[self.x != rhs.x, self.y != rhs.y, ..]` for all + /// elements. + fn cmpne( + _self: Val, + rhs: Val, + ) -> Val { + let output: Val = bevy::math::I64Vec3::cmpne( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Computes the cross product of `self` and `rhs`. + fn cross( + _self: Val, + rhs: Val, + ) -> Val { + let output: Val = bevy::math::I64Vec3::cross( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Compute the squared euclidean distance between two points in space. + fn distance_squared( + _self: Val, + rhs: Val, + ) -> i64 { + let output: i64 = bevy::math::I64Vec3::distance_squared( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + fn div( + _self: Val, + rhs: Ref, + ) -> Val { + let output: Val = >::div(_self.into_inner(), &rhs) + .into(); + output + } + fn div( + _self: Val, + rhs: Val, + ) -> Val { + let output: Val = >::div(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + fn div(_self: Val, rhs: i64) -> Val { + let output: Val = >::div(_self.into_inner(), rhs) + .into(); + output + } + /// Returns the element-wise quotient of [Euclidean division] of `self` by `rhs`. + /// # Panics + /// This function will panic if any `rhs` element is 0 or the division results in overflow. + fn div_euclid( + _self: Val, + rhs: Val, + ) -> Val { + let output: Val = bevy::math::I64Vec3::div_euclid( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Computes the dot product of `self` and `rhs`. + fn dot(_self: Val, rhs: Val) -> i64 { + let output: i64 = bevy::math::I64Vec3::dot(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + /// Returns a vector where every component is the dot product of `self` and `rhs`. + fn dot_into_vec( + _self: Val, + rhs: Val, + ) -> Val { + let output: Val = bevy::math::I64Vec3::dot_into_vec( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Returns the product of all elements of `self`. + /// In other words, this computes `self.x * self.y * ..`. + fn element_product(_self: Val) -> i64 { + let output: i64 = bevy::math::I64Vec3::element_product(_self.into_inner()) + .into(); + output + } + /// Returns the sum of all elements of `self`. + /// In other words, this computes `self.x + self.y + ..`. + fn element_sum(_self: Val) -> i64 { + let output: i64 = bevy::math::I64Vec3::element_sum(_self.into_inner()).into(); + output + } + fn eq(_self: Ref, other: Ref) -> bool { + let output: bool = >::eq(&_self, &other) + .into(); + output + } + /// Creates a 4D vector from `self` and the given `w` value. + fn extend(_self: Val, w: i64) -> Val { + let output: Val = bevy::math::I64Vec3::extend( + _self.into_inner(), + w, + ) + .into(); + output + } + /// Creates a new vector from an array. + fn from_array(a: [i64; 3]) -> Val { + let output: Val = bevy::math::I64Vec3::from_array(a).into(); + output + } + /// Returns a bitmask with the lowest 3 bits set to the sign bits from the elements of `self`. + /// A negative element results in a `1` bit and a positive element in a `0` bit. Element `x` goes + /// into the first lowest bit, element `y` into the second, etc. + fn is_negative_bitmask(_self: Val) -> u32 { + let output: u32 = bevy::math::I64Vec3::is_negative_bitmask(_self.into_inner()) + .into(); + output + } + /// Computes the squared length of `self`. + fn length_squared(_self: Val) -> i64 { + let output: i64 = bevy::math::I64Vec3::length_squared(_self.into_inner()).into(); + output + } + /// Returns a vector containing the maximum values for each element of `self` and `rhs`. + /// In other words this computes `[self.x.max(rhs.x), self.y.max(rhs.y), ..]`. + fn max( + _self: Val, + rhs: Val, + ) -> Val { + let output: Val = bevy::math::I64Vec3::max( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Returns the horizontal maximum of `self`. + /// In other words this computes `max(x, y, ..)`. + fn max_element(_self: Val) -> i64 { + let output: i64 = bevy::math::I64Vec3::max_element(_self.into_inner()).into(); + output + } + /// Returns a vector containing the minimum values for each element of `self` and `rhs`. + /// In other words this computes `[self.x.min(rhs.x), self.y.min(rhs.y), ..]`. + fn min( + _self: Val, + rhs: Val, + ) -> Val { + let output: Val = bevy::math::I64Vec3::min( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Returns the horizontal minimum of `self`. + /// In other words this computes `min(x, y, ..)`. + fn min_element(_self: Val) -> i64 { + let output: i64 = bevy::math::I64Vec3::min_element(_self.into_inner()).into(); + output + } + fn mul( + _self: Val, + rhs: Ref, + ) -> Val { + let output: Val = >::mul(_self.into_inner(), &rhs) + .into(); + output + } + fn mul( + _self: Val, + rhs: Val, + ) -> Val { + let output: Val = >::mul(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + fn mul(_self: Val, rhs: i64) -> Val { + let output: Val = >::mul(_self.into_inner(), rhs) + .into(); + output + } + fn neg(_self: Val) -> Val { + let output: Val = ::neg( + _self.into_inner(), + ) + .into(); + output + } + /// Creates a new vector. + fn new(x: i64, y: i64, z: i64) -> Val { + let output: Val = bevy::math::I64Vec3::new(x, y, z).into(); + output + } + fn rem( + _self: Val, + rhs: Ref, + ) -> Val { + let output: Val = >::rem(_self.into_inner(), &rhs) + .into(); + output + } + fn rem( + _self: Val, + rhs: Val, + ) -> Val { + let output: Val = >::rem(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + fn rem(_self: Val, rhs: i64) -> Val { + let output: Val = >::rem(_self.into_inner(), rhs) + .into(); + output + } + /// Returns the element-wise remainder of [Euclidean division] of `self` by `rhs`. + /// # Panics + /// This function will panic if any `rhs` element is 0 or the division results in overflow. + /// [Euclidean division]: i64::rem_euclid + fn rem_euclid( + _self: Val, + rhs: Val, + ) -> Val { + let output: Val = bevy::math::I64Vec3::rem_euclid( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Returns a vector containing the saturating addition of `self` and `rhs`. + /// In other words this computes `[self.x.saturating_add(rhs.x), self.y.saturating_add(rhs.y), ..]`. + fn saturating_add( + _self: Val, + rhs: Val, + ) -> Val { + let output: Val = bevy::math::I64Vec3::saturating_add( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// In other words this computes `[self.x.saturating_add_unsigned(rhs.x), self.y.saturating_add_unsigned(rhs.y), ..]`. + fn saturating_add_unsigned( + _self: Val, + rhs: Val, + ) -> Val { + let output: Val = bevy::math::I64Vec3::saturating_add_unsigned( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Returns a vector containing the saturating division of `self` and `rhs`. + /// In other words this computes `[self.x.saturating_div(rhs.x), self.y.saturating_div(rhs.y), ..]`. + fn saturating_div( + _self: Val, + rhs: Val, + ) -> Val { + let output: Val = bevy::math::I64Vec3::saturating_div( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Returns a vector containing the saturating multiplication of `self` and `rhs`. + /// In other words this computes `[self.x.saturating_mul(rhs.x), self.y.saturating_mul(rhs.y), ..]`. + fn saturating_mul( + _self: Val, + rhs: Val, + ) -> Val { + let output: Val = bevy::math::I64Vec3::saturating_mul( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Returns a vector containing the saturating subtraction of `self` and `rhs`. + /// In other words this computes `[self.x.saturating_sub(rhs.x), self.y.saturating_sub(rhs.y), ..]`. + fn saturating_sub( + _self: Val, + rhs: Val, + ) -> Val { + let output: Val = bevy::math::I64Vec3::saturating_sub( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Returns a vector containing the saturating subtraction of `self` and unsigned vector `rhs`. + /// In other words this computes `[self.x.saturating_sub_unsigned(rhs.x), self.y.saturating_sub_unsigned(rhs.y), ..]`. + fn saturating_sub_unsigned( + _self: Val, + rhs: Val, + ) -> Val { + let output: Val = bevy::math::I64Vec3::saturating_sub_unsigned( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Creates a vector from the elements in `if_true` and `if_false`, selecting which to use + /// for each element of `self`. + /// A true element in the mask uses the corresponding element from `if_true`, and false + /// uses the element from `if_false`. + fn select( + mask: Val, + if_true: Val, + if_false: Val, + ) -> Val { + let output: Val = bevy::math::I64Vec3::select( + mask.into_inner(), + if_true.into_inner(), + if_false.into_inner(), + ) + .into(); + output + } + /// Returns a vector with elements representing the sign of `self`. + /// - `0` if the number is zero + /// - `1` if the number is positive + /// - `-1` if the number is negative + fn signum(_self: Val) -> Val { + let output: Val = bevy::math::I64Vec3::signum( + _self.into_inner(), + ) + .into(); + output + } + /// Creates a vector with all elements set to `v`. + fn splat(v: i64) -> Val { + let output: Val = bevy::math::I64Vec3::splat(v).into(); + output + } + fn sub( + _self: Val, + rhs: Ref, + ) -> Val { + let output: Val = >::sub(_self.into_inner(), &rhs) + .into(); + output + } + fn sub( + _self: Val, + rhs: Val, + ) -> Val { + let output: Val = >::sub(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + fn sub(_self: Val, rhs: i64) -> Val { + let output: Val = >::sub(_self.into_inner(), rhs) + .into(); + output + } + /// `[x, y, z]` + fn to_array(_self: Ref) -> [i64; 3] { + let output: [i64; 3] = bevy::math::I64Vec3::to_array(&_self).into(); + output + } + /// Creates a 2D vector from the `x` and `y` elements of `self`, discarding `z`. + /// Truncation may also be performed by using [`self.xy()`][crate::swizzles::Vec3Swizzles::xy()]. + fn truncate(_self: Val) -> Val { + let output: Val = bevy::math::I64Vec3::truncate( + _self.into_inner(), + ) + .into(); + output + } + /// Creates a 3D vector from `self` with the given value of `x`. + fn with_x(_self: Val, x: i64) -> Val { + let output: Val = bevy::math::I64Vec3::with_x( + _self.into_inner(), + x, + ) + .into(); + output + } + /// Creates a 3D vector from `self` with the given value of `y`. + fn with_y(_self: Val, y: i64) -> Val { + let output: Val = bevy::math::I64Vec3::with_y( + _self.into_inner(), + y, + ) + .into(); + output + } + /// Creates a 3D vector from `self` with the given value of `z`. + fn with_z(_self: Val, z: i64) -> Val { + let output: Val = bevy::math::I64Vec3::with_z( + _self.into_inner(), + z, + ) + .into(); + output + } + /// Returns a vector containing the wrapping addition of `self` and `rhs`. + /// In other words this computes `[self.x.wrapping_add(rhs.x), self.y.wrapping_add(rhs.y), ..]`. + fn wrapping_add( + _self: Val, + rhs: Val, + ) -> Val { + let output: Val = bevy::math::I64Vec3::wrapping_add( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Returns a vector containing the wrapping addition of `self` and unsigned vector `rhs`. + /// In other words this computes `[self.x.wrapping_add_unsigned(rhs.x), self.y.wrapping_add_unsigned(rhs.y), ..]`. + fn wrapping_add_unsigned( + _self: Val, + rhs: Val, + ) -> Val { + let output: Val = bevy::math::I64Vec3::wrapping_add_unsigned( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Returns a vector containing the wrapping division of `self` and `rhs`. + /// In other words this computes `[self.x.wrapping_div(rhs.x), self.y.wrapping_div(rhs.y), ..]`. + fn wrapping_div( + _self: Val, + rhs: Val, + ) -> Val { + let output: Val = bevy::math::I64Vec3::wrapping_div( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Returns a vector containing the wrapping multiplication of `self` and `rhs`. + /// In other words this computes `[self.x.wrapping_mul(rhs.x), self.y.wrapping_mul(rhs.y), ..]`. + fn wrapping_mul( + _self: Val, + rhs: Val, + ) -> Val { + let output: Val = bevy::math::I64Vec3::wrapping_mul( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Returns a vector containing the wrapping subtraction of `self` and `rhs`. + /// In other words this computes `[self.x.wrapping_sub(rhs.x), self.y.wrapping_sub(rhs.y), ..]`. + fn wrapping_sub( + _self: Val, + rhs: Val, + ) -> Val { + let output: Val = bevy::math::I64Vec3::wrapping_sub( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Returns a vector containing the wrapping subtraction of `self` and unsigned vector `rhs`. + /// In other words this computes `[self.x.wrapping_sub_unsigned(rhs.x), self.y.wrapping_sub_unsigned(rhs.y), ..]`. + fn wrapping_sub_unsigned( + _self: Val, + rhs: Val, + ) -> Val { + let output: Val = bevy::math::I64Vec3::wrapping_sub_unsigned( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } +} +#[script_bindings( + remote, + name = "i_64_vec_4_functions", + bms_core_path = "bevy_mod_scripting_core", + generated +)] +impl bevy::math::I64Vec4 { + /// Returns a vector containing the absolute value of each element of `self`. + fn abs(_self: Val) -> Val { + let output: Val = bevy::math::I64Vec4::abs( + _self.into_inner(), + ) + .into(); + output + } + fn add( + _self: Val, + rhs: Ref, + ) -> Val { + let output: Val = >::add(_self.into_inner(), &rhs) + .into(); + output + } + fn add( + _self: Val, + rhs: Val, + ) -> Val { + let output: Val = >::add(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + fn add(_self: Val, rhs: i64) -> Val { + let output: Val = >::add(_self.into_inner(), rhs) + .into(); + output + } + /// Casts all elements of `self` to `f64`. + fn as_dvec4(_self: Ref) -> Val { + let output: Val = bevy::math::I64Vec4::as_dvec4(&_self) + .into(); + output + } + /// Casts all elements of `self` to `i16`. + fn as_i16vec4(_self: Ref) -> Val { + let output: Val = bevy::math::I64Vec4::as_i16vec4(&_self) + .into(); + output + } + /// Casts all elements of `self` to `i8`. + fn as_i8vec4(_self: Ref) -> Val { + let output: Val = bevy::math::I64Vec4::as_i8vec4(&_self) + .into(); + output + } + /// Casts all elements of `self` to `i32`. + fn as_ivec4(_self: Ref) -> Val { + let output: Val = bevy::math::I64Vec4::as_ivec4(&_self) + .into(); + output + } + /// Casts all elements of `self` to `u16`. + fn as_u16vec4(_self: Ref) -> Val { + let output: Val = bevy::math::I64Vec4::as_u16vec4(&_self) + .into(); + output + } + /// Casts all elements of `self` to `u64`. + fn as_u64vec4(_self: Ref) -> Val { + let output: Val = bevy::math::I64Vec4::as_u64vec4(&_self) + .into(); + output + } + /// Casts all elements of `self` to `u8`. + fn as_u8vec4(_self: Ref) -> Val { + let output: Val = bevy::math::I64Vec4::as_u8vec4(&_self) + .into(); + output + } + /// Casts all elements of `self` to `u32`. + fn as_uvec4(_self: Ref) -> Val { + let output: Val = bevy::math::I64Vec4::as_uvec4(&_self) + .into(); + output + } + /// Casts all elements of `self` to `f32`. + fn as_vec4(_self: Ref) -> Val { + let output: Val = bevy::math::I64Vec4::as_vec4(&_self).into(); + output + } + fn assert_receiver_is_total_eq(_self: Ref) -> () { + let output: () = ::assert_receiver_is_total_eq( + &_self, + ) + .into(); + output + } + /// Component-wise clamping of values, similar to [`i64::clamp`]. + /// Each element in `min` must be less-or-equal to the corresponding element in `max`. + /// # Panics + /// Will panic if `min` is greater than `max` when `glam_assert` is enabled. + fn clamp( + _self: Val, + min: Val, + max: Val, + ) -> Val { + let output: Val = bevy::math::I64Vec4::clamp( + _self.into_inner(), + min.into_inner(), + max.into_inner(), + ) + .into(); + output + } + fn clone(_self: Ref) -> Val { + let output: Val = ::clone( + &_self, + ) + .into(); + output + } + /// Returns a vector mask containing the result of a `==` comparison for each element of + /// `self` and `rhs`. + /// In other words, this computes `[self.x == rhs.x, self.y == rhs.y, ..]` for all + /// elements. + fn cmpeq( + _self: Val, + rhs: Val, + ) -> Val { + let output: Val = bevy::math::I64Vec4::cmpeq( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Returns a vector mask containing the result of a `>=` comparison for each element of + /// `self` and `rhs`. + /// In other words this computes `[self.x >= rhs.x, self.y >= rhs.y, ..]` for all + /// elements. + fn cmpge( + _self: Val, + rhs: Val, + ) -> Val { + let output: Val = bevy::math::I64Vec4::cmpge( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Returns a vector mask containing the result of a `>` comparison for each element of + /// `self` and `rhs`. + /// In other words this computes `[self.x > rhs.x, self.y > rhs.y, ..]` for all + /// elements. + fn cmpgt( + _self: Val, + rhs: Val, + ) -> Val { + let output: Val = bevy::math::I64Vec4::cmpgt( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Returns a vector mask containing the result of a `<=` comparison for each element of + /// `self` and `rhs`. + /// In other words this computes `[self.x <= rhs.x, self.y <= rhs.y, ..]` for all + /// elements. + fn cmple( + _self: Val, + rhs: Val, + ) -> Val { + let output: Val = bevy::math::I64Vec4::cmple( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Returns a vector mask containing the result of a `<` comparison for each element of + /// `self` and `rhs`. + /// In other words this computes `[self.x < rhs.x, self.y < rhs.y, ..]` for all + /// elements. + fn cmplt( + _self: Val, + rhs: Val, + ) -> Val { + let output: Val = bevy::math::I64Vec4::cmplt( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Returns a vector mask containing the result of a `!=` comparison for each element of + /// `self` and `rhs`. + /// In other words this computes `[self.x != rhs.x, self.y != rhs.y, ..]` for all + /// elements. + fn cmpne( + _self: Val, + rhs: Val, + ) -> Val { + let output: Val = bevy::math::I64Vec4::cmpne( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Compute the squared euclidean distance between two points in space. + fn distance_squared( + _self: Val, + rhs: Val, + ) -> i64 { + let output: i64 = bevy::math::I64Vec4::distance_squared( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + fn div( + _self: Val, + rhs: Ref, + ) -> Val { + let output: Val = >::div(_self.into_inner(), &rhs) + .into(); + output + } + fn div( + _self: Val, + rhs: Val, + ) -> Val { + let output: Val = >::div(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + fn div(_self: Val, rhs: i64) -> Val { + let output: Val = >::div(_self.into_inner(), rhs) + .into(); + output + } + /// Returns the element-wise quotient of [Euclidean division] of `self` by `rhs`. + /// # Panics + /// This function will panic if any `rhs` element is 0 or the division results in overflow. + fn div_euclid( + _self: Val, + rhs: Val, + ) -> Val { + let output: Val = bevy::math::I64Vec4::div_euclid( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Computes the dot product of `self` and `rhs`. + fn dot(_self: Val, rhs: Val) -> i64 { + let output: i64 = bevy::math::I64Vec4::dot(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + /// Returns a vector where every component is the dot product of `self` and `rhs`. + fn dot_into_vec( + _self: Val, + rhs: Val, + ) -> Val { + let output: Val = bevy::math::I64Vec4::dot_into_vec( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Returns the product of all elements of `self`. + /// In other words, this computes `self.x * self.y * ..`. + fn element_product(_self: Val) -> i64 { + let output: i64 = bevy::math::I64Vec4::element_product(_self.into_inner()) + .into(); + output + } + /// Returns the sum of all elements of `self`. + /// In other words, this computes `self.x + self.y + ..`. + fn element_sum(_self: Val) -> i64 { + let output: i64 = bevy::math::I64Vec4::element_sum(_self.into_inner()).into(); + output + } + fn eq(_self: Ref, other: Ref) -> bool { + let output: bool = >::eq(&_self, &other) + .into(); + output + } + /// Creates a new vector from an array. + fn from_array(a: [i64; 4]) -> Val { + let output: Val = bevy::math::I64Vec4::from_array(a).into(); + output + } + /// Returns a bitmask with the lowest 4 bits set to the sign bits from the elements of `self`. + /// A negative element results in a `1` bit and a positive element in a `0` bit. Element `x` goes + /// into the first lowest bit, element `y` into the second, etc. + fn is_negative_bitmask(_self: Val) -> u32 { + let output: u32 = bevy::math::I64Vec4::is_negative_bitmask(_self.into_inner()) + .into(); + output + } + /// Computes the squared length of `self`. + fn length_squared(_self: Val) -> i64 { + let output: i64 = bevy::math::I64Vec4::length_squared(_self.into_inner()).into(); + output + } + /// Returns a vector containing the maximum values for each element of `self` and `rhs`. + /// In other words this computes `[self.x.max(rhs.x), self.y.max(rhs.y), ..]`. + fn max( + _self: Val, + rhs: Val, + ) -> Val { + let output: Val = bevy::math::I64Vec4::max( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Returns the horizontal maximum of `self`. + /// In other words this computes `max(x, y, ..)`. + fn max_element(_self: Val) -> i64 { + let output: i64 = bevy::math::I64Vec4::max_element(_self.into_inner()).into(); + output + } + /// Returns a vector containing the minimum values for each element of `self` and `rhs`. + /// In other words this computes `[self.x.min(rhs.x), self.y.min(rhs.y), ..]`. + fn min( + _self: Val, + rhs: Val, + ) -> Val { + let output: Val = bevy::math::I64Vec4::min( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Returns the horizontal minimum of `self`. + /// In other words this computes `min(x, y, ..)`. + fn min_element(_self: Val) -> i64 { + let output: i64 = bevy::math::I64Vec4::min_element(_self.into_inner()).into(); + output + } + fn mul( + _self: Val, + rhs: Ref, + ) -> Val { + let output: Val = >::mul(_self.into_inner(), &rhs) + .into(); + output + } + fn mul( + _self: Val, + rhs: Val, + ) -> Val { + let output: Val = >::mul(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + fn mul(_self: Val, rhs: i64) -> Val { + let output: Val = >::mul(_self.into_inner(), rhs) + .into(); + output + } + fn neg(_self: Val) -> Val { + let output: Val = ::neg( + _self.into_inner(), + ) + .into(); + output + } + /// Creates a new vector. + fn new(x: i64, y: i64, z: i64, w: i64) -> Val { + let output: Val = bevy::math::I64Vec4::new(x, y, z, w) + .into(); + output + } + fn rem( + _self: Val, + rhs: Ref, + ) -> Val { + let output: Val = >::rem(_self.into_inner(), &rhs) + .into(); + output + } + fn rem( + _self: Val, + rhs: Val, + ) -> Val { + let output: Val = >::rem(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + fn rem(_self: Val, rhs: i64) -> Val { + let output: Val = >::rem(_self.into_inner(), rhs) + .into(); + output + } + /// Returns the element-wise remainder of [Euclidean division] of `self` by `rhs`. + /// # Panics + /// This function will panic if any `rhs` element is 0 or the division results in overflow. + /// [Euclidean division]: i64::rem_euclid + fn rem_euclid( + _self: Val, + rhs: Val, + ) -> Val { + let output: Val = bevy::math::I64Vec4::rem_euclid( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Returns a vector containing the saturating addition of `self` and `rhs`. + /// In other words this computes `[self.x.saturating_add(rhs.x), self.y.saturating_add(rhs.y), ..]`. + fn saturating_add( + _self: Val, + rhs: Val, + ) -> Val { + let output: Val = bevy::math::I64Vec4::saturating_add( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// In other words this computes `[self.x.saturating_add_unsigned(rhs.x), self.y.saturating_add_unsigned(rhs.y), ..]`. + fn saturating_add_unsigned( + _self: Val, + rhs: Val, + ) -> Val { + let output: Val = bevy::math::I64Vec4::saturating_add_unsigned( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Returns a vector containing the saturating division of `self` and `rhs`. + /// In other words this computes `[self.x.saturating_div(rhs.x), self.y.saturating_div(rhs.y), ..]`. + fn saturating_div( + _self: Val, + rhs: Val, + ) -> Val { + let output: Val = bevy::math::I64Vec4::saturating_div( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Returns a vector containing the saturating multiplication of `self` and `rhs`. + /// In other words this computes `[self.x.saturating_mul(rhs.x), self.y.saturating_mul(rhs.y), ..]`. + fn saturating_mul( + _self: Val, + rhs: Val, + ) -> Val { + let output: Val = bevy::math::I64Vec4::saturating_mul( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Returns a vector containing the saturating subtraction of `self` and `rhs`. + /// In other words this computes `[self.x.saturating_sub(rhs.x), self.y.saturating_sub(rhs.y), ..]`. + fn saturating_sub( + _self: Val, + rhs: Val, + ) -> Val { + let output: Val = bevy::math::I64Vec4::saturating_sub( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Returns a vector containing the saturating subtraction of `self` and unsigned vector `rhs`. + /// In other words this computes `[self.x.saturating_sub_unsigned(rhs.x), self.y.saturating_sub_unsigned(rhs.y), ..]`. + fn saturating_sub_unsigned( + _self: Val, + rhs: Val, + ) -> Val { + let output: Val = bevy::math::I64Vec4::saturating_sub_unsigned( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Creates a vector from the elements in `if_true` and `if_false`, selecting which to use + /// for each element of `self`. + /// A true element in the mask uses the corresponding element from `if_true`, and false + /// uses the element from `if_false`. + fn select( + mask: Val, + if_true: Val, + if_false: Val, + ) -> Val { + let output: Val = bevy::math::I64Vec4::select( + mask.into_inner(), + if_true.into_inner(), + if_false.into_inner(), + ) + .into(); + output + } + /// Returns a vector with elements representing the sign of `self`. + /// - `0` if the number is zero + /// - `1` if the number is positive + /// - `-1` if the number is negative + fn signum(_self: Val) -> Val { + let output: Val = bevy::math::I64Vec4::signum( + _self.into_inner(), + ) + .into(); + output + } + /// Creates a vector with all elements set to `v`. + fn splat(v: i64) -> Val { + let output: Val = bevy::math::I64Vec4::splat(v).into(); + output + } + fn sub( + _self: Val, + rhs: Ref, + ) -> Val { + let output: Val = >::sub(_self.into_inner(), &rhs) + .into(); + output + } + fn sub( + _self: Val, + rhs: Val, + ) -> Val { + let output: Val = >::sub(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + fn sub(_self: Val, rhs: i64) -> Val { + let output: Val = >::sub(_self.into_inner(), rhs) + .into(); + output + } + /// `[x, y, z, w]` + fn to_array(_self: Ref) -> [i64; 4] { + let output: [i64; 4] = bevy::math::I64Vec4::to_array(&_self).into(); + output + } + /// Creates a 3D vector from the `x`, `y` and `z` elements of `self`, discarding `w`. + /// Truncation to [`I64Vec3`] may also be performed by using [`self.xyz()`][crate::swizzles::Vec4Swizzles::xyz()]. + fn truncate(_self: Val) -> Val { + let output: Val = bevy::math::I64Vec4::truncate( + _self.into_inner(), + ) + .into(); + output + } + /// Creates a 4D vector from `self` with the given value of `w`. + fn with_w(_self: Val, w: i64) -> Val { + let output: Val = bevy::math::I64Vec4::with_w( + _self.into_inner(), + w, + ) + .into(); + output + } + /// Creates a 4D vector from `self` with the given value of `x`. + fn with_x(_self: Val, x: i64) -> Val { + let output: Val = bevy::math::I64Vec4::with_x( + _self.into_inner(), + x, + ) + .into(); + output + } + /// Creates a 4D vector from `self` with the given value of `y`. + fn with_y(_self: Val, y: i64) -> Val { + let output: Val = bevy::math::I64Vec4::with_y( + _self.into_inner(), + y, + ) + .into(); + output + } + /// Creates a 4D vector from `self` with the given value of `z`. + fn with_z(_self: Val, z: i64) -> Val { + let output: Val = bevy::math::I64Vec4::with_z( + _self.into_inner(), + z, + ) + .into(); + output + } + /// Returns a vector containing the wrapping addition of `self` and `rhs`. + /// In other words this computes `[self.x.wrapping_add(rhs.x), self.y.wrapping_add(rhs.y), ..]`. + fn wrapping_add( + _self: Val, + rhs: Val, + ) -> Val { + let output: Val = bevy::math::I64Vec4::wrapping_add( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Returns a vector containing the wrapping addition of `self` and unsigned vector `rhs`. + /// In other words this computes `[self.x.wrapping_add_unsigned(rhs.x), self.y.wrapping_add_unsigned(rhs.y), ..]`. + fn wrapping_add_unsigned( + _self: Val, rhs: Val, ) -> Val { let output: Val = bevy::math::I64Vec4::wrapping_add_unsigned( @@ -6736,10 +11335,3660 @@ impl bevy::math::I64Vec4 { /// Returns a vector containing the wrapping division of `self` and `rhs`. /// In other words this computes `[self.x.wrapping_div(rhs.x), self.y.wrapping_div(rhs.y), ..]`. fn wrapping_div( - _self: Val, - rhs: Val, - ) -> Val { - let output: Val = bevy::math::I64Vec4::wrapping_div( + _self: Val, + rhs: Val, + ) -> Val { + let output: Val = bevy::math::I64Vec4::wrapping_div( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Returns a vector containing the wrapping multiplication of `self` and `rhs`. + /// In other words this computes `[self.x.wrapping_mul(rhs.x), self.y.wrapping_mul(rhs.y), ..]`. + fn wrapping_mul( + _self: Val, + rhs: Val, + ) -> Val { + let output: Val = bevy::math::I64Vec4::wrapping_mul( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Returns a vector containing the wrapping subtraction of `self` and `rhs`. + /// In other words this computes `[self.x.wrapping_sub(rhs.x), self.y.wrapping_sub(rhs.y), ..]`. + fn wrapping_sub( + _self: Val, + rhs: Val, + ) -> Val { + let output: Val = bevy::math::I64Vec4::wrapping_sub( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Returns a vector containing the wrapping subtraction of `self` and unsigned vector `rhs`. + /// In other words this computes `[self.x.wrapping_sub_unsigned(rhs.x), self.y.wrapping_sub_unsigned(rhs.y), ..]`. + fn wrapping_sub_unsigned( + _self: Val, + rhs: Val, + ) -> Val { + let output: Val = bevy::math::I64Vec4::wrapping_sub_unsigned( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } +} +#[script_bindings( + remote, + name = "u_vec_2_functions", + bms_core_path = "bevy_mod_scripting_core", + generated +)] +impl bevy::math::UVec2 { + fn add( + _self: Val, + rhs: Ref, + ) -> Val { + let output: Val = >::add(_self.into_inner(), &rhs) + .into(); + output + } + fn add( + _self: Val, + rhs: Val, + ) -> Val { + let output: Val = >::add(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + fn add(_self: Val, rhs: u32) -> Val { + let output: Val = >::add(_self.into_inner(), rhs) + .into(); + output + } + /// Casts all elements of `self` to `f64`. + fn as_dvec2(_self: Ref) -> Val { + let output: Val = bevy::math::UVec2::as_dvec2(&_self).into(); + output + } + /// Casts all elements of `self` to `i16`. + fn as_i16vec2(_self: Ref) -> Val { + let output: Val = bevy::math::UVec2::as_i16vec2(&_self) + .into(); + output + } + /// Casts all elements of `self` to `i64`. + fn as_i64vec2(_self: Ref) -> Val { + let output: Val = bevy::math::UVec2::as_i64vec2(&_self) + .into(); + output + } + /// Casts all elements of `self` to `i8`. + fn as_i8vec2(_self: Ref) -> Val { + let output: Val = bevy::math::UVec2::as_i8vec2(&_self) + .into(); + output + } + /// Casts all elements of `self` to `i32`. + fn as_ivec2(_self: Ref) -> Val { + let output: Val = bevy::math::UVec2::as_ivec2(&_self).into(); + output + } + /// Casts all elements of `self` to `u16`. + fn as_u16vec2(_self: Ref) -> Val { + let output: Val = bevy::math::UVec2::as_u16vec2(&_self) + .into(); + output + } + /// Casts all elements of `self` to `u64`. + fn as_u64vec2(_self: Ref) -> Val { + let output: Val = bevy::math::UVec2::as_u64vec2(&_self) + .into(); + output + } + /// Casts all elements of `self` to `u8`. + fn as_u8vec2(_self: Ref) -> Val { + let output: Val = bevy::math::UVec2::as_u8vec2(&_self) + .into(); + output + } + /// Casts all elements of `self` to `f32`. + fn as_vec2(_self: Ref) -> Val { + let output: Val = bevy::math::UVec2::as_vec2(&_self).into(); + output + } + fn assert_receiver_is_total_eq(_self: Ref) -> () { + let output: () = ::assert_receiver_is_total_eq( + &_self, + ) + .into(); + output + } + /// Component-wise clamping of values, similar to [`u32::clamp`]. + /// Each element in `min` must be less-or-equal to the corresponding element in `max`. + /// # Panics + /// Will panic if `min` is greater than `max` when `glam_assert` is enabled. + fn clamp( + _self: Val, + min: Val, + max: Val, + ) -> Val { + let output: Val = bevy::math::UVec2::clamp( + _self.into_inner(), + min.into_inner(), + max.into_inner(), + ) + .into(); + output + } + fn clone(_self: Ref) -> Val { + let output: Val = ::clone( + &_self, + ) + .into(); + output + } + /// Returns a vector mask containing the result of a `==` comparison for each element of + /// `self` and `rhs`. + /// In other words, this computes `[self.x == rhs.x, self.y == rhs.y, ..]` for all + /// elements. + fn cmpeq( + _self: Val, + rhs: Val, + ) -> Val { + let output: Val = bevy::math::UVec2::cmpeq( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Returns a vector mask containing the result of a `>=` comparison for each element of + /// `self` and `rhs`. + /// In other words this computes `[self.x >= rhs.x, self.y >= rhs.y, ..]` for all + /// elements. + fn cmpge( + _self: Val, + rhs: Val, + ) -> Val { + let output: Val = bevy::math::UVec2::cmpge( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Returns a vector mask containing the result of a `>` comparison for each element of + /// `self` and `rhs`. + /// In other words this computes `[self.x > rhs.x, self.y > rhs.y, ..]` for all + /// elements. + fn cmpgt( + _self: Val, + rhs: Val, + ) -> Val { + let output: Val = bevy::math::UVec2::cmpgt( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Returns a vector mask containing the result of a `<=` comparison for each element of + /// `self` and `rhs`. + /// In other words this computes `[self.x <= rhs.x, self.y <= rhs.y, ..]` for all + /// elements. + fn cmple( + _self: Val, + rhs: Val, + ) -> Val { + let output: Val = bevy::math::UVec2::cmple( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Returns a vector mask containing the result of a `<` comparison for each element of + /// `self` and `rhs`. + /// In other words this computes `[self.x < rhs.x, self.y < rhs.y, ..]` for all + /// elements. + fn cmplt( + _self: Val, + rhs: Val, + ) -> Val { + let output: Val = bevy::math::UVec2::cmplt( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Returns a vector mask containing the result of a `!=` comparison for each element of + /// `self` and `rhs`. + /// In other words this computes `[self.x != rhs.x, self.y != rhs.y, ..]` for all + /// elements. + fn cmpne( + _self: Val, + rhs: Val, + ) -> Val { + let output: Val = bevy::math::UVec2::cmpne( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + fn div( + _self: Val, + rhs: Ref, + ) -> Val { + let output: Val = >::div(_self.into_inner(), &rhs) + .into(); + output + } + fn div( + _self: Val, + rhs: Val, + ) -> Val { + let output: Val = >::div(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + fn div(_self: Val, rhs: u32) -> Val { + let output: Val = >::div(_self.into_inner(), rhs) + .into(); + output + } + /// Computes the dot product of `self` and `rhs`. + fn dot(_self: Val, rhs: Val) -> u32 { + let output: u32 = bevy::math::UVec2::dot(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + /// Returns a vector where every component is the dot product of `self` and `rhs`. + fn dot_into_vec( + _self: Val, + rhs: Val, + ) -> Val { + let output: Val = bevy::math::UVec2::dot_into_vec( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Returns the product of all elements of `self`. + /// In other words, this computes `self.x * self.y * ..`. + fn element_product(_self: Val) -> u32 { + let output: u32 = bevy::math::UVec2::element_product(_self.into_inner()).into(); + output + } + /// Returns the sum of all elements of `self`. + /// In other words, this computes `self.x + self.y + ..`. + fn element_sum(_self: Val) -> u32 { + let output: u32 = bevy::math::UVec2::element_sum(_self.into_inner()).into(); + output + } + fn eq(_self: Ref, other: Ref) -> bool { + let output: bool = >::eq(&_self, &other) + .into(); + output + } + /// Creates a 3D vector from `self` and the given `z` value. + fn extend(_self: Val, z: u32) -> Val { + let output: Val = bevy::math::UVec2::extend( + _self.into_inner(), + z, + ) + .into(); + output + } + /// Creates a new vector from an array. + fn from_array(a: [u32; 2]) -> Val { + let output: Val = bevy::math::UVec2::from_array(a).into(); + output + } + /// Computes the squared length of `self`. + fn length_squared(_self: Val) -> u32 { + let output: u32 = bevy::math::UVec2::length_squared(_self.into_inner()).into(); + output + } + /// Returns a vector containing the maximum values for each element of `self` and `rhs`. + /// In other words this computes `[self.x.max(rhs.x), self.y.max(rhs.y), ..]`. + fn max( + _self: Val, + rhs: Val, + ) -> Val { + let output: Val = bevy::math::UVec2::max( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Returns the horizontal maximum of `self`. + /// In other words this computes `max(x, y, ..)`. + fn max_element(_self: Val) -> u32 { + let output: u32 = bevy::math::UVec2::max_element(_self.into_inner()).into(); + output + } + /// Returns a vector containing the minimum values for each element of `self` and `rhs`. + /// In other words this computes `[self.x.min(rhs.x), self.y.min(rhs.y), ..]`. + fn min( + _self: Val, + rhs: Val, + ) -> Val { + let output: Val = bevy::math::UVec2::min( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Returns the horizontal minimum of `self`. + /// In other words this computes `min(x, y, ..)`. + fn min_element(_self: Val) -> u32 { + let output: u32 = bevy::math::UVec2::min_element(_self.into_inner()).into(); + output + } + fn mul( + _self: Val, + rhs: Ref, + ) -> Val { + let output: Val = >::mul(_self.into_inner(), &rhs) + .into(); + output + } + fn mul( + _self: Val, + rhs: Val, + ) -> Val { + let output: Val = >::mul(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + fn mul(_self: Val, rhs: u32) -> Val { + let output: Val = >::mul(_self.into_inner(), rhs) + .into(); + output + } + /// Creates a new vector. + fn new(x: u32, y: u32) -> Val { + let output: Val = bevy::math::UVec2::new(x, y).into(); + output + } + fn rem( + _self: Val, + rhs: Ref, + ) -> Val { + let output: Val = >::rem(_self.into_inner(), &rhs) + .into(); + output + } + fn rem( + _self: Val, + rhs: Val, + ) -> Val { + let output: Val = >::rem(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + fn rem(_self: Val, rhs: u32) -> Val { + let output: Val = >::rem(_self.into_inner(), rhs) + .into(); + output + } + /// Returns a vector containing the saturating addition of `self` and `rhs`. + /// In other words this computes `[self.x.saturating_add(rhs.x), self.y.saturating_add(rhs.y), ..]`. + fn saturating_add( + _self: Val, + rhs: Val, + ) -> Val { + let output: Val = bevy::math::UVec2::saturating_add( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Returns a vector containing the saturating addition of `self` and signed vector `rhs`. + /// In other words this computes `[self.x.saturating_add_signed(rhs.x), self.y.saturating_add_signed(rhs.y), ..]`. + fn saturating_add_signed( + _self: Val, + rhs: Val, + ) -> Val { + let output: Val = bevy::math::UVec2::saturating_add_signed( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Returns a vector containing the saturating division of `self` and `rhs`. + /// In other words this computes `[self.x.saturating_div(rhs.x), self.y.saturating_div(rhs.y), ..]`. + fn saturating_div( + _self: Val, + rhs: Val, + ) -> Val { + let output: Val = bevy::math::UVec2::saturating_div( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Returns a vector containing the saturating multiplication of `self` and `rhs`. + /// In other words this computes `[self.x.saturating_mul(rhs.x), self.y.saturating_mul(rhs.y), ..]`. + fn saturating_mul( + _self: Val, + rhs: Val, + ) -> Val { + let output: Val = bevy::math::UVec2::saturating_mul( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Returns a vector containing the saturating subtraction of `self` and `rhs`. + /// In other words this computes `[self.x.saturating_sub(rhs.x), self.y.saturating_sub(rhs.y), ..]`. + fn saturating_sub( + _self: Val, + rhs: Val, + ) -> Val { + let output: Val = bevy::math::UVec2::saturating_sub( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Creates a vector from the elements in `if_true` and `if_false`, selecting which to use + /// for each element of `self`. + /// A true element in the mask uses the corresponding element from `if_true`, and false + /// uses the element from `if_false`. + fn select( + mask: Val, + if_true: Val, + if_false: Val, + ) -> Val { + let output: Val = bevy::math::UVec2::select( + mask.into_inner(), + if_true.into_inner(), + if_false.into_inner(), + ) + .into(); + output + } + /// Creates a vector with all elements set to `v`. + fn splat(v: u32) -> Val { + let output: Val = bevy::math::UVec2::splat(v).into(); + output + } + fn sub( + _self: Val, + rhs: Ref, + ) -> Val { + let output: Val = >::sub(_self.into_inner(), &rhs) + .into(); + output + } + fn sub( + _self: Val, + rhs: Val, + ) -> Val { + let output: Val = >::sub(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + fn sub(_self: Val, rhs: u32) -> Val { + let output: Val = >::sub(_self.into_inner(), rhs) + .into(); + output + } + /// `[x, y]` + fn to_array(_self: Ref) -> [u32; 2] { + let output: [u32; 2] = bevy::math::UVec2::to_array(&_self).into(); + output + } + /// Creates a 2D vector from `self` with the given value of `x`. + fn with_x(_self: Val, x: u32) -> Val { + let output: Val = bevy::math::UVec2::with_x( + _self.into_inner(), + x, + ) + .into(); + output + } + /// Creates a 2D vector from `self` with the given value of `y`. + fn with_y(_self: Val, y: u32) -> Val { + let output: Val = bevy::math::UVec2::with_y( + _self.into_inner(), + y, + ) + .into(); + output + } + /// Returns a vector containing the wrapping addition of `self` and `rhs`. + /// In other words this computes `[self.x.wrapping_add(rhs.x), self.y.wrapping_add(rhs.y), ..]`. + fn wrapping_add( + _self: Val, + rhs: Val, + ) -> Val { + let output: Val = bevy::math::UVec2::wrapping_add( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Returns a vector containing the wrapping addition of `self` and signed vector `rhs`. + /// In other words this computes `[self.x.wrapping_add_signed(rhs.x), self.y.wrapping_add_signed(rhs.y), ..]`. + fn wrapping_add_signed( + _self: Val, + rhs: Val, + ) -> Val { + let output: Val = bevy::math::UVec2::wrapping_add_signed( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Returns a vector containing the wrapping division of `self` and `rhs`. + /// In other words this computes `[self.x.wrapping_div(rhs.x), self.y.wrapping_div(rhs.y), ..]`. + fn wrapping_div( + _self: Val, + rhs: Val, + ) -> Val { + let output: Val = bevy::math::UVec2::wrapping_div( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Returns a vector containing the wrapping multiplication of `self` and `rhs`. + /// In other words this computes `[self.x.wrapping_mul(rhs.x), self.y.wrapping_mul(rhs.y), ..]`. + fn wrapping_mul( + _self: Val, + rhs: Val, + ) -> Val { + let output: Val = bevy::math::UVec2::wrapping_mul( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Returns a vector containing the wrapping subtraction of `self` and `rhs`. + /// In other words this computes `[self.x.wrapping_sub(rhs.x), self.y.wrapping_sub(rhs.y), ..]`. + fn wrapping_sub( + _self: Val, + rhs: Val, + ) -> Val { + let output: Val = bevy::math::UVec2::wrapping_sub( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } +} +#[script_bindings( + remote, + name = "u_vec_3_functions", + bms_core_path = "bevy_mod_scripting_core", + generated +)] +impl bevy::math::UVec3 { + fn add( + _self: Val, + rhs: Ref, + ) -> Val { + let output: Val = >::add(_self.into_inner(), &rhs) + .into(); + output + } + fn add( + _self: Val, + rhs: Val, + ) -> Val { + let output: Val = >::add(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + fn add(_self: Val, rhs: u32) -> Val { + let output: Val = >::add(_self.into_inner(), rhs) + .into(); + output + } + /// Casts all elements of `self` to `f64`. + fn as_dvec3(_self: Ref) -> Val { + let output: Val = bevy::math::UVec3::as_dvec3(&_self).into(); + output + } + /// Casts all elements of `self` to `i16`. + fn as_i16vec3(_self: Ref) -> Val { + let output: Val = bevy::math::UVec3::as_i16vec3(&_self) + .into(); + output + } + /// Casts all elements of `self` to `i64`. + fn as_i64vec3(_self: Ref) -> Val { + let output: Val = bevy::math::UVec3::as_i64vec3(&_self) + .into(); + output + } + /// Casts all elements of `self` to `i8`. + fn as_i8vec3(_self: Ref) -> Val { + let output: Val = bevy::math::UVec3::as_i8vec3(&_self) + .into(); + output + } + /// Casts all elements of `self` to `i32`. + fn as_ivec3(_self: Ref) -> Val { + let output: Val = bevy::math::UVec3::as_ivec3(&_self).into(); + output + } + /// Casts all elements of `self` to `u16`. + fn as_u16vec3(_self: Ref) -> Val { + let output: Val = bevy::math::UVec3::as_u16vec3(&_self) + .into(); + output + } + /// Casts all elements of `self` to `u64`. + fn as_u64vec3(_self: Ref) -> Val { + let output: Val = bevy::math::UVec3::as_u64vec3(&_self) + .into(); + output + } + /// Casts all elements of `self` to `u8`. + fn as_u8vec3(_self: Ref) -> Val { + let output: Val = bevy::math::UVec3::as_u8vec3(&_self) + .into(); + output + } + /// Casts all elements of `self` to `f32`. + fn as_vec3(_self: Ref) -> Val { + let output: Val = bevy::math::UVec3::as_vec3(&_self).into(); + output + } + /// Casts all elements of `self` to `f32`. + fn as_vec3a(_self: Ref) -> Val { + let output: Val = bevy::math::UVec3::as_vec3a(&_self).into(); + output + } + fn assert_receiver_is_total_eq(_self: Ref) -> () { + let output: () = ::assert_receiver_is_total_eq( + &_self, + ) + .into(); + output + } + /// Component-wise clamping of values, similar to [`u32::clamp`]. + /// Each element in `min` must be less-or-equal to the corresponding element in `max`. + /// # Panics + /// Will panic if `min` is greater than `max` when `glam_assert` is enabled. + fn clamp( + _self: Val, + min: Val, + max: Val, + ) -> Val { + let output: Val = bevy::math::UVec3::clamp( + _self.into_inner(), + min.into_inner(), + max.into_inner(), + ) + .into(); + output + } + fn clone(_self: Ref) -> Val { + let output: Val = ::clone( + &_self, + ) + .into(); + output + } + /// Returns a vector mask containing the result of a `==` comparison for each element of + /// `self` and `rhs`. + /// In other words, this computes `[self.x == rhs.x, self.y == rhs.y, ..]` for all + /// elements. + fn cmpeq( + _self: Val, + rhs: Val, + ) -> Val { + let output: Val = bevy::math::UVec3::cmpeq( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Returns a vector mask containing the result of a `>=` comparison for each element of + /// `self` and `rhs`. + /// In other words this computes `[self.x >= rhs.x, self.y >= rhs.y, ..]` for all + /// elements. + fn cmpge( + _self: Val, + rhs: Val, + ) -> Val { + let output: Val = bevy::math::UVec3::cmpge( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Returns a vector mask containing the result of a `>` comparison for each element of + /// `self` and `rhs`. + /// In other words this computes `[self.x > rhs.x, self.y > rhs.y, ..]` for all + /// elements. + fn cmpgt( + _self: Val, + rhs: Val, + ) -> Val { + let output: Val = bevy::math::UVec3::cmpgt( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Returns a vector mask containing the result of a `<=` comparison for each element of + /// `self` and `rhs`. + /// In other words this computes `[self.x <= rhs.x, self.y <= rhs.y, ..]` for all + /// elements. + fn cmple( + _self: Val, + rhs: Val, + ) -> Val { + let output: Val = bevy::math::UVec3::cmple( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Returns a vector mask containing the result of a `<` comparison for each element of + /// `self` and `rhs`. + /// In other words this computes `[self.x < rhs.x, self.y < rhs.y, ..]` for all + /// elements. + fn cmplt( + _self: Val, + rhs: Val, + ) -> Val { + let output: Val = bevy::math::UVec3::cmplt( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Returns a vector mask containing the result of a `!=` comparison for each element of + /// `self` and `rhs`. + /// In other words this computes `[self.x != rhs.x, self.y != rhs.y, ..]` for all + /// elements. + fn cmpne( + _self: Val, + rhs: Val, + ) -> Val { + let output: Val = bevy::math::UVec3::cmpne( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Computes the cross product of `self` and `rhs`. + fn cross( + _self: Val, + rhs: Val, + ) -> Val { + let output: Val = bevy::math::UVec3::cross( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + fn div( + _self: Val, + rhs: Ref, + ) -> Val { + let output: Val = >::div(_self.into_inner(), &rhs) + .into(); + output + } + fn div( + _self: Val, + rhs: Val, + ) -> Val { + let output: Val = >::div(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + fn div(_self: Val, rhs: u32) -> Val { + let output: Val = >::div(_self.into_inner(), rhs) + .into(); + output + } + /// Computes the dot product of `self` and `rhs`. + fn dot(_self: Val, rhs: Val) -> u32 { + let output: u32 = bevy::math::UVec3::dot(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + /// Returns a vector where every component is the dot product of `self` and `rhs`. + fn dot_into_vec( + _self: Val, + rhs: Val, + ) -> Val { + let output: Val = bevy::math::UVec3::dot_into_vec( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Returns the product of all elements of `self`. + /// In other words, this computes `self.x * self.y * ..`. + fn element_product(_self: Val) -> u32 { + let output: u32 = bevy::math::UVec3::element_product(_self.into_inner()).into(); + output + } + /// Returns the sum of all elements of `self`. + /// In other words, this computes `self.x + self.y + ..`. + fn element_sum(_self: Val) -> u32 { + let output: u32 = bevy::math::UVec3::element_sum(_self.into_inner()).into(); + output + } + fn eq(_self: Ref, other: Ref) -> bool { + let output: bool = >::eq(&_self, &other) + .into(); + output + } + /// Creates a 4D vector from `self` and the given `w` value. + fn extend(_self: Val, w: u32) -> Val { + let output: Val = bevy::math::UVec3::extend( + _self.into_inner(), + w, + ) + .into(); + output + } + /// Creates a new vector from an array. + fn from_array(a: [u32; 3]) -> Val { + let output: Val = bevy::math::UVec3::from_array(a).into(); + output + } + /// Computes the squared length of `self`. + fn length_squared(_self: Val) -> u32 { + let output: u32 = bevy::math::UVec3::length_squared(_self.into_inner()).into(); + output + } + /// Returns a vector containing the maximum values for each element of `self` and `rhs`. + /// In other words this computes `[self.x.max(rhs.x), self.y.max(rhs.y), ..]`. + fn max( + _self: Val, + rhs: Val, + ) -> Val { + let output: Val = bevy::math::UVec3::max( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Returns the horizontal maximum of `self`. + /// In other words this computes `max(x, y, ..)`. + fn max_element(_self: Val) -> u32 { + let output: u32 = bevy::math::UVec3::max_element(_self.into_inner()).into(); + output + } + /// Returns a vector containing the minimum values for each element of `self` and `rhs`. + /// In other words this computes `[self.x.min(rhs.x), self.y.min(rhs.y), ..]`. + fn min( + _self: Val, + rhs: Val, + ) -> Val { + let output: Val = bevy::math::UVec3::min( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Returns the horizontal minimum of `self`. + /// In other words this computes `min(x, y, ..)`. + fn min_element(_self: Val) -> u32 { + let output: u32 = bevy::math::UVec3::min_element(_self.into_inner()).into(); + output + } + fn mul( + _self: Val, + rhs: Ref, + ) -> Val { + let output: Val = >::mul(_self.into_inner(), &rhs) + .into(); + output + } + fn mul( + _self: Val, + rhs: Val, + ) -> Val { + let output: Val = >::mul(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + fn mul(_self: Val, rhs: u32) -> Val { + let output: Val = >::mul(_self.into_inner(), rhs) + .into(); + output + } + /// Creates a new vector. + fn new(x: u32, y: u32, z: u32) -> Val { + let output: Val = bevy::math::UVec3::new(x, y, z).into(); + output + } + fn rem( + _self: Val, + rhs: Ref, + ) -> Val { + let output: Val = >::rem(_self.into_inner(), &rhs) + .into(); + output + } + fn rem( + _self: Val, + rhs: Val, + ) -> Val { + let output: Val = >::rem(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + fn rem(_self: Val, rhs: u32) -> Val { + let output: Val = >::rem(_self.into_inner(), rhs) + .into(); + output + } + /// Returns a vector containing the saturating addition of `self` and `rhs`. + /// In other words this computes `[self.x.saturating_add(rhs.x), self.y.saturating_add(rhs.y), ..]`. + fn saturating_add( + _self: Val, + rhs: Val, + ) -> Val { + let output: Val = bevy::math::UVec3::saturating_add( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Returns a vector containing the saturating addition of `self` and signed vector `rhs`. + /// In other words this computes `[self.x.saturating_add_signed(rhs.x), self.y.saturating_add_signed(rhs.y), ..]`. + fn saturating_add_signed( + _self: Val, + rhs: Val, + ) -> Val { + let output: Val = bevy::math::UVec3::saturating_add_signed( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Returns a vector containing the saturating division of `self` and `rhs`. + /// In other words this computes `[self.x.saturating_div(rhs.x), self.y.saturating_div(rhs.y), ..]`. + fn saturating_div( + _self: Val, + rhs: Val, + ) -> Val { + let output: Val = bevy::math::UVec3::saturating_div( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Returns a vector containing the saturating multiplication of `self` and `rhs`. + /// In other words this computes `[self.x.saturating_mul(rhs.x), self.y.saturating_mul(rhs.y), ..]`. + fn saturating_mul( + _self: Val, + rhs: Val, + ) -> Val { + let output: Val = bevy::math::UVec3::saturating_mul( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Returns a vector containing the saturating subtraction of `self` and `rhs`. + /// In other words this computes `[self.x.saturating_sub(rhs.x), self.y.saturating_sub(rhs.y), ..]`. + fn saturating_sub( + _self: Val, + rhs: Val, + ) -> Val { + let output: Val = bevy::math::UVec3::saturating_sub( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Creates a vector from the elements in `if_true` and `if_false`, selecting which to use + /// for each element of `self`. + /// A true element in the mask uses the corresponding element from `if_true`, and false + /// uses the element from `if_false`. + fn select( + mask: Val, + if_true: Val, + if_false: Val, + ) -> Val { + let output: Val = bevy::math::UVec3::select( + mask.into_inner(), + if_true.into_inner(), + if_false.into_inner(), + ) + .into(); + output + } + /// Creates a vector with all elements set to `v`. + fn splat(v: u32) -> Val { + let output: Val = bevy::math::UVec3::splat(v).into(); + output + } + fn sub( + _self: Val, + rhs: Ref, + ) -> Val { + let output: Val = >::sub(_self.into_inner(), &rhs) + .into(); + output + } + fn sub( + _self: Val, + rhs: Val, + ) -> Val { + let output: Val = >::sub(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + fn sub(_self: Val, rhs: u32) -> Val { + let output: Val = >::sub(_self.into_inner(), rhs) + .into(); + output + } + /// `[x, y, z]` + fn to_array(_self: Ref) -> [u32; 3] { + let output: [u32; 3] = bevy::math::UVec3::to_array(&_self).into(); + output + } + /// Creates a 2D vector from the `x` and `y` elements of `self`, discarding `z`. + /// Truncation may also be performed by using [`self.xy()`][crate::swizzles::Vec3Swizzles::xy()]. + fn truncate(_self: Val) -> Val { + let output: Val = bevy::math::UVec3::truncate( + _self.into_inner(), + ) + .into(); + output + } + /// Creates a 3D vector from `self` with the given value of `x`. + fn with_x(_self: Val, x: u32) -> Val { + let output: Val = bevy::math::UVec3::with_x( + _self.into_inner(), + x, + ) + .into(); + output + } + /// Creates a 3D vector from `self` with the given value of `y`. + fn with_y(_self: Val, y: u32) -> Val { + let output: Val = bevy::math::UVec3::with_y( + _self.into_inner(), + y, + ) + .into(); + output + } + /// Creates a 3D vector from `self` with the given value of `z`. + fn with_z(_self: Val, z: u32) -> Val { + let output: Val = bevy::math::UVec3::with_z( + _self.into_inner(), + z, + ) + .into(); + output + } + /// Returns a vector containing the wrapping addition of `self` and `rhs`. + /// In other words this computes `[self.x.wrapping_add(rhs.x), self.y.wrapping_add(rhs.y), ..]`. + fn wrapping_add( + _self: Val, + rhs: Val, + ) -> Val { + let output: Val = bevy::math::UVec3::wrapping_add( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Returns a vector containing the wrapping addition of `self` and signed vector `rhs`. + /// In other words this computes `[self.x.wrapping_add_signed(rhs.x), self.y.wrapping_add_signed(rhs.y), ..]`. + fn wrapping_add_signed( + _self: Val, + rhs: Val, + ) -> Val { + let output: Val = bevy::math::UVec3::wrapping_add_signed( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Returns a vector containing the wrapping division of `self` and `rhs`. + /// In other words this computes `[self.x.wrapping_div(rhs.x), self.y.wrapping_div(rhs.y), ..]`. + fn wrapping_div( + _self: Val, + rhs: Val, + ) -> Val { + let output: Val = bevy::math::UVec3::wrapping_div( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Returns a vector containing the wrapping multiplication of `self` and `rhs`. + /// In other words this computes `[self.x.wrapping_mul(rhs.x), self.y.wrapping_mul(rhs.y), ..]`. + fn wrapping_mul( + _self: Val, + rhs: Val, + ) -> Val { + let output: Val = bevy::math::UVec3::wrapping_mul( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Returns a vector containing the wrapping subtraction of `self` and `rhs`. + /// In other words this computes `[self.x.wrapping_sub(rhs.x), self.y.wrapping_sub(rhs.y), ..]`. + fn wrapping_sub( + _self: Val, + rhs: Val, + ) -> Val { + let output: Val = bevy::math::UVec3::wrapping_sub( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } +} +#[script_bindings( + remote, + name = "u_vec_4_functions", + bms_core_path = "bevy_mod_scripting_core", + generated +)] +impl bevy::math::UVec4 { + fn add( + _self: Val, + rhs: Ref, + ) -> Val { + let output: Val = >::add(_self.into_inner(), &rhs) + .into(); + output + } + fn add( + _self: Val, + rhs: Val, + ) -> Val { + let output: Val = >::add(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + fn add(_self: Val, rhs: u32) -> Val { + let output: Val = >::add(_self.into_inner(), rhs) + .into(); + output + } + /// Casts all elements of `self` to `f64`. + fn as_dvec4(_self: Ref) -> Val { + let output: Val = bevy::math::UVec4::as_dvec4(&_self).into(); + output + } + /// Casts all elements of `self` to `i16`. + fn as_i16vec4(_self: Ref) -> Val { + let output: Val = bevy::math::UVec4::as_i16vec4(&_self) + .into(); + output + } + /// Casts all elements of `self` to `i64`. + fn as_i64vec4(_self: Ref) -> Val { + let output: Val = bevy::math::UVec4::as_i64vec4(&_self) + .into(); + output + } + /// Casts all elements of `self` to `i8`. + fn as_i8vec4(_self: Ref) -> Val { + let output: Val = bevy::math::UVec4::as_i8vec4(&_self) + .into(); + output + } + /// Casts all elements of `self` to `i32`. + fn as_ivec4(_self: Ref) -> Val { + let output: Val = bevy::math::UVec4::as_ivec4(&_self).into(); + output + } + /// Casts all elements of `self` to `u16`. + fn as_u16vec4(_self: Ref) -> Val { + let output: Val = bevy::math::UVec4::as_u16vec4(&_self) + .into(); + output + } + /// Casts all elements of `self` to `u64`. + fn as_u64vec4(_self: Ref) -> Val { + let output: Val = bevy::math::UVec4::as_u64vec4(&_self) + .into(); + output + } + /// Casts all elements of `self` to `u8`. + fn as_u8vec4(_self: Ref) -> Val { + let output: Val = bevy::math::UVec4::as_u8vec4(&_self) + .into(); + output + } + /// Casts all elements of `self` to `f32`. + fn as_vec4(_self: Ref) -> Val { + let output: Val = bevy::math::UVec4::as_vec4(&_self).into(); + output + } + fn assert_receiver_is_total_eq(_self: Ref) -> () { + let output: () = ::assert_receiver_is_total_eq( + &_self, + ) + .into(); + output + } + /// Component-wise clamping of values, similar to [`u32::clamp`]. + /// Each element in `min` must be less-or-equal to the corresponding element in `max`. + /// # Panics + /// Will panic if `min` is greater than `max` when `glam_assert` is enabled. + fn clamp( + _self: Val, + min: Val, + max: Val, + ) -> Val { + let output: Val = bevy::math::UVec4::clamp( + _self.into_inner(), + min.into_inner(), + max.into_inner(), + ) + .into(); + output + } + fn clone(_self: Ref) -> Val { + let output: Val = ::clone( + &_self, + ) + .into(); + output + } + /// Returns a vector mask containing the result of a `==` comparison for each element of + /// `self` and `rhs`. + /// In other words, this computes `[self.x == rhs.x, self.y == rhs.y, ..]` for all + /// elements. + fn cmpeq( + _self: Val, + rhs: Val, + ) -> Val { + let output: Val = bevy::math::UVec4::cmpeq( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Returns a vector mask containing the result of a `>=` comparison for each element of + /// `self` and `rhs`. + /// In other words this computes `[self.x >= rhs.x, self.y >= rhs.y, ..]` for all + /// elements. + fn cmpge( + _self: Val, + rhs: Val, + ) -> Val { + let output: Val = bevy::math::UVec4::cmpge( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Returns a vector mask containing the result of a `>` comparison for each element of + /// `self` and `rhs`. + /// In other words this computes `[self.x > rhs.x, self.y > rhs.y, ..]` for all + /// elements. + fn cmpgt( + _self: Val, + rhs: Val, + ) -> Val { + let output: Val = bevy::math::UVec4::cmpgt( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Returns a vector mask containing the result of a `<=` comparison for each element of + /// `self` and `rhs`. + /// In other words this computes `[self.x <= rhs.x, self.y <= rhs.y, ..]` for all + /// elements. + fn cmple( + _self: Val, + rhs: Val, + ) -> Val { + let output: Val = bevy::math::UVec4::cmple( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Returns a vector mask containing the result of a `<` comparison for each element of + /// `self` and `rhs`. + /// In other words this computes `[self.x < rhs.x, self.y < rhs.y, ..]` for all + /// elements. + fn cmplt( + _self: Val, + rhs: Val, + ) -> Val { + let output: Val = bevy::math::UVec4::cmplt( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Returns a vector mask containing the result of a `!=` comparison for each element of + /// `self` and `rhs`. + /// In other words this computes `[self.x != rhs.x, self.y != rhs.y, ..]` for all + /// elements. + fn cmpne( + _self: Val, + rhs: Val, + ) -> Val { + let output: Val = bevy::math::UVec4::cmpne( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + fn div( + _self: Val, + rhs: Ref, + ) -> Val { + let output: Val = >::div(_self.into_inner(), &rhs) + .into(); + output + } + fn div( + _self: Val, + rhs: Val, + ) -> Val { + let output: Val = >::div(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + fn div(_self: Val, rhs: u32) -> Val { + let output: Val = >::div(_self.into_inner(), rhs) + .into(); + output + } + /// Computes the dot product of `self` and `rhs`. + fn dot(_self: Val, rhs: Val) -> u32 { + let output: u32 = bevy::math::UVec4::dot(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + /// Returns a vector where every component is the dot product of `self` and `rhs`. + fn dot_into_vec( + _self: Val, + rhs: Val, + ) -> Val { + let output: Val = bevy::math::UVec4::dot_into_vec( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Returns the product of all elements of `self`. + /// In other words, this computes `self.x * self.y * ..`. + fn element_product(_self: Val) -> u32 { + let output: u32 = bevy::math::UVec4::element_product(_self.into_inner()).into(); + output + } + /// Returns the sum of all elements of `self`. + /// In other words, this computes `self.x + self.y + ..`. + fn element_sum(_self: Val) -> u32 { + let output: u32 = bevy::math::UVec4::element_sum(_self.into_inner()).into(); + output + } + fn eq(_self: Ref, other: Ref) -> bool { + let output: bool = >::eq(&_self, &other) + .into(); + output + } + /// Creates a new vector from an array. + fn from_array(a: [u32; 4]) -> Val { + let output: Val = bevy::math::UVec4::from_array(a).into(); + output + } + /// Computes the squared length of `self`. + fn length_squared(_self: Val) -> u32 { + let output: u32 = bevy::math::UVec4::length_squared(_self.into_inner()).into(); + output + } + /// Returns a vector containing the maximum values for each element of `self` and `rhs`. + /// In other words this computes `[self.x.max(rhs.x), self.y.max(rhs.y), ..]`. + fn max( + _self: Val, + rhs: Val, + ) -> Val { + let output: Val = bevy::math::UVec4::max( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Returns the horizontal maximum of `self`. + /// In other words this computes `max(x, y, ..)`. + fn max_element(_self: Val) -> u32 { + let output: u32 = bevy::math::UVec4::max_element(_self.into_inner()).into(); + output + } + /// Returns a vector containing the minimum values for each element of `self` and `rhs`. + /// In other words this computes `[self.x.min(rhs.x), self.y.min(rhs.y), ..]`. + fn min( + _self: Val, + rhs: Val, + ) -> Val { + let output: Val = bevy::math::UVec4::min( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Returns the horizontal minimum of `self`. + /// In other words this computes `min(x, y, ..)`. + fn min_element(_self: Val) -> u32 { + let output: u32 = bevy::math::UVec4::min_element(_self.into_inner()).into(); + output + } + fn mul( + _self: Val, + rhs: Ref, + ) -> Val { + let output: Val = >::mul(_self.into_inner(), &rhs) + .into(); + output + } + fn mul( + _self: Val, + rhs: Val, + ) -> Val { + let output: Val = >::mul(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + fn mul(_self: Val, rhs: u32) -> Val { + let output: Val = >::mul(_self.into_inner(), rhs) + .into(); + output + } + /// Creates a new vector. + fn new(x: u32, y: u32, z: u32, w: u32) -> Val { + let output: Val = bevy::math::UVec4::new(x, y, z, w).into(); + output + } + fn rem( + _self: Val, + rhs: Ref, + ) -> Val { + let output: Val = >::rem(_self.into_inner(), &rhs) + .into(); + output + } + fn rem( + _self: Val, + rhs: Val, + ) -> Val { + let output: Val = >::rem(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + fn rem(_self: Val, rhs: u32) -> Val { + let output: Val = >::rem(_self.into_inner(), rhs) + .into(); + output + } + /// Returns a vector containing the saturating addition of `self` and `rhs`. + /// In other words this computes `[self.x.saturating_add(rhs.x), self.y.saturating_add(rhs.y), ..]`. + fn saturating_add( + _self: Val, + rhs: Val, + ) -> Val { + let output: Val = bevy::math::UVec4::saturating_add( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Returns a vector containing the saturating addition of `self` and signed vector `rhs`. + /// In other words this computes `[self.x.saturating_add_signed(rhs.x), self.y.saturating_add_signed(rhs.y), ..]`. + fn saturating_add_signed( + _self: Val, + rhs: Val, + ) -> Val { + let output: Val = bevy::math::UVec4::saturating_add_signed( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Returns a vector containing the saturating division of `self` and `rhs`. + /// In other words this computes `[self.x.saturating_div(rhs.x), self.y.saturating_div(rhs.y), ..]`. + fn saturating_div( + _self: Val, + rhs: Val, + ) -> Val { + let output: Val = bevy::math::UVec4::saturating_div( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Returns a vector containing the saturating multiplication of `self` and `rhs`. + /// In other words this computes `[self.x.saturating_mul(rhs.x), self.y.saturating_mul(rhs.y), ..]`. + fn saturating_mul( + _self: Val, + rhs: Val, + ) -> Val { + let output: Val = bevy::math::UVec4::saturating_mul( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Returns a vector containing the saturating subtraction of `self` and `rhs`. + /// In other words this computes `[self.x.saturating_sub(rhs.x), self.y.saturating_sub(rhs.y), ..]`. + fn saturating_sub( + _self: Val, + rhs: Val, + ) -> Val { + let output: Val = bevy::math::UVec4::saturating_sub( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Creates a vector from the elements in `if_true` and `if_false`, selecting which to use + /// for each element of `self`. + /// A true element in the mask uses the corresponding element from `if_true`, and false + /// uses the element from `if_false`. + fn select( + mask: Val, + if_true: Val, + if_false: Val, + ) -> Val { + let output: Val = bevy::math::UVec4::select( + mask.into_inner(), + if_true.into_inner(), + if_false.into_inner(), + ) + .into(); + output + } + /// Creates a vector with all elements set to `v`. + fn splat(v: u32) -> Val { + let output: Val = bevy::math::UVec4::splat(v).into(); + output + } + fn sub( + _self: Val, + rhs: Ref, + ) -> Val { + let output: Val = >::sub(_self.into_inner(), &rhs) + .into(); + output + } + fn sub( + _self: Val, + rhs: Val, + ) -> Val { + let output: Val = >::sub(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + fn sub(_self: Val, rhs: u32) -> Val { + let output: Val = >::sub(_self.into_inner(), rhs) + .into(); + output + } + /// `[x, y, z, w]` + fn to_array(_self: Ref) -> [u32; 4] { + let output: [u32; 4] = bevy::math::UVec4::to_array(&_self).into(); + output + } + /// Creates a 3D vector from the `x`, `y` and `z` elements of `self`, discarding `w`. + /// Truncation to [`UVec3`] may also be performed by using [`self.xyz()`][crate::swizzles::Vec4Swizzles::xyz()]. + fn truncate(_self: Val) -> Val { + let output: Val = bevy::math::UVec4::truncate( + _self.into_inner(), + ) + .into(); + output + } + /// Creates a 4D vector from `self` with the given value of `w`. + fn with_w(_self: Val, w: u32) -> Val { + let output: Val = bevy::math::UVec4::with_w( + _self.into_inner(), + w, + ) + .into(); + output + } + /// Creates a 4D vector from `self` with the given value of `x`. + fn with_x(_self: Val, x: u32) -> Val { + let output: Val = bevy::math::UVec4::with_x( + _self.into_inner(), + x, + ) + .into(); + output + } + /// Creates a 4D vector from `self` with the given value of `y`. + fn with_y(_self: Val, y: u32) -> Val { + let output: Val = bevy::math::UVec4::with_y( + _self.into_inner(), + y, + ) + .into(); + output + } + /// Creates a 4D vector from `self` with the given value of `z`. + fn with_z(_self: Val, z: u32) -> Val { + let output: Val = bevy::math::UVec4::with_z( + _self.into_inner(), + z, + ) + .into(); + output + } + /// Returns a vector containing the wrapping addition of `self` and `rhs`. + /// In other words this computes `[self.x.wrapping_add(rhs.x), self.y.wrapping_add(rhs.y), ..]`. + fn wrapping_add( + _self: Val, + rhs: Val, + ) -> Val { + let output: Val = bevy::math::UVec4::wrapping_add( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Returns a vector containing the wrapping addition of `self` and signed vector `rhs`. + /// In other words this computes `[self.x.wrapping_add_signed(rhs.x), self.y.wrapping_add_signed(rhs.y), ..]`. + fn wrapping_add_signed( + _self: Val, + rhs: Val, + ) -> Val { + let output: Val = bevy::math::UVec4::wrapping_add_signed( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Returns a vector containing the wrapping division of `self` and `rhs`. + /// In other words this computes `[self.x.wrapping_div(rhs.x), self.y.wrapping_div(rhs.y), ..]`. + fn wrapping_div( + _self: Val, + rhs: Val, + ) -> Val { + let output: Val = bevy::math::UVec4::wrapping_div( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Returns a vector containing the wrapping multiplication of `self` and `rhs`. + /// In other words this computes `[self.x.wrapping_mul(rhs.x), self.y.wrapping_mul(rhs.y), ..]`. + fn wrapping_mul( + _self: Val, + rhs: Val, + ) -> Val { + let output: Val = bevy::math::UVec4::wrapping_mul( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Returns a vector containing the wrapping subtraction of `self` and `rhs`. + /// In other words this computes `[self.x.wrapping_sub(rhs.x), self.y.wrapping_sub(rhs.y), ..]`. + fn wrapping_sub( + _self: Val, + rhs: Val, + ) -> Val { + let output: Val = bevy::math::UVec4::wrapping_sub( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } +} +#[script_bindings( + remote, + name = "u_8_vec_2_functions", + bms_core_path = "bevy_mod_scripting_core", + generated +)] +impl bevy::math::U8Vec2 { + fn add( + _self: Val, + rhs: Ref, + ) -> Val { + let output: Val = >::add(_self.into_inner(), &rhs) + .into(); + output + } + fn add( + _self: Val, + rhs: Val, + ) -> Val { + let output: Val = >::add(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + fn add(_self: Val, rhs: u8) -> Val { + let output: Val = >::add(_self.into_inner(), rhs) + .into(); + output + } + /// Casts all elements of `self` to `f64`. + fn as_dvec2(_self: Ref) -> Val { + let output: Val = bevy::math::U8Vec2::as_dvec2(&_self).into(); + output + } + /// Casts all elements of `self` to `i16`. + fn as_i16vec2(_self: Ref) -> Val { + let output: Val = bevy::math::U8Vec2::as_i16vec2(&_self) + .into(); + output + } + /// Casts all elements of `self` to `i64`. + fn as_i64vec2(_self: Ref) -> Val { + let output: Val = bevy::math::U8Vec2::as_i64vec2(&_self) + .into(); + output + } + /// Casts all elements of `self` to `i8`. + fn as_i8vec2(_self: Ref) -> Val { + let output: Val = bevy::math::U8Vec2::as_i8vec2(&_self) + .into(); + output + } + /// Casts all elements of `self` to `i32`. + fn as_ivec2(_self: Ref) -> Val { + let output: Val = bevy::math::U8Vec2::as_ivec2(&_self).into(); + output + } + /// Casts all elements of `self` to `u16`. + fn as_u16vec2(_self: Ref) -> Val { + let output: Val = bevy::math::U8Vec2::as_u16vec2(&_self) + .into(); + output + } + /// Casts all elements of `self` to `u64`. + fn as_u64vec2(_self: Ref) -> Val { + let output: Val = bevy::math::U8Vec2::as_u64vec2(&_self) + .into(); + output + } + /// Casts all elements of `self` to `u32`. + fn as_uvec2(_self: Ref) -> Val { + let output: Val = bevy::math::U8Vec2::as_uvec2(&_self).into(); + output + } + /// Casts all elements of `self` to `f32`. + fn as_vec2(_self: Ref) -> Val { + let output: Val = bevy::math::U8Vec2::as_vec2(&_self).into(); + output + } + fn assert_receiver_is_total_eq(_self: Ref) -> () { + let output: () = ::assert_receiver_is_total_eq( + &_self, + ) + .into(); + output + } + /// Component-wise clamping of values, similar to [`u8::clamp`]. + /// Each element in `min` must be less-or-equal to the corresponding element in `max`. + /// # Panics + /// Will panic if `min` is greater than `max` when `glam_assert` is enabled. + fn clamp( + _self: Val, + min: Val, + max: Val, + ) -> Val { + let output: Val = bevy::math::U8Vec2::clamp( + _self.into_inner(), + min.into_inner(), + max.into_inner(), + ) + .into(); + output + } + fn clone(_self: Ref) -> Val { + let output: Val = ::clone( + &_self, + ) + .into(); + output + } + /// Returns a vector mask containing the result of a `==` comparison for each element of + /// `self` and `rhs`. + /// In other words, this computes `[self.x == rhs.x, self.y == rhs.y, ..]` for all + /// elements. + fn cmpeq( + _self: Val, + rhs: Val, + ) -> Val { + let output: Val = bevy::math::U8Vec2::cmpeq( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Returns a vector mask containing the result of a `>=` comparison for each element of + /// `self` and `rhs`. + /// In other words this computes `[self.x >= rhs.x, self.y >= rhs.y, ..]` for all + /// elements. + fn cmpge( + _self: Val, + rhs: Val, + ) -> Val { + let output: Val = bevy::math::U8Vec2::cmpge( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Returns a vector mask containing the result of a `>` comparison for each element of + /// `self` and `rhs`. + /// In other words this computes `[self.x > rhs.x, self.y > rhs.y, ..]` for all + /// elements. + fn cmpgt( + _self: Val, + rhs: Val, + ) -> Val { + let output: Val = bevy::math::U8Vec2::cmpgt( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Returns a vector mask containing the result of a `<=` comparison for each element of + /// `self` and `rhs`. + /// In other words this computes `[self.x <= rhs.x, self.y <= rhs.y, ..]` for all + /// elements. + fn cmple( + _self: Val, + rhs: Val, + ) -> Val { + let output: Val = bevy::math::U8Vec2::cmple( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Returns a vector mask containing the result of a `<` comparison for each element of + /// `self` and `rhs`. + /// In other words this computes `[self.x < rhs.x, self.y < rhs.y, ..]` for all + /// elements. + fn cmplt( + _self: Val, + rhs: Val, + ) -> Val { + let output: Val = bevy::math::U8Vec2::cmplt( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Returns a vector mask containing the result of a `!=` comparison for each element of + /// `self` and `rhs`. + /// In other words this computes `[self.x != rhs.x, self.y != rhs.y, ..]` for all + /// elements. + fn cmpne( + _self: Val, + rhs: Val, + ) -> Val { + let output: Val = bevy::math::U8Vec2::cmpne( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + fn div( + _self: Val, + rhs: Ref, + ) -> Val { + let output: Val = >::div(_self.into_inner(), &rhs) + .into(); + output + } + fn div( + _self: Val, + rhs: Val, + ) -> Val { + let output: Val = >::div(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + fn div(_self: Val, rhs: u8) -> Val { + let output: Val = >::div(_self.into_inner(), rhs) + .into(); + output + } + /// Computes the dot product of `self` and `rhs`. + fn dot(_self: Val, rhs: Val) -> u8 { + let output: u8 = bevy::math::U8Vec2::dot(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + /// Returns a vector where every component is the dot product of `self` and `rhs`. + fn dot_into_vec( + _self: Val, + rhs: Val, + ) -> Val { + let output: Val = bevy::math::U8Vec2::dot_into_vec( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Returns the product of all elements of `self`. + /// In other words, this computes `self.x * self.y * ..`. + fn element_product(_self: Val) -> u8 { + let output: u8 = bevy::math::U8Vec2::element_product(_self.into_inner()).into(); + output + } + /// Returns the sum of all elements of `self`. + /// In other words, this computes `self.x + self.y + ..`. + fn element_sum(_self: Val) -> u8 { + let output: u8 = bevy::math::U8Vec2::element_sum(_self.into_inner()).into(); + output + } + fn eq(_self: Ref, other: Ref) -> bool { + let output: bool = >::eq(&_self, &other) + .into(); + output + } + /// Creates a 3D vector from `self` and the given `z` value. + fn extend(_self: Val, z: u8) -> Val { + let output: Val = bevy::math::U8Vec2::extend( + _self.into_inner(), + z, + ) + .into(); + output + } + /// Creates a new vector from an array. + fn from_array(a: [u8; 2]) -> Val { + let output: Val = bevy::math::U8Vec2::from_array(a).into(); + output + } + /// Computes the squared length of `self`. + fn length_squared(_self: Val) -> u8 { + let output: u8 = bevy::math::U8Vec2::length_squared(_self.into_inner()).into(); + output + } + /// Returns a vector containing the maximum values for each element of `self` and `rhs`. + /// In other words this computes `[self.x.max(rhs.x), self.y.max(rhs.y), ..]`. + fn max( + _self: Val, + rhs: Val, + ) -> Val { + let output: Val = bevy::math::U8Vec2::max( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Returns the horizontal maximum of `self`. + /// In other words this computes `max(x, y, ..)`. + fn max_element(_self: Val) -> u8 { + let output: u8 = bevy::math::U8Vec2::max_element(_self.into_inner()).into(); + output + } + /// Returns a vector containing the minimum values for each element of `self` and `rhs`. + /// In other words this computes `[self.x.min(rhs.x), self.y.min(rhs.y), ..]`. + fn min( + _self: Val, + rhs: Val, + ) -> Val { + let output: Val = bevy::math::U8Vec2::min( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Returns the horizontal minimum of `self`. + /// In other words this computes `min(x, y, ..)`. + fn min_element(_self: Val) -> u8 { + let output: u8 = bevy::math::U8Vec2::min_element(_self.into_inner()).into(); + output + } + fn mul( + _self: Val, + rhs: Ref, + ) -> Val { + let output: Val = >::mul(_self.into_inner(), &rhs) + .into(); + output + } + fn mul( + _self: Val, + rhs: Val, + ) -> Val { + let output: Val = >::mul(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + fn mul(_self: Val, rhs: u8) -> Val { + let output: Val = >::mul(_self.into_inner(), rhs) + .into(); + output + } + /// Creates a new vector. + fn new(x: u8, y: u8) -> Val { + let output: Val = bevy::math::U8Vec2::new(x, y).into(); + output + } + fn rem( + _self: Val, + rhs: Ref, + ) -> Val { + let output: Val = >::rem(_self.into_inner(), &rhs) + .into(); + output + } + fn rem( + _self: Val, + rhs: Val, + ) -> Val { + let output: Val = >::rem(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + fn rem(_self: Val, rhs: u8) -> Val { + let output: Val = >::rem(_self.into_inner(), rhs) + .into(); + output + } + /// Returns a vector containing the saturating addition of `self` and `rhs`. + /// In other words this computes `[self.x.saturating_add(rhs.x), self.y.saturating_add(rhs.y), ..]`. + fn saturating_add( + _self: Val, + rhs: Val, + ) -> Val { + let output: Val = bevy::math::U8Vec2::saturating_add( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Returns a vector containing the saturating addition of `self` and signed vector `rhs`. + /// In other words this computes `[self.x.saturating_add_signed(rhs.x), self.y.saturating_add_signed(rhs.y), ..]`. + fn saturating_add_signed( + _self: Val, + rhs: Val, + ) -> Val { + let output: Val = bevy::math::U8Vec2::saturating_add_signed( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Returns a vector containing the saturating division of `self` and `rhs`. + /// In other words this computes `[self.x.saturating_div(rhs.x), self.y.saturating_div(rhs.y), ..]`. + fn saturating_div( + _self: Val, + rhs: Val, + ) -> Val { + let output: Val = bevy::math::U8Vec2::saturating_div( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Returns a vector containing the saturating multiplication of `self` and `rhs`. + /// In other words this computes `[self.x.saturating_mul(rhs.x), self.y.saturating_mul(rhs.y), ..]`. + fn saturating_mul( + _self: Val, + rhs: Val, + ) -> Val { + let output: Val = bevy::math::U8Vec2::saturating_mul( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Returns a vector containing the saturating subtraction of `self` and `rhs`. + /// In other words this computes `[self.x.saturating_sub(rhs.x), self.y.saturating_sub(rhs.y), ..]`. + fn saturating_sub( + _self: Val, + rhs: Val, + ) -> Val { + let output: Val = bevy::math::U8Vec2::saturating_sub( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Creates a vector from the elements in `if_true` and `if_false`, selecting which to use + /// for each element of `self`. + /// A true element in the mask uses the corresponding element from `if_true`, and false + /// uses the element from `if_false`. + fn select( + mask: Val, + if_true: Val, + if_false: Val, + ) -> Val { + let output: Val = bevy::math::U8Vec2::select( + mask.into_inner(), + if_true.into_inner(), + if_false.into_inner(), + ) + .into(); + output + } + /// Creates a vector with all elements set to `v`. + fn splat(v: u8) -> Val { + let output: Val = bevy::math::U8Vec2::splat(v).into(); + output + } + fn sub( + _self: Val, + rhs: Ref, + ) -> Val { + let output: Val = >::sub(_self.into_inner(), &rhs) + .into(); + output + } + fn sub( + _self: Val, + rhs: Val, + ) -> Val { + let output: Val = >::sub(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + fn sub(_self: Val, rhs: u8) -> Val { + let output: Val = >::sub(_self.into_inner(), rhs) + .into(); + output + } + /// `[x, y]` + fn to_array(_self: Ref) -> [u8; 2] { + let output: [u8; 2] = bevy::math::U8Vec2::to_array(&_self).into(); + output + } + /// Creates a 2D vector from `self` with the given value of `x`. + fn with_x(_self: Val, x: u8) -> Val { + let output: Val = bevy::math::U8Vec2::with_x( + _self.into_inner(), + x, + ) + .into(); + output + } + /// Creates a 2D vector from `self` with the given value of `y`. + fn with_y(_self: Val, y: u8) -> Val { + let output: Val = bevy::math::U8Vec2::with_y( + _self.into_inner(), + y, + ) + .into(); + output + } + /// Returns a vector containing the wrapping addition of `self` and `rhs`. + /// In other words this computes `[self.x.wrapping_add(rhs.x), self.y.wrapping_add(rhs.y), ..]`. + fn wrapping_add( + _self: Val, + rhs: Val, + ) -> Val { + let output: Val = bevy::math::U8Vec2::wrapping_add( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Returns a vector containing the wrapping addition of `self` and signed vector `rhs`. + /// In other words this computes `[self.x.wrapping_add_signed(rhs.x), self.y.wrapping_add_signed(rhs.y), ..]`. + fn wrapping_add_signed( + _self: Val, + rhs: Val, + ) -> Val { + let output: Val = bevy::math::U8Vec2::wrapping_add_signed( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Returns a vector containing the wrapping division of `self` and `rhs`. + /// In other words this computes `[self.x.wrapping_div(rhs.x), self.y.wrapping_div(rhs.y), ..]`. + fn wrapping_div( + _self: Val, + rhs: Val, + ) -> Val { + let output: Val = bevy::math::U8Vec2::wrapping_div( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Returns a vector containing the wrapping multiplication of `self` and `rhs`. + /// In other words this computes `[self.x.wrapping_mul(rhs.x), self.y.wrapping_mul(rhs.y), ..]`. + fn wrapping_mul( + _self: Val, + rhs: Val, + ) -> Val { + let output: Val = bevy::math::U8Vec2::wrapping_mul( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Returns a vector containing the wrapping subtraction of `self` and `rhs`. + /// In other words this computes `[self.x.wrapping_sub(rhs.x), self.y.wrapping_sub(rhs.y), ..]`. + fn wrapping_sub( + _self: Val, + rhs: Val, + ) -> Val { + let output: Val = bevy::math::U8Vec2::wrapping_sub( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } +} +#[script_bindings( + remote, + name = "u_8_vec_3_functions", + bms_core_path = "bevy_mod_scripting_core", + generated +)] +impl bevy::math::U8Vec3 { + fn add( + _self: Val, + rhs: Ref, + ) -> Val { + let output: Val = >::add(_self.into_inner(), &rhs) + .into(); + output + } + fn add( + _self: Val, + rhs: Val, + ) -> Val { + let output: Val = >::add(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + fn add(_self: Val, rhs: u8) -> Val { + let output: Val = >::add(_self.into_inner(), rhs) + .into(); + output + } + /// Casts all elements of `self` to `f64`. + fn as_dvec3(_self: Ref) -> Val { + let output: Val = bevy::math::U8Vec3::as_dvec3(&_self).into(); + output + } + /// Casts all elements of `self` to `i16`. + fn as_i16vec3(_self: Ref) -> Val { + let output: Val = bevy::math::U8Vec3::as_i16vec3(&_self) + .into(); + output + } + /// Casts all elements of `self` to `i64`. + fn as_i64vec3(_self: Ref) -> Val { + let output: Val = bevy::math::U8Vec3::as_i64vec3(&_self) + .into(); + output + } + /// Casts all elements of `self` to `i8`. + fn as_i8vec3(_self: Ref) -> Val { + let output: Val = bevy::math::U8Vec3::as_i8vec3(&_self) + .into(); + output + } + /// Casts all elements of `self` to `i32`. + fn as_ivec3(_self: Ref) -> Val { + let output: Val = bevy::math::U8Vec3::as_ivec3(&_self).into(); + output + } + /// Casts all elements of `self` to `u16`. + fn as_u16vec3(_self: Ref) -> Val { + let output: Val = bevy::math::U8Vec3::as_u16vec3(&_self) + .into(); + output + } + /// Casts all elements of `self` to `u64`. + fn as_u64vec3(_self: Ref) -> Val { + let output: Val = bevy::math::U8Vec3::as_u64vec3(&_self) + .into(); + output + } + /// Casts all elements of `self` to `u32`. + fn as_uvec3(_self: Ref) -> Val { + let output: Val = bevy::math::U8Vec3::as_uvec3(&_self).into(); + output + } + /// Casts all elements of `self` to `f32`. + fn as_vec3(_self: Ref) -> Val { + let output: Val = bevy::math::U8Vec3::as_vec3(&_self).into(); + output + } + /// Casts all elements of `self` to `f32`. + fn as_vec3a(_self: Ref) -> Val { + let output: Val = bevy::math::U8Vec3::as_vec3a(&_self).into(); + output + } + fn assert_receiver_is_total_eq(_self: Ref) -> () { + let output: () = ::assert_receiver_is_total_eq( + &_self, + ) + .into(); + output + } + /// Component-wise clamping of values, similar to [`u8::clamp`]. + /// Each element in `min` must be less-or-equal to the corresponding element in `max`. + /// # Panics + /// Will panic if `min` is greater than `max` when `glam_assert` is enabled. + fn clamp( + _self: Val, + min: Val, + max: Val, + ) -> Val { + let output: Val = bevy::math::U8Vec3::clamp( + _self.into_inner(), + min.into_inner(), + max.into_inner(), + ) + .into(); + output + } + fn clone(_self: Ref) -> Val { + let output: Val = ::clone( + &_self, + ) + .into(); + output + } + /// Returns a vector mask containing the result of a `==` comparison for each element of + /// `self` and `rhs`. + /// In other words, this computes `[self.x == rhs.x, self.y == rhs.y, ..]` for all + /// elements. + fn cmpeq( + _self: Val, + rhs: Val, + ) -> Val { + let output: Val = bevy::math::U8Vec3::cmpeq( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Returns a vector mask containing the result of a `>=` comparison for each element of + /// `self` and `rhs`. + /// In other words this computes `[self.x >= rhs.x, self.y >= rhs.y, ..]` for all + /// elements. + fn cmpge( + _self: Val, + rhs: Val, + ) -> Val { + let output: Val = bevy::math::U8Vec3::cmpge( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Returns a vector mask containing the result of a `>` comparison for each element of + /// `self` and `rhs`. + /// In other words this computes `[self.x > rhs.x, self.y > rhs.y, ..]` for all + /// elements. + fn cmpgt( + _self: Val, + rhs: Val, + ) -> Val { + let output: Val = bevy::math::U8Vec3::cmpgt( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Returns a vector mask containing the result of a `<=` comparison for each element of + /// `self` and `rhs`. + /// In other words this computes `[self.x <= rhs.x, self.y <= rhs.y, ..]` for all + /// elements. + fn cmple( + _self: Val, + rhs: Val, + ) -> Val { + let output: Val = bevy::math::U8Vec3::cmple( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Returns a vector mask containing the result of a `<` comparison for each element of + /// `self` and `rhs`. + /// In other words this computes `[self.x < rhs.x, self.y < rhs.y, ..]` for all + /// elements. + fn cmplt( + _self: Val, + rhs: Val, + ) -> Val { + let output: Val = bevy::math::U8Vec3::cmplt( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Returns a vector mask containing the result of a `!=` comparison for each element of + /// `self` and `rhs`. + /// In other words this computes `[self.x != rhs.x, self.y != rhs.y, ..]` for all + /// elements. + fn cmpne( + _self: Val, + rhs: Val, + ) -> Val { + let output: Val = bevy::math::U8Vec3::cmpne( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Computes the cross product of `self` and `rhs`. + fn cross( + _self: Val, + rhs: Val, + ) -> Val { + let output: Val = bevy::math::U8Vec3::cross( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + fn div( + _self: Val, + rhs: Ref, + ) -> Val { + let output: Val = >::div(_self.into_inner(), &rhs) + .into(); + output + } + fn div( + _self: Val, + rhs: Val, + ) -> Val { + let output: Val = >::div(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + fn div(_self: Val, rhs: u8) -> Val { + let output: Val = >::div(_self.into_inner(), rhs) + .into(); + output + } + /// Computes the dot product of `self` and `rhs`. + fn dot(_self: Val, rhs: Val) -> u8 { + let output: u8 = bevy::math::U8Vec3::dot(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + /// Returns a vector where every component is the dot product of `self` and `rhs`. + fn dot_into_vec( + _self: Val, + rhs: Val, + ) -> Val { + let output: Val = bevy::math::U8Vec3::dot_into_vec( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Returns the product of all elements of `self`. + /// In other words, this computes `self.x * self.y * ..`. + fn element_product(_self: Val) -> u8 { + let output: u8 = bevy::math::U8Vec3::element_product(_self.into_inner()).into(); + output + } + /// Returns the sum of all elements of `self`. + /// In other words, this computes `self.x + self.y + ..`. + fn element_sum(_self: Val) -> u8 { + let output: u8 = bevy::math::U8Vec3::element_sum(_self.into_inner()).into(); + output + } + fn eq(_self: Ref, other: Ref) -> bool { + let output: bool = >::eq(&_self, &other) + .into(); + output + } + /// Creates a 4D vector from `self` and the given `w` value. + fn extend(_self: Val, w: u8) -> Val { + let output: Val = bevy::math::U8Vec3::extend( + _self.into_inner(), + w, + ) + .into(); + output + } + /// Creates a new vector from an array. + fn from_array(a: [u8; 3]) -> Val { + let output: Val = bevy::math::U8Vec3::from_array(a).into(); + output + } + /// Computes the squared length of `self`. + fn length_squared(_self: Val) -> u8 { + let output: u8 = bevy::math::U8Vec3::length_squared(_self.into_inner()).into(); + output + } + /// Returns a vector containing the maximum values for each element of `self` and `rhs`. + /// In other words this computes `[self.x.max(rhs.x), self.y.max(rhs.y), ..]`. + fn max( + _self: Val, + rhs: Val, + ) -> Val { + let output: Val = bevy::math::U8Vec3::max( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Returns the horizontal maximum of `self`. + /// In other words this computes `max(x, y, ..)`. + fn max_element(_self: Val) -> u8 { + let output: u8 = bevy::math::U8Vec3::max_element(_self.into_inner()).into(); + output + } + /// Returns a vector containing the minimum values for each element of `self` and `rhs`. + /// In other words this computes `[self.x.min(rhs.x), self.y.min(rhs.y), ..]`. + fn min( + _self: Val, + rhs: Val, + ) -> Val { + let output: Val = bevy::math::U8Vec3::min( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Returns the horizontal minimum of `self`. + /// In other words this computes `min(x, y, ..)`. + fn min_element(_self: Val) -> u8 { + let output: u8 = bevy::math::U8Vec3::min_element(_self.into_inner()).into(); + output + } + fn mul( + _self: Val, + rhs: Ref, + ) -> Val { + let output: Val = >::mul(_self.into_inner(), &rhs) + .into(); + output + } + fn mul( + _self: Val, + rhs: Val, + ) -> Val { + let output: Val = >::mul(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + fn mul(_self: Val, rhs: u8) -> Val { + let output: Val = >::mul(_self.into_inner(), rhs) + .into(); + output + } + /// Creates a new vector. + fn new(x: u8, y: u8, z: u8) -> Val { + let output: Val = bevy::math::U8Vec3::new(x, y, z).into(); + output + } + fn rem( + _self: Val, + rhs: Ref, + ) -> Val { + let output: Val = >::rem(_self.into_inner(), &rhs) + .into(); + output + } + fn rem( + _self: Val, + rhs: Val, + ) -> Val { + let output: Val = >::rem(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + fn rem(_self: Val, rhs: u8) -> Val { + let output: Val = >::rem(_self.into_inner(), rhs) + .into(); + output + } + /// Returns a vector containing the saturating addition of `self` and `rhs`. + /// In other words this computes `[self.x.saturating_add(rhs.x), self.y.saturating_add(rhs.y), ..]`. + fn saturating_add( + _self: Val, + rhs: Val, + ) -> Val { + let output: Val = bevy::math::U8Vec3::saturating_add( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Returns a vector containing the saturating addition of `self` and signed vector `rhs`. + /// In other words this computes `[self.x.saturating_add_signed(rhs.x), self.y.saturating_add_signed(rhs.y), ..]`. + fn saturating_add_signed( + _self: Val, + rhs: Val, + ) -> Val { + let output: Val = bevy::math::U8Vec3::saturating_add_signed( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Returns a vector containing the saturating division of `self` and `rhs`. + /// In other words this computes `[self.x.saturating_div(rhs.x), self.y.saturating_div(rhs.y), ..]`. + fn saturating_div( + _self: Val, + rhs: Val, + ) -> Val { + let output: Val = bevy::math::U8Vec3::saturating_div( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Returns a vector containing the saturating multiplication of `self` and `rhs`. + /// In other words this computes `[self.x.saturating_mul(rhs.x), self.y.saturating_mul(rhs.y), ..]`. + fn saturating_mul( + _self: Val, + rhs: Val, + ) -> Val { + let output: Val = bevy::math::U8Vec3::saturating_mul( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Returns a vector containing the saturating subtraction of `self` and `rhs`. + /// In other words this computes `[self.x.saturating_sub(rhs.x), self.y.saturating_sub(rhs.y), ..]`. + fn saturating_sub( + _self: Val, + rhs: Val, + ) -> Val { + let output: Val = bevy::math::U8Vec3::saturating_sub( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Creates a vector from the elements in `if_true` and `if_false`, selecting which to use + /// for each element of `self`. + /// A true element in the mask uses the corresponding element from `if_true`, and false + /// uses the element from `if_false`. + fn select( + mask: Val, + if_true: Val, + if_false: Val, + ) -> Val { + let output: Val = bevy::math::U8Vec3::select( + mask.into_inner(), + if_true.into_inner(), + if_false.into_inner(), + ) + .into(); + output + } + /// Creates a vector with all elements set to `v`. + fn splat(v: u8) -> Val { + let output: Val = bevy::math::U8Vec3::splat(v).into(); + output + } + fn sub( + _self: Val, + rhs: Ref, + ) -> Val { + let output: Val = >::sub(_self.into_inner(), &rhs) + .into(); + output + } + fn sub( + _self: Val, + rhs: Val, + ) -> Val { + let output: Val = >::sub(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + fn sub(_self: Val, rhs: u8) -> Val { + let output: Val = >::sub(_self.into_inner(), rhs) + .into(); + output + } + /// `[x, y, z]` + fn to_array(_self: Ref) -> [u8; 3] { + let output: [u8; 3] = bevy::math::U8Vec3::to_array(&_self).into(); + output + } + /// Creates a 2D vector from the `x` and `y` elements of `self`, discarding `z`. + /// Truncation may also be performed by using [`self.xy()`][crate::swizzles::Vec3Swizzles::xy()]. + fn truncate(_self: Val) -> Val { + let output: Val = bevy::math::U8Vec3::truncate( + _self.into_inner(), + ) + .into(); + output + } + /// Creates a 3D vector from `self` with the given value of `x`. + fn with_x(_self: Val, x: u8) -> Val { + let output: Val = bevy::math::U8Vec3::with_x( + _self.into_inner(), + x, + ) + .into(); + output + } + /// Creates a 3D vector from `self` with the given value of `y`. + fn with_y(_self: Val, y: u8) -> Val { + let output: Val = bevy::math::U8Vec3::with_y( + _self.into_inner(), + y, + ) + .into(); + output + } + /// Creates a 3D vector from `self` with the given value of `z`. + fn with_z(_self: Val, z: u8) -> Val { + let output: Val = bevy::math::U8Vec3::with_z( + _self.into_inner(), + z, + ) + .into(); + output + } + /// Returns a vector containing the wrapping addition of `self` and `rhs`. + /// In other words this computes `[self.x.wrapping_add(rhs.x), self.y.wrapping_add(rhs.y), ..]`. + fn wrapping_add( + _self: Val, + rhs: Val, + ) -> Val { + let output: Val = bevy::math::U8Vec3::wrapping_add( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Returns a vector containing the wrapping addition of `self` and signed vector `rhs`. + /// In other words this computes `[self.x.wrapping_add_signed(rhs.x), self.y.wrapping_add_signed(rhs.y), ..]`. + fn wrapping_add_signed( + _self: Val, + rhs: Val, + ) -> Val { + let output: Val = bevy::math::U8Vec3::wrapping_add_signed( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Returns a vector containing the wrapping division of `self` and `rhs`. + /// In other words this computes `[self.x.wrapping_div(rhs.x), self.y.wrapping_div(rhs.y), ..]`. + fn wrapping_div( + _self: Val, + rhs: Val, + ) -> Val { + let output: Val = bevy::math::U8Vec3::wrapping_div( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Returns a vector containing the wrapping multiplication of `self` and `rhs`. + /// In other words this computes `[self.x.wrapping_mul(rhs.x), self.y.wrapping_mul(rhs.y), ..]`. + fn wrapping_mul( + _self: Val, + rhs: Val, + ) -> Val { + let output: Val = bevy::math::U8Vec3::wrapping_mul( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Returns a vector containing the wrapping subtraction of `self` and `rhs`. + /// In other words this computes `[self.x.wrapping_sub(rhs.x), self.y.wrapping_sub(rhs.y), ..]`. + fn wrapping_sub( + _self: Val, + rhs: Val, + ) -> Val { + let output: Val = bevy::math::U8Vec3::wrapping_sub( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } +} +#[script_bindings( + remote, + name = "u_8_vec_4_functions", + bms_core_path = "bevy_mod_scripting_core", + generated +)] +impl bevy::math::U8Vec4 { + fn add( + _self: Val, + rhs: Ref, + ) -> Val { + let output: Val = >::add(_self.into_inner(), &rhs) + .into(); + output + } + fn add( + _self: Val, + rhs: Val, + ) -> Val { + let output: Val = >::add(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + fn add(_self: Val, rhs: u8) -> Val { + let output: Val = >::add(_self.into_inner(), rhs) + .into(); + output + } + /// Casts all elements of `self` to `f64`. + fn as_dvec4(_self: Ref) -> Val { + let output: Val = bevy::math::U8Vec4::as_dvec4(&_self).into(); + output + } + /// Casts all elements of `self` to `i16`. + fn as_i16vec4(_self: Ref) -> Val { + let output: Val = bevy::math::U8Vec4::as_i16vec4(&_self) + .into(); + output + } + /// Casts all elements of `self` to `i64`. + fn as_i64vec4(_self: Ref) -> Val { + let output: Val = bevy::math::U8Vec4::as_i64vec4(&_self) + .into(); + output + } + /// Casts all elements of `self` to `i8`. + fn as_i8vec4(_self: Ref) -> Val { + let output: Val = bevy::math::U8Vec4::as_i8vec4(&_self) + .into(); + output + } + /// Casts all elements of `self` to `i32`. + fn as_ivec4(_self: Ref) -> Val { + let output: Val = bevy::math::U8Vec4::as_ivec4(&_self).into(); + output + } + /// Casts all elements of `self` to `u16`. + fn as_u16vec4(_self: Ref) -> Val { + let output: Val = bevy::math::U8Vec4::as_u16vec4(&_self) + .into(); + output + } + /// Casts all elements of `self` to `u64`. + fn as_u64vec4(_self: Ref) -> Val { + let output: Val = bevy::math::U8Vec4::as_u64vec4(&_self) + .into(); + output + } + /// Casts all elements of `self` to `u32`. + fn as_uvec4(_self: Ref) -> Val { + let output: Val = bevy::math::U8Vec4::as_uvec4(&_self).into(); + output + } + /// Casts all elements of `self` to `f32`. + fn as_vec4(_self: Ref) -> Val { + let output: Val = bevy::math::U8Vec4::as_vec4(&_self).into(); + output + } + fn assert_receiver_is_total_eq(_self: Ref) -> () { + let output: () = ::assert_receiver_is_total_eq( + &_self, + ) + .into(); + output + } + /// Component-wise clamping of values, similar to [`u8::clamp`]. + /// Each element in `min` must be less-or-equal to the corresponding element in `max`. + /// # Panics + /// Will panic if `min` is greater than `max` when `glam_assert` is enabled. + fn clamp( + _self: Val, + min: Val, + max: Val, + ) -> Val { + let output: Val = bevy::math::U8Vec4::clamp( + _self.into_inner(), + min.into_inner(), + max.into_inner(), + ) + .into(); + output + } + fn clone(_self: Ref) -> Val { + let output: Val = ::clone( + &_self, + ) + .into(); + output + } + /// Returns a vector mask containing the result of a `==` comparison for each element of + /// `self` and `rhs`. + /// In other words, this computes `[self.x == rhs.x, self.y == rhs.y, ..]` for all + /// elements. + fn cmpeq( + _self: Val, + rhs: Val, + ) -> Val { + let output: Val = bevy::math::U8Vec4::cmpeq( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Returns a vector mask containing the result of a `>=` comparison for each element of + /// `self` and `rhs`. + /// In other words this computes `[self.x >= rhs.x, self.y >= rhs.y, ..]` for all + /// elements. + fn cmpge( + _self: Val, + rhs: Val, + ) -> Val { + let output: Val = bevy::math::U8Vec4::cmpge( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Returns a vector mask containing the result of a `>` comparison for each element of + /// `self` and `rhs`. + /// In other words this computes `[self.x > rhs.x, self.y > rhs.y, ..]` for all + /// elements. + fn cmpgt( + _self: Val, + rhs: Val, + ) -> Val { + let output: Val = bevy::math::U8Vec4::cmpgt( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Returns a vector mask containing the result of a `<=` comparison for each element of + /// `self` and `rhs`. + /// In other words this computes `[self.x <= rhs.x, self.y <= rhs.y, ..]` for all + /// elements. + fn cmple( + _self: Val, + rhs: Val, + ) -> Val { + let output: Val = bevy::math::U8Vec4::cmple( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Returns a vector mask containing the result of a `<` comparison for each element of + /// `self` and `rhs`. + /// In other words this computes `[self.x < rhs.x, self.y < rhs.y, ..]` for all + /// elements. + fn cmplt( + _self: Val, + rhs: Val, + ) -> Val { + let output: Val = bevy::math::U8Vec4::cmplt( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Returns a vector mask containing the result of a `!=` comparison for each element of + /// `self` and `rhs`. + /// In other words this computes `[self.x != rhs.x, self.y != rhs.y, ..]` for all + /// elements. + fn cmpne( + _self: Val, + rhs: Val, + ) -> Val { + let output: Val = bevy::math::U8Vec4::cmpne( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + fn div( + _self: Val, + rhs: Ref, + ) -> Val { + let output: Val = >::div(_self.into_inner(), &rhs) + .into(); + output + } + fn div( + _self: Val, + rhs: Val, + ) -> Val { + let output: Val = >::div(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + fn div(_self: Val, rhs: u8) -> Val { + let output: Val = >::div(_self.into_inner(), rhs) + .into(); + output + } + /// Computes the dot product of `self` and `rhs`. + fn dot(_self: Val, rhs: Val) -> u8 { + let output: u8 = bevy::math::U8Vec4::dot(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + /// Returns a vector where every component is the dot product of `self` and `rhs`. + fn dot_into_vec( + _self: Val, + rhs: Val, + ) -> Val { + let output: Val = bevy::math::U8Vec4::dot_into_vec( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Returns the product of all elements of `self`. + /// In other words, this computes `self.x * self.y * ..`. + fn element_product(_self: Val) -> u8 { + let output: u8 = bevy::math::U8Vec4::element_product(_self.into_inner()).into(); + output + } + /// Returns the sum of all elements of `self`. + /// In other words, this computes `self.x + self.y + ..`. + fn element_sum(_self: Val) -> u8 { + let output: u8 = bevy::math::U8Vec4::element_sum(_self.into_inner()).into(); + output + } + fn eq(_self: Ref, other: Ref) -> bool { + let output: bool = >::eq(&_self, &other) + .into(); + output + } + /// Creates a new vector from an array. + fn from_array(a: [u8; 4]) -> Val { + let output: Val = bevy::math::U8Vec4::from_array(a).into(); + output + } + /// Computes the squared length of `self`. + fn length_squared(_self: Val) -> u8 { + let output: u8 = bevy::math::U8Vec4::length_squared(_self.into_inner()).into(); + output + } + /// Returns a vector containing the maximum values for each element of `self` and `rhs`. + /// In other words this computes `[self.x.max(rhs.x), self.y.max(rhs.y), ..]`. + fn max( + _self: Val, + rhs: Val, + ) -> Val { + let output: Val = bevy::math::U8Vec4::max( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Returns the horizontal maximum of `self`. + /// In other words this computes `max(x, y, ..)`. + fn max_element(_self: Val) -> u8 { + let output: u8 = bevy::math::U8Vec4::max_element(_self.into_inner()).into(); + output + } + /// Returns a vector containing the minimum values for each element of `self` and `rhs`. + /// In other words this computes `[self.x.min(rhs.x), self.y.min(rhs.y), ..]`. + fn min( + _self: Val, + rhs: Val, + ) -> Val { + let output: Val = bevy::math::U8Vec4::min( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Returns the horizontal minimum of `self`. + /// In other words this computes `min(x, y, ..)`. + fn min_element(_self: Val) -> u8 { + let output: u8 = bevy::math::U8Vec4::min_element(_self.into_inner()).into(); + output + } + fn mul( + _self: Val, + rhs: Ref, + ) -> Val { + let output: Val = >::mul(_self.into_inner(), &rhs) + .into(); + output + } + fn mul( + _self: Val, + rhs: Val, + ) -> Val { + let output: Val = >::mul(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + fn mul(_self: Val, rhs: u8) -> Val { + let output: Val = >::mul(_self.into_inner(), rhs) + .into(); + output + } + /// Creates a new vector. + fn new(x: u8, y: u8, z: u8, w: u8) -> Val { + let output: Val = bevy::math::U8Vec4::new(x, y, z, w).into(); + output + } + fn rem( + _self: Val, + rhs: Ref, + ) -> Val { + let output: Val = >::rem(_self.into_inner(), &rhs) + .into(); + output + } + fn rem( + _self: Val, + rhs: Val, + ) -> Val { + let output: Val = >::rem(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + fn rem(_self: Val, rhs: u8) -> Val { + let output: Val = >::rem(_self.into_inner(), rhs) + .into(); + output + } + /// Returns a vector containing the saturating addition of `self` and `rhs`. + /// In other words this computes `[self.x.saturating_add(rhs.x), self.y.saturating_add(rhs.y), ..]`. + fn saturating_add( + _self: Val, + rhs: Val, + ) -> Val { + let output: Val = bevy::math::U8Vec4::saturating_add( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Returns a vector containing the saturating addition of `self` and signed vector `rhs`. + /// In other words this computes `[self.x.saturating_add_signed(rhs.x), self.y.saturating_add_signed(rhs.y), ..]`. + fn saturating_add_signed( + _self: Val, + rhs: Val, + ) -> Val { + let output: Val = bevy::math::U8Vec4::saturating_add_signed( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Returns a vector containing the saturating division of `self` and `rhs`. + /// In other words this computes `[self.x.saturating_div(rhs.x), self.y.saturating_div(rhs.y), ..]`. + fn saturating_div( + _self: Val, + rhs: Val, + ) -> Val { + let output: Val = bevy::math::U8Vec4::saturating_div( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Returns a vector containing the saturating multiplication of `self` and `rhs`. + /// In other words this computes `[self.x.saturating_mul(rhs.x), self.y.saturating_mul(rhs.y), ..]`. + fn saturating_mul( + _self: Val, + rhs: Val, + ) -> Val { + let output: Val = bevy::math::U8Vec4::saturating_mul( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Returns a vector containing the saturating subtraction of `self` and `rhs`. + /// In other words this computes `[self.x.saturating_sub(rhs.x), self.y.saturating_sub(rhs.y), ..]`. + fn saturating_sub( + _self: Val, + rhs: Val, + ) -> Val { + let output: Val = bevy::math::U8Vec4::saturating_sub( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Creates a vector from the elements in `if_true` and `if_false`, selecting which to use + /// for each element of `self`. + /// A true element in the mask uses the corresponding element from `if_true`, and false + /// uses the element from `if_false`. + fn select( + mask: Val, + if_true: Val, + if_false: Val, + ) -> Val { + let output: Val = bevy::math::U8Vec4::select( + mask.into_inner(), + if_true.into_inner(), + if_false.into_inner(), + ) + .into(); + output + } + /// Creates a vector with all elements set to `v`. + fn splat(v: u8) -> Val { + let output: Val = bevy::math::U8Vec4::splat(v).into(); + output + } + fn sub( + _self: Val, + rhs: Ref, + ) -> Val { + let output: Val = >::sub(_self.into_inner(), &rhs) + .into(); + output + } + fn sub( + _self: Val, + rhs: Val, + ) -> Val { + let output: Val = >::sub(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + fn sub(_self: Val, rhs: u8) -> Val { + let output: Val = >::sub(_self.into_inner(), rhs) + .into(); + output + } + /// `[x, y, z, w]` + fn to_array(_self: Ref) -> [u8; 4] { + let output: [u8; 4] = bevy::math::U8Vec4::to_array(&_self).into(); + output + } + /// Creates a 3D vector from the `x`, `y` and `z` elements of `self`, discarding `w`. + /// Truncation to [`U8Vec3`] may also be performed by using [`self.xyz()`][crate::swizzles::Vec4Swizzles::xyz()]. + fn truncate(_self: Val) -> Val { + let output: Val = bevy::math::U8Vec4::truncate( + _self.into_inner(), + ) + .into(); + output + } + /// Creates a 4D vector from `self` with the given value of `w`. + fn with_w(_self: Val, w: u8) -> Val { + let output: Val = bevy::math::U8Vec4::with_w( + _self.into_inner(), + w, + ) + .into(); + output + } + /// Creates a 4D vector from `self` with the given value of `x`. + fn with_x(_self: Val, x: u8) -> Val { + let output: Val = bevy::math::U8Vec4::with_x( + _self.into_inner(), + x, + ) + .into(); + output + } + /// Creates a 4D vector from `self` with the given value of `y`. + fn with_y(_self: Val, y: u8) -> Val { + let output: Val = bevy::math::U8Vec4::with_y( + _self.into_inner(), + y, + ) + .into(); + output + } + /// Creates a 4D vector from `self` with the given value of `z`. + fn with_z(_self: Val, z: u8) -> Val { + let output: Val = bevy::math::U8Vec4::with_z( + _self.into_inner(), + z, + ) + .into(); + output + } + /// Returns a vector containing the wrapping addition of `self` and `rhs`. + /// In other words this computes `[self.x.wrapping_add(rhs.x), self.y.wrapping_add(rhs.y), ..]`. + fn wrapping_add( + _self: Val, + rhs: Val, + ) -> Val { + let output: Val = bevy::math::U8Vec4::wrapping_add( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Returns a vector containing the wrapping addition of `self` and signed vector `rhs`. + /// In other words this computes `[self.x.wrapping_add_signed(rhs.x), self.y.wrapping_add_signed(rhs.y), ..]`. + fn wrapping_add_signed( + _self: Val, + rhs: Val, + ) -> Val { + let output: Val = bevy::math::U8Vec4::wrapping_add_signed( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Returns a vector containing the wrapping division of `self` and `rhs`. + /// In other words this computes `[self.x.wrapping_div(rhs.x), self.y.wrapping_div(rhs.y), ..]`. + fn wrapping_div( + _self: Val, + rhs: Val, + ) -> Val { + let output: Val = bevy::math::U8Vec4::wrapping_div( _self.into_inner(), rhs.into_inner(), ) @@ -6749,10 +14998,10 @@ impl bevy::math::I64Vec4 { /// Returns a vector containing the wrapping multiplication of `self` and `rhs`. /// In other words this computes `[self.x.wrapping_mul(rhs.x), self.y.wrapping_mul(rhs.y), ..]`. fn wrapping_mul( - _self: Val, - rhs: Val, - ) -> Val { - let output: Val = bevy::math::I64Vec4::wrapping_mul( + _self: Val, + rhs: Val, + ) -> Val { + let output: Val = bevy::math::U8Vec4::wrapping_mul( _self.into_inner(), rhs.into_inner(), ) @@ -6762,23 +15011,10 @@ impl bevy::math::I64Vec4 { /// Returns a vector containing the wrapping subtraction of `self` and `rhs`. /// In other words this computes `[self.x.wrapping_sub(rhs.x), self.y.wrapping_sub(rhs.y), ..]`. fn wrapping_sub( - _self: Val, - rhs: Val, - ) -> Val { - let output: Val = bevy::math::I64Vec4::wrapping_sub( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - /// Returns a vector containing the wrapping subtraction of `self` and unsigned vector `rhs`. - /// In other words this computes `[self.x.wrapping_sub_unsigned(rhs.x), self.y.wrapping_sub_unsigned(rhs.y), ..]`. - fn wrapping_sub_unsigned( - _self: Val, - rhs: Val, - ) -> Val { - let output: Val = bevy::math::I64Vec4::wrapping_sub_unsigned( + _self: Val, + rhs: Val, + ) -> Val { + let output: Val = bevy::math::U8Vec4::wrapping_sub( _self.into_inner(), rhs.into_inner(), ) @@ -6788,82 +15024,108 @@ impl bevy::math::I64Vec4 { } #[script_bindings( remote, - name = "u_vec_2_functions", + name = "u_16_vec_2_functions", bms_core_path = "bevy_mod_scripting_core", generated )] -impl bevy::math::UVec2 { +impl bevy::math::U16Vec2 { fn add( - _self: Val, - rhs: Ref, - ) -> Val { - let output: Val = , + rhs: Ref, + ) -> Val { + let output: Val = >::add(_self.into_inner(), &rhs) .into(); output } fn add( - _self: Val, - rhs: Val, - ) -> Val { - let output: Val = , + rhs: Val, + ) -> Val { + let output: Val = >::add(_self.into_inner(), rhs.into_inner()) .into(); output } - fn add(_self: Val, rhs: u32) -> Val { - let output: Val = , rhs: u16) -> Val { + let output: Val = >::add(_self.into_inner(), rhs) .into(); output } /// Casts all elements of `self` to `f64`. - fn as_dvec2(_self: Ref) -> Val { - let output: Val = bevy::math::UVec2::as_dvec2(&_self).into(); + fn as_dvec2(_self: Ref) -> Val { + let output: Val = bevy::math::U16Vec2::as_dvec2(&_self) + .into(); + output + } + /// Casts all elements of `self` to `i16`. + fn as_i16vec2(_self: Ref) -> Val { + let output: Val = bevy::math::U16Vec2::as_i16vec2(&_self) + .into(); output } /// Casts all elements of `self` to `i64`. - fn as_i64vec2(_self: Ref) -> Val { - let output: Val = bevy::math::UVec2::as_i64vec2(&_self) + fn as_i64vec2(_self: Ref) -> Val { + let output: Val = bevy::math::U16Vec2::as_i64vec2(&_self) + .into(); + output + } + /// Casts all elements of `self` to `i8`. + fn as_i8vec2(_self: Ref) -> Val { + let output: Val = bevy::math::U16Vec2::as_i8vec2(&_self) .into(); output } /// Casts all elements of `self` to `i32`. - fn as_ivec2(_self: Ref) -> Val { - let output: Val = bevy::math::UVec2::as_ivec2(&_self).into(); + fn as_ivec2(_self: Ref) -> Val { + let output: Val = bevy::math::U16Vec2::as_ivec2(&_self) + .into(); output } /// Casts all elements of `self` to `u64`. - fn as_u64vec2(_self: Ref) -> Val { - let output: Val = bevy::math::UVec2::as_u64vec2(&_self) + fn as_u64vec2(_self: Ref) -> Val { + let output: Val = bevy::math::U16Vec2::as_u64vec2(&_self) + .into(); + output + } + /// Casts all elements of `self` to `u8`. + fn as_u8vec2(_self: Ref) -> Val { + let output: Val = bevy::math::U16Vec2::as_u8vec2(&_self) + .into(); + output + } + /// Casts all elements of `self` to `u32`. + fn as_uvec2(_self: Ref) -> Val { + let output: Val = bevy::math::U16Vec2::as_uvec2(&_self) .into(); output } /// Casts all elements of `self` to `f32`. - fn as_vec2(_self: Ref) -> Val { - let output: Val = bevy::math::UVec2::as_vec2(&_self).into(); + fn as_vec2(_self: Ref) -> Val { + let output: Val = bevy::math::U16Vec2::as_vec2(&_self).into(); output } - fn assert_receiver_is_total_eq(_self: Ref) -> () { - let output: () = ::assert_receiver_is_total_eq( + fn assert_receiver_is_total_eq(_self: Ref) -> () { + let output: () = ::assert_receiver_is_total_eq( &_self, ) .into(); output } - /// Component-wise clamping of values, similar to [`u32::clamp`]. + /// Component-wise clamping of values, similar to [`u16::clamp`]. /// Each element in `min` must be less-or-equal to the corresponding element in `max`. /// # Panics /// Will panic if `min` is greater than `max` when `glam_assert` is enabled. fn clamp( - _self: Val, - min: Val, - max: Val, - ) -> Val { - let output: Val = bevy::math::UVec2::clamp( + _self: Val, + min: Val, + max: Val, + ) -> Val { + let output: Val = bevy::math::U16Vec2::clamp( _self.into_inner(), min.into_inner(), max.into_inner(), @@ -6871,8 +15133,8 @@ impl bevy::math::UVec2 { .into(); output } - fn clone(_self: Ref) -> Val { - let output: Val = ::clone( + fn clone(_self: Ref) -> Val { + let output: Val = ::clone( &_self, ) .into(); @@ -6883,10 +15145,10 @@ impl bevy::math::UVec2 { /// In other words, this computes `[self.x == rhs.x, self.y == rhs.y, ..]` for all /// elements. fn cmpeq( - _self: Val, - rhs: Val, + _self: Val, + rhs: Val, ) -> Val { - let output: Val = bevy::math::UVec2::cmpeq( + let output: Val = bevy::math::U16Vec2::cmpeq( _self.into_inner(), rhs.into_inner(), ) @@ -6898,10 +15160,10 @@ impl bevy::math::UVec2 { /// In other words this computes `[self.x >= rhs.x, self.y >= rhs.y, ..]` for all /// elements. fn cmpge( - _self: Val, - rhs: Val, + _self: Val, + rhs: Val, ) -> Val { - let output: Val = bevy::math::UVec2::cmpge( + let output: Val = bevy::math::U16Vec2::cmpge( _self.into_inner(), rhs.into_inner(), ) @@ -6913,10 +15175,10 @@ impl bevy::math::UVec2 { /// In other words this computes `[self.x > rhs.x, self.y > rhs.y, ..]` for all /// elements. fn cmpgt( - _self: Val, - rhs: Val, + _self: Val, + rhs: Val, ) -> Val { - let output: Val = bevy::math::UVec2::cmpgt( + let output: Val = bevy::math::U16Vec2::cmpgt( _self.into_inner(), rhs.into_inner(), ) @@ -6928,10 +15190,10 @@ impl bevy::math::UVec2 { /// In other words this computes `[self.x <= rhs.x, self.y <= rhs.y, ..]` for all /// elements. fn cmple( - _self: Val, - rhs: Val, + _self: Val, + rhs: Val, ) -> Val { - let output: Val = bevy::math::UVec2::cmple( + let output: Val = bevy::math::U16Vec2::cmple( _self.into_inner(), rhs.into_inner(), ) @@ -6943,10 +15205,10 @@ impl bevy::math::UVec2 { /// In other words this computes `[self.x < rhs.x, self.y < rhs.y, ..]` for all /// elements. fn cmplt( - _self: Val, - rhs: Val, + _self: Val, + rhs: Val, ) -> Val { - let output: Val = bevy::math::UVec2::cmplt( + let output: Val = bevy::math::U16Vec2::cmplt( _self.into_inner(), rhs.into_inner(), ) @@ -6958,10 +15220,10 @@ impl bevy::math::UVec2 { /// In other words this computes `[self.x != rhs.x, self.y != rhs.y, ..]` for all /// elements. fn cmpne( - _self: Val, - rhs: Val, + _self: Val, + rhs: Val, ) -> Val { - let output: Val = bevy::math::UVec2::cmpne( + let output: Val = bevy::math::U16Vec2::cmpne( _self.into_inner(), rhs.into_inner(), ) @@ -6969,44 +15231,44 @@ impl bevy::math::UVec2 { output } fn div( - _self: Val, - rhs: Ref, - ) -> Val { - let output: Val = , + rhs: Ref, + ) -> Val { + let output: Val = >::div(_self.into_inner(), &rhs) .into(); output } fn div( - _self: Val, - rhs: Val, - ) -> Val { - let output: Val = , + rhs: Val, + ) -> Val { + let output: Val = >::div(_self.into_inner(), rhs.into_inner()) .into(); output } - fn div(_self: Val, rhs: u32) -> Val { - let output: Val = , rhs: u16) -> Val { + let output: Val = >::div(_self.into_inner(), rhs) .into(); output } /// Computes the dot product of `self` and `rhs`. - fn dot(_self: Val, rhs: Val) -> u32 { - let output: u32 = bevy::math::UVec2::dot(_self.into_inner(), rhs.into_inner()) + fn dot(_self: Val, rhs: Val) -> u16 { + let output: u16 = bevy::math::U16Vec2::dot(_self.into_inner(), rhs.into_inner()) .into(); output } /// Returns a vector where every component is the dot product of `self` and `rhs`. fn dot_into_vec( - _self: Val, - rhs: Val, - ) -> Val { - let output: Val = bevy::math::UVec2::dot_into_vec( + _self: Val, + rhs: Val, + ) -> Val { + let output: Val = bevy::math::U16Vec2::dot_into_vec( _self.into_inner(), rhs.into_inner(), ) @@ -7015,26 +15277,27 @@ impl bevy::math::UVec2 { } /// Returns the product of all elements of `self`. /// In other words, this computes `self.x * self.y * ..`. - fn element_product(_self: Val) -> u32 { - let output: u32 = bevy::math::UVec2::element_product(_self.into_inner()).into(); + fn element_product(_self: Val) -> u16 { + let output: u16 = bevy::math::U16Vec2::element_product(_self.into_inner()) + .into(); output } /// Returns the sum of all elements of `self`. /// In other words, this computes `self.x + self.y + ..`. - fn element_sum(_self: Val) -> u32 { - let output: u32 = bevy::math::UVec2::element_sum(_self.into_inner()).into(); + fn element_sum(_self: Val) -> u16 { + let output: u16 = bevy::math::U16Vec2::element_sum(_self.into_inner()).into(); output } - fn eq(_self: Ref, other: Ref) -> bool { - let output: bool = , other: Ref) -> bool { + let output: bool = >::eq(&_self, &other) .into(); output } /// Creates a 3D vector from `self` and the given `z` value. - fn extend(_self: Val, z: u32) -> Val { - let output: Val = bevy::math::UVec2::extend( + fn extend(_self: Val, z: u16) -> Val { + let output: Val = bevy::math::U16Vec2::extend( _self.into_inner(), z, ) @@ -7042,22 +15305,22 @@ impl bevy::math::UVec2 { output } /// Creates a new vector from an array. - fn from_array(a: [u32; 2]) -> Val { - let output: Val = bevy::math::UVec2::from_array(a).into(); + fn from_array(a: [u16; 2]) -> Val { + let output: Val = bevy::math::U16Vec2::from_array(a).into(); output } /// Computes the squared length of `self`. - fn length_squared(_self: Val) -> u32 { - let output: u32 = bevy::math::UVec2::length_squared(_self.into_inner()).into(); + fn length_squared(_self: Val) -> u16 { + let output: u16 = bevy::math::U16Vec2::length_squared(_self.into_inner()).into(); output } /// Returns a vector containing the maximum values for each element of `self` and `rhs`. /// In other words this computes `[self.x.max(rhs.x), self.y.max(rhs.y), ..]`. fn max( - _self: Val, - rhs: Val, - ) -> Val { - let output: Val = bevy::math::UVec2::max( + _self: Val, + rhs: Val, + ) -> Val { + let output: Val = bevy::math::U16Vec2::max( _self.into_inner(), rhs.into_inner(), ) @@ -7066,17 +15329,17 @@ impl bevy::math::UVec2 { } /// Returns the horizontal maximum of `self`. /// In other words this computes `max(x, y, ..)`. - fn max_element(_self: Val) -> u32 { - let output: u32 = bevy::math::UVec2::max_element(_self.into_inner()).into(); + fn max_element(_self: Val) -> u16 { + let output: u16 = bevy::math::U16Vec2::max_element(_self.into_inner()).into(); output } /// Returns a vector containing the minimum values for each element of `self` and `rhs`. /// In other words this computes `[self.x.min(rhs.x), self.y.min(rhs.y), ..]`. fn min( - _self: Val, - rhs: Val, - ) -> Val { - let output: Val = bevy::math::UVec2::min( + _self: Val, + rhs: Val, + ) -> Val { + let output: Val = bevy::math::U16Vec2::min( _self.into_inner(), rhs.into_inner(), ) @@ -7085,65 +15348,65 @@ impl bevy::math::UVec2 { } /// Returns the horizontal minimum of `self`. /// In other words this computes `min(x, y, ..)`. - fn min_element(_self: Val) -> u32 { - let output: u32 = bevy::math::UVec2::min_element(_self.into_inner()).into(); + fn min_element(_self: Val) -> u16 { + let output: u16 = bevy::math::U16Vec2::min_element(_self.into_inner()).into(); output } fn mul( - _self: Val, - rhs: Ref, - ) -> Val { - let output: Val = , + rhs: Ref, + ) -> Val { + let output: Val = >::mul(_self.into_inner(), &rhs) .into(); output } fn mul( - _self: Val, - rhs: Val, - ) -> Val { - let output: Val = , + rhs: Val, + ) -> Val { + let output: Val = >::mul(_self.into_inner(), rhs.into_inner()) .into(); output } - fn mul(_self: Val, rhs: u32) -> Val { - let output: Val = , rhs: u16) -> Val { + let output: Val = >::mul(_self.into_inner(), rhs) .into(); output } /// Creates a new vector. - fn new(x: u32, y: u32) -> Val { - let output: Val = bevy::math::UVec2::new(x, y).into(); + fn new(x: u16, y: u16) -> Val { + let output: Val = bevy::math::U16Vec2::new(x, y).into(); output } fn rem( - _self: Val, - rhs: Ref, - ) -> Val { - let output: Val = , + rhs: Ref, + ) -> Val { + let output: Val = >::rem(_self.into_inner(), &rhs) .into(); output } fn rem( - _self: Val, - rhs: Val, - ) -> Val { - let output: Val = , + rhs: Val, + ) -> Val { + let output: Val = >::rem(_self.into_inner(), rhs.into_inner()) .into(); output } - fn rem(_self: Val, rhs: u32) -> Val { - let output: Val = , rhs: u16) -> Val { + let output: Val = >::rem(_self.into_inner(), rhs) .into(); output @@ -7151,10 +15414,10 @@ impl bevy::math::UVec2 { /// Returns a vector containing the saturating addition of `self` and `rhs`. /// In other words this computes `[self.x.saturating_add(rhs.x), self.y.saturating_add(rhs.y), ..]`. fn saturating_add( - _self: Val, - rhs: Val, - ) -> Val { - let output: Val = bevy::math::UVec2::saturating_add( + _self: Val, + rhs: Val, + ) -> Val { + let output: Val = bevy::math::U16Vec2::saturating_add( _self.into_inner(), rhs.into_inner(), ) @@ -7164,10 +15427,10 @@ impl bevy::math::UVec2 { /// Returns a vector containing the saturating addition of `self` and signed vector `rhs`. /// In other words this computes `[self.x.saturating_add_signed(rhs.x), self.y.saturating_add_signed(rhs.y), ..]`. fn saturating_add_signed( - _self: Val, - rhs: Val, - ) -> Val { - let output: Val = bevy::math::UVec2::saturating_add_signed( + _self: Val, + rhs: Val, + ) -> Val { + let output: Val = bevy::math::U16Vec2::saturating_add_signed( _self.into_inner(), rhs.into_inner(), ) @@ -7177,10 +15440,10 @@ impl bevy::math::UVec2 { /// Returns a vector containing the saturating division of `self` and `rhs`. /// In other words this computes `[self.x.saturating_div(rhs.x), self.y.saturating_div(rhs.y), ..]`. fn saturating_div( - _self: Val, - rhs: Val, - ) -> Val { - let output: Val = bevy::math::UVec2::saturating_div( + _self: Val, + rhs: Val, + ) -> Val { + let output: Val = bevy::math::U16Vec2::saturating_div( _self.into_inner(), rhs.into_inner(), ) @@ -7190,10 +15453,10 @@ impl bevy::math::UVec2 { /// Returns a vector containing the saturating multiplication of `self` and `rhs`. /// In other words this computes `[self.x.saturating_mul(rhs.x), self.y.saturating_mul(rhs.y), ..]`. fn saturating_mul( - _self: Val, - rhs: Val, - ) -> Val { - let output: Val = bevy::math::UVec2::saturating_mul( + _self: Val, + rhs: Val, + ) -> Val { + let output: Val = bevy::math::U16Vec2::saturating_mul( _self.into_inner(), rhs.into_inner(), ) @@ -7203,10 +15466,10 @@ impl bevy::math::UVec2 { /// Returns a vector containing the saturating subtraction of `self` and `rhs`. /// In other words this computes `[self.x.saturating_sub(rhs.x), self.y.saturating_sub(rhs.y), ..]`. fn saturating_sub( - _self: Val, - rhs: Val, - ) -> Val { - let output: Val = bevy::math::UVec2::saturating_sub( + _self: Val, + rhs: Val, + ) -> Val { + let output: Val = bevy::math::U16Vec2::saturating_sub( _self.into_inner(), rhs.into_inner(), ) @@ -7219,10 +15482,10 @@ impl bevy::math::UVec2 { /// uses the element from `if_false`. fn select( mask: Val, - if_true: Val, - if_false: Val, - ) -> Val { - let output: Val = bevy::math::UVec2::select( + if_true: Val, + if_false: Val, + ) -> Val { + let output: Val = bevy::math::U16Vec2::select( mask.into_inner(), if_true.into_inner(), if_false.into_inner(), @@ -7231,45 +15494,45 @@ impl bevy::math::UVec2 { output } /// Creates a vector with all elements set to `v`. - fn splat(v: u32) -> Val { - let output: Val = bevy::math::UVec2::splat(v).into(); + fn splat(v: u16) -> Val { + let output: Val = bevy::math::U16Vec2::splat(v).into(); output } fn sub( - _self: Val, - rhs: Ref, - ) -> Val { - let output: Val = , + rhs: Ref, + ) -> Val { + let output: Val = >::sub(_self.into_inner(), &rhs) .into(); output } fn sub( - _self: Val, - rhs: Val, - ) -> Val { - let output: Val = , + rhs: Val, + ) -> Val { + let output: Val = >::sub(_self.into_inner(), rhs.into_inner()) .into(); output } - fn sub(_self: Val, rhs: u32) -> Val { - let output: Val = , rhs: u16) -> Val { + let output: Val = >::sub(_self.into_inner(), rhs) .into(); output } /// `[x, y]` - fn to_array(_self: Ref) -> [u32; 2] { - let output: [u32; 2] = bevy::math::UVec2::to_array(&_self).into(); + fn to_array(_self: Ref) -> [u16; 2] { + let output: [u16; 2] = bevy::math::U16Vec2::to_array(&_self).into(); output } /// Creates a 2D vector from `self` with the given value of `x`. - fn with_x(_self: Val, x: u32) -> Val { - let output: Val = bevy::math::UVec2::with_x( + fn with_x(_self: Val, x: u16) -> Val { + let output: Val = bevy::math::U16Vec2::with_x( _self.into_inner(), x, ) @@ -7277,8 +15540,8 @@ impl bevy::math::UVec2 { output } /// Creates a 2D vector from `self` with the given value of `y`. - fn with_y(_self: Val, y: u32) -> Val { - let output: Val = bevy::math::UVec2::with_y( + fn with_y(_self: Val, y: u16) -> Val { + let output: Val = bevy::math::U16Vec2::with_y( _self.into_inner(), y, ) @@ -7288,10 +15551,10 @@ impl bevy::math::UVec2 { /// Returns a vector containing the wrapping addition of `self` and `rhs`. /// In other words this computes `[self.x.wrapping_add(rhs.x), self.y.wrapping_add(rhs.y), ..]`. fn wrapping_add( - _self: Val, - rhs: Val, - ) -> Val { - let output: Val = bevy::math::UVec2::wrapping_add( + _self: Val, + rhs: Val, + ) -> Val { + let output: Val = bevy::math::U16Vec2::wrapping_add( _self.into_inner(), rhs.into_inner(), ) @@ -7301,10 +15564,10 @@ impl bevy::math::UVec2 { /// Returns a vector containing the wrapping addition of `self` and signed vector `rhs`. /// In other words this computes `[self.x.wrapping_add_signed(rhs.x), self.y.wrapping_add_signed(rhs.y), ..]`. fn wrapping_add_signed( - _self: Val, - rhs: Val, - ) -> Val { - let output: Val = bevy::math::UVec2::wrapping_add_signed( + _self: Val, + rhs: Val, + ) -> Val { + let output: Val = bevy::math::U16Vec2::wrapping_add_signed( _self.into_inner(), rhs.into_inner(), ) @@ -7314,10 +15577,10 @@ impl bevy::math::UVec2 { /// Returns a vector containing the wrapping division of `self` and `rhs`. /// In other words this computes `[self.x.wrapping_div(rhs.x), self.y.wrapping_div(rhs.y), ..]`. fn wrapping_div( - _self: Val, - rhs: Val, - ) -> Val { - let output: Val = bevy::math::UVec2::wrapping_div( + _self: Val, + rhs: Val, + ) -> Val { + let output: Val = bevy::math::U16Vec2::wrapping_div( _self.into_inner(), rhs.into_inner(), ) @@ -7327,10 +15590,10 @@ impl bevy::math::UVec2 { /// Returns a vector containing the wrapping multiplication of `self` and `rhs`. /// In other words this computes `[self.x.wrapping_mul(rhs.x), self.y.wrapping_mul(rhs.y), ..]`. fn wrapping_mul( - _self: Val, - rhs: Val, - ) -> Val { - let output: Val = bevy::math::UVec2::wrapping_mul( + _self: Val, + rhs: Val, + ) -> Val { + let output: Val = bevy::math::U16Vec2::wrapping_mul( _self.into_inner(), rhs.into_inner(), ) @@ -7340,10 +15603,10 @@ impl bevy::math::UVec2 { /// Returns a vector containing the wrapping subtraction of `self` and `rhs`. /// In other words this computes `[self.x.wrapping_sub(rhs.x), self.y.wrapping_sub(rhs.y), ..]`. fn wrapping_sub( - _self: Val, - rhs: Val, - ) -> Val { - let output: Val = bevy::math::UVec2::wrapping_sub( + _self: Val, + rhs: Val, + ) -> Val { + let output: Val = bevy::math::U16Vec2::wrapping_sub( _self.into_inner(), rhs.into_inner(), ) @@ -7353,87 +15616,114 @@ impl bevy::math::UVec2 { } #[script_bindings( remote, - name = "u_vec_3_functions", + name = "u_16_vec_3_functions", bms_core_path = "bevy_mod_scripting_core", generated )] -impl bevy::math::UVec3 { +impl bevy::math::U16Vec3 { fn add( - _self: Val, - rhs: Ref, - ) -> Val { - let output: Val = , + rhs: Ref, + ) -> Val { + let output: Val = >::add(_self.into_inner(), &rhs) .into(); output } fn add( - _self: Val, - rhs: Val, - ) -> Val { - let output: Val = , + rhs: Val, + ) -> Val { + let output: Val = >::add(_self.into_inner(), rhs.into_inner()) .into(); output } - fn add(_self: Val, rhs: u32) -> Val { - let output: Val = , rhs: u16) -> Val { + let output: Val = >::add(_self.into_inner(), rhs) .into(); output } /// Casts all elements of `self` to `f64`. - fn as_dvec3(_self: Ref) -> Val { - let output: Val = bevy::math::UVec3::as_dvec3(&_self).into(); + fn as_dvec3(_self: Ref) -> Val { + let output: Val = bevy::math::U16Vec3::as_dvec3(&_self) + .into(); + output + } + /// Casts all elements of `self` to `i16`. + fn as_i16vec3(_self: Ref) -> Val { + let output: Val = bevy::math::U16Vec3::as_i16vec3(&_self) + .into(); output } /// Casts all elements of `self` to `i64`. - fn as_i64vec3(_self: Ref) -> Val { - let output: Val = bevy::math::UVec3::as_i64vec3(&_self) + fn as_i64vec3(_self: Ref) -> Val { + let output: Val = bevy::math::U16Vec3::as_i64vec3(&_self) + .into(); + output + } + /// Casts all elements of `self` to `i8`. + fn as_i8vec3(_self: Ref) -> Val { + let output: Val = bevy::math::U16Vec3::as_i8vec3(&_self) .into(); output } /// Casts all elements of `self` to `i32`. - fn as_ivec3(_self: Ref) -> Val { - let output: Val = bevy::math::UVec3::as_ivec3(&_self).into(); + fn as_ivec3(_self: Ref) -> Val { + let output: Val = bevy::math::U16Vec3::as_ivec3(&_self) + .into(); output } /// Casts all elements of `self` to `u64`. - fn as_u64vec3(_self: Ref) -> Val { - let output: Val = bevy::math::UVec3::as_u64vec3(&_self) + fn as_u64vec3(_self: Ref) -> Val { + let output: Val = bevy::math::U16Vec3::as_u64vec3(&_self) + .into(); + output + } + /// Casts all elements of `self` to `u8`. + fn as_u8vec3(_self: Ref) -> Val { + let output: Val = bevy::math::U16Vec3::as_u8vec3(&_self) + .into(); + output + } + /// Casts all elements of `self` to `u32`. + fn as_uvec3(_self: Ref) -> Val { + let output: Val = bevy::math::U16Vec3::as_uvec3(&_self) .into(); output } /// Casts all elements of `self` to `f32`. - fn as_vec3(_self: Ref) -> Val { - let output: Val = bevy::math::UVec3::as_vec3(&_self).into(); + fn as_vec3(_self: Ref) -> Val { + let output: Val = bevy::math::U16Vec3::as_vec3(&_self).into(); output } /// Casts all elements of `self` to `f32`. - fn as_vec3a(_self: Ref) -> Val { - let output: Val = bevy::math::UVec3::as_vec3a(&_self).into(); + fn as_vec3a(_self: Ref) -> Val { + let output: Val = bevy::math::U16Vec3::as_vec3a(&_self) + .into(); output } - fn assert_receiver_is_total_eq(_self: Ref) -> () { - let output: () = ::assert_receiver_is_total_eq( + fn assert_receiver_is_total_eq(_self: Ref) -> () { + let output: () = ::assert_receiver_is_total_eq( &_self, ) .into(); output } - /// Component-wise clamping of values, similar to [`u32::clamp`]. + /// Component-wise clamping of values, similar to [`u16::clamp`]. /// Each element in `min` must be less-or-equal to the corresponding element in `max`. /// # Panics /// Will panic if `min` is greater than `max` when `glam_assert` is enabled. fn clamp( - _self: Val, - min: Val, - max: Val, - ) -> Val { - let output: Val = bevy::math::UVec3::clamp( + _self: Val, + min: Val, + max: Val, + ) -> Val { + let output: Val = bevy::math::U16Vec3::clamp( _self.into_inner(), min.into_inner(), max.into_inner(), @@ -7441,8 +15731,8 @@ impl bevy::math::UVec3 { .into(); output } - fn clone(_self: Ref) -> Val { - let output: Val = ::clone( + fn clone(_self: Ref) -> Val { + let output: Val = ::clone( &_self, ) .into(); @@ -7453,10 +15743,10 @@ impl bevy::math::UVec3 { /// In other words, this computes `[self.x == rhs.x, self.y == rhs.y, ..]` for all /// elements. fn cmpeq( - _self: Val, - rhs: Val, + _self: Val, + rhs: Val, ) -> Val { - let output: Val = bevy::math::UVec3::cmpeq( + let output: Val = bevy::math::U16Vec3::cmpeq( _self.into_inner(), rhs.into_inner(), ) @@ -7468,10 +15758,10 @@ impl bevy::math::UVec3 { /// In other words this computes `[self.x >= rhs.x, self.y >= rhs.y, ..]` for all /// elements. fn cmpge( - _self: Val, - rhs: Val, + _self: Val, + rhs: Val, ) -> Val { - let output: Val = bevy::math::UVec3::cmpge( + let output: Val = bevy::math::U16Vec3::cmpge( _self.into_inner(), rhs.into_inner(), ) @@ -7483,10 +15773,10 @@ impl bevy::math::UVec3 { /// In other words this computes `[self.x > rhs.x, self.y > rhs.y, ..]` for all /// elements. fn cmpgt( - _self: Val, - rhs: Val, + _self: Val, + rhs: Val, ) -> Val { - let output: Val = bevy::math::UVec3::cmpgt( + let output: Val = bevy::math::U16Vec3::cmpgt( _self.into_inner(), rhs.into_inner(), ) @@ -7498,10 +15788,10 @@ impl bevy::math::UVec3 { /// In other words this computes `[self.x <= rhs.x, self.y <= rhs.y, ..]` for all /// elements. fn cmple( - _self: Val, - rhs: Val, + _self: Val, + rhs: Val, ) -> Val { - let output: Val = bevy::math::UVec3::cmple( + let output: Val = bevy::math::U16Vec3::cmple( _self.into_inner(), rhs.into_inner(), ) @@ -7513,10 +15803,10 @@ impl bevy::math::UVec3 { /// In other words this computes `[self.x < rhs.x, self.y < rhs.y, ..]` for all /// elements. fn cmplt( - _self: Val, - rhs: Val, + _self: Val, + rhs: Val, ) -> Val { - let output: Val = bevy::math::UVec3::cmplt( + let output: Val = bevy::math::U16Vec3::cmplt( _self.into_inner(), rhs.into_inner(), ) @@ -7528,10 +15818,10 @@ impl bevy::math::UVec3 { /// In other words this computes `[self.x != rhs.x, self.y != rhs.y, ..]` for all /// elements. fn cmpne( - _self: Val, - rhs: Val, + _self: Val, + rhs: Val, ) -> Val { - let output: Val = bevy::math::UVec3::cmpne( + let output: Val = bevy::math::U16Vec3::cmpne( _self.into_inner(), rhs.into_inner(), ) @@ -7540,10 +15830,10 @@ impl bevy::math::UVec3 { } /// Computes the cross product of `self` and `rhs`. fn cross( - _self: Val, - rhs: Val, - ) -> Val { - let output: Val = bevy::math::UVec3::cross( + _self: Val, + rhs: Val, + ) -> Val { + let output: Val = bevy::math::U16Vec3::cross( _self.into_inner(), rhs.into_inner(), ) @@ -7551,44 +15841,44 @@ impl bevy::math::UVec3 { output } fn div( - _self: Val, - rhs: Ref, - ) -> Val { - let output: Val = , + rhs: Ref, + ) -> Val { + let output: Val = >::div(_self.into_inner(), &rhs) .into(); output } fn div( - _self: Val, - rhs: Val, - ) -> Val { - let output: Val = , + rhs: Val, + ) -> Val { + let output: Val = >::div(_self.into_inner(), rhs.into_inner()) .into(); output } - fn div(_self: Val, rhs: u32) -> Val { - let output: Val = , rhs: u16) -> Val { + let output: Val = >::div(_self.into_inner(), rhs) .into(); output } /// Computes the dot product of `self` and `rhs`. - fn dot(_self: Val, rhs: Val) -> u32 { - let output: u32 = bevy::math::UVec3::dot(_self.into_inner(), rhs.into_inner()) + fn dot(_self: Val, rhs: Val) -> u16 { + let output: u16 = bevy::math::U16Vec3::dot(_self.into_inner(), rhs.into_inner()) .into(); output } /// Returns a vector where every component is the dot product of `self` and `rhs`. fn dot_into_vec( - _self: Val, - rhs: Val, - ) -> Val { - let output: Val = bevy::math::UVec3::dot_into_vec( + _self: Val, + rhs: Val, + ) -> Val { + let output: Val = bevy::math::U16Vec3::dot_into_vec( _self.into_inner(), rhs.into_inner(), ) @@ -7597,26 +15887,27 @@ impl bevy::math::UVec3 { } /// Returns the product of all elements of `self`. /// In other words, this computes `self.x * self.y * ..`. - fn element_product(_self: Val) -> u32 { - let output: u32 = bevy::math::UVec3::element_product(_self.into_inner()).into(); + fn element_product(_self: Val) -> u16 { + let output: u16 = bevy::math::U16Vec3::element_product(_self.into_inner()) + .into(); output } /// Returns the sum of all elements of `self`. /// In other words, this computes `self.x + self.y + ..`. - fn element_sum(_self: Val) -> u32 { - let output: u32 = bevy::math::UVec3::element_sum(_self.into_inner()).into(); + fn element_sum(_self: Val) -> u16 { + let output: u16 = bevy::math::U16Vec3::element_sum(_self.into_inner()).into(); output } - fn eq(_self: Ref, other: Ref) -> bool { - let output: bool = , other: Ref) -> bool { + let output: bool = >::eq(&_self, &other) .into(); output } /// Creates a 4D vector from `self` and the given `w` value. - fn extend(_self: Val, w: u32) -> Val { - let output: Val = bevy::math::UVec3::extend( + fn extend(_self: Val, w: u16) -> Val { + let output: Val = bevy::math::U16Vec3::extend( _self.into_inner(), w, ) @@ -7624,22 +15915,22 @@ impl bevy::math::UVec3 { output } /// Creates a new vector from an array. - fn from_array(a: [u32; 3]) -> Val { - let output: Val = bevy::math::UVec3::from_array(a).into(); + fn from_array(a: [u16; 3]) -> Val { + let output: Val = bevy::math::U16Vec3::from_array(a).into(); output } /// Computes the squared length of `self`. - fn length_squared(_self: Val) -> u32 { - let output: u32 = bevy::math::UVec3::length_squared(_self.into_inner()).into(); + fn length_squared(_self: Val) -> u16 { + let output: u16 = bevy::math::U16Vec3::length_squared(_self.into_inner()).into(); output } /// Returns a vector containing the maximum values for each element of `self` and `rhs`. /// In other words this computes `[self.x.max(rhs.x), self.y.max(rhs.y), ..]`. fn max( - _self: Val, - rhs: Val, - ) -> Val { - let output: Val = bevy::math::UVec3::max( + _self: Val, + rhs: Val, + ) -> Val { + let output: Val = bevy::math::U16Vec3::max( _self.into_inner(), rhs.into_inner(), ) @@ -7648,17 +15939,17 @@ impl bevy::math::UVec3 { } /// Returns the horizontal maximum of `self`. /// In other words this computes `max(x, y, ..)`. - fn max_element(_self: Val) -> u32 { - let output: u32 = bevy::math::UVec3::max_element(_self.into_inner()).into(); + fn max_element(_self: Val) -> u16 { + let output: u16 = bevy::math::U16Vec3::max_element(_self.into_inner()).into(); output } /// Returns a vector containing the minimum values for each element of `self` and `rhs`. /// In other words this computes `[self.x.min(rhs.x), self.y.min(rhs.y), ..]`. fn min( - _self: Val, - rhs: Val, - ) -> Val { - let output: Val = bevy::math::UVec3::min( + _self: Val, + rhs: Val, + ) -> Val { + let output: Val = bevy::math::U16Vec3::min( _self.into_inner(), rhs.into_inner(), ) @@ -7667,65 +15958,65 @@ impl bevy::math::UVec3 { } /// Returns the horizontal minimum of `self`. /// In other words this computes `min(x, y, ..)`. - fn min_element(_self: Val) -> u32 { - let output: u32 = bevy::math::UVec3::min_element(_self.into_inner()).into(); + fn min_element(_self: Val) -> u16 { + let output: u16 = bevy::math::U16Vec3::min_element(_self.into_inner()).into(); output } fn mul( - _self: Val, - rhs: Ref, - ) -> Val { - let output: Val = , + rhs: Ref, + ) -> Val { + let output: Val = >::mul(_self.into_inner(), &rhs) .into(); output } fn mul( - _self: Val, - rhs: Val, - ) -> Val { - let output: Val = , + rhs: Val, + ) -> Val { + let output: Val = >::mul(_self.into_inner(), rhs.into_inner()) .into(); output } - fn mul(_self: Val, rhs: u32) -> Val { - let output: Val = , rhs: u16) -> Val { + let output: Val = >::mul(_self.into_inner(), rhs) .into(); output } /// Creates a new vector. - fn new(x: u32, y: u32, z: u32) -> Val { - let output: Val = bevy::math::UVec3::new(x, y, z).into(); + fn new(x: u16, y: u16, z: u16) -> Val { + let output: Val = bevy::math::U16Vec3::new(x, y, z).into(); output } fn rem( - _self: Val, - rhs: Ref, - ) -> Val { - let output: Val = , + rhs: Ref, + ) -> Val { + let output: Val = >::rem(_self.into_inner(), &rhs) .into(); output } fn rem( - _self: Val, - rhs: Val, - ) -> Val { - let output: Val = , + rhs: Val, + ) -> Val { + let output: Val = >::rem(_self.into_inner(), rhs.into_inner()) .into(); output } - fn rem(_self: Val, rhs: u32) -> Val { - let output: Val = , rhs: u16) -> Val { + let output: Val = >::rem(_self.into_inner(), rhs) .into(); output @@ -7733,10 +16024,10 @@ impl bevy::math::UVec3 { /// Returns a vector containing the saturating addition of `self` and `rhs`. /// In other words this computes `[self.x.saturating_add(rhs.x), self.y.saturating_add(rhs.y), ..]`. fn saturating_add( - _self: Val, - rhs: Val, - ) -> Val { - let output: Val = bevy::math::UVec3::saturating_add( + _self: Val, + rhs: Val, + ) -> Val { + let output: Val = bevy::math::U16Vec3::saturating_add( _self.into_inner(), rhs.into_inner(), ) @@ -7746,10 +16037,10 @@ impl bevy::math::UVec3 { /// Returns a vector containing the saturating addition of `self` and signed vector `rhs`. /// In other words this computes `[self.x.saturating_add_signed(rhs.x), self.y.saturating_add_signed(rhs.y), ..]`. fn saturating_add_signed( - _self: Val, - rhs: Val, - ) -> Val { - let output: Val = bevy::math::UVec3::saturating_add_signed( + _self: Val, + rhs: Val, + ) -> Val { + let output: Val = bevy::math::U16Vec3::saturating_add_signed( _self.into_inner(), rhs.into_inner(), ) @@ -7759,10 +16050,10 @@ impl bevy::math::UVec3 { /// Returns a vector containing the saturating division of `self` and `rhs`. /// In other words this computes `[self.x.saturating_div(rhs.x), self.y.saturating_div(rhs.y), ..]`. fn saturating_div( - _self: Val, - rhs: Val, - ) -> Val { - let output: Val = bevy::math::UVec3::saturating_div( + _self: Val, + rhs: Val, + ) -> Val { + let output: Val = bevy::math::U16Vec3::saturating_div( _self.into_inner(), rhs.into_inner(), ) @@ -7772,10 +16063,10 @@ impl bevy::math::UVec3 { /// Returns a vector containing the saturating multiplication of `self` and `rhs`. /// In other words this computes `[self.x.saturating_mul(rhs.x), self.y.saturating_mul(rhs.y), ..]`. fn saturating_mul( - _self: Val, - rhs: Val, - ) -> Val { - let output: Val = bevy::math::UVec3::saturating_mul( + _self: Val, + rhs: Val, + ) -> Val { + let output: Val = bevy::math::U16Vec3::saturating_mul( _self.into_inner(), rhs.into_inner(), ) @@ -7785,10 +16076,10 @@ impl bevy::math::UVec3 { /// Returns a vector containing the saturating subtraction of `self` and `rhs`. /// In other words this computes `[self.x.saturating_sub(rhs.x), self.y.saturating_sub(rhs.y), ..]`. fn saturating_sub( - _self: Val, - rhs: Val, - ) -> Val { - let output: Val = bevy::math::UVec3::saturating_sub( + _self: Val, + rhs: Val, + ) -> Val { + let output: Val = bevy::math::U16Vec3::saturating_sub( _self.into_inner(), rhs.into_inner(), ) @@ -7801,10 +16092,10 @@ impl bevy::math::UVec3 { /// uses the element from `if_false`. fn select( mask: Val, - if_true: Val, - if_false: Val, - ) -> Val { - let output: Val = bevy::math::UVec3::select( + if_true: Val, + if_false: Val, + ) -> Val { + let output: Val = bevy::math::U16Vec3::select( mask.into_inner(), if_true.into_inner(), if_false.into_inner(), @@ -7813,54 +16104,54 @@ impl bevy::math::UVec3 { output } /// Creates a vector with all elements set to `v`. - fn splat(v: u32) -> Val { - let output: Val = bevy::math::UVec3::splat(v).into(); + fn splat(v: u16) -> Val { + let output: Val = bevy::math::U16Vec3::splat(v).into(); output } fn sub( - _self: Val, - rhs: Ref, - ) -> Val { - let output: Val = , + rhs: Ref, + ) -> Val { + let output: Val = >::sub(_self.into_inner(), &rhs) .into(); output } fn sub( - _self: Val, - rhs: Val, - ) -> Val { - let output: Val = , + rhs: Val, + ) -> Val { + let output: Val = >::sub(_self.into_inner(), rhs.into_inner()) .into(); output } - fn sub(_self: Val, rhs: u32) -> Val { - let output: Val = , rhs: u16) -> Val { + let output: Val = >::sub(_self.into_inner(), rhs) .into(); output } /// `[x, y, z]` - fn to_array(_self: Ref) -> [u32; 3] { - let output: [u32; 3] = bevy::math::UVec3::to_array(&_self).into(); + fn to_array(_self: Ref) -> [u16; 3] { + let output: [u16; 3] = bevy::math::U16Vec3::to_array(&_self).into(); output } /// Creates a 2D vector from the `x` and `y` elements of `self`, discarding `z`. /// Truncation may also be performed by using [`self.xy()`][crate::swizzles::Vec3Swizzles::xy()]. - fn truncate(_self: Val) -> Val { - let output: Val = bevy::math::UVec3::truncate( + fn truncate(_self: Val) -> Val { + let output: Val = bevy::math::U16Vec3::truncate( _self.into_inner(), ) .into(); output } /// Creates a 3D vector from `self` with the given value of `x`. - fn with_x(_self: Val, x: u32) -> Val { - let output: Val = bevy::math::UVec3::with_x( + fn with_x(_self: Val, x: u16) -> Val { + let output: Val = bevy::math::U16Vec3::with_x( _self.into_inner(), x, ) @@ -7868,8 +16159,8 @@ impl bevy::math::UVec3 { output } /// Creates a 3D vector from `self` with the given value of `y`. - fn with_y(_self: Val, y: u32) -> Val { - let output: Val = bevy::math::UVec3::with_y( + fn with_y(_self: Val, y: u16) -> Val { + let output: Val = bevy::math::U16Vec3::with_y( _self.into_inner(), y, ) @@ -7877,8 +16168,8 @@ impl bevy::math::UVec3 { output } /// Creates a 3D vector from `self` with the given value of `z`. - fn with_z(_self: Val, z: u32) -> Val { - let output: Val = bevy::math::UVec3::with_z( + fn with_z(_self: Val, z: u16) -> Val { + let output: Val = bevy::math::U16Vec3::with_z( _self.into_inner(), z, ) @@ -7888,10 +16179,10 @@ impl bevy::math::UVec3 { /// Returns a vector containing the wrapping addition of `self` and `rhs`. /// In other words this computes `[self.x.wrapping_add(rhs.x), self.y.wrapping_add(rhs.y), ..]`. fn wrapping_add( - _self: Val, - rhs: Val, - ) -> Val { - let output: Val = bevy::math::UVec3::wrapping_add( + _self: Val, + rhs: Val, + ) -> Val { + let output: Val = bevy::math::U16Vec3::wrapping_add( _self.into_inner(), rhs.into_inner(), ) @@ -7901,10 +16192,10 @@ impl bevy::math::UVec3 { /// Returns a vector containing the wrapping addition of `self` and signed vector `rhs`. /// In other words this computes `[self.x.wrapping_add_signed(rhs.x), self.y.wrapping_add_signed(rhs.y), ..]`. fn wrapping_add_signed( - _self: Val, - rhs: Val, - ) -> Val { - let output: Val = bevy::math::UVec3::wrapping_add_signed( + _self: Val, + rhs: Val, + ) -> Val { + let output: Val = bevy::math::U16Vec3::wrapping_add_signed( _self.into_inner(), rhs.into_inner(), ) @@ -7914,10 +16205,10 @@ impl bevy::math::UVec3 { /// Returns a vector containing the wrapping division of `self` and `rhs`. /// In other words this computes `[self.x.wrapping_div(rhs.x), self.y.wrapping_div(rhs.y), ..]`. fn wrapping_div( - _self: Val, - rhs: Val, - ) -> Val { - let output: Val = bevy::math::UVec3::wrapping_div( + _self: Val, + rhs: Val, + ) -> Val { + let output: Val = bevy::math::U16Vec3::wrapping_div( _self.into_inner(), rhs.into_inner(), ) @@ -7927,10 +16218,10 @@ impl bevy::math::UVec3 { /// Returns a vector containing the wrapping multiplication of `self` and `rhs`. /// In other words this computes `[self.x.wrapping_mul(rhs.x), self.y.wrapping_mul(rhs.y), ..]`. fn wrapping_mul( - _self: Val, - rhs: Val, - ) -> Val { - let output: Val = bevy::math::UVec3::wrapping_mul( + _self: Val, + rhs: Val, + ) -> Val { + let output: Val = bevy::math::U16Vec3::wrapping_mul( _self.into_inner(), rhs.into_inner(), ) @@ -7940,10 +16231,10 @@ impl bevy::math::UVec3 { /// Returns a vector containing the wrapping subtraction of `self` and `rhs`. /// In other words this computes `[self.x.wrapping_sub(rhs.x), self.y.wrapping_sub(rhs.y), ..]`. fn wrapping_sub( - _self: Val, - rhs: Val, - ) -> Val { - let output: Val = bevy::math::UVec3::wrapping_sub( + _self: Val, + rhs: Val, + ) -> Val { + let output: Val = bevy::math::U16Vec3::wrapping_sub( _self.into_inner(), rhs.into_inner(), ) @@ -7953,82 +16244,108 @@ impl bevy::math::UVec3 { } #[script_bindings( remote, - name = "u_vec_4_functions", + name = "u_16_vec_4_functions", bms_core_path = "bevy_mod_scripting_core", generated )] -impl bevy::math::UVec4 { +impl bevy::math::U16Vec4 { fn add( - _self: Val, - rhs: Ref, - ) -> Val { - let output: Val = , + rhs: Ref, + ) -> Val { + let output: Val = >::add(_self.into_inner(), &rhs) .into(); output } fn add( - _self: Val, - rhs: Val, - ) -> Val { - let output: Val = , + rhs: Val, + ) -> Val { + let output: Val = >::add(_self.into_inner(), rhs.into_inner()) .into(); output } - fn add(_self: Val, rhs: u32) -> Val { - let output: Val = , rhs: u16) -> Val { + let output: Val = >::add(_self.into_inner(), rhs) .into(); output } /// Casts all elements of `self` to `f64`. - fn as_dvec4(_self: Ref) -> Val { - let output: Val = bevy::math::UVec4::as_dvec4(&_self).into(); + fn as_dvec4(_self: Ref) -> Val { + let output: Val = bevy::math::U16Vec4::as_dvec4(&_self) + .into(); + output + } + /// Casts all elements of `self` to `i16`. + fn as_i16vec4(_self: Ref) -> Val { + let output: Val = bevy::math::U16Vec4::as_i16vec4(&_self) + .into(); output } /// Casts all elements of `self` to `i64`. - fn as_i64vec4(_self: Ref) -> Val { - let output: Val = bevy::math::UVec4::as_i64vec4(&_self) + fn as_i64vec4(_self: Ref) -> Val { + let output: Val = bevy::math::U16Vec4::as_i64vec4(&_self) + .into(); + output + } + /// Casts all elements of `self` to `i8`. + fn as_i8vec4(_self: Ref) -> Val { + let output: Val = bevy::math::U16Vec4::as_i8vec4(&_self) .into(); output } /// Casts all elements of `self` to `i32`. - fn as_ivec4(_self: Ref) -> Val { - let output: Val = bevy::math::UVec4::as_ivec4(&_self).into(); + fn as_ivec4(_self: Ref) -> Val { + let output: Val = bevy::math::U16Vec4::as_ivec4(&_self) + .into(); output } /// Casts all elements of `self` to `u64`. - fn as_u64vec4(_self: Ref) -> Val { - let output: Val = bevy::math::UVec4::as_u64vec4(&_self) + fn as_u64vec4(_self: Ref) -> Val { + let output: Val = bevy::math::U16Vec4::as_u64vec4(&_self) + .into(); + output + } + /// Casts all elements of `self` to `u8`. + fn as_u8vec4(_self: Ref) -> Val { + let output: Val = bevy::math::U16Vec4::as_u8vec4(&_self) + .into(); + output + } + /// Casts all elements of `self` to `u32`. + fn as_uvec4(_self: Ref) -> Val { + let output: Val = bevy::math::U16Vec4::as_uvec4(&_self) .into(); output } /// Casts all elements of `self` to `f32`. - fn as_vec4(_self: Ref) -> Val { - let output: Val = bevy::math::UVec4::as_vec4(&_self).into(); + fn as_vec4(_self: Ref) -> Val { + let output: Val = bevy::math::U16Vec4::as_vec4(&_self).into(); output } - fn assert_receiver_is_total_eq(_self: Ref) -> () { - let output: () = ::assert_receiver_is_total_eq( + fn assert_receiver_is_total_eq(_self: Ref) -> () { + let output: () = ::assert_receiver_is_total_eq( &_self, ) .into(); output } - /// Component-wise clamping of values, similar to [`u32::clamp`]. + /// Component-wise clamping of values, similar to [`u16::clamp`]. /// Each element in `min` must be less-or-equal to the corresponding element in `max`. /// # Panics /// Will panic if `min` is greater than `max` when `glam_assert` is enabled. fn clamp( - _self: Val, - min: Val, - max: Val, - ) -> Val { - let output: Val = bevy::math::UVec4::clamp( + _self: Val, + min: Val, + max: Val, + ) -> Val { + let output: Val = bevy::math::U16Vec4::clamp( _self.into_inner(), min.into_inner(), max.into_inner(), @@ -8036,8 +16353,8 @@ impl bevy::math::UVec4 { .into(); output } - fn clone(_self: Ref) -> Val { - let output: Val = ::clone( + fn clone(_self: Ref) -> Val { + let output: Val = ::clone( &_self, ) .into(); @@ -8048,10 +16365,10 @@ impl bevy::math::UVec4 { /// In other words, this computes `[self.x == rhs.x, self.y == rhs.y, ..]` for all /// elements. fn cmpeq( - _self: Val, - rhs: Val, + _self: Val, + rhs: Val, ) -> Val { - let output: Val = bevy::math::UVec4::cmpeq( + let output: Val = bevy::math::U16Vec4::cmpeq( _self.into_inner(), rhs.into_inner(), ) @@ -8063,10 +16380,10 @@ impl bevy::math::UVec4 { /// In other words this computes `[self.x >= rhs.x, self.y >= rhs.y, ..]` for all /// elements. fn cmpge( - _self: Val, - rhs: Val, + _self: Val, + rhs: Val, ) -> Val { - let output: Val = bevy::math::UVec4::cmpge( + let output: Val = bevy::math::U16Vec4::cmpge( _self.into_inner(), rhs.into_inner(), ) @@ -8078,10 +16395,10 @@ impl bevy::math::UVec4 { /// In other words this computes `[self.x > rhs.x, self.y > rhs.y, ..]` for all /// elements. fn cmpgt( - _self: Val, - rhs: Val, + _self: Val, + rhs: Val, ) -> Val { - let output: Val = bevy::math::UVec4::cmpgt( + let output: Val = bevy::math::U16Vec4::cmpgt( _self.into_inner(), rhs.into_inner(), ) @@ -8093,10 +16410,10 @@ impl bevy::math::UVec4 { /// In other words this computes `[self.x <= rhs.x, self.y <= rhs.y, ..]` for all /// elements. fn cmple( - _self: Val, - rhs: Val, + _self: Val, + rhs: Val, ) -> Val { - let output: Val = bevy::math::UVec4::cmple( + let output: Val = bevy::math::U16Vec4::cmple( _self.into_inner(), rhs.into_inner(), ) @@ -8108,10 +16425,10 @@ impl bevy::math::UVec4 { /// In other words this computes `[self.x < rhs.x, self.y < rhs.y, ..]` for all /// elements. fn cmplt( - _self: Val, - rhs: Val, + _self: Val, + rhs: Val, ) -> Val { - let output: Val = bevy::math::UVec4::cmplt( + let output: Val = bevy::math::U16Vec4::cmplt( _self.into_inner(), rhs.into_inner(), ) @@ -8123,10 +16440,10 @@ impl bevy::math::UVec4 { /// In other words this computes `[self.x != rhs.x, self.y != rhs.y, ..]` for all /// elements. fn cmpne( - _self: Val, - rhs: Val, + _self: Val, + rhs: Val, ) -> Val { - let output: Val = bevy::math::UVec4::cmpne( + let output: Val = bevy::math::U16Vec4::cmpne( _self.into_inner(), rhs.into_inner(), ) @@ -8134,44 +16451,44 @@ impl bevy::math::UVec4 { output } fn div( - _self: Val, - rhs: Ref, - ) -> Val { - let output: Val = , + rhs: Ref, + ) -> Val { + let output: Val = >::div(_self.into_inner(), &rhs) .into(); output } fn div( - _self: Val, - rhs: Val, - ) -> Val { - let output: Val = , + rhs: Val, + ) -> Val { + let output: Val = >::div(_self.into_inner(), rhs.into_inner()) .into(); output } - fn div(_self: Val, rhs: u32) -> Val { - let output: Val = , rhs: u16) -> Val { + let output: Val = >::div(_self.into_inner(), rhs) .into(); output } /// Computes the dot product of `self` and `rhs`. - fn dot(_self: Val, rhs: Val) -> u32 { - let output: u32 = bevy::math::UVec4::dot(_self.into_inner(), rhs.into_inner()) + fn dot(_self: Val, rhs: Val) -> u16 { + let output: u16 = bevy::math::U16Vec4::dot(_self.into_inner(), rhs.into_inner()) .into(); output } /// Returns a vector where every component is the dot product of `self` and `rhs`. fn dot_into_vec( - _self: Val, - rhs: Val, - ) -> Val { - let output: Val = bevy::math::UVec4::dot_into_vec( + _self: Val, + rhs: Val, + ) -> Val { + let output: Val = bevy::math::U16Vec4::dot_into_vec( _self.into_inner(), rhs.into_inner(), ) @@ -8180,40 +16497,41 @@ impl bevy::math::UVec4 { } /// Returns the product of all elements of `self`. /// In other words, this computes `self.x * self.y * ..`. - fn element_product(_self: Val) -> u32 { - let output: u32 = bevy::math::UVec4::element_product(_self.into_inner()).into(); + fn element_product(_self: Val) -> u16 { + let output: u16 = bevy::math::U16Vec4::element_product(_self.into_inner()) + .into(); output } /// Returns the sum of all elements of `self`. /// In other words, this computes `self.x + self.y + ..`. - fn element_sum(_self: Val) -> u32 { - let output: u32 = bevy::math::UVec4::element_sum(_self.into_inner()).into(); + fn element_sum(_self: Val) -> u16 { + let output: u16 = bevy::math::U16Vec4::element_sum(_self.into_inner()).into(); output } - fn eq(_self: Ref, other: Ref) -> bool { - let output: bool = , other: Ref) -> bool { + let output: bool = >::eq(&_self, &other) .into(); output } /// Creates a new vector from an array. - fn from_array(a: [u32; 4]) -> Val { - let output: Val = bevy::math::UVec4::from_array(a).into(); + fn from_array(a: [u16; 4]) -> Val { + let output: Val = bevy::math::U16Vec4::from_array(a).into(); output } /// Computes the squared length of `self`. - fn length_squared(_self: Val) -> u32 { - let output: u32 = bevy::math::UVec4::length_squared(_self.into_inner()).into(); + fn length_squared(_self: Val) -> u16 { + let output: u16 = bevy::math::U16Vec4::length_squared(_self.into_inner()).into(); output } /// Returns a vector containing the maximum values for each element of `self` and `rhs`. /// In other words this computes `[self.x.max(rhs.x), self.y.max(rhs.y), ..]`. fn max( - _self: Val, - rhs: Val, - ) -> Val { - let output: Val = bevy::math::UVec4::max( + _self: Val, + rhs: Val, + ) -> Val { + let output: Val = bevy::math::U16Vec4::max( _self.into_inner(), rhs.into_inner(), ) @@ -8222,17 +16540,17 @@ impl bevy::math::UVec4 { } /// Returns the horizontal maximum of `self`. /// In other words this computes `max(x, y, ..)`. - fn max_element(_self: Val) -> u32 { - let output: u32 = bevy::math::UVec4::max_element(_self.into_inner()).into(); + fn max_element(_self: Val) -> u16 { + let output: u16 = bevy::math::U16Vec4::max_element(_self.into_inner()).into(); output } /// Returns a vector containing the minimum values for each element of `self` and `rhs`. /// In other words this computes `[self.x.min(rhs.x), self.y.min(rhs.y), ..]`. fn min( - _self: Val, - rhs: Val, - ) -> Val { - let output: Val = bevy::math::UVec4::min( + _self: Val, + rhs: Val, + ) -> Val { + let output: Val = bevy::math::U16Vec4::min( _self.into_inner(), rhs.into_inner(), ) @@ -8241,65 +16559,66 @@ impl bevy::math::UVec4 { } /// Returns the horizontal minimum of `self`. /// In other words this computes `min(x, y, ..)`. - fn min_element(_self: Val) -> u32 { - let output: u32 = bevy::math::UVec4::min_element(_self.into_inner()).into(); + fn min_element(_self: Val) -> u16 { + let output: u16 = bevy::math::U16Vec4::min_element(_self.into_inner()).into(); output } fn mul( - _self: Val, - rhs: Ref, - ) -> Val { - let output: Val = , + rhs: Ref, + ) -> Val { + let output: Val = >::mul(_self.into_inner(), &rhs) .into(); output } fn mul( - _self: Val, - rhs: Val, - ) -> Val { - let output: Val = , + rhs: Val, + ) -> Val { + let output: Val = >::mul(_self.into_inner(), rhs.into_inner()) .into(); output } - fn mul(_self: Val, rhs: u32) -> Val { - let output: Val = , rhs: u16) -> Val { + let output: Val = >::mul(_self.into_inner(), rhs) .into(); output } /// Creates a new vector. - fn new(x: u32, y: u32, z: u32, w: u32) -> Val { - let output: Val = bevy::math::UVec4::new(x, y, z, w).into(); + fn new(x: u16, y: u16, z: u16, w: u16) -> Val { + let output: Val = bevy::math::U16Vec4::new(x, y, z, w) + .into(); output } fn rem( - _self: Val, - rhs: Ref, - ) -> Val { - let output: Val = , + rhs: Ref, + ) -> Val { + let output: Val = >::rem(_self.into_inner(), &rhs) .into(); output } fn rem( - _self: Val, - rhs: Val, - ) -> Val { - let output: Val = , + rhs: Val, + ) -> Val { + let output: Val = >::rem(_self.into_inner(), rhs.into_inner()) .into(); output } - fn rem(_self: Val, rhs: u32) -> Val { - let output: Val = , rhs: u16) -> Val { + let output: Val = >::rem(_self.into_inner(), rhs) .into(); output @@ -8307,10 +16626,10 @@ impl bevy::math::UVec4 { /// Returns a vector containing the saturating addition of `self` and `rhs`. /// In other words this computes `[self.x.saturating_add(rhs.x), self.y.saturating_add(rhs.y), ..]`. fn saturating_add( - _self: Val, - rhs: Val, - ) -> Val { - let output: Val = bevy::math::UVec4::saturating_add( + _self: Val, + rhs: Val, + ) -> Val { + let output: Val = bevy::math::U16Vec4::saturating_add( _self.into_inner(), rhs.into_inner(), ) @@ -8320,10 +16639,10 @@ impl bevy::math::UVec4 { /// Returns a vector containing the saturating addition of `self` and signed vector `rhs`. /// In other words this computes `[self.x.saturating_add_signed(rhs.x), self.y.saturating_add_signed(rhs.y), ..]`. fn saturating_add_signed( - _self: Val, - rhs: Val, - ) -> Val { - let output: Val = bevy::math::UVec4::saturating_add_signed( + _self: Val, + rhs: Val, + ) -> Val { + let output: Val = bevy::math::U16Vec4::saturating_add_signed( _self.into_inner(), rhs.into_inner(), ) @@ -8333,10 +16652,10 @@ impl bevy::math::UVec4 { /// Returns a vector containing the saturating division of `self` and `rhs`. /// In other words this computes `[self.x.saturating_div(rhs.x), self.y.saturating_div(rhs.y), ..]`. fn saturating_div( - _self: Val, - rhs: Val, - ) -> Val { - let output: Val = bevy::math::UVec4::saturating_div( + _self: Val, + rhs: Val, + ) -> Val { + let output: Val = bevy::math::U16Vec4::saturating_div( _self.into_inner(), rhs.into_inner(), ) @@ -8346,10 +16665,10 @@ impl bevy::math::UVec4 { /// Returns a vector containing the saturating multiplication of `self` and `rhs`. /// In other words this computes `[self.x.saturating_mul(rhs.x), self.y.saturating_mul(rhs.y), ..]`. fn saturating_mul( - _self: Val, - rhs: Val, - ) -> Val { - let output: Val = bevy::math::UVec4::saturating_mul( + _self: Val, + rhs: Val, + ) -> Val { + let output: Val = bevy::math::U16Vec4::saturating_mul( _self.into_inner(), rhs.into_inner(), ) @@ -8359,10 +16678,10 @@ impl bevy::math::UVec4 { /// Returns a vector containing the saturating subtraction of `self` and `rhs`. /// In other words this computes `[self.x.saturating_sub(rhs.x), self.y.saturating_sub(rhs.y), ..]`. fn saturating_sub( - _self: Val, - rhs: Val, - ) -> Val { - let output: Val = bevy::math::UVec4::saturating_sub( + _self: Val, + rhs: Val, + ) -> Val { + let output: Val = bevy::math::U16Vec4::saturating_sub( _self.into_inner(), rhs.into_inner(), ) @@ -8375,10 +16694,10 @@ impl bevy::math::UVec4 { /// uses the element from `if_false`. fn select( mask: Val, - if_true: Val, - if_false: Val, - ) -> Val { - let output: Val = bevy::math::UVec4::select( + if_true: Val, + if_false: Val, + ) -> Val { + let output: Val = bevy::math::U16Vec4::select( mask.into_inner(), if_true.into_inner(), if_false.into_inner(), @@ -8387,54 +16706,54 @@ impl bevy::math::UVec4 { output } /// Creates a vector with all elements set to `v`. - fn splat(v: u32) -> Val { - let output: Val = bevy::math::UVec4::splat(v).into(); + fn splat(v: u16) -> Val { + let output: Val = bevy::math::U16Vec4::splat(v).into(); output } fn sub( - _self: Val, - rhs: Ref, - ) -> Val { - let output: Val = , + rhs: Ref, + ) -> Val { + let output: Val = >::sub(_self.into_inner(), &rhs) .into(); output } fn sub( - _self: Val, - rhs: Val, - ) -> Val { - let output: Val = , + rhs: Val, + ) -> Val { + let output: Val = >::sub(_self.into_inner(), rhs.into_inner()) .into(); output } - fn sub(_self: Val, rhs: u32) -> Val { - let output: Val = , rhs: u16) -> Val { + let output: Val = >::sub(_self.into_inner(), rhs) .into(); output } /// `[x, y, z, w]` - fn to_array(_self: Ref) -> [u32; 4] { - let output: [u32; 4] = bevy::math::UVec4::to_array(&_self).into(); + fn to_array(_self: Ref) -> [u16; 4] { + let output: [u16; 4] = bevy::math::U16Vec4::to_array(&_self).into(); output } /// Creates a 3D vector from the `x`, `y` and `z` elements of `self`, discarding `w`. - /// Truncation to [`UVec3`] may also be performed by using [`self.xyz()`][crate::swizzles::Vec4Swizzles::xyz()]. - fn truncate(_self: Val) -> Val { - let output: Val = bevy::math::UVec4::truncate( + /// Truncation to [`U16Vec3`] may also be performed by using [`self.xyz()`][crate::swizzles::Vec4Swizzles::xyz()]. + fn truncate(_self: Val) -> Val { + let output: Val = bevy::math::U16Vec4::truncate( _self.into_inner(), ) .into(); output } /// Creates a 4D vector from `self` with the given value of `w`. - fn with_w(_self: Val, w: u32) -> Val { - let output: Val = bevy::math::UVec4::with_w( + fn with_w(_self: Val, w: u16) -> Val { + let output: Val = bevy::math::U16Vec4::with_w( _self.into_inner(), w, ) @@ -8442,8 +16761,8 @@ impl bevy::math::UVec4 { output } /// Creates a 4D vector from `self` with the given value of `x`. - fn with_x(_self: Val, x: u32) -> Val { - let output: Val = bevy::math::UVec4::with_x( + fn with_x(_self: Val, x: u16) -> Val { + let output: Val = bevy::math::U16Vec4::with_x( _self.into_inner(), x, ) @@ -8451,8 +16770,8 @@ impl bevy::math::UVec4 { output } /// Creates a 4D vector from `self` with the given value of `y`. - fn with_y(_self: Val, y: u32) -> Val { - let output: Val = bevy::math::UVec4::with_y( + fn with_y(_self: Val, y: u16) -> Val { + let output: Val = bevy::math::U16Vec4::with_y( _self.into_inner(), y, ) @@ -8460,8 +16779,8 @@ impl bevy::math::UVec4 { output } /// Creates a 4D vector from `self` with the given value of `z`. - fn with_z(_self: Val, z: u32) -> Val { - let output: Val = bevy::math::UVec4::with_z( + fn with_z(_self: Val, z: u16) -> Val { + let output: Val = bevy::math::U16Vec4::with_z( _self.into_inner(), z, ) @@ -8471,10 +16790,10 @@ impl bevy::math::UVec4 { /// Returns a vector containing the wrapping addition of `self` and `rhs`. /// In other words this computes `[self.x.wrapping_add(rhs.x), self.y.wrapping_add(rhs.y), ..]`. fn wrapping_add( - _self: Val, - rhs: Val, - ) -> Val { - let output: Val = bevy::math::UVec4::wrapping_add( + _self: Val, + rhs: Val, + ) -> Val { + let output: Val = bevy::math::U16Vec4::wrapping_add( _self.into_inner(), rhs.into_inner(), ) @@ -8484,10 +16803,10 @@ impl bevy::math::UVec4 { /// Returns a vector containing the wrapping addition of `self` and signed vector `rhs`. /// In other words this computes `[self.x.wrapping_add_signed(rhs.x), self.y.wrapping_add_signed(rhs.y), ..]`. fn wrapping_add_signed( - _self: Val, - rhs: Val, - ) -> Val { - let output: Val = bevy::math::UVec4::wrapping_add_signed( + _self: Val, + rhs: Val, + ) -> Val { + let output: Val = bevy::math::U16Vec4::wrapping_add_signed( _self.into_inner(), rhs.into_inner(), ) @@ -8497,10 +16816,10 @@ impl bevy::math::UVec4 { /// Returns a vector containing the wrapping division of `self` and `rhs`. /// In other words this computes `[self.x.wrapping_div(rhs.x), self.y.wrapping_div(rhs.y), ..]`. fn wrapping_div( - _self: Val, - rhs: Val, - ) -> Val { - let output: Val = bevy::math::UVec4::wrapping_div( + _self: Val, + rhs: Val, + ) -> Val { + let output: Val = bevy::math::U16Vec4::wrapping_div( _self.into_inner(), rhs.into_inner(), ) @@ -8510,10 +16829,10 @@ impl bevy::math::UVec4 { /// Returns a vector containing the wrapping multiplication of `self` and `rhs`. /// In other words this computes `[self.x.wrapping_mul(rhs.x), self.y.wrapping_mul(rhs.y), ..]`. fn wrapping_mul( - _self: Val, - rhs: Val, - ) -> Val { - let output: Val = bevy::math::UVec4::wrapping_mul( + _self: Val, + rhs: Val, + ) -> Val { + let output: Val = bevy::math::U16Vec4::wrapping_mul( _self.into_inner(), rhs.into_inner(), ) @@ -8523,10 +16842,10 @@ impl bevy::math::UVec4 { /// Returns a vector containing the wrapping subtraction of `self` and `rhs`. /// In other words this computes `[self.x.wrapping_sub(rhs.x), self.y.wrapping_sub(rhs.y), ..]`. fn wrapping_sub( - _self: Val, - rhs: Val, - ) -> Val { - let output: Val = bevy::math::UVec4::wrapping_sub( + _self: Val, + rhs: Val, + ) -> Val { + let output: Val = bevy::math::U16Vec4::wrapping_sub( _self.into_inner(), rhs.into_inner(), ) @@ -8545,7 +16864,7 @@ impl bevy::math::U64Vec2 { _self: Val, rhs: Ref, ) -> Val { - let output: Val = = >::add(_self.into_inner(), &rhs) .into(); @@ -8555,14 +16874,14 @@ impl bevy::math::U64Vec2 { _self: Val, rhs: Val, ) -> Val { - let output: Val = = >::add(_self.into_inner(), rhs.into_inner()) .into(); output } fn add(_self: Val, rhs: u64) -> Val { - let output: Val = = >::add(_self.into_inner(), rhs) .into(); @@ -8574,18 +16893,42 @@ impl bevy::math::U64Vec2 { .into(); output } + /// Casts all elements of `self` to `i16`. + fn as_i16vec2(_self: Ref) -> Val { + let output: Val = bevy::math::U64Vec2::as_i16vec2(&_self) + .into(); + output + } /// Casts all elements of `self` to `i64`. fn as_i64vec2(_self: Ref) -> Val { let output: Val = bevy::math::U64Vec2::as_i64vec2(&_self) .into(); output } + /// Casts all elements of `self` to `i8`. + fn as_i8vec2(_self: Ref) -> Val { + let output: Val = bevy::math::U64Vec2::as_i8vec2(&_self) + .into(); + output + } /// Casts all elements of `self` to `i32`. fn as_ivec2(_self: Ref) -> Val { let output: Val = bevy::math::U64Vec2::as_ivec2(&_self) .into(); output } + /// Casts all elements of `self` to `u16`. + fn as_u16vec2(_self: Ref) -> Val { + let output: Val = bevy::math::U64Vec2::as_u16vec2(&_self) + .into(); + output + } + /// Casts all elements of `self` to `u8`. + fn as_u8vec2(_self: Ref) -> Val { + let output: Val = bevy::math::U64Vec2::as_u8vec2(&_self) + .into(); + output + } /// Casts all elements of `self` to `u32`. fn as_uvec2(_self: Ref) -> Val { let output: Val = bevy::math::U64Vec2::as_uvec2(&_self) @@ -8598,7 +16941,7 @@ impl bevy::math::U64Vec2 { output } fn assert_receiver_is_total_eq(_self: Ref) -> () { - let output: () = ::assert_receiver_is_total_eq( + let output: () = ::assert_receiver_is_total_eq( &_self, ) .into(); @@ -8722,7 +17065,7 @@ impl bevy::math::U64Vec2 { _self: Val, rhs: Ref, ) -> Val { - let output: Val = = >::div(_self.into_inner(), &rhs) .into(); @@ -8732,14 +17075,14 @@ impl bevy::math::U64Vec2 { _self: Val, rhs: Val, ) -> Val { - let output: Val = = >::div(_self.into_inner(), rhs.into_inner()) .into(); output } fn div(_self: Val, rhs: u64) -> Val { - let output: Val = = >::div(_self.into_inner(), rhs) .into(); @@ -8777,7 +17120,7 @@ impl bevy::math::U64Vec2 { output } fn eq(_self: Ref, other: Ref) -> bool { - let output: bool = >::eq(&_self, &other) .into(); @@ -8844,7 +17187,7 @@ impl bevy::math::U64Vec2 { _self: Val, rhs: Ref, ) -> Val { - let output: Val = = >::mul(_self.into_inner(), &rhs) .into(); @@ -8854,14 +17197,14 @@ impl bevy::math::U64Vec2 { _self: Val, rhs: Val, ) -> Val { - let output: Val = = >::mul(_self.into_inner(), rhs.into_inner()) .into(); output } fn mul(_self: Val, rhs: u64) -> Val { - let output: Val = = >::mul(_self.into_inner(), rhs) .into(); @@ -8876,7 +17219,7 @@ impl bevy::math::U64Vec2 { _self: Val, rhs: Ref, ) -> Val { - let output: Val = = >::rem(_self.into_inner(), &rhs) .into(); @@ -8886,14 +17229,14 @@ impl bevy::math::U64Vec2 { _self: Val, rhs: Val, ) -> Val { - let output: Val = = >::rem(_self.into_inner(), rhs.into_inner()) .into(); output } fn rem(_self: Val, rhs: u64) -> Val { - let output: Val = = >::rem(_self.into_inner(), rhs) .into(); @@ -8990,7 +17333,7 @@ impl bevy::math::U64Vec2 { _self: Val, rhs: Ref, ) -> Val { - let output: Val = = >::sub(_self.into_inner(), &rhs) .into(); @@ -9000,14 +17343,14 @@ impl bevy::math::U64Vec2 { _self: Val, rhs: Val, ) -> Val { - let output: Val = = >::sub(_self.into_inner(), rhs.into_inner()) .into(); output } fn sub(_self: Val, rhs: u64) -> Val { - let output: Val = = >::sub(_self.into_inner(), rhs) .into(); @@ -9113,7 +17456,7 @@ impl bevy::math::U64Vec3 { _self: Val, rhs: Ref, ) -> Val { - let output: Val = = >::add(_self.into_inner(), &rhs) .into(); @@ -9123,14 +17466,14 @@ impl bevy::math::U64Vec3 { _self: Val, rhs: Val, ) -> Val { - let output: Val = = >::add(_self.into_inner(), rhs.into_inner()) .into(); output } fn add(_self: Val, rhs: u64) -> Val { - let output: Val = = >::add(_self.into_inner(), rhs) .into(); @@ -9142,18 +17485,42 @@ impl bevy::math::U64Vec3 { .into(); output } + /// Casts all elements of `self` to `i16`. + fn as_i16vec3(_self: Ref) -> Val { + let output: Val = bevy::math::U64Vec3::as_i16vec3(&_self) + .into(); + output + } /// Casts all elements of `self` to `i64`. fn as_i64vec3(_self: Ref) -> Val { let output: Val = bevy::math::U64Vec3::as_i64vec3(&_self) .into(); output } + /// Casts all elements of `self` to `i8`. + fn as_i8vec3(_self: Ref) -> Val { + let output: Val = bevy::math::U64Vec3::as_i8vec3(&_self) + .into(); + output + } /// Casts all elements of `self` to `i32`. fn as_ivec3(_self: Ref) -> Val { let output: Val = bevy::math::U64Vec3::as_ivec3(&_self) .into(); output } + /// Casts all elements of `self` to `u16`. + fn as_u16vec3(_self: Ref) -> Val { + let output: Val = bevy::math::U64Vec3::as_u16vec3(&_self) + .into(); + output + } + /// Casts all elements of `self` to `u8`. + fn as_u8vec3(_self: Ref) -> Val { + let output: Val = bevy::math::U64Vec3::as_u8vec3(&_self) + .into(); + output + } /// Casts all elements of `self` to `u32`. fn as_uvec3(_self: Ref) -> Val { let output: Val = bevy::math::U64Vec3::as_uvec3(&_self) @@ -9172,7 +17539,7 @@ impl bevy::math::U64Vec3 { output } fn assert_receiver_is_total_eq(_self: Ref) -> () { - let output: () = ::assert_receiver_is_total_eq( + let output: () = ::assert_receiver_is_total_eq( &_self, ) .into(); @@ -9308,7 +17675,7 @@ impl bevy::math::U64Vec3 { _self: Val, rhs: Ref, ) -> Val { - let output: Val = = >::div(_self.into_inner(), &rhs) .into(); @@ -9318,14 +17685,14 @@ impl bevy::math::U64Vec3 { _self: Val, rhs: Val, ) -> Val { - let output: Val = = >::div(_self.into_inner(), rhs.into_inner()) .into(); output } fn div(_self: Val, rhs: u64) -> Val { - let output: Val = = >::div(_self.into_inner(), rhs) .into(); @@ -9363,7 +17730,7 @@ impl bevy::math::U64Vec3 { output } fn eq(_self: Ref, other: Ref) -> bool { - let output: bool = >::eq(&_self, &other) .into(); @@ -9430,7 +17797,7 @@ impl bevy::math::U64Vec3 { _self: Val, rhs: Ref, ) -> Val { - let output: Val = = >::mul(_self.into_inner(), &rhs) .into(); @@ -9440,14 +17807,14 @@ impl bevy::math::U64Vec3 { _self: Val, rhs: Val, ) -> Val { - let output: Val = = >::mul(_self.into_inner(), rhs.into_inner()) .into(); output } fn mul(_self: Val, rhs: u64) -> Val { - let output: Val = = >::mul(_self.into_inner(), rhs) .into(); @@ -9462,7 +17829,7 @@ impl bevy::math::U64Vec3 { _self: Val, rhs: Ref, ) -> Val { - let output: Val = = >::rem(_self.into_inner(), &rhs) .into(); @@ -9472,14 +17839,14 @@ impl bevy::math::U64Vec3 { _self: Val, rhs: Val, ) -> Val { - let output: Val = = >::rem(_self.into_inner(), rhs.into_inner()) .into(); output } fn rem(_self: Val, rhs: u64) -> Val { - let output: Val = = >::rem(_self.into_inner(), rhs) .into(); @@ -9576,7 +17943,7 @@ impl bevy::math::U64Vec3 { _self: Val, rhs: Ref, ) -> Val { - let output: Val = = >::sub(_self.into_inner(), &rhs) .into(); @@ -9586,14 +17953,14 @@ impl bevy::math::U64Vec3 { _self: Val, rhs: Val, ) -> Val { - let output: Val = = >::sub(_self.into_inner(), rhs.into_inner()) .into(); output } fn sub(_self: Val, rhs: u64) -> Val { - let output: Val = = >::sub(_self.into_inner(), rhs) .into(); @@ -9717,7 +18084,7 @@ impl bevy::math::U64Vec4 { _self: Val, rhs: Ref, ) -> Val { - let output: Val = = >::add(_self.into_inner(), &rhs) .into(); @@ -9727,14 +18094,14 @@ impl bevy::math::U64Vec4 { _self: Val, rhs: Val, ) -> Val { - let output: Val = = >::add(_self.into_inner(), rhs.into_inner()) .into(); output } fn add(_self: Val, rhs: u64) -> Val { - let output: Val = = >::add(_self.into_inner(), rhs) .into(); @@ -9746,18 +18113,42 @@ impl bevy::math::U64Vec4 { .into(); output } + /// Casts all elements of `self` to `i16`. + fn as_i16vec4(_self: Ref) -> Val { + let output: Val = bevy::math::U64Vec4::as_i16vec4(&_self) + .into(); + output + } /// Casts all elements of `self` to `i64`. fn as_i64vec4(_self: Ref) -> Val { let output: Val = bevy::math::U64Vec4::as_i64vec4(&_self) .into(); output } + /// Casts all elements of `self` to `i8`. + fn as_i8vec4(_self: Ref) -> Val { + let output: Val = bevy::math::U64Vec4::as_i8vec4(&_self) + .into(); + output + } /// Casts all elements of `self` to `i32`. fn as_ivec4(_self: Ref) -> Val { let output: Val = bevy::math::U64Vec4::as_ivec4(&_self) .into(); output } + /// Casts all elements of `self` to `u16`. + fn as_u16vec4(_self: Ref) -> Val { + let output: Val = bevy::math::U64Vec4::as_u16vec4(&_self) + .into(); + output + } + /// Casts all elements of `self` to `u8`. + fn as_u8vec4(_self: Ref) -> Val { + let output: Val = bevy::math::U64Vec4::as_u8vec4(&_self) + .into(); + output + } /// Casts all elements of `self` to `u32`. fn as_uvec4(_self: Ref) -> Val { let output: Val = bevy::math::U64Vec4::as_uvec4(&_self) @@ -9770,7 +18161,7 @@ impl bevy::math::U64Vec4 { output } fn assert_receiver_is_total_eq(_self: Ref) -> () { - let output: () = ::assert_receiver_is_total_eq( + let output: () = ::assert_receiver_is_total_eq( &_self, ) .into(); @@ -9894,7 +18285,7 @@ impl bevy::math::U64Vec4 { _self: Val, rhs: Ref, ) -> Val { - let output: Val = = >::div(_self.into_inner(), &rhs) .into(); @@ -9904,14 +18295,14 @@ impl bevy::math::U64Vec4 { _self: Val, rhs: Val, ) -> Val { - let output: Val = = >::div(_self.into_inner(), rhs.into_inner()) .into(); output } fn div(_self: Val, rhs: u64) -> Val { - let output: Val = = >::div(_self.into_inner(), rhs) .into(); @@ -9949,7 +18340,7 @@ impl bevy::math::U64Vec4 { output } fn eq(_self: Ref, other: Ref) -> bool { - let output: bool = >::eq(&_self, &other) .into(); @@ -10007,7 +18398,7 @@ impl bevy::math::U64Vec4 { _self: Val, rhs: Ref, ) -> Val { - let output: Val = = >::mul(_self.into_inner(), &rhs) .into(); @@ -10017,14 +18408,14 @@ impl bevy::math::U64Vec4 { _self: Val, rhs: Val, ) -> Val { - let output: Val = = >::mul(_self.into_inner(), rhs.into_inner()) .into(); output } fn mul(_self: Val, rhs: u64) -> Val { - let output: Val = = >::mul(_self.into_inner(), rhs) .into(); @@ -10040,7 +18431,7 @@ impl bevy::math::U64Vec4 { _self: Val, rhs: Ref, ) -> Val { - let output: Val = = >::rem(_self.into_inner(), &rhs) .into(); @@ -10050,14 +18441,14 @@ impl bevy::math::U64Vec4 { _self: Val, rhs: Val, ) -> Val { - let output: Val = = >::rem(_self.into_inner(), rhs.into_inner()) .into(); output } fn rem(_self: Val, rhs: u64) -> Val { - let output: Val = = >::rem(_self.into_inner(), rhs) .into(); @@ -10154,7 +18545,7 @@ impl bevy::math::U64Vec4 { _self: Val, rhs: Ref, ) -> Val { - let output: Val = = >::sub(_self.into_inner(), &rhs) .into(); @@ -10164,14 +18555,14 @@ impl bevy::math::U64Vec4 { _self: Val, rhs: Val, ) -> Val { - let output: Val = = >::sub(_self.into_inner(), rhs.into_inner()) .into(); output } fn sub(_self: Val, rhs: u64) -> Val { - let output: Val = = >::sub(_self.into_inner(), rhs) .into(); @@ -10330,7 +18721,7 @@ impl bevy::math::Vec2 { _self: Val, rhs: Ref, ) -> Val { - let output: Val = = >::add(_self.into_inner(), &rhs) .into(); @@ -10340,14 +18731,14 @@ impl bevy::math::Vec2 { _self: Val, rhs: Val, ) -> Val { - let output: Val = = >::add(_self.into_inner(), rhs.into_inner()) .into(); output } fn add(_self: Val, rhs: f32) -> Val { - let output: Val = = >::add(_self.into_inner(), rhs) .into(); @@ -10376,23 +18767,45 @@ impl bevy::math::Vec2 { let output: Val = bevy::math::Vec2::as_dvec2(&_self).into(); output } + /// Casts all elements of `self` to `i16`. + fn as_i16vec2(_self: Ref) -> Val { + let output: Val = bevy::math::Vec2::as_i16vec2(&_self) + .into(); + output + } /// Casts all elements of `self` to `i64`. fn as_i64vec2(_self: Ref) -> Val { let output: Val = bevy::math::Vec2::as_i64vec2(&_self) .into(); output } + /// Casts all elements of `self` to `i8`. + fn as_i8vec2(_self: Ref) -> Val { + let output: Val = bevy::math::Vec2::as_i8vec2(&_self).into(); + output + } /// Casts all elements of `self` to `i32`. fn as_ivec2(_self: Ref) -> Val { let output: Val = bevy::math::Vec2::as_ivec2(&_self).into(); output } + /// Casts all elements of `self` to `u16`. + fn as_u16vec2(_self: Ref) -> Val { + let output: Val = bevy::math::Vec2::as_u16vec2(&_self) + .into(); + output + } /// Casts all elements of `self` to `u64`. fn as_u64vec2(_self: Ref) -> Val { let output: Val = bevy::math::Vec2::as_u64vec2(&_self) .into(); output } + /// Casts all elements of `self` to `u8`. + fn as_u8vec2(_self: Ref) -> Val { + let output: Val = bevy::math::Vec2::as_u8vec2(&_self).into(); + output + } /// Casts all elements of `self` to `u32`. fn as_uvec2(_self: Ref) -> Val { let output: Val = bevy::math::Vec2::as_uvec2(&_self).into(); @@ -10600,7 +19013,7 @@ impl bevy::math::Vec2 { _self: Val, rhs: Ref, ) -> Val { - let output: Val = = >::div(_self.into_inner(), &rhs) .into(); @@ -10610,14 +19023,14 @@ impl bevy::math::Vec2 { _self: Val, rhs: Val, ) -> Val { - let output: Val = = >::div(_self.into_inner(), rhs.into_inner()) .into(); output } fn div(_self: Val, rhs: f32) -> Val { - let output: Val = = >::div(_self.into_inner(), rhs) .into(); @@ -10666,7 +19079,7 @@ impl bevy::math::Vec2 { output } fn eq(_self: Ref, other: Ref) -> bool { - let output: bool = >::eq(&_self, &other) .into(); @@ -10878,7 +19291,7 @@ impl bevy::math::Vec2 { _self: Val, rhs: Ref, ) -> Val { - let output: Val = = >::mul(_self.into_inner(), &rhs) .into(); @@ -10888,14 +19301,14 @@ impl bevy::math::Vec2 { _self: Val, rhs: Val, ) -> Val { - let output: Val = = >::mul(_self.into_inner(), rhs.into_inner()) .into(); output } fn mul(_self: Val, rhs: f32) -> Val { - let output: Val = = >::mul(_self.into_inner(), rhs) .into(); @@ -10921,7 +19334,7 @@ impl bevy::math::Vec2 { output } fn neg(_self: Val) -> Val { - let output: Val = ::neg( + let output: Val = ::neg( _self.into_inner(), ) .into(); @@ -11102,7 +19515,7 @@ impl bevy::math::Vec2 { _self: Val, rhs: Ref, ) -> Val { - let output: Val = = >::rem(_self.into_inner(), &rhs) .into(); @@ -11112,14 +19525,14 @@ impl bevy::math::Vec2 { _self: Val, rhs: Val, ) -> Val { - let output: Val = = >::rem(_self.into_inner(), rhs.into_inner()) .into(); output } fn rem(_self: Val, rhs: f32) -> Val { - let output: Val = = >::rem(_self.into_inner(), rhs) .into(); @@ -11211,7 +19624,7 @@ impl bevy::math::Vec2 { _self: Val, rhs: Ref, ) -> Val { - let output: Val = = >::sub(_self.into_inner(), &rhs) .into(); @@ -11221,14 +19634,14 @@ impl bevy::math::Vec2 { _self: Val, rhs: Val, ) -> Val { - let output: Val = = >::sub(_self.into_inner(), rhs.into_inner()) .into(); output } fn sub(_self: Val, rhs: f32) -> Val { - let output: Val = = >::sub(_self.into_inner(), rhs) .into(); @@ -11308,7 +19721,7 @@ impl bevy::math::Vec3A { _self: Val, rhs: Ref, ) -> Val { - let output: Val = = >::add(_self.into_inner(), &rhs) .into(); @@ -11318,14 +19731,14 @@ impl bevy::math::Vec3A { _self: Val, rhs: Val, ) -> Val { - let output: Val = = >::add(_self.into_inner(), rhs.into_inner()) .into(); output } fn add(_self: Val, rhs: f32) -> Val { - let output: Val = = >::add(_self.into_inner(), rhs) .into(); @@ -11368,23 +19781,47 @@ impl bevy::math::Vec3A { let output: Val = bevy::math::Vec3A::as_dvec3(&_self).into(); output } + /// Casts all elements of `self` to `i16`. + fn as_i16vec3(_self: Ref) -> Val { + let output: Val = bevy::math::Vec3A::as_i16vec3(&_self) + .into(); + output + } /// Casts all elements of `self` to `i64`. fn as_i64vec3(_self: Ref) -> Val { let output: Val = bevy::math::Vec3A::as_i64vec3(&_self) .into(); output } + /// Casts all elements of `self` to `i8`. + fn as_i8vec3(_self: Ref) -> Val { + let output: Val = bevy::math::Vec3A::as_i8vec3(&_self) + .into(); + output + } /// Casts all elements of `self` to `i32`. fn as_ivec3(_self: Ref) -> Val { let output: Val = bevy::math::Vec3A::as_ivec3(&_self).into(); output } + /// Casts all elements of `self` to `u16`. + fn as_u16vec3(_self: Ref) -> Val { + let output: Val = bevy::math::Vec3A::as_u16vec3(&_self) + .into(); + output + } /// Casts all elements of `self` to `u64`. fn as_u64vec3(_self: Ref) -> Val { let output: Val = bevy::math::Vec3A::as_u64vec3(&_self) .into(); output } + /// Casts all elements of `self` to `u8`. + fn as_u8vec3(_self: Ref) -> Val { + let output: Val = bevy::math::Vec3A::as_u8vec3(&_self) + .into(); + output + } /// Casts all elements of `self` to `u32`. fn as_uvec3(_self: Ref) -> Val { let output: Val = bevy::math::Vec3A::as_uvec3(&_self).into(); @@ -11604,7 +20041,7 @@ impl bevy::math::Vec3A { _self: Val, rhs: Ref, ) -> Val { - let output: Val = = >::div(_self.into_inner(), &rhs) .into(); @@ -11614,14 +20051,14 @@ impl bevy::math::Vec3A { _self: Val, rhs: Val, ) -> Val { - let output: Val = = >::div(_self.into_inner(), rhs.into_inner()) .into(); output } fn div(_self: Val, rhs: f32) -> Val { - let output: Val = = >::div(_self.into_inner(), rhs) .into(); @@ -11670,7 +20107,7 @@ impl bevy::math::Vec3A { output } fn eq(_self: Ref, rhs: Ref) -> bool { - let output: bool = >::eq(&_self, &rhs) .into(); @@ -11881,7 +20318,7 @@ impl bevy::math::Vec3A { _self: Val, rhs: Ref, ) -> Val { - let output: Val = = >::mul(_self.into_inner(), &rhs) .into(); @@ -11891,14 +20328,14 @@ impl bevy::math::Vec3A { _self: Val, rhs: Val, ) -> Val { - let output: Val = = >::mul(_self.into_inner(), rhs.into_inner()) .into(); output } fn mul(_self: Val, rhs: f32) -> Val { - let output: Val = = >::mul(_self.into_inner(), rhs) .into(); @@ -11924,7 +20361,7 @@ impl bevy::math::Vec3A { output } fn neg(_self: Val) -> Val { - let output: Val = ::neg( + let output: Val = ::neg( _self.into_inner(), ) .into(); @@ -12092,7 +20529,7 @@ impl bevy::math::Vec3A { _self: Val, rhs: Ref, ) -> Val { - let output: Val = = >::rem(_self.into_inner(), &rhs) .into(); @@ -12102,14 +20539,14 @@ impl bevy::math::Vec3A { _self: Val, rhs: Val, ) -> Val { - let output: Val = = >::rem(_self.into_inner(), rhs.into_inner()) .into(); output } fn rem(_self: Val, rhs: f32) -> Val { - let output: Val = = >::rem(_self.into_inner(), rhs) .into(); @@ -12172,7 +20609,7 @@ impl bevy::math::Vec3A { _self: Val, rhs: Ref, ) -> Val { - let output: Val = = >::sub(_self.into_inner(), &rhs) .into(); @@ -12182,14 +20619,14 @@ impl bevy::math::Vec3A { _self: Val, rhs: Val, ) -> Val { - let output: Val = = >::sub(_self.into_inner(), rhs.into_inner()) .into(); output } fn sub(_self: Val, rhs: f32) -> Val { - let output: Val = = >::sub(_self.into_inner(), rhs) .into(); @@ -12281,7 +20718,7 @@ impl bevy::math::Vec4 { _self: Val, rhs: Ref, ) -> Val { - let output: Val = = >::add(_self.into_inner(), &rhs) .into(); @@ -12291,14 +20728,14 @@ impl bevy::math::Vec4 { _self: Val, rhs: Val, ) -> Val { - let output: Val = = >::add(_self.into_inner(), rhs.into_inner()) .into(); output } fn add(_self: Val, rhs: f32) -> Val { - let output: Val = = >::add(_self.into_inner(), rhs) .into(); @@ -12309,23 +20746,45 @@ impl bevy::math::Vec4 { let output: Val = bevy::math::Vec4::as_dvec4(&_self).into(); output } + /// Casts all elements of `self` to `i16`. + fn as_i16vec4(_self: Ref) -> Val { + let output: Val = bevy::math::Vec4::as_i16vec4(&_self) + .into(); + output + } /// Casts all elements of `self` to `i64`. fn as_i64vec4(_self: Ref) -> Val { let output: Val = bevy::math::Vec4::as_i64vec4(&_self) .into(); output } + /// Casts all elements of `self` to `i8`. + fn as_i8vec4(_self: Ref) -> Val { + let output: Val = bevy::math::Vec4::as_i8vec4(&_self).into(); + output + } /// Casts all elements of `self` to `i32`. fn as_ivec4(_self: Ref) -> Val { let output: Val = bevy::math::Vec4::as_ivec4(&_self).into(); output } + /// Casts all elements of `self` to `u16`. + fn as_u16vec4(_self: Ref) -> Val { + let output: Val = bevy::math::Vec4::as_u16vec4(&_self) + .into(); + output + } /// Casts all elements of `self` to `u64`. fn as_u64vec4(_self: Ref) -> Val { let output: Val = bevy::math::Vec4::as_u64vec4(&_self) .into(); output } + /// Casts all elements of `self` to `u8`. + fn as_u8vec4(_self: Ref) -> Val { + let output: Val = bevy::math::Vec4::as_u8vec4(&_self).into(); + output + } /// Casts all elements of `self` to `u32`. fn as_uvec4(_self: Ref) -> Val { let output: Val = bevy::math::Vec4::as_uvec4(&_self).into(); @@ -12533,7 +20992,7 @@ impl bevy::math::Vec4 { _self: Val, rhs: Ref, ) -> Val { - let output: Val = = >::div(_self.into_inner(), &rhs) .into(); @@ -12543,14 +21002,14 @@ impl bevy::math::Vec4 { _self: Val, rhs: Val, ) -> Val { - let output: Val = = >::div(_self.into_inner(), rhs.into_inner()) .into(); output } fn div(_self: Val, rhs: f32) -> Val { - let output: Val = = >::div(_self.into_inner(), rhs) .into(); @@ -12599,7 +21058,7 @@ impl bevy::math::Vec4 { output } fn eq(_self: Ref, rhs: Ref) -> bool { - let output: bool = >::eq(&_self, &rhs) .into(); @@ -12794,7 +21253,7 @@ impl bevy::math::Vec4 { _self: Val, rhs: Ref, ) -> Val { - let output: Val = = >::mul(_self.into_inner(), &rhs) .into(); @@ -12804,14 +21263,14 @@ impl bevy::math::Vec4 { _self: Val, rhs: Val, ) -> Val { - let output: Val = = >::mul(_self.into_inner(), rhs.into_inner()) .into(); output } fn mul(_self: Val, rhs: f32) -> Val { - let output: Val = = >::mul(_self.into_inner(), rhs) .into(); @@ -12837,7 +21296,7 @@ impl bevy::math::Vec4 { output } fn neg(_self: Val) -> Val { - let output: Val = ::neg( + let output: Val = ::neg( _self.into_inner(), ) .into(); @@ -13002,7 +21461,7 @@ impl bevy::math::Vec4 { _self: Val, rhs: Ref, ) -> Val { - let output: Val = = >::rem(_self.into_inner(), &rhs) .into(); @@ -13012,14 +21471,14 @@ impl bevy::math::Vec4 { _self: Val, rhs: Val, ) -> Val { - let output: Val = = >::rem(_self.into_inner(), rhs.into_inner()) .into(); output } fn rem(_self: Val, rhs: f32) -> Val { - let output: Val = = >::rem(_self.into_inner(), rhs) .into(); @@ -13080,7 +21539,7 @@ impl bevy::math::Vec4 { _self: Val, rhs: Ref, ) -> Val { - let output: Val = = >::sub(_self.into_inner(), &rhs) .into(); @@ -13090,14 +21549,14 @@ impl bevy::math::Vec4 { _self: Val, rhs: Val, ) -> Val { - let output: Val = = >::sub(_self.into_inner(), rhs.into_inner()) .into(); output } fn sub(_self: Val, rhs: f32) -> Val { - let output: Val = = >::sub(_self.into_inner(), rhs) .into(); @@ -13180,7 +21639,7 @@ impl bevy::math::BVec2 { output } fn assert_receiver_is_total_eq(_self: Ref) -> () { - let output: () = ::assert_receiver_is_total_eq( + let output: () = ::assert_receiver_is_total_eq( &_self, ) .into(); @@ -13201,7 +21660,7 @@ impl bevy::math::BVec2 { output } fn eq(_self: Ref, other: Ref) -> bool { - let output: bool = >::eq(&_self, &other) .into(); @@ -13253,7 +21712,7 @@ impl bevy::math::BVec3 { output } fn assert_receiver_is_total_eq(_self: Ref) -> () { - let output: () = ::assert_receiver_is_total_eq( + let output: () = ::assert_receiver_is_total_eq( &_self, ) .into(); @@ -13274,7 +21733,7 @@ impl bevy::math::BVec3 { output } fn eq(_self: Ref, other: Ref) -> bool { - let output: bool = >::eq(&_self, &other) .into(); @@ -13326,7 +21785,7 @@ impl bevy::math::BVec4 { output } fn assert_receiver_is_total_eq(_self: Ref) -> () { - let output: () = ::assert_receiver_is_total_eq( + let output: () = ::assert_receiver_is_total_eq( &_self, ) .into(); @@ -13347,7 +21806,7 @@ impl bevy::math::BVec4 { output } fn eq(_self: Ref, other: Ref) -> bool { - let output: bool = >::eq(&_self, &other) .into(); @@ -13418,7 +21877,7 @@ impl bevy::math::DVec2 { _self: Val, rhs: Ref, ) -> Val { - let output: Val = = >::add(_self.into_inner(), &rhs) .into(); @@ -13428,14 +21887,14 @@ impl bevy::math::DVec2 { _self: Val, rhs: Val, ) -> Val { - let output: Val = = >::add(_self.into_inner(), rhs.into_inner()) .into(); output } fn add(_self: Val, rhs: f64) -> Val { - let output: Val = = >::add(_self.into_inner(), rhs) .into(); @@ -13459,23 +21918,47 @@ impl bevy::math::DVec2 { .into(); output } + /// Casts all elements of `self` to `i16`. + fn as_i16vec2(_self: Ref) -> Val { + let output: Val = bevy::math::DVec2::as_i16vec2(&_self) + .into(); + output + } /// Casts all elements of `self` to `i64`. fn as_i64vec2(_self: Ref) -> Val { let output: Val = bevy::math::DVec2::as_i64vec2(&_self) .into(); output } + /// Casts all elements of `self` to `i8`. + fn as_i8vec2(_self: Ref) -> Val { + let output: Val = bevy::math::DVec2::as_i8vec2(&_self) + .into(); + output + } /// Casts all elements of `self` to `i32`. fn as_ivec2(_self: Ref) -> Val { let output: Val = bevy::math::DVec2::as_ivec2(&_self).into(); output } + /// Casts all elements of `self` to `u16`. + fn as_u16vec2(_self: Ref) -> Val { + let output: Val = bevy::math::DVec2::as_u16vec2(&_self) + .into(); + output + } /// Casts all elements of `self` to `u64`. fn as_u64vec2(_self: Ref) -> Val { let output: Val = bevy::math::DVec2::as_u64vec2(&_self) .into(); output } + /// Casts all elements of `self` to `u8`. + fn as_u8vec2(_self: Ref) -> Val { + let output: Val = bevy::math::DVec2::as_u8vec2(&_self) + .into(); + output + } /// Casts all elements of `self` to `u32`. fn as_uvec2(_self: Ref) -> Val { let output: Val = bevy::math::DVec2::as_uvec2(&_self).into(); @@ -13688,7 +22171,7 @@ impl bevy::math::DVec2 { _self: Val, rhs: Ref, ) -> Val { - let output: Val = = >::div(_self.into_inner(), &rhs) .into(); @@ -13698,14 +22181,14 @@ impl bevy::math::DVec2 { _self: Val, rhs: Val, ) -> Val { - let output: Val = = >::div(_self.into_inner(), rhs.into_inner()) .into(); output } fn div(_self: Val, rhs: f64) -> Val { - let output: Val = = >::div(_self.into_inner(), rhs) .into(); @@ -13754,7 +22237,7 @@ impl bevy::math::DVec2 { output } fn eq(_self: Ref, other: Ref) -> bool { - let output: bool = >::eq(&_self, &other) .into(); @@ -13966,7 +22449,7 @@ impl bevy::math::DVec2 { _self: Val, rhs: Ref, ) -> Val { - let output: Val = = >::mul(_self.into_inner(), &rhs) .into(); @@ -13976,14 +22459,14 @@ impl bevy::math::DVec2 { _self: Val, rhs: Val, ) -> Val { - let output: Val = = >::mul(_self.into_inner(), rhs.into_inner()) .into(); output } fn mul(_self: Val, rhs: f64) -> Val { - let output: Val = = >::mul(_self.into_inner(), rhs) .into(); @@ -14009,7 +22492,7 @@ impl bevy::math::DVec2 { output } fn neg(_self: Val) -> Val { - let output: Val = ::neg( + let output: Val = ::neg( _self.into_inner(), ) .into(); @@ -14193,7 +22676,7 @@ impl bevy::math::DVec2 { _self: Val, rhs: Ref, ) -> Val { - let output: Val = = >::rem(_self.into_inner(), &rhs) .into(); @@ -14203,14 +22686,14 @@ impl bevy::math::DVec2 { _self: Val, rhs: Val, ) -> Val { - let output: Val = = >::rem(_self.into_inner(), rhs.into_inner()) .into(); output } fn rem(_self: Val, rhs: f64) -> Val { - let output: Val = = >::rem(_self.into_inner(), rhs) .into(); @@ -14304,7 +22787,7 @@ impl bevy::math::DVec2 { _self: Val, rhs: Ref, ) -> Val { - let output: Val = = >::sub(_self.into_inner(), &rhs) .into(); @@ -14314,14 +22797,14 @@ impl bevy::math::DVec2 { _self: Val, rhs: Val, ) -> Val { - let output: Val = = >::sub(_self.into_inner(), rhs.into_inner()) .into(); output } fn sub(_self: Val, rhs: f64) -> Val { - let output: Val = = >::sub(_self.into_inner(), rhs) .into(); @@ -14401,7 +22884,7 @@ impl bevy::math::DVec3 { _self: Val, rhs: Ref, ) -> Val { - let output: Val = = >::add(_self.into_inner(), &rhs) .into(); @@ -14411,14 +22894,14 @@ impl bevy::math::DVec3 { _self: Val, rhs: Val, ) -> Val { - let output: Val = = >::add(_self.into_inner(), rhs.into_inner()) .into(); output } fn add(_self: Val, rhs: f64) -> Val { - let output: Val = = >::add(_self.into_inner(), rhs) .into(); @@ -14456,23 +22939,47 @@ impl bevy::math::DVec3 { .into(); output } + /// Casts all elements of `self` to `i16`. + fn as_i16vec3(_self: Ref) -> Val { + let output: Val = bevy::math::DVec3::as_i16vec3(&_self) + .into(); + output + } /// Casts all elements of `self` to `i64`. fn as_i64vec3(_self: Ref) -> Val { let output: Val = bevy::math::DVec3::as_i64vec3(&_self) .into(); output } + /// Casts all elements of `self` to `i8`. + fn as_i8vec3(_self: Ref) -> Val { + let output: Val = bevy::math::DVec3::as_i8vec3(&_self) + .into(); + output + } /// Casts all elements of `self` to `i32`. fn as_ivec3(_self: Ref) -> Val { let output: Val = bevy::math::DVec3::as_ivec3(&_self).into(); output } + /// Casts all elements of `self` to `u16`. + fn as_u16vec3(_self: Ref) -> Val { + let output: Val = bevy::math::DVec3::as_u16vec3(&_self) + .into(); + output + } /// Casts all elements of `self` to `u64`. fn as_u64vec3(_self: Ref) -> Val { let output: Val = bevy::math::DVec3::as_u64vec3(&_self) .into(); output } + /// Casts all elements of `self` to `u8`. + fn as_u8vec3(_self: Ref) -> Val { + let output: Val = bevy::math::DVec3::as_u8vec3(&_self) + .into(); + output + } /// Casts all elements of `self` to `u32`. fn as_uvec3(_self: Ref) -> Val { let output: Val = bevy::math::DVec3::as_uvec3(&_self).into(); @@ -14702,7 +23209,7 @@ impl bevy::math::DVec3 { _self: Val, rhs: Ref, ) -> Val { - let output: Val = = >::div(_self.into_inner(), &rhs) .into(); @@ -14712,14 +23219,14 @@ impl bevy::math::DVec3 { _self: Val, rhs: Val, ) -> Val { - let output: Val = = >::div(_self.into_inner(), rhs.into_inner()) .into(); output } fn div(_self: Val, rhs: f64) -> Val { - let output: Val = = >::div(_self.into_inner(), rhs) .into(); @@ -14768,7 +23275,7 @@ impl bevy::math::DVec3 { output } fn eq(_self: Ref, other: Ref) -> bool { - let output: bool = >::eq(&_self, &other) .into(); @@ -14972,7 +23479,7 @@ impl bevy::math::DVec3 { _self: Val, rhs: Ref, ) -> Val { - let output: Val = = >::mul(_self.into_inner(), &rhs) .into(); @@ -14982,14 +23489,14 @@ impl bevy::math::DVec3 { _self: Val, rhs: Val, ) -> Val { - let output: Val = = >::mul(_self.into_inner(), rhs.into_inner()) .into(); output } fn mul(_self: Val, rhs: f64) -> Val { - let output: Val = = >::mul(_self.into_inner(), rhs) .into(); @@ -15015,7 +23522,7 @@ impl bevy::math::DVec3 { output } fn neg(_self: Val) -> Val { - let output: Val = ::neg( + let output: Val = ::neg( _self.into_inner(), ) .into(); @@ -15183,7 +23690,7 @@ impl bevy::math::DVec3 { _self: Val, rhs: Ref, ) -> Val { - let output: Val = = >::rem(_self.into_inner(), &rhs) .into(); @@ -15193,14 +23700,14 @@ impl bevy::math::DVec3 { _self: Val, rhs: Val, ) -> Val { - let output: Val = = >::rem(_self.into_inner(), rhs.into_inner()) .into(); output } fn rem(_self: Val, rhs: f64) -> Val { - let output: Val = = >::rem(_self.into_inner(), rhs) .into(); @@ -15263,7 +23770,7 @@ impl bevy::math::DVec3 { _self: Val, rhs: Ref, ) -> Val { - let output: Val = = >::sub(_self.into_inner(), &rhs) .into(); @@ -15273,14 +23780,14 @@ impl bevy::math::DVec3 { _self: Val, rhs: Val, ) -> Val { - let output: Val = = >::sub(_self.into_inner(), rhs.into_inner()) .into(); output } fn sub(_self: Val, rhs: f64) -> Val { - let output: Val = = >::sub(_self.into_inner(), rhs) .into(); @@ -15372,7 +23879,7 @@ impl bevy::math::DVec4 { _self: Val, rhs: Ref, ) -> Val { - let output: Val = = >::add(_self.into_inner(), &rhs) .into(); @@ -15382,36 +23889,60 @@ impl bevy::math::DVec4 { _self: Val, rhs: Val, ) -> Val { - let output: Val = = >::add(_self.into_inner(), rhs.into_inner()) .into(); output } fn add(_self: Val, rhs: f64) -> Val { - let output: Val = = >::add(_self.into_inner(), rhs) .into(); output } + /// Casts all elements of `self` to `i16`. + fn as_i16vec4(_self: Ref) -> Val { + let output: Val = bevy::math::DVec4::as_i16vec4(&_self) + .into(); + output + } /// Casts all elements of `self` to `i64`. fn as_i64vec4(_self: Ref) -> Val { let output: Val = bevy::math::DVec4::as_i64vec4(&_self) .into(); output } + /// Casts all elements of `self` to `i8`. + fn as_i8vec4(_self: Ref) -> Val { + let output: Val = bevy::math::DVec4::as_i8vec4(&_self) + .into(); + output + } /// Casts all elements of `self` to `i32`. fn as_ivec4(_self: Ref) -> Val { let output: Val = bevy::math::DVec4::as_ivec4(&_self).into(); output } + /// Casts all elements of `self` to `u16`. + fn as_u16vec4(_self: Ref) -> Val { + let output: Val = bevy::math::DVec4::as_u16vec4(&_self) + .into(); + output + } /// Casts all elements of `self` to `u64`. fn as_u64vec4(_self: Ref) -> Val { let output: Val = bevy::math::DVec4::as_u64vec4(&_self) .into(); output } + /// Casts all elements of `self` to `u8`. + fn as_u8vec4(_self: Ref) -> Val { + let output: Val = bevy::math::DVec4::as_u8vec4(&_self) + .into(); + output + } /// Casts all elements of `self` to `u32`. fn as_uvec4(_self: Ref) -> Val { let output: Val = bevy::math::DVec4::as_uvec4(&_self).into(); @@ -15624,7 +24155,7 @@ impl bevy::math::DVec4 { _self: Val, rhs: Ref, ) -> Val { - let output: Val = = >::div(_self.into_inner(), &rhs) .into(); @@ -15634,14 +24165,14 @@ impl bevy::math::DVec4 { _self: Val, rhs: Val, ) -> Val { - let output: Val = = >::div(_self.into_inner(), rhs.into_inner()) .into(); output } fn div(_self: Val, rhs: f64) -> Val { - let output: Val = = >::div(_self.into_inner(), rhs) .into(); @@ -15690,7 +24221,7 @@ impl bevy::math::DVec4 { output } fn eq(_self: Ref, other: Ref) -> bool { - let output: bool = >::eq(&_self, &other) .into(); @@ -15885,7 +24416,7 @@ impl bevy::math::DVec4 { _self: Val, rhs: Ref, ) -> Val { - let output: Val = = >::mul(_self.into_inner(), &rhs) .into(); @@ -15895,14 +24426,14 @@ impl bevy::math::DVec4 { _self: Val, rhs: Val, ) -> Val { - let output: Val = = >::mul(_self.into_inner(), rhs.into_inner()) .into(); output } fn mul(_self: Val, rhs: f64) -> Val { - let output: Val = = >::mul(_self.into_inner(), rhs) .into(); @@ -15928,7 +24459,7 @@ impl bevy::math::DVec4 { output } fn neg(_self: Val) -> Val { - let output: Val = ::neg( + let output: Val = ::neg( _self.into_inner(), ) .into(); @@ -16096,7 +24627,7 @@ impl bevy::math::DVec4 { _self: Val, rhs: Ref, ) -> Val { - let output: Val = = >::rem(_self.into_inner(), &rhs) .into(); @@ -16106,14 +24637,14 @@ impl bevy::math::DVec4 { _self: Val, rhs: Val, ) -> Val { - let output: Val = = >::rem(_self.into_inner(), rhs.into_inner()) .into(); output } fn rem(_self: Val, rhs: f64) -> Val { - let output: Val = = >::rem(_self.into_inner(), rhs) .into(); @@ -16176,7 +24707,7 @@ impl bevy::math::DVec4 { _self: Val, rhs: Ref, ) -> Val { - let output: Val = = >::sub(_self.into_inner(), &rhs) .into(); @@ -16186,14 +24717,14 @@ impl bevy::math::DVec4 { _self: Val, rhs: Val, ) -> Val { - let output: Val = = >::sub(_self.into_inner(), rhs.into_inner()) .into(); output } fn sub(_self: Val, rhs: f64) -> Val { - let output: Val = = >::sub(_self.into_inner(), rhs) .into(); @@ -16293,7 +24824,7 @@ impl bevy::math::Mat2 { _self: Val, rhs: Val, ) -> Val { - let output: Val = = >::add(_self.into_inner(), rhs.into_inner()) .into(); @@ -16332,7 +24863,7 @@ impl bevy::math::Mat2 { output } fn div(_self: Val, rhs: f32) -> Val { - let output: Val = = >::div(_self.into_inner(), rhs) .into(); @@ -16345,7 +24876,7 @@ impl bevy::math::Mat2 { output } fn eq(_self: Ref, rhs: Ref) -> bool { - let output: bool = >::eq(&_self, &rhs) .into(); @@ -16458,7 +24989,7 @@ impl bevy::math::Mat2 { _self: Val, rhs: Val, ) -> Val { - let output: Val = = >::mul(_self.into_inner(), rhs.into_inner()) .into(); @@ -16468,14 +24999,14 @@ impl bevy::math::Mat2 { _self: Val, rhs: Val, ) -> Val { - let output: Val = = >::mul(_self.into_inner(), rhs.into_inner()) .into(); output } fn mul(_self: Val, rhs: f32) -> Val { - let output: Val = = >::mul(_self.into_inner(), rhs) .into(); @@ -16509,7 +25040,7 @@ impl bevy::math::Mat2 { output } fn neg(_self: Val) -> Val { - let output: Val = ::neg( + let output: Val = ::neg( _self.into_inner(), ) .into(); @@ -16526,7 +25057,7 @@ impl bevy::math::Mat2 { _self: Val, rhs: Val, ) -> Val { - let output: Val = = >::sub(_self.into_inner(), rhs.into_inner()) .into(); @@ -16595,7 +25126,7 @@ impl bevy::math::Mat3 { _self: Val, rhs: Val, ) -> Val { - let output: Val = = >::add(_self.into_inner(), rhs.into_inner()) .into(); @@ -16634,7 +25165,7 @@ impl bevy::math::Mat3 { output } fn div(_self: Val, rhs: f32) -> Val { - let output: Val = = >::div(_self.into_inner(), rhs) .into(); @@ -16647,7 +25178,7 @@ impl bevy::math::Mat3 { output } fn eq(_self: Ref, rhs: Ref) -> bool { - let output: bool = >::eq(&_self, &rhs) .into(); @@ -16836,7 +25367,7 @@ impl bevy::math::Mat3 { _self: Val, rhs: Val, ) -> Val { - let output: Val = = >::mul(_self.into_inner(), rhs.into_inner()) .into(); @@ -16846,7 +25377,7 @@ impl bevy::math::Mat3 { _self: Val, rhs: Val, ) -> Val { - let output: Val = = >::mul(_self.into_inner(), rhs.into_inner()) .into(); @@ -16856,7 +25387,7 @@ impl bevy::math::Mat3 { _self: Val, rhs: Val, ) -> Val { - let output: Val = = >::mul(_self.into_inner(), rhs.into_inner()) .into(); @@ -16866,14 +25397,14 @@ impl bevy::math::Mat3 { _self: Val, rhs: Val, ) -> Val { - let output: Val = = >::mul(_self.into_inner(), rhs.into_inner()) .into(); output } fn mul(_self: Val, rhs: f32) -> Val { - let output: Val = = >::mul(_self.into_inner(), rhs) .into(); @@ -16919,7 +25450,7 @@ impl bevy::math::Mat3 { output } fn neg(_self: Val) -> Val { - let output: Val = ::neg( + let output: Val = ::neg( _self.into_inner(), ) .into(); @@ -16936,7 +25467,7 @@ impl bevy::math::Mat3 { _self: Val, rhs: Val, ) -> Val { - let output: Val = = >::sub(_self.into_inner(), rhs.into_inner()) .into(); @@ -17053,7 +25584,7 @@ impl bevy::math::Mat3A { _self: Val, rhs: Val, ) -> Val { - let output: Val = = >::add(_self.into_inner(), rhs.into_inner()) .into(); @@ -17093,7 +25624,7 @@ impl bevy::math::Mat3A { output } fn div(_self: Val, rhs: f32) -> Val { - let output: Val = = >::div(_self.into_inner(), rhs) .into(); @@ -17106,7 +25637,7 @@ impl bevy::math::Mat3A { output } fn eq(_self: Ref, rhs: Ref) -> bool { - let output: bool = >::eq(&_self, &rhs) .into(); @@ -17295,7 +25826,7 @@ impl bevy::math::Mat3A { _self: Val, rhs: Val, ) -> Val { - let output: Val = = >::mul(_self.into_inner(), rhs.into_inner()) .into(); @@ -17305,7 +25836,7 @@ impl bevy::math::Mat3A { _self: Val, rhs: Val, ) -> Val { - let output: Val = = >::mul(_self.into_inner(), rhs.into_inner()) .into(); @@ -17315,7 +25846,7 @@ impl bevy::math::Mat3A { _self: Val, rhs: Val, ) -> Val { - let output: Val = = >::mul(_self.into_inner(), rhs.into_inner()) .into(); @@ -17325,14 +25856,14 @@ impl bevy::math::Mat3A { _self: Val, rhs: Val, ) -> Val { - let output: Val = = >::mul(_self.into_inner(), rhs.into_inner()) .into(); output } fn mul(_self: Val, rhs: f32) -> Val { - let output: Val = = >::mul(_self.into_inner(), rhs) .into(); @@ -17378,7 +25909,7 @@ impl bevy::math::Mat3A { output } fn neg(_self: Val) -> Val { - let output: Val = ::neg( + let output: Val = ::neg( _self.into_inner(), ) .into(); @@ -17396,7 +25927,7 @@ impl bevy::math::Mat3A { _self: Val, rhs: Val, ) -> Val { - let output: Val = = >::sub(_self.into_inner(), rhs.into_inner()) .into(); @@ -17513,7 +26044,7 @@ impl bevy::math::Mat4 { _self: Val, rhs: Val, ) -> Val { - let output: Val = = >::add(_self.into_inner(), rhs.into_inner()) .into(); @@ -17552,7 +26083,7 @@ impl bevy::math::Mat4 { output } fn div(_self: Val, rhs: f32) -> Val { - let output: Val = = >::div(_self.into_inner(), rhs) .into(); @@ -17565,7 +26096,7 @@ impl bevy::math::Mat4 { output } fn eq(_self: Ref, rhs: Ref) -> bool { - let output: bool = >::eq(&_self, &rhs) .into(); @@ -17836,7 +26367,7 @@ impl bevy::math::Mat4 { _self: Val, rhs: Val, ) -> Val { - let output: Val = = >::mul(_self.into_inner(), rhs.into_inner()) .into(); @@ -17846,7 +26377,7 @@ impl bevy::math::Mat4 { _self: Val, rhs: Val, ) -> Val { - let output: Val = = >::mul(_self.into_inner(), rhs.into_inner()) .into(); @@ -17856,14 +26387,14 @@ impl bevy::math::Mat4 { _self: Val, rhs: Val, ) -> Val { - let output: Val = = >::mul(_self.into_inner(), rhs.into_inner()) .into(); output } fn mul(_self: Val, rhs: f32) -> Val { - let output: Val = = >::mul(_self.into_inner(), rhs) .into(); @@ -17897,7 +26428,7 @@ impl bevy::math::Mat4 { output } fn neg(_self: Val) -> Val { - let output: Val = ::neg( + let output: Val = ::neg( _self.into_inner(), ) .into(); @@ -18141,7 +26672,7 @@ impl bevy::math::Mat4 { _self: Val, rhs: Val, ) -> Val { - let output: Val = = >::sub(_self.into_inner(), rhs.into_inner()) .into(); @@ -18289,7 +26820,7 @@ impl bevy::math::DMat2 { _self: Val, rhs: Val, ) -> Val { - let output: Val = = >::add(_self.into_inner(), rhs.into_inner()) .into(); @@ -18329,7 +26860,7 @@ impl bevy::math::DMat2 { output } fn div(_self: Val, rhs: f64) -> Val { - let output: Val = = >::div(_self.into_inner(), rhs) .into(); @@ -18342,7 +26873,7 @@ impl bevy::math::DMat2 { output } fn eq(_self: Ref, rhs: Ref) -> bool { - let output: bool = >::eq(&_self, &rhs) .into(); @@ -18432,7 +26963,7 @@ impl bevy::math::DMat2 { _self: Val, rhs: Val, ) -> Val { - let output: Val = = >::mul(_self.into_inner(), rhs.into_inner()) .into(); @@ -18442,14 +26973,14 @@ impl bevy::math::DMat2 { _self: Val, rhs: Val, ) -> Val { - let output: Val = = >::mul(_self.into_inner(), rhs.into_inner()) .into(); output } fn mul(_self: Val, rhs: f64) -> Val { - let output: Val = = >::mul(_self.into_inner(), rhs) .into(); @@ -18483,7 +27014,7 @@ impl bevy::math::DMat2 { output } fn neg(_self: Val) -> Val { - let output: Val = ::neg( + let output: Val = ::neg( _self.into_inner(), ) .into(); @@ -18501,7 +27032,7 @@ impl bevy::math::DMat2 { _self: Val, rhs: Val, ) -> Val { - let output: Val = = >::sub(_self.into_inner(), rhs.into_inner()) .into(); @@ -18570,7 +27101,7 @@ impl bevy::math::DMat3 { _self: Val, rhs: Val, ) -> Val { - let output: Val = = >::add(_self.into_inner(), rhs.into_inner()) .into(); @@ -18610,7 +27141,7 @@ impl bevy::math::DMat3 { output } fn div(_self: Val, rhs: f64) -> Val { - let output: Val = = >::div(_self.into_inner(), rhs) .into(); @@ -18623,7 +27154,7 @@ impl bevy::math::DMat3 { output } fn eq(_self: Ref, rhs: Ref) -> bool { - let output: bool = >::eq(&_self, &rhs) .into(); @@ -18812,7 +27343,7 @@ impl bevy::math::DMat3 { _self: Val, rhs: Val, ) -> Val { - let output: Val = = >::mul(_self.into_inner(), rhs.into_inner()) .into(); @@ -18822,7 +27353,7 @@ impl bevy::math::DMat3 { _self: Val, rhs: Val, ) -> Val { - let output: Val = = >::mul(_self.into_inner(), rhs.into_inner()) .into(); @@ -18832,14 +27363,14 @@ impl bevy::math::DMat3 { _self: Val, rhs: Val, ) -> Val { - let output: Val = = >::mul(_self.into_inner(), rhs.into_inner()) .into(); output } fn mul(_self: Val, rhs: f64) -> Val { - let output: Val = = >::mul(_self.into_inner(), rhs) .into(); @@ -18873,7 +27404,7 @@ impl bevy::math::DMat3 { output } fn neg(_self: Val) -> Val { - let output: Val = ::neg( + let output: Val = ::neg( _self.into_inner(), ) .into(); @@ -18891,7 +27422,7 @@ impl bevy::math::DMat3 { _self: Val, rhs: Val, ) -> Val { - let output: Val = = >::sub(_self.into_inner(), rhs.into_inner()) .into(); @@ -19008,7 +27539,7 @@ impl bevy::math::DMat4 { _self: Val, rhs: Val, ) -> Val { - let output: Val = = >::add(_self.into_inner(), rhs.into_inner()) .into(); @@ -19048,7 +27579,7 @@ impl bevy::math::DMat4 { output } fn div(_self: Val, rhs: f64) -> Val { - let output: Val = = >::div(_self.into_inner(), rhs) .into(); @@ -19061,7 +27592,7 @@ impl bevy::math::DMat4 { output } fn eq(_self: Ref, rhs: Ref) -> bool { - let output: bool = >::eq(&_self, &rhs) .into(); @@ -19323,7 +27854,7 @@ impl bevy::math::DMat4 { _self: Val, rhs: Val, ) -> Val { - let output: Val = = >::mul(_self.into_inner(), rhs.into_inner()) .into(); @@ -19333,7 +27864,7 @@ impl bevy::math::DMat4 { _self: Val, rhs: Val, ) -> Val { - let output: Val = = >::mul(_self.into_inner(), rhs.into_inner()) .into(); @@ -19343,14 +27874,14 @@ impl bevy::math::DMat4 { _self: Val, rhs: Val, ) -> Val { - let output: Val = = >::mul(_self.into_inner(), rhs.into_inner()) .into(); output } fn mul(_self: Val, rhs: f64) -> Val { - let output: Val = = >::mul(_self.into_inner(), rhs) .into(); @@ -19384,7 +27915,7 @@ impl bevy::math::DMat4 { output } fn neg(_self: Val) -> Val { - let output: Val = ::neg( + let output: Val = ::neg( _self.into_inner(), ) .into(); @@ -19614,7 +28145,7 @@ impl bevy::math::DMat4 { _self: Val, rhs: Val, ) -> Val { - let output: Val = = >::sub(_self.into_inner(), rhs.into_inner()) .into(); @@ -19735,7 +28266,7 @@ impl bevy::math::Affine2 { output } fn eq(_self: Ref, rhs: Ref) -> bool { - let output: bool = >::eq(&_self, &rhs) .into(); @@ -19871,7 +28402,7 @@ impl bevy::math::Affine2 { _self: Val, rhs: Val, ) -> Val { - let output: Val = = >::mul(_self.into_inner(), rhs.into_inner()) .into(); @@ -19881,7 +28412,7 @@ impl bevy::math::Affine2 { _self: Val, rhs: Val, ) -> Val { - let output: Val = = >::mul(_self.into_inner(), rhs.into_inner()) .into(); @@ -19891,7 +28422,7 @@ impl bevy::math::Affine2 { _self: Val, rhs: Val, ) -> Val { - let output: Val = = >::mul(_self.into_inner(), rhs.into_inner()) .into(); @@ -19971,7 +28502,7 @@ impl bevy::math::Affine3A { output } fn eq(_self: Ref, rhs: Ref) -> bool { - let output: bool = >::eq(&_self, &rhs) .into(); @@ -20213,7 +28744,7 @@ impl bevy::math::Affine3A { _self: Val, rhs: Val, ) -> Val { - let output: Val = = >::mul(_self.into_inner(), rhs.into_inner()) .into(); @@ -20223,7 +28754,7 @@ impl bevy::math::Affine3A { _self: Val, rhs: Val, ) -> Val { - let output: Val = = >::mul(_self.into_inner(), rhs.into_inner()) .into(); @@ -20330,7 +28861,7 @@ impl bevy::math::DAffine2 { output } fn eq(_self: Ref, rhs: Ref) -> bool { - let output: bool = >::eq(&_self, &rhs) .into(); @@ -20460,7 +28991,7 @@ impl bevy::math::DAffine2 { _self: Val, rhs: Val, ) -> Val { - let output: Val = = >::mul(_self.into_inner(), rhs.into_inner()) .into(); @@ -20470,7 +29001,7 @@ impl bevy::math::DAffine2 { _self: Val, rhs: Val, ) -> Val { - let output: Val = = >::mul(_self.into_inner(), rhs.into_inner()) .into(); @@ -20551,7 +29082,7 @@ impl bevy::math::DAffine3 { output } fn eq(_self: Ref, rhs: Ref) -> bool { - let output: bool = >::eq(&_self, &rhs) .into(); @@ -20793,7 +29324,7 @@ impl bevy::math::DAffine3 { _self: Val, rhs: Val, ) -> Val { - let output: Val = = >::mul(_self.into_inner(), rhs.into_inner()) .into(); @@ -20803,7 +29334,7 @@ impl bevy::math::DAffine3 { _self: Val, rhs: Val, ) -> Val { - let output: Val = = >::mul(_self.into_inner(), rhs.into_inner()) .into(); @@ -20884,7 +29415,7 @@ impl bevy::math::DQuat { _self: Val, rhs: Val, ) -> Val { - let output: Val = = >::add(_self.into_inner(), rhs.into_inner()) .into(); @@ -20929,7 +29460,7 @@ impl bevy::math::DQuat { /// Divides a quaternion by a scalar value. /// The quotient is not guaranteed to be normalized. fn div(_self: Val, rhs: f64) -> Val { - let output: Val = = >::div(_self.into_inner(), rhs) .into(); @@ -20943,7 +29474,7 @@ impl bevy::math::DQuat { output } fn eq(_self: Ref, rhs: Ref) -> bool { - let output: bool = >::eq(&_self, &rhs) .into(); @@ -21204,7 +29735,7 @@ impl bevy::math::DQuat { _self: Val, rhs: Val, ) -> Val { - let output: Val = = >::mul(_self.into_inner(), rhs.into_inner()) .into(); @@ -21217,7 +29748,7 @@ impl bevy::math::DQuat { _self: Val, rhs: Val, ) -> Val { - let output: Val = = >::mul(_self.into_inner(), rhs.into_inner()) .into(); @@ -21226,7 +29757,7 @@ impl bevy::math::DQuat { /// Multiplies a quaternion by a scalar value. /// The product is not guaranteed to be normalized. fn mul(_self: Val, rhs: f64) -> Val { - let output: Val = = >::mul(_self.into_inner(), rhs) .into(); @@ -21263,7 +29794,7 @@ impl bevy::math::DQuat { output } fn neg(_self: Val) -> Val { - let output: Val = ::neg( + let output: Val = ::neg( _self.into_inner(), ) .into(); @@ -21325,7 +29856,7 @@ impl bevy::math::DQuat { _self: Val, rhs: Val, ) -> Val { - let output: Val = = >::sub(_self.into_inner(), rhs.into_inner()) .into(); @@ -21371,7 +29902,7 @@ impl bevy::math::DQuat { )] impl bevy::math::EulerRot { fn assert_receiver_is_total_eq(_self: Ref) -> () { - let output: () = ::assert_receiver_is_total_eq( + let output: () = ::assert_receiver_is_total_eq( &_self, ) .into(); @@ -21385,7 +29916,7 @@ impl bevy::math::EulerRot { output } fn eq(_self: Ref, other: Ref) -> bool { - let output: bool = >::eq(&_self, &other) .into(); @@ -21424,7 +29955,7 @@ impl bevy::math::BVec3A { output } fn eq(_self: Ref, rhs: Ref) -> bool { - let output: bool = >::eq(&_self, &rhs) .into(); @@ -21490,7 +30021,7 @@ impl bevy::math::BVec4A { output } fn eq(_self: Ref, rhs: Ref) -> bool { - let output: bool = >::eq(&_self, &rhs) .into(); @@ -21530,35 +30061,36 @@ impl bevy::math::BVec4A { bms_core_path = "bevy_mod_scripting_core", generated )] -impl smol_str::SmolStr { - fn clone(_self: Ref) -> Val { - let output: Val = ::clone( +impl ::smol_str::SmolStr { + fn clone(_self: Ref<::smol_str::SmolStr>) -> Val<::smol_str::SmolStr> { + let output: Val<::smol_str::SmolStr> = <::smol_str::SmolStr as bevy::reflect::erased_serde::__private::serde::__private::Clone>::clone( &_self, ) .into(); output } - fn eq(_self: Ref, other: Ref) -> bool { - let output: bool = , other: Ref<::smol_str::SmolStr>) -> bool { + let output: bool = <::smol_str::SmolStr as ::core::cmp::PartialEq< + ::smol_str::SmolStr, >>::eq(&_self, &other) .into(); output } - fn is_empty(_self: Ref) -> bool { - let output: bool = smol_str::SmolStr::is_empty(&_self).into(); + fn is_empty(_self: Ref<::smol_str::SmolStr>) -> bool { + let output: bool = ::smol_str::SmolStr::is_empty(&_self).into(); output } - fn is_heap_allocated(_self: Ref) -> bool { - let output: bool = smol_str::SmolStr::is_heap_allocated(&_self).into(); + fn is_heap_allocated(_self: Ref<::smol_str::SmolStr>) -> bool { + let output: bool = ::smol_str::SmolStr::is_heap_allocated(&_self).into(); output } - fn len(_self: Ref) -> usize { - let output: usize = smol_str::SmolStr::len(&_self).into(); + fn len(_self: Ref<::smol_str::SmolStr>) -> usize { + let output: usize = ::smol_str::SmolStr::len(&_self).into(); output } - fn to_string(_self: Ref) -> std::string::String { - let output: std::string::String = smol_str::SmolStr::to_string(&_self).into(); + fn to_string(_self: Ref<::smol_str::SmolStr>) -> ::std::string::String { + let output: ::std::string::String = ::smol_str::SmolStr::to_string(&_self) + .into(); output } } @@ -21568,7 +30100,7 @@ impl smol_str::SmolStr { bms_core_path = "bevy_mod_scripting_core", generated )] -impl uuid::Uuid { +impl ::uuid::Uuid { /// Returns a 128bit value containing the value. /// The bytes in the UUID will be packed directly into a `u128`. /// # Examples @@ -21583,8 +30115,8 @@ impl uuid::Uuid { /// # Ok(()) /// # } /// ``` - fn as_u128(_self: Ref) -> u128 { - let output: u128 = uuid::Uuid::as_u128(&_self).into(); + fn as_u128(_self: Ref<::uuid::Uuid>) -> u128 { + let output: u128 = ::uuid::Uuid::as_u128(&_self).into(); output } /// Returns two 64bit values containing the value. @@ -21603,19 +30135,19 @@ impl uuid::Uuid { /// # Ok(()) /// # } /// ``` - fn as_u64_pair(_self: Ref) -> (u64, u64) { - let output: (u64, u64) = uuid::Uuid::as_u64_pair(&_self).into(); + fn as_u64_pair(_self: Ref<::uuid::Uuid>) -> (u64, u64) { + let output: (u64, u64) = ::uuid::Uuid::as_u64_pair(&_self).into(); output } - fn assert_receiver_is_total_eq(_self: Ref) -> () { - let output: () = ::assert_receiver_is_total_eq( + fn assert_receiver_is_total_eq(_self: Ref<::uuid::Uuid>) -> () { + let output: () = <::uuid::Uuid as ::core::cmp::Eq>::assert_receiver_is_total_eq( &_self, ) .into(); output } - fn clone(_self: Ref) -> Val { - let output: Val = ::clone( + fn clone(_self: Ref<::uuid::Uuid>) -> Val<::uuid::Uuid> { + let output: Val<::uuid::Uuid> = <::uuid::Uuid as bevy::reflect::erased_serde::__private::serde::__private::Clone>::clone( &_self, ) .into(); @@ -21642,12 +30174,12 @@ impl uuid::Uuid { /// ); /// ``` fn encode_buffer() -> [u8; 45] { - let output: [u8; 45] = uuid::Uuid::encode_buffer().into(); + let output: [u8; 45] = ::uuid::Uuid::encode_buffer().into(); output } - fn eq(_self: Ref, other: Ref) -> bool { - let output: bool = , other: Ref<::uuid::Uuid>) -> bool { + let output: bool = <::uuid::Uuid as ::core::cmp::PartialEq< + ::uuid::Uuid, >>::eq(&_self, &other) .into(); output @@ -21672,8 +30204,8 @@ impl uuid::Uuid { /// # Ok(()) /// # } /// ``` - fn from_bytes(bytes: [u8; 16]) -> Val { - let output: Val = uuid::Uuid::from_bytes(bytes).into(); + fn from_bytes(bytes: [u8; 16]) -> Val<::uuid::Uuid> { + let output: Val<::uuid::Uuid> = ::uuid::Uuid::from_bytes(bytes).into(); output } /// Creates a UUID using the supplied bytes in little endian order. @@ -21697,8 +30229,8 @@ impl uuid::Uuid { /// # Ok(()) /// # } /// ``` - fn from_bytes_le(b: [u8; 16]) -> Val { - let output: Val = uuid::Uuid::from_bytes_le(b).into(); + fn from_bytes_le(b: [u8; 16]) -> Val<::uuid::Uuid> { + let output: Val<::uuid::Uuid> = ::uuid::Uuid::from_bytes_le(b).into(); output } /// Creates a UUID from a 128bit value. @@ -21713,8 +30245,8 @@ impl uuid::Uuid { /// uuid.hyphenated().to_string(), /// ); /// ``` - fn from_u128(v: u128) -> Val { - let output: Val = uuid::Uuid::from_u128(v).into(); + fn from_u128(v: u128) -> Val<::uuid::Uuid> { + let output: Val<::uuid::Uuid> = ::uuid::Uuid::from_u128(v).into(); output } /// Creates a UUID from a 128bit value in little-endian order. @@ -21733,8 +30265,8 @@ impl uuid::Uuid { /// uuid.hyphenated().to_string(), /// ); /// ``` - fn from_u128_le(v: u128) -> Val { - let output: Val = uuid::Uuid::from_u128_le(v).into(); + fn from_u128_le(v: u128) -> Val<::uuid::Uuid> { + let output: Val<::uuid::Uuid> = ::uuid::Uuid::from_u128_le(v).into(); output } /// Creates a UUID from two 64bit values. @@ -21750,19 +30282,19 @@ impl uuid::Uuid { /// uuid.hyphenated().to_string(), /// ); /// ``` - fn from_u64_pair(high_bits: u64, low_bits: u64) -> Val { - let output: Val = uuid::Uuid::from_u64_pair(high_bits, low_bits) + fn from_u64_pair(high_bits: u64, low_bits: u64) -> Val<::uuid::Uuid> { + let output: Val<::uuid::Uuid> = ::uuid::Uuid::from_u64_pair(high_bits, low_bits) .into(); output } /// If the UUID is the correct version (v1, or v6) this will return the /// node value as a 6-byte array. For other versions this will return `None`. fn get_node_id( - _self: Ref, + _self: Ref<::uuid::Uuid>, ) -> bevy::reflect::erased_serde::__private::serde::__private::Option<[u8; 6]> { let output: bevy::reflect::erased_serde::__private::serde::__private::Option< [u8; 6], - > = uuid::Uuid::get_node_id(&_self).into(); + > = ::uuid::Uuid::get_node_id(&_self).into(); output } /// Returns the version number of the UUID. @@ -21780,8 +30312,8 @@ impl uuid::Uuid { /// ``` /// # References /// * [Version Field in RFC 9562](https://www.ietf.org/rfc/rfc9562.html#section-4.2) - fn get_version_num(_self: Ref) -> usize { - let output: usize = uuid::Uuid::get_version_num(&_self).into(); + fn get_version_num(_self: Ref<::uuid::Uuid>) -> usize { + let output: usize = ::uuid::Uuid::get_version_num(&_self).into(); output } /// Consumes self and returns the underlying byte value of the UUID. @@ -21797,18 +30329,18 @@ impl uuid::Uuid { /// let uuid = Uuid::from_bytes(bytes); /// assert_eq!(bytes, uuid.into_bytes()); /// ``` - fn into_bytes(_self: Val) -> [u8; 16] { - let output: [u8; 16] = uuid::Uuid::into_bytes(_self.into_inner()).into(); + fn into_bytes(_self: Val<::uuid::Uuid>) -> [u8; 16] { + let output: [u8; 16] = ::uuid::Uuid::into_bytes(_self.into_inner()).into(); output } /// Tests if the UUID is max (all ones). - fn is_max(_self: Ref) -> bool { - let output: bool = uuid::Uuid::is_max(&_self).into(); + fn is_max(_self: Ref<::uuid::Uuid>) -> bool { + let output: bool = ::uuid::Uuid::is_max(&_self).into(); output } /// Tests if the UUID is nil (all zeros). - fn is_nil(_self: Ref) -> bool { - let output: bool = uuid::Uuid::is_nil(&_self).into(); + fn is_nil(_self: Ref<::uuid::Uuid>) -> bool { + let output: bool = ::uuid::Uuid::is_nil(&_self).into(); output } /// The 'max UUID' (all ones). @@ -21826,8 +30358,8 @@ impl uuid::Uuid { /// uuid.hyphenated().to_string(), /// ); /// ``` - fn max() -> Val { - let output: Val = uuid::Uuid::max().into(); + fn max() -> Val<::uuid::Uuid> { + let output: Val<::uuid::Uuid> = ::uuid::Uuid::max().into(); output } /// Creates a random UUID. @@ -21850,8 +30382,8 @@ impl uuid::Uuid { /// * [UUID Version 4 in RFC 9562](https://www.ietf.org/rfc/rfc9562.html#section-5.4) /// [`getrandom`]: https://crates.io/crates/getrandom /// [from_random_bytes]: struct.Builder.html#method.from_random_bytes - fn new_v4() -> Val { - let output: Val = uuid::Uuid::new_v4().into(); + fn new_v4() -> Val<::uuid::Uuid> { + let output: Val<::uuid::Uuid> = ::uuid::Uuid::new_v4().into(); output } /// The 'nil UUID' (all zeros). @@ -21869,8 +30401,8 @@ impl uuid::Uuid { /// uuid.hyphenated().to_string(), /// ); /// ``` - fn nil() -> Val { - let output: Val = uuid::Uuid::nil().into(); + fn nil() -> Val<::uuid::Uuid> { + let output: Val<::uuid::Uuid> = ::uuid::Uuid::nil().into(); output } /// Returns the bytes of the UUID in little-endian order. @@ -21892,8 +30424,8 @@ impl uuid::Uuid { /// # Ok(()) /// # } /// ``` - fn to_bytes_le(_self: Ref) -> [u8; 16] { - let output: [u8; 16] = uuid::Uuid::to_bytes_le(&_self).into(); + fn to_bytes_le(_self: Ref<::uuid::Uuid>) -> [u8; 16] { + let output: [u8; 16] = ::uuid::Uuid::to_bytes_le(&_self).into(); output } /// Returns a 128bit little-endian value containing the value. @@ -21916,8 +30448,8 @@ impl uuid::Uuid { /// # Ok(()) /// # } /// ``` - fn to_u128_le(_self: Ref) -> u128 { - let output: u128 = uuid::Uuid::to_u128_le(&_self).into(); + fn to_u128_le(_self: Ref<::uuid::Uuid>) -> u128 { + let output: u128 = ::uuid::Uuid::to_u128_le(&_self).into(); output } } @@ -21938,17 +30470,31 @@ impl ::bevy::app::Plugin for BevyReflectScriptingPlugin { register_duration_functions(&mut world); register_instant_functions(&mut world); register_range_full_functions(&mut world); + register_type_id_functions(&mut world); register_quat_functions(&mut world); register_vec_3_functions(&mut world); + register_socket_addr_functions(&mut world); register_i_vec_2_functions(&mut world); register_i_vec_3_functions(&mut world); register_i_vec_4_functions(&mut world); + register_i_8_vec_2_functions(&mut world); + register_i_8_vec_3_functions(&mut world); + register_i_8_vec_4_functions(&mut world); + register_i_16_vec_2_functions(&mut world); + register_i_16_vec_3_functions(&mut world); + register_i_16_vec_4_functions(&mut world); register_i_64_vec_2_functions(&mut world); register_i_64_vec_3_functions(&mut world); register_i_64_vec_4_functions(&mut world); register_u_vec_2_functions(&mut world); register_u_vec_3_functions(&mut world); register_u_vec_4_functions(&mut world); + register_u_8_vec_2_functions(&mut world); + register_u_8_vec_3_functions(&mut world); + register_u_8_vec_4_functions(&mut world); + register_u_16_vec_2_functions(&mut world); + register_u_16_vec_3_functions(&mut world); + register_u_16_vec_4_functions(&mut world); register_u_64_vec_2_functions(&mut world); register_u_64_vec_3_functions(&mut world); register_u_64_vec_4_functions(&mut world); diff --git a/crates/bevy_mod_scripting_functions/src/bevy_bindings/bevy_time.rs b/crates/bevy_mod_scripting_functions/src/bevy_bindings/bevy_time.rs index 4802139580..49b603f93c 100644 --- a/crates/bevy_mod_scripting_functions/src/bevy_bindings/bevy_time.rs +++ b/crates/bevy_mod_scripting_functions/src/bevy_bindings/bevy_time.rs @@ -20,7 +20,7 @@ pub struct BevyTimeScriptingPlugin; )] impl bevy::time::prelude::Fixed { fn clone(_self: Ref) -> Val { - let output: Val = ::clone( + let output: Val = ::clone( &_self, ) .into(); @@ -35,7 +35,7 @@ impl bevy::time::prelude::Fixed { )] impl bevy::time::prelude::Real { fn clone(_self: Ref) -> Val { - let output: Val = ::clone( + let output: Val = ::clone( &_self, ) .into(); @@ -50,14 +50,14 @@ impl bevy::time::prelude::Real { )] impl bevy::time::prelude::Timer { fn assert_receiver_is_total_eq(_self: Ref) -> () { - let output: () = ::assert_receiver_is_total_eq( + let output: () = ::assert_receiver_is_total_eq( &_self, ) .into(); output } fn clone(_self: Ref) -> Val { - let output: Val = ::clone( + let output: Val = ::clone( &_self, ) .into(); @@ -71,8 +71,8 @@ impl bevy::time::prelude::Timer { /// let timer = Timer::new(Duration::from_secs(1), TimerMode::Once); /// assert_eq!(timer.duration(), Duration::from_secs(1)); /// ``` - fn duration(_self: Ref) -> Val { - let output: Val = bevy::time::prelude::Timer::duration( + fn duration(_self: Ref) -> Val<::core::time::Duration> { + let output: Val<::core::time::Duration> = bevy::time::prelude::Timer::duration( &_self, ) .into(); @@ -89,8 +89,8 @@ impl bevy::time::prelude::Timer { /// timer.tick(Duration::from_secs_f32(0.5)); /// assert_eq!(timer.elapsed(), Duration::from_secs_f32(0.5)); /// ``` - fn elapsed(_self: Ref) -> Val { - let output: Val = bevy::time::prelude::Timer::elapsed( + fn elapsed(_self: Ref) -> Val<::core::time::Duration> { + let output: Val<::core::time::Duration> = bevy::time::prelude::Timer::elapsed( &_self, ) .into(); @@ -112,7 +112,7 @@ impl bevy::time::prelude::Timer { _self: Ref, other: Ref, ) -> bool { - let output: bool = >::eq(&_self, &other) .into(); @@ -218,7 +218,7 @@ impl bevy::time::prelude::Timer { /// Creates a new timer with a given duration. /// See also [`Timer::from_seconds`](Timer::from_seconds). fn new( - duration: Val, + duration: Val<::core::time::Duration>, mode: Val, ) -> Val { let output: Val = bevy::time::prelude::Timer::new( @@ -268,8 +268,8 @@ impl bevy::time::prelude::Timer { /// timer.tick(Duration::from_secs_f32(0.5)); /// assert_eq!(timer.remaining(), Duration::from_secs_f32(1.5)); /// ``` - fn remaining(_self: Ref) -> Val { - let output: Val = bevy::time::prelude::Timer::remaining( + fn remaining(_self: Ref) -> Val<::core::time::Duration> { + let output: Val<::core::time::Duration> = bevy::time::prelude::Timer::remaining( &_self, ) .into(); @@ -318,7 +318,7 @@ impl bevy::time::prelude::Timer { /// ``` fn set_duration( mut _self: Mut, - duration: Val, + duration: Val<::core::time::Duration>, ) -> () { let output: () = bevy::time::prelude::Timer::set_duration( &mut _self, @@ -341,7 +341,7 @@ impl bevy::time::prelude::Timer { /// ``` fn set_elapsed( mut _self: Mut, - time: Val, + time: Val<::core::time::Duration>, ) -> () { let output: () = bevy::time::prelude::Timer::set_elapsed( &mut _self, @@ -416,7 +416,7 @@ impl bevy::time::prelude::Timer { )] impl bevy::time::prelude::TimerMode { fn assert_receiver_is_total_eq(_self: Ref) -> () { - let output: () = ::assert_receiver_is_total_eq( + let output: () = ::assert_receiver_is_total_eq( &_self, ) .into(); @@ -425,7 +425,7 @@ impl bevy::time::prelude::TimerMode { fn clone( _self: Ref, ) -> Val { - let output: Val = ::clone( + let output: Val = ::clone( &_self, ) .into(); @@ -435,7 +435,7 @@ impl bevy::time::prelude::TimerMode { _self: Ref, other: Ref, ) -> bool { - let output: bool = >::eq(&_self, &other) .into(); @@ -452,7 +452,7 @@ impl bevy::time::prelude::Virtual { fn clone( _self: Ref, ) -> Val { - let output: Val = ::clone( + let output: Val = ::clone( &_self, ) .into(); @@ -467,14 +467,14 @@ impl bevy::time::prelude::Virtual { )] impl bevy::time::Stopwatch { fn assert_receiver_is_total_eq(_self: Ref) -> () { - let output: () = ::assert_receiver_is_total_eq( + let output: () = ::assert_receiver_is_total_eq( &_self, ) .into(); output } fn clone(_self: Ref) -> Val { - let output: Val = ::clone( + let output: Val = ::clone( &_self, ) .into(); @@ -493,8 +493,8 @@ impl bevy::time::Stopwatch { /// # See Also /// [`elapsed_secs`](Stopwatch::elapsed_secs) - if an `f32` value is desirable instead. /// [`elapsed_secs_f64`](Stopwatch::elapsed_secs_f64) - if an `f64` is desirable instead. - fn elapsed(_self: Ref) -> Val { - let output: Val = bevy::time::Stopwatch::elapsed(&_self) + fn elapsed(_self: Ref) -> Val<::core::time::Duration> { + let output: Val<::core::time::Duration> = bevy::time::Stopwatch::elapsed(&_self) .into(); output } @@ -525,7 +525,7 @@ impl bevy::time::Stopwatch { output } fn eq(_self: Ref, other: Ref) -> bool { - let output: bool = >::eq(&_self, &other) .into(); @@ -599,7 +599,7 @@ impl bevy::time::Stopwatch { /// ``` fn set_elapsed( mut _self: Mut, - time: Val, + time: Val<::core::time::Duration>, ) -> () { let output: () = bevy::time::Stopwatch::set_elapsed( &mut _self, diff --git a/crates/bevy_mod_scripting_functions/src/bevy_bindings/bevy_transform.rs b/crates/bevy_mod_scripting_functions/src/bevy_bindings/bevy_transform.rs index 33f27c9332..f52d646031 100644 --- a/crates/bevy_mod_scripting_functions/src/bevy_bindings/bevy_transform.rs +++ b/crates/bevy_mod_scripting_functions/src/bevy_bindings/bevy_transform.rs @@ -42,7 +42,7 @@ impl bevy::transform::components::GlobalTransform { fn clone( _self: Ref, ) -> Val { - let output: Val = ::clone( + let output: Val = ::clone( &_self, ) .into(); @@ -84,7 +84,7 @@ impl bevy::transform::components::GlobalTransform { _self: Ref, other: Ref, ) -> bool { - let output: bool = >::eq(&_self, &other) .into(); @@ -163,7 +163,7 @@ impl bevy::transform::components::GlobalTransform { _self: Val, value: Val, ) -> Val { - let output: Val = = >::mul(_self.into_inner(), value.into_inner()) .into(); @@ -173,7 +173,7 @@ impl bevy::transform::components::GlobalTransform { _self: Val, global_transform: Val, ) -> Val { - let output: Val = = >::mul(_self.into_inner(), global_transform.into_inner()) .into(); @@ -183,7 +183,7 @@ impl bevy::transform::components::GlobalTransform { _self: Val, transform: Val, ) -> Val { - let output: Val = = >::mul(_self.into_inner(), transform.into_inner()) .into(); @@ -222,7 +222,6 @@ impl bevy::transform::components::GlobalTransform { /// ``` /// # use bevy_transform::prelude::{GlobalTransform, Transform}; /// # use bevy_ecs::prelude::{Entity, Query, Component, Commands}; - /// # use bevy_hierarchy::{prelude::Parent, BuildChildren}; /// #[derive(Component)] /// struct ToReparent { /// new_parent: Entity, @@ -397,7 +396,7 @@ impl bevy::transform::components::Transform { fn clone( _self: Ref, ) -> Val { - let output: Val = ::clone( + let output: Val = ::clone( &_self, ) .into(); @@ -439,7 +438,7 @@ impl bevy::transform::components::Transform { _self: Ref, other: Ref, ) -> bool { - let output: bool = >::eq(&_self, &other) .into(); @@ -574,7 +573,7 @@ impl bevy::transform::components::Transform { _self: Val, value: Val, ) -> Val { - let output: Val = = >::mul(_self.into_inner(), value.into_inner()) .into(); @@ -584,7 +583,7 @@ impl bevy::transform::components::Transform { _self: Val, global_transform: Val, ) -> Val { - let output: Val = = >::mul(_self.into_inner(), global_transform.into_inner()) .into(); @@ -594,7 +593,7 @@ impl bevy::transform::components::Transform { _self: Val, transform: Val, ) -> Val { - let output: Val = = >::mul(_self.into_inner(), transform.into_inner()) .into(); @@ -656,6 +655,11 @@ impl bevy::transform::components::Transform { } /// Rotates this [`Transform`] around the given `axis` by `angle` (in radians). /// If this [`Transform`] has a parent, the `axis` is relative to the rotation of the parent. + /// # Warning + /// If you pass in an `axis` based on the current rotation (e.g. obtained via [`Transform::local_x`]), + /// floating point errors can accumulate exponentially when applying rotations repeatedly this way. This will + /// result in a denormalized rotation. In this case, it is recommended to normalize the [`Transform::rotation`] after + /// each call to this method. fn rotate_axis( mut _self: Mut, axis: Val, @@ -683,6 +687,11 @@ impl bevy::transform::components::Transform { output } /// Rotates this [`Transform`] around its local `axis` by `angle` (in radians). + /// # Warning + /// If you pass in an `axis` based on the current rotation (e.g. obtained via [`Transform::local_x`]), + /// floating point errors can accumulate exponentially when applying rotations repeatedly this way. This will + /// result in a denormalized rotation. In this case, it is recommended to normalize the [`Transform::rotation`] after + /// each call to this method. fn rotate_local_axis( mut _self: Mut, axis: Val, @@ -861,10 +870,38 @@ impl bevy::transform::components::Transform { output } } +#[script_bindings( + remote, + name = "transform_tree_changed_functions", + bms_core_path = "bevy_mod_scripting_core", + generated +)] +impl bevy::transform::components::TransformTreeChanged { + fn clone( + _self: Ref, + ) -> Val { + let output: Val = ::clone( + &_self, + ) + .into(); + output + } + fn eq( + _self: Ref, + other: Ref, + ) -> bool { + let output: bool = >::eq(&_self, &other) + .into(); + output + } +} impl ::bevy::app::Plugin for BevyTransformScriptingPlugin { fn build(&self, app: &mut ::bevy::prelude::App) { let mut world = app.world_mut(); register_global_transform_functions(&mut world); register_transform_functions(&mut world); + register_transform_tree_changed_functions(&mut world); } } diff --git a/crates/bevy_mod_scripting_functions/src/bevy_bindings/mod.rs b/crates/bevy_mod_scripting_functions/src/bevy_bindings/mod.rs index 73d25afbce..dcb10bc937 100644 --- a/crates/bevy_mod_scripting_functions/src/bevy_bindings/mod.rs +++ b/crates/bevy_mod_scripting_functions/src/bevy_bindings/mod.rs @@ -2,12 +2,8 @@ #![allow(clippy::all)] #![allow(unused, deprecated, dead_code)] #![cfg_attr(rustfmt, rustfmt_skip)] -#[cfg(feature = "bevy_core")] -pub mod bevy_core; #[cfg(feature = "bevy_ecs")] pub mod bevy_ecs; -#[cfg(feature = "bevy_hierarchy")] -pub mod bevy_hierarchy; #[cfg(feature = "bevy_input")] pub mod bevy_input; #[cfg(feature = "bevy_math")] diff --git a/crates/bevy_mod_scripting_functions/src/core.rs b/crates/bevy_mod_scripting_functions/src/core.rs index 08963a02d3..0cd5fbc969 100644 --- a/crates/bevy_mod_scripting_functions/src/core.rs +++ b/crates/bevy_mod_scripting_functions/src/core.rs @@ -32,12 +32,8 @@ use reflection_extensions::{PartialReflectExt, TypeIdExtensions}; #[allow(unused_variables, reason = "feature flags")] pub fn register_bevy_bindings(app: &mut App) { - #[cfg(feature = "bevy_core")] - app.add_plugins(crate::bevy_bindings::bevy_core::BevyCoreScriptingPlugin); #[cfg(feature = "bevy_ecs")] app.add_plugins(crate::bevy_bindings::bevy_ecs::BevyEcsScriptingPlugin); - #[cfg(feature = "bevy_hierarchy")] - app.add_plugins(crate::bevy_bindings::bevy_hierarchy::BevyHierarchyScriptingPlugin); #[cfg(feature = "bevy_input")] app.add_plugins(crate::bevy_bindings::bevy_input::BevyInputScriptingPlugin); #[cfg(feature = "bevy_math")] diff --git a/crates/bevy_mod_scripting_functions/src/lib.rs b/crates/bevy_mod_scripting_functions/src/lib.rs index b9174ae4e0..2bfbe22357 100644 --- a/crates/bevy_mod_scripting_functions/src/lib.rs +++ b/crates/bevy_mod_scripting_functions/src/lib.rs @@ -15,7 +15,7 @@ impl Plugin for ScriptFunctionsPlugin { register_core_functions(app); // TODO: if bevy ever does this itself we should remove this - app.world_mut().register_component::(); + app.world_mut().register_component::(); app.world_mut().register_component::(); } } diff --git a/crates/bevy_system_reflection/Cargo.toml b/crates/bevy_system_reflection/Cargo.toml index dc1a660826..c7e5c4790a 100644 --- a/crates/bevy_system_reflection/Cargo.toml +++ b/crates/bevy_system_reflection/Cargo.toml @@ -12,9 +12,8 @@ categories = ["game-development"] readme = "readme.md" [dependencies] -bevy = { workspace = true, default-features = false } +bevy = { workspace = true, default-features = false, features = ["bevy_log"]} dot-writer = "0.1.4" -petgraph = "0.6" [dev-dependencies] diff --git a/crates/bevy_system_reflection/src/lib.rs b/crates/bevy_system_reflection/src/lib.rs index b176d96c2a..6184321178 100644 --- a/crates/bevy_system_reflection/src/lib.rs +++ b/crates/bevy_system_reflection/src/lib.rs @@ -1,13 +1,16 @@ //! A visualiser for bevy system schedules, as well as utilities for querying them via reflection -use std::ops::Deref; -use std::{any::TypeId, borrow::Cow}; +use std::{any::TypeId, borrow::Cow, ops::Deref}; -use bevy::ecs::schedule::{ - InternedScheduleLabel, InternedSystemSet, NodeId, Schedule, ScheduleLabel, SystemSet, +use bevy::{ + ecs::{ + schedule::{ + InternedScheduleLabel, InternedSystemSet, NodeId, Schedule, ScheduleLabel, SystemSet, + }, + system::{System, SystemInput}, + }, + platform::collections::{HashMap, HashSet}, + reflect::Reflect, }; -use bevy::ecs::system::{System, SystemInput}; -use bevy::reflect::Reflect; -use bevy::utils::hashbrown::{HashMap, HashSet}; use dot_writer::{Attributes, DotWriter}; #[derive(Reflect, Debug, Clone)] @@ -283,7 +286,7 @@ pub fn schedule_to_reflect_graph(schedule: &Schedule) -> ReflectSystemGraph { let dependencies = dependency .all_edges() - .map(|(from, to, _)| Edge { + .map(|(from, to)| Edge { from: ReflectNodeId(from), to: ReflectNodeId(to), }) @@ -291,7 +294,7 @@ pub fn schedule_to_reflect_graph(schedule: &Schedule) -> ReflectSystemGraph { let hierarchy = hierarchy .all_edges() - .map(|(from, to, _)| Edge { + .map(|(from, to)| Edge { from: ReflectNodeId(from), to: ReflectNodeId(to), }) @@ -466,13 +469,7 @@ pub struct Edge { #[cfg(test)] mod test { - use bevy::{ - app::Update, - ecs::{ - schedule::{IntoSystemConfigs, IntoSystemSetConfigs}, - world::World, - }, - }; + use bevy::{app::Update, ecs::world::World, prelude::IntoScheduleConfigs}; use super::*; diff --git a/crates/ladfile_builder/Cargo.toml b/crates/ladfile_builder/Cargo.toml index a113d8a330..878b2af097 100644 --- a/crates/ladfile_builder/Cargo.toml +++ b/crates/ladfile_builder/Cargo.toml @@ -16,7 +16,7 @@ readme = "readme.md" bevy_mod_scripting_core = { workspace = true } # I don't think bevy has a top level feature for this :C bevy = { workspace = true } -bevy_reflect = { version = "0.15.3", features = ["documentation"] } +bevy_reflect = { version = "0.16.0", features = ["documentation"] } ladfile = { version = "0.5.0", path = "../ladfile" } regex = "1.11" diff --git a/crates/ladfile_builder/src/lib.rs b/crates/ladfile_builder/src/lib.rs index 3c6e6de46d..469f249d35 100644 --- a/crates/ladfile_builder/src/lib.rs +++ b/crates/ladfile_builder/src/lib.rs @@ -1,7 +1,16 @@ //! Parsing definitions for the LAD (Language Agnostic Decleration) file format. pub mod plugin; -use bevy::{ecs::world::World, utils::HashSet}; +use std::{ + any::TypeId, + borrow::Cow, + cmp::{max, min}, + collections::HashMap, + ffi::OsString, + path::PathBuf, +}; + +use bevy::{ecs::world::World, platform::collections::HashSet}; use bevy_mod_scripting_core::{ bindings::{ function::{ @@ -21,14 +30,6 @@ use bevy_mod_scripting_core::{ }; use bevy_reflect::{NamedField, TypeInfo, TypeRegistry, Typed, UnnamedField}; use ladfile::*; -use std::{ - any::TypeId, - borrow::Cow, - cmp::{max, min}, - collections::HashMap, - ffi::OsString, - path::PathBuf, -}; /// We can assume that the types here will be either primitives /// or reflect types, as the rest will be covered by typed wrappers diff --git a/crates/ladfile_builder/src/plugin.rs b/crates/ladfile_builder/src/plugin.rs index ef6a3a6773..1bc1858b86 100644 --- a/crates/ladfile_builder/src/plugin.rs +++ b/crates/ladfile_builder/src/plugin.rs @@ -4,11 +4,7 @@ use std::path::PathBuf; use bevy::{ app::{App, Plugin, Startup}, - ecs::{ - reflect::AppTypeRegistry, - system::{Res, Resource}, - world::World, - }, + ecs::{prelude::Resource, reflect::AppTypeRegistry, system::Res, world::World}, }; use bevy_mod_scripting_core::bindings::{ function::{namespace::Namespace, script_function::AppScriptFunctionRegistry}, diff --git a/crates/languages/bevy_mod_scripting_lua/Cargo.toml b/crates/languages/bevy_mod_scripting_lua/Cargo.toml index e88484dd0c..45aa8aee47 100644 --- a/crates/languages/bevy_mod_scripting_lua/Cargo.toml +++ b/crates/languages/bevy_mod_scripting_lua/Cargo.toml @@ -40,10 +40,6 @@ path = "src/lib.rs" bevy = { workspace = true, default-features = false } bevy_mod_scripting_core = { workspace = true, features = ["mlua_impls"] } mlua = { version = "0.10", features = ["vendored", "send", "macros"] } -parking_lot = "0.12.1" -uuid = "1.1" -smol_str = "0.2.2" -smallvec = "1.13" profiling = { workspace = true } [lints] diff --git a/crates/languages/bevy_mod_scripting_lua/src/lib.rs b/crates/languages/bevy_mod_scripting_lua/src/lib.rs index 473c98d24c..33df2015d0 100644 --- a/crates/languages/bevy_mod_scripting_lua/src/lib.rs +++ b/crates/languages/bevy_mod_scripting_lua/src/lib.rs @@ -72,7 +72,7 @@ impl Default for LuaScriptingPlugin { Ok(()) }, - |_script_id, context: &mut Lua| { + |_script_id, context| { // set static globals let world = ThreadWorldContainer.try_get_world()?; let globals_registry = diff --git a/crates/languages/bevy_mod_scripting_rhai/src/lib.rs b/crates/languages/bevy_mod_scripting_rhai/src/lib.rs index 6f72de7362..aed318fbf7 100644 --- a/crates/languages/bevy_mod_scripting_rhai/src/lib.rs +++ b/crates/languages/bevy_mod_scripting_rhai/src/lib.rs @@ -25,9 +25,8 @@ use bindings::{ script_value::{FromDynamic, IntoDynamic}, }; use parking_lot::RwLock; -use rhai::{CallFnOptions, Dynamic, Engine, EvalAltResult, Scope, AST}; - pub use rhai; +use rhai::{CallFnOptions, Dynamic, Engine, EvalAltResult, Scope, AST}; /// Bindings for rhai. pub mod bindings; @@ -71,7 +70,7 @@ impl Default for RhaiScriptingPlugin { scripting_plugin: ScriptingPlugin { context_assignment_strategy: Default::default(), runtime_settings: RuntimeSettings { - initializers: vec![|runtime: &RhaiRuntime| { + initializers: vec![|runtime| { let mut engine = runtime.write(); engine.set_max_expr_depths(999, 999); engine.build_type::(); @@ -86,14 +85,14 @@ impl Default for RhaiScriptingPlugin { reload: rhai_context_reload, }, context_initializers: vec![ - |_, context: &mut RhaiScriptContext| { + |_, context| { context.scope.set_or_push( "world", RhaiStaticReflectReference(std::any::TypeId::of::()), ); Ok(()) }, - |_, context: &mut RhaiScriptContext| { + |_, context| { // initialize global functions let world = ThreadWorldContainer.try_get_world()?; let globals_registry = diff --git a/crates/testing_crates/script_integration_test_harness/src/lib.rs b/crates/testing_crates/script_integration_test_harness/src/lib.rs index 17956e9c62..ad08d17d31 100644 --- a/crates/testing_crates/script_integration_test_harness/src/lib.rs +++ b/crates/testing_crates/script_integration_test_harness/src/lib.rs @@ -12,14 +12,14 @@ use bevy::{ ecs::{ component::Component, event::{Event, Events}, - schedule::{IntoSystemConfigs, SystemConfigs}, - system::{IntoSystem, Local, Res, Resource, SystemState}, - world::{Command, FromWorld, Mut}, + prelude::{Command, Resource}, + schedule::ScheduleConfigs, + system::{BoxedSystem, InfallibleSystemWrapper, IntoSystem, Local, Res, SystemState}, + world::{FromWorld, Mut}, }, - log::Level, - prelude::{Entity, World}, + log::{tracing, tracing::event, Level}, + prelude::{BevyError, Entity, IntoScheduleConfigs, World}, reflect::{Reflect, TypeRegistry}, - utils::tracing, }; use bevy_mod_scripting_core::{ asset::ScriptAsset, @@ -55,9 +55,12 @@ struct TestCallbackBuilder { } impl TestCallbackBuilder { - fn build(script_id: impl Into, expect_response: bool) -> SystemConfigs { + fn build( + script_id: impl Into, + expect_response: bool, + ) -> ScheduleConfigs>> { let script_id = script_id.into(); - IntoSystem::into_system( + let system = Box::new(InfallibleSystemWrapper::new(IntoSystem::into_system( move |world: &mut World, system_state: &mut SystemState>>| { let with_guard = system_state.get_mut(world); @@ -65,9 +68,9 @@ impl TestCallbackBuilder system_state.apply(world); }, - ) - .with_name(L::into_callback_label().to_string()) - .into_configs() + ).with_name(L::into_callback_label().to_string()))); + + system.into_configs() } } @@ -341,7 +344,7 @@ pub fn run_lua_benchmark( label: &str, criterion: &mut criterion::BenchmarkGroup, ) -> Result<(), String> { - use bevy::{log::Level, utils::tracing}; + use bevy::log::Level; use bevy_mod_scripting_lua::mlua::Function; let plugin = make_test_lua_plugin(); @@ -373,7 +376,7 @@ pub fn run_rhai_benchmark( label: &str, criterion: &mut criterion::BenchmarkGroup, ) -> Result<(), String> { - use bevy::{log::Level, utils::tracing}; + use bevy::log::Level; use bevy_mod_scripting_rhai::rhai::Dynamic; let plugin = make_test_rhai_plugin(); @@ -587,7 +590,7 @@ pub fn perform_benchmark_with_generator< ) }, |(i, w)| { - bevy::utils::tracing::event!(bevy::log::Level::TRACE, "profiling_iter {}", label); + event!(bevy::log::Level::TRACE, "profiling_iter {}", label); bench_fn(w, i) }, batch_size, diff --git a/crates/testing_crates/test_utils/src/test_data.rs b/crates/testing_crates/test_utils/src/test_data.rs index 030f7dc020..55b4b8daa4 100644 --- a/crates/testing_crates/test_utils/src/test_data.rs +++ b/crates/testing_crates/test_utils/src/test_data.rs @@ -1,12 +1,13 @@ -use std::alloc::Layout; -use std::collections::HashMap; +use std::{alloc::Layout, collections::HashMap}; -use bevy::asset::AssetPlugin; -use bevy::diagnostic::DiagnosticsPlugin; -use bevy::ecs::{component::*, world::World}; -use bevy::log::LogPlugin; -use bevy::prelude::*; -use bevy::reflect::*; +use bevy::{ + asset::AssetPlugin, + diagnostic::DiagnosticsPlugin, + ecs::{component::*, world::World}, + log::LogPlugin, + prelude::*, + reflect::*, +}; /// Test component with Reflect and ReflectComponent registered #[derive(Component, Reflect, PartialEq, Eq, Debug)] @@ -312,6 +313,8 @@ fn init_world(world: &mut World, init: StorageType::Table, Layout::new::(), None, + true, + ComponentCloneBehavior::Default, )) }; } @@ -346,7 +349,6 @@ pub fn setup_integration_test(init: F) app.add_plugins(( MinimalPlugins, AssetPlugin::default(), - HierarchyPlugin, DiagnosticsPlugin, LogPlugin { filter: log_level, diff --git a/examples/game_of_life.rs b/examples/game_of_life.rs index 325b4a4db9..a65b907596 100644 --- a/examples/game_of_life.rs +++ b/examples/game_of_life.rs @@ -280,7 +280,7 @@ pub fn update_rendered_state( let old_rendered_state = assets .get_mut(&old_rendered_state.image) .expect("World is not setup correctly"); - old_rendered_state.data = new_state.cells.clone(); + old_rendered_state.data = Some(new_state.cells.clone()); } } @@ -301,7 +301,7 @@ pub fn send_on_click( ) { if buttons.just_pressed(MouseButton::Left) { let window = q_windows.single(); - let pos = window.cursor_position().unwrap_or_default(); + let pos = window.unwrap().cursor_position().unwrap_or_default(); let x = pos.x as u32; let y = pos.y as u32; events.send(ScriptCallbackEvent::new_for_all( diff --git a/xtask/src/main.rs b/xtask/src/main.rs index 36d2f76e66..9a43771d62 100644 --- a/xtask/src/main.rs +++ b/xtask/src/main.rs @@ -33,9 +33,7 @@ use strum::{IntoEnumIterator, VariantNames}; enum Feature { // bindings CoreFunctions, - BevyCoreBindings, BevyEcsBindings, - BevyHierarchyBindings, BevyInputBindings, BevyMathBindings, BevyReflectBindings, @@ -111,9 +109,7 @@ impl IntoFeatureGroup for Feature { | Feature::MluaMacros | Feature::MluaSerialize | Feature::UnsafeLuaModules => FeatureGroup::ForExternalCrate, - Feature::BevyCoreBindings - | Feature::BevyEcsBindings - | Feature::BevyHierarchyBindings + Feature::BevyEcsBindings | Feature::BevyInputBindings | Feature::BevyMathBindings | Feature::BevyReflectBindings @@ -133,9 +129,7 @@ impl Default for Features { Features::new(vec![ Feature::Lua54, Feature::CoreFunctions, - Feature::BevyCoreBindings, Feature::BevyEcsBindings, - Feature::BevyHierarchyBindings, Feature::BevyInputBindings, Feature::BevyMathBindings, Feature::BevyReflectBindings,