diff --git a/.gitattributes b/.gitattributes index bb1448cfcd..3159060504 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1,2 +1,2 @@ -crates/bevy_script_api/providers/*.rs linguist-generated -crates/bevy_script_api/providers/*.rs -diff -merge \ No newline at end of file +crates/bevy_mod_scripting_functions/src/bevy_bindings/*.rs linguist-generated +crates/bevy_mod_scripting_functions/src/bevy_gindings/*.rs -diff -merge \ No newline at end of file diff --git a/Cargo.toml b/Cargo.toml index a3a12a1947..1b39ed7eb3 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -67,45 +67,110 @@ rhai = ["bevy_mod_scripting_rhai", "bevy_mod_scripting_functions/rhai_bindings"] # rune = ["bevy_mod_scripting_rune"] ### Profiling -profile_with_tracy = ["bevy/trace_tracy"] +profile_with_tracy = ["bevy?/trace_tracy", "dep:bevy"] [dependencies] -bevy = { workspace = true } -bevy_math = { workspace = true } -bevy_reflect = { workspace = true } +bevy = { workspace = true, optional = true } +bevy_app = { workspace = true } bevy_mod_scripting_core = { workspace = true } -bevy_mod_scripting_lua = { path = "crates/languages/bevy_mod_scripting_lua", version = "0.15.1", optional = true } -bevy_mod_scripting_rhai = { path = "crates/languages/bevy_mod_scripting_rhai", version = "0.15.1", optional = true } -# bevy_mod_scripting_rune = { path = "crates/languages/bevy_mod_scripting_rune", version = "0.9.0-alpha.2", optional = true } +bevy_mod_scripting_lua = { workspace = true, optional = true } +bevy_mod_scripting_rhai = { workspace = true, optional = true } bevy_mod_scripting_functions = { workspace = true } bevy_mod_scripting_derive = { workspace = true } [workspace.dependencies] -profiling = { version = "1.0" } - -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.15.1" } +# local crates +script_integration_test_harness = { path = "crates/testing_crates/script_integration_test_harness" } +test_utils = { path = "crates/testing_crates/test_utils" } bevy_mod_scripting_functions = { path = "crates/bevy_mod_scripting_functions", version = "0.15.1", default-features = false } bevy_mod_scripting_derive = { path = "crates/bevy_mod_scripting_derive", version = "0.15.1" } +bevy_system_reflection = { path = "crates/bevy_system_reflection", version = "0.2.0", default-features = false } +ladfile = { path = "crates/ladfile", version = "0.5.0" } +ladfile_builder = { path = "crates/ladfile_builder", version = "0.5.1" } +bevy_mod_scripting_lua = { path = "crates/languages/bevy_mod_scripting_lua", version = "0.15.1", default-features = false } +bevy_mod_scripting_rhai = { path = "crates/languages/bevy_mod_scripting_rhai", version = "0.15.1", default-features = false } +# bevy -# test utilities -script_integration_test_harness = { path = "crates/testing_crates/script_integration_test_harness" } -test_utils = { path = "crates/testing_crates/test_utils" } +bevy_mod_scripting_core = { path = "crates/bevy_mod_scripting_core", version = "0.15.1" } +bevy = { version = "0.16.0", default-features = false } +bevy_math = { version = "0.16.0", default-features = false, features = ["std"] } +bevy_transform = { version = "0.16.0", default-features = false } +bevy_reflect = { version = "0.16.0", default-features = false } +bevy_ecs = { version = "0.16.0", default-features = false } +bevy_asset = { version = "0.16.0", default-features = false } +bevy_app = { version = "0.16.0", default-features = false } +bevy_log = { version = "0.16.0", default-features = false } +bevy_internal = { version = "0.16.0", default-features = false } +bevy_diagnostic = { version = "0.16.0", default-features = false } +bevy_platform = { version = "0.16.0", default-features = false } +bevy_time = { version = "0.16.0", default-features = false } +bevy_input = { version = "0.16.0", default-features = false } +glam = { version = "0.29.3", default-features = false } +uuid = { version = "1.11", default-features = false } +smol_str = { version = "0.2.0", default-features = false } + +# other +serde_json = { version = "1.0", default-features = false } +indexmap = { version = "2.7", default-features = false, features = ["std"] } +profiling = { version = "1.0", default-features = false, features = [ + "procmacros", +] } +regex = { version = "1.11", default-features = false } +serde = { version = "1.0", default-features = false } +dot-writer = { version = "0.1.4", default-features = false } +parking_lot = { version = "0.12.1", default-features = false } +strum = { version = "0.26", default-features = false } +rhai = { version = "1.21", default-features = false } +mlua = { version = "0.10", default-features = false } +log = { version = "0.4", default-features = false } +env_logger = { version = "0.11", default-features = false } +clap = { version = "4", default-features = false } +mdbook = { version = "0.4", default-features = false } +quote = { version = "1.0", default-features = false } +syn = { version = "2.0", default-features = false } +proc-macro2 = { version = "1.0", default-features = false } +smallvec = { version = "1.11", default-features = false } +itertools = { version = "0.14", default-features = false } +fixedbitset = { version = "0.5", default-features = false } +variadics_please = { version = "1.1.0", default-features = false } +anyhow = { version = "1.0", default-features = false } + + +# development and testing + +pretty_assertions = { version = "1.4", default-features = false, features = [ + "std", +] } +manifest-dir-macros = { version = "0.1.18", default-features = false } +assert_cmd = { version = "2.0", default-features = false } +tokio = { version = "1", default-features = false } +bevy_console = { version = "0.14", default-features = false } +tracing-tracy = { version = "0.11", default-features = false } +libtest-mimic = { version = "0.8", default-features = false } +criterion = { version = "0.5", default-features = false } +rand = { version = "0.9", default-features = false } +rand_chacha = { version = "0.9", default-features = false } [dev-dependencies] -bevy = { workspace = true, default-features = true, features = ["std"] } -clap = { version = "4.1", features = ["derive"] } -rand = "0.9.1" -criterion = { version = "0.5" } -ladfile_builder = { path = "crates/ladfile_builder", version = "0.5.1" } +bevy = { workspace = true, features = [ + "bevy_render", + "bevy_window", + "bevy_asset", + "bevy_core_pipeline", + "bevy_sprite", +] } +bevy_platform = { workspace = true } +clap = { workspace = true, features = ["derive"] } +rand = { workspace = true, features = ["thread_rng"] } +criterion = { workspace = true } +ladfile_builder = { workspace = true } 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" +libtest-mimic = { workspace = true } +tracing-tracy = { workspace = true } +regex = { workspace = true } +bevy_console = { workspace = true } + [workspace] members = [ diff --git a/benches/benchmarks.rs b/benches/benchmarks.rs index 427bea3e63..e4e90436b0 100644 --- a/benches/benchmarks.rs +++ b/benches/benchmarks.rs @@ -1,7 +1,8 @@ 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_platform::collections::HashMap; +use std::{path::PathBuf, sync::LazyLock, time::Duration}; use bevy::{ log::{ diff --git a/codegen/templates/footer.tera b/codegen/templates/footer.tera index 4c8ea6ada3..3e238de676 100644 --- a/codegen/templates/footer.tera +++ b/codegen/templates/footer.tera @@ -52,8 +52,8 @@ impl {{item.import_path}} { } {% endfor %} -impl ::bevy::app::Plugin for {{ "ScriptingPlugin" | prefix_cratename | convert_case(case="upper_camel")}} { - fn build(&self, app: &mut ::bevy::prelude::App) { +impl Plugin for {{ "ScriptingPlugin" | prefix_cratename | convert_case(case="upper_camel")}} { + fn build(&self, app: &mut App) { let mut world = app.world_mut(); {% for item in items %} diff --git a/codegen/templates/header.tera b/codegen/templates/header.tera index 2351731544..4b0c658c2d 100644 --- a/codegen/templates/header.tera +++ b/codegen/templates/header.tera @@ -8,6 +8,8 @@ use bevy_mod_scripting_core::{ function::{from::{Ref, Mut, Val}, namespace::{NamespaceBuilder}} } }; +use bevy_ecs::{prelude::*}; + use bevy_mod_scripting_derive::script_bindings; diff --git a/codegen/templates/import.tera b/codegen/templates/import.tera index 638bc89bf0..4d690d6293 100644 --- a/codegen/templates/import.tera +++ b/codegen/templates/import.tera @@ -1,7 +1 @@ -{%- if import is starting_with("bevy_") -%} -bevy::{{- import | substring(start=5) -}} -{%- elif import is starting_with("glam::") -%} -bevy::math::{{- import | substring(start=6) -}} -{%- else -%} -::{{import}} -{%- endif -%} \ No newline at end of file +::{{import}} \ No newline at end of file diff --git a/codegen/templates/macros.tera b/codegen/templates/macros.tera index 5297a43694..561dee898f 100644 --- a/codegen/templates/macros.tera +++ b/codegen/templates/macros.tera @@ -25,7 +25,7 @@ fn index(_self: Self, idx: usize, lua: &tealr::mlu::mlua::Lua) -> Result "unknown_axis" }; - let parsed_path = ::bevy::reflect::ParsedPath::parse_static(path).expect("invariant"); + let parsed_path = ::bevy_reflect::ParsedPath::parse_static(path).expect("invariant"); curr_ref.index_path(bevy_mod_scripting_core::bindings::ReflectionPathElem::new_reflection(parsed_path)); crate::bindings::reference::LuaReflectReference(curr_ref).to_lua_proxy(lua) } diff --git a/crates/bevy_mod_scripting_core/Cargo.toml b/crates/bevy_mod_scripting_core/Cargo.toml index 3aaf153f6b..1a88236531 100644 --- a/crates/bevy_mod_scripting_core/Cargo.toml +++ b/crates/bevy_mod_scripting_core/Cargo.toml @@ -25,29 +25,32 @@ mlua_impls = ["mlua"] rhai_impls = ["rhai"] [dependencies] -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", - "std", -] } -parking_lot = "0.12.1" -smallvec = "1.11" -itertools = "0.14" +mlua = { workspace = true, optional = true } +rhai = { workspace = true, features = ["sync"], optional = true } + +bevy_reflect = { workspace = true, default-features = false, features = [] } +bevy_ecs = { workspace = true, default-features = false, features = [] } +bevy_app = { workspace = true, default-features = false, features = [] } +bevy_log = { workspace = true, default-features = false, features = [] } +bevy_asset = { workspace = true, default-features = false, features = [] } +bevy_diagnostic = { workspace = true, default-features = false, features = [] } +bevy_platform = { workspace = true, default-features = false, features = [] } + +parking_lot = { workspace = true } +smallvec = { workspace = true } +itertools = { workspace = true } profiling = { workspace = true } bevy_mod_scripting_derive = { workspace = true } -fixedbitset = "0.5" -bevy_system_reflection = { path = "../bevy_system_reflection", version = "0.2.0" } -serde = { version = "1.0", features = ["derive"] } -uuid = "1.11" -variadics_please = "1.1.0" +fixedbitset = { workspace = true } +bevy_system_reflection = { workspace = true } +serde = { workspace = true, features = ["derive"] } +uuid = { workspace = true } +variadics_please = { workspace = true } [dev-dependencies] test_utils = { workspace = true } -tokio = { version = "1", features = ["rt", "macros"] } -pretty_assertions = "1.4" +tokio = { workspace = true, features = ["rt", "macros"] } +pretty_assertions = { workspace = true, features = ["alloc"] } [lints] workspace = true diff --git a/crates/bevy_mod_scripting_core/src/asset.rs b/crates/bevy_mod_scripting_core/src/asset.rs index 9e0c5e955e..d34a7ff79f 100644 --- a/crates/bevy_mod_scripting_core/src/asset.rs +++ b/crates/bevy_mod_scripting_core/src/asset.rs @@ -2,15 +2,22 @@ use std::{borrow::Cow, collections::VecDeque}; -use bevy::{ - app::{App, Last}, - asset::{Asset, AssetEvent, AssetLoader, Assets, LoadState}, - log::{error, trace, warn, warn_once}, - prelude::{ - AssetServer, Commands, Entity, EventReader, EventWriter, IntoScheduleConfigs, Local, Query, - Res, - }, - reflect::Reflect, +use ::{ + bevy_app::{App, Last}, + bevy_asset::{Asset, AssetEvent, AssetLoader, Assets, LoadState}, + bevy_log::{error, trace, warn, warn_once}, + // prelude::{ + // AssetServer, Commands, Entity, EventReader, EventWriter, IntoScheduleConfigs, Local, Query, + // Res, + // }, + bevy_reflect::Reflect, +}; +use bevy_asset::AssetServer; +use bevy_ecs::{ + entity::Entity, + event::{EventReader, EventWriter}, + schedule::IntoScheduleConfigs, + system::{Commands, Local, Query, Res}, }; use serde::{Deserialize, Serialize}; @@ -128,9 +135,9 @@ impl AssetLoader for ScriptAssetLoader { async fn load( &self, - reader: &mut dyn bevy::asset::io::Reader, + reader: &mut dyn bevy_asset::io::Reader, settings: &Self::Settings, - load_context: &mut bevy::asset::LoadContext<'_>, + load_context: &mut bevy_asset::LoadContext<'_>, ) -> Result { let mut content = Vec::new(); reader @@ -147,6 +154,7 @@ impl AssetLoader for ScriptAssetLoader { .and_then(|e| e.to_str()) .unwrap_or_default(); self.language_extensions + .0 .get(ext) .cloned() .unwrap_or_else(|| { @@ -333,7 +341,7 @@ pub(crate) fn configure_asset_systems(app: &mut App) { .configure_sets( Last, ( - ScriptingSystemSet::ScriptAssetDispatch.after(bevy::asset::AssetEvents), + ScriptingSystemSet::ScriptAssetDispatch.after(bevy_asset::AssetEvents), ScriptingSystemSet::ScriptCommandDispatch .after(ScriptingSystemSet::ScriptAssetDispatch), ), @@ -349,106 +357,104 @@ pub(crate) fn configure_asset_systems_for_plugin(app: ); } -#[cfg(test)] -mod tests { - use std::path::PathBuf; - - use bevy::{ - MinimalPlugins, - app::App, - asset::{AssetApp, AssetPath, AssetPlugin, AssetServer, Assets, Handle, LoadState}, - }; - - use super::*; - - fn init_loader_test(loader: ScriptAssetLoader) -> App { - let mut app = App::new(); - app.add_plugins((MinimalPlugins, AssetPlugin::default())); - app.init_asset::(); - app.register_asset_loader(loader); - app - } - - fn for_extension(extension: &'static str) -> ScriptAssetLoader { - let mut language_extensions = LanguageExtensions::default(); - language_extensions.insert(extension, Language::Unknown); - ScriptAssetLoader::new(language_extensions) - } - - fn load_asset(app: &mut App, path: &str) -> Handle { - let handle = app.world_mut().resource::().load(path); - - loop { - let state = app - .world() - .resource::() - .get_load_state(&handle) - .unwrap(); - if !matches!(state, LoadState::Loading) { - break; - } - app.update(); - } - - match app - .world() - .resource::() - .get_load_state(&handle) - .unwrap() - { - LoadState::NotLoaded => panic!("Asset not loaded"), - LoadState::Loaded => {} - LoadState::Failed(asset_load_error) => { - panic!("Asset load failed: {asset_load_error:?}") - } - _ => panic!("Unexpected load state"), - } - - handle - } - - #[test] - fn test_asset_loader_loads() { - let loader = for_extension("script"); - let mut app = init_loader_test(loader); - - let handle = load_asset(&mut app, "test_assets/test_script.script"); - let asset = app - .world() - .get_resource::>() - .unwrap() - .get(&handle) - .unwrap(); - - assert_eq!( - String::from_utf8(asset.content.clone().to_vec()).unwrap(), - "test script".to_string() - ); - } - - #[test] - fn test_asset_loader_applies_preprocessor() { - let loader = for_extension("script").with_preprocessor(Box::new(|content| { - content[0] = b'p'; - Ok(()) - })); - let mut app = init_loader_test(loader); - - let handle = load_asset(&mut app, "test_assets/test_script.script"); - let asset = app - .world() - .get_resource::>() - .unwrap() - .get(&handle) - .unwrap(); - - assert_eq!( - handle.path().unwrap(), - &AssetPath::from(PathBuf::from("test_assets/test_script.script")) - ); - assert_eq!( - String::from_utf8(asset.content.clone().to_vec()).unwrap(), - "pest script".to_string() - ); - } -} +// #[cfg(test)] +// mod tests { + +// use ::{ +// bevy_app::App, +// bevy_asset::{AssetServer, Handle, LoadState}, +// }; + +// use super::*; + +// // fn init_loader_test(loader: ScriptAssetLoader) -> App { +// // let mut app = App::new(); +// // app.add_plugins((MinimalPlugins, AssetPlugin::default())); +// // app.init_asset::(); +// // app.register_asset_loader(loader); +// // app +// // } + +// // fn for_extension(extension: &'static str) -> ScriptAssetLoader { +// // let mut language_extensions = LanguageExtensions::default(); +// // language_extensions.insert(extension, Language::Unknown); +// // ScriptAssetLoader::new(language_extensions) +// // } + +// // fn load_asset(app: &mut App, path: &str) -> Handle { +// // let handle = app.world_mut().resource::().load(path); + +// // loop { +// // let state = app +// // .world() +// // .resource::() +// // .get_load_state(&handle) +// // .unwrap(); +// // if !matches!(state, LoadState::Loading) { +// // break; +// // } +// // app.update(); +// // } + +// // match app +// // .world() +// // .resource::() +// // .get_load_state(&handle) +// // .unwrap() +// // { +// // LoadState::NotLoaded => panic!("Asset not loaded"), +// // LoadState::Loaded => {} +// // LoadState::Failed(asset_load_error) => { +// // panic!("Asset load failed: {asset_load_error:?}") +// // } +// // _ => panic!("Unexpected load state"), +// // } + +// // handle +// // } + +// // #[test] +// // fn test_asset_loader_loads() { +// // let loader = for_extension("script"); +// // let mut app = init_loader_test(loader); + +// // let handle = load_asset(&mut app, "test_assets/test_script.script"); +// // let asset = app +// // .world() +// // .get_resource::>() +// // .unwrap() +// // .get(&handle) +// // .unwrap(); + +// // assert_eq!( +// // String::from_utf8(asset.content.clone().to_vec()).unwrap(), +// // "test script".to_string() +// // ); +// // } + +// // #[test] +// // fn test_asset_loader_applies_preprocessor() { +// // let loader = for_extension("script").with_preprocessor(Box::new(|content| { +// // content[0] = b'p'; +// // Ok(()) +// // })); +// // let mut app = init_loader_test(loader); + +// // let handle = load_asset(&mut app, "test_assets/test_script.script"); +// // let asset = app +// // .world() +// // .get_resource::>() +// // .unwrap() +// // .get(&handle) +// // .unwrap(); + +// // assert_eq!( +// // handle.path().unwrap(), +// // &AssetPath::from(PathBuf::from("test_assets/test_script.script")) +// // ); +// // assert_eq!( +// // String::from_utf8(asset.content.clone().to_vec()).unwrap(), +// // "pest script".to_string() +// // ); +// // } +// } 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 d4a290fab0..41afa96c21 100644 --- a/crates/bevy_mod_scripting_core/src/bindings/access_map.rs +++ b/crates/bevy_mod_scripting_core/src/bindings/access_map.rs @@ -1,14 +1,13 @@ //! A map of access claims used to safely and dynamically access the world. -use std::hash::{BuildHasherDefault, Hasher}; +use bevy_platform::collections::{HashMap, HashSet}; -use bevy::{ - ecs::{component::ComponentId, world::unsafe_world_cell::UnsafeWorldCell}, - platform::collections::{HashMap, HashSet}, - prelude::Resource, -}; +use ::bevy_ecs::{component::ComponentId, world::unsafe_world_cell::UnsafeWorldCell}; +use bevy_ecs::{component::Component, resource::Resource}; +use bevy_log::error; use parking_lot::Mutex; use smallvec::SmallVec; +use std::hash::{BuildHasherDefault, Hasher}; use crate::error::InteropError; @@ -160,9 +159,7 @@ impl ReflectAccessId { } /// Creates a new access id for a component - pub fn for_component( - cell: &UnsafeWorldCell, - ) -> Result { + pub fn for_component(cell: &UnsafeWorldCell) -> Result { let component_id = cell.components().component_id::().ok_or_else(|| { InteropError::unregistered_component_or_resource_type(std::any::type_name::()) })?; @@ -414,7 +411,7 @@ impl DynamicSystemMeta for AccessMap { let key = key.as_index(); if key == GLOBAL_KEY { - bevy::log::error!("Trying to claim read access to global key, this is not allowed"); + error!("Trying to claim read access to global key, this is not allowed"); return false; } @@ -440,7 +437,7 @@ impl DynamicSystemMeta for AccessMap { let key = key.as_index(); if key == GLOBAL_KEY { - bevy::log::error!("Trying to claim write access to global key, this is not allowed"); + error!("Trying to claim write access to global key, this is not allowed"); return false; } @@ -1157,9 +1154,11 @@ mod test { let access_map = AccessMap::default(); assert!(access_map.claim_global_access()); - assert!(access_map - .access_location(ReflectAccessId::for_global()) - .is_some()); + assert!( + access_map + .access_location(ReflectAccessId::for_global()) + .is_some() + ); access_map.release_global_access(); // Claim a read access @@ -1182,9 +1181,11 @@ mod test { }; assert!(subset_access_map.claim_global_access()); - assert!(subset_access_map - .access_location(ReflectAccessId::for_global()) - .is_some()); + assert!( + subset_access_map + .access_location(ReflectAccessId::for_global()) + .is_some() + ); subset_access_map.release_global_access(); // Claim a read access diff --git a/crates/bevy_mod_scripting_core/src/bindings/allocator.rs b/crates/bevy_mod_scripting_core/src/bindings/allocator.rs index 62faf05405..efe9f8ca2a 100644 --- a/crates/bevy_mod_scripting_core/src/bindings/allocator.rs +++ b/crates/bevy_mod_scripting_core/src/bindings/allocator.rs @@ -1,14 +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, - platform::collections::HashMap, - prelude::ResMut, - reflect::PartialReflect, +use ::{ + bevy_app::{App, Plugin, PostUpdate}, + bevy_diagnostic::{Diagnostic, DiagnosticPath, Diagnostics, RegisterDiagnostic}, + bevy_ecs::system::Res, + bevy_reflect::PartialReflect, }; +use bevy_ecs::{resource::Resource, system::ResMut}; +use bevy_platform::collections::HashMap; use parking_lot::{RwLock, RwLockReadGuard, RwLockWriteGuard}; use std::{ cell::UnsafeCell, diff --git a/crates/bevy_mod_scripting_core/src/bindings/function/arg_meta.rs b/crates/bevy_mod_scripting_core/src/bindings/function/arg_meta.rs index 165ee33f4f..b79fac1015 100644 --- a/crates/bevy_mod_scripting_core/src/bindings/function/arg_meta.rs +++ b/crates/bevy_mod_scripting_core/src/bindings/function/arg_meta.rs @@ -2,9 +2,12 @@ use std::{ffi::OsString, path::PathBuf}; +use bevy_platform::collections::HashMap; + use crate::{ bindings::{ReflectReference, ScriptValue}, - docgen::TypedThrough, error::InteropError, + docgen::TypedThrough, + error::InteropError, }; use super::{ @@ -88,6 +91,7 @@ impl ArgMeta for Option { impl ArgMeta for Vec {} impl ArgMeta for [T; N] {} +impl ArgMeta for HashMap {} impl ArgMeta for std::collections::HashMap {} impl_arg_info!(DynamicScriptFunction, DynamicScriptFunctionMut); 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 c07b25921c..3cb1d933cd 100644 --- a/crates/bevy_mod_scripting_core/src/bindings/function/from.rs +++ b/crates/bevy_mod_scripting_core/src/bindings/function/from.rs @@ -1,11 +1,12 @@ //! This module contains the [`FromScript`] trait and its implemenations. use crate::{ - bindings::{access_map::ReflectAccessId, ReflectReference, WorldGuard}, - error::InteropError, ScriptValue, + bindings::{ReflectReference, WorldGuard, access_map::ReflectAccessId}, + error::InteropError, }; -use bevy::reflect::{FromReflect, Reflect}; +use bevy_platform::collections::HashMap; +use bevy_reflect::{FromReflect, Reflect}; use std::{ any::TypeId, ffi::OsString, @@ -91,7 +92,9 @@ macro_rules! impl_from_with_downcast { }; } -impl_from_with_downcast!(i8, i16, i32, i64, i128, u8, u16, u32, u64, u128, f32, f64, usize, isize); +impl_from_with_downcast!( + i8, i16, i32, i64, i128, u8, u16, u32, u64, u128, f32, f64, usize, isize +); macro_rules! impl_from_stringlike { ($($ty:ty),*) => { @@ -449,39 +452,46 @@ impl FromScript for DynamicScriptFunction { } } -#[profiling::all_functions] -impl FromScript for std::collections::HashMap -where - V: FromScript + 'static, - for<'w> V::This<'w>: Into, -{ - type This<'w> = Self; - #[profiling::function] - fn from_script(value: ScriptValue, world: WorldGuard) -> Result { - match value { - ScriptValue::Map(map) => { - let mut hashmap = std::collections::HashMap::new(); - for (key, value) in map { - hashmap.insert(key, V::from_script(value, world.clone())?.into()); - } - Ok(hashmap) - } - ScriptValue::List(list) => { - let mut hashmap = std::collections::HashMap::new(); - for elem in list { - let (key, val) = <(String, V)>::from_script(elem, world.clone())?; - hashmap.insert(key, val); +macro_rules! impl_from_script_hashmap { + ($hashmap_type:path) => { + #[profiling::all_functions] + impl FromScript for $hashmap_type + where + V: FromScript + 'static, + for<'w> V::This<'w>: Into, + { + type This<'w> = Self; + #[profiling::function] + fn from_script(value: ScriptValue, world: WorldGuard) -> Result { + match value { + ScriptValue::Map(map) => { + let mut hashmap = <$hashmap_type>::new(); + for (key, value) in map { + hashmap.insert(key, V::from_script(value, world.clone())?.into()); + } + Ok(hashmap) + } + ScriptValue::List(list) => { + let mut hashmap = <$hashmap_type>::new(); + for elem in list { + let (key, val) = <(String, V)>::from_script(elem, world.clone())?; + hashmap.insert(key, val); + } + Ok(hashmap) + } + _ => Err(InteropError::value_mismatch( + std::any::TypeId::of::<$hashmap_type>(), + value, + )), } - Ok(hashmap) } - _ => Err(InteropError::value_mismatch( - std::any::TypeId::of::>(), - value, - )), } - } + }; } +impl_from_script_hashmap!(HashMap); +impl_from_script_hashmap!(std::collections::HashMap); + /// A union of two or more (by nesting unions) types. pub struct Union(Result); diff --git a/crates/bevy_mod_scripting_core/src/bindings/function/from_ref.rs b/crates/bevy_mod_scripting_core/src/bindings/function/from_ref.rs index e5fcbea798..dd07092f94 100644 --- a/crates/bevy_mod_scripting_core/src/bindings/function/from_ref.rs +++ b/crates/bevy_mod_scripting_core/src/bindings/function/from_ref.rs @@ -6,7 +6,7 @@ use crate::{ error::InteropError, reflection_extensions::TypeInfoExtensions, }; -use bevy::reflect::{ +use bevy_reflect::{ DynamicEnum, DynamicList, DynamicMap, DynamicTuple, DynamicVariant, Map, PartialReflect, }; use std::{any::TypeId, ffi::OsString, path::PathBuf}; 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 fd48053c1e..c56c9c5821 100644 --- a/crates/bevy_mod_scripting_core/src/bindings/function/into.rs +++ b/crates/bevy_mod_scripting_core/src/bindings/function/into.rs @@ -1,13 +1,13 @@ //! Implementations of the [`IntoScript`] trait for various types. -use bevy::reflect::Reflect; -use std::{borrow::Cow, collections::HashMap, ffi::OsString, path::PathBuf}; - use super::{DynamicScriptFunction, DynamicScriptFunctionMut, Union, Val}; use crate::{ bindings::{ReflectReference, ScriptValue, WorldGuard}, error::InteropError, }; +use bevy_platform::collections::HashMap; +use bevy_reflect::Reflect; +use std::{borrow::Cow, ffi::OsString, path::PathBuf}; /// Converts a value into a [`ScriptValue`]. pub trait IntoScript { @@ -179,6 +179,17 @@ impl IntoScript for HashMap { } } +#[profiling::all_functions] +impl IntoScript for std::collections::HashMap { + fn into_script(self, world: WorldGuard) -> Result { + let mut map = HashMap::new(); + for (key, value) in self { + map.insert(key, value.into_script(world.clone())?); + } + Ok(ScriptValue::Map(map)) + } +} + #[profiling::all_functions] impl IntoScript for InteropError { fn into_script(self, _world: WorldGuard) -> Result { diff --git a/crates/bevy_mod_scripting_core/src/bindings/function/into_ref.rs b/crates/bevy_mod_scripting_core/src/bindings/function/into_ref.rs index ca29e7c8f5..8d29f45722 100644 --- a/crates/bevy_mod_scripting_core/src/bindings/function/into_ref.rs +++ b/crates/bevy_mod_scripting_core/src/bindings/function/into_ref.rs @@ -2,7 +2,7 @@ use std::{borrow::Cow, ffi::OsString, path::PathBuf}; -use bevy::reflect::{Access, PartialReflect}; +use bevy_reflect::{Access, PartialReflect}; use crate::{ bindings::{function::into::IntoScript, ReflectReference, WorldGuard}, diff --git a/crates/bevy_mod_scripting_core/src/bindings/function/magic_functions.rs b/crates/bevy_mod_scripting_core/src/bindings/function/magic_functions.rs index fd54390373..430f0047f8 100644 --- a/crates/bevy_mod_scripting_core/src/bindings/function/magic_functions.rs +++ b/crates/bevy_mod_scripting_core/src/bindings/function/magic_functions.rs @@ -5,7 +5,7 @@ use crate::{ error::InteropError, reflection_extensions::TypeIdExtensions, }; -use bevy::reflect::{ParsedPath, PartialReflect}; +use bevy_reflect::{ParsedPath, PartialReflect}; /// A list of magic methods, these only have one replacable implementation, and apply to all `ReflectReferences`. /// It's up to the language implementer to call these in the right order (after any type specific overrides). diff --git a/crates/bevy_mod_scripting_core/src/bindings/function/mod.rs b/crates/bevy_mod_scripting_core/src/bindings/function/mod.rs index c8a33cee8e..8d239ae12e 100644 --- a/crates/bevy_mod_scripting_core/src/bindings/function/mod.rs +++ b/crates/bevy_mod_scripting_core/src/bindings/function/mod.rs @@ -15,8 +15,10 @@ crate::private::export_all_in_modules! { #[cfg(test)] #[allow(dead_code)] mod test { - use bevy::reflect::{FromReflect, GetTypeRegistration, Reflect, Typed}; + use bevy_ecs::world::World; use bevy_mod_scripting_derive::script_bindings; + use bevy_platform::collections::HashMap; + use bevy_reflect::{FromReflect, GetTypeRegistration, Reflect, Typed}; use crate::bindings::{ function::{ @@ -28,7 +30,7 @@ mod test { }; use super::arg_meta::{ScriptArgument, ScriptReturn, TypedScriptArgument, TypedScriptReturn}; - + use bevy_ecs::prelude::AppTypeRegistry; #[test] fn test_macro_generates_correct_registrator_function() { #[derive(Reflect)] @@ -40,7 +42,7 @@ mod test { fn test_fn(_self: Ref, mut _arg1: usize) {} } - let mut test_world = bevy::ecs::world::World::default(); + let mut test_world = World::default(); register_test_fn(&mut test_world); @@ -190,7 +192,7 @@ mod test { V::Underlying: FromReflect + Typed + GetTypeRegistration + Eq, for<'a> V::This<'a>: Into, { - test_is_valid_arg_and_return::>(); + test_is_valid_arg_and_return::>(); } } diff --git a/crates/bevy_mod_scripting_core/src/bindings/function/namespace.rs b/crates/bevy_mod_scripting_core/src/bindings/function/namespace.rs index 203cf94bf6..65d08c02e9 100644 --- a/crates/bevy_mod_scripting_core/src/bindings/function/namespace.rs +++ b/crates/bevy_mod_scripting_core/src/bindings/function/namespace.rs @@ -4,10 +4,8 @@ use crate::{ bindings::function::script_function::{AppScriptFunctionRegistry, ScriptFunction}, docgen::info::GetFunctionInfo, }; -use bevy::{ - prelude::{AppTypeRegistry, World}, - reflect::{GetTypeRegistration, Reflect}, -}; +use ::bevy_reflect::{GetTypeRegistration, Reflect}; +use bevy_ecs::{reflect::AppTypeRegistry, world::World}; use std::{any::TypeId, borrow::Cow, marker::PhantomData}; use super::type_dependencies::GetFunctionTypeDependencies; 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 6105ad3d4b..b243294b79 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 @@ -6,18 +6,20 @@ use crate::asset::Language; use crate::bindings::function::arg_meta::ArgMeta; use crate::docgen::info::{FunctionInfo, GetFunctionInfo}; use crate::{ + ScriptValue, bindings::{ThreadWorldContainer, WorldContainer, WorldGuard}, error::InteropError, - ScriptValue, }; -use bevy::platform::collections::HashMap; -use bevy::prelude::{Reflect, Resource}; +use bevy_ecs::prelude::Resource; +use bevy_platform::collections::HashMap; +use bevy_reflect::Reflect; use parking_lot::{RwLock, RwLockReadGuard, RwLockWriteGuard}; use std::borrow::Cow; use std::collections::VecDeque; use std::hash::Hash; use std::ops::{Deref, DerefMut}; use std::sync::Arc; + #[diagnostic::on_unimplemented( message = "This function does not fulfil the requirements to be a script callable function. All arguments must implement the ScriptArgument trait and all return values must implement the ScriptReturn trait", note = "If you're trying to return a non-primitive type, you might need to use Val Ref or Mut wrappers" @@ -626,10 +628,11 @@ variadics_please::all_tuples!(impl_script_function, 0, 13, T); #[cfg(test)] mod test { - use super::*; + use super::*; + use bevy_ecs::{prelude::Component, world::World}; - fn with_local_world(f: F) { - let mut world = bevy::prelude::World::default(); + fn with_local_world(f: F) { + let mut world = World::default(); WorldGuard::with_static_guard(&mut world, |world| { ThreadWorldContainer.set_world(world).unwrap(); f() @@ -693,7 +696,7 @@ mod test { #[test] fn test_interrupted_call_releases_access_scope() { - #[derive(bevy::prelude::Component, Reflect)] + #[derive(Component, Reflect)] struct Comp; let fn_ = |_a: crate::bindings::function::from::Mut| 0usize; 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 e02dc601af..dd5b85f8ff 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,17 +1,19 @@ //! This module contains the [`GetTypeDependencies`] trait and its implementations for various types. use super::{ - from::{Mut, Ref, Union, Val}, - script_function::FunctionCallContext, DynamicScriptFunction, DynamicScriptFunctionMut, + DynamicScriptFunction, DynamicScriptFunctionMut, + from::{Mut, Ref, Union, Val}, + script_function::FunctionCallContext, }; use crate::{ - bindings::{ReflectReference, ScriptValue}, error::InteropError} -; -use bevy::reflect::{FromReflect, GetTypeRegistration, TypeRegistry, Typed}; + bindings::{ReflectReference, ScriptValue}, + error::InteropError, +}; use bevy_mod_scripting_derive::impl_get_type_dependencies; -use std::{collections::HashMap, ffi::OsString, hash::Hash, path::PathBuf}; - - +use bevy_platform::collections::HashMap; +use bevy_reflect::{FromReflect, GetTypeRegistration, TypeRegistry, Typed}; +use std::collections::HashMap as StdHashMap; +use std::{ffi::OsString, hash::Hash, path::PathBuf}; macro_rules! impl_get_type_dependencies_primitives { ($($ty:ty),*) => { @@ -26,12 +28,31 @@ macro_rules! impl_get_type_dependencies_primitives { } impl_get_type_dependencies_primitives!( - i8, i16, i32, i64, i128, u8, u16, u32, u64, u128, usize, isize, f32, f64, bool, - ScriptValue, DynamicScriptFunction, DynamicScriptFunctionMut, InteropError, - String, PathBuf, OsString, char + i8, + i16, + i32, + i64, + i128, + u8, + u16, + u32, + u64, + u128, + usize, + isize, + f32, + f64, + bool, + ScriptValue, + DynamicScriptFunction, + DynamicScriptFunctionMut, + InteropError, + String, + PathBuf, + OsString, + char ); - impl GetTypeDependencies for () { type Underlying = (); fn register_type_dependencies(registry: &mut TypeRegistry) { @@ -58,75 +79,91 @@ pub trait GetTypeDependencies { impl_get_type_dependencies!( #[derive(GetTypeDependencies)] - #[get_type_dependencies(bms_core_path="crate")] - struct HashMap where + #[get_type_dependencies(bms_core_path = "crate")] + struct HashMap + where K::Underlying: FromReflect + Eq + Hash + Typed, - V::Underlying: FromReflect + Typed {} + V::Underlying: FromReflect + Typed, {} ); impl_get_type_dependencies!( #[derive(GetTypeDependencies)] - #[get_type_dependencies(bms_core_path="crate")] - struct Result where - T::Underlying: FromReflect + Typed, - E::Underlying: FromReflect + Typed {} + #[get_type_dependencies(bms_core_path = "crate")] + struct StdHashMap + where + K::Underlying: FromReflect + Eq + Hash + Typed, + V::Underlying: FromReflect + Typed, {} ); impl_get_type_dependencies!( #[derive(GetTypeDependencies)] - #[get_type_dependencies(bms_core_path="crate")] - struct Option where - T::Underlying: FromReflect + Typed {} + #[get_type_dependencies(bms_core_path = "crate")] + struct Result + where + T::Underlying: FromReflect + Typed, + E::Underlying: FromReflect + Typed, {} ); impl_get_type_dependencies!( #[derive(GetTypeDependencies)] - #[get_type_dependencies(bms_core_path="crate")] - struct Vec where - T::Underlying: FromReflect + Typed {} + #[get_type_dependencies(bms_core_path = "crate")] + struct Option + where + T::Underlying: FromReflect + Typed, {} ); +impl_get_type_dependencies!( + #[derive(GetTypeDependencies)] + #[get_type_dependencies(bms_core_path = "crate")] + struct Vec + where + T::Underlying: FromReflect + Typed, {} +); impl_get_type_dependencies!( #[derive(GetTypeDependencies)] - #[get_type_dependencies(bms_core_path="crate", underlying="Result")] - struct Union where + #[get_type_dependencies( + bms_core_path = "crate", + underlying = "Result" + )] + struct Union + where T1::Underlying: FromReflect + Typed, - T2::Underlying: FromReflect + Typed {} + T2::Underlying: FromReflect + Typed, {} ); impl_get_type_dependencies!( #[derive(GetTypeDependencies)] - #[get_type_dependencies(bms_core_path="crate", underlying="T", dont_recurse)] + #[get_type_dependencies(bms_core_path = "crate", underlying = "T", dont_recurse)] struct Val {} ); impl_get_type_dependencies!( #[derive(GetTypeDependencies)] - #[get_type_dependencies(bms_core_path="crate", underlying="T", dont_recurse)] + #[get_type_dependencies(bms_core_path = "crate", underlying = "T", dont_recurse)] struct Ref<'a, T> {} ); impl_get_type_dependencies!( #[derive(GetTypeDependencies)] - #[get_type_dependencies(bms_core_path="crate", underlying="T", dont_recurse)] + #[get_type_dependencies(bms_core_path = "crate", underlying = "T", dont_recurse)] struct Mut<'a, T> {} ); impl_get_type_dependencies!( #[derive(GetTypeDependencies)] - #[get_type_dependencies(bms_core_path="crate")] - struct ReflectReference where {} + #[get_type_dependencies(bms_core_path = "crate")] + struct ReflectReference {} ); impl_get_type_dependencies!( #[derive(GetTypeDependencies)] - #[get_type_dependencies(bms_core_path="crate")] - struct FunctionCallContext where {} + #[get_type_dependencies(bms_core_path = "crate")] + struct FunctionCallContext {} ); - -impl GetTypeDependencies for [T; N] where +impl GetTypeDependencies for [T; N] +where T: GetTypeDependencies, T::Underlying: FromReflect + Typed, { @@ -138,7 +175,7 @@ impl GetTypeDependencies for [T; N] where macro_rules! register_tuple_dependencies { ($($param:ident),*) => { - impl <$($param),*> $crate::bindings::GetTypeDependencies for ($($param,)*) where + impl <$($param),*> $crate::bindings::GetTypeDependencies for ($($param,)*) where $( $param: GetTypeDependencies, <$param>::Underlying: FromReflect + Typed + GetTypeRegistration, @@ -155,7 +192,6 @@ macro_rules! register_tuple_dependencies { }; } - 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 @@ -166,7 +202,7 @@ pub trait GetFunctionTypeDependencies { macro_rules! impl_script_function_type_dependencies{ ($( $param:ident ),* ) => { - impl GetFunctionTypeDependencies O> for F where + impl GetFunctionTypeDependencies O> for F where O: GetTypeDependencies, F: Fn( $( $param ),* ) -> O, $( diff --git a/crates/bevy_mod_scripting_core/src/bindings/globals/core.rs b/crates/bevy_mod_scripting_core/src/bindings/globals/core.rs index 23de84eb48..72cd9cdd49 100644 --- a/crates/bevy_mod_scripting_core/src/bindings/globals/core.rs +++ b/crates/bevy_mod_scripting_core/src/bindings/globals/core.rs @@ -1,21 +1,22 @@ //! Core globals exposed by the BMS framework -use std::{cell::RefCell, collections::HashMap, sync::Arc}; - -use bevy::{ - app::Plugin, - asset::Handle, - ecs::{entity::Entity, reflect::AppTypeRegistry, world::World}, - reflect::TypeRegistration, +use ::{ + bevy_app::Plugin, + bevy_asset::Handle, + bevy_ecs::{entity::Entity, reflect::AppTypeRegistry, world::World}, + bevy_reflect::TypeRegistration, }; +use bevy_app::App; use bevy_mod_scripting_derive::script_globals; +use bevy_platform::collections::HashMap; +use std::{cell::RefCell, sync::Arc}; use crate::{ asset::ScriptAsset, bindings::{ - function::from::{Union, Val}, ScriptComponentRegistration, ScriptResourceRegistration, ScriptTypeRegistration, WorldGuard, + function::from::{Union, Val}, }, docgen::into_through_type_info, error::InteropError, @@ -51,10 +52,10 @@ thread_local! { } impl Plugin for CoreScriptGlobalsPlugin { - fn build(&self, app: &mut bevy::app::App) { + fn build(&self, app: &mut App) { app.init_resource::(); } - fn finish(&self, app: &mut bevy::app::App) { + fn finish(&self, app: &mut App) { // profiling::function_scope!("app finish"); if self.register_static_references { @@ -68,10 +69,7 @@ impl Plugin for CoreScriptGlobalsPlugin { } #[profiling::function] -fn register_static_core_globals( - world: &mut bevy::ecs::world::World, - filter: fn(&TypeRegistration) -> bool, -) { +fn register_static_core_globals(world: &mut World, filter: fn(&TypeRegistration) -> bool) { let global_registry = world .get_resource_or_init::() .clone(); @@ -144,7 +142,7 @@ impl CoreGlobals { #[cfg(test)] mod test { use super::*; - use bevy::{app::App, reflect::Reflect}; + use ::{bevy_app::App, bevy_reflect::Reflect}; #[test] fn test_register_globals() { 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 8fd06673b3..c1c983d235 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::{ + WorldGuard, function::arg_meta::{ScriptReturn, TypedScriptReturn}, script_value::ScriptValue, - WorldGuard, }; use crate::{ - docgen::{into_through_type_info, typed_through::ThroughTypeInfo, TypedThrough}, + docgen::{TypedThrough, into_through_type_info, typed_through::ThroughTypeInfo}, error::InteropError, }; -use bevy::{platform::collections::HashMap, prelude::Resource, reflect::Typed}; +use ::{bevy_ecs::resource::Resource, bevy_platform::collections::HashMap, bevy_reflect::Typed}; use parking_lot::{RwLock, RwLockReadGuard, RwLockWriteGuard}; use std::{any::TypeId, borrow::Cow, sync::Arc}; @@ -251,7 +251,7 @@ impl ScriptGlobalsRegistry { #[cfg(test)] mod test { - use bevy::ecs::world::World; + use bevy_ecs::world::World; use super::*; @@ -294,9 +294,11 @@ mod test { let maker = |_: WorldGuard| Ok(ScriptValue::from(42)); - assert!(registry - .register_documented(Cow::Borrowed("foo"), maker, Cow::Borrowed("This is a test")) - .is_none()); + assert!( + registry + .register_documented(Cow::Borrowed("foo"), maker, Cow::Borrowed("This is a test")) + .is_none() + ); let global = registry.get("foo").unwrap(); assert_eq!(global.documentation.as_deref(), Some("This is a test")); diff --git a/crates/bevy_mod_scripting_core/src/bindings/pretty_print.rs b/crates/bevy_mod_scripting_core/src/bindings/pretty_print.rs index 80b666039c..1f6eddb3a8 100644 --- a/crates/bevy_mod_scripting_core/src/bindings/pretty_print.rs +++ b/crates/bevy_mod_scripting_core/src/bindings/pretty_print.rs @@ -3,14 +3,16 @@ use crate::reflection_extensions::{FakeType, TypeIdExtensions}; use crate::bindings::{ - access_map::ReflectAccessId, script_value::ScriptValue, ReflectAllocationId, ReflectBase, - ReflectBaseType, ReflectReference, WorldGuard, + ReflectAllocationId, ReflectBase, ReflectBaseType, ReflectReference, WorldGuard, + access_map::ReflectAccessId, script_value::ScriptValue, }; -use bevy::{ - ecs::component::ComponentId, - prelude::World, - reflect::{PartialReflect, ReflectRef}, +use ::{ + bevy_ecs::component::ComponentId, + bevy_reflect::{PartialReflect, ReflectRef}, }; +use bevy_ecs::world::World; +use bevy_platform::collections::HashMap; +use bevy_reflect::VariantType; use itertools::Itertools; use std::{ any::{Any, TypeId}, @@ -237,7 +239,7 @@ impl ReflectReferencePrinter { fn pretty_print_value_inner(&self, v: &dyn PartialReflect, output: &mut String) { match v.reflect_ref() { - bevy::reflect::ReflectRef::Struct(s) => { + ReflectRef::Struct(s) => { let field_names = s .get_represented_struct_info() .map(|info| info.field_names()) @@ -301,7 +303,7 @@ impl ReflectReferencePrinter { ReflectRef::Enum(e) => { output.push_str(&e.variant_path()); let bracket_type = match e.variant_type() { - bevy::reflect::VariantType::Tuple => BracketType::Round, + VariantType::Tuple => BracketType::Round, _ => BracketType::Curly, }; let key_vals = e.iter_fields().map(|v| { @@ -603,63 +605,74 @@ impl DisplayWithWorld for String { self.to_string() } } -#[profiling::all_functions] -impl DisplayWithWorld - for std::collections::HashMap -{ - fn display_with_world(&self, world: WorldGuard) -> String { - let mut string = String::new(); - BracketType::Curly.surrounded(&mut string, |string| { - for (i, (k, v)) in self.iter().enumerate() { - string.push_str(&k.display_with_world(world.clone())); - string.push_str(": "); - string.push_str(&v.display_with_world(world.clone())); - if i != self.len() - 1 { - string.push_str(", "); - } + +/// Implements DisplayWithWorld for a HashMap-like type that has key-value pairs +/// and supports iter() and len() methods. +macro_rules! impl_display_with_world_for_map { + ($map_type:path) => { + #[profiling::all_functions] + impl DisplayWithWorld + for $map_type + { + fn display_with_world(&self, world: WorldGuard) -> String { + let mut string = String::new(); + BracketType::Curly.surrounded(&mut string, |string| { + for (i, (k, v)) in self.iter().enumerate() { + string.push_str(&k.display_with_world(world.clone())); + string.push_str(": "); + string.push_str(&v.display_with_world(world.clone())); + if i != self.len() - 1 { + string.push_str(", "); + } + } + }); + string } - }); - string - } - fn display_value_with_world(&self, world: WorldGuard) -> String { - let mut string = String::new(); - BracketType::Curly.surrounded(&mut string, |string| { - for (i, (k, v)) in self.iter().enumerate() { - string.push_str(&k.display_value_with_world(world.clone())); - string.push_str(": "); - string.push_str(&v.display_value_with_world(world.clone())); - if i != self.len() - 1 { - string.push_str(", "); - } + fn display_value_with_world(&self, world: WorldGuard) -> String { + let mut string = String::new(); + BracketType::Curly.surrounded(&mut string, |string| { + for (i, (k, v)) in self.iter().enumerate() { + string.push_str(&k.display_value_with_world(world.clone())); + string.push_str(": "); + string.push_str(&v.display_value_with_world(world.clone())); + if i != self.len() - 1 { + string.push_str(", "); + } + } + }); + string } - }); - string - } - fn display_without_world(&self) -> String { - let mut string = String::new(); - BracketType::Curly.surrounded(&mut string, |string| { - for (i, (k, v)) in self.iter().enumerate() { - string.push_str(&k.display_without_world()); - string.push_str(": "); - string.push_str(&v.display_without_world()); - if i != self.len() - 1 { - string.push_str(", "); - } + fn display_without_world(&self) -> String { + let mut string = String::new(); + BracketType::Curly.surrounded(&mut string, |string| { + for (i, (k, v)) in self.iter().enumerate() { + string.push_str(&k.display_without_world()); + string.push_str(": "); + string.push_str(&v.display_without_world()); + if i != self.len() - 1 { + string.push_str(", "); + } + } + }); + string } - }); - string - } + } + }; } +impl_display_with_world_for_map!(HashMap); +impl_display_with_world_for_map!(std::collections::HashMap); + #[cfg(test)] mod test { - use bevy::{prelude::AppTypeRegistry, reflect::Reflect}; + use bevy_ecs::reflect::AppTypeRegistry; + use bevy_reflect::Reflect; use crate::bindings::{ - function::script_function::AppScriptFunctionRegistry, AppReflectAllocator, - ReflectAllocationId, + AppReflectAllocator, ReflectAllocationId, + function::script_function::AppScriptFunctionRegistry, }; use super::*; @@ -772,7 +785,7 @@ mod test { let mut world = setup_world(); let world = WorldGuard::new_exclusive(&mut world); - let mut map = std::collections::HashMap::new(); + let mut map = HashMap::new(); map.insert("hello".to_owned(), ScriptValue::Bool(true)); assert_eq!(map.display_with_world(world.clone()), "{hello: true}"); diff --git a/crates/bevy_mod_scripting_core/src/bindings/query.rs b/crates/bevy_mod_scripting_core/src/bindings/query.rs index b13fe9f63a..749d6c7e07 100644 --- a/crates/bevy_mod_scripting_core/src/bindings/query.rs +++ b/crates/bevy_mod_scripting_core/src/bindings/query.rs @@ -1,18 +1,18 @@ //! Utilities for querying the world. -use super::{with_global_access, DynamicComponent, ReflectReference, WorldAccessGuard, WorldGuard}; +use bevy_ecs::{ptr::OwningPtr, query::QueryBuilder, world::EntityRef}; + +use super::{DynamicComponent, ReflectReference, WorldAccessGuard, WorldGuard, with_global_access}; use crate::error::InteropError; -use bevy::{ - ecs::{ +use ::{ + bevy_ecs::{ component::ComponentId, entity::Entity, query::{QueryData, QueryState}, reflect::ReflectComponent, world::World, }, - prelude::{EntityRef, QueryBuilder}, - ptr::OwningPtr, - reflect::{ParsedPath, Reflect, TypeRegistration}, + bevy_reflect::{ParsedPath, Reflect, TypeRegistration}, }; use std::{any::TypeId, collections::VecDeque, ptr::NonNull, sync::Arc}; diff --git a/crates/bevy_mod_scripting_core/src/bindings/reference.rs b/crates/bevy_mod_scripting_core/src/bindings/reference.rs index 2e9a02f833..1a4eb318fa 100644 --- a/crates/bevy_mod_scripting_core/src/bindings/reference.rs +++ b/crates/bevy_mod_scripting_core/src/bindings/reference.rs @@ -11,15 +11,17 @@ use crate::{ error::InteropError, reflection_extensions::{PartialReflectExt, TypeIdExtensions}, }; -use bevy::{ - ecs::{ +use ::{ + bevy_ecs::{ change_detection::MutUntyped, component::ComponentId, entity::Entity, world::unsafe_world_cell::UnsafeWorldCell, }, - prelude::{Component, ReflectDefault, Resource}, - ptr::Ptr, - reflect::{ParsedPath, PartialReflect, Reflect, ReflectFromPtr, ReflectPath}, + bevy_reflect::{ + ParsedPath, PartialReflect, Reflect, ReflectFromPtr, ReflectPath, prelude::ReflectDefault, + }, }; +use bevy_ecs::{component::Component, ptr::Ptr, resource::Resource}; +use bevy_reflect::{Access, OffsetAccess, ReflectRef}; use std::{any::TypeId, fmt::Debug}; /// A reference to an arbitrary reflected instance. @@ -85,14 +87,14 @@ impl ReflectReference { /// If this is a reference to something with a length accessible via reflection, returns that length. pub fn len(&self, world: WorldGuard) -> Result, InteropError> { self.with_reflect(world, |r| match r.reflect_ref() { - bevy::reflect::ReflectRef::Struct(s) => Some(s.field_len()), - bevy::reflect::ReflectRef::TupleStruct(ts) => Some(ts.field_len()), - bevy::reflect::ReflectRef::Tuple(t) => Some(t.field_len()), - bevy::reflect::ReflectRef::List(l) => Some(l.len()), - bevy::reflect::ReflectRef::Array(a) => Some(a.len()), - bevy::reflect::ReflectRef::Map(m) => Some(m.len()), - bevy::reflect::ReflectRef::Set(s) => Some(s.len()), - bevy::reflect::ReflectRef::Enum(e) => Some(e.field_len()), + ReflectRef::Struct(s) => Some(s.field_len()), + ReflectRef::TupleStruct(ts) => Some(ts.field_len()), + ReflectRef::Tuple(t) => Some(t.field_len()), + ReflectRef::List(l) => Some(l.len()), + ReflectRef::Array(a) => Some(a.len()), + ReflectRef::Map(m) => Some(m.len()), + ReflectRef::Set(s) => Some(s.len()), + ReflectRef::Enum(e) => Some(e.field_len()), _ => None, }) } @@ -543,16 +545,16 @@ pub trait ReflectionPathExt { /// Returns true if the path is empty fn is_empty(&self) -> bool; /// Returns an iterator over the accesses - fn iter(&self) -> impl Iterator; + fn iter(&self) -> impl Iterator; } #[profiling::all_functions] impl ReflectionPathExt for ParsedPath { /// Assumes the accesses are 1 indexed and converts them to 0 indexed fn convert_to_0_indexed(&mut self) { self.0.iter_mut().for_each(|a| match a.access { - bevy::reflect::Access::FieldIndex(ref mut i) => *i -= 1, - bevy::reflect::Access::TupleIndex(ref mut i) => *i -= 1, - bevy::reflect::Access::ListIndex(ref mut i) => *i -= 1, + Access::FieldIndex(ref mut i) => *i -= 1, + Access::TupleIndex(ref mut i) => *i -= 1, + Access::ListIndex(ref mut i) => *i -= 1, _ => {} }); } @@ -561,7 +563,7 @@ impl ReflectionPathExt for ParsedPath { self.0.is_empty() } - fn iter(&self) -> impl Iterator { + fn iter(&self) -> impl Iterator { self.0.iter() } } @@ -615,8 +617,8 @@ impl ReflectRefIter { } } -const fn list_index_access(index: usize) -> bevy::reflect::Access<'static> { - bevy::reflect::Access::ListIndex(index) +const fn list_index_access(index: usize) -> Access<'static> { + Access::ListIndex(index) } #[profiling::all_functions] impl Iterator for ReflectRefIter { @@ -641,7 +643,9 @@ impl Iterator for ReflectRefIter { #[cfg(test)] mod test { - use bevy::prelude::{AppTypeRegistry, World}; + use bevy_ecs::{ + component::Component, reflect::AppTypeRegistry, resource::Resource, world::World, + }; use crate::bindings::{ AppReflectAllocator, function::script_function::AppScriptFunctionRegistry, @@ -650,10 +654,10 @@ mod test { use super::*; #[derive(Reflect, Component, Debug, Clone, PartialEq)] - struct Component(Vec); + struct TestComponent(Vec); #[derive(Reflect, Resource, Debug, Clone, PartialEq)] - struct Resource(Vec); + struct TestResource(Vec); fn setup_world() -> World { let mut world = World::default(); @@ -661,8 +665,8 @@ mod test { let type_registry = AppTypeRegistry::default(); { let mut guard_type_registry = type_registry.write(); - guard_type_registry.register::(); - guard_type_registry.register::(); + guard_type_registry.register::(); + guard_type_registry.register::(); } world.insert_resource(type_registry); @@ -681,13 +685,13 @@ mod test { let mut world = setup_world(); let entity = world - .spawn(Component(vec!["hello".to_owned(), "world".to_owned()])) + .spawn(TestComponent(vec!["hello".to_owned(), "world".to_owned()])) .id(); let world_guard = WorldGuard::new_exclusive(&mut world); let mut component_ref = - ReflectReference::new_component_ref::(entity, world_guard.clone()) + ReflectReference::new_component_ref::(entity, world_guard.clone()) .expect("could not create component reference"); // index into component @@ -696,13 +700,16 @@ mod test { .tail_type_id(world_guard.clone()) .unwrap() .unwrap(), - TypeId::of::() + TypeId::of::() ); component_ref .with_reflect(world_guard.clone(), |s| { - let s = s.try_downcast_ref::().unwrap(); - assert_eq!(s, &Component(vec!["hello".to_owned(), "world".to_owned()])); + let s = s.try_downcast_ref::().unwrap(); + assert_eq!( + s, + &TestComponent(vec!["hello".to_owned(), "world".to_owned()]) + ); }) .unwrap(); @@ -762,12 +769,13 @@ mod test { fn test_resource_ref() { let mut world = setup_world(); - world.insert_resource(Resource(vec!["hello".to_owned(), "world".to_owned()])); + world.insert_resource(TestResource(vec!["hello".to_owned(), "world".to_owned()])); let world_guard = WorldGuard::new_exclusive(&mut world); - let mut resource_ref = ReflectReference::new_resource_ref::(world_guard.clone()) - .expect("could not create resource reference"); + let mut resource_ref = + ReflectReference::new_resource_ref::(world_guard.clone()) + .expect("could not create resource reference"); // index into resource assert_eq!( @@ -775,13 +783,16 @@ mod test { .tail_type_id(world_guard.clone()) .unwrap() .unwrap(), - TypeId::of::() + TypeId::of::() ); resource_ref .with_reflect(world_guard.clone(), |s| { - let s = s.try_downcast_ref::().unwrap(); - assert_eq!(s, &Resource(vec!["hello".to_owned(), "world".to_owned()])); + let s = s.try_downcast_ref::().unwrap(); + assert_eq!( + s, + &TestResource(vec!["hello".to_owned(), "world".to_owned()]) + ); }) .unwrap(); @@ -841,7 +852,7 @@ mod test { fn test_allocation_ref() { let mut world = setup_world(); - let value = Component(vec!["hello".to_owned(), "world".to_owned()]); + let value: TestComponent = TestComponent(vec!["hello".to_owned(), "world".to_owned()]); let world_guard = WorldGuard::new_exclusive(&mut world); let allocator = world_guard.allocator(); @@ -855,13 +866,16 @@ mod test { .tail_type_id(world_guard.clone()) .unwrap() .unwrap(), - TypeId::of::() + TypeId::of::() ); allocation_ref .with_reflect(world_guard.clone(), |s| { - let s = s.try_downcast_ref::().unwrap(); - assert_eq!(s, &Component(vec!["hello".to_owned(), "world".to_owned()])); + let s = s.try_downcast_ref::().unwrap(); + assert_eq!( + s, + &TestComponent(vec!["hello".to_owned(), "world".to_owned()]) + ); }) .unwrap(); diff --git a/crates/bevy_mod_scripting_core/src/bindings/schedule.rs b/crates/bevy_mod_scripting_core/src/bindings/schedule.rs index 41a15353fd..7609ecd07c 100644 --- a/crates/bevy_mod_scripting_core/src/bindings/schedule.rs +++ b/crates/bevy_mod_scripting_core/src/bindings/schedule.rs @@ -1,22 +1,23 @@ //! Dynamic scheduling from scripts -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}, - world::World, - }, - prelude::Resource, +use super::{WorldAccessGuard, script_system::ScriptSystemBuilder}; +use crate::{IntoScriptPluginParams, error::InteropError}; +use ::{ + bevy_app::{ + First, FixedFirst, FixedLast, FixedMain, FixedPostUpdate, FixedPreUpdate, FixedUpdate, + Last, PostStartup, PostUpdate, PreStartup, PreUpdate, RunFixedMainLoop, Startup, Update, + }, + bevy_ecs::{ + schedule::{Schedule, ScheduleLabel, Schedules}, + world::World, + }, }; +use bevy_ecs::resource::Resource; +use bevy_log::debug; +use bevy_platform::collections::HashMap; use bevy_system_reflection::{ReflectSchedule, ReflectSystem}; use parking_lot::RwLock; -use std::{any::TypeId, collections::HashMap, sync::Arc}; - +use std::{any::TypeId, sync::Arc}; #[derive(Default, Clone, Resource)] /// A Send + Sync registry of bevy schedules. pub struct AppScheduleRegistry(Arc>); @@ -173,7 +174,7 @@ impl WorldAccessGuard<'_> { schedule: &ReflectSchedule, builder: ScriptSystemBuilder, ) -> Result { - bevy::log::debug!( + debug!( "Adding script system '{}' for script '{}' to schedule '{}'", builder.name, builder.attachment, @@ -191,18 +192,19 @@ impl WorldAccessGuard<'_> { reason = "tests are there but not working currently" )] mod tests { - use bevy::{ - app::Update, - ecs::{ - schedule::{NodeId, Schedules}, - system::IntoSystem, - }, - }; - use test_utils::make_test_plugin; - - use super::*; - - #[test] + use ::{ + bevy_app::{App, Plugin, Update}, + bevy_ecs::{ + entity::Entity, + 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); @@ -230,7 +232,10 @@ mod tests { let system = ReflectSystem::from_system(&system, NodeId::Set(0)); assert_eq!(system.identifier(), "test_system_generic"); - assert_eq!(system.path(), "bevy_mod_scripting_core::bindings::schedule::tests::test_system_generic"); + assert_eq!( + system.path(), + "bevy_mod_scripting_core::bindings::schedule::tests::test_system_generic" + ); let system = IntoSystem::into_system(test_system); let system = ReflectSystem::from_system(&system, NodeId::Set(0)); @@ -279,7 +284,7 @@ mod tests { /// * `expected_nodes` - A slice of node names expected to be present. /// * `expected_edges` - A slice of tuples representing expected edges (from, to). pub fn verify_schedule_graph( - app: &mut bevy::prelude::App, + app: &mut App, schedule_label: T, expected_nodes: &[&str], expected_edges: &[(&str, &str)], 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 b97ad88d46..18725f3d07 100644 --- a/crates/bevy_mod_scripting_core/src/bindings/script_component.rs +++ b/crates/bevy_mod_scripting_core/src/bindings/script_component.rs @@ -2,16 +2,17 @@ use super::{ScriptComponentRegistration, ScriptTypeRegistration, ScriptValue, WorldAccessGuard}; use crate::error::InteropError; -use bevy::{ - app::{App, Plugin}, - ecs::component::{Component, ComponentDescriptor, StorageType, ComponentCloneBehavior, Mutable}, - platform::collections::HashMap, - prelude::Resource, - reflect::{prelude::ReflectDefault, GetTypeRegistration, Reflect}, +use ::{ + bevy_app::{App, Plugin}, + bevy_ecs::component::{ + Component, ComponentCloneBehavior, ComponentDescriptor, Mutable, StorageType, + }, + bevy_reflect::{GetTypeRegistration, Reflect, prelude::ReflectDefault}, }; +use bevy_ecs::resource::Resource; +use bevy_platform::collections::HashMap; use parking_lot::RwLock; use std::{alloc::Layout, mem::needs_drop, sync::Arc}; - /// A dynamic script component #[derive(Reflect, Clone, Default)] #[reflect(Default)] @@ -136,10 +137,11 @@ impl Plugin for DynamicScriptComponentPlugin { #[cfg(test)] mod test { - use super::*; - use bevy::ecs::world::World; + use bevy_ecs::world::World; + + use super::*; - #[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 d3a48acd98..443f32cdcc 100644 --- a/crates/bevy_mod_scripting_core/src/bindings/script_system.rs +++ b/crates/bevy_mod_scripting_core/src/bindings/script_system.rs @@ -20,8 +20,8 @@ use crate::{ runtime::RuntimeContainer, script::{ScriptAttachment, ScriptContext}, }; -use bevy::{ - ecs::{ +use ::{ + bevy_ecs::{ archetype::{ArchetypeComponentId, ArchetypeGeneration}, component::{ComponentId, Tick}, entity::Entity, @@ -31,13 +31,21 @@ use bevy::{ system::{IntoSystem, System, SystemParamValidationError}, world::{World, unsafe_world_cell::UnsafeWorldCell}, }, - platform::collections::HashSet, - prelude::IntoScheduleConfigs, - reflect::{OffsetAccess, ParsedPath, Reflect}, + bevy_reflect::{OffsetAccess, ParsedPath, Reflect}, }; +use bevy_app::DynEq; +use bevy_ecs::{ + schedule::{InternedSystemSet, IntoScheduleConfigs}, + system::SystemIn, + world::DeferredWorld, +}; +use bevy_log::{error, info, warn_once}; use bevy_system_reflection::{ReflectSchedule, ReflectSystem}; use parking_lot::Mutex; -use std::{any::TypeId, borrow::Cow, hash::Hash, marker::PhantomData, ops::Deref, sync::Arc}; +use std::{ + any::TypeId, borrow::Cow, collections::HashSet, hash::Hash, marker::PhantomData, ops::Deref, + sync::Arc, +}; #[derive(Clone, Hash, PartialEq, Eq)] /// a system set for script systems. pub struct ScriptSystemSet(Cow<'static, str>); @@ -61,11 +69,11 @@ impl ScriptSystemSet { #[profiling::all_functions] impl SystemSet for ScriptSystemSet { - fn dyn_clone(&self) -> bevy::ecs::label::Box { + fn dyn_clone(&self) -> Box { Box::new(self.clone()) } - fn as_dyn_eq(&self) -> &dyn bevy::ecs::label::DynEq { + fn as_dyn_eq(&self) -> &dyn DynEq { self } @@ -172,11 +180,11 @@ impl ScriptSystemBuilder { { for default_set in other.default_system_sets() { if is_before { - bevy::log::info!("before {default_set:?}"); + info!("before {default_set:?}"); system_config = system_config.before(*default_set); } else { - bevy::log::info!("before {default_set:?}"); - bevy::log::info!("after {default_set:?}"); + info!("before {default_set:?}"); + info!("after {default_set:?}"); system_config = system_config.after(*default_set); } } @@ -372,13 +380,11 @@ impl System for DynamicScriptSystem

{ self.name.clone() } - fn component_access(&self) -> &bevy::ecs::query::Access { + fn component_access(&self) -> &Access { self.component_access_set.combined_access() } - fn archetype_component_access( - &self, - ) -> &bevy::ecs::query::Access { + fn archetype_component_access(&self) -> &Access { &self.archetype_component_access } @@ -396,8 +402,8 @@ impl System for DynamicScriptSystem

{ unsafe fn run_unsafe( &mut self, - _input: bevy::ecs::system::SystemIn<'_, Self>, - world: bevy::ecs::world::unsafe_world_cell::UnsafeWorldCell, + _input: SystemIn<'_, Self>, + world: UnsafeWorldCell, ) -> Self::Out { let _change_tick = world.increment_change_tick(); @@ -495,7 +501,7 @@ impl System for DynamicScriptSystem

{ match result { Ok(_) => {} Err(err) => { - bevy::log::error!( + error!( "Error in dynamic script system `{}`: {}", self.name, err.display_with_world(guard) @@ -503,7 +509,7 @@ impl System for DynamicScriptSystem

{ } } } else { - bevy::log::warn_once!( + warn_once!( "Dynamic script system `{}` could not find script for attachment: {}. It will not run until it's loaded.", self.name, self.target_attachment @@ -511,7 +517,7 @@ impl System for DynamicScriptSystem

{ } } - fn initialize(&mut self, world: &mut bevy::ecs::world::World) { + fn initialize(&mut self, world: &mut World) { // we need to register all the: // - resources, simple just need the component ID's // - queries, more difficult the queries need to be built, and archetype access registered on top of component access @@ -598,10 +604,7 @@ impl System for DynamicScriptSystem

{ }) } - fn update_archetype_component_access( - &mut self, - world: bevy::ecs::world::unsafe_world_cell::UnsafeWorldCell, - ) { + fn update_archetype_component_access(&mut self, world: UnsafeWorldCell) { let archetypes = world.archetypes(); let old_generation = @@ -621,7 +624,7 @@ impl System for DynamicScriptSystem

{ } } - fn check_change_tick(&mut self, change_tick: bevy::ecs::component::Tick) { + fn check_change_tick(&mut self, change_tick: Tick) { let last_run = &mut self.last_run; let this_run = change_tick; @@ -631,17 +634,17 @@ impl System for DynamicScriptSystem

{ } } - fn get_last_run(&self) -> bevy::ecs::component::Tick { + fn get_last_run(&self) -> Tick { self.last_run } - fn set_last_run(&mut self, last_run: bevy::ecs::component::Tick) { + fn set_last_run(&mut self, last_run: Tick) { self.last_run = last_run; } fn apply_deferred(&mut self, _world: &mut World) {} - fn queue_deferred(&mut self, _world: bevy::ecs::world::DeferredWorld) {} + fn queue_deferred(&mut self, _world: DeferredWorld) {} unsafe fn validate_param_unsafe( &mut self, @@ -650,7 +653,7 @@ impl System for DynamicScriptSystem

{ Ok(()) } - fn default_system_sets(&self) -> Vec { + fn default_system_sets(&self) -> Vec { vec![ScriptSystemSet::new(self.name.clone()).intern()] } @@ -670,11 +673,14 @@ impl System for DynamicScriptSystem

{ #[cfg(test)] mod test { - use bevy::{ - app::{App, MainScheduleOrder, Update}, - asset::{AssetId, AssetPlugin, Handle}, - diagnostic::DiagnosticsPlugin, - ecs::schedule::{ScheduleLabel, Schedules}, + use ::{ + bevy_app::{App, MainScheduleOrder, Plugin, Update}, + bevy_asset::{AssetId, AssetPlugin, Handle}, + bevy_diagnostic::DiagnosticsPlugin, + bevy_ecs::{ + entity::Entity, + schedule::{ScheduleLabel, Schedules}, + }, }; use test_utils::make_test_plugin; diff --git a/crates/bevy_mod_scripting_core/src/bindings/script_value.rs b/crates/bevy_mod_scripting_core/src/bindings/script_value.rs index 8ffd24cb57..93ed7e0b5c 100644 --- a/crates/bevy_mod_scripting_core/src/bindings/script_value.rs +++ b/crates/bevy_mod_scripting_core/src/bindings/script_value.rs @@ -1,8 +1,8 @@ //! This module contains the `ScriptValue` enum which is used to pass values between scripting languages and Rust. -use std::{borrow::Cow, collections::HashMap}; - -use bevy::reflect::{OffsetAccess, ParsedPath, Reflect}; +use bevy_platform::collections::HashMap; +use bevy_reflect::{Access, OffsetAccess, ParsedPath, Reflect}; +use std::borrow::Cow; use crate::error::InteropError; @@ -170,7 +170,7 @@ impl TryFrom for ParsedPath { fn try_from(value: ScriptValue) -> Result { Ok(match value { ScriptValue::Integer(i) => ParsedPath::from(vec![OffsetAccess { - access: bevy::reflect::Access::ListIndex(i as usize), + access: Access::ListIndex(i as usize), offset: Some(1), }]), ScriptValue::Float(_) => { @@ -185,7 +185,7 @@ impl TryFrom for ParsedPath { && let Ok(index) = tuple_struct_index.parse::() { let parsed_path = ParsedPath::from(vec![OffsetAccess { - access: bevy::reflect::Access::TupleIndex(index), + access: Access::TupleIndex(index), offset: Some(1), }]); return Ok(parsed_path); @@ -217,21 +217,21 @@ mod test { fn test_script_value_to_parsed_path() { let value = ScriptValue::String("test".into()); let parsed_path = ParsedPath::from(vec![OffsetAccess { - access: bevy::reflect::Access::Field("test".to_owned().into()), + access: Access::Field("test".to_owned().into()), offset: Some(4), }]); assert_eq!(parsed_path, ParsedPath::try_from(value).unwrap()); let value = ScriptValue::String("_0".into()); let parsed_path = ParsedPath::from(vec![OffsetAccess { - access: bevy::reflect::Access::TupleIndex(0), + access: Access::TupleIndex(0), offset: Some(1), }]); assert_eq!(parsed_path, ParsedPath::try_from(value).unwrap()); let value = ScriptValue::Integer(0); let parsed_path = ParsedPath::from(vec![OffsetAccess { - access: bevy::reflect::Access::ListIndex(0), + access: Access::ListIndex(0), offset: Some(1), }]); assert_eq!(parsed_path, ParsedPath::try_from(value).unwrap()); diff --git a/crates/bevy_mod_scripting_core/src/bindings/type_data.rs b/crates/bevy_mod_scripting_core/src/bindings/type_data.rs index dd3b06e12d..ebfb28afe1 100644 --- a/crates/bevy_mod_scripting_core/src/bindings/type_data.rs +++ b/crates/bevy_mod_scripting_core/src/bindings/type_data.rs @@ -1,6 +1,6 @@ //! Contains various `Reflect` type data we use in BMS. -use bevy::reflect::FromType; +use bevy_reflect::FromType; /// A marker type to indicate that a type is generated. /// diff --git a/crates/bevy_mod_scripting_core/src/bindings/world.rs b/crates/bevy_mod_scripting_core/src/bindings/world.rs index 33958eb3b9..2731694abd 100644 --- a/crates/bevy_mod_scripting_core/src/bindings/world.rs +++ b/crates/bevy_mod_scripting_core/src/bindings/world.rs @@ -6,6 +6,9 @@ //! we need wrapper types which have owned and ref variants. use super::{ + AppReflectAllocator, AppScriptComponentRegistry, ReflectBase, ReflectBaseType, + ReflectReference, ScriptComponentRegistration, ScriptResourceRegistration, + ScriptTypeRegistration, Union, access_map::{ AccessCount, AccessMapKey, AnyAccessMap, DynamicSystemMeta, ReflectAccessId, ReflectAccessKind, SubsetAccessMap, @@ -17,9 +20,7 @@ use super::{ pretty_print::DisplayWithWorld, schedule::AppScheduleRegistry, script_value::ScriptValue, - with_global_access, AppReflectAllocator, AppScriptComponentRegistry, ReflectBase, - ReflectBaseType, ReflectReference, ScriptComponentRegistration, ScriptResourceRegistration, - ScriptTypeRegistration, Union, + with_global_access, }; use crate::{ asset::ScriptAsset, @@ -32,33 +33,37 @@ use crate::{ reflection_extensions::PartialReflectExt, script::{ScriptAttachment, ScriptComponent}, }; -use bevy::ecs::{component::Mutable, system::Command}; -use bevy::prelude::{ChildOf, Children}; -use bevy::{ - app::AppExit, - asset::{AssetServer, Handle, LoadState}, - ecs::{ +use ::{ + bevy_app::AppExit, + bevy_asset::{AssetServer, Handle, LoadState}, + bevy_ecs::{ component::{Component, ComponentId}, entity::Entity, prelude::Resource, reflect::{AppTypeRegistry, ReflectFromWorld, ReflectResource}, system::Commands, - world::{unsafe_world_cell::UnsafeWorldCell, CommandQueue, Mut, World}, + world::{CommandQueue, Mut, World, unsafe_world_cell::UnsafeWorldCell}, }, - reflect::{ - std_traits::ReflectDefault, DynamicEnum, DynamicStruct, DynamicTuple, DynamicTupleStruct, - DynamicVariant, ParsedPath, PartialReflect, TypeRegistryArc, + bevy_reflect::{ + DynamicEnum, DynamicStruct, DynamicTuple, DynamicTupleStruct, DynamicVariant, ParsedPath, + PartialReflect, TypeRegistryArc, std_traits::ReflectDefault, }, }; +use bevy_ecs::{ + component::Mutable, + hierarchy::{ChildOf, Children}, + system::Command, +}; +use bevy_platform::collections::HashMap; +use bevy_reflect::{TypeInfo, VariantInfo}; use bevy_system_reflection::ReflectSchedule; use std::{ any::TypeId, borrow::Cow, cell::RefCell, - collections::HashMap, fmt::Debug, rc::Rc, - sync::{atomic::AtomicBool, Arc}, + sync::{Arc, atomic::AtomicBool}, }; /// Prefer to directly using [`WorldAccessGuard`]. If the underlying type changes, this alias will be updated. @@ -697,7 +702,7 @@ impl WorldAccessGuard<'_> { // then build the corresponding dynamic structure, whatever it may be let dynamic: Box = match type_info { - bevy::reflect::TypeInfo::Struct(struct_info) => { + TypeInfo::Struct(struct_info) => { let fields_iter = struct_info .field_names() .iter() @@ -719,7 +724,7 @@ impl WorldAccessGuard<'_> { dynamic.set_represented_type(Some(type_info)); Box::new(dynamic) } - bevy::reflect::TypeInfo::TupleStruct(tuple_struct_info) => { + TypeInfo::TupleStruct(tuple_struct_info) => { let fields_iter = (0..tuple_struct_info.field_len()) .map(|f| { Ok(tuple_struct_info @@ -738,7 +743,7 @@ impl WorldAccessGuard<'_> { dynamic.set_represented_type(Some(type_info)); Box::new(dynamic) } - bevy::reflect::TypeInfo::Tuple(tuple_info) => { + TypeInfo::Tuple(tuple_info) => { let fields_iter = (0..tuple_info.field_len()) .map(|f| { Ok(tuple_info @@ -757,7 +762,7 @@ impl WorldAccessGuard<'_> { dynamic.set_represented_type(Some(type_info)); Box::new(dynamic) } - bevy::reflect::TypeInfo::Enum(enum_info) => { + TypeInfo::Enum(enum_info) => { // extract variant from "variant" let variant = payload.remove("variant").ok_or_else(|| { InteropError::missing_data_in_constructor( @@ -773,7 +778,7 @@ impl WorldAccessGuard<'_> { })?; let variant = match variant { - bevy::reflect::VariantInfo::Struct(struct_variant_info) => { + VariantInfo::Struct(struct_variant_info) => { // same as above struct variant let fields_iter = struct_variant_info .field_names() @@ -796,7 +801,7 @@ impl WorldAccessGuard<'_> { let dynamic = self.construct_dynamic_struct(&mut payload, fields_iter)?; DynamicVariant::Struct(dynamic) } - bevy::reflect::VariantInfo::Tuple(tuple_variant_info) => { + VariantInfo::Tuple(tuple_variant_info) => { // same as tuple variant let fields_iter = (0..tuple_variant_info.field_len()) .map(|f| { @@ -815,7 +820,7 @@ impl WorldAccessGuard<'_> { self.construct_dynamic_tuple(&mut payload, fields_iter, one_indexed)?; DynamicVariant::Tuple(dynamic) } - bevy::reflect::VariantInfo::Unit(_) => DynamicVariant::Unit, + VariantInfo::Unit(_) => DynamicVariant::Unit, }; let mut dynamic = DynamicEnum::new(variant_name, variant); dynamic.set_represented_type(Some(type_info)); @@ -826,7 +831,7 @@ impl WorldAccessGuard<'_> { Some(type_info.type_id()), Some(Box::new(payload)), "Type constructor not supported", - )) + )); } }; @@ -1311,8 +1316,8 @@ impl WorldContainer for ThreadWorldContainer { #[cfg(test)] mod test { use super::*; - use bevy::reflect::{GetTypeRegistration, ReflectFromReflect}; - use test_utils::test_data::{setup_world, SimpleEnum, SimpleStruct, SimpleTupleStruct}; + use bevy_reflect::{GetTypeRegistration, ReflectFromReflect}; + use test_utils::test_data::{SimpleEnum, SimpleStruct, SimpleTupleStruct, setup_world}; #[test] fn test_construct_struct() { diff --git a/crates/bevy_mod_scripting_core/src/commands.rs b/crates/bevy_mod_scripting_core/src/commands.rs index 2d87449429..e7ca24f216 100644 --- a/crates/bevy_mod_scripting_core/src/commands.rs +++ b/crates/bevy_mod_scripting_core/src/commands.rs @@ -2,13 +2,6 @@ use std::marker::PhantomData; -use bevy::{ - asset::{Assets, Handle}, - ecs::event::Events, - log::{debug, warn}, - prelude::Command, -}; - use crate::{ IntoScriptPluginParams, ScriptContext, asset::ScriptAsset, @@ -23,6 +16,13 @@ use crate::{ handler::{handle_script_errors, send_callback_response}, script::{DisplayProxy, ScriptAttachment, StaticScripts}, }; +use ::{ + bevy_asset::{Assets, Handle}, + bevy_ecs::event::Events, + bevy_log::{debug, warn}, +}; +use bevy_ecs::{system::Command, world::World}; +use bevy_log::{error, info, trace}; /// Detaches a script, invoking the `on_script_unloaded` callback if it exists, and removes the script from the static scripts collection. pub struct DeleteScript { @@ -52,7 +52,7 @@ impl DeleteScript

{ } impl Command for DeleteScript

{ - fn apply(mut self, world: &mut bevy::prelude::World) { + fn apply(mut self, world: &mut World) { // we demote to weak from here on out, so as not to hold the asset hostage self.context_key = self.context_key.into_weak(); @@ -89,13 +89,13 @@ impl Command for DeleteScript

{ let delete_context = residents_count == 1; let script_id = self.context_key.script(); if delete_context && script_contexts.remove(&self.context_key).is_some() { - bevy::log::info!( + info!( "{}: Deleted context for script {:?}", P::LANGUAGE, script_id.display() ); } else { - bevy::log::info!( + info!( "{}: Context for script {:?} was not deleted, as it still has {} residents", P::LANGUAGE, script_id.display(), @@ -151,7 +151,7 @@ impl CreateOrUpdateScript

{ guard: WorldGuard, handler_ctxt: &HandlerContext

, ) -> Result<(), ScriptError> { - bevy::log::debug!("{}: reloading context {}", P::LANGUAGE, attachment); + debug!("{}: reloading context {}", P::LANGUAGE, attachment); // reload context P::reload( attachment, @@ -172,7 +172,7 @@ impl CreateOrUpdateScript

{ guard: WorldGuard, handler_ctxt: &HandlerContext

, ) -> Result { - bevy::log::debug!("{}: loading context {}", P::LANGUAGE, attachment); + debug!("{}: loading context {}", P::LANGUAGE, attachment); let context = P::load( attachment, content, @@ -313,7 +313,7 @@ impl CreateOrUpdateScript

{ ))) })?; - bevy::log::debug!( + debug!( "{}: script {} successfully {}", P::LANGUAGE, attachment, @@ -350,7 +350,7 @@ impl CreateOrUpdateScript

{ #[profiling::all_functions] impl Command for CreateOrUpdateScript

{ - fn apply(self, world: &mut bevy::prelude::World) { + fn apply(self, world: &mut World) { let content = match self.content { Some(content) => content, None => match world @@ -360,7 +360,7 @@ impl Command for CreateOrUpdateScript

{ { Some(content) => content, None => { - bevy::log::error!( + error!( "{}: No content provided for script attachment {}. Cannot attach script.", P::LANGUAGE, self.attachment.script().display() @@ -437,7 +437,7 @@ impl RunScriptCallback

{ ); if self.trigger_response { - bevy::log::trace!( + trace!( "{}: Sending callback response for callback: {}, attachment: {}", P::LANGUAGE, self.callback, @@ -471,7 +471,7 @@ impl RunScriptCallback

{ /// Equivalent to running the command, but also returns the result of the callback. /// /// The returned error will already be handled and logged. - pub fn run(self, world: &mut bevy::prelude::World) -> Result { + pub fn run(self, world: &mut World) -> Result { with_handler_system_state(world, |guard, handler_ctxt: &mut HandlerContext

| { self.run_with_handler(guard, handler_ctxt) }) @@ -479,7 +479,7 @@ impl RunScriptCallback

{ } impl Command for RunScriptCallback

{ - fn apply(self, world: &mut bevy::prelude::World) { + fn apply(self, world: &mut World) { // Internals handle this. let _ = self.run(world); } @@ -498,7 +498,7 @@ impl AddStaticScript { } /// Runs the command emitting the appropriate script event - pub fn run(self, events: &mut bevy::prelude::Events) { + pub fn run(self, events: &mut Events) { events.send(ScriptEvent::Attached { key: ScriptAttachment::StaticScript(self.id.clone()), }); @@ -506,7 +506,7 @@ impl AddStaticScript { } impl Command for AddStaticScript { - fn apply(self, world: &mut bevy::prelude::World) { + fn apply(self, world: &mut World) { let mut events = world.get_resource_or_init::>(); self.run(&mut events); } @@ -534,7 +534,7 @@ impl RemoveStaticScript { #[profiling::all_functions] impl Command for RemoveStaticScript { - fn apply(self, world: &mut bevy::prelude::World) { + fn apply(self, world: &mut World) { let mut events = world.get_resource_or_init::>(); self.run(&mut events); } diff --git a/crates/bevy_mod_scripting_core/src/context.rs b/crates/bevy_mod_scripting_core/src/context.rs index f849f5d00f..bef89a315f 100644 --- a/crates/bevy_mod_scripting_core/src/context.rs +++ b/crates/bevy_mod_scripting_core/src/context.rs @@ -1,6 +1,6 @@ //! Traits and types for managing script contexts. -use bevy::prelude::Resource; +use bevy_ecs::resource::Resource; use crate::{ IntoScriptPluginParams, diff --git a/crates/bevy_mod_scripting_core/src/docgen/info.rs b/crates/bevy_mod_scripting_core/src/docgen/info.rs index 949286c0d3..c8601fb0cf 100644 --- a/crates/bevy_mod_scripting_core/src/docgen/info.rs +++ b/crates/bevy_mod_scripting_core/src/docgen/info.rs @@ -2,7 +2,7 @@ use crate::bindings::function::arg_meta::ArgMeta; use crate::bindings::function::namespace::Namespace; -use bevy::reflect::Reflect; +use bevy_reflect::Reflect; use std::{any::TypeId, borrow::Cow}; use super::typed_through::{ThroughTypeInfo, TypedThrough}; @@ -195,14 +195,14 @@ 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 694711af35..995eae56cd 100644 --- a/crates/bevy_mod_scripting_core/src/docgen/typed_through.rs +++ b/crates/bevy_mod_scripting_core/src/docgen/typed_through.rs @@ -3,21 +3,22 @@ use std::{ffi::OsString, path::PathBuf}; -use bevy::reflect::{TypeInfo, Typed}; +use bevy_platform::collections::HashMap; +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::{ + ReflectReference, + function::{ + from::{Mut, Ref, Union, Val}, + script_function::{ + DynamicScriptFunction, DynamicScriptFunctionMut, FunctionCallContext, + }, + }, + script_value::ScriptValue, + }, + error::InteropError, + reflection_extensions::TypeInfoExtensions, }; /// All Through types follow one rule: @@ -186,6 +187,15 @@ impl TypedThrough for Vec { } } +impl TypedThrough for HashMap { + fn through_type_info() -> ThroughTypeInfo { + ThroughTypeInfo::TypedWrapper(TypedWrapperKind::HashMap( + Box::new(K::through_type_info()), + Box::new(V::through_type_info()), + )) + } +} + impl TypedThrough for std::collections::HashMap { fn through_type_info() -> ThroughTypeInfo { ThroughTypeInfo::TypedWrapper(TypedWrapperKind::HashMap( @@ -220,7 +230,7 @@ macro_rules! impl_through_typed { $( impl $crate::docgen::typed_through::TypedThrough for $ty { fn through_type_info() -> $crate::docgen::typed_through::ThroughTypeInfo { - $crate::docgen::typed_through::ThroughTypeInfo::TypeInfo(<$ty as bevy::reflect::Typed>::type_info()) + $crate::docgen::typed_through::ThroughTypeInfo::TypeInfo(<$ty as bevy_reflect::Typed>::type_info()) } } )* @@ -269,9 +279,9 @@ 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(); @@ -355,7 +365,7 @@ mod test { )); assert!(matches!( - std::collections::HashMap::::through_type_info(), + HashMap::::through_type_info(), ThroughTypeInfo::TypedWrapper(TypedWrapperKind::HashMap(..)) )); @@ -388,7 +398,7 @@ mod test { )); assert!(matches!( - into_through_type_info(std::collections::HashMap::::type_info()), + into_through_type_info(HashMap::::type_info()), ThroughTypeInfo::TypedWrapper(TypedWrapperKind::HashMap(..)) )); diff --git a/crates/bevy_mod_scripting_core/src/error.rs b/crates/bevy_mod_scripting_core/src/error.rs index 6c9a2c29fd..14e6d8b9e9 100644 --- a/crates/bevy_mod_scripting_core/src/error.rs +++ b/crates/bevy_mod_scripting_core/src/error.rs @@ -9,14 +9,15 @@ use std::{ sync::Arc, }; -use bevy::{ - asset::{AssetPath, Handle}, - ecs::{ +use bevy_ecs::entity::Entity; + +use ::{ + bevy_asset::{AssetPath, Handle}, + bevy_ecs::{ component::ComponentId, schedule::{ScheduleBuildError, ScheduleNotInitialized}, }, - prelude::Entity, - reflect::{PartialReflect, Reflect}, + bevy_reflect::{PartialReflect, Reflect}, }; use crate::{ @@ -1622,7 +1623,8 @@ impl Default for InteropErrorInner { #[cfg(test)] mod test { - use bevy::prelude::{AppTypeRegistry, World}; + + use bevy_ecs::{reflect::AppTypeRegistry, world::World}; use super::*; use crate::bindings::{ diff --git a/crates/bevy_mod_scripting_core/src/event.rs b/crates/bevy_mod_scripting_core/src/event.rs index efda855d4c..d06c3312f4 100644 --- a/crates/bevy_mod_scripting_core/src/event.rs +++ b/crates/bevy_mod_scripting_core/src/event.rs @@ -2,7 +2,8 @@ use std::sync::Arc; -use bevy::{asset::Handle, ecs::entity::Entity, prelude::Event, reflect::Reflect}; +use ::{bevy_asset::Handle, bevy_ecs::entity::Entity, bevy_reflect::Reflect}; +use bevy_ecs::event::Event; use parking_lot::Mutex; use crate::{ @@ -409,9 +410,10 @@ static FORBIDDEN_KEYWORDS: [&str; 82] = [ mod test { use std::sync::Arc; - use bevy::{ - asset::{AssetId, AssetIndex, Handle}, - ecs::entity::Entity, + use ::{ + bevy_app::{App, Plugin}, + bevy_asset::{AssetId, AssetIndex, Handle}, + bevy_ecs::entity::Entity, }; use parking_lot::Mutex; use test_utils::make_test_plugin; diff --git a/crates/bevy_mod_scripting_core/src/extractors.rs b/crates/bevy_mod_scripting_core/src/extractors.rs index 413113a6e8..38c9e4f966 100644 --- a/crates/bevy_mod_scripting_core/src/extractors.rs +++ b/crates/bevy_mod_scripting_core/src/extractors.rs @@ -7,13 +7,14 @@ use std::{ sync::Arc, }; -use bevy::ecs::{ - component::ComponentId, +use bevy_ecs::{ + archetype::Archetype, + component::{ComponentId, Tick}, query::{Access, AccessConflicts}, resource::Resource, storage::SparseSetIndex, - system::{SystemParam, SystemParamValidationError}, - world::World, + system::{SystemMeta, SystemParam, SystemParamValidationError}, + world::{DeferredWorld, World, unsafe_world_cell::UnsafeWorldCell}, }; use fixedbitset::FixedBitSet; use parking_lot::Mutex; @@ -89,19 +90,16 @@ unsafe impl SystemParam for ResScope<'_, T> { type Item<'world, 'state> = ResScope<'state, T>; - fn init_state( - _world: &mut World, - system_meta: &mut bevy::ecs::system::SystemMeta, - ) -> Self::State { + fn init_state(_world: &mut World, system_meta: &mut SystemMeta) -> Self::State { system_meta.set_has_deferred(); (T::default(), false) } unsafe fn get_param<'world, 'state>( state: &'state mut Self::State, - _system_meta: &bevy::ecs::system::SystemMeta, - world: bevy::ecs::world::unsafe_world_cell::UnsafeWorldCell<'world>, - _change_tick: bevy::ecs::component::Tick, + _system_meta: &SystemMeta, + world: UnsafeWorldCell<'world>, + _change_tick: Tick, ) -> Self::Item<'world, 'state> { state.1 = true; if let Some(mut r) = unsafe { world.get_resource_mut::() } { @@ -110,11 +108,7 @@ unsafe impl SystemParam for ResScope<'_, T> { ResScope(&mut state.0) } - fn apply( - state: &mut Self::State, - _system_meta: &bevy::ecs::system::SystemMeta, - world: &mut bevy::ecs::world::World, - ) { + fn apply(state: &mut Self::State, _system_meta: &SystemMeta, world: &mut World) { if state.1 { world.insert_resource(std::mem::take(&mut state.0)); state.1 = false; @@ -275,10 +269,7 @@ unsafe impl SystemParam for WithWorldGuard<'_, '_, T> { type Item<'world, 'state> = WithWorldGuard<'world, 'state, T>; - fn init_state( - world: &mut bevy::ecs::world::World, - system_meta: &mut bevy::ecs::system::SystemMeta, - ) -> Self::State { + fn init_state(world: &mut World, system_meta: &mut SystemMeta) -> Self::State { // verify there are no accesses previously let other_accessed_components = system_meta.component_access_set().combined_access().clone(); @@ -306,9 +297,9 @@ unsafe impl SystemParam for WithWorldGuard<'_, '_, T> { unsafe fn get_param<'world, 'state>( state: &'state mut Self::State, - system_meta: &bevy::ecs::system::SystemMeta, - world: bevy::ecs::world::unsafe_world_cell::UnsafeWorldCell<'world>, - change_tick: bevy::ecs::component::Tick, + system_meta: &SystemMeta, + world: UnsafeWorldCell<'world>, + change_tick: Tick, ) -> Self::Item<'world, 'state> { // create a guard which can only access the resources/components specified by the system. let guard = WorldAccessGuard::new_exclusive(unsafe { world.world_mut() }); @@ -341,32 +332,24 @@ unsafe impl SystemParam for WithWorldGuard<'_, '_, T> { unsafe fn new_archetype( state: &mut Self::State, - archetype: &bevy::ecs::archetype::Archetype, - system_meta: &mut bevy::ecs::system::SystemMeta, + archetype: &Archetype, + system_meta: &mut SystemMeta, ) { unsafe { T::new_archetype(&mut state.0, archetype, system_meta) } } - fn apply( - state: &mut Self::State, - system_meta: &bevy::ecs::system::SystemMeta, - world: &mut World, - ) { + fn apply(state: &mut Self::State, system_meta: &SystemMeta, world: &mut World) { T::apply(&mut state.0, system_meta, world) } - fn queue( - state: &mut Self::State, - system_meta: &bevy::ecs::system::SystemMeta, - world: bevy::ecs::world::DeferredWorld, - ) { + fn queue(state: &mut Self::State, system_meta: &SystemMeta, world: DeferredWorld) { T::queue(&mut state.0, system_meta, world) } unsafe fn validate_param( state: &Self::State, - system_meta: &bevy::ecs::system::SystemMeta, - world: bevy::ecs::world::unsafe_world_cell::UnsafeWorldCell, + system_meta: &SystemMeta, + world: UnsafeWorldCell, ) -> Result<(), SystemParamValidationError> { unsafe { T::validate_param(&state.0, system_meta, world) } } @@ -414,15 +397,15 @@ pub(crate) fn get_all_access_ids(access: &Access) -> Vec<(ReflectAc #[cfg(test)] mod test { - use bevy::{ - app::{App, Update}, - ecs::{ + use ::{ + bevy_app::{App, Plugin, Update}, + bevy_ecs::{ component::Component, + entity::Entity, event::{Event, EventReader}, system::{Query, ResMut, SystemState}, world::FromWorld, }, - prelude::Resource, }; use test_utils::make_test_plugin; @@ -455,7 +438,7 @@ mod test { ); }; - let mut app = bevy::app::App::new(); + let mut app = App::new(); app.add_systems(Update, system_fn); app.insert_resource(Res); app.world_mut().spawn(Comp); @@ -472,7 +455,7 @@ mod test { pub fn check_with_world_panics_when_used_with_resource_top_level() { let system_fn = |_res: ResMut, mut _guard: WithWorldGuard>| {}; - let mut app = bevy::app::App::new(); + let mut app = App::new(); app.add_systems(Update, system_fn); app.insert_resource(Res); app.world_mut().spawn(Comp); @@ -492,7 +475,7 @@ mod test { let system_fn = |_res: EventReader, mut _guard: WithWorldGuard>| {}; - let mut app = bevy::app::App::new(); + let mut app = App::new(); app.add_systems(Update, system_fn); app.insert_resource(Res); app.world_mut().spawn(Comp); diff --git a/crates/bevy_mod_scripting_core/src/handler.rs b/crates/bevy_mod_scripting_core/src/handler.rs index 01d12e2b97..96d796a0e2 100644 --- a/crates/bevy_mod_scripting_core/src/handler.rs +++ b/crates/bevy_mod_scripting_core/src/handler.rs @@ -1,12 +1,12 @@ //! Contains the logic for handling script callback events -use bevy::{ - ecs::{ +use ::{ + bevy_ecs::{ event::EventCursor, + event::Events, system::{Local, SystemState}, world::{Mut, World}, }, - log::error, - prelude::Events, + bevy_log::error, }; use crate::{ @@ -184,7 +184,7 @@ pub fn send_callback_response(world: WorldGuard, response: ScriptCallbackRespons }); if let Err(err) = err { - bevy::log::error!( + error!( "Failed to send script callback response: {}", err.display_with_world(world.clone()) ); @@ -200,13 +200,13 @@ pub fn handle_script_errors + Clone>(world: Worl }); if let Err(err) = err { - bevy::log::error!( + error!( "Failed to send script error events: {}", err.display_with_world(world.clone()) ); } for error in errors { - bevy::log::error!("{}", error.display_with_world(world.clone())); + error!("{}", error.display_with_world(world.clone())); } } diff --git a/crates/bevy_mod_scripting_core/src/lib.rs b/crates/bevy_mod_scripting_core/src/lib.rs index 4709968f1f..b74775169a 100644 --- a/crates/bevy_mod_scripting_core/src/lib.rs +++ b/crates/bevy_mod_scripting_core/src/lib.rs @@ -2,11 +2,26 @@ //! //! Contains language agnostic systems and types for handling scripting in bevy. +use crate::{ + bindings::MarkAsCore, + context::{ContextLoadFn, ContextReloadFn}, + event::ScriptErrorEvent, +}; use asset::{ Language, ScriptAsset, ScriptAssetLoader, configure_asset_systems, configure_asset_systems_for_plugin, }; -use bevy::{platform::collections::HashMap, prelude::*}; +use bevy_app::{App, Plugin, PostStartup, PostUpdate}; +use bevy_asset::{AssetApp, Handle}; +use bevy_ecs::{ + reflect::{AppTypeRegistry, ReflectComponent}, + resource::Resource, + schedule::SystemSet, + system::{Command, In}, +}; +use bevy_ecs::{schedule::IntoScheduleConfigs, system::IntoSystem}; +use bevy_log::error; +use bevy_platform::collections::HashMap; use bindings::{ AppReflectAllocator, DynamicScriptComponentPlugin, ReflectAllocator, ReflectReference, ScriptTypeRegistration, function::script_function::AppScriptFunctionRegistry, @@ -19,12 +34,7 @@ use event::{ScriptCallbackEvent, ScriptCallbackResponseEvent, ScriptEvent}; use handler::HandlerFn; use runtime::{Runtime, RuntimeContainer, RuntimeInitializer, RuntimeSettings, initialize_runtime}; use script::{ContextPolicy, ScriptComponent, ScriptContext, StaticScripts}; - -use crate::{ - bindings::MarkAsCore, - context::{ContextLoadFn, ContextReloadFn}, - event::ScriptErrorEvent, -}; +use std::ops::{Deref, DerefMut}; pub mod asset; pub mod bindings; @@ -137,7 +147,7 @@ impl Default for ScriptingPlugin

{ #[profiling::all_functions] impl Plugin for ScriptingPlugin

{ - fn build(&self, app: &mut bevy::prelude::App) { + fn build(&self, app: &mut App) { app.insert_resource(self.runtime_settings.clone()) .insert_resource::>(RuntimeContainer { runtime: P::build_runtime(), @@ -399,9 +409,23 @@ pub trait ConfigureScriptAssetSettings { /// Collect the language extensions supported during initialization. /// /// NOTE: This resource is removed after plugin setup. -#[derive(Debug, Resource, Deref, DerefMut)] +#[derive(Debug, Resource)] pub struct LanguageExtensions(HashMap<&'static str, Language>); +impl Deref for LanguageExtensions { + type Target = HashMap<&'static str, Language>; + + fn deref(&self) -> &Self::Target { + &self.0 + } +} + +impl DerefMut for LanguageExtensions { + fn deref_mut(&mut self) -> &mut Self::Target { + &mut self.0 + } +} + impl Default for LanguageExtensions { fn default() -> Self { LanguageExtensions( @@ -436,6 +460,10 @@ impl ConfigureScriptAssetSettings for App { #[cfg(test)] mod test { + use bevy_asset::{AssetPlugin, AssetServer}; + use bevy_ecs::prelude::*; + use bevy_reflect::Reflect; + use super::*; #[tokio::test] diff --git a/crates/bevy_mod_scripting_core/src/reflection_extensions.rs b/crates/bevy_mod_scripting_core/src/reflection_extensions.rs index 7c3b638d28..18ef2a0cfa 100644 --- a/crates/bevy_mod_scripting_core/src/reflection_extensions.rs +++ b/crates/bevy_mod_scripting_core/src/reflection_extensions.rs @@ -5,7 +5,7 @@ use std::{ cmp::max, }; -use bevy::reflect::{PartialReflect, Reflect, ReflectFromReflect, ReflectMut, TypeInfo}; +use bevy_reflect::{PartialReflect, Reflect, ReflectFromReflect, ReflectMut, ReflectRef, TypeInfo}; use crate::{ bindings::{ReflectReference, WorldGuard}, @@ -140,7 +140,7 @@ impl PartialReflectExt for T { } fn as_option(&self) -> Result, InteropError> { - if let bevy::reflect::ReflectRef::Enum(e) = self.reflect_ref() + if let ReflectRef::Enum(e) = self.reflect_ref() && e.is_type(Some("core"), "Option") { if let Some(field) = e.field_at(0) { @@ -159,7 +159,7 @@ impl PartialReflectExt for T { fn as_option_mut(&mut self) -> Result, InteropError> { let type_info = self.get_represented_type_info().map(|ti| ti.type_path()); match self.reflect_mut() { - bevy::reflect::ReflectMut::Enum(e) => { + ReflectMut::Enum(e) => { if let Some(field) = e.field_at_mut(0) { Ok(Some(field)) } else { @@ -174,7 +174,7 @@ impl PartialReflectExt for T { } fn as_list(&self) -> Result, InteropError> { - if let bevy::reflect::ReflectRef::List(l) = self.reflect_ref() { + if let ReflectRef::List(l) = self.reflect_ref() { Ok(l.iter()) } else { Err(InteropError::string_type_mismatch( @@ -254,15 +254,15 @@ impl PartialReflectExt for T { value: Box, ) -> Result<(), InteropError> { match self.reflect_mut() { - bevy::reflect::ReflectMut::List(l) => { + ReflectMut::List(l) => { l.insert(key.as_usize()?, value); Ok(()) } - bevy::reflect::ReflectMut::Map(m) => { + ReflectMut::Map(m) => { m.insert_boxed(key, value); Ok(()) } - bevy::reflect::ReflectMut::Set(s) => { + ReflectMut::Set(s) => { s.insert_boxed(value); Ok(()) } @@ -276,11 +276,11 @@ impl PartialReflectExt for T { fn try_push_boxed(&mut self, value: Box) -> Result<(), InteropError> { match self.reflect_mut() { - bevy::reflect::ReflectMut::List(l) => { + ReflectMut::List(l) => { l.push(value); Ok(()) } - bevy::reflect::ReflectMut::Set(s) => { + ReflectMut::Set(s) => { s.insert_boxed(value); Ok(()) } @@ -303,15 +303,15 @@ impl PartialReflectExt for T { fn try_clear(&mut self) -> Result<(), InteropError> { match self.reflect_mut() { - bevy::reflect::ReflectMut::List(l) => { + ReflectMut::List(l) => { let _ = l.drain(); Ok(()) } - bevy::reflect::ReflectMut::Map(m) => { + ReflectMut::Map(m) => { let _ = m.drain(); Ok(()) } - bevy::reflect::ReflectMut::Set(s) => { + ReflectMut::Set(s) => { let _ = s.drain(); Ok(()) } @@ -328,7 +328,7 @@ impl PartialReflectExt for T { key: &dyn PartialReflect, ) -> Result, InteropError> { match self.reflect_ref() { - bevy::reflect::ReflectRef::Map(m) => Ok(m.get(key)), + ReflectRef::Map(m) => Ok(m.get(key)), _ => Err(InteropError::unsupported_operation( self.get_represented_type_info().map(|ti| ti.type_id()), None, @@ -339,7 +339,7 @@ impl PartialReflectExt for T { fn try_pop_boxed(&mut self) -> Result, InteropError> { match self.reflect_mut() { - bevy::reflect::ReflectMut::List(l) => l.pop().ok_or_else(|| { + ReflectMut::List(l) => l.pop().ok_or_else(|| { InteropError::unsupported_operation( self.get_represented_type_info().map(|ti| ti.type_id()), None, @@ -359,9 +359,9 @@ impl PartialReflectExt for T { key: Box, ) -> Result>, InteropError> { match self.reflect_mut() { - bevy::reflect::ReflectMut::List(l) => Ok(Some(l.remove(key.as_usize()?))), - bevy::reflect::ReflectMut::Map(m) => Ok(m.remove(key.as_partial_reflect())), - bevy::reflect::ReflectMut::Set(s) => { + ReflectMut::List(l) => Ok(Some(l.remove(key.as_usize()?))), + ReflectMut::Map(m) => Ok(m.remove(key.as_partial_reflect())), + ReflectMut::Set(s) => { let removed = s.remove(key.as_partial_reflect()); Ok(removed.then_some(key)) } @@ -375,10 +375,10 @@ impl PartialReflectExt for T { fn element_type_id(&self) -> Option { let elem: TypeId = match self.get_represented_type_info()? { - bevy::reflect::TypeInfo::List(list_info) => list_info.item_ty().id(), - bevy::reflect::TypeInfo::Array(array_info) => array_info.item_ty().id(), - bevy::reflect::TypeInfo::Map(map_info) => map_info.value_ty().id(), - bevy::reflect::TypeInfo::Set(set_info) => set_info.value_ty().id(), + TypeInfo::List(list_info) => list_info.item_ty().id(), + TypeInfo::Array(array_info) => array_info.item_ty().id(), + TypeInfo::Map(map_info) => map_info.value_ty().id(), + TypeInfo::Set(set_info) => set_info.value_ty().id(), _ => return None, }; Some(elem) @@ -386,10 +386,8 @@ impl PartialReflectExt for T { fn key_type_id(&self) -> Option { let key: TypeId = match self.get_represented_type_info()? { - bevy::reflect::TypeInfo::Map(map_info) => map_info.key_ty().id(), - bevy::reflect::TypeInfo::List(_) | bevy::reflect::TypeInfo::Array(_) => { - TypeId::of::() - } + TypeInfo::Map(map_info) => map_info.key_ty().id(), + TypeInfo::List(_) | TypeInfo::Array(_) => TypeId::of::(), _ => return None, }; Some(key) @@ -506,7 +504,8 @@ impl TypeInfoExtensions for TypeInfo { #[cfg(test)] mod test { - use bevy::reflect::{DynamicMap, Map}; + use bevy_platform::collections::HashMap; + use bevy_reflect::{DynamicMap, Map}; use super::*; @@ -651,7 +650,7 @@ mod test { #[test] fn test_try_insert_map() { - let mut map = std::collections::HashMap::::default(); + let mut map = HashMap::::default(); let value = 4; let value_ref: Box = Box::new(value); map.insert(1, 2); @@ -675,13 +674,12 @@ mod test { #[test] fn test_try_insert_dynamic_map_into_map_of_maps() { - let mut map = - std::collections::HashMap::>::default(); + let mut map = HashMap::>::default(); let value = DynamicMap::from_iter(vec![(1, 2), (2, 3), (3, 4)]); 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()); + map.insert(1, HashMap::::default()); + map.insert(2, HashMap::::default()); + map.insert(3, HashMap::::default()); map.try_insert_boxed(Box::new(1), value_ref).unwrap(); assert!(value.reflect_partial_eq(&map[&1]).unwrap()); } diff --git a/crates/bevy_mod_scripting_core/src/runtime.rs b/crates/bevy_mod_scripting_core/src/runtime.rs index ccf740449a..d2e971ffcf 100644 --- a/crates/bevy_mod_scripting_core/src/runtime.rs +++ b/crates/bevy_mod_scripting_core/src/runtime.rs @@ -1,10 +1,7 @@ //! "Runtime" here refers to the execution evironment of scripts. This might be the VM executing bytecode or the interpreter executing source code. //! The important thing is that there is only one runtime which is used to execute all scripts of a particular type or `context`. -use bevy::{ - ecs::system::ResMut, - prelude::{Res, Resource}, -}; +use ::bevy_ecs::{resource::Resource, system::Res, system::ResMut}; use crate::{IntoScriptPluginParams, error::ScriptError}; diff --git a/crates/bevy_mod_scripting_core/src/script/context_key.rs b/crates/bevy_mod_scripting_core/src/script/context_key.rs index eba9346187..294ba51790 100644 --- a/crates/bevy_mod_scripting_core/src/script/context_key.rs +++ b/crates/bevy_mod_scripting_core/src/script/context_key.rs @@ -1,6 +1,6 @@ use std::fmt; -use bevy::prelude::Entity; +use bevy_ecs::entity::Entity; use super::*; use crate::ScriptAsset; diff --git a/crates/bevy_mod_scripting_core/src/script/mod.rs b/crates/bevy_mod_scripting_core/src/script/mod.rs index 01fcda84d2..7d9ab9cb7d 100644 --- a/crates/bevy_mod_scripting_core/src/script/mod.rs +++ b/crates/bevy_mod_scripting_core/src/script/mod.rs @@ -1,19 +1,25 @@ //! Script related types, functions and components -use std::{collections::HashMap, fmt, ops::Deref}; - -use bevy::{ - asset::{Asset, AssetId, Handle}, - ecs::{component::HookContext, entity::Entity, resource::Resource, world::DeferredWorld}, - platform::collections::HashSet, - prelude::ReflectComponent, - reflect::Reflect, +use std::{ + collections::{HashMap, HashSet}, + fmt, + ops::Deref, +}; + +use ::{ + bevy_asset::{Asset, AssetId, Handle}, + bevy_ecs::{ + component::HookContext, entity::Entity, prelude::ReflectComponent, resource::Resource, + world::DeferredWorld, + }, + bevy_reflect::Reflect, }; use crate::{asset::ScriptAsset, event::ScriptEvent}; mod context_key; mod script_context; +use bevy_ecs::component::Component; pub use context_key::*; pub use script_context::*; @@ -64,7 +70,7 @@ impl DisplayProxy for Handle { } } -#[derive(bevy::ecs::component::Component, Reflect, Clone, Default, Debug)] +#[derive(Component, Reflect, Clone, Default, Debug)] #[reflect(Component)] #[component(on_remove=Self::on_remove, on_add=Self::on_add)] /// A component which identifies the scripts existing on an entity. @@ -158,7 +164,7 @@ impl StaticScripts { #[cfg(test)] mod tests { - use bevy::ecs::{event::Events, world::World}; + use bevy_ecs::{event::Events, world::World}; use super::*; diff --git a/crates/bevy_mod_scripting_core/src/script/script_context.rs b/crates/bevy_mod_scripting_core/src/script/script_context.rs index 7a08b38e91..3d66b9bf0a 100644 --- a/crates/bevy_mod_scripting_core/src/script/script_context.rs +++ b/crates/bevy_mod_scripting_core/src/script/script_context.rs @@ -346,7 +346,8 @@ impl Default for ScriptContext

{ #[cfg(test)] mod tests { - use bevy::asset::AssetIndex; + use bevy_app::{App, Plugin}; + use bevy_asset::AssetIndex; use test_utils::make_test_plugin; use super::*; diff --git a/crates/bevy_mod_scripting_derive/Cargo.toml b/crates/bevy_mod_scripting_derive/Cargo.toml index e39b2ff0b7..8cc2f6cd3c 100644 --- a/crates/bevy_mod_scripting_derive/Cargo.toml +++ b/crates/bevy_mod_scripting_derive/Cargo.toml @@ -12,9 +12,9 @@ categories = ["game-development"] readme = "readme.md" [dependencies] -syn = { version = "2", features = ["full"] } -proc-macro2 = "1" -quote = "1" +syn = { workspace = true, features = ["full"] } +proc-macro2 = { workspace = true } +quote = { workspace = true } [lib] proc-macro = true diff --git a/crates/bevy_mod_scripting_derive/src/derive/get_type_dependencies.rs b/crates/bevy_mod_scripting_derive/src/derive/get_type_dependencies.rs index bc1d0734c5..1cebf330b5 100644 --- a/crates/bevy_mod_scripting_derive/src/derive/get_type_dependencies.rs +++ b/crates/bevy_mod_scripting_derive/src/derive/get_type_dependencies.rs @@ -77,12 +77,12 @@ fn get_type_dependencies_from_input(derive_input: DeriveInput) -> TokenStream { }); impl_where.predicates.push( - parse_quote_spanned!(param.ident.span()=> #param_name::Underlying: bevy::reflect::GetTypeRegistration), + parse_quote_spanned!(param.ident.span()=> #param_name::Underlying: GetTypeRegistration), ); } else { - impl_where.predicates.push( - parse_quote_spanned!(param.ident.span()=> #param_name: bevy::reflect::GetTypeRegistration), - ) + impl_where + .predicates + .push(parse_quote_spanned!(param.ident.span()=> #param_name: GetTypeRegistration)) } } @@ -92,7 +92,7 @@ fn get_type_dependencies_from_input(derive_input: DeriveInput) -> TokenStream { impl #impl_generics #bms_core::bindings::GetTypeDependencies for #name #type_generics #impl_where { type Underlying = #underlying; - fn register_type_dependencies(registry: &mut bevy::reflect::TypeRegistry) { + fn register_type_dependencies(registry: &mut TypeRegistry) { #(#recursive_registrations)* registry.register::<#underlying>(); diff --git a/crates/bevy_mod_scripting_derive/src/derive/script_bindings.rs b/crates/bevy_mod_scripting_derive/src/derive/script_bindings.rs index 72b13b8841..dd5ae07844 100644 --- a/crates/bevy_mod_scripting_derive/src/derive/script_bindings.rs +++ b/crates/bevy_mod_scripting_derive/src/derive/script_bindings.rs @@ -54,7 +54,7 @@ pub fn script_bindings( let mark_as_generated = if args.generated { quote_spanned! {impl_span=> - let registry = world.get_resource_or_init::(); + let registry = world.get_resource_or_init::(); let mut registry = registry.write(); registry.register_type_data::<#type_ident_with_generics, #bms_core_path::bindings::MarkAsGenerated>(); } @@ -64,7 +64,7 @@ pub fn script_bindings( let mark_as_core = if bms_core_path.is_ident("crate") || args.core { quote_spanned! {impl_span=> - let registry = world.get_resource_or_init::(); + let registry = world.get_resource_or_init::(); let mut registry = registry.write(); registry.register_type_data::<#type_ident_with_generics, #bms_core_path::bindings::MarkAsCore>(); } @@ -74,7 +74,7 @@ pub fn script_bindings( let mark_as_significant = if args.significant { quote_spanned! {impl_span=> - let registry = world.get_resource_or_init::(); + let registry = world.get_resource_or_init::(); let mut registry = registry.write(); registry.register_type_data::<#type_ident_with_generics, #bms_core_path::bindings::MarkAsSignificant>(); } @@ -83,7 +83,7 @@ pub fn script_bindings( }; let out = quote_spanned! {impl_span=> - #visibility fn #function_name(world: &mut bevy::ecs::world::World) { + #visibility fn #function_name(world: &mut World) { #bms_core_path::bindings::function::namespace::NamespaceBuilder::<#type_ident_with_generics>::#builder_function_name(world) #(#function_registrations)*; diff --git a/crates/bevy_mod_scripting_derive/src/derive/script_globals.rs b/crates/bevy_mod_scripting_derive/src/derive/script_globals.rs index d64d851c23..c5fe7acd32 100644 --- a/crates/bevy_mod_scripting_derive/src/derive/script_globals.rs +++ b/crates/bevy_mod_scripting_derive/src/derive/script_globals.rs @@ -37,7 +37,7 @@ pub fn script_globals( }; let out = quote_spanned! {impl_span=> - #visibility fn #function_name(world: &mut bevy::ecs::world::World) { + #visibility fn #function_name(world: &mut World) { let registry = world.get_resource_or_init::<#bms_core_path::bindings::globals::AppScriptGlobalsRegistry>(); let mut registry = registry.write(); diff --git a/crates/bevy_mod_scripting_functions/Cargo.toml b/crates/bevy_mod_scripting_functions/Cargo.toml index a99d656012..734757010d 100644 --- a/crates/bevy_mod_scripting_functions/Cargo.toml +++ b/crates/bevy_mod_scripting_functions/Cargo.toml @@ -13,11 +13,11 @@ readme = "readme.md" [features] bevy_ecs = [] -bevy_input = [] -bevy_math = ["bevy_math/curve"] -bevy_reflect = ["bevy_reflect/smol_str"] -bevy_time = [] -bevy_transform = [] +bevy_input = ["dep:bevy_input"] +bevy_math = ["dep:bevy_math", "dep:glam"] +bevy_reflect = ["dep:bevy_reflect", "dep:glam", "dep:uuid", "dep:smol_str"] +bevy_time = ["dep:bevy_time"] +bevy_transform = ["dep:bevy_transform"] core_functions = [] lua_bindings = ["bevy_mod_scripting_lua"] @@ -25,14 +25,42 @@ 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 } +bevy_ecs = { workspace = true, features = ["std", "bevy_reflect"] } +bevy_app = { workspace = true } +bevy_asset = { workspace = true } +bevy_platform = { workspace = true, features = ["std"] } +bevy_input = { workspace = true, optional = true, features = [ + "std", + "bevy_reflect", +] } +bevy_math = { workspace = true, features = [ + "std", + "rand", + "curve", +], optional = true } +bevy_reflect = { workspace = true, features = [ + "smol_str", + "glam", + "uuid", + "std", + "debug_stack", +], optional = true } +uuid = { workspace = true, optional = true } +smol_str = { workspace = true, optional = true } +bevy_time = { workspace = true, optional = true, features = [ + "std", + "bevy_reflect", +] } +bevy_transform = { workspace = true, optional = true, features = [ + "bevy_reflect", + "std", + "bevy-support", +] } +glam = { workspace = true, optional = true, features = ["serde", "std"] } + profiling = { workspace = true } -uuid = "1.11" -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.15.1" } 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 feeddefc73..d6c9de7b1d 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 @@ -1,1238 +1,683 @@ - #![allow(clippy::all)] - #![allow(unused, deprecated, dead_code)] - 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 BevyEcsScriptingPlugin; - pub(crate) fn register_entity_functions(world: &mut bevy::ecs::world::World) { - bevy_mod_scripting_core::bindings::function::namespace::NamespaceBuilder::< - bevy::ecs::entity::Entity, - >::new(world) - .register_documented( - "clone", - |_self: Ref| { - let output: Val = { - { - let output: Val = ::clone( - &_self, - ) - .into(); - output - } - }; - output - }, - "", - &["_self"], - ) - .register_documented( - "eq", - | - _self: Ref, - other: Ref| - { - let output: bool = { - { - let output: bool = >::eq(&_self, &other) - .into(); - output - } - }; - output - }, - "", - &["_self", "other"], - ) - .register_documented( - "from_bits", - |bits: u64| { - let output: Val = { - { - let output: Val = bevy::ecs::entity::Entity::from_bits( - bits, - ) - .into(); - output - } - }; - output - }, - " Reconstruct an `Entity` previously destructured with [`Entity::to_bits`].\n Only useful when applied to results from `to_bits` in the same instance of an application.\n # Panics\n This method will likely panic if given `u64` values that did not come from [`Entity::to_bits`].", - &["bits"], - ) - .register_documented( - "from_raw", - |index: u32| { - let output: Val = { - { - let output: Val = bevy::ecs::entity::Entity::from_raw( - index, - ) - .into(); - output - } - }; - output - }, - " Creates a new entity ID with the specified `index` and a generation of 1.\n # Note\n Spawning a specific `entity` value is __rarely the right choice__. Most apps should favor\n [`Commands::spawn`](crate::system::Commands::spawn). This method should generally\n only be used for sharing entities across apps, and only when they have a scheme\n worked out to share an index space (which doesn't happen by default).\n In general, one should not try to synchronize the ECS by attempting to ensure that\n `Entity` lines up between instances, but instead insert a secondary identifier as\n a component.", - &["index"], - ) - .register_documented( - "generation", - |_self: Val| { - let output: u32 = { - { - let output: u32 = bevy::ecs::entity::Entity::generation( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns the generation of this Entity's index. The generation is incremented each time an\n entity with a given index is despawned. This serves as a \"count\" of the number of times a\n given index has been reused (index, generation) pairs uniquely identify a given Entity.", - &["_self"], - ) - .register_documented( - "index", - |_self: Val| { - let output: u32 = { - { - let output: u32 = bevy::ecs::entity::Entity::index( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Return a transiently unique identifier.\n No two simultaneously-live entities share the same index, but dead entities' indices may collide\n with both live and dead entities. Useful for compactly representing entities within a\n specific snapshot of the world, such as when serializing.", - &["_self"], - ) - .register_documented( - "to_bits", - |_self: Val| { - let output: u64 = { - { - let output: u64 = bevy::ecs::entity::Entity::to_bits( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Convert to a form convenient for passing outside of rust.\n Only useful for identifying entities within the same instance of an application. Do not use\n for serialization between runs.\n No particular structure is guaranteed for the returned bits.", - &["_self"], - ); - let registry = world - .get_resource_or_init::(); - let mut registry = registry.write(); - registry - .register_type_data::< - bevy::ecs::entity::Entity, - bevy_mod_scripting_core::bindings::MarkAsGenerated, - >(); +// @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_ecs::prelude::*; +use bevy_mod_scripting_derive::script_bindings; +use crate::*; +pub struct BevyEcsScriptingPlugin; +#[script_bindings( + remote, + name = "entity_functions", + bms_core_path = "bevy_mod_scripting_core", + generated +)] +impl ::bevy_ecs::entity::Entity { + fn clone(_self: Ref<::bevy_ecs::entity::Entity>) -> Val<::bevy_ecs::entity::Entity> { + let output: Val<::bevy_ecs::entity::Entity> = <::bevy_ecs::entity::Entity as ::core::clone::Clone>::clone( + &_self, + ) + .into(); + output } - pub(crate) fn register_child_of_functions(world: &mut bevy::ecs::world::World) { - bevy_mod_scripting_core::bindings::function::namespace::NamespaceBuilder::< - bevy::ecs::hierarchy::ChildOf, - >::new(world) - .register_documented( - "assert_receiver_is_total_eq", - |_self: Ref| { - let output: () = { - { - let output: () = ::assert_receiver_is_total_eq( - &_self, - ) - .into(); - output - } - }; - output - }, - "", - &["_self"], - ) - .register_documented( - "clone", - |_self: Ref| { - let output: Val = { - { - let output: Val = ::clone( - &_self, - ) - .into(); - output - } - }; - output - }, - "", - &["_self"], - ) - .register_documented( - "eq", - | - _self: Ref, - other: Ref| - { - let output: bool = { - { - let output: bool = >::eq(&_self, &other) - .into(); - output - } - }; - output - }, - "", - &["_self", "other"], - ) - .register_documented( - "get", - |_self: Ref| { - let output: Val = { - { - let output: Val = bevy::ecs::hierarchy::ChildOf::get( - &_self, - ) - .into(); - output - } - }; - output - }, - " The parent entity of this child entity.", - &["_self"], - ) - .register_documented( - "parent", - |_self: Ref| { - let output: Val = { - { - let output: Val = bevy::ecs::hierarchy::ChildOf::parent( - &_self, - ) - .into(); - output - } - }; - output - }, - " The parent entity of this child entity.", - &["_self"], - ); - let registry = world - .get_resource_or_init::(); - let mut registry = registry.write(); - registry - .register_type_data::< - bevy::ecs::hierarchy::ChildOf, - bevy_mod_scripting_core::bindings::MarkAsGenerated, - >(); + fn eq( + _self: Ref<::bevy_ecs::entity::Entity>, + other: Ref<::bevy_ecs::entity::Entity>, + ) -> bool { + let output: bool = <::bevy_ecs::entity::Entity as ::core::cmp::PartialEq< + ::bevy_ecs::entity::Entity, + >>::eq(&_self, &other) + .into(); + output } - pub(crate) fn register_children_functions(world: &mut bevy::ecs::world::World) { - bevy_mod_scripting_core::bindings::function::namespace::NamespaceBuilder::< - bevy::ecs::hierarchy::Children, - >::new(world) - .register_documented( - "assert_receiver_is_total_eq", - |_self: Ref| { - let output: () = { - { - let output: () = ::assert_receiver_is_total_eq( - &_self, - ) - .into(); - output - } - }; - output - }, - "", - &["_self"], - ) - .register_documented( - "eq", - | - _self: Ref, - other: Ref| - { - let output: bool = { - { - let output: bool = >::eq(&_self, &other) - .into(); - output - } - }; - output - }, - "", - &["_self", "other"], - ) - .register_documented( - "swap", - | - mut _self: Mut, - a_index: usize, - b_index: usize| - { - let output: () = { - { - let output: () = bevy::ecs::hierarchy::Children::swap( - &mut _self, - a_index, - b_index, - ) - .into(); - output - } - }; - output - }, - " Swaps the child at `a_index` with the child at `b_index`.", - &["_self", "a_index", "b_index"], - ); - let registry = world - .get_resource_or_init::(); - let mut registry = registry.write(); - registry - .register_type_data::< - bevy::ecs::hierarchy::Children, - bevy_mod_scripting_core::bindings::MarkAsGenerated, - >(); + /// Reconstruct an `Entity` previously destructured with [`Entity::to_bits`]. + /// Only useful when applied to results from `to_bits` in the same instance of an application. + /// # Panics + /// This method will likely panic if given `u64` values that did not come from [`Entity::to_bits`]. + fn from_bits(bits: u64) -> Val<::bevy_ecs::entity::Entity> { + let output: Val<::bevy_ecs::entity::Entity> = ::bevy_ecs::entity::Entity::from_bits( + bits, + ) + .into(); + output } - pub(crate) fn register_name_functions(world: &mut bevy::ecs::world::World) { - bevy_mod_scripting_core::bindings::function::namespace::NamespaceBuilder::< - bevy::ecs::name::Name, - >::new(world) - .register_documented( - "clone", - |_self: Ref| { - let output: Val = { - { - let output: Val = ::clone( - &_self, - ) - .into(); - output - } - }; - output - }, - "", - &["_self"], - ) - .register_documented( - "eq", - |_self: Ref, other: Ref| { - let output: bool = { - { - let output: bool = >::eq(&_self, &other) - .into(); - output - } - }; - output - }, - "", - &["_self", "other"], - ); - let registry = world - .get_resource_or_init::(); - let mut registry = registry.write(); - registry - .register_type_data::< - bevy::ecs::name::Name, - bevy_mod_scripting_core::bindings::MarkAsGenerated, - >(); + /// Creates a new entity ID with the specified `index` and a generation of 1. + /// # Note + /// Spawning a specific `entity` value is __rarely the right choice__. Most apps should favor + /// [`Commands::spawn`](crate::system::Commands::spawn). This method should generally + /// only be used for sharing entities across apps, and only when they have a scheme + /// worked out to share an index space (which doesn't happen by default). + /// In general, one should not try to synchronize the ECS by attempting to ensure that + /// `Entity` lines up between instances, but instead insert a secondary identifier as + /// a component. + fn from_raw(index: u32) -> Val<::bevy_ecs::entity::Entity> { + let output: Val<::bevy_ecs::entity::Entity> = ::bevy_ecs::entity::Entity::from_raw( + index, + ) + .into(); + output } - pub(crate) fn register_on_add_functions(world: &mut bevy::ecs::world::World) { - bevy_mod_scripting_core::bindings::function::namespace::NamespaceBuilder::< - bevy::ecs::world::OnAdd, - >::new(world); - let registry = world - .get_resource_or_init::(); - let mut registry = registry.write(); - registry - .register_type_data::< - bevy::ecs::world::OnAdd, - bevy_mod_scripting_core::bindings::MarkAsGenerated, - >(); + /// Returns the generation of this Entity's index. The generation is incremented each time an + /// entity with a given index is despawned. This serves as a "count" of the number of times a + /// given index has been reused (index, generation) pairs uniquely identify a given Entity. + fn generation(_self: Val<::bevy_ecs::entity::Entity>) -> u32 { + let output: u32 = ::bevy_ecs::entity::Entity::generation(_self.into_inner()) + .into(); + output } - pub(crate) fn register_on_insert_functions(world: &mut bevy::ecs::world::World) { - bevy_mod_scripting_core::bindings::function::namespace::NamespaceBuilder::< - bevy::ecs::world::OnInsert, - >::new(world); - let registry = world - .get_resource_or_init::(); - let mut registry = registry.write(); - registry - .register_type_data::< - bevy::ecs::world::OnInsert, - bevy_mod_scripting_core::bindings::MarkAsGenerated, - >(); + /// Return a transiently unique identifier. + /// No two simultaneously-live entities share the same index, but dead entities' indices may collide + /// with both live and dead entities. Useful for compactly representing entities within a + /// specific snapshot of the world, such as when serializing. + fn index(_self: Val<::bevy_ecs::entity::Entity>) -> u32 { + let output: u32 = ::bevy_ecs::entity::Entity::index(_self.into_inner()).into(); + output } - pub(crate) fn register_on_remove_functions(world: &mut bevy::ecs::world::World) { - bevy_mod_scripting_core::bindings::function::namespace::NamespaceBuilder::< - bevy::ecs::world::OnRemove, - >::new(world); - let registry = world - .get_resource_or_init::(); - let mut registry = registry.write(); - registry - .register_type_data::< - bevy::ecs::world::OnRemove, - bevy_mod_scripting_core::bindings::MarkAsGenerated, - >(); + /// Convert to a form convenient for passing outside of rust. + /// Only useful for identifying entities within the same instance of an application. Do not use + /// for serialization between runs. + /// No particular structure is guaranteed for the returned bits. + fn to_bits(_self: Val<::bevy_ecs::entity::Entity>) -> u64 { + let output: u64 = ::bevy_ecs::entity::Entity::to_bits(_self.into_inner()).into(); + output } - pub(crate) fn register_on_replace_functions(world: &mut bevy::ecs::world::World) { - bevy_mod_scripting_core::bindings::function::namespace::NamespaceBuilder::< - bevy::ecs::world::OnReplace, - >::new(world); - let registry = world - .get_resource_or_init::(); - let mut registry = registry.write(); - registry - .register_type_data::< - bevy::ecs::world::OnReplace, - bevy_mod_scripting_core::bindings::MarkAsGenerated, - >(); +} +#[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<::bevy_ecs::hierarchy::ChildOf>) -> () { + let output: () = <::bevy_ecs::hierarchy::ChildOf as ::core::cmp::Eq>::assert_receiver_is_total_eq( + &_self, + ) + .into(); + output } - pub(crate) fn register_component_id_functions(world: &mut bevy::ecs::world::World) { - bevy_mod_scripting_core::bindings::function::namespace::NamespaceBuilder::< - bevy::ecs::component::ComponentId, - >::new(world) - .register_documented( - "assert_receiver_is_total_eq", - |_self: Ref| { - let output: () = { - { - let output: () = ::assert_receiver_is_total_eq( - &_self, - ) - .into(); - output - } - }; - output - }, - "", - &["_self"], - ) - .register_documented( - "clone", - |_self: Ref| { - let output: Val = { - { - let output: Val = ::clone( - &_self, - ) - .into(); - output - } - }; - output - }, - "", - &["_self"], - ) - .register_documented( - "eq", - | - _self: Ref, - other: Ref| - { - let output: bool = { - { - let output: bool = >::eq(&_self, &other) - .into(); - output - } - }; - output - }, - "", - &["_self", "other"], - ) - .register_documented( - "index", - |_self: Val| { - let output: usize = { - { - let output: usize = bevy::ecs::component::ComponentId::index( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns the index of the current component.", - &["_self"], - ) - .register_documented( - "new", - |index: usize| { - let output: Val = { - { - let output: Val = bevy::ecs::component::ComponentId::new( - index, - ) - .into(); - output - } - }; - output - }, - " Creates a new [`ComponentId`].\n The `index` is a unique value associated with each type of component in a given world.\n Usually, this value is taken from a counter incremented for each type of component registered with the world.", - &["index"], - ); - let registry = world - .get_resource_or_init::(); - let mut registry = registry.write(); - registry - .register_type_data::< - bevy::ecs::component::ComponentId, - bevy_mod_scripting_core::bindings::MarkAsGenerated, - >(); + fn clone( + _self: Ref<::bevy_ecs::hierarchy::ChildOf>, + ) -> Val<::bevy_ecs::hierarchy::ChildOf> { + let output: Val<::bevy_ecs::hierarchy::ChildOf> = <::bevy_ecs::hierarchy::ChildOf as ::core::clone::Clone>::clone( + &_self, + ) + .into(); + output } - pub(crate) fn register_default_query_filters_functions( - world: &mut bevy::ecs::world::World, - ) { - bevy_mod_scripting_core::bindings::function::namespace::NamespaceBuilder::< - bevy::ecs::entity_disabling::DefaultQueryFilters, - >::new(world) - .register_documented( - "empty", - || { - let output: Val = { - { - let output: Val< - bevy::ecs::entity_disabling::DefaultQueryFilters, - > = bevy::ecs::entity_disabling::DefaultQueryFilters::empty() - .into(); - output - } - }; - output - }, - " Creates a new, completely empty [`DefaultQueryFilters`].\n This is provided as an escape hatch; in most cases you should initialize this using [`FromWorld`],\n which is automatically called when creating a new [`World`].", - &[], - ) - .register_documented( - "register_disabling_component", - | - mut _self: Mut, - component_id: Val| - { - let output: () = { - { - let output: () = bevy::ecs::entity_disabling::DefaultQueryFilters::register_disabling_component( - &mut _self, - component_id.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Adds this [`ComponentId`] to the set of [`DefaultQueryFilters`],\n causing entities with this component to be excluded from queries.\n This method is idempotent, and will not add the same component multiple times.\n # Warning\n This method should only be called before the app starts, as it will not affect queries\n initialized before it is called.\n As discussed in the [module docs](crate::entity_disabling), this can have performance implications,\n as well as create interoperability issues, and should be used with caution.", - &["_self", "component_id"], - ); - let registry = world - .get_resource_or_init::(); - let mut registry = registry.write(); - registry - .register_type_data::< - bevy::ecs::entity_disabling::DefaultQueryFilters, - bevy_mod_scripting_core::bindings::MarkAsGenerated, - >(); + fn eq( + _self: Ref<::bevy_ecs::hierarchy::ChildOf>, + other: Ref<::bevy_ecs::hierarchy::ChildOf>, + ) -> bool { + let output: bool = <::bevy_ecs::hierarchy::ChildOf as ::core::cmp::PartialEq< + ::bevy_ecs::hierarchy::ChildOf, + >>::eq(&_self, &other) + .into(); + output } - pub(crate) fn register_tick_functions(world: &mut bevy::ecs::world::World) { - bevy_mod_scripting_core::bindings::function::namespace::NamespaceBuilder::< - bevy::ecs::component::Tick, - >::new(world) - .register_documented( - "assert_receiver_is_total_eq", - |_self: Ref| { - let output: () = { - { - let output: () = ::assert_receiver_is_total_eq( - &_self, - ) - .into(); - output - } - }; - output - }, - "", - &["_self"], - ) - .register_documented( - "clone", - |_self: Ref| { - let output: Val = { - { - let output: Val = ::clone( - &_self, - ) - .into(); - output - } - }; - output - }, - "", - &["_self"], - ) - .register_documented( - "eq", - | - _self: Ref, - other: Ref| - { - let output: bool = { - { - let output: bool = >::eq(&_self, &other) - .into(); - output - } - }; - output - }, - "", - &["_self", "other"], - ) - .register_documented( - "get", - |_self: Val| { - let output: u32 = { - { - let output: u32 = bevy::ecs::component::Tick::get( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Gets the value of this change tick.", - &["_self"], - ) - .register_documented( - "is_newer_than", - | - _self: Val, - last_run: Val, - this_run: Val| - { - let output: bool = { - { - let output: bool = bevy::ecs::component::Tick::is_newer_than( - _self.into_inner(), - last_run.into_inner(), - this_run.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns `true` if this `Tick` occurred since the system's `last_run`.\n `this_run` is the current tick of the system, used as a reference to help deal with wraparound.", - &["_self", "last_run", "this_run"], - ) - .register_documented( - "new", - |tick: u32| { - let output: Val = { - { - let output: Val = bevy::ecs::component::Tick::new( - tick, - ) - .into(); - output - } - }; - output - }, - " Creates a new [`Tick`] wrapping the given value.", - &["tick"], - ) - .register_documented( - "set", - |mut _self: Mut, tick: u32| { - let output: () = { - { - let output: () = bevy::ecs::component::Tick::set( - &mut _self, - tick, - ) - .into(); - output - } - }; - output - }, - " Sets the value of this change tick.", - &["_self", "tick"], - ); - let registry = world - .get_resource_or_init::(); - let mut registry = registry.write(); - registry - .register_type_data::< - bevy::ecs::component::Tick, - bevy_mod_scripting_core::bindings::MarkAsGenerated, - >(); + /// The parent entity of this child entity. + fn get( + _self: Ref<::bevy_ecs::hierarchy::ChildOf>, + ) -> Val<::bevy_ecs::entity::Entity> { + let output: Val<::bevy_ecs::entity::Entity> = ::bevy_ecs::hierarchy::ChildOf::get( + &_self, + ) + .into(); + output } - pub(crate) fn register_component_ticks_functions( - world: &mut bevy::ecs::world::World, - ) { - bevy_mod_scripting_core::bindings::function::namespace::NamespaceBuilder::< - bevy::ecs::component::ComponentTicks, - >::new(world) - .register_documented( - "clone", - |_self: Ref| { - let output: Val = { - { - let output: Val = ::clone( - &_self, - ) - .into(); - output - } - }; - output - }, - "", - &["_self"], - ) - .register_documented( - "is_added", - | - _self: Ref, - last_run: Val, - this_run: Val| - { - let output: bool = { - { - let output: bool = bevy::ecs::component::ComponentTicks::is_added( - &_self, - last_run.into_inner(), - this_run.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns `true` if the component or resource was added after the system last ran\n (or the system is running for the first time).", - &["_self", "last_run", "this_run"], - ) - .register_documented( - "is_changed", - | - _self: Ref, - last_run: Val, - this_run: Val| - { - let output: bool = { - { - let output: bool = bevy::ecs::component::ComponentTicks::is_changed( - &_self, - last_run.into_inner(), - this_run.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns `true` if the component or resource was added or mutably dereferenced after the system last ran\n (or the system is running for the first time).", - &["_self", "last_run", "this_run"], - ) - .register_documented( - "new", - |change_tick: Val| { - let output: Val = { - { - let output: Val = bevy::ecs::component::ComponentTicks::new( - change_tick.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Creates a new instance with the same change tick for `added` and `changed`.", - &["change_tick"], - ) - .register_documented( - "set_changed", - | - mut _self: Mut, - change_tick: Val| - { - let output: () = { - { - let output: () = bevy::ecs::component::ComponentTicks::set_changed( - &mut _self, - change_tick.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Manually sets the change tick.\n This is normally done automatically via the [`DerefMut`] implementation\n on [`Mut`](crate::change_detection::Mut), [`ResMut`](crate::change_detection::ResMut), etc.\n However, components and resources that make use of interior mutability might require manual updates.\n # Example\n ```no_run\n # use bevy_ecs::{world::World, component::ComponentTicks};\n let world: World = unimplemented!();\n let component_ticks: ComponentTicks = unimplemented!();\n component_ticks.set_changed(world.read_change_tick());\n ```", - &["_self", "change_tick"], - ); - let registry = world - .get_resource_or_init::(); - let mut registry = registry.write(); - registry - .register_type_data::< - bevy::ecs::component::ComponentTicks, - bevy_mod_scripting_core::bindings::MarkAsGenerated, - >(); + /// The parent entity of this child entity. + fn parent( + _self: Ref<::bevy_ecs::hierarchy::ChildOf>, + ) -> Val<::bevy_ecs::entity::Entity> { + let output: Val<::bevy_ecs::entity::Entity> = ::bevy_ecs::hierarchy::ChildOf::parent( + &_self, + ) + .into(); + output } - pub(crate) fn register_entity_hash_set_functions( - world: &mut bevy::ecs::world::World, - ) { - bevy_mod_scripting_core::bindings::function::namespace::NamespaceBuilder::< - bevy::ecs::entity::hash_set::EntityHashSet, - >::new(world) - .register_documented( - "assert_receiver_is_total_eq", - |_self: Ref| { - let output: () = { - { - let output: () = ::assert_receiver_is_total_eq( - &_self, - ) - .into(); - output - } - }; - output - }, - "", - &["_self"], - ) - .register_documented( - "clone", - |_self: Ref| { - let output: Val = { - { - let output: Val< - bevy::ecs::entity::hash_set::EntityHashSet, - > = ::clone( - &_self, - ) - .into(); - output - } - }; - output - }, - "", - &["_self"], - ) - .register_documented( - "eq", - | - _self: Ref, - other: Ref| - { - let output: bool = { - { - let output: bool = >::eq(&_self, &other) - .into(); - output - } - }; - output - }, - "", - &["_self", "other"], - ) - .register_documented( - "is_empty", - |_self: Ref| { - let output: bool = { - { - let output: bool = bevy::ecs::entity::hash_set::EntityHashSet::is_empty( - &_self, - ) - .into(); - output - } - }; - output - }, - " Returns `true` if the set contains no elements.", - &["_self"], - ) - .register_documented( - "len", - |_self: Ref| { - let output: usize = { - { - let output: usize = bevy::ecs::entity::hash_set::EntityHashSet::len( - &_self, - ) - .into(); - output - } - }; - output - }, - " Returns the number of elements in the set.", - &["_self"], - ) - .register_documented( - "new", - || { - let output: Val = { - { - let output: Val< - bevy::ecs::entity::hash_set::EntityHashSet, - > = bevy::ecs::entity::hash_set::EntityHashSet::new().into(); - output - } - }; - output - }, - " Creates an empty `EntityHashSet`.\n Equivalent to [`HashSet::with_hasher(EntityHash)`].\n [`HashSet::with_hasher(EntityHash)`]: HashSet::with_hasher", - &[], - ) - .register_documented( - "with_capacity", - |n: usize| { - let output: Val = { - { - let output: Val< - bevy::ecs::entity::hash_set::EntityHashSet, - > = bevy::ecs::entity::hash_set::EntityHashSet::with_capacity( - n, - ) - .into(); - output - } - }; - output - }, - " Creates an empty `EntityHashSet` with the specified capacity.\n Equivalent to [`HashSet::with_capacity_and_hasher(n, EntityHash)`].\n [`HashSet::with_capacity_and_hasher(n, EntityHash)`]: HashSet::with_capacity_and_hasher", - &["n"], - ); - let registry = world - .get_resource_or_init::(); - let mut registry = registry.write(); - registry - .register_type_data::< - bevy::ecs::entity::hash_set::EntityHashSet, - bevy_mod_scripting_core::bindings::MarkAsGenerated, - >(); +} +#[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<::bevy_ecs::hierarchy::Children>) -> () { + let output: () = <::bevy_ecs::hierarchy::Children as ::core::cmp::Eq>::assert_receiver_is_total_eq( + &_self, + ) + .into(); + output } - pub(crate) fn register_identifier_functions(world: &mut bevy::ecs::world::World) { - bevy_mod_scripting_core::bindings::function::namespace::NamespaceBuilder::< - bevy::ecs::identifier::Identifier, - >::new(world) - .register_documented( - "clone", - |_self: Ref| { - let output: Val = { - { - let output: Val = ::clone( - &_self, - ) - .into(); - output - } - }; - output - }, - "", - &["_self"], - ) - .register_documented( - "eq", - | - _self: Ref, - other: Ref| - { - let output: bool = { - { - let output: bool = >::eq(&_self, &other) - .into(); - output - } - }; - output - }, - "", - &["_self", "other"], - ) - .register_documented( - "from_bits", - |value: u64| { - let output: Val = { - { - let output: Val = bevy::ecs::identifier::Identifier::from_bits( - value, - ) - .into(); - output - } - }; - output - }, - " Convert a `u64` into an [`Identifier`].\n # Panics\n This method will likely panic if given `u64` values that did not come from [`Identifier::to_bits`].", - &["value"], - ) - .register_documented( - "low", - |_self: Val| { - let output: u32 = { - { - let output: u32 = bevy::ecs::identifier::Identifier::low( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns the value of the low segment of the [`Identifier`].", - &["_self"], - ) - .register_documented( - "masked_high", - |_self: Val| { - let output: u32 = { - { - let output: u32 = bevy::ecs::identifier::Identifier::masked_high( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns the masked value of the high segment of the [`Identifier`].\n Does not include the flag bits.", - &["_self"], + fn eq( + _self: Ref<::bevy_ecs::hierarchy::Children>, + other: Ref<::bevy_ecs::hierarchy::Children>, + ) -> bool { + let output: bool = <::bevy_ecs::hierarchy::Children as ::core::cmp::PartialEq< + ::bevy_ecs::hierarchy::Children, + >>::eq(&_self, &other) + .into(); + output + } + /// Swaps the child at `a_index` with the child at `b_index`. + fn swap( + mut _self: Mut<::bevy_ecs::hierarchy::Children>, + 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<::bevy_ecs::name::Name>) -> Val<::bevy_ecs::name::Name> { + let output: Val<::bevy_ecs::name::Name> = <::bevy_ecs::name::Name as ::core::clone::Clone>::clone( + &_self, + ) + .into(); + output + } + fn eq( + _self: Ref<::bevy_ecs::name::Name>, + other: Ref<::bevy_ecs::name::Name>, + ) -> bool { + let output: bool = <::bevy_ecs::name::Name as ::core::cmp::PartialEq< + ::bevy_ecs::name::Name, + >>::eq(&_self, &other) + .into(); + output + } +} +#[script_bindings( + remote, + name = "on_add_functions", + bms_core_path = "bevy_mod_scripting_core", + generated +)] +impl ::bevy_ecs::world::OnAdd {} +#[script_bindings( + remote, + name = "on_insert_functions", + bms_core_path = "bevy_mod_scripting_core", + generated +)] +impl ::bevy_ecs::world::OnInsert {} +#[script_bindings( + remote, + name = "on_remove_functions", + bms_core_path = "bevy_mod_scripting_core", + generated +)] +impl ::bevy_ecs::world::OnRemove {} +#[script_bindings( + remote, + name = "on_replace_functions", + bms_core_path = "bevy_mod_scripting_core", + generated +)] +impl ::bevy_ecs::world::OnReplace {} +#[script_bindings( + remote, + name = "component_id_functions", + bms_core_path = "bevy_mod_scripting_core", + generated +)] +impl ::bevy_ecs::component::ComponentId { + fn assert_receiver_is_total_eq( + _self: Ref<::bevy_ecs::component::ComponentId>, + ) -> () { + let output: () = <::bevy_ecs::component::ComponentId as ::core::cmp::Eq>::assert_receiver_is_total_eq( + &_self, + ) + .into(); + output + } + fn clone( + _self: Ref<::bevy_ecs::component::ComponentId>, + ) -> Val<::bevy_ecs::component::ComponentId> { + let output: Val<::bevy_ecs::component::ComponentId> = <::bevy_ecs::component::ComponentId as ::core::clone::Clone>::clone( + &_self, + ) + .into(); + output + } + fn eq( + _self: Ref<::bevy_ecs::component::ComponentId>, + other: Ref<::bevy_ecs::component::ComponentId>, + ) -> bool { + let output: bool = <::bevy_ecs::component::ComponentId as ::core::cmp::PartialEq< + ::bevy_ecs::component::ComponentId, + >>::eq(&_self, &other) + .into(); + output + } + /// Returns the index of the current component. + fn index(_self: Val<::bevy_ecs::component::ComponentId>) -> usize { + let output: usize = ::bevy_ecs::component::ComponentId::index(_self.into_inner()) + .into(); + output + } + /// Creates a new [`ComponentId`]. + /// The `index` is a unique value associated with each type of component in a given world. + /// Usually, this value is taken from a counter incremented for each type of component registered with the world. + fn new(index: usize) -> Val<::bevy_ecs::component::ComponentId> { + let output: Val<::bevy_ecs::component::ComponentId> = ::bevy_ecs::component::ComponentId::new( + index, + ) + .into(); + 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<::bevy_ecs::entity_disabling::DefaultQueryFilters> { + let output: Val<::bevy_ecs::entity_disabling::DefaultQueryFilters> = ::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<::bevy_ecs::entity_disabling::DefaultQueryFilters>, + component_id: Val<::bevy_ecs::component::ComponentId>, + ) -> () { + let output: () = ::bevy_ecs::entity_disabling::DefaultQueryFilters::register_disabling_component( + &mut _self, + component_id.into_inner(), + ) + .into(); + output + } +} +#[script_bindings( + remote, + name = "tick_functions", + bms_core_path = "bevy_mod_scripting_core", + generated +)] +impl ::bevy_ecs::component::Tick { + fn assert_receiver_is_total_eq(_self: Ref<::bevy_ecs::component::Tick>) -> () { + let output: () = <::bevy_ecs::component::Tick as ::core::cmp::Eq>::assert_receiver_is_total_eq( + &_self, + ) + .into(); + output + } + fn clone( + _self: Ref<::bevy_ecs::component::Tick>, + ) -> Val<::bevy_ecs::component::Tick> { + let output: Val<::bevy_ecs::component::Tick> = <::bevy_ecs::component::Tick as ::core::clone::Clone>::clone( + &_self, + ) + .into(); + output + } + fn eq( + _self: Ref<::bevy_ecs::component::Tick>, + other: Ref<::bevy_ecs::component::Tick>, + ) -> bool { + let output: bool = <::bevy_ecs::component::Tick as ::core::cmp::PartialEq< + ::bevy_ecs::component::Tick, + >>::eq(&_self, &other) + .into(); + output + } + /// Gets the value of this change tick. + fn get(_self: Val<::bevy_ecs::component::Tick>) -> u32 { + let output: u32 = ::bevy_ecs::component::Tick::get(_self.into_inner()).into(); + output + } + /// Returns `true` if this `Tick` occurred since the system's `last_run`. + /// `this_run` is the current tick of the system, used as a reference to help deal with wraparound. + fn is_newer_than( + _self: Val<::bevy_ecs::component::Tick>, + last_run: Val<::bevy_ecs::component::Tick>, + this_run: Val<::bevy_ecs::component::Tick>, + ) -> bool { + let output: bool = ::bevy_ecs::component::Tick::is_newer_than( + _self.into_inner(), + last_run.into_inner(), + this_run.into_inner(), + ) + .into(); + output + } + /// Creates a new [`Tick`] wrapping the given value. + fn new(tick: u32) -> Val<::bevy_ecs::component::Tick> { + let output: Val<::bevy_ecs::component::Tick> = ::bevy_ecs::component::Tick::new( + tick, ) - .register_documented( - "to_bits", - |_self: Val| { - let output: u64 = { - { - let output: u64 = bevy::ecs::identifier::Identifier::to_bits( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Convert the [`Identifier`] into a `u64`.", - &["_self"], - ); - let registry = world - .get_resource_or_init::(); - let mut registry = registry.write(); - registry - .register_type_data::< - bevy::ecs::identifier::Identifier, - bevy_mod_scripting_core::bindings::MarkAsGenerated, - >(); + .into(); + output + } + /// Sets the value of this change tick. + fn set(mut _self: Mut<::bevy_ecs::component::Tick>, tick: u32) -> () { + let output: () = ::bevy_ecs::component::Tick::set(&mut _self, tick).into(); + output + } +} +#[script_bindings( + remote, + name = "component_ticks_functions", + bms_core_path = "bevy_mod_scripting_core", + generated +)] +impl ::bevy_ecs::component::ComponentTicks { + fn clone( + _self: Ref<::bevy_ecs::component::ComponentTicks>, + ) -> Val<::bevy_ecs::component::ComponentTicks> { + let output: Val<::bevy_ecs::component::ComponentTicks> = <::bevy_ecs::component::ComponentTicks as ::core::clone::Clone>::clone( + &_self, + ) + .into(); + output + } + /// Returns `true` if the component or resource was added after the system last ran + /// (or the system is running for the first time). + fn is_added( + _self: Ref<::bevy_ecs::component::ComponentTicks>, + last_run: Val<::bevy_ecs::component::Tick>, + this_run: Val<::bevy_ecs::component::Tick>, + ) -> bool { + let output: bool = ::bevy_ecs::component::ComponentTicks::is_added( + &_self, + last_run.into_inner(), + this_run.into_inner(), + ) + .into(); + output + } + /// Returns `true` if the component or resource was added or mutably dereferenced after the system last ran + /// (or the system is running for the first time). + fn is_changed( + _self: Ref<::bevy_ecs::component::ComponentTicks>, + last_run: Val<::bevy_ecs::component::Tick>, + this_run: Val<::bevy_ecs::component::Tick>, + ) -> bool { + let output: bool = ::bevy_ecs::component::ComponentTicks::is_changed( + &_self, + last_run.into_inner(), + this_run.into_inner(), + ) + .into(); + output + } + /// Creates a new instance with the same change tick for `added` and `changed`. + fn new( + change_tick: Val<::bevy_ecs::component::Tick>, + ) -> Val<::bevy_ecs::component::ComponentTicks> { + let output: Val<::bevy_ecs::component::ComponentTicks> = ::bevy_ecs::component::ComponentTicks::new( + change_tick.into_inner(), + ) + .into(); + output + } + /// Manually sets the change tick. + /// 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 + /// ```no_run + /// # use bevy_ecs::{world::World, component::ComponentTicks}; + /// let world: World = unimplemented!(); + /// let component_ticks: ComponentTicks = unimplemented!(); + /// component_ticks.set_changed(world.read_change_tick()); + /// ``` + fn set_changed( + mut _self: Mut<::bevy_ecs::component::ComponentTicks>, + change_tick: Val<::bevy_ecs::component::Tick>, + ) -> () { + let output: () = ::bevy_ecs::component::ComponentTicks::set_changed( + &mut _self, + change_tick.into_inner(), + ) + .into(); + 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<::bevy_ecs::entity::hash_set::EntityHashSet>, + ) -> () { + let output: () = <::bevy_ecs::entity::hash_set::EntityHashSet as ::core::cmp::Eq>::assert_receiver_is_total_eq( + &_self, + ) + .into(); + output + } + fn clone( + _self: Ref<::bevy_ecs::entity::hash_set::EntityHashSet>, + ) -> Val<::bevy_ecs::entity::hash_set::EntityHashSet> { + let output: Val<::bevy_ecs::entity::hash_set::EntityHashSet> = <::bevy_ecs::entity::hash_set::EntityHashSet as ::core::clone::Clone>::clone( + &_self, + ) + .into(); + output + } + fn eq( + _self: Ref<::bevy_ecs::entity::hash_set::EntityHashSet>, + other: Ref<::bevy_ecs::entity::hash_set::EntityHashSet>, + ) -> bool { + let output: bool = <::bevy_ecs::entity::hash_set::EntityHashSet as ::core::cmp::PartialEq< + ::bevy_ecs::entity::hash_set::EntityHashSet, + >>::eq(&_self, &other) + .into(); + output + } + /// Returns `true` if the set contains no elements. + fn is_empty(_self: Ref<::bevy_ecs::entity::hash_set::EntityHashSet>) -> 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<::bevy_ecs::entity::hash_set::EntityHashSet>) -> 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<::bevy_ecs::entity::hash_set::EntityHashSet> { + let output: Val<::bevy_ecs::entity::hash_set::EntityHashSet> = ::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<::bevy_ecs::entity::hash_set::EntityHashSet> { + let output: Val<::bevy_ecs::entity::hash_set::EntityHashSet> = ::bevy_ecs::entity::hash_set::EntityHashSet::with_capacity( + n, + ) + .into(); + output + } +} +#[script_bindings( + remote, + name = "identifier_functions", + bms_core_path = "bevy_mod_scripting_core", + generated +)] +impl ::bevy_ecs::identifier::Identifier { + fn clone( + _self: Ref<::bevy_ecs::identifier::Identifier>, + ) -> Val<::bevy_ecs::identifier::Identifier> { + let output: Val<::bevy_ecs::identifier::Identifier> = <::bevy_ecs::identifier::Identifier as ::core::clone::Clone>::clone( + &_self, + ) + .into(); + output + } + fn eq( + _self: Ref<::bevy_ecs::identifier::Identifier>, + other: Ref<::bevy_ecs::identifier::Identifier>, + ) -> bool { + let output: bool = <::bevy_ecs::identifier::Identifier as ::core::cmp::PartialEq< + ::bevy_ecs::identifier::Identifier, + >>::eq(&_self, &other) + .into(); + output + } + /// Convert a `u64` into an [`Identifier`]. + /// # Panics + /// This method will likely panic if given `u64` values that did not come from [`Identifier::to_bits`]. + fn from_bits(value: u64) -> Val<::bevy_ecs::identifier::Identifier> { + let output: Val<::bevy_ecs::identifier::Identifier> = ::bevy_ecs::identifier::Identifier::from_bits( + value, + ) + .into(); + output + } + /// Returns the value of the low segment of the [`Identifier`]. + fn low(_self: Val<::bevy_ecs::identifier::Identifier>) -> u32 { + let output: u32 = ::bevy_ecs::identifier::Identifier::low(_self.into_inner()) + .into(); + output + } + /// Returns the masked value of the high segment of the [`Identifier`]. + /// Does not include the flag bits. + fn masked_high(_self: Val<::bevy_ecs::identifier::Identifier>) -> u32 { + let output: u32 = ::bevy_ecs::identifier::Identifier::masked_high( + _self.into_inner(), + ) + .into(); + output } - pub(crate) fn register_entity_hash_functions(world: &mut bevy::ecs::world::World) { - bevy_mod_scripting_core::bindings::function::namespace::NamespaceBuilder::< - bevy::ecs::entity::EntityHash, - >::new(world) - .register_documented( - "clone", - |_self: Ref| { - let output: Val = { - { - let output: Val = ::clone( - &_self, - ) - .into(); - output - } - }; - output - }, - "", - &["_self"], - ); - let registry = world - .get_resource_or_init::(); - let mut registry = registry.write(); - registry - .register_type_data::< - bevy::ecs::entity::EntityHash, - bevy_mod_scripting_core::bindings::MarkAsGenerated, - >(); + /// Convert the [`Identifier`] into a `u64`. + fn to_bits(_self: Val<::bevy_ecs::identifier::Identifier>) -> u64 { + let output: u64 = ::bevy_ecs::identifier::Identifier::to_bits(_self.into_inner()) + .into(); + output } - pub(crate) fn register_disabled_functions(world: &mut bevy::ecs::world::World) { - bevy_mod_scripting_core::bindings::function::namespace::NamespaceBuilder::< - bevy::ecs::entity_disabling::Disabled, - >::new(world) - .register_documented( - "clone", - |_self: Ref| { - let output: Val = { - { - let output: Val = ::clone( - &_self, - ) - .into(); - output - } - }; - output - }, - "", - &["_self"], - ); - let registry = world - .get_resource_or_init::(); - let mut registry = registry.write(); - registry - .register_type_data::< - bevy::ecs::entity_disabling::Disabled, - bevy_mod_scripting_core::bindings::MarkAsGenerated, - >(); +} +#[script_bindings( + remote, + name = "entity_hash_functions", + bms_core_path = "bevy_mod_scripting_core", + generated +)] +impl ::bevy_ecs::entity::EntityHash { + fn clone( + _self: Ref<::bevy_ecs::entity::EntityHash>, + ) -> Val<::bevy_ecs::entity::EntityHash> { + let output: Val<::bevy_ecs::entity::EntityHash> = <::bevy_ecs::entity::EntityHash as ::core::clone::Clone>::clone( + &_self, + ) + .into(); + output } - pub(crate) fn register_removed_component_entity_functions( - world: &mut bevy::ecs::world::World, - ) { - bevy_mod_scripting_core::bindings::function::namespace::NamespaceBuilder::< - bevy::ecs::removal_detection::RemovedComponentEntity, - >::new(world) - .register_documented( - "clone", - |_self: Ref| { - let output: Val< - bevy::ecs::removal_detection::RemovedComponentEntity, - > = { - { - let output: Val< - bevy::ecs::removal_detection::RemovedComponentEntity, - > = ::clone( - &_self, - ) - .into(); - output - } - }; - output - }, - "", - &["_self"], - ); - let registry = world - .get_resource_or_init::(); - let mut registry = registry.write(); - registry - .register_type_data::< - bevy::ecs::removal_detection::RemovedComponentEntity, - bevy_mod_scripting_core::bindings::MarkAsGenerated, - >(); +} +#[script_bindings( + remote, + name = "disabled_functions", + bms_core_path = "bevy_mod_scripting_core", + generated +)] +impl ::bevy_ecs::entity_disabling::Disabled { + fn clone( + _self: Ref<::bevy_ecs::entity_disabling::Disabled>, + ) -> Val<::bevy_ecs::entity_disabling::Disabled> { + let output: Val<::bevy_ecs::entity_disabling::Disabled> = <::bevy_ecs::entity_disabling::Disabled as ::core::clone::Clone>::clone( + &_self, + ) + .into(); + output } - pub(crate) fn register_system_id_marker_functions( - world: &mut bevy::ecs::world::World, - ) { - bevy_mod_scripting_core::bindings::function::namespace::NamespaceBuilder::< - bevy::ecs::system::SystemIdMarker, - >::new(world); - let registry = world - .get_resource_or_init::(); - let mut registry = registry.write(); - registry - .register_type_data::< - bevy::ecs::system::SystemIdMarker, - bevy_mod_scripting_core::bindings::MarkAsGenerated, - >(); +} +#[script_bindings( + remote, + name = "removed_component_entity_functions", + bms_core_path = "bevy_mod_scripting_core", + generated +)] +impl ::bevy_ecs::removal_detection::RemovedComponentEntity { + fn clone( + _self: Ref<::bevy_ecs::removal_detection::RemovedComponentEntity>, + ) -> Val<::bevy_ecs::removal_detection::RemovedComponentEntity> { + let output: Val<::bevy_ecs::removal_detection::RemovedComponentEntity> = <::bevy_ecs::removal_detection::RemovedComponentEntity as ::core::clone::Clone>::clone( + &_self, + ) + .into(); + output } - pub(crate) fn register_on_despawn_functions(world: &mut bevy::ecs::world::World) { - bevy_mod_scripting_core::bindings::function::namespace::NamespaceBuilder::< - bevy::ecs::world::OnDespawn, - >::new(world); - let registry = world - .get_resource_or_init::(); - let mut registry = registry.write(); - registry - .register_type_data::< - bevy::ecs::world::OnDespawn, - bevy_mod_scripting_core::bindings::MarkAsGenerated, - >(); +} +#[script_bindings( + remote, + name = "system_id_marker_functions", + bms_core_path = "bevy_mod_scripting_core", + 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 Plugin for BevyEcsScriptingPlugin { + fn build(&self, app: &mut 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); } - 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); - } - } \ No newline at end of file +} 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 c463540d41..0fbcbba30f 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 @@ -1,2992 +1,1615 @@ - #![allow(clippy::all)] - #![allow(unused, deprecated, dead_code)] - 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 BevyInputScriptingPlugin; - pub(crate) fn register_gamepad_functions(world: &mut bevy::ecs::world::World) { - bevy_mod_scripting_core::bindings::function::namespace::NamespaceBuilder::< - bevy::input::gamepad::Gamepad, - >::new(world) - .register_documented( - "dpad", - |_self: Ref| { - let output: Val = { - { - let output: Val = bevy::input::gamepad::Gamepad::dpad( - &_self, - ) - .into(); - output - } - }; - output - }, - " Returns the directional pad as a [`Vec2`].", - &["_self"], - ) - .register_documented( - "just_pressed", - | - _self: Ref, - button_type: Val| - { - let output: bool = { - { - let output: bool = bevy::input::gamepad::Gamepad::just_pressed( - &_self, - button_type.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns `true` if the [`GamepadButton`] has been pressed during the current frame.\n Note: This function does not imply information regarding the current state of [`ButtonInput::pressed`] or [`ButtonInput::just_released`].", - &["_self", "button_type"], - ) - .register_documented( - "just_released", - | - _self: Ref, - button_type: Val| - { - let output: bool = { - { - let output: bool = bevy::input::gamepad::Gamepad::just_released( - &_self, - button_type.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns `true` if the [`GamepadButton`] has been released during the current frame.\n Note: This function does not imply information regarding the current state of [`ButtonInput::pressed`] or [`ButtonInput::just_pressed`].", - &["_self", "button_type"], - ) - .register_documented( - "left_stick", - |_self: Ref| { - let output: Val = { - { - let output: Val = bevy::input::gamepad::Gamepad::left_stick( - &_self, - ) - .into(); - output - } - }; - output - }, - " Returns the left stick as a [`Vec2`].", - &["_self"], - ) - .register_documented( - "pressed", - | - _self: Ref, - button_type: Val| - { - let output: bool = { - { - let output: bool = bevy::input::gamepad::Gamepad::pressed( - &_self, - button_type.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns `true` if the [`GamepadButton`] has been pressed.", - &["_self", "button_type"], - ) - .register_documented( - "product_id", - |_self: Ref| { - let output: ::core::option::Option = { - { - let output: ::core::option::Option = bevy::input::gamepad::Gamepad::product_id( - &_self, - ) - .into(); - output - } - }; - output - }, - " Returns the USB product ID as assigned by the [vendor], if available.\n [vendor]: Self::vendor_id", - &["_self"], - ) - .register_documented( - "right_stick", - |_self: Ref| { - let output: Val = { - { - let output: Val = bevy::input::gamepad::Gamepad::right_stick( - &_self, - ) - .into(); - output - } - }; - output - }, - " Returns the right stick as a [`Vec2`].", - &["_self"], - ) - .register_documented( - "vendor_id", - |_self: Ref| { - let output: ::core::option::Option = { - { - let output: ::core::option::Option = bevy::input::gamepad::Gamepad::vendor_id( - &_self, - ) - .into(); - output - } - }; - output - }, - " Returns the USB vendor ID as assigned by the USB-IF, if available.", - &["_self"], - ); - let registry = world - .get_resource_or_init::(); - let mut registry = registry.write(); - registry - .register_type_data::< - bevy::input::gamepad::Gamepad, - bevy_mod_scripting_core::bindings::MarkAsGenerated, - >(); - } - pub(crate) fn register_gamepad_axis_functions(world: &mut bevy::ecs::world::World) { - bevy_mod_scripting_core::bindings::function::namespace::NamespaceBuilder::< - bevy::input::gamepad::GamepadAxis, - >::new(world) - .register_documented( - "assert_receiver_is_total_eq", - |_self: Ref| { - let output: () = { - { - let output: () = ::assert_receiver_is_total_eq( - &_self, - ) - .into(); - output - } - }; - output - }, - "", - &["_self"], - ) - .register_documented( - "clone", - |_self: Ref| { - let output: Val = { - { - let output: Val = ::clone( - &_self, - ) - .into(); - output - } - }; - output - }, - "", - &["_self"], - ) - .register_documented( - "eq", - | - _self: Ref, - other: Ref| - { - let output: bool = { - { - let output: bool = >::eq(&_self, &other) - .into(); - output - } - }; - output - }, - "", - &["_self", "other"], - ); - let registry = world - .get_resource_or_init::(); - let mut registry = registry.write(); - registry - .register_type_data::< - bevy::input::gamepad::GamepadAxis, - bevy_mod_scripting_core::bindings::MarkAsGenerated, - >(); - } - pub(crate) fn register_gamepad_button_functions( - world: &mut bevy::ecs::world::World, - ) { - bevy_mod_scripting_core::bindings::function::namespace::NamespaceBuilder::< - bevy::input::gamepad::GamepadButton, - >::new(world) - .register_documented( - "assert_receiver_is_total_eq", - |_self: Ref| { - let output: () = { - { - let output: () = ::assert_receiver_is_total_eq( - &_self, - ) - .into(); - output - } - }; - output - }, - "", - &["_self"], - ) - .register_documented( - "clone", - |_self: Ref| { - let output: Val = { - { - let output: Val = ::clone( - &_self, - ) - .into(); - output - } - }; - output - }, - "", - &["_self"], - ) - .register_documented( - "eq", - | - _self: Ref, - other: Ref| - { - let output: bool = { - { - let output: bool = >::eq(&_self, &other) - .into(); - output - } - }; - output - }, - "", - &["_self", "other"], - ); - let registry = world - .get_resource_or_init::(); - let mut registry = registry.write(); - registry - .register_type_data::< - bevy::input::gamepad::GamepadButton, - bevy_mod_scripting_core::bindings::MarkAsGenerated, - >(); - } - pub(crate) fn register_gamepad_settings_functions( - world: &mut bevy::ecs::world::World, - ) { - bevy_mod_scripting_core::bindings::function::namespace::NamespaceBuilder::< - bevy::input::gamepad::GamepadSettings, - >::new(world) - .register_documented( - "clone", - |_self: Ref| { - let output: Val = { - { - let output: Val = ::clone( - &_self, - ) - .into(); - output - } - }; - output - }, - "", - &["_self"], - ); - let registry = world - .get_resource_or_init::(); - let mut registry = registry.write(); - registry - .register_type_data::< - bevy::input::gamepad::GamepadSettings, - bevy_mod_scripting_core::bindings::MarkAsGenerated, - >(); - } - pub(crate) fn register_key_code_functions(world: &mut bevy::ecs::world::World) { - bevy_mod_scripting_core::bindings::function::namespace::NamespaceBuilder::< - bevy::input::keyboard::KeyCode, - >::new(world) - .register_documented( - "assert_receiver_is_total_eq", - |_self: Ref| { - let output: () = { - { - let output: () = ::assert_receiver_is_total_eq( - &_self, - ) - .into(); - output - } - }; - output - }, - "", - &["_self"], - ) - .register_documented( - "clone", - |_self: Ref| { - let output: Val = { - { - let output: Val = ::clone( - &_self, - ) - .into(); - output - } - }; - output - }, - "", - &["_self"], - ) - .register_documented( - "eq", - | - _self: Ref, - other: Ref| - { - let output: bool = { - { - let output: bool = >::eq(&_self, &other) - .into(); - output - } - }; - output - }, - "", - &["_self", "other"], - ); - let registry = world - .get_resource_or_init::(); - let mut registry = registry.write(); - registry - .register_type_data::< - bevy::input::keyboard::KeyCode, - bevy_mod_scripting_core::bindings::MarkAsGenerated, - >(); - } - pub(crate) fn register_mouse_button_functions(world: &mut bevy::ecs::world::World) { - bevy_mod_scripting_core::bindings::function::namespace::NamespaceBuilder::< - bevy::input::mouse::MouseButton, - >::new(world) - .register_documented( - "assert_receiver_is_total_eq", - |_self: Ref| { - let output: () = { - { - let output: () = ::assert_receiver_is_total_eq( - &_self, - ) - .into(); - output - } - }; - output - }, - "", - &["_self"], - ) - .register_documented( - "clone", - |_self: Ref| { - let output: Val = { - { - let output: Val = ::clone( - &_self, - ) - .into(); - output - } - }; - output - }, - "", - &["_self"], - ) - .register_documented( - "eq", - | - _self: Ref, - other: Ref| - { - let output: bool = { - { - let output: bool = >::eq(&_self, &other) - .into(); - output - } - }; - output - }, - "", - &["_self", "other"], - ); - let registry = world - .get_resource_or_init::(); - let mut registry = registry.write(); - registry - .register_type_data::< - bevy::input::mouse::MouseButton, - bevy_mod_scripting_core::bindings::MarkAsGenerated, - >(); - } - pub(crate) fn register_touch_input_functions(world: &mut bevy::ecs::world::World) { - bevy_mod_scripting_core::bindings::function::namespace::NamespaceBuilder::< - bevy::input::touch::TouchInput, - >::new(world) - .register_documented( - "clone", - |_self: Ref| { - let output: Val = { - { - let output: Val = ::clone( - &_self, - ) - .into(); - output - } - }; - output - }, - "", - &["_self"], - ) - .register_documented( - "eq", - | - _self: Ref, - other: Ref| - { - let output: bool = { - { - let output: bool = >::eq(&_self, &other) - .into(); - output - } - }; - output - }, - "", - &["_self", "other"], - ); - let registry = world - .get_resource_or_init::(); - let mut registry = registry.write(); - registry - .register_type_data::< - bevy::input::touch::TouchInput, - bevy_mod_scripting_core::bindings::MarkAsGenerated, - >(); - } - pub(crate) fn register_keyboard_focus_lost_functions( - world: &mut bevy::ecs::world::World, - ) { - bevy_mod_scripting_core::bindings::function::namespace::NamespaceBuilder::< - bevy::input::keyboard::KeyboardFocusLost, - >::new(world) - .register_documented( - "assert_receiver_is_total_eq", - |_self: Ref| { - let output: () = { - { - let output: () = ::assert_receiver_is_total_eq( - &_self, - ) - .into(); - output - } - }; - output - }, - "", - &["_self"], - ) - .register_documented( - "clone", - |_self: Ref| { - let output: Val = { - { - let output: Val = ::clone( - &_self, - ) - .into(); - output - } - }; - output - }, - "", - &["_self"], - ) - .register_documented( - "eq", - | - _self: Ref, - other: Ref| - { - let output: bool = { - { - let output: bool = >::eq(&_self, &other) - .into(); - output - } - }; - output - }, - "", - &["_self", "other"], - ); - let registry = world - .get_resource_or_init::(); - let mut registry = registry.write(); - registry - .register_type_data::< - bevy::input::keyboard::KeyboardFocusLost, - bevy_mod_scripting_core::bindings::MarkAsGenerated, - >(); - } - pub(crate) fn register_keyboard_input_functions( - world: &mut bevy::ecs::world::World, - ) { - bevy_mod_scripting_core::bindings::function::namespace::NamespaceBuilder::< - bevy::input::keyboard::KeyboardInput, - >::new(world) - .register_documented( - "assert_receiver_is_total_eq", - |_self: Ref| { - let output: () = { - { - let output: () = ::assert_receiver_is_total_eq( - &_self, - ) - .into(); - output - } - }; - output - }, - "", - &["_self"], - ) - .register_documented( - "clone", - |_self: Ref| { - let output: Val = { - { - let output: Val = ::clone( - &_self, - ) - .into(); - output - } - }; - output - }, - "", - &["_self"], - ) - .register_documented( - "eq", - | - _self: Ref, - other: Ref| - { - let output: bool = { - { - let output: bool = >::eq(&_self, &other) - .into(); - output - } - }; - output - }, - "", - &["_self", "other"], - ); - let registry = world - .get_resource_or_init::(); - let mut registry = registry.write(); - registry - .register_type_data::< - bevy::input::keyboard::KeyboardInput, - bevy_mod_scripting_core::bindings::MarkAsGenerated, - >(); - } - pub(crate) fn register_accumulated_mouse_motion_functions( - world: &mut bevy::ecs::world::World, - ) { - bevy_mod_scripting_core::bindings::function::namespace::NamespaceBuilder::< - bevy::input::mouse::AccumulatedMouseMotion, - >::new(world) - .register_documented( - "clone", - |_self: Ref| { - let output: Val = { - { - let output: Val< - bevy::input::mouse::AccumulatedMouseMotion, - > = ::clone( - &_self, - ) - .into(); - output - } - }; - output - }, - "", - &["_self"], - ) - .register_documented( - "eq", - | - _self: Ref, - other: Ref| - { - let output: bool = { - { - let output: bool = >::eq(&_self, &other) - .into(); - output - } - }; - output - }, - "", - &["_self", "other"], - ); - let registry = world - .get_resource_or_init::(); - let mut registry = registry.write(); - registry - .register_type_data::< - bevy::input::mouse::AccumulatedMouseMotion, - bevy_mod_scripting_core::bindings::MarkAsGenerated, - >(); - } - pub(crate) fn register_accumulated_mouse_scroll_functions( - world: &mut bevy::ecs::world::World, - ) { - bevy_mod_scripting_core::bindings::function::namespace::NamespaceBuilder::< - bevy::input::mouse::AccumulatedMouseScroll, - >::new(world) - .register_documented( - "clone", - |_self: Ref| { - let output: Val = { - { - let output: Val< - bevy::input::mouse::AccumulatedMouseScroll, - > = ::clone( - &_self, - ) - .into(); - output - } - }; - output - }, - "", - &["_self"], - ) - .register_documented( - "eq", - | - _self: Ref, - other: Ref| - { - let output: bool = { - { - let output: bool = >::eq(&_self, &other) - .into(); - output - } - }; - output - }, - "", - &["_self", "other"], - ); - let registry = world - .get_resource_or_init::(); - let mut registry = registry.write(); - registry - .register_type_data::< - bevy::input::mouse::AccumulatedMouseScroll, - bevy_mod_scripting_core::bindings::MarkAsGenerated, - >(); - } - pub(crate) fn register_mouse_button_input_functions( - world: &mut bevy::ecs::world::World, - ) { - bevy_mod_scripting_core::bindings::function::namespace::NamespaceBuilder::< - bevy::input::mouse::MouseButtonInput, - >::new(world) - .register_documented( - "assert_receiver_is_total_eq", - |_self: Ref| { - let output: () = { - { - let output: () = ::assert_receiver_is_total_eq( - &_self, - ) - .into(); - output - } - }; - output - }, - "", - &["_self"], - ) - .register_documented( - "clone", - |_self: Ref| { - let output: Val = { - { - let output: Val = ::clone( - &_self, - ) - .into(); - output - } - }; - output - }, - "", - &["_self"], - ) - .register_documented( - "eq", - | - _self: Ref, - other: Ref| - { - let output: bool = { - { - let output: bool = >::eq(&_self, &other) - .into(); - output - } - }; - output - }, - "", - &["_self", "other"], - ); - let registry = world - .get_resource_or_init::(); - let mut registry = registry.write(); - registry - .register_type_data::< - bevy::input::mouse::MouseButtonInput, - bevy_mod_scripting_core::bindings::MarkAsGenerated, - >(); - } - pub(crate) fn register_mouse_motion_functions(world: &mut bevy::ecs::world::World) { - bevy_mod_scripting_core::bindings::function::namespace::NamespaceBuilder::< - bevy::input::mouse::MouseMotion, - >::new(world) - .register_documented( - "clone", - |_self: Ref| { - let output: Val = { - { - let output: Val = ::clone( - &_self, - ) - .into(); - output - } - }; - output - }, - "", - &["_self"], - ) - .register_documented( - "eq", - | - _self: Ref, - other: Ref| - { - let output: bool = { - { - let output: bool = >::eq(&_self, &other) - .into(); - output - } - }; - output - }, - "", - &["_self", "other"], - ); - let registry = world - .get_resource_or_init::(); - let mut registry = registry.write(); - registry - .register_type_data::< - bevy::input::mouse::MouseMotion, - bevy_mod_scripting_core::bindings::MarkAsGenerated, - >(); - } - pub(crate) fn register_mouse_wheel_functions(world: &mut bevy::ecs::world::World) { - bevy_mod_scripting_core::bindings::function::namespace::NamespaceBuilder::< - bevy::input::mouse::MouseWheel, - >::new(world) - .register_documented( - "clone", - |_self: Ref| { - let output: Val = { - { - let output: Val = ::clone( - &_self, - ) - .into(); - output - } - }; - output - }, - "", - &["_self"], - ) - .register_documented( - "eq", - | - _self: Ref, - other: Ref| - { - let output: bool = { - { - let output: bool = >::eq(&_self, &other) - .into(); - output - } - }; - output - }, - "", - &["_self", "other"], - ); - let registry = world - .get_resource_or_init::(); - let mut registry = registry.write(); - registry - .register_type_data::< - bevy::input::mouse::MouseWheel, - bevy_mod_scripting_core::bindings::MarkAsGenerated, - >(); - } - pub(crate) fn register_gamepad_axis_changed_event_functions( - world: &mut bevy::ecs::world::World, - ) { - bevy_mod_scripting_core::bindings::function::namespace::NamespaceBuilder::< - bevy::input::gamepad::GamepadAxisChangedEvent, - >::new(world) - .register_documented( - "clone", - |_self: Ref| { - let output: Val = { - { - let output: Val< - bevy::input::gamepad::GamepadAxisChangedEvent, - > = ::clone( - &_self, - ) - .into(); - output - } - }; - output - }, - "", - &["_self"], - ) - .register_documented( - "eq", - | - _self: Ref, - other: Ref| - { - let output: bool = { - { - let output: bool = >::eq(&_self, &other) - .into(); - output - } - }; - output - }, - "", - &["_self", "other"], - ) - .register_documented( - "new", - | - entity: Val, - axis: Val, - value: f32| - { - let output: Val = { - { - let output: Val< - bevy::input::gamepad::GamepadAxisChangedEvent, - > = bevy::input::gamepad::GamepadAxisChangedEvent::new( - entity.into_inner(), - axis.into_inner(), - value, - ) - .into(); - output - } - }; - output - }, - " Creates a new [`GamepadAxisChangedEvent`].", - &["entity", "axis", "value"], - ); - let registry = world - .get_resource_or_init::(); - let mut registry = registry.write(); - registry - .register_type_data::< - bevy::input::gamepad::GamepadAxisChangedEvent, - bevy_mod_scripting_core::bindings::MarkAsGenerated, - >(); - } - pub(crate) fn register_gamepad_button_changed_event_functions( - world: &mut bevy::ecs::world::World, - ) { - bevy_mod_scripting_core::bindings::function::namespace::NamespaceBuilder::< - bevy::input::gamepad::GamepadButtonChangedEvent, - >::new(world) - .register_documented( - "clone", - |_self: Ref| { - let output: Val = { - { - let output: Val< - bevy::input::gamepad::GamepadButtonChangedEvent, - > = ::clone( - &_self, - ) - .into(); - output - } - }; - output - }, - "", - &["_self"], - ) - .register_documented( - "eq", - | - _self: Ref, - other: Ref| - { - let output: bool = { - { - let output: bool = >::eq(&_self, &other) - .into(); - output - } - }; - output - }, - "", - &["_self", "other"], - ) - .register_documented( - "new", - | - entity: Val, - button: Val, - state: Val, - value: f32| - { - let output: Val = { - { - let output: Val< - bevy::input::gamepad::GamepadButtonChangedEvent, - > = bevy::input::gamepad::GamepadButtonChangedEvent::new( - entity.into_inner(), - button.into_inner(), - state.into_inner(), - value, - ) - .into(); - output - } - }; - output - }, - " Creates a new [`GamepadButtonChangedEvent`].", - &["entity", "button", "state", "value"], - ); - let registry = world - .get_resource_or_init::(); - let mut registry = registry.write(); - registry - .register_type_data::< - bevy::input::gamepad::GamepadButtonChangedEvent, - bevy_mod_scripting_core::bindings::MarkAsGenerated, - >(); - } - pub(crate) fn register_gamepad_button_state_changed_event_functions( - world: &mut bevy::ecs::world::World, - ) { - bevy_mod_scripting_core::bindings::function::namespace::NamespaceBuilder::< - bevy::input::gamepad::GamepadButtonStateChangedEvent, - >::new(world) - .register_documented( - "assert_receiver_is_total_eq", - |_self: Ref| { - let output: () = { - { - let output: () = ::assert_receiver_is_total_eq( - &_self, - ) - .into(); - output - } - }; - output - }, - "", - &["_self"], - ) - .register_documented( - "clone", - |_self: Ref| { - let output: Val< - bevy::input::gamepad::GamepadButtonStateChangedEvent, - > = { - { - let output: Val< - bevy::input::gamepad::GamepadButtonStateChangedEvent, - > = ::clone( - &_self, - ) - .into(); - output - } - }; - output - }, - "", - &["_self"], - ) - .register_documented( - "eq", - | - _self: Ref, - other: Ref| - { - let output: bool = { - { - let output: bool = >::eq(&_self, &other) - .into(); - output - } - }; - output - }, - "", - &["_self", "other"], - ) - .register_documented( - "new", - | - entity: Val, - button: Val, - state: Val| - { - let output: Val< - bevy::input::gamepad::GamepadButtonStateChangedEvent, - > = { - { - let output: Val< - bevy::input::gamepad::GamepadButtonStateChangedEvent, - > = bevy::input::gamepad::GamepadButtonStateChangedEvent::new( - entity.into_inner(), - button.into_inner(), - state.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Creates a new [`GamepadButtonStateChangedEvent`].", - &["entity", "button", "state"], - ); - let registry = world - .get_resource_or_init::(); - let mut registry = registry.write(); - registry - .register_type_data::< - bevy::input::gamepad::GamepadButtonStateChangedEvent, - bevy_mod_scripting_core::bindings::MarkAsGenerated, - >(); - } - pub(crate) fn register_gamepad_connection_functions( - world: &mut bevy::ecs::world::World, - ) { - bevy_mod_scripting_core::bindings::function::namespace::NamespaceBuilder::< - bevy::input::gamepad::GamepadConnection, - >::new(world) - .register_documented( - "clone", - |_self: Ref| { - let output: Val = { - { - let output: Val = ::clone( - &_self, - ) - .into(); - output - } - }; - output - }, - "", - &["_self"], - ) - .register_documented( - "eq", - | - _self: Ref, - other: Ref| - { - let output: bool = { - { - let output: bool = >::eq(&_self, &other) - .into(); - output - } - }; - output - }, - "", - &["_self", "other"], - ); - let registry = world - .get_resource_or_init::(); - let mut registry = registry.write(); - registry - .register_type_data::< - bevy::input::gamepad::GamepadConnection, - bevy_mod_scripting_core::bindings::MarkAsGenerated, - >(); - } - pub(crate) fn register_gamepad_connection_event_functions( - world: &mut bevy::ecs::world::World, - ) { - bevy_mod_scripting_core::bindings::function::namespace::NamespaceBuilder::< - bevy::input::gamepad::GamepadConnectionEvent, - >::new(world) - .register_documented( - "clone", - |_self: Ref| { - let output: Val = { - { - let output: Val< - bevy::input::gamepad::GamepadConnectionEvent, - > = ::clone( - &_self, - ) - .into(); - output - } - }; - output - }, - "", - &["_self"], - ) - .register_documented( - "connected", - |_self: Ref| { - let output: bool = { - { - let output: bool = bevy::input::gamepad::GamepadConnectionEvent::connected( - &_self, - ) - .into(); - output - } - }; - output - }, - " Whether the gamepad is connected.", - &["_self"], - ) - .register_documented( - "disconnected", - |_self: Ref| { - let output: bool = { - { - let output: bool = bevy::input::gamepad::GamepadConnectionEvent::disconnected( - &_self, - ) - .into(); - output - } - }; - output - }, - " Whether the gamepad is disconnected.", - &["_self"], - ) - .register_documented( - "eq", - | - _self: Ref, - other: Ref| - { - let output: bool = { - { - let output: bool = >::eq(&_self, &other) - .into(); - output - } - }; - output - }, - "", - &["_self", "other"], - ) - .register_documented( - "new", - | - gamepad: Val, - connection: Val| - { - let output: Val = { - { - let output: Val< - bevy::input::gamepad::GamepadConnectionEvent, - > = bevy::input::gamepad::GamepadConnectionEvent::new( - gamepad.into_inner(), - connection.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Creates a [`GamepadConnectionEvent`].", - &["gamepad", "connection"], - ); - let registry = world - .get_resource_or_init::(); - let mut registry = registry.write(); - registry - .register_type_data::< - bevy::input::gamepad::GamepadConnectionEvent, - bevy_mod_scripting_core::bindings::MarkAsGenerated, - >(); - } - pub(crate) fn register_gamepad_event_functions(world: &mut bevy::ecs::world::World) { - bevy_mod_scripting_core::bindings::function::namespace::NamespaceBuilder::< - bevy::input::gamepad::GamepadEvent, - >::new(world) - .register_documented( - "clone", - |_self: Ref| { - let output: Val = { - { - let output: Val = ::clone( - &_self, - ) - .into(); - output - } - }; - output - }, - "", - &["_self"], - ) - .register_documented( - "eq", - | - _self: Ref, - other: Ref| - { - let output: bool = { - { - let output: bool = >::eq(&_self, &other) - .into(); - output - } - }; - output - }, - "", - &["_self", "other"], - ); - let registry = world - .get_resource_or_init::(); - let mut registry = registry.write(); - registry - .register_type_data::< - bevy::input::gamepad::GamepadEvent, - bevy_mod_scripting_core::bindings::MarkAsGenerated, - >(); - } - pub(crate) fn register_gamepad_input_functions(world: &mut bevy::ecs::world::World) { - bevy_mod_scripting_core::bindings::function::namespace::NamespaceBuilder::< - bevy::input::gamepad::GamepadInput, - >::new(world) - .register_documented( - "assert_receiver_is_total_eq", - |_self: Ref| { - let output: () = { - { - let output: () = ::assert_receiver_is_total_eq( - &_self, - ) - .into(); - output - } - }; - output - }, - "", - &["_self"], - ) - .register_documented( - "clone", - |_self: Ref| { - let output: Val = { - { - let output: Val = ::clone( - &_self, - ) - .into(); - output - } - }; - output - }, - "", - &["_self"], - ) - .register_documented( - "eq", - | - _self: Ref, - other: Ref| - { - let output: bool = { - { - let output: bool = >::eq(&_self, &other) - .into(); - output - } - }; - output - }, - "", - &["_self", "other"], - ); - let registry = world - .get_resource_or_init::(); - let mut registry = registry.write(); - registry - .register_type_data::< - bevy::input::gamepad::GamepadInput, - bevy_mod_scripting_core::bindings::MarkAsGenerated, - >(); - } - pub(crate) fn register_gamepad_rumble_request_functions( - world: &mut bevy::ecs::world::World, - ) { - bevy_mod_scripting_core::bindings::function::namespace::NamespaceBuilder::< - bevy::input::gamepad::GamepadRumbleRequest, - >::new(world) - .register_documented( - "clone", - |_self: Ref| { - let output: Val = { - { - let output: Val< - bevy::input::gamepad::GamepadRumbleRequest, - > = ::clone( - &_self, - ) - .into(); - output - } - }; - output - }, - "", - &["_self"], - ) - .register_documented( - "gamepad", - |_self: Ref| { - let output: Val = { - { - let output: Val = bevy::input::gamepad::GamepadRumbleRequest::gamepad( - &_self, - ) - .into(); - output - } - }; - output - }, - " Get the [`Entity`] associated with this request.", - &["_self"], - ); - let registry = world - .get_resource_or_init::(); - let mut registry = registry.write(); - registry - .register_type_data::< - bevy::input::gamepad::GamepadRumbleRequest, - bevy_mod_scripting_core::bindings::MarkAsGenerated, - >(); - } - pub(crate) fn register_raw_gamepad_axis_changed_event_functions( - world: &mut bevy::ecs::world::World, - ) { - bevy_mod_scripting_core::bindings::function::namespace::NamespaceBuilder::< - bevy::input::gamepad::RawGamepadAxisChangedEvent, - >::new(world) - .register_documented( - "clone", - |_self: Ref| { - let output: Val = { - { - let output: Val< - bevy::input::gamepad::RawGamepadAxisChangedEvent, - > = ::clone( - &_self, - ) - .into(); - output - } - }; - output - }, - "", - &["_self"], - ) - .register_documented( - "eq", - | - _self: Ref, - other: Ref| - { - let output: bool = { - { - let output: bool = >::eq(&_self, &other) - .into(); - output - } - }; - output - }, - "", - &["_self", "other"], - ) - .register_documented( - "new", - | - gamepad: Val, - axis_type: Val, - value: f32| - { - let output: Val = { - { - let output: Val< - bevy::input::gamepad::RawGamepadAxisChangedEvent, - > = bevy::input::gamepad::RawGamepadAxisChangedEvent::new( - gamepad.into_inner(), - axis_type.into_inner(), - value, - ) - .into(); - output - } - }; - output - }, - " Creates a [`RawGamepadAxisChangedEvent`].", - &["gamepad", "axis_type", "value"], - ); - let registry = world - .get_resource_or_init::(); - let mut registry = registry.write(); - registry - .register_type_data::< - bevy::input::gamepad::RawGamepadAxisChangedEvent, - bevy_mod_scripting_core::bindings::MarkAsGenerated, - >(); - } - pub(crate) fn register_raw_gamepad_button_changed_event_functions( - world: &mut bevy::ecs::world::World, - ) { - bevy_mod_scripting_core::bindings::function::namespace::NamespaceBuilder::< - bevy::input::gamepad::RawGamepadButtonChangedEvent, - >::new(world) - .register_documented( - "clone", - |_self: Ref| { - let output: Val< - bevy::input::gamepad::RawGamepadButtonChangedEvent, - > = { - { - let output: Val< - bevy::input::gamepad::RawGamepadButtonChangedEvent, - > = ::clone( - &_self, - ) - .into(); - output - } - }; - output - }, - "", - &["_self"], - ) - .register_documented( - "eq", - | - _self: Ref, - other: Ref| - { - let output: bool = { - { - let output: bool = >::eq(&_self, &other) - .into(); - output - } - }; - output - }, - "", - &["_self", "other"], - ) - .register_documented( - "new", - | - gamepad: Val, - button_type: Val, - value: f32| - { - let output: Val< - bevy::input::gamepad::RawGamepadButtonChangedEvent, - > = { - { - let output: Val< - bevy::input::gamepad::RawGamepadButtonChangedEvent, - > = bevy::input::gamepad::RawGamepadButtonChangedEvent::new( - gamepad.into_inner(), - button_type.into_inner(), - value, - ) - .into(); - output - } - }; - output - }, - " Creates a [`RawGamepadButtonChangedEvent`].", - &["gamepad", "button_type", "value"], - ); - let registry = world - .get_resource_or_init::(); - let mut registry = registry.write(); - registry - .register_type_data::< - bevy::input::gamepad::RawGamepadButtonChangedEvent, - bevy_mod_scripting_core::bindings::MarkAsGenerated, - >(); - } - pub(crate) fn register_raw_gamepad_event_functions( - world: &mut bevy::ecs::world::World, - ) { - bevy_mod_scripting_core::bindings::function::namespace::NamespaceBuilder::< - bevy::input::gamepad::RawGamepadEvent, - >::new(world) - .register_documented( - "clone", - |_self: Ref| { - let output: Val = { - { - let output: Val = ::clone( - &_self, - ) - .into(); - output - } - }; - output - }, - "", - &["_self"], - ) - .register_documented( - "eq", - | - _self: Ref, - other: Ref| - { - let output: bool = { - { - let output: bool = >::eq(&_self, &other) - .into(); - output - } - }; - output - }, - "", - &["_self", "other"], - ); - let registry = world - .get_resource_or_init::(); - let mut registry = registry.write(); - registry - .register_type_data::< - bevy::input::gamepad::RawGamepadEvent, - bevy_mod_scripting_core::bindings::MarkAsGenerated, - >(); - } - pub(crate) fn register_pinch_gesture_functions(world: &mut bevy::ecs::world::World) { - bevy_mod_scripting_core::bindings::function::namespace::NamespaceBuilder::< - bevy::input::gestures::PinchGesture, - >::new(world) - .register_documented( - "clone", - |_self: Ref| { - let output: Val = { - { - let output: Val = ::clone( - &_self, - ) - .into(); - output - } - }; - output - }, - "", - &["_self"], - ) - .register_documented( - "eq", - | - _self: Ref, - other: Ref| - { - let output: bool = { - { - let output: bool = >::eq(&_self, &other) - .into(); - output - } - }; - output - }, - "", - &["_self", "other"], - ); - let registry = world - .get_resource_or_init::(); - let mut registry = registry.write(); - registry - .register_type_data::< - bevy::input::gestures::PinchGesture, - bevy_mod_scripting_core::bindings::MarkAsGenerated, - >(); - } - pub(crate) fn register_rotation_gesture_functions( - world: &mut bevy::ecs::world::World, - ) { - bevy_mod_scripting_core::bindings::function::namespace::NamespaceBuilder::< - bevy::input::gestures::RotationGesture, - >::new(world) - .register_documented( - "clone", - |_self: Ref| { - let output: Val = { - { - let output: Val = ::clone( - &_self, - ) - .into(); - output - } - }; - output - }, - "", - &["_self"], - ) - .register_documented( - "eq", - | - _self: Ref, - other: Ref| - { - let output: bool = { - { - let output: bool = >::eq(&_self, &other) - .into(); - output - } - }; - output - }, - "", - &["_self", "other"], - ); - let registry = world - .get_resource_or_init::(); - let mut registry = registry.write(); - registry - .register_type_data::< - bevy::input::gestures::RotationGesture, - bevy_mod_scripting_core::bindings::MarkAsGenerated, - >(); - } - pub(crate) fn register_double_tap_gesture_functions( - world: &mut bevy::ecs::world::World, - ) { - bevy_mod_scripting_core::bindings::function::namespace::NamespaceBuilder::< - bevy::input::gestures::DoubleTapGesture, - >::new(world) - .register_documented( - "clone", - |_self: Ref| { - let output: Val = { - { - let output: Val = ::clone( - &_self, - ) - .into(); - output - } - }; - output - }, - "", - &["_self"], - ) - .register_documented( - "eq", - | - _self: Ref, - other: Ref| - { - let output: bool = { - { - let output: bool = >::eq(&_self, &other) - .into(); - output - } - }; - output - }, - "", - &["_self", "other"], - ); - let registry = world - .get_resource_or_init::(); - let mut registry = registry.write(); - registry - .register_type_data::< - bevy::input::gestures::DoubleTapGesture, - bevy_mod_scripting_core::bindings::MarkAsGenerated, - >(); - } - pub(crate) fn register_pan_gesture_functions(world: &mut bevy::ecs::world::World) { - bevy_mod_scripting_core::bindings::function::namespace::NamespaceBuilder::< - bevy::input::gestures::PanGesture, - >::new(world) - .register_documented( - "clone", - |_self: Ref| { - let output: Val = { - { - let output: Val = ::clone( - &_self, - ) - .into(); - output - } - }; - output - }, - "", - &["_self"], - ) - .register_documented( - "eq", - | - _self: Ref, - other: Ref| - { - let output: bool = { - { - let output: bool = >::eq(&_self, &other) - .into(); - output - } - }; - output - }, - "", - &["_self", "other"], - ); - let registry = world - .get_resource_or_init::(); - let mut registry = registry.write(); - registry - .register_type_data::< - bevy::input::gestures::PanGesture, - bevy_mod_scripting_core::bindings::MarkAsGenerated, - >(); - } - pub(crate) fn register_button_state_functions(world: &mut bevy::ecs::world::World) { - bevy_mod_scripting_core::bindings::function::namespace::NamespaceBuilder::< - bevy::input::ButtonState, - >::new(world) - .register_documented( - "assert_receiver_is_total_eq", - |_self: Ref| { - let output: () = { - { - let output: () = ::assert_receiver_is_total_eq( - &_self, - ) - .into(); - output - } - }; - output - }, - "", - &["_self"], - ) - .register_documented( - "clone", - |_self: Ref| { - let output: Val = { - { - let output: Val = ::clone( - &_self, - ) - .into(); - output - } - }; - output - }, - "", - &["_self"], - ) - .register_documented( - "eq", - | - _self: Ref, - other: Ref| - { - let output: bool = { - { - let output: bool = >::eq(&_self, &other) - .into(); - output - } - }; - output - }, - "", - &["_self", "other"], - ) - .register_documented( - "is_pressed", - |_self: Ref| { - let output: bool = { - { - let output: bool = bevy::input::ButtonState::is_pressed( - &_self, - ) - .into(); - output - } - }; - output - }, - " Is this button pressed?", - &["_self"], - ); - let registry = world - .get_resource_or_init::(); - let mut registry = registry.write(); - registry - .register_type_data::< - bevy::input::ButtonState, - bevy_mod_scripting_core::bindings::MarkAsGenerated, - >(); - } - pub(crate) fn register_button_settings_functions( - world: &mut bevy::ecs::world::World, - ) { - bevy_mod_scripting_core::bindings::function::namespace::NamespaceBuilder::< - bevy::input::gamepad::ButtonSettings, - >::new(world) - .register_documented( - "clone", - |_self: Ref| { - let output: Val = { - { - let output: Val = ::clone( - &_self, - ) - .into(); - output - } - }; - output - }, - "", - &["_self"], - ) - .register_documented( - "eq", - | - _self: Ref, - other: Ref| - { - let output: bool = { - { - let output: bool = >::eq(&_self, &other) - .into(); - output - } - }; - output - }, - "", - &["_self", "other"], - ) - .register_documented( - "is_pressed", - |_self: Ref, value: f32| { - let output: bool = { - { - let output: bool = bevy::input::gamepad::ButtonSettings::is_pressed( - &_self, - value, - ) - .into(); - output - } - }; - output - }, - " Returns `true` if the button is pressed.\n A button is considered pressed if the `value` passed is greater than or equal to the press threshold.", - &["_self", "value"], - ) - .register_documented( - "is_released", - |_self: Ref, value: f32| { - let output: bool = { - { - let output: bool = bevy::input::gamepad::ButtonSettings::is_released( - &_self, - value, - ) - .into(); - output - } - }; - output - }, - " Returns `true` if the button is released.\n A button is considered released if the `value` passed is lower than or equal to the release threshold.", - &["_self", "value"], - ) - .register_documented( - "press_threshold", - |_self: Ref| { - let output: f32 = { - { - let output: f32 = bevy::input::gamepad::ButtonSettings::press_threshold( - &_self, - ) - .into(); - output - } - }; - output - }, - " Get the button input threshold above which the button is considered pressed.", - &["_self"], - ) - .register_documented( - "release_threshold", - |_self: Ref| { - let output: f32 = { - { - let output: f32 = bevy::input::gamepad::ButtonSettings::release_threshold( - &_self, - ) - .into(); - output - } - }; - output - }, - " Get the button input threshold below which the button is considered released.", - &["_self"], - ) - .register_documented( - "set_press_threshold", - |mut _self: Mut, value: f32| { - let output: f32 = { - { - let output: f32 = bevy::input::gamepad::ButtonSettings::set_press_threshold( - &mut _self, - value, - ) - .into(); - output - } - }; - output - }, - " Try to set the button input threshold above which the button is considered pressed.\n If the value passed is outside the range [release threshold..=1.0], the value will not be changed.\n Returns the new value of the press threshold.", - &["_self", "value"], - ) - .register_documented( - "set_release_threshold", - |mut _self: Mut, value: f32| { - let output: f32 = { - { - let output: f32 = bevy::input::gamepad::ButtonSettings::set_release_threshold( - &mut _self, - value, - ) - .into(); - output - } - }; - output - }, - " Try to set the button input threshold below which the button is considered released. If the\n value passed is outside the range [0.0..=press threshold], the value will not be changed.\n Returns the new value of the release threshold.", - &["_self", "value"], - ); - let registry = world - .get_resource_or_init::(); - let mut registry = registry.write(); - registry - .register_type_data::< - bevy::input::gamepad::ButtonSettings, - bevy_mod_scripting_core::bindings::MarkAsGenerated, - >(); - } - pub(crate) fn register_axis_settings_functions(world: &mut bevy::ecs::world::World) { - bevy_mod_scripting_core::bindings::function::namespace::NamespaceBuilder::< - bevy::input::gamepad::AxisSettings, - >::new(world) - .register_documented( - "clamp", - |_self: Ref, raw_value: f32| { - let output: f32 = { - { - let output: f32 = bevy::input::gamepad::AxisSettings::clamp( - &_self, - raw_value, - ) - .into(); - output - } - }; - output - }, - " Clamps the `raw_value` according to the `AxisSettings`.", - &["_self", "raw_value"], - ) - .register_documented( - "clone", - |_self: Ref| { - let output: Val = { - { - let output: Val = ::clone( - &_self, - ) - .into(); - output - } - }; - output - }, - "", - &["_self"], - ) - .register_documented( - "deadzone_lowerbound", - |_self: Ref| { - let output: f32 = { - { - let output: f32 = bevy::input::gamepad::AxisSettings::deadzone_lowerbound( - &_self, - ) - .into(); - output - } - }; - output - }, - " Get the value above which inputs will be rounded up to 0.0.", - &["_self"], - ) - .register_documented( - "deadzone_upperbound", - |_self: Ref| { - let output: f32 = { - { - let output: f32 = bevy::input::gamepad::AxisSettings::deadzone_upperbound( - &_self, - ) - .into(); - output - } - }; - output - }, - " Get the value below which positive inputs will be rounded down to 0.0.", - &["_self"], - ) - .register_documented( - "eq", - | - _self: Ref, - other: Ref| - { - let output: bool = { - { - let output: bool = >::eq(&_self, &other) - .into(); - output - } - }; - output - }, - "", - &["_self", "other"], - ) - .register_documented( - "livezone_lowerbound", - |_self: Ref| { - let output: f32 = { - { - let output: f32 = bevy::input::gamepad::AxisSettings::livezone_lowerbound( - &_self, - ) - .into(); - output - } - }; - output - }, - " Get the value below which negative inputs will be rounded down to -1.0.", - &["_self"], - ) - .register_documented( - "livezone_upperbound", - |_self: Ref| { - let output: f32 = { - { - let output: f32 = bevy::input::gamepad::AxisSettings::livezone_upperbound( - &_self, - ) - .into(); - output - } - }; - output - }, - " Get the value above which inputs will be rounded up to 1.0.", - &["_self"], - ) - .register_documented( - "set_deadzone_lowerbound", - |mut _self: Mut, value: f32| { - let output: f32 = { - { - let output: f32 = bevy::input::gamepad::AxisSettings::set_deadzone_lowerbound( - &mut _self, - value, - ) - .into(); - output - } - }; - output - }, - " Try to set the value above which inputs will be rounded up to 0.0.\n If the value passed is less than -1.0 or less than `livezone_lowerbound`,\n the value will not be changed.\n Returns the new value of `deadzone_lowerbound`.", - &["_self", "value"], - ) - .register_documented( - "set_deadzone_upperbound", - |mut _self: Mut, value: f32| { - let output: f32 = { - { - let output: f32 = bevy::input::gamepad::AxisSettings::set_deadzone_upperbound( - &mut _self, - value, - ) - .into(); - output - } - }; - output - }, - " Try to set the value below which positive inputs will be rounded down to 0.0.\n If the value passed is negative or greater than `livezone_upperbound`,\n the value will not be changed.\n Returns the new value of `deadzone_upperbound`.", - &["_self", "value"], - ) - .register_documented( - "set_livezone_lowerbound", - |mut _self: Mut, value: f32| { - let output: f32 = { - { - let output: f32 = bevy::input::gamepad::AxisSettings::set_livezone_lowerbound( - &mut _self, - value, - ) - .into(); - output - } - }; - output - }, - " Try to set the value below which negative inputs will be rounded down to -1.0.\n If the value passed is positive or greater than `deadzone_lowerbound`,\n the value will not be changed.\n Returns the new value of `livezone_lowerbound`.", - &["_self", "value"], - ) - .register_documented( - "set_livezone_upperbound", - |mut _self: Mut, value: f32| { - let output: f32 = { - { - let output: f32 = bevy::input::gamepad::AxisSettings::set_livezone_upperbound( - &mut _self, - value, - ) - .into(); - output - } - }; - output - }, - " Try to set the value above which inputs will be rounded up to 1.0.\n If the value passed is negative or less than `deadzone_upperbound`,\n the value will not be changed.\n Returns the new value of `livezone_upperbound`.", - &["_self", "value"], - ) - .register_documented( - "set_threshold", - |mut _self: Mut, value: f32| { - let output: f32 = { - { - let output: f32 = bevy::input::gamepad::AxisSettings::set_threshold( - &mut _self, - value, - ) - .into(); - output - } - }; - output - }, - " Try to set the minimum value by which input must change before the changes will be applied.\n If the value passed is not within [0.0..=2.0], the value will not be changed.\n Returns the new value of threshold.", - &["_self", "value"], - ) - .register_documented( - "threshold", - |_self: Ref| { - let output: f32 = { - { - let output: f32 = bevy::input::gamepad::AxisSettings::threshold( - &_self, - ) - .into(); - output - } - }; - output - }, - " Get the minimum value by which input must change before the change is registered.", - &["_self"], - ); - let registry = world - .get_resource_or_init::(); - let mut registry = registry.write(); - registry - .register_type_data::< - bevy::input::gamepad::AxisSettings, - bevy_mod_scripting_core::bindings::MarkAsGenerated, - >(); - } - pub(crate) fn register_button_axis_settings_functions( - world: &mut bevy::ecs::world::World, - ) { - bevy_mod_scripting_core::bindings::function::namespace::NamespaceBuilder::< - bevy::input::gamepad::ButtonAxisSettings, - >::new(world) - .register_documented( - "clone", - |_self: Ref| { - let output: Val = { - { - let output: Val = ::clone( - &_self, - ) - .into(); - output - } - }; - output - }, - "", - &["_self"], - ); - let registry = world - .get_resource_or_init::(); - let mut registry = registry.write(); - registry - .register_type_data::< - bevy::input::gamepad::ButtonAxisSettings, - bevy_mod_scripting_core::bindings::MarkAsGenerated, - >(); - } - pub(crate) fn register_gamepad_rumble_intensity_functions( - world: &mut bevy::ecs::world::World, - ) { - bevy_mod_scripting_core::bindings::function::namespace::NamespaceBuilder::< - bevy::input::gamepad::GamepadRumbleIntensity, - >::new(world) - .register_documented( - "clone", - |_self: Ref| { - let output: Val = { - { - let output: Val< - bevy::input::gamepad::GamepadRumbleIntensity, - > = ::clone( - &_self, - ) - .into(); - output - } - }; - output - }, - "", - &["_self"], - ) - .register_documented( - "eq", - | - _self: Ref, - other: Ref| - { - let output: bool = { - { - let output: bool = >::eq(&_self, &other) - .into(); - output - } - }; - output - }, - "", - &["_self", "other"], - ) - .register_documented( - "strong_motor", - |intensity: f32| { - let output: Val = { - { - let output: Val< - bevy::input::gamepad::GamepadRumbleIntensity, - > = bevy::input::gamepad::GamepadRumbleIntensity::strong_motor( - intensity, - ) - .into(); - output - } - }; - output - }, - " Creates a new rumble intensity with strong motor intensity set to the given value.\n Clamped within the `0.0` to `1.0` range.", - &["intensity"], - ) - .register_documented( - "weak_motor", - |intensity: f32| { - let output: Val = { - { - let output: Val< - bevy::input::gamepad::GamepadRumbleIntensity, - > = bevy::input::gamepad::GamepadRumbleIntensity::weak_motor( - intensity, - ) - .into(); - output - } - }; - output - }, - " Creates a new rumble intensity with weak motor intensity set to the given value.\n Clamped within the `0.0` to `1.0` range.", - &["intensity"], - ); - let registry = world - .get_resource_or_init::(); - let mut registry = registry.write(); - registry - .register_type_data::< - bevy::input::gamepad::GamepadRumbleIntensity, - bevy_mod_scripting_core::bindings::MarkAsGenerated, - >(); - } - pub(crate) fn register_key_functions(world: &mut bevy::ecs::world::World) { - bevy_mod_scripting_core::bindings::function::namespace::NamespaceBuilder::< - bevy::input::keyboard::Key, - >::new(world) - .register_documented( - "assert_receiver_is_total_eq", - |_self: Ref| { - let output: () = { - { - let output: () = ::assert_receiver_is_total_eq( - &_self, - ) - .into(); - output - } - }; - output - }, - "", - &["_self"], - ) - .register_documented( - "clone", - |_self: Ref| { - let output: Val = { - { - let output: Val = ::clone( - &_self, - ) - .into(); - output - } - }; - output - }, - "", - &["_self"], - ) - .register_documented( - "eq", - | - _self: Ref, - other: Ref| - { - let output: bool = { - { - let output: bool = >::eq(&_self, &other) - .into(); - output - } - }; - output - }, - "", - &["_self", "other"], - ); - let registry = world - .get_resource_or_init::(); - let mut registry = registry.write(); - registry - .register_type_data::< - bevy::input::keyboard::Key, - bevy_mod_scripting_core::bindings::MarkAsGenerated, - >(); - } - pub(crate) fn register_native_key_code_functions( - world: &mut bevy::ecs::world::World, - ) { - bevy_mod_scripting_core::bindings::function::namespace::NamespaceBuilder::< - bevy::input::keyboard::NativeKeyCode, - >::new(world) - .register_documented( - "assert_receiver_is_total_eq", - |_self: Ref| { - let output: () = { - { - let output: () = ::assert_receiver_is_total_eq( - &_self, - ) - .into(); - output - } - }; - output - }, - "", - &["_self"], - ) - .register_documented( - "clone", - |_self: Ref| { - let output: Val = { - { - let output: Val = ::clone( - &_self, - ) - .into(); - output - } - }; - output - }, - "", - &["_self"], - ) - .register_documented( - "eq", - | - _self: Ref, - other: Ref| - { - let output: bool = { - { - let output: bool = >::eq(&_self, &other) - .into(); - output - } - }; - output - }, - "", - &["_self", "other"], - ); - let registry = world - .get_resource_or_init::(); - let mut registry = registry.write(); - registry - .register_type_data::< - bevy::input::keyboard::NativeKeyCode, - bevy_mod_scripting_core::bindings::MarkAsGenerated, - >(); - } - pub(crate) fn register_native_key_functions(world: &mut bevy::ecs::world::World) { - bevy_mod_scripting_core::bindings::function::namespace::NamespaceBuilder::< - bevy::input::keyboard::NativeKey, - >::new(world) - .register_documented( - "assert_receiver_is_total_eq", - |_self: Ref| { - let output: () = { - { - let output: () = ::assert_receiver_is_total_eq( - &_self, - ) - .into(); - output - } - }; - output - }, - "", - &["_self"], - ) - .register_documented( - "clone", - |_self: Ref| { - let output: Val = { - { - let output: Val = ::clone( - &_self, - ) - .into(); - output - } - }; - output - }, - "", - &["_self"], - ) - .register_documented( - "eq", - | - _self: Ref, - other: Ref| - { - let output: bool = { - { - let output: bool = >::eq(&_self, &other) - .into(); - output - } - }; - output - }, - "", - &["_self", "other"], - ); - let registry = world - .get_resource_or_init::(); - let mut registry = registry.write(); - registry - .register_type_data::< - bevy::input::keyboard::NativeKey, - bevy_mod_scripting_core::bindings::MarkAsGenerated, - >(); - } - pub(crate) fn register_mouse_scroll_unit_functions( - world: &mut bevy::ecs::world::World, - ) { - bevy_mod_scripting_core::bindings::function::namespace::NamespaceBuilder::< - bevy::input::mouse::MouseScrollUnit, - >::new(world) - .register_documented( - "assert_receiver_is_total_eq", - |_self: Ref| { - let output: () = { - { - let output: () = ::assert_receiver_is_total_eq( - &_self, - ) - .into(); - output - } - }; - output - }, - "", - &["_self"], - ) - .register_documented( - "clone", - |_self: Ref| { - let output: Val = { - { - let output: Val = ::clone( - &_self, - ) - .into(); - output - } - }; - output - }, - "", - &["_self"], - ) - .register_documented( - "eq", - | - _self: Ref, - other: Ref| - { - let output: bool = { - { - let output: bool = >::eq(&_self, &other) - .into(); - output - } - }; - output - }, - "", - &["_self", "other"], - ); - let registry = world - .get_resource_or_init::(); - let mut registry = registry.write(); - registry - .register_type_data::< - bevy::input::mouse::MouseScrollUnit, - bevy_mod_scripting_core::bindings::MarkAsGenerated, - >(); - } - pub(crate) fn register_touch_phase_functions(world: &mut bevy::ecs::world::World) { - bevy_mod_scripting_core::bindings::function::namespace::NamespaceBuilder::< - bevy::input::touch::TouchPhase, - >::new(world) - .register_documented( - "assert_receiver_is_total_eq", - |_self: Ref| { - let output: () = { - { - let output: () = ::assert_receiver_is_total_eq( - &_self, - ) - .into(); - output - } - }; - output - }, - "", - &["_self"], - ) - .register_documented( - "clone", - |_self: Ref| { - let output: Val = { - { - let output: Val = ::clone( - &_self, - ) - .into(); - output - } - }; - output - }, - "", - &["_self"], - ) - .register_documented( - "eq", - | - _self: Ref, - other: Ref| - { - let output: bool = { - { - let output: bool = >::eq(&_self, &other) - .into(); - output - } - }; - output - }, - "", - &["_self", "other"], - ); - let registry = world - .get_resource_or_init::(); - let mut registry = registry.write(); - registry - .register_type_data::< - bevy::input::touch::TouchPhase, - bevy_mod_scripting_core::bindings::MarkAsGenerated, - >(); - } - pub(crate) fn register_force_touch_functions(world: &mut bevy::ecs::world::World) { - bevy_mod_scripting_core::bindings::function::namespace::NamespaceBuilder::< - bevy::input::touch::ForceTouch, - >::new(world) - .register_documented( - "clone", - |_self: Ref| { - let output: Val = { - { - let output: Val = ::clone( - &_self, - ) - .into(); - output - } - }; - output - }, - "", - &["_self"], - ) - .register_documented( - "eq", - | - _self: Ref, - other: Ref| - { - let output: bool = { - { - let output: bool = >::eq(&_self, &other) - .into(); - output - } - }; - output - }, - "", - &["_self", "other"], - ); - let registry = world - .get_resource_or_init::(); - let mut registry = registry.write(); - registry - .register_type_data::< - bevy::input::touch::ForceTouch, - bevy_mod_scripting_core::bindings::MarkAsGenerated, - >(); - } - impl ::bevy::app::Plugin for BevyInputScriptingPlugin { - fn build(&self, app: &mut ::bevy::prelude::App) { - let mut world = app.world_mut(); - register_gamepad_functions(&mut world); - register_gamepad_axis_functions(&mut world); - register_gamepad_button_functions(&mut world); - register_gamepad_settings_functions(&mut world); - register_key_code_functions(&mut world); - register_mouse_button_functions(&mut world); - register_touch_input_functions(&mut world); - register_keyboard_focus_lost_functions(&mut world); - register_keyboard_input_functions(&mut world); - register_accumulated_mouse_motion_functions(&mut world); - register_accumulated_mouse_scroll_functions(&mut world); - register_mouse_button_input_functions(&mut world); - register_mouse_motion_functions(&mut world); - register_mouse_wheel_functions(&mut world); - register_gamepad_axis_changed_event_functions(&mut world); - register_gamepad_button_changed_event_functions(&mut world); - register_gamepad_button_state_changed_event_functions(&mut world); - register_gamepad_connection_functions(&mut world); - register_gamepad_connection_event_functions(&mut world); - register_gamepad_event_functions(&mut world); - register_gamepad_input_functions(&mut world); - register_gamepad_rumble_request_functions(&mut world); - register_raw_gamepad_axis_changed_event_functions(&mut world); - register_raw_gamepad_button_changed_event_functions(&mut world); - register_raw_gamepad_event_functions(&mut world); - register_pinch_gesture_functions(&mut world); - register_rotation_gesture_functions(&mut world); - register_double_tap_gesture_functions(&mut world); - register_pan_gesture_functions(&mut world); - register_button_state_functions(&mut world); - register_button_settings_functions(&mut world); - register_axis_settings_functions(&mut world); - register_button_axis_settings_functions(&mut world); - register_gamepad_rumble_intensity_functions(&mut world); - register_key_functions(&mut world); - register_native_key_code_functions(&mut world); - register_native_key_functions(&mut world); - register_mouse_scroll_unit_functions(&mut world); - register_touch_phase_functions(&mut world); - register_force_touch_functions(&mut world); - } - } \ No newline at end of file +// @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_ecs::prelude::*; +use bevy_mod_scripting_derive::script_bindings; +use crate::*; +pub struct BevyInputScriptingPlugin; +#[script_bindings( + remote, + name = "gamepad_functions", + bms_core_path = "bevy_mod_scripting_core", + generated +)] +impl ::bevy_input::gamepad::Gamepad { + /// Returns the directional pad as a [`Vec2`]. + fn dpad(_self: Ref<::bevy_input::gamepad::Gamepad>) -> Val<::bevy_math::Vec2> { + let output: Val<::bevy_math::Vec2> = ::bevy_input::gamepad::Gamepad::dpad(&_self) + .into(); + output + } + /// Returns `true` if the [`GamepadButton`] has been pressed during the current frame. + /// Note: This function does not imply information regarding the current state of [`ButtonInput::pressed`] or [`ButtonInput::just_released`]. + fn just_pressed( + _self: Ref<::bevy_input::gamepad::Gamepad>, + button_type: Val<::bevy_input::gamepad::GamepadButton>, + ) -> bool { + let output: bool = ::bevy_input::gamepad::Gamepad::just_pressed( + &_self, + button_type.into_inner(), + ) + .into(); + output + } + /// Returns `true` if the [`GamepadButton`] has been released during the current frame. + /// Note: This function does not imply information regarding the current state of [`ButtonInput::pressed`] or [`ButtonInput::just_pressed`]. + fn just_released( + _self: Ref<::bevy_input::gamepad::Gamepad>, + button_type: Val<::bevy_input::gamepad::GamepadButton>, + ) -> bool { + let output: bool = ::bevy_input::gamepad::Gamepad::just_released( + &_self, + button_type.into_inner(), + ) + .into(); + output + } + /// Returns the left stick as a [`Vec2`]. + fn left_stick(_self: Ref<::bevy_input::gamepad::Gamepad>) -> Val<::bevy_math::Vec2> { + let output: Val<::bevy_math::Vec2> = ::bevy_input::gamepad::Gamepad::left_stick( + &_self, + ) + .into(); + output + } + /// Returns `true` if the [`GamepadButton`] has been pressed. + fn pressed( + _self: Ref<::bevy_input::gamepad::Gamepad>, + button_type: Val<::bevy_input::gamepad::GamepadButton>, + ) -> bool { + let output: bool = ::bevy_input::gamepad::Gamepad::pressed( + &_self, + button_type.into_inner(), + ) + .into(); + output + } + /// Returns the USB product ID as assigned by the [vendor], if available. + /// [vendor]: Self::vendor_id + fn product_id( + _self: Ref<::bevy_input::gamepad::Gamepad>, + ) -> ::core::option::Option { + let output: ::core::option::Option = ::bevy_input::gamepad::Gamepad::product_id( + &_self, + ) + .into(); + output + } + /// Returns the right stick as a [`Vec2`]. + fn right_stick( + _self: Ref<::bevy_input::gamepad::Gamepad>, + ) -> Val<::bevy_math::Vec2> { + let output: Val<::bevy_math::Vec2> = ::bevy_input::gamepad::Gamepad::right_stick( + &_self, + ) + .into(); + output + } + /// Returns the USB vendor ID as assigned by the USB-IF, if available. + fn vendor_id( + _self: Ref<::bevy_input::gamepad::Gamepad>, + ) -> ::core::option::Option { + let output: ::core::option::Option = ::bevy_input::gamepad::Gamepad::vendor_id( + &_self, + ) + .into(); + output + } +} +#[script_bindings( + remote, + name = "gamepad_axis_functions", + bms_core_path = "bevy_mod_scripting_core", + generated +)] +impl ::bevy_input::gamepad::GamepadAxis { + fn assert_receiver_is_total_eq( + _self: Ref<::bevy_input::gamepad::GamepadAxis>, + ) -> () { + let output: () = <::bevy_input::gamepad::GamepadAxis as ::core::cmp::Eq>::assert_receiver_is_total_eq( + &_self, + ) + .into(); + output + } + fn clone( + _self: Ref<::bevy_input::gamepad::GamepadAxis>, + ) -> Val<::bevy_input::gamepad::GamepadAxis> { + let output: Val<::bevy_input::gamepad::GamepadAxis> = <::bevy_input::gamepad::GamepadAxis as ::core::clone::Clone>::clone( + &_self, + ) + .into(); + output + } + fn eq( + _self: Ref<::bevy_input::gamepad::GamepadAxis>, + other: Ref<::bevy_input::gamepad::GamepadAxis>, + ) -> bool { + let output: bool = <::bevy_input::gamepad::GamepadAxis as ::core::cmp::PartialEq< + ::bevy_input::gamepad::GamepadAxis, + >>::eq(&_self, &other) + .into(); + output + } +} +#[script_bindings( + remote, + name = "gamepad_button_functions", + bms_core_path = "bevy_mod_scripting_core", + generated +)] +impl ::bevy_input::gamepad::GamepadButton { + fn assert_receiver_is_total_eq( + _self: Ref<::bevy_input::gamepad::GamepadButton>, + ) -> () { + let output: () = <::bevy_input::gamepad::GamepadButton as ::core::cmp::Eq>::assert_receiver_is_total_eq( + &_self, + ) + .into(); + output + } + fn clone( + _self: Ref<::bevy_input::gamepad::GamepadButton>, + ) -> Val<::bevy_input::gamepad::GamepadButton> { + let output: Val<::bevy_input::gamepad::GamepadButton> = <::bevy_input::gamepad::GamepadButton as ::core::clone::Clone>::clone( + &_self, + ) + .into(); + output + } + fn eq( + _self: Ref<::bevy_input::gamepad::GamepadButton>, + other: Ref<::bevy_input::gamepad::GamepadButton>, + ) -> bool { + let output: bool = <::bevy_input::gamepad::GamepadButton as ::core::cmp::PartialEq< + ::bevy_input::gamepad::GamepadButton, + >>::eq(&_self, &other) + .into(); + output + } +} +#[script_bindings( + remote, + name = "gamepad_settings_functions", + bms_core_path = "bevy_mod_scripting_core", + generated +)] +impl ::bevy_input::gamepad::GamepadSettings { + fn clone( + _self: Ref<::bevy_input::gamepad::GamepadSettings>, + ) -> Val<::bevy_input::gamepad::GamepadSettings> { + let output: Val<::bevy_input::gamepad::GamepadSettings> = <::bevy_input::gamepad::GamepadSettings as ::core::clone::Clone>::clone( + &_self, + ) + .into(); + output + } +} +#[script_bindings( + remote, + name = "key_code_functions", + bms_core_path = "bevy_mod_scripting_core", + generated +)] +impl ::bevy_input::keyboard::KeyCode { + fn assert_receiver_is_total_eq(_self: Ref<::bevy_input::keyboard::KeyCode>) -> () { + let output: () = <::bevy_input::keyboard::KeyCode as ::core::cmp::Eq>::assert_receiver_is_total_eq( + &_self, + ) + .into(); + output + } + fn clone( + _self: Ref<::bevy_input::keyboard::KeyCode>, + ) -> Val<::bevy_input::keyboard::KeyCode> { + let output: Val<::bevy_input::keyboard::KeyCode> = <::bevy_input::keyboard::KeyCode as ::core::clone::Clone>::clone( + &_self, + ) + .into(); + output + } + fn eq( + _self: Ref<::bevy_input::keyboard::KeyCode>, + other: Ref<::bevy_input::keyboard::KeyCode>, + ) -> bool { + let output: bool = <::bevy_input::keyboard::KeyCode as ::core::cmp::PartialEq< + ::bevy_input::keyboard::KeyCode, + >>::eq(&_self, &other) + .into(); + output + } +} +#[script_bindings( + remote, + name = "mouse_button_functions", + bms_core_path = "bevy_mod_scripting_core", + generated +)] +impl ::bevy_input::mouse::MouseButton { + fn assert_receiver_is_total_eq(_self: Ref<::bevy_input::mouse::MouseButton>) -> () { + let output: () = <::bevy_input::mouse::MouseButton as ::core::cmp::Eq>::assert_receiver_is_total_eq( + &_self, + ) + .into(); + output + } + fn clone( + _self: Ref<::bevy_input::mouse::MouseButton>, + ) -> Val<::bevy_input::mouse::MouseButton> { + let output: Val<::bevy_input::mouse::MouseButton> = <::bevy_input::mouse::MouseButton as ::core::clone::Clone>::clone( + &_self, + ) + .into(); + output + } + fn eq( + _self: Ref<::bevy_input::mouse::MouseButton>, + other: Ref<::bevy_input::mouse::MouseButton>, + ) -> bool { + let output: bool = <::bevy_input::mouse::MouseButton as ::core::cmp::PartialEq< + ::bevy_input::mouse::MouseButton, + >>::eq(&_self, &other) + .into(); + output + } +} +#[script_bindings( + remote, + name = "touch_input_functions", + bms_core_path = "bevy_mod_scripting_core", + generated +)] +impl ::bevy_input::touch::TouchInput { + fn clone( + _self: Ref<::bevy_input::touch::TouchInput>, + ) -> Val<::bevy_input::touch::TouchInput> { + let output: Val<::bevy_input::touch::TouchInput> = <::bevy_input::touch::TouchInput as ::core::clone::Clone>::clone( + &_self, + ) + .into(); + output + } + fn eq( + _self: Ref<::bevy_input::touch::TouchInput>, + other: Ref<::bevy_input::touch::TouchInput>, + ) -> bool { + let output: bool = <::bevy_input::touch::TouchInput as ::core::cmp::PartialEq< + ::bevy_input::touch::TouchInput, + >>::eq(&_self, &other) + .into(); + output + } +} +#[script_bindings( + remote, + name = "keyboard_focus_lost_functions", + bms_core_path = "bevy_mod_scripting_core", + generated +)] +impl ::bevy_input::keyboard::KeyboardFocusLost { + fn assert_receiver_is_total_eq( + _self: Ref<::bevy_input::keyboard::KeyboardFocusLost>, + ) -> () { + let output: () = <::bevy_input::keyboard::KeyboardFocusLost as ::core::cmp::Eq>::assert_receiver_is_total_eq( + &_self, + ) + .into(); + output + } + fn clone( + _self: Ref<::bevy_input::keyboard::KeyboardFocusLost>, + ) -> Val<::bevy_input::keyboard::KeyboardFocusLost> { + let output: Val<::bevy_input::keyboard::KeyboardFocusLost> = <::bevy_input::keyboard::KeyboardFocusLost as ::core::clone::Clone>::clone( + &_self, + ) + .into(); + output + } + fn eq( + _self: Ref<::bevy_input::keyboard::KeyboardFocusLost>, + other: Ref<::bevy_input::keyboard::KeyboardFocusLost>, + ) -> bool { + let output: bool = <::bevy_input::keyboard::KeyboardFocusLost as ::core::cmp::PartialEq< + ::bevy_input::keyboard::KeyboardFocusLost, + >>::eq(&_self, &other) + .into(); + output + } +} +#[script_bindings( + remote, + name = "keyboard_input_functions", + bms_core_path = "bevy_mod_scripting_core", + generated +)] +impl ::bevy_input::keyboard::KeyboardInput { + fn assert_receiver_is_total_eq( + _self: Ref<::bevy_input::keyboard::KeyboardInput>, + ) -> () { + let output: () = <::bevy_input::keyboard::KeyboardInput as ::core::cmp::Eq>::assert_receiver_is_total_eq( + &_self, + ) + .into(); + output + } + fn clone( + _self: Ref<::bevy_input::keyboard::KeyboardInput>, + ) -> Val<::bevy_input::keyboard::KeyboardInput> { + let output: Val<::bevy_input::keyboard::KeyboardInput> = <::bevy_input::keyboard::KeyboardInput as ::core::clone::Clone>::clone( + &_self, + ) + .into(); + output + } + fn eq( + _self: Ref<::bevy_input::keyboard::KeyboardInput>, + other: Ref<::bevy_input::keyboard::KeyboardInput>, + ) -> bool { + let output: bool = <::bevy_input::keyboard::KeyboardInput as ::core::cmp::PartialEq< + ::bevy_input::keyboard::KeyboardInput, + >>::eq(&_self, &other) + .into(); + output + } +} +#[script_bindings( + remote, + name = "accumulated_mouse_motion_functions", + bms_core_path = "bevy_mod_scripting_core", + generated +)] +impl ::bevy_input::mouse::AccumulatedMouseMotion { + fn clone( + _self: Ref<::bevy_input::mouse::AccumulatedMouseMotion>, + ) -> Val<::bevy_input::mouse::AccumulatedMouseMotion> { + let output: Val<::bevy_input::mouse::AccumulatedMouseMotion> = <::bevy_input::mouse::AccumulatedMouseMotion as ::core::clone::Clone>::clone( + &_self, + ) + .into(); + output + } + fn eq( + _self: Ref<::bevy_input::mouse::AccumulatedMouseMotion>, + other: Ref<::bevy_input::mouse::AccumulatedMouseMotion>, + ) -> bool { + let output: bool = <::bevy_input::mouse::AccumulatedMouseMotion as ::core::cmp::PartialEq< + ::bevy_input::mouse::AccumulatedMouseMotion, + >>::eq(&_self, &other) + .into(); + output + } +} +#[script_bindings( + remote, + name = "accumulated_mouse_scroll_functions", + bms_core_path = "bevy_mod_scripting_core", + generated +)] +impl ::bevy_input::mouse::AccumulatedMouseScroll { + fn clone( + _self: Ref<::bevy_input::mouse::AccumulatedMouseScroll>, + ) -> Val<::bevy_input::mouse::AccumulatedMouseScroll> { + let output: Val<::bevy_input::mouse::AccumulatedMouseScroll> = <::bevy_input::mouse::AccumulatedMouseScroll as ::core::clone::Clone>::clone( + &_self, + ) + .into(); + output + } + fn eq( + _self: Ref<::bevy_input::mouse::AccumulatedMouseScroll>, + other: Ref<::bevy_input::mouse::AccumulatedMouseScroll>, + ) -> bool { + let output: bool = <::bevy_input::mouse::AccumulatedMouseScroll as ::core::cmp::PartialEq< + ::bevy_input::mouse::AccumulatedMouseScroll, + >>::eq(&_self, &other) + .into(); + output + } +} +#[script_bindings( + remote, + name = "mouse_button_input_functions", + bms_core_path = "bevy_mod_scripting_core", + generated +)] +impl ::bevy_input::mouse::MouseButtonInput { + fn assert_receiver_is_total_eq( + _self: Ref<::bevy_input::mouse::MouseButtonInput>, + ) -> () { + let output: () = <::bevy_input::mouse::MouseButtonInput as ::core::cmp::Eq>::assert_receiver_is_total_eq( + &_self, + ) + .into(); + output + } + fn clone( + _self: Ref<::bevy_input::mouse::MouseButtonInput>, + ) -> Val<::bevy_input::mouse::MouseButtonInput> { + let output: Val<::bevy_input::mouse::MouseButtonInput> = <::bevy_input::mouse::MouseButtonInput as ::core::clone::Clone>::clone( + &_self, + ) + .into(); + output + } + fn eq( + _self: Ref<::bevy_input::mouse::MouseButtonInput>, + other: Ref<::bevy_input::mouse::MouseButtonInput>, + ) -> bool { + let output: bool = <::bevy_input::mouse::MouseButtonInput as ::core::cmp::PartialEq< + ::bevy_input::mouse::MouseButtonInput, + >>::eq(&_self, &other) + .into(); + output + } +} +#[script_bindings( + remote, + name = "mouse_motion_functions", + bms_core_path = "bevy_mod_scripting_core", + generated +)] +impl ::bevy_input::mouse::MouseMotion { + fn clone( + _self: Ref<::bevy_input::mouse::MouseMotion>, + ) -> Val<::bevy_input::mouse::MouseMotion> { + let output: Val<::bevy_input::mouse::MouseMotion> = <::bevy_input::mouse::MouseMotion as ::core::clone::Clone>::clone( + &_self, + ) + .into(); + output + } + fn eq( + _self: Ref<::bevy_input::mouse::MouseMotion>, + other: Ref<::bevy_input::mouse::MouseMotion>, + ) -> bool { + let output: bool = <::bevy_input::mouse::MouseMotion as ::core::cmp::PartialEq< + ::bevy_input::mouse::MouseMotion, + >>::eq(&_self, &other) + .into(); + output + } +} +#[script_bindings( + remote, + name = "mouse_wheel_functions", + bms_core_path = "bevy_mod_scripting_core", + generated +)] +impl ::bevy_input::mouse::MouseWheel { + fn clone( + _self: Ref<::bevy_input::mouse::MouseWheel>, + ) -> Val<::bevy_input::mouse::MouseWheel> { + let output: Val<::bevy_input::mouse::MouseWheel> = <::bevy_input::mouse::MouseWheel as ::core::clone::Clone>::clone( + &_self, + ) + .into(); + output + } + fn eq( + _self: Ref<::bevy_input::mouse::MouseWheel>, + other: Ref<::bevy_input::mouse::MouseWheel>, + ) -> bool { + let output: bool = <::bevy_input::mouse::MouseWheel as ::core::cmp::PartialEq< + ::bevy_input::mouse::MouseWheel, + >>::eq(&_self, &other) + .into(); + output + } +} +#[script_bindings( + remote, + name = "gamepad_axis_changed_event_functions", + bms_core_path = "bevy_mod_scripting_core", + generated +)] +impl ::bevy_input::gamepad::GamepadAxisChangedEvent { + fn clone( + _self: Ref<::bevy_input::gamepad::GamepadAxisChangedEvent>, + ) -> Val<::bevy_input::gamepad::GamepadAxisChangedEvent> { + let output: Val<::bevy_input::gamepad::GamepadAxisChangedEvent> = <::bevy_input::gamepad::GamepadAxisChangedEvent as ::core::clone::Clone>::clone( + &_self, + ) + .into(); + output + } + fn eq( + _self: Ref<::bevy_input::gamepad::GamepadAxisChangedEvent>, + other: Ref<::bevy_input::gamepad::GamepadAxisChangedEvent>, + ) -> bool { + let output: bool = <::bevy_input::gamepad::GamepadAxisChangedEvent as ::core::cmp::PartialEq< + ::bevy_input::gamepad::GamepadAxisChangedEvent, + >>::eq(&_self, &other) + .into(); + output + } + /// Creates a new [`GamepadAxisChangedEvent`]. + fn new( + entity: Val<::bevy_ecs::entity::Entity>, + axis: Val<::bevy_input::gamepad::GamepadAxis>, + value: f32, + ) -> Val<::bevy_input::gamepad::GamepadAxisChangedEvent> { + let output: Val<::bevy_input::gamepad::GamepadAxisChangedEvent> = ::bevy_input::gamepad::GamepadAxisChangedEvent::new( + entity.into_inner(), + axis.into_inner(), + value, + ) + .into(); + output + } +} +#[script_bindings( + remote, + name = "gamepad_button_changed_event_functions", + bms_core_path = "bevy_mod_scripting_core", + generated +)] +impl ::bevy_input::gamepad::GamepadButtonChangedEvent { + fn clone( + _self: Ref<::bevy_input::gamepad::GamepadButtonChangedEvent>, + ) -> Val<::bevy_input::gamepad::GamepadButtonChangedEvent> { + let output: Val<::bevy_input::gamepad::GamepadButtonChangedEvent> = <::bevy_input::gamepad::GamepadButtonChangedEvent as ::core::clone::Clone>::clone( + &_self, + ) + .into(); + output + } + fn eq( + _self: Ref<::bevy_input::gamepad::GamepadButtonChangedEvent>, + other: Ref<::bevy_input::gamepad::GamepadButtonChangedEvent>, + ) -> bool { + let output: bool = <::bevy_input::gamepad::GamepadButtonChangedEvent as ::core::cmp::PartialEq< + ::bevy_input::gamepad::GamepadButtonChangedEvent, + >>::eq(&_self, &other) + .into(); + output + } + /// Creates a new [`GamepadButtonChangedEvent`]. + fn new( + entity: Val<::bevy_ecs::entity::Entity>, + button: Val<::bevy_input::gamepad::GamepadButton>, + state: Val<::bevy_input::ButtonState>, + value: f32, + ) -> Val<::bevy_input::gamepad::GamepadButtonChangedEvent> { + let output: Val<::bevy_input::gamepad::GamepadButtonChangedEvent> = ::bevy_input::gamepad::GamepadButtonChangedEvent::new( + entity.into_inner(), + button.into_inner(), + state.into_inner(), + value, + ) + .into(); + output + } +} +#[script_bindings( + remote, + name = "gamepad_button_state_changed_event_functions", + bms_core_path = "bevy_mod_scripting_core", + generated +)] +impl ::bevy_input::gamepad::GamepadButtonStateChangedEvent { + fn assert_receiver_is_total_eq( + _self: Ref<::bevy_input::gamepad::GamepadButtonStateChangedEvent>, + ) -> () { + let output: () = <::bevy_input::gamepad::GamepadButtonStateChangedEvent as ::core::cmp::Eq>::assert_receiver_is_total_eq( + &_self, + ) + .into(); + output + } + fn clone( + _self: Ref<::bevy_input::gamepad::GamepadButtonStateChangedEvent>, + ) -> Val<::bevy_input::gamepad::GamepadButtonStateChangedEvent> { + let output: Val<::bevy_input::gamepad::GamepadButtonStateChangedEvent> = <::bevy_input::gamepad::GamepadButtonStateChangedEvent as ::core::clone::Clone>::clone( + &_self, + ) + .into(); + output + } + fn eq( + _self: Ref<::bevy_input::gamepad::GamepadButtonStateChangedEvent>, + other: Ref<::bevy_input::gamepad::GamepadButtonStateChangedEvent>, + ) -> bool { + let output: bool = <::bevy_input::gamepad::GamepadButtonStateChangedEvent as ::core::cmp::PartialEq< + ::bevy_input::gamepad::GamepadButtonStateChangedEvent, + >>::eq(&_self, &other) + .into(); + output + } + /// Creates a new [`GamepadButtonStateChangedEvent`]. + fn new( + entity: Val<::bevy_ecs::entity::Entity>, + button: Val<::bevy_input::gamepad::GamepadButton>, + state: Val<::bevy_input::ButtonState>, + ) -> Val<::bevy_input::gamepad::GamepadButtonStateChangedEvent> { + let output: Val<::bevy_input::gamepad::GamepadButtonStateChangedEvent> = ::bevy_input::gamepad::GamepadButtonStateChangedEvent::new( + entity.into_inner(), + button.into_inner(), + state.into_inner(), + ) + .into(); + output + } +} +#[script_bindings( + remote, + name = "gamepad_connection_functions", + bms_core_path = "bevy_mod_scripting_core", + generated +)] +impl ::bevy_input::gamepad::GamepadConnection { + fn clone( + _self: Ref<::bevy_input::gamepad::GamepadConnection>, + ) -> Val<::bevy_input::gamepad::GamepadConnection> { + let output: Val<::bevy_input::gamepad::GamepadConnection> = <::bevy_input::gamepad::GamepadConnection as ::core::clone::Clone>::clone( + &_self, + ) + .into(); + output + } + fn eq( + _self: Ref<::bevy_input::gamepad::GamepadConnection>, + other: Ref<::bevy_input::gamepad::GamepadConnection>, + ) -> bool { + let output: bool = <::bevy_input::gamepad::GamepadConnection as ::core::cmp::PartialEq< + ::bevy_input::gamepad::GamepadConnection, + >>::eq(&_self, &other) + .into(); + output + } +} +#[script_bindings( + remote, + name = "gamepad_connection_event_functions", + bms_core_path = "bevy_mod_scripting_core", + generated +)] +impl ::bevy_input::gamepad::GamepadConnectionEvent { + fn clone( + _self: Ref<::bevy_input::gamepad::GamepadConnectionEvent>, + ) -> Val<::bevy_input::gamepad::GamepadConnectionEvent> { + let output: Val<::bevy_input::gamepad::GamepadConnectionEvent> = <::bevy_input::gamepad::GamepadConnectionEvent as ::core::clone::Clone>::clone( + &_self, + ) + .into(); + output + } + /// Whether the gamepad is connected. + fn connected(_self: Ref<::bevy_input::gamepad::GamepadConnectionEvent>) -> bool { + let output: bool = ::bevy_input::gamepad::GamepadConnectionEvent::connected( + &_self, + ) + .into(); + output + } + /// Whether the gamepad is disconnected. + fn disconnected(_self: Ref<::bevy_input::gamepad::GamepadConnectionEvent>) -> bool { + let output: bool = ::bevy_input::gamepad::GamepadConnectionEvent::disconnected( + &_self, + ) + .into(); + output + } + fn eq( + _self: Ref<::bevy_input::gamepad::GamepadConnectionEvent>, + other: Ref<::bevy_input::gamepad::GamepadConnectionEvent>, + ) -> bool { + let output: bool = <::bevy_input::gamepad::GamepadConnectionEvent as ::core::cmp::PartialEq< + ::bevy_input::gamepad::GamepadConnectionEvent, + >>::eq(&_self, &other) + .into(); + output + } + /// Creates a [`GamepadConnectionEvent`]. + fn new( + gamepad: Val<::bevy_ecs::entity::Entity>, + connection: Val<::bevy_input::gamepad::GamepadConnection>, + ) -> Val<::bevy_input::gamepad::GamepadConnectionEvent> { + let output: Val<::bevy_input::gamepad::GamepadConnectionEvent> = ::bevy_input::gamepad::GamepadConnectionEvent::new( + gamepad.into_inner(), + connection.into_inner(), + ) + .into(); + output + } +} +#[script_bindings( + remote, + name = "gamepad_event_functions", + bms_core_path = "bevy_mod_scripting_core", + generated +)] +impl ::bevy_input::gamepad::GamepadEvent { + fn clone( + _self: Ref<::bevy_input::gamepad::GamepadEvent>, + ) -> Val<::bevy_input::gamepad::GamepadEvent> { + let output: Val<::bevy_input::gamepad::GamepadEvent> = <::bevy_input::gamepad::GamepadEvent as ::core::clone::Clone>::clone( + &_self, + ) + .into(); + output + } + fn eq( + _self: Ref<::bevy_input::gamepad::GamepadEvent>, + other: Ref<::bevy_input::gamepad::GamepadEvent>, + ) -> bool { + let output: bool = <::bevy_input::gamepad::GamepadEvent as ::core::cmp::PartialEq< + ::bevy_input::gamepad::GamepadEvent, + >>::eq(&_self, &other) + .into(); + output + } +} +#[script_bindings( + remote, + name = "gamepad_input_functions", + bms_core_path = "bevy_mod_scripting_core", + generated +)] +impl ::bevy_input::gamepad::GamepadInput { + fn assert_receiver_is_total_eq( + _self: Ref<::bevy_input::gamepad::GamepadInput>, + ) -> () { + let output: () = <::bevy_input::gamepad::GamepadInput as ::core::cmp::Eq>::assert_receiver_is_total_eq( + &_self, + ) + .into(); + output + } + fn clone( + _self: Ref<::bevy_input::gamepad::GamepadInput>, + ) -> Val<::bevy_input::gamepad::GamepadInput> { + let output: Val<::bevy_input::gamepad::GamepadInput> = <::bevy_input::gamepad::GamepadInput as ::core::clone::Clone>::clone( + &_self, + ) + .into(); + output + } + fn eq( + _self: Ref<::bevy_input::gamepad::GamepadInput>, + other: Ref<::bevy_input::gamepad::GamepadInput>, + ) -> bool { + let output: bool = <::bevy_input::gamepad::GamepadInput as ::core::cmp::PartialEq< + ::bevy_input::gamepad::GamepadInput, + >>::eq(&_self, &other) + .into(); + output + } +} +#[script_bindings( + remote, + name = "gamepad_rumble_request_functions", + bms_core_path = "bevy_mod_scripting_core", + generated +)] +impl ::bevy_input::gamepad::GamepadRumbleRequest { + fn clone( + _self: Ref<::bevy_input::gamepad::GamepadRumbleRequest>, + ) -> Val<::bevy_input::gamepad::GamepadRumbleRequest> { + let output: Val<::bevy_input::gamepad::GamepadRumbleRequest> = <::bevy_input::gamepad::GamepadRumbleRequest as ::core::clone::Clone>::clone( + &_self, + ) + .into(); + output + } + /// Get the [`Entity`] associated with this request. + fn gamepad( + _self: Ref<::bevy_input::gamepad::GamepadRumbleRequest>, + ) -> Val<::bevy_ecs::entity::Entity> { + let output: Val<::bevy_ecs::entity::Entity> = ::bevy_input::gamepad::GamepadRumbleRequest::gamepad( + &_self, + ) + .into(); + output + } +} +#[script_bindings( + remote, + name = "raw_gamepad_axis_changed_event_functions", + bms_core_path = "bevy_mod_scripting_core", + generated +)] +impl ::bevy_input::gamepad::RawGamepadAxisChangedEvent { + fn clone( + _self: Ref<::bevy_input::gamepad::RawGamepadAxisChangedEvent>, + ) -> Val<::bevy_input::gamepad::RawGamepadAxisChangedEvent> { + let output: Val<::bevy_input::gamepad::RawGamepadAxisChangedEvent> = <::bevy_input::gamepad::RawGamepadAxisChangedEvent as ::core::clone::Clone>::clone( + &_self, + ) + .into(); + output + } + fn eq( + _self: Ref<::bevy_input::gamepad::RawGamepadAxisChangedEvent>, + other: Ref<::bevy_input::gamepad::RawGamepadAxisChangedEvent>, + ) -> bool { + let output: bool = <::bevy_input::gamepad::RawGamepadAxisChangedEvent as ::core::cmp::PartialEq< + ::bevy_input::gamepad::RawGamepadAxisChangedEvent, + >>::eq(&_self, &other) + .into(); + output + } + /// Creates a [`RawGamepadAxisChangedEvent`]. + fn new( + gamepad: Val<::bevy_ecs::entity::Entity>, + axis_type: Val<::bevy_input::gamepad::GamepadAxis>, + value: f32, + ) -> Val<::bevy_input::gamepad::RawGamepadAxisChangedEvent> { + let output: Val<::bevy_input::gamepad::RawGamepadAxisChangedEvent> = ::bevy_input::gamepad::RawGamepadAxisChangedEvent::new( + gamepad.into_inner(), + axis_type.into_inner(), + value, + ) + .into(); + output + } +} +#[script_bindings( + remote, + name = "raw_gamepad_button_changed_event_functions", + bms_core_path = "bevy_mod_scripting_core", + generated +)] +impl ::bevy_input::gamepad::RawGamepadButtonChangedEvent { + fn clone( + _self: Ref<::bevy_input::gamepad::RawGamepadButtonChangedEvent>, + ) -> Val<::bevy_input::gamepad::RawGamepadButtonChangedEvent> { + let output: Val<::bevy_input::gamepad::RawGamepadButtonChangedEvent> = <::bevy_input::gamepad::RawGamepadButtonChangedEvent as ::core::clone::Clone>::clone( + &_self, + ) + .into(); + output + } + fn eq( + _self: Ref<::bevy_input::gamepad::RawGamepadButtonChangedEvent>, + other: Ref<::bevy_input::gamepad::RawGamepadButtonChangedEvent>, + ) -> bool { + let output: bool = <::bevy_input::gamepad::RawGamepadButtonChangedEvent as ::core::cmp::PartialEq< + ::bevy_input::gamepad::RawGamepadButtonChangedEvent, + >>::eq(&_self, &other) + .into(); + output + } + /// Creates a [`RawGamepadButtonChangedEvent`]. + fn new( + gamepad: Val<::bevy_ecs::entity::Entity>, + button_type: Val<::bevy_input::gamepad::GamepadButton>, + value: f32, + ) -> Val<::bevy_input::gamepad::RawGamepadButtonChangedEvent> { + let output: Val<::bevy_input::gamepad::RawGamepadButtonChangedEvent> = ::bevy_input::gamepad::RawGamepadButtonChangedEvent::new( + gamepad.into_inner(), + button_type.into_inner(), + value, + ) + .into(); + output + } +} +#[script_bindings( + remote, + name = "raw_gamepad_event_functions", + bms_core_path = "bevy_mod_scripting_core", + generated +)] +impl ::bevy_input::gamepad::RawGamepadEvent { + fn clone( + _self: Ref<::bevy_input::gamepad::RawGamepadEvent>, + ) -> Val<::bevy_input::gamepad::RawGamepadEvent> { + let output: Val<::bevy_input::gamepad::RawGamepadEvent> = <::bevy_input::gamepad::RawGamepadEvent as ::core::clone::Clone>::clone( + &_self, + ) + .into(); + output + } + fn eq( + _self: Ref<::bevy_input::gamepad::RawGamepadEvent>, + other: Ref<::bevy_input::gamepad::RawGamepadEvent>, + ) -> bool { + let output: bool = <::bevy_input::gamepad::RawGamepadEvent as ::core::cmp::PartialEq< + ::bevy_input::gamepad::RawGamepadEvent, + >>::eq(&_self, &other) + .into(); + output + } +} +#[script_bindings( + remote, + name = "pinch_gesture_functions", + bms_core_path = "bevy_mod_scripting_core", + generated +)] +impl ::bevy_input::gestures::PinchGesture { + fn clone( + _self: Ref<::bevy_input::gestures::PinchGesture>, + ) -> Val<::bevy_input::gestures::PinchGesture> { + let output: Val<::bevy_input::gestures::PinchGesture> = <::bevy_input::gestures::PinchGesture as ::core::clone::Clone>::clone( + &_self, + ) + .into(); + output + } + fn eq( + _self: Ref<::bevy_input::gestures::PinchGesture>, + other: Ref<::bevy_input::gestures::PinchGesture>, + ) -> bool { + let output: bool = <::bevy_input::gestures::PinchGesture as ::core::cmp::PartialEq< + ::bevy_input::gestures::PinchGesture, + >>::eq(&_self, &other) + .into(); + output + } +} +#[script_bindings( + remote, + name = "rotation_gesture_functions", + bms_core_path = "bevy_mod_scripting_core", + generated +)] +impl ::bevy_input::gestures::RotationGesture { + fn clone( + _self: Ref<::bevy_input::gestures::RotationGesture>, + ) -> Val<::bevy_input::gestures::RotationGesture> { + let output: Val<::bevy_input::gestures::RotationGesture> = <::bevy_input::gestures::RotationGesture as ::core::clone::Clone>::clone( + &_self, + ) + .into(); + output + } + fn eq( + _self: Ref<::bevy_input::gestures::RotationGesture>, + other: Ref<::bevy_input::gestures::RotationGesture>, + ) -> bool { + let output: bool = <::bevy_input::gestures::RotationGesture as ::core::cmp::PartialEq< + ::bevy_input::gestures::RotationGesture, + >>::eq(&_self, &other) + .into(); + output + } +} +#[script_bindings( + remote, + name = "double_tap_gesture_functions", + bms_core_path = "bevy_mod_scripting_core", + generated +)] +impl ::bevy_input::gestures::DoubleTapGesture { + fn clone( + _self: Ref<::bevy_input::gestures::DoubleTapGesture>, + ) -> Val<::bevy_input::gestures::DoubleTapGesture> { + let output: Val<::bevy_input::gestures::DoubleTapGesture> = <::bevy_input::gestures::DoubleTapGesture as ::core::clone::Clone>::clone( + &_self, + ) + .into(); + output + } + fn eq( + _self: Ref<::bevy_input::gestures::DoubleTapGesture>, + other: Ref<::bevy_input::gestures::DoubleTapGesture>, + ) -> bool { + let output: bool = <::bevy_input::gestures::DoubleTapGesture as ::core::cmp::PartialEq< + ::bevy_input::gestures::DoubleTapGesture, + >>::eq(&_self, &other) + .into(); + output + } +} +#[script_bindings( + remote, + name = "pan_gesture_functions", + bms_core_path = "bevy_mod_scripting_core", + generated +)] +impl ::bevy_input::gestures::PanGesture { + fn clone( + _self: Ref<::bevy_input::gestures::PanGesture>, + ) -> Val<::bevy_input::gestures::PanGesture> { + let output: Val<::bevy_input::gestures::PanGesture> = <::bevy_input::gestures::PanGesture as ::core::clone::Clone>::clone( + &_self, + ) + .into(); + output + } + fn eq( + _self: Ref<::bevy_input::gestures::PanGesture>, + other: Ref<::bevy_input::gestures::PanGesture>, + ) -> bool { + let output: bool = <::bevy_input::gestures::PanGesture as ::core::cmp::PartialEq< + ::bevy_input::gestures::PanGesture, + >>::eq(&_self, &other) + .into(); + output + } +} +#[script_bindings( + remote, + name = "button_state_functions", + bms_core_path = "bevy_mod_scripting_core", + generated +)] +impl ::bevy_input::ButtonState { + fn assert_receiver_is_total_eq(_self: Ref<::bevy_input::ButtonState>) -> () { + let output: () = <::bevy_input::ButtonState as ::core::cmp::Eq>::assert_receiver_is_total_eq( + &_self, + ) + .into(); + output + } + fn clone(_self: Ref<::bevy_input::ButtonState>) -> Val<::bevy_input::ButtonState> { + let output: Val<::bevy_input::ButtonState> = <::bevy_input::ButtonState as ::core::clone::Clone>::clone( + &_self, + ) + .into(); + output + } + fn eq( + _self: Ref<::bevy_input::ButtonState>, + other: Ref<::bevy_input::ButtonState>, + ) -> bool { + let output: bool = <::bevy_input::ButtonState as ::core::cmp::PartialEq< + ::bevy_input::ButtonState, + >>::eq(&_self, &other) + .into(); + output + } + /// Is this button pressed? + fn is_pressed(_self: Ref<::bevy_input::ButtonState>) -> bool { + let output: bool = ::bevy_input::ButtonState::is_pressed(&_self).into(); + output + } +} +#[script_bindings( + remote, + name = "button_settings_functions", + bms_core_path = "bevy_mod_scripting_core", + generated +)] +impl ::bevy_input::gamepad::ButtonSettings { + fn clone( + _self: Ref<::bevy_input::gamepad::ButtonSettings>, + ) -> Val<::bevy_input::gamepad::ButtonSettings> { + let output: Val<::bevy_input::gamepad::ButtonSettings> = <::bevy_input::gamepad::ButtonSettings as ::core::clone::Clone>::clone( + &_self, + ) + .into(); + output + } + fn eq( + _self: Ref<::bevy_input::gamepad::ButtonSettings>, + other: Ref<::bevy_input::gamepad::ButtonSettings>, + ) -> bool { + let output: bool = <::bevy_input::gamepad::ButtonSettings as ::core::cmp::PartialEq< + ::bevy_input::gamepad::ButtonSettings, + >>::eq(&_self, &other) + .into(); + output + } + /// Returns `true` if the button is pressed. + /// A button is considered pressed if the `value` passed is greater than or equal to the press threshold. + fn is_pressed( + _self: Ref<::bevy_input::gamepad::ButtonSettings>, + value: f32, + ) -> bool { + let output: bool = ::bevy_input::gamepad::ButtonSettings::is_pressed( + &_self, + value, + ) + .into(); + output + } + /// Returns `true` if the button is released. + /// A button is considered released if the `value` passed is lower than or equal to the release threshold. + fn is_released( + _self: Ref<::bevy_input::gamepad::ButtonSettings>, + value: f32, + ) -> bool { + let output: bool = ::bevy_input::gamepad::ButtonSettings::is_released( + &_self, + value, + ) + .into(); + output + } + /// Get the button input threshold above which the button is considered pressed. + fn press_threshold(_self: Ref<::bevy_input::gamepad::ButtonSettings>) -> f32 { + let output: f32 = ::bevy_input::gamepad::ButtonSettings::press_threshold(&_self) + .into(); + output + } + /// Get the button input threshold below which the button is considered released. + fn release_threshold(_self: Ref<::bevy_input::gamepad::ButtonSettings>) -> f32 { + let output: f32 = ::bevy_input::gamepad::ButtonSettings::release_threshold( + &_self, + ) + .into(); + output + } + /// Try to set the button input threshold above which the button is considered pressed. + /// If the value passed is outside the range [release threshold..=1.0], the value will not be changed. + /// Returns the new value of the press threshold. + fn set_press_threshold( + mut _self: Mut<::bevy_input::gamepad::ButtonSettings>, + value: f32, + ) -> f32 { + let output: f32 = ::bevy_input::gamepad::ButtonSettings::set_press_threshold( + &mut _self, + value, + ) + .into(); + output + } + /// Try to set the button input threshold below which the button is considered released. If the + /// value passed is outside the range [0.0..=press threshold], the value will not be changed. + /// Returns the new value of the release threshold. + fn set_release_threshold( + mut _self: Mut<::bevy_input::gamepad::ButtonSettings>, + value: f32, + ) -> f32 { + let output: f32 = ::bevy_input::gamepad::ButtonSettings::set_release_threshold( + &mut _self, + value, + ) + .into(); + output + } +} +#[script_bindings( + remote, + name = "axis_settings_functions", + bms_core_path = "bevy_mod_scripting_core", + generated +)] +impl ::bevy_input::gamepad::AxisSettings { + /// Clamps the `raw_value` according to the `AxisSettings`. + fn clamp(_self: Ref<::bevy_input::gamepad::AxisSettings>, raw_value: f32) -> f32 { + let output: f32 = ::bevy_input::gamepad::AxisSettings::clamp(&_self, raw_value) + .into(); + output + } + fn clone( + _self: Ref<::bevy_input::gamepad::AxisSettings>, + ) -> Val<::bevy_input::gamepad::AxisSettings> { + let output: Val<::bevy_input::gamepad::AxisSettings> = <::bevy_input::gamepad::AxisSettings as ::core::clone::Clone>::clone( + &_self, + ) + .into(); + output + } + /// Get the value above which inputs will be rounded up to 0.0. + fn deadzone_lowerbound(_self: Ref<::bevy_input::gamepad::AxisSettings>) -> f32 { + let output: f32 = ::bevy_input::gamepad::AxisSettings::deadzone_lowerbound( + &_self, + ) + .into(); + output + } + /// Get the value below which positive inputs will be rounded down to 0.0. + fn deadzone_upperbound(_self: Ref<::bevy_input::gamepad::AxisSettings>) -> f32 { + let output: f32 = ::bevy_input::gamepad::AxisSettings::deadzone_upperbound( + &_self, + ) + .into(); + output + } + fn eq( + _self: Ref<::bevy_input::gamepad::AxisSettings>, + other: Ref<::bevy_input::gamepad::AxisSettings>, + ) -> bool { + let output: bool = <::bevy_input::gamepad::AxisSettings as ::core::cmp::PartialEq< + ::bevy_input::gamepad::AxisSettings, + >>::eq(&_self, &other) + .into(); + output + } + /// Get the value below which negative inputs will be rounded down to -1.0. + fn livezone_lowerbound(_self: Ref<::bevy_input::gamepad::AxisSettings>) -> f32 { + let output: f32 = ::bevy_input::gamepad::AxisSettings::livezone_lowerbound( + &_self, + ) + .into(); + output + } + /// Get the value above which inputs will be rounded up to 1.0. + fn livezone_upperbound(_self: Ref<::bevy_input::gamepad::AxisSettings>) -> f32 { + let output: f32 = ::bevy_input::gamepad::AxisSettings::livezone_upperbound( + &_self, + ) + .into(); + output + } + /// Try to set the value above which inputs will be rounded up to 0.0. + /// If the value passed is less than -1.0 or less than `livezone_lowerbound`, + /// the value will not be changed. + /// Returns the new value of `deadzone_lowerbound`. + fn set_deadzone_lowerbound( + mut _self: Mut<::bevy_input::gamepad::AxisSettings>, + value: f32, + ) -> f32 { + let output: f32 = ::bevy_input::gamepad::AxisSettings::set_deadzone_lowerbound( + &mut _self, + value, + ) + .into(); + output + } + /// Try to set the value below which positive inputs will be rounded down to 0.0. + /// If the value passed is negative or greater than `livezone_upperbound`, + /// the value will not be changed. + /// Returns the new value of `deadzone_upperbound`. + fn set_deadzone_upperbound( + mut _self: Mut<::bevy_input::gamepad::AxisSettings>, + value: f32, + ) -> f32 { + let output: f32 = ::bevy_input::gamepad::AxisSettings::set_deadzone_upperbound( + &mut _self, + value, + ) + .into(); + output + } + /// Try to set the value below which negative inputs will be rounded down to -1.0. + /// If the value passed is positive or greater than `deadzone_lowerbound`, + /// the value will not be changed. + /// Returns the new value of `livezone_lowerbound`. + fn set_livezone_lowerbound( + mut _self: Mut<::bevy_input::gamepad::AxisSettings>, + value: f32, + ) -> f32 { + let output: f32 = ::bevy_input::gamepad::AxisSettings::set_livezone_lowerbound( + &mut _self, + value, + ) + .into(); + output + } + /// Try to set the value above which inputs will be rounded up to 1.0. + /// If the value passed is negative or less than `deadzone_upperbound`, + /// the value will not be changed. + /// Returns the new value of `livezone_upperbound`. + fn set_livezone_upperbound( + mut _self: Mut<::bevy_input::gamepad::AxisSettings>, + value: f32, + ) -> f32 { + let output: f32 = ::bevy_input::gamepad::AxisSettings::set_livezone_upperbound( + &mut _self, + value, + ) + .into(); + output + } + /// Try to set the minimum value by which input must change before the changes will be applied. + /// If the value passed is not within [0.0..=2.0], the value will not be changed. + /// Returns the new value of threshold. + fn set_threshold( + mut _self: Mut<::bevy_input::gamepad::AxisSettings>, + value: f32, + ) -> f32 { + let output: f32 = ::bevy_input::gamepad::AxisSettings::set_threshold( + &mut _self, + value, + ) + .into(); + output + } + /// Get the minimum value by which input must change before the change is registered. + fn threshold(_self: Ref<::bevy_input::gamepad::AxisSettings>) -> f32 { + let output: f32 = ::bevy_input::gamepad::AxisSettings::threshold(&_self).into(); + output + } +} +#[script_bindings( + remote, + name = "button_axis_settings_functions", + bms_core_path = "bevy_mod_scripting_core", + generated +)] +impl ::bevy_input::gamepad::ButtonAxisSettings { + fn clone( + _self: Ref<::bevy_input::gamepad::ButtonAxisSettings>, + ) -> Val<::bevy_input::gamepad::ButtonAxisSettings> { + let output: Val<::bevy_input::gamepad::ButtonAxisSettings> = <::bevy_input::gamepad::ButtonAxisSettings as ::core::clone::Clone>::clone( + &_self, + ) + .into(); + output + } +} +#[script_bindings( + remote, + name = "gamepad_rumble_intensity_functions", + bms_core_path = "bevy_mod_scripting_core", + generated +)] +impl ::bevy_input::gamepad::GamepadRumbleIntensity { + fn clone( + _self: Ref<::bevy_input::gamepad::GamepadRumbleIntensity>, + ) -> Val<::bevy_input::gamepad::GamepadRumbleIntensity> { + let output: Val<::bevy_input::gamepad::GamepadRumbleIntensity> = <::bevy_input::gamepad::GamepadRumbleIntensity as ::core::clone::Clone>::clone( + &_self, + ) + .into(); + output + } + fn eq( + _self: Ref<::bevy_input::gamepad::GamepadRumbleIntensity>, + other: Ref<::bevy_input::gamepad::GamepadRumbleIntensity>, + ) -> bool { + let output: bool = <::bevy_input::gamepad::GamepadRumbleIntensity as ::core::cmp::PartialEq< + ::bevy_input::gamepad::GamepadRumbleIntensity, + >>::eq(&_self, &other) + .into(); + output + } + /// Creates a new rumble intensity with strong motor intensity set to the given value. + /// Clamped within the `0.0` to `1.0` range. + fn strong_motor( + intensity: f32, + ) -> Val<::bevy_input::gamepad::GamepadRumbleIntensity> { + let output: Val<::bevy_input::gamepad::GamepadRumbleIntensity> = ::bevy_input::gamepad::GamepadRumbleIntensity::strong_motor( + intensity, + ) + .into(); + output + } + /// Creates a new rumble intensity with weak motor intensity set to the given value. + /// Clamped within the `0.0` to `1.0` range. + fn weak_motor(intensity: f32) -> Val<::bevy_input::gamepad::GamepadRumbleIntensity> { + let output: Val<::bevy_input::gamepad::GamepadRumbleIntensity> = ::bevy_input::gamepad::GamepadRumbleIntensity::weak_motor( + intensity, + ) + .into(); + output + } +} +#[script_bindings( + remote, + name = "key_functions", + bms_core_path = "bevy_mod_scripting_core", + generated +)] +impl ::bevy_input::keyboard::Key { + fn assert_receiver_is_total_eq(_self: Ref<::bevy_input::keyboard::Key>) -> () { + let output: () = <::bevy_input::keyboard::Key as ::core::cmp::Eq>::assert_receiver_is_total_eq( + &_self, + ) + .into(); + output + } + fn clone( + _self: Ref<::bevy_input::keyboard::Key>, + ) -> Val<::bevy_input::keyboard::Key> { + let output: Val<::bevy_input::keyboard::Key> = <::bevy_input::keyboard::Key as ::core::clone::Clone>::clone( + &_self, + ) + .into(); + output + } + fn eq( + _self: Ref<::bevy_input::keyboard::Key>, + other: Ref<::bevy_input::keyboard::Key>, + ) -> bool { + let output: bool = <::bevy_input::keyboard::Key as ::core::cmp::PartialEq< + ::bevy_input::keyboard::Key, + >>::eq(&_self, &other) + .into(); + output + } +} +#[script_bindings( + remote, + name = "native_key_code_functions", + bms_core_path = "bevy_mod_scripting_core", + generated +)] +impl ::bevy_input::keyboard::NativeKeyCode { + fn assert_receiver_is_total_eq( + _self: Ref<::bevy_input::keyboard::NativeKeyCode>, + ) -> () { + let output: () = <::bevy_input::keyboard::NativeKeyCode as ::core::cmp::Eq>::assert_receiver_is_total_eq( + &_self, + ) + .into(); + output + } + fn clone( + _self: Ref<::bevy_input::keyboard::NativeKeyCode>, + ) -> Val<::bevy_input::keyboard::NativeKeyCode> { + let output: Val<::bevy_input::keyboard::NativeKeyCode> = <::bevy_input::keyboard::NativeKeyCode as ::core::clone::Clone>::clone( + &_self, + ) + .into(); + output + } + fn eq( + _self: Ref<::bevy_input::keyboard::NativeKeyCode>, + other: Ref<::bevy_input::keyboard::NativeKeyCode>, + ) -> bool { + let output: bool = <::bevy_input::keyboard::NativeKeyCode as ::core::cmp::PartialEq< + ::bevy_input::keyboard::NativeKeyCode, + >>::eq(&_self, &other) + .into(); + output + } +} +#[script_bindings( + remote, + name = "native_key_functions", + bms_core_path = "bevy_mod_scripting_core", + generated +)] +impl ::bevy_input::keyboard::NativeKey { + fn assert_receiver_is_total_eq(_self: Ref<::bevy_input::keyboard::NativeKey>) -> () { + let output: () = <::bevy_input::keyboard::NativeKey as ::core::cmp::Eq>::assert_receiver_is_total_eq( + &_self, + ) + .into(); + output + } + fn clone( + _self: Ref<::bevy_input::keyboard::NativeKey>, + ) -> Val<::bevy_input::keyboard::NativeKey> { + let output: Val<::bevy_input::keyboard::NativeKey> = <::bevy_input::keyboard::NativeKey as ::core::clone::Clone>::clone( + &_self, + ) + .into(); + output + } + fn eq( + _self: Ref<::bevy_input::keyboard::NativeKey>, + other: Ref<::bevy_input::keyboard::NativeKey>, + ) -> bool { + let output: bool = <::bevy_input::keyboard::NativeKey as ::core::cmp::PartialEq< + ::bevy_input::keyboard::NativeKey, + >>::eq(&_self, &other) + .into(); + output + } +} +#[script_bindings( + remote, + name = "mouse_scroll_unit_functions", + bms_core_path = "bevy_mod_scripting_core", + generated +)] +impl ::bevy_input::mouse::MouseScrollUnit { + fn assert_receiver_is_total_eq( + _self: Ref<::bevy_input::mouse::MouseScrollUnit>, + ) -> () { + let output: () = <::bevy_input::mouse::MouseScrollUnit as ::core::cmp::Eq>::assert_receiver_is_total_eq( + &_self, + ) + .into(); + output + } + fn clone( + _self: Ref<::bevy_input::mouse::MouseScrollUnit>, + ) -> Val<::bevy_input::mouse::MouseScrollUnit> { + let output: Val<::bevy_input::mouse::MouseScrollUnit> = <::bevy_input::mouse::MouseScrollUnit as ::core::clone::Clone>::clone( + &_self, + ) + .into(); + output + } + fn eq( + _self: Ref<::bevy_input::mouse::MouseScrollUnit>, + other: Ref<::bevy_input::mouse::MouseScrollUnit>, + ) -> bool { + let output: bool = <::bevy_input::mouse::MouseScrollUnit as ::core::cmp::PartialEq< + ::bevy_input::mouse::MouseScrollUnit, + >>::eq(&_self, &other) + .into(); + output + } +} +#[script_bindings( + remote, + name = "touch_phase_functions", + bms_core_path = "bevy_mod_scripting_core", + generated +)] +impl ::bevy_input::touch::TouchPhase { + fn assert_receiver_is_total_eq(_self: Ref<::bevy_input::touch::TouchPhase>) -> () { + let output: () = <::bevy_input::touch::TouchPhase as ::core::cmp::Eq>::assert_receiver_is_total_eq( + &_self, + ) + .into(); + output + } + fn clone( + _self: Ref<::bevy_input::touch::TouchPhase>, + ) -> Val<::bevy_input::touch::TouchPhase> { + let output: Val<::bevy_input::touch::TouchPhase> = <::bevy_input::touch::TouchPhase as ::core::clone::Clone>::clone( + &_self, + ) + .into(); + output + } + fn eq( + _self: Ref<::bevy_input::touch::TouchPhase>, + other: Ref<::bevy_input::touch::TouchPhase>, + ) -> bool { + let output: bool = <::bevy_input::touch::TouchPhase as ::core::cmp::PartialEq< + ::bevy_input::touch::TouchPhase, + >>::eq(&_self, &other) + .into(); + output + } +} +#[script_bindings( + remote, + name = "force_touch_functions", + bms_core_path = "bevy_mod_scripting_core", + generated +)] +impl ::bevy_input::touch::ForceTouch { + fn clone( + _self: Ref<::bevy_input::touch::ForceTouch>, + ) -> Val<::bevy_input::touch::ForceTouch> { + let output: Val<::bevy_input::touch::ForceTouch> = <::bevy_input::touch::ForceTouch as ::core::clone::Clone>::clone( + &_self, + ) + .into(); + output + } + fn eq( + _self: Ref<::bevy_input::touch::ForceTouch>, + other: Ref<::bevy_input::touch::ForceTouch>, + ) -> bool { + let output: bool = <::bevy_input::touch::ForceTouch as ::core::cmp::PartialEq< + ::bevy_input::touch::ForceTouch, + >>::eq(&_self, &other) + .into(); + output + } +} +impl Plugin for BevyInputScriptingPlugin { + fn build(&self, app: &mut App) { + let mut world = app.world_mut(); + register_gamepad_functions(&mut world); + register_gamepad_axis_functions(&mut world); + register_gamepad_button_functions(&mut world); + register_gamepad_settings_functions(&mut world); + register_key_code_functions(&mut world); + register_mouse_button_functions(&mut world); + register_touch_input_functions(&mut world); + register_keyboard_focus_lost_functions(&mut world); + register_keyboard_input_functions(&mut world); + register_accumulated_mouse_motion_functions(&mut world); + register_accumulated_mouse_scroll_functions(&mut world); + register_mouse_button_input_functions(&mut world); + register_mouse_motion_functions(&mut world); + register_mouse_wheel_functions(&mut world); + register_gamepad_axis_changed_event_functions(&mut world); + register_gamepad_button_changed_event_functions(&mut world); + register_gamepad_button_state_changed_event_functions(&mut world); + register_gamepad_connection_functions(&mut world); + register_gamepad_connection_event_functions(&mut world); + register_gamepad_event_functions(&mut world); + register_gamepad_input_functions(&mut world); + register_gamepad_rumble_request_functions(&mut world); + register_raw_gamepad_axis_changed_event_functions(&mut world); + register_raw_gamepad_button_changed_event_functions(&mut world); + register_raw_gamepad_event_functions(&mut world); + register_pinch_gesture_functions(&mut world); + register_rotation_gesture_functions(&mut world); + register_double_tap_gesture_functions(&mut world); + register_pan_gesture_functions(&mut world); + register_button_state_functions(&mut world); + register_button_settings_functions(&mut world); + register_axis_settings_functions(&mut world); + register_button_axis_settings_functions(&mut world); + register_gamepad_rumble_intensity_functions(&mut world); + register_key_functions(&mut world); + register_native_key_code_functions(&mut world); + register_native_key_functions(&mut world); + register_mouse_scroll_unit_functions(&mut world); + register_touch_phase_functions(&mut world); + register_force_touch_functions(&mut world); + } +} 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 103466bc86..e856c5e03a 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 @@ -1,9099 +1,5479 @@ - #![allow(clippy::all)] - #![allow(unused, deprecated, dead_code)] - 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 BevyMathScriptingPlugin; - pub(crate) fn register_aspect_ratio_functions(world: &mut bevy::ecs::world::World) { - bevy_mod_scripting_core::bindings::function::namespace::NamespaceBuilder::< - bevy::math::AspectRatio, - >::new(world) - .register_documented( - "clone", - |_self: Ref| { - let output: Val = { - { - let output: Val = ::clone( - &_self, - ) - .into(); - output - } - }; - output - }, - "", - &["_self"], - ) - .register_documented( - "eq", - | - _self: Ref, - other: Ref| - { - let output: bool = { - { - let output: bool = >::eq(&_self, &other) - .into(); - output - } - }; - output - }, - "", - &["_self", "other"], - ) - .register_documented( - "inverse", - |_self: Ref| { - let output: Val = { - { - let output: Val = bevy::math::AspectRatio::inverse( - &_self, - ) - .into(); - output - } - }; - output - }, - " Returns the inverse of this aspect ratio (height/width).", - &["_self"], - ) - .register_documented( - "is_landscape", - |_self: Ref| { - let output: bool = { - { - let output: bool = bevy::math::AspectRatio::is_landscape( - &_self, - ) - .into(); - output - } - }; - output - }, - " Returns true if the aspect ratio represents a landscape orientation.", - &["_self"], - ) - .register_documented( - "is_portrait", - |_self: Ref| { - let output: bool = { - { - let output: bool = bevy::math::AspectRatio::is_portrait( - &_self, - ) - .into(); - output - } - }; - output - }, - " Returns true if the aspect ratio represents a portrait orientation.", - &["_self"], - ) - .register_documented( - "is_square", - |_self: Ref| { - let output: bool = { - { - let output: bool = bevy::math::AspectRatio::is_square(&_self) - .into(); - output - } - }; - output - }, - " Returns true if the aspect ratio is exactly square.", - &["_self"], - ) - .register_documented( - "ratio", - |_self: Ref| { - let output: f32 = { - { - let output: f32 = bevy::math::AspectRatio::ratio(&_self) - .into(); - output - } - }; - output - }, - " Returns the aspect ratio as a f32 value.", - &["_self"], - ); - let registry = world - .get_resource_or_init::(); - let mut registry = registry.write(); - registry - .register_type_data::< - bevy::math::AspectRatio, - bevy_mod_scripting_core::bindings::MarkAsGenerated, - >(); - } - pub(crate) fn register_compass_octant_functions( - world: &mut bevy::ecs::world::World, - ) { - bevy_mod_scripting_core::bindings::function::namespace::NamespaceBuilder::< - bevy::math::CompassOctant, - >::new(world) - .register_documented( - "assert_receiver_is_total_eq", - |_self: Ref| { - let output: () = { - { - let output: () = ::assert_receiver_is_total_eq( - &_self, - ) - .into(); - output - } - }; - output - }, - "", - &["_self"], - ) - .register_documented( - "clone", - |_self: Ref| { - let output: Val = { - { - let output: Val = ::clone( - &_self, - ) - .into(); - output - } - }; - output - }, - "", - &["_self"], - ) - .register_documented( - "eq", - | - _self: Ref, - other: Ref| - { - let output: bool = { - { - let output: bool = >::eq(&_self, &other) - .into(); - output - } - }; - output - }, - "", - &["_self", "other"], - ) - .register_documented( - "neg", - |_self: Val| { - let output: Val = { - { - let output: Val = ::neg( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - "", - &["_self"], - ) - .register_documented( - "opposite", - |_self: Ref| { - let output: Val = { - { - let output: Val = bevy::math::CompassOctant::opposite( - &_self, - ) - .into(); - output - } - }; - output - }, - " Returns the opposite [`CompassOctant`], located 180 degrees from `self`.\n This can also be accessed via the `-` operator, using the [`Neg`] trait.", - &["_self"], - ) - .register_documented( - "to_index", - |_self: Val| { - let output: usize = { - { - let output: usize = bevy::math::CompassOctant::to_index( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Converts a [`CompassOctant`] to a standard index.\n Starts at 0 for [`CompassOctant::North`] and increments clockwise.", - &["_self"], - ); - let registry = world - .get_resource_or_init::(); - let mut registry = registry.write(); - registry - .register_type_data::< - bevy::math::CompassOctant, - bevy_mod_scripting_core::bindings::MarkAsGenerated, - >(); - } - pub(crate) fn register_compass_quadrant_functions( - world: &mut bevy::ecs::world::World, - ) { - bevy_mod_scripting_core::bindings::function::namespace::NamespaceBuilder::< - bevy::math::CompassQuadrant, - >::new(world) - .register_documented( - "assert_receiver_is_total_eq", - |_self: Ref| { - let output: () = { - { - let output: () = ::assert_receiver_is_total_eq( - &_self, - ) - .into(); - output - } - }; - output - }, - "", - &["_self"], - ) - .register_documented( - "clone", - |_self: Ref| { - let output: Val = { - { - let output: Val = ::clone( - &_self, - ) - .into(); - output - } - }; - output - }, - "", - &["_self"], - ) - .register_documented( - "eq", - | - _self: Ref, - other: Ref| - { - let output: bool = { - { - let output: bool = >::eq(&_self, &other) - .into(); - output - } - }; - output - }, - "", - &["_self", "other"], - ) - .register_documented( - "neg", - |_self: Val| { - let output: Val = { - { - let output: Val = ::neg( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - "", - &["_self"], - ) - .register_documented( - "opposite", - |_self: Ref| { - let output: Val = { - { - let output: Val = bevy::math::CompassQuadrant::opposite( - &_self, - ) - .into(); - output - } - }; - output - }, - " Returns the opposite [`CompassQuadrant`], located 180 degrees from `self`.\n This can also be accessed via the `-` operator, using the [`Neg`] trait.", - &["_self"], - ) - .register_documented( - "to_index", - |_self: Val| { - let output: usize = { - { - let output: usize = bevy::math::CompassQuadrant::to_index( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Converts a [`CompassQuadrant`] to a standard index.\n Starts at 0 for [`CompassQuadrant::North`] and increments clockwise.", - &["_self"], - ); - let registry = world - .get_resource_or_init::(); - let mut registry = registry.write(); - registry - .register_type_data::< - bevy::math::CompassQuadrant, - bevy_mod_scripting_core::bindings::MarkAsGenerated, - >(); - } - pub(crate) fn register_isometry_2_d_functions(world: &mut bevy::ecs::world::World) { - bevy_mod_scripting_core::bindings::function::namespace::NamespaceBuilder::< - bevy::math::Isometry2d, - >::new(world) - .register_documented( - "clone", - |_self: Ref| { - let output: Val = { - { - let output: Val = ::clone( - &_self, - ) - .into(); - output - } - }; - output - }, - "", - &["_self"], - ) - .register_documented( - "eq", - |_self: Ref, other: Ref| { - let output: bool = { - { - let output: bool = >::eq(&_self, &other) - .into(); - output - } - }; - output - }, - "", - &["_self", "other"], - ) - .register_documented( - "from_rotation", - |rotation: Val| { - let output: Val = { - { - let output: Val = bevy::math::Isometry2d::from_rotation( - rotation.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Create a two-dimensional isometry from a rotation.", - &["rotation"], - ) - .register_documented( - "from_translation", - |translation: Val| { - let output: Val = { - { - let output: Val = bevy::math::Isometry2d::from_translation( - translation.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Create a two-dimensional isometry from a translation.", - &["translation"], - ) - .register_documented( - "from_xy", - |x: f32, y: f32| { - let output: Val = { - { - let output: Val = bevy::math::Isometry2d::from_xy( - x, - y, - ) - .into(); - output - } - }; - output - }, - " Create a two-dimensional isometry from a translation with the given `x` and `y` components.", - &["x", "y"], - ) - .register_documented( - "inverse", - |_self: Ref| { - let output: Val = { - { - let output: Val = bevy::math::Isometry2d::inverse( - &_self, - ) - .into(); - output - } - }; - output - }, - " The inverse isometry that undoes this one.", - &["_self"], - ) - .register_documented( - "inverse_mul", - |_self: Ref, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::Isometry2d::inverse_mul( - &_self, - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Compute `iso1.inverse() * iso2` in a more efficient way for one-shot cases.\n If the same isometry is used multiple times, it is more efficient to instead compute\n the inverse once and use that for each transformation.", - &["_self", "rhs"], - ) - .register_documented( - "inverse_transform_point", - | - _self: Ref, - point: Val| - { - let output: Val = { - { - let output: Val = bevy::math::Isometry2d::inverse_transform_point( - &_self, - point.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Transform a point by rotating and translating it using the inverse of this isometry.\n This is more efficient than `iso.inverse().transform_point(point)` for one-shot cases.\n If the same isometry is used multiple times, it is more efficient to instead compute\n the inverse once and use that for each transformation.", - &["_self", "point"], - ) - .register_documented( - "mul", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = >::mul(_self.into_inner(), rhs.into_inner()) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "mul", - | - _self: Val, - rhs: Val| - { - let output: Val = { - { - let output: Val = >::mul(_self.into_inner(), rhs.into_inner()) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "mul", - | - _self: Val, - rhs: Val| - { - let output: Val = { - { - let output: Val = >::mul(_self.into_inner(), rhs.into_inner()) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "new", - | - translation: Val, - rotation: Val| - { - let output: Val = { - { - let output: Val = bevy::math::Isometry2d::new( - translation.into_inner(), - rotation.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Create a two-dimensional isometry from a rotation and a translation.", - &["translation", "rotation"], - ) - .register_documented( - "transform_point", - | - _self: Ref, - point: Val| - { - let output: Val = { - { - let output: Val = bevy::math::Isometry2d::transform_point( - &_self, - point.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Transform a point by rotating and translating it using this isometry.", - &["_self", "point"], - ); - let registry = world - .get_resource_or_init::(); - let mut registry = registry.write(); - registry - .register_type_data::< - bevy::math::Isometry2d, - bevy_mod_scripting_core::bindings::MarkAsGenerated, - >(); - } - pub(crate) fn register_isometry_3_d_functions(world: &mut bevy::ecs::world::World) { - bevy_mod_scripting_core::bindings::function::namespace::NamespaceBuilder::< - bevy::math::Isometry3d, - >::new(world) - .register_documented( - "clone", - |_self: Ref| { - let output: Val = { - { - let output: Val = ::clone( - &_self, - ) - .into(); - output - } - }; - output - }, - "", - &["_self"], - ) - .register_documented( - "eq", - |_self: Ref, other: Ref| { - let output: bool = { - { - let output: bool = >::eq(&_self, &other) - .into(); - output - } - }; - output - }, - "", - &["_self", "other"], - ) - .register_documented( - "from_rotation", - |rotation: Val| { - let output: Val = { - { - let output: Val = bevy::math::Isometry3d::from_rotation( - rotation.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Create a three-dimensional isometry from a rotation.", - &["rotation"], - ) - .register_documented( - "from_xyz", - |x: f32, y: f32, z: f32| { - let output: Val = { - { - let output: Val = bevy::math::Isometry3d::from_xyz( - x, - y, - z, - ) - .into(); - output - } - }; - output - }, - " Create a three-dimensional isometry from a translation with the given `x`, `y`, and `z` components.", - &["x", "y", "z"], - ) - .register_documented( - "inverse", - |_self: Ref| { - let output: Val = { - { - let output: Val = bevy::math::Isometry3d::inverse( - &_self, - ) - .into(); - output - } - }; - output - }, - " The inverse isometry that undoes this one.", - &["_self"], - ) - .register_documented( - "inverse_mul", - |_self: Ref, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::Isometry3d::inverse_mul( - &_self, - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Compute `iso1.inverse() * iso2` in a more efficient way for one-shot cases.\n If the same isometry is used multiple times, it is more efficient to instead compute\n the inverse once and use that for each transformation.", - &["_self", "rhs"], - ) - .register_documented( - "mul", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = >::mul(_self.into_inner(), rhs.into_inner()) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "mul", - | - _self: Val, - rhs: Val| - { - let output: Val = { - { - let output: Val = >::mul(_self.into_inner(), rhs.into_inner()) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "mul", - | - _self: Val, - rhs: Val| - { - let output: Val = { - { - let output: Val = >::mul(_self.into_inner(), rhs.into_inner()) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "mul", - | - _self: Val, - rhs: Val| - { - let output: Val = { - { - let output: Val = >::mul(_self.into_inner(), rhs.into_inner()) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ); - let registry = world - .get_resource_or_init::(); - let mut registry = registry.write(); - registry - .register_type_data::< - bevy::math::Isometry3d, - bevy_mod_scripting_core::bindings::MarkAsGenerated, - >(); - } - pub(crate) fn register_ray_2_d_functions(world: &mut bevy::ecs::world::World) { - bevy_mod_scripting_core::bindings::function::namespace::NamespaceBuilder::< - bevy::math::Ray2d, - >::new(world) - .register_documented( - "clone", - |_self: Ref| { - let output: Val = { - { - let output: Val = ::clone( - &_self, - ) - .into(); - output - } - }; - output - }, - "", - &["_self"], - ) - .register_documented( - "eq", - |_self: Ref, other: Ref| { - let output: bool = { - { - let output: bool = >::eq(&_self, &other) - .into(); - output - } - }; - output - }, - "", - &["_self", "other"], - ) - .register_documented( - "get_point", - |_self: Ref, distance: f32| { - let output: Val = { - { - let output: Val = bevy::math::Ray2d::get_point( - &_self, - distance, - ) - .into(); - output - } - }; - output - }, - " Get a point at a given distance along the ray", - &["_self", "distance"], - ) - .register_documented( - "intersect_plane", - | - _self: Ref, - plane_origin: Val, - plane: Val| - { - let output: ::core::option::Option = { - { - let output: ::core::option::Option = bevy::math::Ray2d::intersect_plane( - &_self, - plane_origin.into_inner(), - plane.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Get the distance to a plane if the ray intersects it", - &["_self", "plane_origin", "plane"], - ) - .register_documented( - "new", - | - origin: Val, - direction: Val| - { - let output: Val = { - { - let output: Val = bevy::math::Ray2d::new( - origin.into_inner(), - direction.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Create a new `Ray2d` from a given origin and direction", - &["origin", "direction"], - ); - let registry = world - .get_resource_or_init::(); - let mut registry = registry.write(); - registry - .register_type_data::< - bevy::math::Ray2d, - bevy_mod_scripting_core::bindings::MarkAsGenerated, - >(); - } - pub(crate) fn register_ray_3_d_functions(world: &mut bevy::ecs::world::World) { - bevy_mod_scripting_core::bindings::function::namespace::NamespaceBuilder::< - bevy::math::Ray3d, - >::new(world) - .register_documented( - "clone", - |_self: Ref| { - let output: Val = { - { - let output: Val = ::clone( - &_self, - ) - .into(); - output - } - }; - output - }, - "", - &["_self"], - ) - .register_documented( - "eq", - |_self: Ref, other: Ref| { - let output: bool = { - { - let output: bool = >::eq(&_self, &other) - .into(); - output - } - }; - output - }, - "", - &["_self", "other"], - ) - .register_documented( - "get_point", - |_self: Ref, distance: f32| { - let output: Val = { - { - let output: Val = bevy::math::Ray3d::get_point( - &_self, - distance, - ) - .into(); - output - } - }; - output - }, - " Get a point at a given distance along the ray", - &["_self", "distance"], - ) - .register_documented( - "intersect_plane", - | - _self: Ref, - plane_origin: Val, - plane: Val| - { - let output: ::core::option::Option = { - { - let output: ::core::option::Option = bevy::math::Ray3d::intersect_plane( - &_self, - plane_origin.into_inner(), - plane.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Get the distance to a plane if the ray intersects it", - &["_self", "plane_origin", "plane"], - ) - .register_documented( - "new", - | - origin: Val, - direction: Val| - { - let output: Val = { - { - let output: Val = bevy::math::Ray3d::new( - origin.into_inner(), - direction.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Create a new `Ray3d` from a given origin and direction", - &["origin", "direction"], - ); - let registry = world - .get_resource_or_init::(); - let mut registry = registry.write(); - registry - .register_type_data::< - bevy::math::Ray3d, - bevy_mod_scripting_core::bindings::MarkAsGenerated, - >(); - } - pub(crate) fn register_rot_2_functions(world: &mut bevy::ecs::world::World) { - bevy_mod_scripting_core::bindings::function::namespace::NamespaceBuilder::< - bevy::math::Rot2, - >::new(world) - .register_documented( - "angle_to", - |_self: Val, other: Val| { - let output: f32 = { - { - let output: f32 = bevy::math::Rot2::angle_to( - _self.into_inner(), - other.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns the angle in radians needed to make `self` and `other` coincide.", - &["_self", "other"], - ) - .register_documented( - "as_degrees", - |_self: Val| { - let output: f32 = { - { - let output: f32 = bevy::math::Rot2::as_degrees( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns the rotation in degrees in the `(-180, 180]` range.", - &["_self"], - ) - .register_documented( - "as_radians", - |_self: Val| { - let output: f32 = { - { - let output: f32 = bevy::math::Rot2::as_radians( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns the rotation in radians in the `(-pi, pi]` range.", - &["_self"], - ) - .register_documented( - "as_turn_fraction", - |_self: Val| { - let output: f32 = { - { - let output: f32 = bevy::math::Rot2::as_turn_fraction( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns the rotation as a fraction of a full 360 degree turn.", - &["_self"], - ) - .register_documented( - "clone", - |_self: Ref| { - let output: Val = { - { - let output: Val = ::clone( - &_self, - ) - .into(); - output - } - }; - output - }, - "", - &["_self"], - ) - .register_documented( - "degrees", - |degrees: f32| { - let output: Val = { - { - let output: Val = bevy::math::Rot2::degrees( - degrees, - ) - .into(); - output - } - }; - output - }, - " Creates a [`Rot2`] from a counterclockwise angle in degrees.\n # Note\n The input rotation will always be clamped to the range `(-180°, 180°]` by design.\n # Example\n ```\n # use bevy_math::Rot2;\n # use approx::assert_relative_eq;\n let rot1 = Rot2::degrees(270.0);\n let rot2 = Rot2::degrees(-90.0);\n #[cfg(feature = \"approx\")]\n assert_relative_eq!(rot1, rot2);\n let rot3 = Rot2::degrees(180.0);\n #[cfg(feature = \"approx\")]\n assert_relative_eq!(rot1 * rot1, rot3);\n ```", - &["degrees"], - ) - .register_documented( - "eq", - |_self: Ref, other: Ref| { - let output: bool = { - { - let output: bool = >::eq(&_self, &other) - .into(); - output - } - }; - output - }, - "", - &["_self", "other"], - ) - .register_documented( - "fast_renormalize", - |_self: Val| { - let output: Val = { - { - let output: Val = bevy::math::Rot2::fast_renormalize( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns `self` after an approximate normalization, assuming the value is already nearly normalized.\n Useful for preventing numerical error accumulation.\n See [`Dir3::fast_renormalize`](crate::Dir3::fast_renormalize) for an example of when such error accumulation might occur.", - &["_self"], - ) - .register_documented( - "from_sin_cos", - |sin: f32, cos: f32| { - let output: Val = { - { - let output: Val = bevy::math::Rot2::from_sin_cos( - sin, - cos, - ) - .into(); - output - } - }; - output - }, - " Creates a [`Rot2`] from the sine and cosine of an angle in radians.\n The rotation is only valid if `sin * sin + cos * cos == 1.0`.\n # Panics\n Panics if `sin * sin + cos * cos != 1.0` when the `glam_assert` feature is enabled.", - &["sin", "cos"], - ) - .register_documented( - "inverse", - |_self: Val| { - let output: Val = { - { - let output: Val = bevy::math::Rot2::inverse( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns the inverse of the rotation. This is also the conjugate\n of the unit complex number representing the rotation.", - &["_self"], - ) - .register_documented( - "is_finite", - |_self: Val| { - let output: bool = { - { - let output: bool = bevy::math::Rot2::is_finite( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns `true` if the rotation is neither infinite nor NaN.", - &["_self"], - ) - .register_documented( - "is_nan", - |_self: Val| { - let output: bool = { - { - let output: bool = bevy::math::Rot2::is_nan( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns `true` if the rotation is NaN.", - &["_self"], - ) - .register_documented( - "is_near_identity", - |_self: Val| { - let output: bool = { - { - let output: bool = bevy::math::Rot2::is_near_identity( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns `true` if the rotation is near [`Rot2::IDENTITY`].", - &["_self"], - ) - .register_documented( - "is_normalized", - |_self: Val| { - let output: bool = { - { - let output: bool = bevy::math::Rot2::is_normalized( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns whether `self` has a length of `1.0` or not.\n Uses a precision threshold of approximately `1e-4`.", - &["_self"], - ) - .register_documented( - "length", - |_self: Val| { - let output: f32 = { - { - let output: f32 = bevy::math::Rot2::length( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Computes the length or norm of the complex number used to represent the rotation.\n The length is typically expected to be `1.0`. Unexpectedly denormalized rotations\n can be a result of incorrect construction or floating point error caused by\n successive operations.", - &["_self"], - ) - .register_documented( - "length_recip", - |_self: Val| { - let output: f32 = { - { - let output: f32 = bevy::math::Rot2::length_recip( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Computes `1.0 / self.length()`.\n For valid results, `self` must _not_ have a length of zero.", - &["_self"], - ) - .register_documented( - "length_squared", - |_self: Val| { - let output: f32 = { - { - let output: f32 = bevy::math::Rot2::length_squared( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Computes the squared length or norm of the complex number used to represent the rotation.\n This is generally faster than [`Rot2::length()`], as it avoids a square\n root operation.\n The length is typically expected to be `1.0`. Unexpectedly denormalized rotations\n can be a result of incorrect construction or floating point error caused by\n successive operations.", - &["_self"], - ) - .register_documented( - "mul", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = >::mul(_self.into_inner(), rhs.into_inner()) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "mul", - | - _self: Val, - direction: Val| - { - let output: Val = { - { - let output: Val = >::mul(_self.into_inner(), direction.into_inner()) - .into(); - output - } - }; - output - }, - " Rotates the [`Dir2`] using a [`Rot2`].", - &["_self", "direction"], - ) - .register_documented( - "mul", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = >::mul(_self.into_inner(), rhs.into_inner()) - .into(); - output - } - }; - output - }, - " Rotates a [`Vec2`] by a [`Rot2`].", - &["_self", "rhs"], - ) - .register_documented( - "nlerp", - |_self: Val, end: Val, s: f32| { - let output: Val = { - { - let output: Val = bevy::math::Rot2::nlerp( - _self.into_inner(), - end.into_inner(), - s, - ) - .into(); - output - } - }; - output - }, - " Performs a linear interpolation between `self` and `rhs` based on\n the value `s`, and normalizes the rotation afterwards.\n When `s == 0.0`, the result will be equal to `self`.\n When `s == 1.0`, the result will be equal to `rhs`.\n This is slightly more efficient than [`slerp`](Self::slerp), and produces a similar result\n when the difference between the two rotations is small. At larger differences,\n the result resembles a kind of ease-in-out effect.\n If you would like the angular velocity to remain constant, consider using [`slerp`](Self::slerp) instead.\n # Details\n `nlerp` corresponds to computing an angle for a point at position `s` on a line drawn\n between the endpoints of the arc formed by `self` and `rhs` on a unit circle,\n and normalizing the result afterwards.\n Note that if the angles are opposite like 0 and π, the line will pass through the origin,\n and the resulting angle will always be either `self` or `rhs` depending on `s`.\n If `s` happens to be `0.5` in this case, a valid rotation cannot be computed, and `self`\n will be returned as a fallback.\n # Example\n ```\n # use bevy_math::Rot2;\n #\n let rot1 = Rot2::IDENTITY;\n let rot2 = Rot2::degrees(135.0);\n let result1 = rot1.nlerp(rot2, 1.0 / 3.0);\n assert_eq!(result1.as_degrees(), 28.675055);\n let result2 = rot1.nlerp(rot2, 0.5);\n assert_eq!(result2.as_degrees(), 67.5);\n ```", - &["_self", "end", "s"], - ) - .register_documented( - "normalize", - |_self: Val| { - let output: Val = { - { - let output: Val = bevy::math::Rot2::normalize( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns `self` with a length of `1.0`.\n Note that [`Rot2`] should typically already be normalized by design.\n Manual normalization is only needed when successive operations result in\n accumulated floating point error, or if the rotation was constructed\n with invalid values.\n # Panics\n Panics if `self` has a length of zero, NaN, or infinity when debug assertions are enabled.", - &["_self"], - ) - .register_documented( - "radians", - |radians: f32| { - let output: Val = { - { - let output: Val = bevy::math::Rot2::radians( - radians, - ) - .into(); - output - } - }; - output - }, - " Creates a [`Rot2`] from a counterclockwise angle in radians.\n # Note\n The input rotation will always be clamped to the range `(-π, π]` by design.\n # Example\n ```\n # use bevy_math::Rot2;\n # use approx::assert_relative_eq;\n # use std::f32::consts::{FRAC_PI_2, PI};\n let rot1 = Rot2::radians(3.0 * FRAC_PI_2);\n let rot2 = Rot2::radians(-FRAC_PI_2);\n #[cfg(feature = \"approx\")]\n assert_relative_eq!(rot1, rot2);\n let rot3 = Rot2::radians(PI);\n #[cfg(feature = \"approx\")]\n assert_relative_eq!(rot1 * rot1, rot3);\n ```", - &["radians"], - ) - .register_documented( - "sin_cos", - |_self: Val| { - let output: (f32, f32) = { - { - let output: (f32, f32) = bevy::math::Rot2::sin_cos( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns the sine and cosine of the rotation angle in radians.", - &["_self"], - ) - .register_documented( - "slerp", - |_self: Val, end: Val, s: f32| { - let output: Val = { - { - let output: Val = bevy::math::Rot2::slerp( - _self.into_inner(), - end.into_inner(), - s, - ) - .into(); - output - } - }; - output - }, - " Performs a spherical linear interpolation between `self` and `end`\n based on the value `s`.\n This corresponds to interpolating between the two angles at a constant angular velocity.\n When `s == 0.0`, the result will be equal to `self`.\n When `s == 1.0`, the result will be equal to `rhs`.\n If you would like the rotation to have a kind of ease-in-out effect, consider\n using the slightly more efficient [`nlerp`](Self::nlerp) instead.\n # Example\n ```\n # use bevy_math::Rot2;\n #\n let rot1 = Rot2::IDENTITY;\n let rot2 = Rot2::degrees(135.0);\n let result1 = rot1.slerp(rot2, 1.0 / 3.0);\n assert_eq!(result1.as_degrees(), 45.0);\n let result2 = rot1.slerp(rot2, 0.5);\n assert_eq!(result2.as_degrees(), 67.5);\n ```", - &["_self", "end", "s"], - ) - .register_documented( - "turn_fraction", - |fraction: f32| { - let output: Val = { - { - let output: Val = bevy::math::Rot2::turn_fraction( - fraction, - ) - .into(); - output - } - }; - output - }, - " Creates a [`Rot2`] from a counterclockwise fraction of a full turn of 360 degrees.\n # Note\n The input rotation will always be clamped to the range `(-50%, 50%]` by design.\n # Example\n ```\n # use bevy_math::Rot2;\n # use approx::assert_relative_eq;\n let rot1 = Rot2::turn_fraction(0.75);\n let rot2 = Rot2::turn_fraction(-0.25);\n #[cfg(feature = \"approx\")]\n assert_relative_eq!(rot1, rot2);\n let rot3 = Rot2::turn_fraction(0.5);\n #[cfg(feature = \"approx\")]\n assert_relative_eq!(rot1 * rot1, rot3);\n ```", - &["fraction"], - ); - let registry = world - .get_resource_or_init::(); - let mut registry = registry.write(); - registry - .register_type_data::< - bevy::math::Rot2, - bevy_mod_scripting_core::bindings::MarkAsGenerated, - >(); - } - pub(crate) fn register_dir_2_functions(world: &mut bevy::ecs::world::World) { - bevy_mod_scripting_core::bindings::function::namespace::NamespaceBuilder::< - bevy::math::prelude::Dir2, - >::new(world) - .register_documented( - "as_vec2", - |_self: Ref| { - let output: Val = { - { - let output: Val = bevy::math::prelude::Dir2::as_vec2( - &_self, - ) - .into(); - output - } - }; - output - }, - " Returns the inner [`Vec2`]", - &["_self"], - ) - .register_documented( - "clone", - |_self: Ref| { - let output: Val = { - { - let output: Val = ::clone( - &_self, - ) - .into(); - output - } - }; - output - }, - "", - &["_self"], - ) - .register_documented( - "eq", - | - _self: Ref, - other: Ref| - { - let output: bool = { - { - let output: bool = >::eq(&_self, &other) - .into(); - output - } - }; - output - }, - "", - &["_self", "other"], - ) - .register_documented( - "fast_renormalize", - |_self: Val| { - let output: Val = { - { - let output: Val = bevy::math::prelude::Dir2::fast_renormalize( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns `self` after an approximate normalization, assuming the value is already nearly normalized.\n Useful for preventing numerical error accumulation.\n See [`Dir3::fast_renormalize`] for an example of when such error accumulation might occur.", - &["_self"], - ) - .register_documented( - "from_xy_unchecked", - |x: f32, y: f32| { - let output: Val = { - { - let output: Val = bevy::math::prelude::Dir2::from_xy_unchecked( - x, - y, - ) - .into(); - output - } - }; - output - }, - " Create a direction from its `x` and `y` components, assuming the resulting vector is normalized.\n # Warning\n The vector produced from `x` and `y` must be normalized, i.e its length must be `1.0`.", - &["x", "y"], - ) - .register_documented( - "mul", - |_self: Val, rhs: f32| { - let output: Val = { - { - let output: Val = >::mul(_self.into_inner(), rhs) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "neg", - |_self: Val| { - let output: Val = { - { - let output: Val = ::neg( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - "", - &["_self"], - ) - .register_documented( - "new_unchecked", - |value: Val| { - let output: Val = { - { - let output: Val = bevy::math::prelude::Dir2::new_unchecked( - value.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Create a [`Dir2`] from a [`Vec2`] that is already normalized.\n # Warning\n `value` must be normalized, i.e its length must be `1.0`.", - &["value"], - ) - .register_documented( - "rotation_from", - | - _self: Val, - other: Val| - { - let output: Val = { - { - let output: Val = bevy::math::prelude::Dir2::rotation_from( - _self.into_inner(), - other.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Get the rotation that rotates `other` to this direction.", - &["_self", "other"], - ) - .register_documented( - "rotation_from_x", - |_self: Val| { - let output: Val = { - { - let output: Val = bevy::math::prelude::Dir2::rotation_from_x( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Get the rotation that rotates the X-axis to this direction.", - &["_self"], - ) - .register_documented( - "rotation_from_y", - |_self: Val| { - let output: Val = { - { - let output: Val = bevy::math::prelude::Dir2::rotation_from_y( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Get the rotation that rotates the Y-axis to this direction.", - &["_self"], - ) - .register_documented( - "rotation_to", - | - _self: Val, - other: Val| - { - let output: Val = { - { - let output: Val = bevy::math::prelude::Dir2::rotation_to( - _self.into_inner(), - other.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Get the rotation that rotates this direction to `other`.", - &["_self", "other"], - ) - .register_documented( - "rotation_to_x", - |_self: Val| { - let output: Val = { - { - let output: Val = bevy::math::prelude::Dir2::rotation_to_x( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Get the rotation that rotates this direction to the X-axis.", - &["_self"], - ) - .register_documented( - "rotation_to_y", - |_self: Val| { - let output: Val = { - { - let output: Val = bevy::math::prelude::Dir2::rotation_to_y( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Get the rotation that rotates this direction to the Y-axis.", - &["_self"], - ) - .register_documented( - "slerp", - | - _self: Val, - rhs: Val, - s: f32| - { - let output: Val = { - { - let output: Val = bevy::math::prelude::Dir2::slerp( - _self.into_inner(), - rhs.into_inner(), - s, - ) - .into(); - output - } - }; - output - }, - " Performs a spherical linear interpolation between `self` and `rhs`\n based on the value `s`.\n This corresponds to interpolating between the two directions at a constant angular velocity.\n When `s == 0.0`, the result will be equal to `self`.\n When `s == 1.0`, the result will be equal to `rhs`.\n # Example\n ```\n # use bevy_math::Dir2;\n # use approx::{assert_relative_eq, RelativeEq};\n #\n let dir1 = Dir2::X;\n let dir2 = Dir2::Y;\n let result1 = dir1.slerp(dir2, 1.0 / 3.0);\n #[cfg(feature = \"approx\")]\n assert_relative_eq!(result1, Dir2::from_xy(0.75_f32.sqrt(), 0.5).unwrap());\n let result2 = dir1.slerp(dir2, 0.5);\n #[cfg(feature = \"approx\")]\n assert_relative_eq!(result2, Dir2::from_xy(0.5_f32.sqrt(), 0.5_f32.sqrt()).unwrap());\n ```", - &["_self", "rhs", "s"], - ); - let registry = world - .get_resource_or_init::(); - let mut registry = registry.write(); - registry - .register_type_data::< - bevy::math::prelude::Dir2, - bevy_mod_scripting_core::bindings::MarkAsGenerated, - >(); - } - pub(crate) fn register_dir_3_functions(world: &mut bevy::ecs::world::World) { - bevy_mod_scripting_core::bindings::function::namespace::NamespaceBuilder::< - bevy::math::prelude::Dir3, - >::new(world) - .register_documented( - "as_vec3", - |_self: Ref| { - let output: Val = { - { - let output: Val = bevy::math::prelude::Dir3::as_vec3( - &_self, - ) - .into(); - output - } - }; - output - }, - " Returns the inner [`Vec3`]", - &["_self"], - ) - .register_documented( - "clone", - |_self: Ref| { - let output: Val = { - { - let output: Val = ::clone( - &_self, - ) - .into(); - output - } - }; - output - }, - "", - &["_self"], - ) - .register_documented( - "eq", - | - _self: Ref, - other: Ref| - { - let output: bool = { - { - let output: bool = >::eq(&_self, &other) - .into(); - output - } - }; - output - }, - "", - &["_self", "other"], - ) - .register_documented( - "fast_renormalize", - |_self: Val| { - let output: Val = { - { - let output: Val = bevy::math::prelude::Dir3::fast_renormalize( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns `self` after an approximate normalization, assuming the value is already nearly normalized.\n Useful for preventing numerical error accumulation.\n # Example\n The following seemingly benign code would start accumulating errors over time,\n leading to `dir` eventually not being normalized anymore.\n ```\n # use bevy_math::prelude::*;\n # let N: usize = 200;\n let mut dir = Dir3::X;\n let quaternion = Quat::from_euler(EulerRot::XYZ, 1.0, 2.0, 3.0);\n for i in 0..N {\n dir = quaternion * dir;\n }\n ```\n Instead, do the following.\n ```\n # use bevy_math::prelude::*;\n # let N: usize = 200;\n let mut dir = Dir3::X;\n let quaternion = Quat::from_euler(EulerRot::XYZ, 1.0, 2.0, 3.0);\n for i in 0..N {\n dir = quaternion * dir;\n dir = dir.fast_renormalize();\n }\n ```", - &["_self"], - ) - .register_documented( - "from_xyz_unchecked", - |x: f32, y: f32, z: f32| { - let output: Val = { - { - let output: Val = bevy::math::prelude::Dir3::from_xyz_unchecked( - x, - y, - z, - ) - .into(); - output - } - }; - output - }, - " Create a direction from its `x`, `y`, and `z` components, assuming the resulting vector is normalized.\n # Warning\n The vector produced from `x`, `y`, and `z` must be normalized, i.e its length must be `1.0`.", - &["x", "y", "z"], - ) - .register_documented( - "mul", - |_self: Val, rhs: f32| { - let output: Val = { - { - let output: Val = >::mul(_self.into_inner(), rhs) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "neg", - |_self: Val| { - let output: Val = { - { - let output: Val = ::neg( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - "", - &["_self"], - ) - .register_documented( - "new_unchecked", - |value: Val| { - let output: Val = { - { - let output: Val = bevy::math::prelude::Dir3::new_unchecked( - value.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Create a [`Dir3`] from a [`Vec3`] that is already normalized.\n # Warning\n `value` must be normalized, i.e its length must be `1.0`.", - &["value"], - ) - .register_documented( - "slerp", - | - _self: Val, - rhs: Val, - s: f32| - { - let output: Val = { - { - let output: Val = bevy::math::prelude::Dir3::slerp( - _self.into_inner(), - rhs.into_inner(), - s, - ) - .into(); - output - } - }; - output - }, - " Performs a spherical linear interpolation between `self` and `rhs`\n based on the value `s`.\n This corresponds to interpolating between the two directions at a constant angular velocity.\n When `s == 0.0`, the result will be equal to `self`.\n When `s == 1.0`, the result will be equal to `rhs`.\n # Example\n ```\n # use bevy_math::Dir3;\n # use approx::{assert_relative_eq, RelativeEq};\n #\n let dir1 = Dir3::X;\n let dir2 = Dir3::Y;\n let result1 = dir1.slerp(dir2, 1.0 / 3.0);\n #[cfg(feature = \"approx\")]\n assert_relative_eq!(\n result1,\n Dir3::from_xyz(0.75_f32.sqrt(), 0.5, 0.0).unwrap(),\n epsilon = 0.000001\n );\n let result2 = dir1.slerp(dir2, 0.5);\n #[cfg(feature = \"approx\")]\n assert_relative_eq!(result2, Dir3::from_xyz(0.5_f32.sqrt(), 0.5_f32.sqrt(), 0.0).unwrap());\n ```", - &["_self", "rhs", "s"], - ); - let registry = world - .get_resource_or_init::(); - let mut registry = registry.write(); - registry - .register_type_data::< - bevy::math::prelude::Dir3, - bevy_mod_scripting_core::bindings::MarkAsGenerated, - >(); - } - pub(crate) fn register_dir_3_a_functions(world: &mut bevy::ecs::world::World) { - bevy_mod_scripting_core::bindings::function::namespace::NamespaceBuilder::< - bevy::math::prelude::Dir3A, - >::new(world) - .register_documented( - "as_vec3a", - |_self: Ref| { - let output: Val = { - { - let output: Val = bevy::math::prelude::Dir3A::as_vec3a( - &_self, - ) - .into(); - output - } - }; - output - }, - " Returns the inner [`Vec3A`]", - &["_self"], - ) - .register_documented( - "clone", - |_self: Ref| { - let output: Val = { - { - let output: Val = ::clone( - &_self, - ) - .into(); - output - } - }; - output - }, - "", - &["_self"], - ) - .register_documented( - "eq", - | - _self: Ref, - other: Ref| - { - let output: bool = { - { - let output: bool = >::eq(&_self, &other) - .into(); - output - } - }; - output - }, - "", - &["_self", "other"], - ) - .register_documented( - "fast_renormalize", - |_self: Val| { - let output: Val = { - { - let output: Val = bevy::math::prelude::Dir3A::fast_renormalize( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns `self` after an approximate normalization, assuming the value is already nearly normalized.\n Useful for preventing numerical error accumulation.\n See [`Dir3::fast_renormalize`] for an example of when such error accumulation might occur.", - &["_self"], - ) - .register_documented( - "from_xyz_unchecked", - |x: f32, y: f32, z: f32| { - let output: Val = { - { - let output: Val = bevy::math::prelude::Dir3A::from_xyz_unchecked( - x, - y, - z, - ) - .into(); - output - } - }; - output - }, - " Create a direction from its `x`, `y`, and `z` components, assuming the resulting vector is normalized.\n # Warning\n The vector produced from `x`, `y`, and `z` must be normalized, i.e its length must be `1.0`.", - &["x", "y", "z"], - ) - .register_documented( - "mul", - |_self: Val, rhs: f32| { - let output: Val = { - { - let output: Val = >::mul(_self.into_inner(), rhs) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "neg", - |_self: Val| { - let output: Val = { - { - let output: Val = ::neg( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - "", - &["_self"], - ) - .register_documented( - "new_unchecked", - |value: Val| { - let output: Val = { - { - let output: Val = bevy::math::prelude::Dir3A::new_unchecked( - value.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Create a [`Dir3A`] from a [`Vec3A`] that is already normalized.\n # Warning\n `value` must be normalized, i.e its length must be `1.0`.", - &["value"], - ) - .register_documented( - "slerp", - | - _self: Val, - rhs: Val, - s: f32| - { - let output: Val = { - { - let output: Val = bevy::math::prelude::Dir3A::slerp( - _self.into_inner(), - rhs.into_inner(), - s, - ) - .into(); - output - } - }; - output - }, - " Performs a spherical linear interpolation between `self` and `rhs`\n based on the value `s`.\n This corresponds to interpolating between the two directions at a constant angular velocity.\n When `s == 0.0`, the result will be equal to `self`.\n When `s == 1.0`, the result will be equal to `rhs`.\n # Example\n ```\n # use bevy_math::Dir3A;\n # use approx::{assert_relative_eq, RelativeEq};\n #\n let dir1 = Dir3A::X;\n let dir2 = Dir3A::Y;\n let result1 = dir1.slerp(dir2, 1.0 / 3.0);\n #[cfg(feature = \"approx\")]\n assert_relative_eq!(\n result1,\n Dir3A::from_xyz(0.75_f32.sqrt(), 0.5, 0.0).unwrap(),\n epsilon = 0.000001\n );\n let result2 = dir1.slerp(dir2, 0.5);\n #[cfg(feature = \"approx\")]\n assert_relative_eq!(result2, Dir3A::from_xyz(0.5_f32.sqrt(), 0.5_f32.sqrt(), 0.0).unwrap());\n ```", - &["_self", "rhs", "s"], - ); - let registry = world - .get_resource_or_init::(); - let mut registry = registry.write(); - registry - .register_type_data::< - bevy::math::prelude::Dir3A, - bevy_mod_scripting_core::bindings::MarkAsGenerated, - >(); - } - pub(crate) fn register_i_rect_functions(world: &mut bevy::ecs::world::World) { - bevy_mod_scripting_core::bindings::function::namespace::NamespaceBuilder::< - bevy::math::prelude::IRect, - >::new(world) - .register_documented( - "as_rect", - |_self: Ref| { - let output: Val = { - { - let output: Val = bevy::math::prelude::IRect::as_rect( - &_self, - ) - .into(); - output - } - }; - output - }, - " Returns self as [`Rect`] (f32)", - &["_self"], - ) - .register_documented( - "as_urect", - |_self: Ref| { - let output: Val = { - { - let output: Val = bevy::math::prelude::IRect::as_urect( - &_self, - ) - .into(); - output - } - }; - output - }, - " Returns self as [`URect`] (u32)", - &["_self"], - ) - .register_documented( - "assert_receiver_is_total_eq", - |_self: Ref| { - let output: () = { - { - let output: () = ::assert_receiver_is_total_eq( - &_self, - ) - .into(); - output - } - }; - output - }, - "", - &["_self"], - ) - .register_documented( - "center", - |_self: Ref| { - let output: Val = { - { - let output: Val = bevy::math::prelude::IRect::center( - &_self, - ) - .into(); - output - } - }; - output - }, - " The center point of the rectangle.\n # Rounding Behavior\n If the (min + max) contains odd numbers they will be rounded down to the nearest whole number when calculating the center.\n # Examples\n ```\n # use bevy_math::{IRect, IVec2};\n let r = IRect::new(0, 0, 5, 2); // w=5 h=2\n assert_eq!(r.center(), IVec2::new(2, 1));\n ```", - &["_self"], - ) - .register_documented( - "clone", - |_self: Ref| { - let output: Val = { - { - let output: Val = ::clone( - &_self, - ) - .into(); - output - } - }; - output - }, - "", - &["_self"], - ) - .register_documented( - "contains", - | - _self: Ref, - point: Val| - { - let output: bool = { - { - let output: bool = bevy::math::prelude::IRect::contains( - &_self, - point.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Check if a point lies within this rectangle, inclusive of its edges.\n # Examples\n ```\n # use bevy_math::IRect;\n let r = IRect::new(0, 0, 5, 1); // w=5 h=1\n assert!(r.contains(r.center()));\n assert!(r.contains(r.min));\n assert!(r.contains(r.max));\n ```", - &["_self", "point"], - ) - .register_documented( - "eq", - | - _self: Ref, - other: Ref| - { - let output: bool = { - { - let output: bool = >::eq(&_self, &other) - .into(); - output - } - }; - output - }, - "", - &["_self", "other"], - ) - .register_documented( - "from_center_half_size", - | - origin: Val, - half_size: Val| - { - let output: Val = { - { - let output: Val = bevy::math::prelude::IRect::from_center_half_size( - origin.into_inner(), - half_size.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Create a new rectangle from its center and half-size.\n # Panics\n This method panics if any of the components of the half-size is negative.\n # Examples\n ```\n # use bevy_math::{IRect, IVec2};\n let r = IRect::from_center_half_size(IVec2::ZERO, IVec2::ONE); // w=2 h=2\n assert_eq!(r.min, IVec2::splat(-1));\n assert_eq!(r.max, IVec2::splat(1));\n ```", - &["origin", "half_size"], - ) - .register_documented( - "from_center_size", - | - origin: Val, - size: Val| - { - let output: Val = { - { - let output: Val = bevy::math::prelude::IRect::from_center_size( - origin.into_inner(), - size.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Create a new rectangle from its center and size.\n # Rounding Behavior\n If the size contains odd numbers they will be rounded down to the nearest whole number.\n # Panics\n This method panics if any of the components of the size is negative.\n # Examples\n ```\n # use bevy_math::{IRect, IVec2};\n let r = IRect::from_center_size(IVec2::ZERO, IVec2::new(3, 2)); // w=2 h=2\n assert_eq!(r.min, IVec2::splat(-1));\n assert_eq!(r.max, IVec2::splat(1));\n ```", - &["origin", "size"], - ) - .register_documented( - "from_corners", - | - p0: Val, - p1: Val| - { - let output: Val = { - { - let output: Val = bevy::math::prelude::IRect::from_corners( - p0.into_inner(), - p1.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Create a new rectangle from two corner points.\n The two points do not need to be the minimum and/or maximum corners.\n They only need to be two opposite corners.\n # Examples\n ```\n # use bevy_math::{IRect, IVec2};\n // Unit rect from [0,0] to [1,1]\n let r = IRect::from_corners(IVec2::ZERO, IVec2::ONE); // w=1 h=1\n // Same; the points do not need to be ordered\n let r = IRect::from_corners(IVec2::ONE, IVec2::ZERO); // w=1 h=1\n ```", - &["p0", "p1"], - ) - .register_documented( - "half_size", - |_self: Ref| { - let output: Val = { - { - let output: Val = bevy::math::prelude::IRect::half_size( - &_self, - ) - .into(); - output - } - }; - output - }, - " Rectangle half-size.\n # Rounding Behavior\n If the full size contains odd numbers they will be rounded down to the nearest whole number when calculating the half size.\n # Examples\n ```\n # use bevy_math::{IRect, IVec2};\n let r = IRect::new(0, 0, 4, 3); // w=4 h=3\n assert_eq!(r.half_size(), IVec2::new(2, 1));\n ```", - &["_self"], - ) - .register_documented( - "height", - |_self: Ref| { - let output: i32 = { - { - let output: i32 = bevy::math::prelude::IRect::height(&_self) - .into(); - output - } - }; - output - }, - " Rectangle height (max.y - min.y).\n # Examples\n ```\n # use bevy_math::IRect;\n let r = IRect::new(0, 0, 5, 1); // w=5 h=1\n assert_eq!(r.height(), 1);\n ```", - &["_self"], - ) - .register_documented( - "inflate", - |_self: Ref, expansion: i32| { - let output: Val = { - { - let output: Val = bevy::math::prelude::IRect::inflate( - &_self, - expansion, - ) - .into(); - output - } - }; - output - }, - " Create a new rectangle by expanding it evenly on all sides.\n A positive expansion value produces a larger rectangle,\n while a negative expansion value produces a smaller rectangle.\n If this would result in zero or negative width or height, [`IRect::EMPTY`] is returned instead.\n # Examples\n ```\n # use bevy_math::{IRect, IVec2};\n let r = IRect::new(0, 0, 5, 1); // w=5 h=1\n let r2 = r.inflate(3); // w=11 h=7\n assert_eq!(r2.min, IVec2::splat(-3));\n assert_eq!(r2.max, IVec2::new(8, 4));\n let r = IRect::new(0, -1, 4, 3); // w=4 h=4\n let r2 = r.inflate(-1); // w=2 h=2\n assert_eq!(r2.min, IVec2::new(1, 0));\n assert_eq!(r2.max, IVec2::new(3, 2));\n ```", - &["_self", "expansion"], - ) - .register_documented( - "intersect", - | - _self: Ref, - other: Val| - { - let output: Val = { - { - let output: Val = bevy::math::prelude::IRect::intersect( - &_self, - other.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Build a new rectangle formed of the intersection of this rectangle and another rectangle.\n The intersection is the largest rectangle enclosed in both rectangles. If the intersection\n is empty, this method returns an empty rectangle ([`IRect::is_empty()`] returns `true`), but\n the actual values of [`IRect::min`] and [`IRect::max`] are implementation-dependent.\n # Examples\n ```\n # use bevy_math::{IRect, IVec2};\n let r1 = IRect::new(0, 0, 5, 1); // w=5 h=1\n let r2 = IRect::new(1, -1, 3, 3); // w=2 h=4\n let r = r1.intersect(r2);\n assert_eq!(r.min, IVec2::new(1, 0));\n assert_eq!(r.max, IVec2::new(3, 1));\n ```", - &["_self", "other"], - ) - .register_documented( - "is_empty", - |_self: Ref| { - let output: bool = { - { - let output: bool = bevy::math::prelude::IRect::is_empty( - &_self, - ) - .into(); - output - } - }; - output - }, - " Check if the rectangle is empty.\n # Examples\n ```\n # use bevy_math::{IRect, IVec2};\n let r = IRect::from_corners(IVec2::ZERO, IVec2::new(0, 1)); // w=0 h=1\n assert!(r.is_empty());\n ```", - &["_self"], - ) - .register_documented( - "new", - |x0: i32, y0: i32, x1: i32, y1: i32| { - let output: Val = { - { - let output: Val = bevy::math::prelude::IRect::new( - x0, - y0, - x1, - y1, - ) - .into(); - output - } - }; - output - }, - " Create a new rectangle from two corner points.\n The two points do not need to be the minimum and/or maximum corners.\n They only need to be two opposite corners.\n # Examples\n ```\n # use bevy_math::IRect;\n let r = IRect::new(0, 4, 10, 6); // w=10 h=2\n let r = IRect::new(2, 3, 5, -1); // w=3 h=4\n ```", - &["x0", "y0", "x1", "y1"], - ) - .register_documented( - "size", - |_self: Ref| { - let output: Val = { - { - let output: Val = bevy::math::prelude::IRect::size( - &_self, - ) - .into(); - output - } - }; - output - }, - " Rectangle size.\n # Examples\n ```\n # use bevy_math::{IRect, IVec2};\n let r = IRect::new(0, 0, 5, 1); // w=5 h=1\n assert_eq!(r.size(), IVec2::new(5, 1));\n ```", - &["_self"], - ) - .register_documented( - "union", - | - _self: Ref, - other: Val| - { - let output: Val = { - { - let output: Val = bevy::math::prelude::IRect::union( - &_self, - other.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Build a new rectangle formed of the union of this rectangle and another rectangle.\n The union is the smallest rectangle enclosing both rectangles.\n # Examples\n ```\n # use bevy_math::{IRect, IVec2};\n let r1 = IRect::new(0, 0, 5, 1); // w=5 h=1\n let r2 = IRect::new(1, -1, 3, 3); // w=2 h=4\n let r = r1.union(r2);\n assert_eq!(r.min, IVec2::new(0, -1));\n assert_eq!(r.max, IVec2::new(5, 3));\n ```", - &["_self", "other"], - ) - .register_documented( - "union_point", - | - _self: Ref, - other: Val| - { - let output: Val = { - { - let output: Val = bevy::math::prelude::IRect::union_point( - &_self, - other.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Build a new rectangle formed of the union of this rectangle and a point.\n The union is the smallest rectangle enclosing both the rectangle and the point. If the\n point is already inside the rectangle, this method returns a copy of the rectangle.\n # Examples\n ```\n # use bevy_math::{IRect, IVec2};\n let r = IRect::new(0, 0, 5, 1); // w=5 h=1\n let u = r.union_point(IVec2::new(3, 6));\n assert_eq!(u.min, IVec2::ZERO);\n assert_eq!(u.max, IVec2::new(5, 6));\n ```", - &["_self", "other"], - ) - .register_documented( - "width", - |_self: Ref| { - let output: i32 = { - { - let output: i32 = bevy::math::prelude::IRect::width(&_self) - .into(); - output - } - }; - output - }, - " Rectangle width (max.x - min.x).\n # Examples\n ```\n # use bevy_math::IRect;\n let r = IRect::new(0, 0, 5, 1); // w=5 h=1\n assert_eq!(r.width(), 5);\n ```", - &["_self"], - ); - let registry = world - .get_resource_or_init::(); - let mut registry = registry.write(); - registry - .register_type_data::< - bevy::math::prelude::IRect, - bevy_mod_scripting_core::bindings::MarkAsGenerated, - >(); - } - pub(crate) fn register_rect_functions(world: &mut bevy::ecs::world::World) { - bevy_mod_scripting_core::bindings::function::namespace::NamespaceBuilder::< - bevy::math::prelude::Rect, - >::new(world) - .register_documented( - "as_irect", - |_self: Ref| { - let output: Val = { - { - let output: Val = bevy::math::prelude::Rect::as_irect( - &_self, - ) - .into(); - output - } - }; - output - }, - " Returns self as [`IRect`] (i32)", - &["_self"], - ) - .register_documented( - "as_urect", - |_self: Ref| { - let output: Val = { - { - let output: Val = bevy::math::prelude::Rect::as_urect( - &_self, - ) - .into(); - output - } - }; - output - }, - " Returns self as [`URect`] (u32)", - &["_self"], - ) - .register_documented( - "center", - |_self: Ref| { - let output: Val = { - { - let output: Val = bevy::math::prelude::Rect::center( - &_self, - ) - .into(); - output - } - }; - output - }, - " The center point of the rectangle.\n # Examples\n ```\n # use bevy_math::{Rect, Vec2};\n let r = Rect::new(0., 0., 5., 1.); // w=5 h=1\n assert!(r.center().abs_diff_eq(Vec2::new(2.5, 0.5), 1e-5));\n ```", - &["_self"], - ) - .register_documented( - "clone", - |_self: Ref| { - let output: Val = { - { - let output: Val = ::clone( - &_self, - ) - .into(); - output - } - }; - output - }, - "", - &["_self"], - ) - .register_documented( - "contains", - | - _self: Ref, - point: Val| - { - let output: bool = { - { - let output: bool = bevy::math::prelude::Rect::contains( - &_self, - point.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Check if a point lies within this rectangle, inclusive of its edges.\n # Examples\n ```\n # use bevy_math::Rect;\n let r = Rect::new(0., 0., 5., 1.); // w=5 h=1\n assert!(r.contains(r.center()));\n assert!(r.contains(r.min));\n assert!(r.contains(r.max));\n ```", - &["_self", "point"], - ) - .register_documented( - "eq", - | - _self: Ref, - other: Ref| - { - let output: bool = { - { - let output: bool = >::eq(&_self, &other) - .into(); - output - } - }; - output - }, - "", - &["_self", "other"], - ) - .register_documented( - "from_center_half_size", - | - origin: Val, - half_size: Val| - { - let output: Val = { - { - let output: Val = bevy::math::prelude::Rect::from_center_half_size( - origin.into_inner(), - half_size.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Create a new rectangle from its center and half-size.\n # Panics\n This method panics if any of the components of the half-size is negative.\n # Examples\n ```\n # use bevy_math::{Rect, Vec2};\n let r = Rect::from_center_half_size(Vec2::ZERO, Vec2::ONE); // w=2 h=2\n assert!(r.min.abs_diff_eq(Vec2::splat(-1.), 1e-5));\n assert!(r.max.abs_diff_eq(Vec2::splat(1.), 1e-5));\n ```", - &["origin", "half_size"], - ) - .register_documented( - "from_center_size", - | - origin: Val, - size: Val| - { - let output: Val = { - { - let output: Val = bevy::math::prelude::Rect::from_center_size( - origin.into_inner(), - size.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Create a new rectangle from its center and size.\n # Panics\n This method panics if any of the components of the size is negative.\n # Examples\n ```\n # use bevy_math::{Rect, Vec2};\n let r = Rect::from_center_size(Vec2::ZERO, Vec2::ONE); // w=1 h=1\n assert!(r.min.abs_diff_eq(Vec2::splat(-0.5), 1e-5));\n assert!(r.max.abs_diff_eq(Vec2::splat(0.5), 1e-5));\n ```", - &["origin", "size"], - ) - .register_documented( - "from_corners", - |p0: Val, p1: Val| { - let output: Val = { - { - let output: Val = bevy::math::prelude::Rect::from_corners( - p0.into_inner(), - p1.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Create a new rectangle from two corner points.\n The two points do not need to be the minimum and/or maximum corners.\n They only need to be two opposite corners.\n # Examples\n ```\n # use bevy_math::{Rect, Vec2};\n // Unit rect from [0,0] to [1,1]\n let r = Rect::from_corners(Vec2::ZERO, Vec2::ONE); // w=1 h=1\n // Same; the points do not need to be ordered\n let r = Rect::from_corners(Vec2::ONE, Vec2::ZERO); // w=1 h=1\n ```", - &["p0", "p1"], - ) - .register_documented( - "half_size", - |_self: Ref| { - let output: Val = { - { - let output: Val = bevy::math::prelude::Rect::half_size( - &_self, - ) - .into(); - output - } - }; - output - }, - " Rectangle half-size.\n # Examples\n ```\n # use bevy_math::{Rect, Vec2};\n let r = Rect::new(0., 0., 5., 1.); // w=5 h=1\n assert!(r.half_size().abs_diff_eq(Vec2::new(2.5, 0.5), 1e-5));\n ```", - &["_self"], - ) - .register_documented( - "height", - |_self: Ref| { - let output: f32 = { - { - let output: f32 = bevy::math::prelude::Rect::height(&_self) - .into(); - output - } - }; - output - }, - " Rectangle height (max.y - min.y).\n # Examples\n ```\n # use bevy_math::Rect;\n let r = Rect::new(0., 0., 5., 1.); // w=5 h=1\n assert!((r.height() - 1.).abs() <= 1e-5);\n ```", - &["_self"], - ) - .register_documented( - "inflate", - |_self: Ref, expansion: f32| { - let output: Val = { - { - let output: Val = bevy::math::prelude::Rect::inflate( - &_self, - expansion, - ) - .into(); - output - } - }; - output - }, - " Create a new rectangle by expanding it evenly on all sides.\n A positive expansion value produces a larger rectangle,\n while a negative expansion value produces a smaller rectangle.\n If this would result in zero or negative width or height, [`Rect::EMPTY`] is returned instead.\n # Examples\n ```\n # use bevy_math::{Rect, Vec2};\n let r = Rect::new(0., 0., 5., 1.); // w=5 h=1\n let r2 = r.inflate(3.); // w=11 h=7\n assert!(r2.min.abs_diff_eq(Vec2::splat(-3.), 1e-5));\n assert!(r2.max.abs_diff_eq(Vec2::new(8., 4.), 1e-5));\n let r = Rect::new(0., -1., 6., 7.); // w=6 h=8\n let r2 = r.inflate(-2.); // w=11 h=7\n assert!(r2.min.abs_diff_eq(Vec2::new(2., 1.), 1e-5));\n assert!(r2.max.abs_diff_eq(Vec2::new(4., 5.), 1e-5));\n ```", - &["_self", "expansion"], - ) - .register_documented( - "intersect", - | - _self: Ref, - other: Val| - { - let output: Val = { - { - let output: Val = bevy::math::prelude::Rect::intersect( - &_self, - other.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Build a new rectangle formed of the intersection of this rectangle and another rectangle.\n The intersection is the largest rectangle enclosed in both rectangles. If the intersection\n is empty, this method returns an empty rectangle ([`Rect::is_empty()`] returns `true`), but\n the actual values of [`Rect::min`] and [`Rect::max`] are implementation-dependent.\n # Examples\n ```\n # use bevy_math::{Rect, Vec2};\n let r1 = Rect::new(0., 0., 5., 1.); // w=5 h=1\n let r2 = Rect::new(1., -1., 3., 3.); // w=2 h=4\n let r = r1.intersect(r2);\n assert!(r.min.abs_diff_eq(Vec2::new(1., 0.), 1e-5));\n assert!(r.max.abs_diff_eq(Vec2::new(3., 1.), 1e-5));\n ```", - &["_self", "other"], - ) - .register_documented( - "is_empty", - |_self: Ref| { - let output: bool = { - { - let output: bool = bevy::math::prelude::Rect::is_empty( - &_self, - ) - .into(); - output - } - }; - output - }, - " Check if the rectangle is empty.\n # Examples\n ```\n # use bevy_math::{Rect, Vec2};\n let r = Rect::from_corners(Vec2::ZERO, Vec2::new(0., 1.)); // w=0 h=1\n assert!(r.is_empty());\n ```", - &["_self"], - ) - .register_documented( - "new", - |x0: f32, y0: f32, x1: f32, y1: f32| { - let output: Val = { - { - let output: Val = bevy::math::prelude::Rect::new( - x0, - y0, - x1, - y1, - ) - .into(); - output - } - }; - output - }, - " Create a new rectangle from two corner points.\n The two points do not need to be the minimum and/or maximum corners.\n They only need to be two opposite corners.\n # Examples\n ```\n # use bevy_math::Rect;\n let r = Rect::new(0., 4., 10., 6.); // w=10 h=2\n let r = Rect::new(2., 3., 5., -1.); // w=3 h=4\n ```", - &["x0", "y0", "x1", "y1"], - ) - .register_documented( - "normalize", - | - _self: Ref, - other: Val| - { - let output: Val = { - { - let output: Val = bevy::math::prelude::Rect::normalize( - &_self, - other.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Build a new rectangle from this one with its coordinates expressed\n relative to `other` in a normalized ([0..1] x [0..1]) coordinate system.\n # Examples\n ```\n # use bevy_math::{Rect, Vec2};\n let r = Rect::new(2., 3., 4., 6.);\n let s = Rect::new(0., 0., 10., 10.);\n let n = r.normalize(s);\n assert_eq!(n.min.x, 0.2);\n assert_eq!(n.min.y, 0.3);\n assert_eq!(n.max.x, 0.4);\n assert_eq!(n.max.y, 0.6);\n ```", - &["_self", "other"], - ) - .register_documented( - "size", - |_self: Ref| { - let output: Val = { - { - let output: Val = bevy::math::prelude::Rect::size( - &_self, - ) - .into(); - output - } - }; - output - }, - " Rectangle size.\n # Examples\n ```\n # use bevy_math::{Rect, Vec2};\n let r = Rect::new(0., 0., 5., 1.); // w=5 h=1\n assert!(r.size().abs_diff_eq(Vec2::new(5., 1.), 1e-5));\n ```", - &["_self"], - ) - .register_documented( - "union", - | - _self: Ref, - other: Val| - { - let output: Val = { - { - let output: Val = bevy::math::prelude::Rect::union( - &_self, - other.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Build a new rectangle formed of the union of this rectangle and another rectangle.\n The union is the smallest rectangle enclosing both rectangles.\n # Examples\n ```\n # use bevy_math::{Rect, Vec2};\n let r1 = Rect::new(0., 0., 5., 1.); // w=5 h=1\n let r2 = Rect::new(1., -1., 3., 3.); // w=2 h=4\n let r = r1.union(r2);\n assert!(r.min.abs_diff_eq(Vec2::new(0., -1.), 1e-5));\n assert!(r.max.abs_diff_eq(Vec2::new(5., 3.), 1e-5));\n ```", - &["_self", "other"], - ) - .register_documented( - "union_point", - | - _self: Ref, - other: Val| - { - let output: Val = { - { - let output: Val = bevy::math::prelude::Rect::union_point( - &_self, - other.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Build a new rectangle formed of the union of this rectangle and a point.\n The union is the smallest rectangle enclosing both the rectangle and the point. If the\n point is already inside the rectangle, this method returns a copy of the rectangle.\n # Examples\n ```\n # use bevy_math::{Rect, Vec2};\n let r = Rect::new(0., 0., 5., 1.); // w=5 h=1\n let u = r.union_point(Vec2::new(3., 6.));\n assert!(u.min.abs_diff_eq(Vec2::ZERO, 1e-5));\n assert!(u.max.abs_diff_eq(Vec2::new(5., 6.), 1e-5));\n ```", - &["_self", "other"], - ) - .register_documented( - "width", - |_self: Ref| { - let output: f32 = { - { - let output: f32 = bevy::math::prelude::Rect::width(&_self) - .into(); - output - } - }; - output - }, - " Rectangle width (max.x - min.x).\n # Examples\n ```\n # use bevy_math::Rect;\n let r = Rect::new(0., 0., 5., 1.); // w=5 h=1\n assert!((r.width() - 5.).abs() <= 1e-5);\n ```", - &["_self"], - ); - let registry = world - .get_resource_or_init::(); - let mut registry = registry.write(); - registry - .register_type_data::< - bevy::math::prelude::Rect, - bevy_mod_scripting_core::bindings::MarkAsGenerated, - >(); - } - pub(crate) fn register_u_rect_functions(world: &mut bevy::ecs::world::World) { - bevy_mod_scripting_core::bindings::function::namespace::NamespaceBuilder::< - bevy::math::prelude::URect, - >::new(world) - .register_documented( - "as_irect", - |_self: Ref| { - let output: Val = { - { - let output: Val = bevy::math::prelude::URect::as_irect( - &_self, - ) - .into(); - output - } - }; - output - }, - " Returns self as [`IRect`] (i32)", - &["_self"], - ) - .register_documented( - "as_rect", - |_self: Ref| { - let output: Val = { - { - let output: Val = bevy::math::prelude::URect::as_rect( - &_self, - ) - .into(); - output - } - }; - output - }, - " Returns self as [`Rect`] (f32)", - &["_self"], - ) - .register_documented( - "assert_receiver_is_total_eq", - |_self: Ref| { - let output: () = { - { - let output: () = ::assert_receiver_is_total_eq( - &_self, - ) - .into(); - output - } - }; - output - }, - "", - &["_self"], - ) - .register_documented( - "center", - |_self: Ref| { - let output: Val = { - { - let output: Val = bevy::math::prelude::URect::center( - &_self, - ) - .into(); - output - } - }; - output - }, - " The center point of the rectangle.\n # Rounding Behavior\n If the (min + max) contains odd numbers they will be rounded down to the nearest whole number when calculating the center.\n # Examples\n ```\n # use bevy_math::{URect, UVec2};\n let r = URect::new(0, 0, 4, 2); // w=4 h=2\n assert_eq!(r.center(), UVec2::new(2, 1));\n ```", - &["_self"], - ) - .register_documented( - "clone", - |_self: Ref| { - let output: Val = { - { - let output: Val = ::clone( - &_self, - ) - .into(); - output - } - }; - output - }, - "", - &["_self"], - ) - .register_documented( - "contains", - | - _self: Ref, - point: Val| - { - let output: bool = { - { - let output: bool = bevy::math::prelude::URect::contains( - &_self, - point.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Check if a point lies within this rectangle, inclusive of its edges.\n # Examples\n ```\n # use bevy_math::URect;\n let r = URect::new(0, 0, 5, 1); // w=5 h=1\n assert!(r.contains(r.center()));\n assert!(r.contains(r.min));\n assert!(r.contains(r.max));\n ```", - &["_self", "point"], - ) - .register_documented( - "eq", - | - _self: Ref, - other: Ref| - { - let output: bool = { - { - let output: bool = >::eq(&_self, &other) - .into(); - output - } - }; - output - }, - "", - &["_self", "other"], - ) - .register_documented( - "from_center_half_size", - | - origin: Val, - half_size: Val| - { - let output: Val = { - { - let output: Val = bevy::math::prelude::URect::from_center_half_size( - origin.into_inner(), - half_size.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Create a new rectangle from its center and half-size.\n # Panics\n This method panics if any of the components of the half-size is negative or if `origin - half_size` results in any negatives.\n # Examples\n ```\n # use bevy_math::{URect, UVec2};\n let r = URect::from_center_half_size(UVec2::ONE, UVec2::ONE); // w=2 h=2\n assert_eq!(r.min, UVec2::splat(0));\n assert_eq!(r.max, UVec2::splat(2));\n ```", - &["origin", "half_size"], - ) - .register_documented( - "from_center_size", - | - origin: Val, - size: Val| - { - let output: Val = { - { - let output: Val = bevy::math::prelude::URect::from_center_size( - origin.into_inner(), - size.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Create a new rectangle from its center and size.\n # Rounding Behavior\n If the size contains odd numbers they will be rounded down to the nearest whole number.\n # Panics\n This method panics if any of the components of the size is negative or if `origin - (size / 2)` results in any negatives.\n # Examples\n ```\n # use bevy_math::{URect, UVec2};\n let r = URect::from_center_size(UVec2::ONE, UVec2::splat(2)); // w=2 h=2\n assert_eq!(r.min, UVec2::splat(0));\n assert_eq!(r.max, UVec2::splat(2));\n ```", - &["origin", "size"], - ) - .register_documented( - "from_corners", - | - p0: Val, - p1: Val| - { - let output: Val = { - { - let output: Val = bevy::math::prelude::URect::from_corners( - p0.into_inner(), - p1.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Create a new rectangle from two corner points.\n The two points do not need to be the minimum and/or maximum corners.\n They only need to be two opposite corners.\n # Examples\n ```\n # use bevy_math::{URect, UVec2};\n // Unit rect from [0,0] to [1,1]\n let r = URect::from_corners(UVec2::ZERO, UVec2::ONE); // w=1 h=1\n // Same; the points do not need to be ordered\n let r = URect::from_corners(UVec2::ONE, UVec2::ZERO); // w=1 h=1\n ```", - &["p0", "p1"], - ) - .register_documented( - "half_size", - |_self: Ref| { - let output: Val = { - { - let output: Val = bevy::math::prelude::URect::half_size( - &_self, - ) - .into(); - output - } - }; - output - }, - " Rectangle half-size.\n # Rounding Behavior\n If the full size contains odd numbers they will be rounded down to the nearest whole number when calculating the half size.\n # Examples\n ```\n # use bevy_math::{URect, UVec2};\n let r = URect::new(0, 0, 4, 2); // w=4 h=2\n assert_eq!(r.half_size(), UVec2::new(2, 1));\n ```", - &["_self"], - ) - .register_documented( - "height", - |_self: Ref| { - let output: u32 = { - { - let output: u32 = bevy::math::prelude::URect::height(&_self) - .into(); - output - } - }; - output - }, - " Rectangle height (max.y - min.y).\n # Examples\n ```\n # use bevy_math::URect;\n let r = URect::new(0, 0, 5, 1); // w=5 h=1\n assert_eq!(r.height(), 1);\n ```", - &["_self"], - ) - .register_documented( - "inflate", - |_self: Ref, expansion: i32| { - let output: Val = { - { - let output: Val = bevy::math::prelude::URect::inflate( - &_self, - expansion, - ) - .into(); - output - } - }; - output - }, - " Create a new rectangle by expanding it evenly on all sides.\n A positive expansion value produces a larger rectangle,\n while a negative expansion value produces a smaller rectangle.\n If this would result in zero width or height, [`URect::EMPTY`] is returned instead.\n # Examples\n ```\n # use bevy_math::{URect, UVec2};\n let r = URect::new(4, 4, 6, 6); // w=2 h=2\n let r2 = r.inflate(1); // w=4 h=4\n assert_eq!(r2.min, UVec2::splat(3));\n assert_eq!(r2.max, UVec2::splat(7));\n let r = URect::new(4, 4, 8, 8); // w=4 h=4\n let r2 = r.inflate(-1); // w=2 h=2\n assert_eq!(r2.min, UVec2::splat(5));\n assert_eq!(r2.max, UVec2::splat(7));\n ```", - &["_self", "expansion"], - ) - .register_documented( - "intersect", - | - _self: Ref, - other: Val| - { - let output: Val = { - { - let output: Val = bevy::math::prelude::URect::intersect( - &_self, - other.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Build a new rectangle formed of the intersection of this rectangle and another rectangle.\n The intersection is the largest rectangle enclosed in both rectangles. If the intersection\n is empty, this method returns an empty rectangle ([`URect::is_empty()`] returns `true`), but\n the actual values of [`URect::min`] and [`URect::max`] are implementation-dependent.\n # Examples\n ```\n # use bevy_math::{URect, UVec2};\n let r1 = URect::new(0, 0, 2, 2); // w=2 h=2\n let r2 = URect::new(1, 1, 3, 3); // w=2 h=2\n let r = r1.intersect(r2);\n assert_eq!(r.min, UVec2::new(1, 1));\n assert_eq!(r.max, UVec2::new(2, 2));\n ```", - &["_self", "other"], - ) - .register_documented( - "is_empty", - |_self: Ref| { - let output: bool = { - { - let output: bool = bevy::math::prelude::URect::is_empty( - &_self, - ) - .into(); - output - } - }; - output - }, - " Check if the rectangle is empty.\n # Examples\n ```\n # use bevy_math::{URect, UVec2};\n let r = URect::from_corners(UVec2::ZERO, UVec2::new(0, 1)); // w=0 h=1\n assert!(r.is_empty());\n ```", - &["_self"], - ) - .register_documented( - "new", - |x0: u32, y0: u32, x1: u32, y1: u32| { - let output: Val = { - { - let output: Val = bevy::math::prelude::URect::new( - x0, - y0, - x1, - y1, - ) - .into(); - output - } - }; - output - }, - " Create a new rectangle from two corner points.\n The two points do not need to be the minimum and/or maximum corners.\n They only need to be two opposite corners.\n # Examples\n ```\n # use bevy_math::URect;\n let r = URect::new(0, 4, 10, 6); // w=10 h=2\n let r = URect::new(2, 4, 5, 0); // w=3 h=4\n ```", - &["x0", "y0", "x1", "y1"], - ) - .register_documented( - "size", - |_self: Ref| { - let output: Val = { - { - let output: Val = bevy::math::prelude::URect::size( - &_self, - ) - .into(); - output - } - }; - output - }, - " Rectangle size.\n # Examples\n ```\n # use bevy_math::{URect, UVec2};\n let r = URect::new(0, 0, 5, 1); // w=5 h=1\n assert_eq!(r.size(), UVec2::new(5, 1));\n ```", - &["_self"], - ) - .register_documented( - "union", - | - _self: Ref, - other: Val| - { - let output: Val = { - { - let output: Val = bevy::math::prelude::URect::union( - &_self, - other.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Build a new rectangle formed of the union of this rectangle and another rectangle.\n The union is the smallest rectangle enclosing both rectangles.\n # Examples\n ```\n # use bevy_math::{URect, UVec2};\n let r1 = URect::new(0, 0, 5, 1); // w=5 h=1\n let r2 = URect::new(1, 0, 3, 8); // w=2 h=4\n let r = r1.union(r2);\n assert_eq!(r.min, UVec2::new(0, 0));\n assert_eq!(r.max, UVec2::new(5, 8));\n ```", - &["_self", "other"], - ) - .register_documented( - "union_point", - | - _self: Ref, - other: Val| - { - let output: Val = { - { - let output: Val = bevy::math::prelude::URect::union_point( - &_self, - other.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Build a new rectangle formed of the union of this rectangle and a point.\n The union is the smallest rectangle enclosing both the rectangle and the point. If the\n point is already inside the rectangle, this method returns a copy of the rectangle.\n # Examples\n ```\n # use bevy_math::{URect, UVec2};\n let r = URect::new(0, 0, 5, 1); // w=5 h=1\n let u = r.union_point(UVec2::new(3, 6));\n assert_eq!(u.min, UVec2::ZERO);\n assert_eq!(u.max, UVec2::new(5, 6));\n ```", - &["_self", "other"], - ) - .register_documented( - "width", - |_self: Ref| { - let output: u32 = { - { - let output: u32 = bevy::math::prelude::URect::width(&_self) - .into(); - output - } - }; - output - }, - " Rectangle width (max.x - min.x).\n # Examples\n ```\n # use bevy_math::URect;\n let r = URect::new(0, 0, 5, 1); // w=5 h=1\n assert_eq!(r.width(), 5);\n ```", - &["_self"], - ); - let registry = world - .get_resource_or_init::(); - let mut registry = registry.write(); - registry - .register_type_data::< - bevy::math::prelude::URect, - bevy_mod_scripting_core::bindings::MarkAsGenerated, - >(); - } - pub(crate) fn register_affine_3_functions(world: &mut bevy::ecs::world::World) { - bevy_mod_scripting_core::bindings::function::namespace::NamespaceBuilder::< - bevy::math::Affine3, - >::new(world); - let registry = world - .get_resource_or_init::(); - let mut registry = registry.write(); - registry - .register_type_data::< - bevy::math::Affine3, - bevy_mod_scripting_core::bindings::MarkAsGenerated, - >(); - } - pub(crate) fn register_aabb_2_d_functions(world: &mut bevy::ecs::world::World) { - bevy_mod_scripting_core::bindings::function::namespace::NamespaceBuilder::< - bevy::math::bounding::Aabb2d, - >::new(world) - .register_documented( - "bounding_circle", - |_self: Ref| { - let output: Val = { - { - let output: Val = bevy::math::bounding::Aabb2d::bounding_circle( - &_self, - ) - .into(); - output - } - }; - output - }, - " Computes the smallest [`BoundingCircle`] containing this [`Aabb2d`].", - &["_self"], - ) - .register_documented( - "clone", - |_self: Ref| { - let output: Val = { - { - let output: Val = ::clone( - &_self, - ) - .into(); - output - } - }; - output - }, - "", - &["_self"], - ) - .register_documented( - "closest_point", - | - _self: Ref, - point: Val| - { - let output: Val = { - { - let output: Val = bevy::math::bounding::Aabb2d::closest_point( - &_self, - point.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Finds the point on the AABB that is closest to the given `point`.\n If the point is outside the AABB, the returned point will be on the perimeter of the AABB.\n Otherwise, it will be inside the AABB and returned as is.", - &["_self", "point"], - ) - .register_documented( - "eq", - | - _self: Ref, - other: Ref| - { - let output: bool = { - { - let output: bool = >::eq(&_self, &other) - .into(); - output - } - }; - output - }, - "", - &["_self", "other"], - ) - .register_documented( - "new", - | - center: Val, - half_size: Val| - { - let output: Val = { - { - let output: Val = bevy::math::bounding::Aabb2d::new( - center.into_inner(), - half_size.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Constructs an AABB from its center and half-size.", - &["center", "half_size"], - ); - let registry = world - .get_resource_or_init::(); - let mut registry = registry.write(); - registry - .register_type_data::< - bevy::math::bounding::Aabb2d, - bevy_mod_scripting_core::bindings::MarkAsGenerated, - >(); - } - pub(crate) fn register_bounding_circle_functions( - world: &mut bevy::ecs::world::World, - ) { - bevy_mod_scripting_core::bindings::function::namespace::NamespaceBuilder::< - bevy::math::bounding::BoundingCircle, - >::new(world) - .register_documented( - "aabb_2d", - |_self: Ref| { - let output: Val = { - { - let output: Val = bevy::math::bounding::BoundingCircle::aabb_2d( - &_self, - ) - .into(); - output - } - }; - output - }, - " Computes the smallest [`Aabb2d`] containing this [`BoundingCircle`].", - &["_self"], - ) - .register_documented( - "clone", - |_self: Ref| { - let output: Val = { - { - let output: Val = ::clone( - &_self, - ) - .into(); - output - } - }; - output - }, - "", - &["_self"], - ) - .register_documented( - "closest_point", - | - _self: Ref, - point: Val| - { - let output: Val = { - { - let output: Val = bevy::math::bounding::BoundingCircle::closest_point( - &_self, - point.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Finds the point on the bounding circle that is closest to the given `point`.\n If the point is outside the circle, the returned point will be on the perimeter of the circle.\n Otherwise, it will be inside the circle and returned as is.", - &["_self", "point"], - ) - .register_documented( - "eq", - | - _self: Ref, - other: Ref| - { - let output: bool = { - { - let output: bool = >::eq(&_self, &other) - .into(); - output - } - }; - output - }, - "", - &["_self", "other"], - ) - .register_documented( - "new", - |center: Val, radius: f32| { - let output: Val = { - { - let output: Val = bevy::math::bounding::BoundingCircle::new( - center.into_inner(), - radius, - ) - .into(); - output - } - }; - output - }, - " Constructs a bounding circle from its center and radius.", - &["center", "radius"], - ) - .register_documented( - "radius", - |_self: Ref| { - let output: f32 = { - { - let output: f32 = bevy::math::bounding::BoundingCircle::radius( - &_self, - ) - .into(); - output - } - }; - output - }, - " Get the radius of the bounding circle", - &["_self"], - ); - let registry = world - .get_resource_or_init::(); - let mut registry = registry.write(); - registry - .register_type_data::< - bevy::math::bounding::BoundingCircle, - bevy_mod_scripting_core::bindings::MarkAsGenerated, - >(); - } - pub(crate) fn register_circle_functions(world: &mut bevy::ecs::world::World) { - bevy_mod_scripting_core::bindings::function::namespace::NamespaceBuilder::< - bevy::math::primitives::Circle, - >::new(world) - .register_documented( - "clone", - |_self: Ref| { - let output: Val = { - { - let output: Val = ::clone( - &_self, - ) - .into(); - output - } - }; - output - }, - "", - &["_self"], - ) - .register_documented( - "closest_point", - | - _self: Ref, - point: Val| - { - let output: Val = { - { - let output: Val = bevy::math::primitives::Circle::closest_point( - &_self, - point.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Finds the point on the circle that is closest to the given `point`.\n If the point is outside the circle, the returned point will be on the perimeter of the circle.\n Otherwise, it will be inside the circle and returned as is.", - &["_self", "point"], - ) - .register_documented( - "diameter", - |_self: Ref| { - let output: f32 = { - { - let output: f32 = bevy::math::primitives::Circle::diameter( - &_self, - ) - .into(); - output - } - }; - output - }, - " Get the diameter of the circle", - &["_self"], - ) - .register_documented( - "eq", - | - _self: Ref, - other: Ref| - { - let output: bool = { - { - let output: bool = >::eq(&_self, &other) - .into(); - output - } - }; - output - }, - "", - &["_self", "other"], - ) - .register_documented( - "new", - |radius: f32| { - let output: Val = { - { - let output: Val = bevy::math::primitives::Circle::new( - radius, - ) - .into(); - output - } - }; - output - }, - " Create a new [`Circle`] from a `radius`", - &["radius"], - ); - let registry = world - .get_resource_or_init::(); - let mut registry = registry.write(); - registry - .register_type_data::< - bevy::math::primitives::Circle, - bevy_mod_scripting_core::bindings::MarkAsGenerated, - >(); - } - pub(crate) fn register_annulus_functions(world: &mut bevy::ecs::world::World) { - bevy_mod_scripting_core::bindings::function::namespace::NamespaceBuilder::< - bevy::math::primitives::Annulus, - >::new(world) - .register_documented( - "clone", - |_self: Ref| { - let output: Val = { - { - let output: Val = ::clone( - &_self, - ) - .into(); - output - } - }; - output - }, - "", - &["_self"], - ) - .register_documented( - "closest_point", - | - _self: Ref, - point: Val| - { - let output: Val = { - { - let output: Val = bevy::math::primitives::Annulus::closest_point( - &_self, - point.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Finds the point on the annulus that is closest to the given `point`:\n - If the point is outside of the annulus completely, the returned point will be on the outer perimeter.\n - If the point is inside of the inner circle (hole) of the annulus, the returned point will be on the inner perimeter.\n - Otherwise, the returned point is overlapping the annulus and returned as is.", - &["_self", "point"], - ) - .register_documented( - "diameter", - |_self: Ref| { - let output: f32 = { - { - let output: f32 = bevy::math::primitives::Annulus::diameter( - &_self, - ) - .into(); - output - } - }; - output - }, - " Get the diameter of the annulus", - &["_self"], - ) - .register_documented( - "eq", - | - _self: Ref, - other: Ref| - { - let output: bool = { - { - let output: bool = >::eq(&_self, &other) - .into(); - output - } - }; - output - }, - "", - &["_self", "other"], - ) - .register_documented( - "new", - |inner_radius: f32, outer_radius: f32| { - let output: Val = { - { - let output: Val = bevy::math::primitives::Annulus::new( - inner_radius, - outer_radius, - ) - .into(); - output - } - }; - output - }, - " Create a new [`Annulus`] from the radii of the inner and outer circle", - &["inner_radius", "outer_radius"], - ) - .register_documented( - "thickness", - |_self: Ref| { - let output: f32 = { - { - let output: f32 = bevy::math::primitives::Annulus::thickness( - &_self, - ) - .into(); - output - } - }; - output - }, - " Get the thickness of the annulus", - &["_self"], - ); - let registry = world - .get_resource_or_init::(); - let mut registry = registry.write(); - registry - .register_type_data::< - bevy::math::primitives::Annulus, - bevy_mod_scripting_core::bindings::MarkAsGenerated, - >(); - } - pub(crate) fn register_arc_2_d_functions(world: &mut bevy::ecs::world::World) { - bevy_mod_scripting_core::bindings::function::namespace::NamespaceBuilder::< - bevy::math::primitives::Arc2d, - >::new(world) - .register_documented( - "angle", - |_self: Ref| { - let output: f32 = { - { - let output: f32 = bevy::math::primitives::Arc2d::angle( - &_self, - ) - .into(); - output - } - }; - output - }, - " Get the angle of the arc", - &["_self"], - ) - .register_documented( - "apothem", - |_self: Ref| { - let output: f32 = { - { - let output: f32 = bevy::math::primitives::Arc2d::apothem( - &_self, - ) - .into(); - output - } - }; - output - }, - " Get the length of the apothem of this arc, that is,\n the distance from the center of the circle to the midpoint of the chord, in the direction of the midpoint of the arc.\n Equivalently, the [`radius`](Self::radius) minus the [`sagitta`](Self::sagitta).\n Note that for a [`major`](Self::is_major) arc, the apothem will be negative.", - &["_self"], - ) - .register_documented( - "chord_length", - |_self: Ref| { - let output: f32 = { - { - let output: f32 = bevy::math::primitives::Arc2d::chord_length( - &_self, - ) - .into(); - output - } - }; - output - }, - " Get the distance between the endpoints (the length of the chord)", - &["_self"], - ) - .register_documented( - "chord_midpoint", - |_self: Ref| { - let output: Val = { - { - let output: Val = bevy::math::primitives::Arc2d::chord_midpoint( - &_self, - ) - .into(); - output - } - }; - output - }, - " Get the midpoint of the two endpoints (the midpoint of the chord)", - &["_self"], - ) - .register_documented( - "clone", - |_self: Ref| { - let output: Val = { - { - let output: Val = ::clone( - &_self, - ) - .into(); - output - } - }; - output - }, - "", - &["_self"], - ) - .register_documented( - "eq", - | - _self: Ref, - other: Ref| - { - let output: bool = { - { - let output: bool = >::eq(&_self, &other) - .into(); - output - } - }; - output - }, - "", - &["_self", "other"], - ) - .register_documented( - "from_degrees", - |radius: f32, angle: f32| { - let output: Val = { - { - let output: Val = bevy::math::primitives::Arc2d::from_degrees( - radius, - angle, - ) - .into(); - output - } - }; - output - }, - " Create a new [`Arc2d`] from a `radius` and an `angle` in degrees.", - &["radius", "angle"], - ) - .register_documented( - "from_radians", - |radius: f32, angle: f32| { - let output: Val = { - { - let output: Val = bevy::math::primitives::Arc2d::from_radians( - radius, - angle, - ) - .into(); - output - } - }; - output - }, - " Create a new [`Arc2d`] from a `radius` and an `angle` in radians", - &["radius", "angle"], - ) - .register_documented( - "from_turns", - |radius: f32, fraction: f32| { - let output: Val = { - { - let output: Val = bevy::math::primitives::Arc2d::from_turns( - radius, - fraction, - ) - .into(); - output - } - }; - output - }, - " Create a new [`Arc2d`] from a `radius` and a `fraction` of a single turn.\n For instance, `0.5` turns is a semicircle.", - &["radius", "fraction"], - ) - .register_documented( - "half_chord_length", - |_self: Ref| { - let output: f32 = { - { - let output: f32 = bevy::math::primitives::Arc2d::half_chord_length( - &_self, - ) - .into(); - output - } - }; - output - }, - " Get half the distance between the endpoints (half the length of the chord)", - &["_self"], - ) - .register_documented( - "is_major", - |_self: Ref| { - let output: bool = { - { - let output: bool = bevy::math::primitives::Arc2d::is_major( - &_self, - ) - .into(); - output - } - }; - output - }, - " Produces true if the arc is at least half a circle.\n **Note:** This is not the negation of [`is_minor`](Self::is_minor): an exact semicircle is both major and minor.", - &["_self"], - ) - .register_documented( - "is_minor", - |_self: Ref| { - let output: bool = { - { - let output: bool = bevy::math::primitives::Arc2d::is_minor( - &_self, - ) - .into(); - output - } - }; - output - }, - " Produces true if the arc is at most half a circle.\n **Note:** This is not the negation of [`is_major`](Self::is_major): an exact semicircle is both major and minor.", - &["_self"], - ) - .register_documented( - "left_endpoint", - |_self: Ref| { - let output: Val = { - { - let output: Val = bevy::math::primitives::Arc2d::left_endpoint( - &_self, - ) - .into(); - output - } - }; - output - }, - " Get the left-hand end point of the arc", - &["_self"], - ) - .register_documented( - "length", - |_self: Ref| { - let output: f32 = { - { - let output: f32 = bevy::math::primitives::Arc2d::length( - &_self, - ) - .into(); - output - } - }; - output - }, - " Get the length of the arc", - &["_self"], - ) - .register_documented( - "midpoint", - |_self: Ref| { - let output: Val = { - { - let output: Val = bevy::math::primitives::Arc2d::midpoint( - &_self, - ) - .into(); - output - } - }; - output - }, - " Get the midpoint of the arc", - &["_self"], - ) - .register_documented( - "new", - |radius: f32, half_angle: f32| { - let output: Val = { - { - let output: Val = bevy::math::primitives::Arc2d::new( - radius, - half_angle, - ) - .into(); - output - } - }; - output - }, - " Create a new [`Arc2d`] from a `radius` and a `half_angle`", - &["radius", "half_angle"], - ) - .register_documented( - "right_endpoint", - |_self: Ref| { - let output: Val = { - { - let output: Val = bevy::math::primitives::Arc2d::right_endpoint( - &_self, - ) - .into(); - output - } - }; - output - }, - " Get the right-hand end point of the arc", - &["_self"], - ) - .register_documented( - "sagitta", - |_self: Ref| { - let output: f32 = { - { - let output: f32 = bevy::math::primitives::Arc2d::sagitta( - &_self, - ) - .into(); - output - } - }; - output - }, - " Get the length of the sagitta of this arc, that is,\n the length of the line between the midpoints of the arc and its chord.\n Equivalently, the height of the triangle whose base is the chord and whose apex is the midpoint of the arc.\n The sagitta is also the sum of the [`radius`](Self::radius) and the [`apothem`](Self::apothem).", - &["_self"], - ); - let registry = world - .get_resource_or_init::(); - let mut registry = registry.write(); - registry - .register_type_data::< - bevy::math::primitives::Arc2d, - bevy_mod_scripting_core::bindings::MarkAsGenerated, - >(); - } - pub(crate) fn register_capsule_2_d_functions(world: &mut bevy::ecs::world::World) { - bevy_mod_scripting_core::bindings::function::namespace::NamespaceBuilder::< - bevy::math::primitives::Capsule2d, - >::new(world) - .register_documented( - "clone", - |_self: Ref| { - let output: Val = { - { - let output: Val = ::clone( - &_self, - ) - .into(); - output - } - }; - output - }, - "", - &["_self"], - ) - .register_documented( - "eq", - | - _self: Ref, - other: Ref| - { - let output: bool = { - { - let output: bool = >::eq(&_self, &other) - .into(); - output - } - }; - output - }, - "", - &["_self", "other"], - ) - .register_documented( - "new", - |radius: f32, length: f32| { - let output: Val = { - { - let output: Val = bevy::math::primitives::Capsule2d::new( - radius, - length, - ) - .into(); - output - } - }; - output - }, - " Create a new `Capsule2d` from a radius and length", - &["radius", "length"], - ) - .register_documented( - "to_inner_rectangle", - |_self: Ref| { - let output: Val = { - { - let output: Val = bevy::math::primitives::Capsule2d::to_inner_rectangle( - &_self, - ) - .into(); - output - } - }; - output - }, - " Get the part connecting the semicircular ends of the capsule as a [`Rectangle`]", - &["_self"], - ); - let registry = world - .get_resource_or_init::(); - let mut registry = registry.write(); - registry - .register_type_data::< - bevy::math::primitives::Capsule2d, - bevy_mod_scripting_core::bindings::MarkAsGenerated, - >(); - } - pub(crate) fn register_circular_sector_functions( - world: &mut bevy::ecs::world::World, - ) { - bevy_mod_scripting_core::bindings::function::namespace::NamespaceBuilder::< - bevy::math::primitives::CircularSector, - >::new(world) - .register_documented( - "angle", - |_self: Ref| { - let output: f32 = { - { - let output: f32 = bevy::math::primitives::CircularSector::angle( - &_self, - ) - .into(); - output - } - }; - output - }, - " Get the angle of the sector", - &["_self"], - ) - .register_documented( - "apothem", - |_self: Ref| { - let output: f32 = { - { - let output: f32 = bevy::math::primitives::CircularSector::apothem( - &_self, - ) - .into(); - output - } - }; - output - }, - " Get the length of the apothem of this sector\n See [`Arc2d::apothem`]", - &["_self"], - ) - .register_documented( - "arc_length", - |_self: Ref| { - let output: f32 = { - { - let output: f32 = bevy::math::primitives::CircularSector::arc_length( - &_self, - ) - .into(); - output - } - }; - output - }, - " Get the length of the arc defining the sector", - &["_self"], - ) - .register_documented( - "chord_length", - |_self: Ref| { - let output: f32 = { - { - let output: f32 = bevy::math::primitives::CircularSector::chord_length( - &_self, - ) - .into(); - output - } - }; - output - }, - " Get the length of the chord defined by the sector\n See [`Arc2d::chord_length`]", - &["_self"], - ) - .register_documented( - "chord_midpoint", - |_self: Ref| { - let output: Val = { - { - let output: Val = bevy::math::primitives::CircularSector::chord_midpoint( - &_self, - ) - .into(); - output - } - }; - output - }, - " Get the midpoint of the chord defined by the sector\n See [`Arc2d::chord_midpoint`]", - &["_self"], - ) - .register_documented( - "clone", - |_self: Ref| { - let output: Val = { - { - let output: Val = ::clone( - &_self, - ) - .into(); - output - } - }; - output - }, - "", - &["_self"], - ) - .register_documented( - "eq", - | - _self: Ref, - other: Ref| - { - let output: bool = { - { - let output: bool = >::eq(&_self, &other) - .into(); - output - } - }; - output - }, - "", - &["_self", "other"], - ) - .register_documented( - "from_degrees", - |radius: f32, angle: f32| { - let output: Val = { - { - let output: Val = bevy::math::primitives::CircularSector::from_degrees( - radius, - angle, - ) - .into(); - output - } - }; - output - }, - " Create a new [`CircularSector`] from a `radius` and an `angle` in degrees.", - &["radius", "angle"], - ) - .register_documented( - "from_radians", - |radius: f32, angle: f32| { - let output: Val = { - { - let output: Val = bevy::math::primitives::CircularSector::from_radians( - radius, - angle, - ) - .into(); - output - } - }; - output - }, - " Create a new [`CircularSector`] from a `radius` and an `angle` in radians.", - &["radius", "angle"], - ) - .register_documented( - "from_turns", - |radius: f32, fraction: f32| { - let output: Val = { - { - let output: Val = bevy::math::primitives::CircularSector::from_turns( - radius, - fraction, - ) - .into(); - output - } - }; - output - }, - " Create a new [`CircularSector`] from a `radius` and a number of `turns` of a circle.\n For instance, `0.5` turns is a semicircle.", - &["radius", "fraction"], - ) - .register_documented( - "half_angle", - |_self: Ref| { - let output: f32 = { - { - let output: f32 = bevy::math::primitives::CircularSector::half_angle( - &_self, - ) - .into(); - output - } - }; - output - }, - " Get half the angle of the sector", - &["_self"], - ) - .register_documented( - "half_chord_length", - |_self: Ref| { - let output: f32 = { - { - let output: f32 = bevy::math::primitives::CircularSector::half_chord_length( - &_self, - ) - .into(); - output - } - }; - output - }, - " Get half the length of the chord defined by the sector\n See [`Arc2d::half_chord_length`]", - &["_self"], - ) - .register_documented( - "new", - |radius: f32, angle: f32| { - let output: Val = { - { - let output: Val = bevy::math::primitives::CircularSector::new( - radius, - angle, - ) - .into(); - output - } - }; - output - }, - " Create a new [`CircularSector`] from a `radius` and an `angle`", - &["radius", "angle"], - ) - .register_documented( - "radius", - |_self: Ref| { - let output: f32 = { - { - let output: f32 = bevy::math::primitives::CircularSector::radius( - &_self, - ) - .into(); - output - } - }; - output - }, - " Get the radius of the sector", - &["_self"], - ) - .register_documented( - "sagitta", - |_self: Ref| { - let output: f32 = { - { - let output: f32 = bevy::math::primitives::CircularSector::sagitta( - &_self, - ) - .into(); - output - } - }; - output - }, - " Get the length of the sagitta of this sector\n See [`Arc2d::sagitta`]", - &["_self"], - ); - let registry = world - .get_resource_or_init::(); - let mut registry = registry.write(); - registry - .register_type_data::< - bevy::math::primitives::CircularSector, - bevy_mod_scripting_core::bindings::MarkAsGenerated, - >(); - } - pub(crate) fn register_circular_segment_functions( - world: &mut bevy::ecs::world::World, - ) { - bevy_mod_scripting_core::bindings::function::namespace::NamespaceBuilder::< - bevy::math::primitives::CircularSegment, - >::new(world) - .register_documented( - "angle", - |_self: Ref| { - let output: f32 = { - { - let output: f32 = bevy::math::primitives::CircularSegment::angle( - &_self, - ) - .into(); - output - } - }; - output - }, - " Get the angle of the segment", - &["_self"], - ) - .register_documented( - "apothem", - |_self: Ref| { - let output: f32 = { - { - let output: f32 = bevy::math::primitives::CircularSegment::apothem( - &_self, - ) - .into(); - output - } - }; - output - }, - " Get the length of the apothem of this segment,\n which is the signed distance between the segment and the center of its circle\n See [`Arc2d::apothem`]", - &["_self"], - ) - .register_documented( - "arc_length", - |_self: Ref| { - let output: f32 = { - { - let output: f32 = bevy::math::primitives::CircularSegment::arc_length( - &_self, - ) - .into(); - output - } - }; - output - }, - " Get the length of the arc defining the segment", - &["_self"], - ) - .register_documented( - "chord_length", - |_self: Ref| { - let output: f32 = { - { - let output: f32 = bevy::math::primitives::CircularSegment::chord_length( - &_self, - ) - .into(); - output - } - }; - output - }, - " Get the length of the segment's base, also known as its chord", - &["_self"], - ) - .register_documented( - "chord_midpoint", - |_self: Ref| { - let output: Val = { - { - let output: Val = bevy::math::primitives::CircularSegment::chord_midpoint( - &_self, - ) - .into(); - output - } - }; - output - }, - " Get the midpoint of the segment's base, also known as its chord", - &["_self"], - ) - .register_documented( - "clone", - |_self: Ref| { - let output: Val = { - { - let output: Val = ::clone( - &_self, - ) - .into(); - output - } - }; - output - }, - "", - &["_self"], - ) - .register_documented( - "eq", - | - _self: Ref, - other: Ref| - { - let output: bool = { - { - let output: bool = >::eq(&_self, &other) - .into(); - output - } - }; - output - }, - "", - &["_self", "other"], - ) - .register_documented( - "from_degrees", - |radius: f32, angle: f32| { - let output: Val = { - { - let output: Val = bevy::math::primitives::CircularSegment::from_degrees( - radius, - angle, - ) - .into(); - output - } - }; - output - }, - " Create a new [`CircularSegment`] from a `radius` and an `angle` in degrees.", - &["radius", "angle"], - ) - .register_documented( - "from_radians", - |radius: f32, angle: f32| { - let output: Val = { - { - let output: Val = bevy::math::primitives::CircularSegment::from_radians( - radius, - angle, - ) - .into(); - output - } - }; - output - }, - " Create a new [`CircularSegment`] from a `radius` and an `angle` in radians.", - &["radius", "angle"], - ) - .register_documented( - "from_turns", - |radius: f32, fraction: f32| { - let output: Val = { - { - let output: Val = bevy::math::primitives::CircularSegment::from_turns( - radius, - fraction, - ) - .into(); - output - } - }; - output - }, - " Create a new [`CircularSegment`] from a `radius` and a number of `turns` of a circle.\n For instance, `0.5` turns is a semicircle.", - &["radius", "fraction"], - ) - .register_documented( - "half_angle", - |_self: Ref| { - let output: f32 = { - { - let output: f32 = bevy::math::primitives::CircularSegment::half_angle( - &_self, - ) - .into(); - output - } - }; - output - }, - " Get the half-angle of the segment", - &["_self"], - ) - .register_documented( - "half_chord_length", - |_self: Ref| { - let output: f32 = { - { - let output: f32 = bevy::math::primitives::CircularSegment::half_chord_length( - &_self, - ) - .into(); - output - } - }; - output - }, - " Get half the length of the segment's base, also known as its chord", - &["_self"], - ) - .register_documented( - "new", - |radius: f32, angle: f32| { - let output: Val = { - { - let output: Val = bevy::math::primitives::CircularSegment::new( - radius, - angle, - ) - .into(); - output - } - }; - output - }, - " Create a new [`CircularSegment`] from a `radius`, and an `angle`", - &["radius", "angle"], - ) - .register_documented( - "radius", - |_self: Ref| { - let output: f32 = { - { - let output: f32 = bevy::math::primitives::CircularSegment::radius( - &_self, - ) - .into(); - output - } - }; - output - }, - " Get the radius of the segment", - &["_self"], - ) - .register_documented( - "sagitta", - |_self: Ref| { - let output: f32 = { - { - let output: f32 = bevy::math::primitives::CircularSegment::sagitta( - &_self, - ) - .into(); - output - } - }; - output - }, - " Get the length of the sagitta of this segment, also known as its height\n See [`Arc2d::sagitta`]", - &["_self"], - ); - let registry = world - .get_resource_or_init::(); - let mut registry = registry.write(); - registry - .register_type_data::< - bevy::math::primitives::CircularSegment, - bevy_mod_scripting_core::bindings::MarkAsGenerated, - >(); - } - pub(crate) fn register_ellipse_functions(world: &mut bevy::ecs::world::World) { - bevy_mod_scripting_core::bindings::function::namespace::NamespaceBuilder::< - bevy::math::primitives::Ellipse, - >::new(world) - .register_documented( - "clone", - |_self: Ref| { - let output: Val = { - { - let output: Val = ::clone( - &_self, - ) - .into(); - output - } - }; - output - }, - "", - &["_self"], - ) - .register_documented( - "eccentricity", - |_self: Ref| { - let output: f32 = { - { - let output: f32 = bevy::math::primitives::Ellipse::eccentricity( - &_self, - ) - .into(); - output - } - }; - output - }, - " Returns the [eccentricity](https://en.wikipedia.org/wiki/Eccentricity_(mathematics)) of the ellipse.\n It can be thought of as a measure of how \"stretched\" or elongated the ellipse is.\n The value should be in the range [0, 1), where 0 represents a circle, and 1 represents a parabola.", - &["_self"], - ) - .register_documented( - "eq", - | - _self: Ref, - other: Ref| - { - let output: bool = { - { - let output: bool = >::eq(&_self, &other) - .into(); - output - } - }; - output - }, - "", - &["_self", "other"], - ) - .register_documented( - "focal_length", - |_self: Ref| { - let output: f32 = { - { - let output: f32 = bevy::math::primitives::Ellipse::focal_length( - &_self, - ) - .into(); - output - } - }; - output - }, - " Get the focal length of the ellipse. This corresponds to the distance between one of the foci and the center of the ellipse.\n The focal length of an ellipse is related to its eccentricity by `eccentricity = focal_length / semi_major`", - &["_self"], - ) - .register_documented( - "from_size", - |size: Val| { - let output: Val = { - { - let output: Val = bevy::math::primitives::Ellipse::from_size( - size.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Create a new `Ellipse` from a given full size.\n `size.x` is the diameter along the X axis, and `size.y` is the diameter along the Y axis.", - &["size"], - ) - .register_documented( - "new", - |half_width: f32, half_height: f32| { - let output: Val = { - { - let output: Val = bevy::math::primitives::Ellipse::new( - half_width, - half_height, - ) - .into(); - output - } - }; - output - }, - " Create a new `Ellipse` from half of its width and height.\n This corresponds to the two perpendicular radii defining the ellipse.", - &["half_width", "half_height"], - ) - .register_documented( - "semi_major", - |_self: Ref| { - let output: f32 = { - { - let output: f32 = bevy::math::primitives::Ellipse::semi_major( - &_self, - ) - .into(); - output - } - }; - output - }, - " Returns the length of the semi-major axis. This corresponds to the longest radius of the ellipse.", - &["_self"], - ) - .register_documented( - "semi_minor", - |_self: Ref| { - let output: f32 = { - { - let output: f32 = bevy::math::primitives::Ellipse::semi_minor( - &_self, - ) - .into(); - output - } - }; - output - }, - " Returns the length of the semi-minor axis. This corresponds to the shortest radius of the ellipse.", - &["_self"], - ); - let registry = world - .get_resource_or_init::(); - let mut registry = registry.write(); - registry - .register_type_data::< - bevy::math::primitives::Ellipse, - bevy_mod_scripting_core::bindings::MarkAsGenerated, - >(); - } - pub(crate) fn register_line_2_d_functions(world: &mut bevy::ecs::world::World) { - bevy_mod_scripting_core::bindings::function::namespace::NamespaceBuilder::< - bevy::math::primitives::Line2d, - >::new(world) - .register_documented( - "clone", - |_self: Ref| { - let output: Val = { - { - let output: Val = ::clone( - &_self, - ) - .into(); - output - } - }; - output - }, - "", - &["_self"], - ) - .register_documented( - "eq", - | - _self: Ref, - other: Ref| - { - let output: bool = { - { - let output: bool = >::eq(&_self, &other) - .into(); - output - } - }; - output - }, - "", - &["_self", "other"], - ); - let registry = world - .get_resource_or_init::(); - let mut registry = registry.write(); - registry - .register_type_data::< - bevy::math::primitives::Line2d, - bevy_mod_scripting_core::bindings::MarkAsGenerated, - >(); - } - pub(crate) fn register_plane_2_d_functions(world: &mut bevy::ecs::world::World) { - bevy_mod_scripting_core::bindings::function::namespace::NamespaceBuilder::< - bevy::math::primitives::Plane2d, - >::new(world) - .register_documented( - "clone", - |_self: Ref| { - let output: Val = { - { - let output: Val = ::clone( - &_self, - ) - .into(); - output - } - }; - output - }, - "", - &["_self"], - ) - .register_documented( - "eq", - | - _self: Ref, - other: Ref| - { - let output: bool = { - { - let output: bool = >::eq(&_self, &other) - .into(); - output - } - }; - output - }, - "", - &["_self", "other"], - ) - .register_documented( - "new", - |normal: Val| { - let output: Val = { - { - let output: Val = bevy::math::primitives::Plane2d::new( - normal.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Create a new `Plane2d` from a normal\n # Panics\n Panics if the given `normal` is zero (or very close to zero), or non-finite.", - &["normal"], - ); - let registry = world - .get_resource_or_init::(); - let mut registry = registry.write(); - registry - .register_type_data::< - bevy::math::primitives::Plane2d, - bevy_mod_scripting_core::bindings::MarkAsGenerated, - >(); - } - pub(crate) fn register_rectangle_functions(world: &mut bevy::ecs::world::World) { - bevy_mod_scripting_core::bindings::function::namespace::NamespaceBuilder::< - bevy::math::primitives::Rectangle, - >::new(world) - .register_documented( - "clone", - |_self: Ref| { - let output: Val = { - { - let output: Val = ::clone( - &_self, - ) - .into(); - output - } - }; - output - }, - "", - &["_self"], - ) - .register_documented( - "closest_point", - | - _self: Ref, - point: Val| - { - let output: Val = { - { - let output: Val = bevy::math::primitives::Rectangle::closest_point( - &_self, - point.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Finds the point on the rectangle that is closest to the given `point`.\n If the point is outside the rectangle, the returned point will be on the perimeter of the rectangle.\n Otherwise, it will be inside the rectangle and returned as is.", - &["_self", "point"], - ) - .register_documented( - "eq", - | - _self: Ref, - other: Ref| - { - let output: bool = { - { - let output: bool = >::eq(&_self, &other) - .into(); - output - } - }; - output - }, - "", - &["_self", "other"], - ) - .register_documented( - "from_corners", - | - point1: Val, - point2: Val| - { - let output: Val = { - { - let output: Val = bevy::math::primitives::Rectangle::from_corners( - point1.into_inner(), - point2.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Create a new `Rectangle` from two corner points", - &["point1", "point2"], - ) - .register_documented( - "from_length", - |length: f32| { - let output: Val = { - { - let output: Val = bevy::math::primitives::Rectangle::from_length( - length, - ) - .into(); - output - } - }; - output - }, - " Create a `Rectangle` from a single length.\n The resulting `Rectangle` will be the same size in every direction.", - &["length"], - ) - .register_documented( - "from_size", - |size: Val| { - let output: Val = { - { - let output: Val = bevy::math::primitives::Rectangle::from_size( - size.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Create a new `Rectangle` from a given full size", - &["size"], - ) - .register_documented( - "new", - |width: f32, height: f32| { - let output: Val = { - { - let output: Val = bevy::math::primitives::Rectangle::new( - width, - height, - ) - .into(); - output - } - }; - output - }, - " Create a new `Rectangle` from a full width and height", - &["width", "height"], - ) - .register_documented( - "size", - |_self: Ref| { - let output: Val = { - { - let output: Val = bevy::math::primitives::Rectangle::size( - &_self, - ) - .into(); - output - } - }; - output - }, - " Get the size of the rectangle", - &["_self"], - ); - let registry = world - .get_resource_or_init::(); - let mut registry = registry.write(); - registry - .register_type_data::< - bevy::math::primitives::Rectangle, - bevy_mod_scripting_core::bindings::MarkAsGenerated, - >(); - } - pub(crate) fn register_regular_polygon_functions( - world: &mut bevy::ecs::world::World, - ) { - bevy_mod_scripting_core::bindings::function::namespace::NamespaceBuilder::< - bevy::math::primitives::RegularPolygon, - >::new(world) - .register_documented( - "circumradius", - |_self: Ref| { - let output: f32 = { - { - let output: f32 = bevy::math::primitives::RegularPolygon::circumradius( - &_self, - ) - .into(); - output - } - }; - output - }, - " Get the radius of the circumcircle on which all vertices\n of the regular polygon lie", - &["_self"], - ) - .register_documented( - "clone", - |_self: Ref| { - let output: Val = { - { - let output: Val = ::clone( - &_self, - ) - .into(); - output - } - }; - output - }, - "", - &["_self"], - ) - .register_documented( - "eq", - | - _self: Ref, - other: Ref| - { - let output: bool = { - { - let output: bool = >::eq(&_self, &other) - .into(); - output - } - }; - output - }, - "", - &["_self", "other"], - ) - .register_documented( - "external_angle_degrees", - |_self: Ref| { - let output: f32 = { - { - let output: f32 = bevy::math::primitives::RegularPolygon::external_angle_degrees( - &_self, - ) - .into(); - output - } - }; - output - }, - " Get the external angle of the regular polygon in degrees.\n This is the angle formed by two adjacent sides with points\n within the angle being in the exterior of the polygon", - &["_self"], - ) - .register_documented( - "external_angle_radians", - |_self: Ref| { - let output: f32 = { - { - let output: f32 = bevy::math::primitives::RegularPolygon::external_angle_radians( - &_self, - ) - .into(); - output - } - }; - output - }, - " Get the external angle of the regular polygon in radians.\n This is the angle formed by two adjacent sides with points\n within the angle being in the exterior of the polygon", - &["_self"], - ) - .register_documented( - "inradius", - |_self: Ref| { - let output: f32 = { - { - let output: f32 = bevy::math::primitives::RegularPolygon::inradius( - &_self, - ) - .into(); - output - } - }; - output - }, - " Get the inradius or apothem of the regular polygon.\n This is the radius of the largest circle that can\n be drawn within the polygon", - &["_self"], - ) - .register_documented( - "internal_angle_degrees", - |_self: Ref| { - let output: f32 = { - { - let output: f32 = bevy::math::primitives::RegularPolygon::internal_angle_degrees( - &_self, - ) - .into(); - output - } - }; - output - }, - " Get the internal angle of the regular polygon in degrees.\n This is the angle formed by two adjacent sides with points\n within the angle being in the interior of the polygon", - &["_self"], - ) - .register_documented( - "internal_angle_radians", - |_self: Ref| { - let output: f32 = { - { - let output: f32 = bevy::math::primitives::RegularPolygon::internal_angle_radians( - &_self, - ) - .into(); - output - } - }; - output - }, - " Get the internal angle of the regular polygon in radians.\n This is the angle formed by two adjacent sides with points\n within the angle being in the interior of the polygon", - &["_self"], - ) - .register_documented( - "new", - |circumradius: f32, sides: u32| { - let output: Val = { - { - let output: Val = bevy::math::primitives::RegularPolygon::new( - circumradius, - sides, - ) - .into(); - output - } - }; - output - }, - " Create a new `RegularPolygon`\n from the radius of the circumcircle and a number of sides\n # Panics\n Panics if `circumradius` is negative", - &["circumradius", "sides"], - ) - .register_documented( - "side_length", - |_self: Ref| { - let output: f32 = { - { - let output: f32 = bevy::math::primitives::RegularPolygon::side_length( - &_self, - ) - .into(); - output - } - }; - output - }, - " Get the length of one side of the regular polygon", - &["_self"], - ); - let registry = world - .get_resource_or_init::(); - let mut registry = registry.write(); - registry - .register_type_data::< - bevy::math::primitives::RegularPolygon, - bevy_mod_scripting_core::bindings::MarkAsGenerated, - >(); - } - pub(crate) fn register_rhombus_functions(world: &mut bevy::ecs::world::World) { - bevy_mod_scripting_core::bindings::function::namespace::NamespaceBuilder::< - bevy::math::primitives::Rhombus, - >::new(world) - .register_documented( - "circumradius", - |_self: Ref| { - let output: f32 = { - { - let output: f32 = bevy::math::primitives::Rhombus::circumradius( - &_self, - ) - .into(); - output - } - }; - output - }, - " Get the radius of the circumcircle on which all vertices\n of the rhombus lie", - &["_self"], - ) - .register_documented( - "clone", - |_self: Ref| { - let output: Val = { - { - let output: Val = ::clone( - &_self, - ) - .into(); - output - } - }; - output - }, - "", - &["_self"], - ) - .register_documented( - "closest_point", - | - _self: Ref, - point: Val| - { - let output: Val = { - { - let output: Val = bevy::math::primitives::Rhombus::closest_point( - &_self, - point.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Finds the point on the rhombus that is closest to the given `point`.\n If the point is outside the rhombus, the returned point will be on the perimeter of the rhombus.\n Otherwise, it will be inside the rhombus and returned as is.", - &["_self", "point"], - ) - .register_documented( - "eq", - | - _self: Ref, - other: Ref| - { - let output: bool = { - { - let output: bool = >::eq(&_self, &other) - .into(); - output - } - }; - output - }, - "", - &["_self", "other"], - ) - .register_documented( - "from_inradius", - |inradius: f32| { - let output: Val = { - { - let output: Val = bevy::math::primitives::Rhombus::from_inradius( - inradius, - ) - .into(); - output - } - }; - output - }, - " Create a new `Rhombus` from a given inradius with all inner angles equal.", - &["inradius"], - ) - .register_documented( - "from_side", - |side: f32| { - let output: Val = { - { - let output: Val = bevy::math::primitives::Rhombus::from_side( - side, - ) - .into(); - output - } - }; - output - }, - " Create a new `Rhombus` from a side length with all inner angles equal.", - &["side"], - ) - .register_documented( - "inradius", - |_self: Ref| { - let output: f32 = { - { - let output: f32 = bevy::math::primitives::Rhombus::inradius( - &_self, - ) - .into(); - output - } - }; - output - }, - " Get the radius of the largest circle that can\n be drawn within the rhombus", - &["_self"], - ) - .register_documented( - "new", - |horizontal_diagonal: f32, vertical_diagonal: f32| { - let output: Val = { - { - let output: Val = bevy::math::primitives::Rhombus::new( - horizontal_diagonal, - vertical_diagonal, - ) - .into(); - output - } - }; - output - }, - " Create a new `Rhombus` from a vertical and horizontal diagonal sizes.", - &["horizontal_diagonal", "vertical_diagonal"], - ) - .register_documented( - "side", - |_self: Ref| { - let output: f32 = { - { - let output: f32 = bevy::math::primitives::Rhombus::side( - &_self, - ) - .into(); - output - } - }; - output - }, - " Get the length of each side of the rhombus", - &["_self"], - ); - let registry = world - .get_resource_or_init::(); - let mut registry = registry.write(); - registry - .register_type_data::< - bevy::math::primitives::Rhombus, - bevy_mod_scripting_core::bindings::MarkAsGenerated, - >(); - } - pub(crate) fn register_segment_2_d_functions(world: &mut bevy::ecs::world::World) { - bevy_mod_scripting_core::bindings::function::namespace::NamespaceBuilder::< - bevy::math::primitives::Segment2d, - >::new(world) - .register_documented( - "center", - |_self: Ref| { - let output: Val = { - { - let output: Val = bevy::math::primitives::Segment2d::center( - &_self, - ) - .into(); - output - } - }; - output - }, - " Compute the midpoint between the two endpoints of the line segment.", - &["_self"], - ) - .register_documented( - "centered", - |_self: Ref| { - let output: Val = { - { - let output: Val = bevy::math::primitives::Segment2d::centered( - &_self, - ) - .into(); - output - } - }; - output - }, - " Compute the segment with its center at the origin, keeping the same direction and length.", - &["_self"], - ) - .register_documented( - "clone", - |_self: Ref| { - let output: Val = { - { - let output: Val = ::clone( - &_self, - ) - .into(); - output - } - }; - output - }, - "", - &["_self"], - ) - .register_documented( - "direction", - |_self: Ref| { - let output: Val = { - { - let output: Val = bevy::math::primitives::Segment2d::direction( - &_self, - ) - .into(); - output - } - }; - output - }, - " Compute the normalized direction pointing from the first endpoint to the second endpoint.\n For the non-panicking version, see [`Segment2d::try_direction`].\n # Panics\n Panics if a valid direction could not be computed, for example when the endpoints are coincident, NaN, or infinite.", - &["_self"], - ) - .register_documented( - "eq", - | - _self: Ref, - other: Ref| - { - let output: bool = { - { - let output: bool = >::eq(&_self, &other) - .into(); - output - } - }; - output - }, - "", - &["_self", "other"], - ) - .register_documented( - "from_direction_and_length", - |direction: Val, length: f32| { - let output: Val = { - { - let output: Val = bevy::math::primitives::Segment2d::from_direction_and_length( - direction.into_inner(), - length, - ) - .into(); - output - } - }; - output - }, - " Create a new `Segment2d` centered at the origin with the given direction and length.\n The endpoints will be at `-direction * length / 2.0` and `direction * length / 2.0`.", - &["direction", "length"], - ) - .register_documented( - "from_ray_and_length", - |ray: Val, length: f32| { - let output: Val = { - { - let output: Val = bevy::math::primitives::Segment2d::from_ray_and_length( - ray.into_inner(), - length, - ) - .into(); - output - } - }; - output - }, - " Create a new `Segment2d` starting from the origin of the given `ray`,\n going in the direction of the ray for the given `length`.\n The endpoints will be at `ray.origin` and `ray.origin + length * ray.direction`.", - &["ray", "length"], - ) - .register_documented( - "from_scaled_direction", - |scaled_direction: Val| { - let output: Val = { - { - let output: Val = bevy::math::primitives::Segment2d::from_scaled_direction( - scaled_direction.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Create a new `Segment2d` centered at the origin from a vector representing\n the direction and length of the line segment.\n The endpoints will be at `-scaled_direction / 2.0` and `scaled_direction / 2.0`.", - &["scaled_direction"], - ) - .register_documented( - "left_normal", - |_self: Ref| { - let output: Val = { - { - let output: Val = bevy::math::primitives::Segment2d::left_normal( - &_self, - ) - .into(); - output - } - }; - output - }, - " Compute the normalized counterclockwise normal on the left-hand side of the line segment.\n For the non-panicking version, see [`Segment2d::try_left_normal`].\n # Panics\n Panics if a valid normal could not be computed, for example when the endpoints are coincident, NaN, or infinite.", - &["_self"], - ) - .register_documented( - "length", - |_self: Ref| { - let output: f32 = { - { - let output: f32 = bevy::math::primitives::Segment2d::length( - &_self, - ) - .into(); - output - } - }; - output - }, - " Compute the length of the line segment.", - &["_self"], - ) - .register_documented( - "length_squared", - |_self: Ref| { - let output: f32 = { - { - let output: f32 = bevy::math::primitives::Segment2d::length_squared( - &_self, - ) - .into(); - output - } - }; - output - }, - " Compute the squared length of the line segment.", - &["_self"], - ) - .register_documented( - "new", - | - point1: Val, - point2: Val| - { - let output: Val = { - { - let output: Val = bevy::math::primitives::Segment2d::new( - point1.into_inner(), - point2.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Create a new `Segment2d` from its endpoints.", - &["point1", "point2"], - ) - .register_documented( - "point1", - |_self: Ref| { - let output: Val = { - { - let output: Val = bevy::math::primitives::Segment2d::point1( - &_self, - ) - .into(); - output - } - }; - output - }, - " Get the position of the first endpoint of the line segment.", - &["_self"], - ) - .register_documented( - "point2", - |_self: Ref| { - let output: Val = { - { - let output: Val = bevy::math::primitives::Segment2d::point2( - &_self, - ) - .into(); - output - } - }; - output - }, - " Get the position of the second endpoint of the line segment.", - &["_self"], - ) - .register_documented( - "resized", - |_self: Ref, length: f32| { - let output: Val = { - { - let output: Val = bevy::math::primitives::Segment2d::resized( - &_self, - length, - ) - .into(); - output - } - }; - output - }, - " Compute the segment with a new length, keeping the same direction and center.", - &["_self", "length"], - ) - .register_documented( - "reverse", - |mut _self: Mut| { - let output: () = { - { - let output: () = bevy::math::primitives::Segment2d::reverse( - &mut _self, - ) - .into(); - output - } - }; - output - }, - " Reverses the direction of the line segment by swapping the endpoints.", - &["_self"], - ) - .register_documented( - "reversed", - |_self: Val| { - let output: Val = { - { - let output: Val = bevy::math::primitives::Segment2d::reversed( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns the line segment with its direction reversed by swapping the endpoints.", - &["_self"], - ) - .register_documented( - "right_normal", - |_self: Ref| { - let output: Val = { - { - let output: Val = bevy::math::primitives::Segment2d::right_normal( - &_self, - ) - .into(); - output - } - }; - output - }, - " Compute the normalized clockwise normal on the right-hand side of the line segment.\n For the non-panicking version, see [`Segment2d::try_right_normal`].\n # Panics\n Panics if a valid normal could not be computed, for example when the endpoints are coincident, NaN, or infinite.", - &["_self"], - ) - .register_documented( - "rotated", - | - _self: Ref, - rotation: Val| - { - let output: Val = { - { - let output: Val = bevy::math::primitives::Segment2d::rotated( - &_self, - rotation.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Compute the segment rotated around the origin by the given rotation.", - &["_self", "rotation"], - ) - .register_documented( - "rotated_around", - | - _self: Ref, - rotation: Val, - point: Val| - { - let output: Val = { - { - let output: Val = bevy::math::primitives::Segment2d::rotated_around( - &_self, - rotation.into_inner(), - point.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Compute the segment rotated around the given point by the given rotation.", - &["_self", "rotation", "point"], - ) - .register_documented( - "rotated_around_center", - | - _self: Ref, - rotation: Val| - { - let output: Val = { - { - let output: Val = bevy::math::primitives::Segment2d::rotated_around_center( - &_self, - rotation.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Compute the segment rotated around its own center.", - &["_self", "rotation"], - ) - .register_documented( - "scaled_direction", - |_self: Ref| { - let output: Val = { - { - let output: Val = bevy::math::primitives::Segment2d::scaled_direction( - &_self, - ) - .into(); - output - } - }; - output - }, - " Compute the vector from the first endpoint to the second endpoint.", - &["_self"], - ) - .register_documented( - "scaled_left_normal", - |_self: Ref| { - let output: Val = { - { - let output: Val = bevy::math::primitives::Segment2d::scaled_left_normal( - &_self, - ) - .into(); - output - } - }; - output - }, - " Compute the non-normalized counterclockwise normal on the left-hand side of the line segment.\n The length of the normal is the distance between the endpoints.", - &["_self"], - ) - .register_documented( - "scaled_right_normal", - |_self: Ref| { - let output: Val = { - { - let output: Val = bevy::math::primitives::Segment2d::scaled_right_normal( - &_self, - ) - .into(); - output - } - }; - output - }, - " Compute the non-normalized clockwise normal on the right-hand side of the line segment.\n The length of the normal is the distance between the endpoints.", - &["_self"], - ) - .register_documented( - "translated", - | - _self: Ref, - translation: Val| - { - let output: Val = { - { - let output: Val = bevy::math::primitives::Segment2d::translated( - &_self, - translation.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Compute the segment translated by the given vector.", - &["_self", "translation"], - ); - let registry = world - .get_resource_or_init::(); - let mut registry = registry.write(); - registry - .register_type_data::< - bevy::math::primitives::Segment2d, - bevy_mod_scripting_core::bindings::MarkAsGenerated, - >(); - } - pub(crate) fn register_triangle_2_d_functions(world: &mut bevy::ecs::world::World) { - bevy_mod_scripting_core::bindings::function::namespace::NamespaceBuilder::< - bevy::math::primitives::Triangle2d, - >::new(world) - .register_documented( - "clone", - |_self: Ref| { - let output: Val = { - { - let output: Val = ::clone( - &_self, - ) - .into(); - output - } - }; - output - }, - "", - &["_self"], - ) - .register_documented( - "eq", - | - _self: Ref, - other: Ref| - { - let output: bool = { - { - let output: bool = >::eq(&_self, &other) - .into(); - output - } - }; - output - }, - "", - &["_self", "other"], - ) - .register_documented( - "is_acute", - |_self: Ref| { - let output: bool = { - { - let output: bool = bevy::math::primitives::Triangle2d::is_acute( - &_self, - ) - .into(); - output - } - }; - output - }, - " Checks if the triangle is acute, meaning all angles are less than 90 degrees", - &["_self"], - ) - .register_documented( - "is_degenerate", - |_self: Ref| { - let output: bool = { - { - let output: bool = bevy::math::primitives::Triangle2d::is_degenerate( - &_self, - ) - .into(); - output - } - }; - output - }, - " Checks if the triangle is degenerate, meaning it has zero area.\n A triangle is degenerate if the cross product of the vectors `ab` and `ac` has a length less than `10e-7`.\n This indicates that the three vertices are collinear or nearly collinear.", - &["_self"], - ) - .register_documented( - "is_obtuse", - |_self: Ref| { - let output: bool = { - { - let output: bool = bevy::math::primitives::Triangle2d::is_obtuse( - &_self, - ) - .into(); - output - } - }; - output - }, - " Checks if the triangle is obtuse, meaning one angle is greater than 90 degrees", - &["_self"], - ) - .register_documented( - "new", - | - a: Val, - b: Val, - c: Val| - { - let output: Val = { - { - let output: Val = bevy::math::primitives::Triangle2d::new( - a.into_inner(), - b.into_inner(), - c.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Create a new `Triangle2d` from points `a`, `b`, and `c`", - &["a", "b", "c"], - ) - .register_documented( - "reverse", - |mut _self: Mut| { - let output: () = { - { - let output: () = bevy::math::primitives::Triangle2d::reverse( - &mut _self, - ) - .into(); - output - } - }; - output - }, - " Reverse the [`WindingOrder`] of the triangle\n by swapping the first and last vertices.", - &["_self"], - ) - .register_documented( - "reversed", - |_self: Val| { - let output: Val = { - { - let output: Val = bevy::math::primitives::Triangle2d::reversed( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - " This triangle but reversed.", - &["_self"], - ); - let registry = world - .get_resource_or_init::(); - let mut registry = registry.write(); - registry - .register_type_data::< - bevy::math::primitives::Triangle2d, - bevy_mod_scripting_core::bindings::MarkAsGenerated, - >(); - } - pub(crate) fn register_aabb_3_d_functions(world: &mut bevy::ecs::world::World) { - bevy_mod_scripting_core::bindings::function::namespace::NamespaceBuilder::< - bevy::math::bounding::Aabb3d, - >::new(world) - .register_documented( - "bounding_sphere", - |_self: Ref| { - let output: Val = { - { - let output: Val = bevy::math::bounding::Aabb3d::bounding_sphere( - &_self, - ) - .into(); - output - } - }; - output - }, - " Computes the smallest [`BoundingSphere`] containing this [`Aabb3d`].", - &["_self"], - ) - .register_documented( - "clone", - |_self: Ref| { - let output: Val = { - { - let output: Val = ::clone( - &_self, - ) - .into(); - output - } - }; - output - }, - "", - &["_self"], - ) - .register_documented( - "eq", - | - _self: Ref, - other: Ref| - { - let output: bool = { - { - let output: bool = >::eq(&_self, &other) - .into(); - output - } - }; - output - }, - "", - &["_self", "other"], - ); - let registry = world - .get_resource_or_init::(); - let mut registry = registry.write(); - registry - .register_type_data::< - bevy::math::bounding::Aabb3d, - bevy_mod_scripting_core::bindings::MarkAsGenerated, - >(); - } - pub(crate) fn register_bounding_sphere_functions( - world: &mut bevy::ecs::world::World, - ) { - bevy_mod_scripting_core::bindings::function::namespace::NamespaceBuilder::< - bevy::math::bounding::BoundingSphere, - >::new(world) - .register_documented( - "aabb_3d", - |_self: Ref| { - let output: Val = { - { - let output: Val = bevy::math::bounding::BoundingSphere::aabb_3d( - &_self, - ) - .into(); - output - } - }; - output - }, - " Computes the smallest [`Aabb3d`] containing this [`BoundingSphere`].", - &["_self"], - ) - .register_documented( - "clone", - |_self: Ref| { - let output: Val = { - { - let output: Val = ::clone( - &_self, - ) - .into(); - output - } - }; - output - }, - "", - &["_self"], - ) - .register_documented( - "eq", - | - _self: Ref, - other: Ref| - { - let output: bool = { - { - let output: bool = >::eq(&_self, &other) - .into(); - output - } - }; - output - }, - "", - &["_self", "other"], - ) - .register_documented( - "radius", - |_self: Ref| { - let output: f32 = { - { - let output: f32 = bevy::math::bounding::BoundingSphere::radius( - &_self, - ) - .into(); - output - } - }; - output - }, - " Get the radius of the bounding sphere", - &["_self"], - ); - let registry = world - .get_resource_or_init::(); - let mut registry = registry.write(); - registry - .register_type_data::< - bevy::math::bounding::BoundingSphere, - bevy_mod_scripting_core::bindings::MarkAsGenerated, - >(); - } - pub(crate) fn register_sphere_functions(world: &mut bevy::ecs::world::World) { - bevy_mod_scripting_core::bindings::function::namespace::NamespaceBuilder::< - bevy::math::primitives::Sphere, - >::new(world) - .register_documented( - "clone", - |_self: Ref| { - let output: Val = { - { - let output: Val = ::clone( - &_self, - ) - .into(); - output - } - }; - output - }, - "", - &["_self"], - ) - .register_documented( - "closest_point", - | - _self: Ref, - point: Val| - { - let output: Val = { - { - let output: Val = bevy::math::primitives::Sphere::closest_point( - &_self, - point.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Finds the point on the sphere that is closest to the given `point`.\n If the point is outside the sphere, the returned point will be on the surface of the sphere.\n Otherwise, it will be inside the sphere and returned as is.", - &["_self", "point"], - ) - .register_documented( - "diameter", - |_self: Ref| { - let output: f32 = { - { - let output: f32 = bevy::math::primitives::Sphere::diameter( - &_self, - ) - .into(); - output - } - }; - output - }, - " Get the diameter of the sphere", - &["_self"], - ) - .register_documented( - "eq", - | - _self: Ref, - other: Ref| - { - let output: bool = { - { - let output: bool = >::eq(&_self, &other) - .into(); - output - } - }; - output - }, - "", - &["_self", "other"], - ) - .register_documented( - "new", - |radius: f32| { - let output: Val = { - { - let output: Val = bevy::math::primitives::Sphere::new( - radius, - ) - .into(); - output - } - }; - output - }, - " Create a new [`Sphere`] from a `radius`", - &["radius"], - ); - let registry = world - .get_resource_or_init::(); - let mut registry = registry.write(); - registry - .register_type_data::< - bevy::math::primitives::Sphere, - bevy_mod_scripting_core::bindings::MarkAsGenerated, - >(); - } - pub(crate) fn register_cuboid_functions(world: &mut bevy::ecs::world::World) { - bevy_mod_scripting_core::bindings::function::namespace::NamespaceBuilder::< - bevy::math::primitives::Cuboid, - >::new(world) - .register_documented( - "clone", - |_self: Ref| { - let output: Val = { - { - let output: Val = ::clone( - &_self, - ) - .into(); - output - } - }; - output - }, - "", - &["_self"], - ) - .register_documented( - "closest_point", - | - _self: Ref, - point: Val| - { - let output: Val = { - { - let output: Val = bevy::math::primitives::Cuboid::closest_point( - &_self, - point.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Finds the point on the cuboid that is closest to the given `point`.\n If the point is outside the cuboid, the returned point will be on the surface of the cuboid.\n Otherwise, it will be inside the cuboid and returned as is.", - &["_self", "point"], - ) - .register_documented( - "eq", - | - _self: Ref, - other: Ref| - { - let output: bool = { - { - let output: bool = >::eq(&_self, &other) - .into(); - output - } - }; - output - }, - "", - &["_self", "other"], - ) - .register_documented( - "from_corners", - | - point1: Val, - point2: Val| - { - let output: Val = { - { - let output: Val = bevy::math::primitives::Cuboid::from_corners( - point1.into_inner(), - point2.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Create a new `Cuboid` from two corner points", - &["point1", "point2"], - ) - .register_documented( - "from_length", - |length: f32| { - let output: Val = { - { - let output: Val = bevy::math::primitives::Cuboid::from_length( - length, - ) - .into(); - output - } - }; - output - }, - " Create a `Cuboid` from a single length.\n The resulting `Cuboid` will be the same size in every direction.", - &["length"], - ) - .register_documented( - "from_size", - |size: Val| { - let output: Val = { - { - let output: Val = bevy::math::primitives::Cuboid::from_size( - size.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Create a new `Cuboid` from a given full size", - &["size"], - ) - .register_documented( - "new", - |x_length: f32, y_length: f32, z_length: f32| { - let output: Val = { - { - let output: Val = bevy::math::primitives::Cuboid::new( - x_length, - y_length, - z_length, - ) - .into(); - output - } - }; - output - }, - " Create a new `Cuboid` from a full x, y, and z length", - &["x_length", "y_length", "z_length"], - ) - .register_documented( - "size", - |_self: Ref| { - let output: Val = { - { - let output: Val = bevy::math::primitives::Cuboid::size( - &_self, - ) - .into(); - output - } - }; - output - }, - " Get the size of the cuboid", - &["_self"], - ); - let registry = world - .get_resource_or_init::(); - let mut registry = registry.write(); - registry - .register_type_data::< - bevy::math::primitives::Cuboid, - bevy_mod_scripting_core::bindings::MarkAsGenerated, - >(); - } - pub(crate) fn register_cylinder_functions(world: &mut bevy::ecs::world::World) { - bevy_mod_scripting_core::bindings::function::namespace::NamespaceBuilder::< - bevy::math::primitives::Cylinder, - >::new(world) - .register_documented( - "base", - |_self: Ref| { - let output: Val = { - { - let output: Val = bevy::math::primitives::Cylinder::base( - &_self, - ) - .into(); - output - } - }; - output - }, - " Get the base of the cylinder as a [`Circle`]", - &["_self"], - ) - .register_documented( - "base_area", - |_self: Ref| { - let output: f32 = { - { - let output: f32 = bevy::math::primitives::Cylinder::base_area( - &_self, - ) - .into(); - output - } - }; - output - }, - " Get the surface area of one base of the cylinder", - &["_self"], - ) - .register_documented( - "clone", - |_self: Ref| { - let output: Val = { - { - let output: Val = ::clone( - &_self, - ) - .into(); - output - } - }; - output - }, - "", - &["_self"], - ) - .register_documented( - "eq", - | - _self: Ref, - other: Ref| - { - let output: bool = { - { - let output: bool = >::eq(&_self, &other) - .into(); - output - } - }; - output - }, - "", - &["_self", "other"], - ) - .register_documented( - "lateral_area", - |_self: Ref| { - let output: f32 = { - { - let output: f32 = bevy::math::primitives::Cylinder::lateral_area( - &_self, - ) - .into(); - output - } - }; - output - }, - " Get the surface area of the side of the cylinder,\n also known as the lateral area", - &["_self"], - ) - .register_documented( - "new", - |radius: f32, height: f32| { - let output: Val = { - { - let output: Val = bevy::math::primitives::Cylinder::new( - radius, - height, - ) - .into(); - output - } - }; - output - }, - " Create a new `Cylinder` from a radius and full height", - &["radius", "height"], - ); - let registry = world - .get_resource_or_init::(); - let mut registry = registry.write(); - registry - .register_type_data::< - bevy::math::primitives::Cylinder, - bevy_mod_scripting_core::bindings::MarkAsGenerated, - >(); - } - pub(crate) fn register_capsule_3_d_functions(world: &mut bevy::ecs::world::World) { - bevy_mod_scripting_core::bindings::function::namespace::NamespaceBuilder::< - bevy::math::primitives::Capsule3d, - >::new(world) - .register_documented( - "clone", - |_self: Ref| { - let output: Val = { - { - let output: Val = ::clone( - &_self, - ) - .into(); - output - } - }; - output - }, - "", - &["_self"], - ) - .register_documented( - "eq", - | - _self: Ref, - other: Ref| - { - let output: bool = { - { - let output: bool = >::eq(&_self, &other) - .into(); - output - } - }; - output - }, - "", - &["_self", "other"], - ) - .register_documented( - "new", - |radius: f32, length: f32| { - let output: Val = { - { - let output: Val = bevy::math::primitives::Capsule3d::new( - radius, - length, - ) - .into(); - output - } - }; - output - }, - " Create a new `Capsule3d` from a radius and length", - &["radius", "length"], - ) - .register_documented( - "to_cylinder", - |_self: Ref| { - let output: Val = { - { - let output: Val = bevy::math::primitives::Capsule3d::to_cylinder( - &_self, - ) - .into(); - output - } - }; - output - }, - " Get the part connecting the hemispherical ends\n of the capsule as a [`Cylinder`]", - &["_self"], - ); - let registry = world - .get_resource_or_init::(); - let mut registry = registry.write(); - registry - .register_type_data::< - bevy::math::primitives::Capsule3d, - bevy_mod_scripting_core::bindings::MarkAsGenerated, - >(); - } - pub(crate) fn register_cone_functions(world: &mut bevy::ecs::world::World) { - bevy_mod_scripting_core::bindings::function::namespace::NamespaceBuilder::< - bevy::math::primitives::Cone, - >::new(world) - .register_documented( - "base", - |_self: Ref| { - let output: Val = { - { - let output: Val = bevy::math::primitives::Cone::base( - &_self, - ) - .into(); - output - } - }; - output - }, - " Get the base of the cone as a [`Circle`]", - &["_self"], - ) - .register_documented( - "base_area", - |_self: Ref| { - let output: f32 = { - { - let output: f32 = bevy::math::primitives::Cone::base_area( - &_self, - ) - .into(); - output - } - }; - output - }, - " Get the surface area of the base of the cone", - &["_self"], - ) - .register_documented( - "clone", - |_self: Ref| { - let output: Val = { - { - let output: Val = ::clone( - &_self, - ) - .into(); - output - } - }; - output - }, - "", - &["_self"], - ) - .register_documented( - "eq", - | - _self: Ref, - other: Ref| - { - let output: bool = { - { - let output: bool = >::eq(&_self, &other) - .into(); - output - } - }; - output - }, - "", - &["_self", "other"], - ) - .register_documented( - "lateral_area", - |_self: Ref| { - let output: f32 = { - { - let output: f32 = bevy::math::primitives::Cone::lateral_area( - &_self, - ) - .into(); - output - } - }; - output - }, - " Get the surface area of the side of the cone,\n also known as the lateral area", - &["_self"], - ) - .register_documented( - "new", - |radius: f32, height: f32| { - let output: Val = { - { - let output: Val = bevy::math::primitives::Cone::new( - radius, - height, - ) - .into(); - output - } - }; - output - }, - " Create a new [`Cone`] from a radius and height.", - &["radius", "height"], - ) - .register_documented( - "slant_height", - |_self: Ref| { - let output: f32 = { - { - let output: f32 = bevy::math::primitives::Cone::slant_height( - &_self, - ) - .into(); - output - } - }; - output - }, - " Get the slant height of the cone, the length of the line segment\n connecting a point on the base to the apex", - &["_self"], - ); - let registry = world - .get_resource_or_init::(); - let mut registry = registry.write(); - registry - .register_type_data::< - bevy::math::primitives::Cone, - bevy_mod_scripting_core::bindings::MarkAsGenerated, - >(); - } - pub(crate) fn register_conical_frustum_functions( - world: &mut bevy::ecs::world::World, - ) { - bevy_mod_scripting_core::bindings::function::namespace::NamespaceBuilder::< - bevy::math::primitives::ConicalFrustum, - >::new(world) - .register_documented( - "clone", - |_self: Ref| { - let output: Val = { - { - let output: Val = ::clone( - &_self, - ) - .into(); - output - } - }; - output - }, - "", - &["_self"], - ) - .register_documented( - "eq", - | - _self: Ref, - other: Ref| - { - let output: bool = { - { - let output: bool = >::eq(&_self, &other) - .into(); - output - } - }; - output - }, - "", - &["_self", "other"], - ); - let registry = world - .get_resource_or_init::(); - let mut registry = registry.write(); - registry - .register_type_data::< - bevy::math::primitives::ConicalFrustum, - bevy_mod_scripting_core::bindings::MarkAsGenerated, - >(); - } - pub(crate) fn register_infinite_plane_3_d_functions( - world: &mut bevy::ecs::world::World, - ) { - bevy_mod_scripting_core::bindings::function::namespace::NamespaceBuilder::< - bevy::math::primitives::InfinitePlane3d, - >::new(world) - .register_documented( - "clone", - |_self: Ref| { - let output: Val = { - { - let output: Val = ::clone( - &_self, - ) - .into(); - output - } - }; - output - }, - "", - &["_self"], - ) - .register_documented( - "eq", - | - _self: Ref, - other: Ref| - { - let output: bool = { - { - let output: bool = >::eq(&_self, &other) - .into(); - output - } - }; - output - }, - "", - &["_self", "other"], - ) - .register_documented( - "isometry_from_xy", - | - _self: Ref, - origin: Val| - { - let output: Val = { - { - let output: Val = bevy::math::primitives::InfinitePlane3d::isometry_from_xy( - &_self, - origin.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Computes an [`Isometry3d`] which transforms points from the XY-plane to this plane with the\n given `origin`.\n ## Guarantees\n * the transformation is a [congruence] meaning it will preserve all distances and angles of\n the transformed geometry\n * uses the least rotation possible to transform the geometry\n * if two geometries are transformed with the same isometry, then the relations between\n them, like distances, are also preserved\n * compared to projections, the transformation is lossless (up to floating point errors)\n reversible\n ## Non-Guarantees\n * the rotation used is generally not unique\n * the orientation of the transformed geometry in the XY plane might be arbitrary, to\n enforce some kind of alignment the user has to use an extra transformation ontop of this\n one\n See [`isometries_xy`] for example usescases.\n [congruence]: https://en.wikipedia.org/wiki/Congruence_(geometry)\n [`isometries_xy`]: `InfinitePlane3d::isometries_xy`", - &["_self", "origin"], - ) - .register_documented( - "isometry_into_xy", - | - _self: Ref, - origin: Val| - { - let output: Val = { - { - let output: Val = bevy::math::primitives::InfinitePlane3d::isometry_into_xy( - &_self, - origin.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Computes an [`Isometry3d`] which transforms points from the plane in 3D space with the given\n `origin` to the XY-plane.\n ## Guarantees\n * the transformation is a [congruence] meaning it will preserve all distances and angles of\n the transformed geometry\n * uses the least rotation possible to transform the geometry\n * if two geometries are transformed with the same isometry, then the relations between\n them, like distances, are also preserved\n * compared to projections, the transformation is lossless (up to floating point errors)\n reversible\n ## Non-Guarantees\n * the rotation used is generally not unique\n * the orientation of the transformed geometry in the XY plane might be arbitrary, to\n enforce some kind of alignment the user has to use an extra transformation ontop of this\n one\n See [`isometries_xy`] for example usescases.\n [congruence]: https://en.wikipedia.org/wiki/Congruence_(geometry)\n [`isometries_xy`]: `InfinitePlane3d::isometries_xy`", - &["_self", "origin"], - ); - let registry = world - .get_resource_or_init::(); - let mut registry = registry.write(); - registry - .register_type_data::< - bevy::math::primitives::InfinitePlane3d, - bevy_mod_scripting_core::bindings::MarkAsGenerated, - >(); - } - pub(crate) fn register_line_3_d_functions(world: &mut bevy::ecs::world::World) { - bevy_mod_scripting_core::bindings::function::namespace::NamespaceBuilder::< - bevy::math::primitives::Line3d, - >::new(world) - .register_documented( - "clone", - |_self: Ref| { - let output: Val = { - { - let output: Val = ::clone( - &_self, - ) - .into(); - output - } - }; - output - }, - "", - &["_self"], - ) - .register_documented( - "eq", - | - _self: Ref, - other: Ref| - { - let output: bool = { - { - let output: bool = >::eq(&_self, &other) - .into(); - output - } - }; - output - }, - "", - &["_self", "other"], - ); - let registry = world - .get_resource_or_init::(); - let mut registry = registry.write(); - registry - .register_type_data::< - bevy::math::primitives::Line3d, - bevy_mod_scripting_core::bindings::MarkAsGenerated, - >(); - } - pub(crate) fn register_segment_3_d_functions(world: &mut bevy::ecs::world::World) { - bevy_mod_scripting_core::bindings::function::namespace::NamespaceBuilder::< - bevy::math::primitives::Segment3d, - >::new(world) - .register_documented( - "center", - |_self: Ref| { - let output: Val = { - { - let output: Val = bevy::math::primitives::Segment3d::center( - &_self, - ) - .into(); - output - } - }; - output - }, - " Compute the midpoint between the two endpoints of the line segment.", - &["_self"], - ) - .register_documented( - "centered", - |_self: Ref| { - let output: Val = { - { - let output: Val = bevy::math::primitives::Segment3d::centered( - &_self, - ) - .into(); - output - } - }; - output - }, - " Compute the segment with its center at the origin, keeping the same direction and length.", - &["_self"], - ) - .register_documented( - "clone", - |_self: Ref| { - let output: Val = { - { - let output: Val = ::clone( - &_self, - ) - .into(); - output - } - }; - output - }, - "", - &["_self"], - ) - .register_documented( - "direction", - |_self: Ref| { - let output: Val = { - { - let output: Val = bevy::math::primitives::Segment3d::direction( - &_self, - ) - .into(); - output - } - }; - output - }, - " Compute the normalized direction pointing from the first endpoint to the second endpoint.\n For the non-panicking version, see [`Segment3d::try_direction`].\n # Panics\n Panics if a valid direction could not be computed, for example when the endpoints are coincident, NaN, or infinite.", - &["_self"], - ) - .register_documented( - "eq", - | - _self: Ref, - other: Ref| - { - let output: bool = { - { - let output: bool = >::eq(&_self, &other) - .into(); - output - } - }; - output - }, - "", - &["_self", "other"], - ) - .register_documented( - "from_direction_and_length", - |direction: Val, length: f32| { - let output: Val = { - { - let output: Val = bevy::math::primitives::Segment3d::from_direction_and_length( - direction.into_inner(), - length, - ) - .into(); - output - } - }; - output - }, - " Create a new `Segment3d` centered at the origin with the given direction and length.\n The endpoints will be at `-direction * length / 2.0` and `direction * length / 2.0`.", - &["direction", "length"], - ) - .register_documented( - "from_ray_and_length", - |ray: Val, length: f32| { - let output: Val = { - { - let output: Val = bevy::math::primitives::Segment3d::from_ray_and_length( - ray.into_inner(), - length, - ) - .into(); - output - } - }; - output - }, - " Create a new `Segment3d` starting from the origin of the given `ray`,\n going in the direction of the ray for the given `length`.\n The endpoints will be at `ray.origin` and `ray.origin + length * ray.direction`.", - &["ray", "length"], - ) - .register_documented( - "from_scaled_direction", - |scaled_direction: Val| { - let output: Val = { - { - let output: Val = bevy::math::primitives::Segment3d::from_scaled_direction( - scaled_direction.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Create a new `Segment3d` centered at the origin from a vector representing\n the direction and length of the line segment.\n The endpoints will be at `-scaled_direction / 2.0` and `scaled_direction / 2.0`.", - &["scaled_direction"], - ) - .register_documented( - "length", - |_self: Ref| { - let output: f32 = { - { - let output: f32 = bevy::math::primitives::Segment3d::length( - &_self, - ) - .into(); - output - } - }; - output - }, - " Compute the length of the line segment.", - &["_self"], - ) - .register_documented( - "length_squared", - |_self: Ref| { - let output: f32 = { - { - let output: f32 = bevy::math::primitives::Segment3d::length_squared( - &_self, - ) - .into(); - output - } - }; - output - }, - " Compute the squared length of the line segment.", - &["_self"], - ) - .register_documented( - "new", - | - point1: Val, - point2: Val| - { - let output: Val = { - { - let output: Val = bevy::math::primitives::Segment3d::new( - point1.into_inner(), - point2.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Create a new `Segment3d` from its endpoints.", - &["point1", "point2"], - ) - .register_documented( - "point1", - |_self: Ref| { - let output: Val = { - { - let output: Val = bevy::math::primitives::Segment3d::point1( - &_self, - ) - .into(); - output - } - }; - output - }, - " Get the position of the first endpoint of the line segment.", - &["_self"], - ) - .register_documented( - "point2", - |_self: Ref| { - let output: Val = { - { - let output: Val = bevy::math::primitives::Segment3d::point2( - &_self, - ) - .into(); - output - } - }; - output - }, - " Get the position of the second endpoint of the line segment.", - &["_self"], - ) - .register_documented( - "resized", - |_self: Ref, length: f32| { - let output: Val = { - { - let output: Val = bevy::math::primitives::Segment3d::resized( - &_self, - length, - ) - .into(); - output - } - }; - output - }, - " Compute the segment with a new length, keeping the same direction and center.", - &["_self", "length"], - ) - .register_documented( - "reverse", - |mut _self: Mut| { - let output: () = { - { - let output: () = bevy::math::primitives::Segment3d::reverse( - &mut _self, - ) - .into(); - output - } - }; - output - }, - " Reverses the direction of the line segment by swapping the endpoints.", - &["_self"], - ) - .register_documented( - "reversed", - |_self: Val| { - let output: Val = { - { - let output: Val = bevy::math::primitives::Segment3d::reversed( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns the line segment with its direction reversed by swapping the endpoints.", - &["_self"], - ) - .register_documented( - "rotated", - | - _self: Ref, - rotation: Val| - { - let output: Val = { - { - let output: Val = bevy::math::primitives::Segment3d::rotated( - &_self, - rotation.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Compute the segment rotated around the origin by the given rotation.", - &["_self", "rotation"], - ) - .register_documented( - "rotated_around", - | - _self: Ref, - rotation: Val, - point: Val| - { - let output: Val = { - { - let output: Val = bevy::math::primitives::Segment3d::rotated_around( - &_self, - rotation.into_inner(), - point.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Compute the segment rotated around the given point by the given rotation.", - &["_self", "rotation", "point"], - ) - .register_documented( - "rotated_around_center", - | - _self: Ref, - rotation: Val| - { - let output: Val = { - { - let output: Val = bevy::math::primitives::Segment3d::rotated_around_center( - &_self, - rotation.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Compute the segment rotated around its own center.", - &["_self", "rotation"], - ) - .register_documented( - "scaled_direction", - |_self: Ref| { - let output: Val = { - { - let output: Val = bevy::math::primitives::Segment3d::scaled_direction( - &_self, - ) - .into(); - output - } - }; - output - }, - " Compute the vector from the first endpoint to the second endpoint.", - &["_self"], - ) - .register_documented( - "translated", - | - _self: Ref, - translation: Val| - { - let output: Val = { - { - let output: Val = bevy::math::primitives::Segment3d::translated( - &_self, - translation.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Compute the segment translated by the given vector.", - &["_self", "translation"], - ); - let registry = world - .get_resource_or_init::(); - let mut registry = registry.write(); - registry - .register_type_data::< - bevy::math::primitives::Segment3d, - bevy_mod_scripting_core::bindings::MarkAsGenerated, - >(); - } - pub(crate) fn register_torus_functions(world: &mut bevy::ecs::world::World) { - bevy_mod_scripting_core::bindings::function::namespace::NamespaceBuilder::< - bevy::math::primitives::Torus, - >::new(world) - .register_documented( - "clone", - |_self: Ref| { - let output: Val = { - { - let output: Val = ::clone( - &_self, - ) - .into(); - output - } - }; - output - }, - "", - &["_self"], - ) - .register_documented( - "eq", - | - _self: Ref, - other: Ref| - { - let output: bool = { - { - let output: bool = >::eq(&_self, &other) - .into(); - output - } - }; - output - }, - "", - &["_self", "other"], - ) - .register_documented( - "inner_radius", - |_self: Ref| { - let output: f32 = { - { - let output: f32 = bevy::math::primitives::Torus::inner_radius( - &_self, - ) - .into(); - output - } - }; - output - }, - " Get the inner radius of the torus.\n For a ring torus, this corresponds to the radius of the hole,\n or `major_radius - minor_radius`", - &["_self"], - ) - .register_documented( - "new", - |inner_radius: f32, outer_radius: f32| { - let output: Val = { - { - let output: Val = bevy::math::primitives::Torus::new( - inner_radius, - outer_radius, - ) - .into(); - output - } - }; - output - }, - " Create a new `Torus` from an inner and outer radius.\n The inner radius is the radius of the hole, and the outer radius\n is the radius of the entire object", - &["inner_radius", "outer_radius"], - ) - .register_documented( - "outer_radius", - |_self: Ref| { - let output: f32 = { - { - let output: f32 = bevy::math::primitives::Torus::outer_radius( - &_self, - ) - .into(); - output - } - }; - output - }, - " Get the outer radius of the torus.\n This corresponds to the overall radius of the entire object,\n or `major_radius + minor_radius`", - &["_self"], - ); - let registry = world - .get_resource_or_init::(); - let mut registry = registry.write(); - registry - .register_type_data::< - bevy::math::primitives::Torus, - bevy_mod_scripting_core::bindings::MarkAsGenerated, - >(); - } - pub(crate) fn register_triangle_3_d_functions(world: &mut bevy::ecs::world::World) { - bevy_mod_scripting_core::bindings::function::namespace::NamespaceBuilder::< - bevy::math::primitives::Triangle3d, - >::new(world) - .register_documented( - "centroid", - |_self: Ref| { - let output: Val = { - { - let output: Val = bevy::math::primitives::Triangle3d::centroid( - &_self, - ) - .into(); - output - } - }; - output - }, - " Get the centroid of the triangle.\n This function finds the geometric center of the triangle by averaging the vertices:\n `centroid = (a + b + c) / 3`.", - &["_self"], - ) - .register_documented( - "circumcenter", - |_self: Ref| { - let output: Val = { - { - let output: Val = bevy::math::primitives::Triangle3d::circumcenter( - &_self, - ) - .into(); - output - } - }; - output - }, - " Get the circumcenter of the triangle.", - &["_self"], - ) - .register_documented( - "clone", - |_self: Ref| { - let output: Val = { - { - let output: Val = ::clone( - &_self, - ) - .into(); - output - } - }; - output - }, - "", - &["_self"], - ) - .register_documented( - "eq", - | - _self: Ref, - other: Ref| - { - let output: bool = { - { - let output: bool = >::eq(&_self, &other) - .into(); - output - } - }; - output - }, - "", - &["_self", "other"], - ) - .register_documented( - "is_acute", - |_self: Ref| { - let output: bool = { - { - let output: bool = bevy::math::primitives::Triangle3d::is_acute( - &_self, - ) - .into(); - output - } - }; - output - }, - " Checks if the triangle is acute, meaning all angles are less than 90 degrees", - &["_self"], - ) - .register_documented( - "is_degenerate", - |_self: Ref| { - let output: bool = { - { - let output: bool = bevy::math::primitives::Triangle3d::is_degenerate( - &_self, - ) - .into(); - output - } - }; - output - }, - " Checks if the triangle is degenerate, meaning it has zero area.\n A triangle is degenerate if the cross product of the vectors `ab` and `ac` has a length less than `10e-7`.\n This indicates that the three vertices are collinear or nearly collinear.", - &["_self"], - ) - .register_documented( - "is_obtuse", - |_self: Ref| { - let output: bool = { - { - let output: bool = bevy::math::primitives::Triangle3d::is_obtuse( - &_self, - ) - .into(); - output - } - }; - output - }, - " Checks if the triangle is obtuse, meaning one angle is greater than 90 degrees", - &["_self"], - ) - .register_documented( - "new", - | - a: Val, - b: Val, - c: Val| - { - let output: Val = { - { - let output: Val = bevy::math::primitives::Triangle3d::new( - a.into_inner(), - b.into_inner(), - c.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Create a new [`Triangle3d`] from points `a`, `b`, and `c`.", - &["a", "b", "c"], - ) - .register_documented( - "reverse", - |mut _self: Mut| { - let output: () = { - { - let output: () = bevy::math::primitives::Triangle3d::reverse( - &mut _self, - ) - .into(); - output - } - }; - output - }, - " Reverse the triangle by swapping the first and last vertices.", - &["_self"], - ) - .register_documented( - "reversed", - |_self: Val| { - let output: Val = { - { - let output: Val = bevy::math::primitives::Triangle3d::reversed( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - " This triangle but reversed.", - &["_self"], - ); - let registry = world - .get_resource_or_init::(); - let mut registry = registry.write(); - registry - .register_type_data::< - bevy::math::primitives::Triangle3d, - bevy_mod_scripting_core::bindings::MarkAsGenerated, - >(); - } - pub(crate) fn register_ray_cast_2_d_functions(world: &mut bevy::ecs::world::World) { - bevy_mod_scripting_core::bindings::function::namespace::NamespaceBuilder::< - bevy::math::bounding::RayCast2d, - >::new(world) - .register_documented( - "aabb_intersection_at", - | - _self: Ref, - aabb: Ref| - { - let output: ::core::option::Option = { - { - let output: ::core::option::Option = bevy::math::bounding::RayCast2d::aabb_intersection_at( - &_self, - &aabb, - ) - .into(); - output - } - }; - output - }, - " Get the distance of an intersection with an [`Aabb2d`], if any.", - &["_self", "aabb"], - ) - .register_documented( - "circle_intersection_at", - | - _self: Ref, - circle: Ref| - { - let output: ::core::option::Option = { - { - let output: ::core::option::Option = bevy::math::bounding::RayCast2d::circle_intersection_at( - &_self, - &circle, - ) - .into(); - output - } - }; - output - }, - " Get the distance of an intersection with a [`BoundingCircle`], if any.", - &["_self", "circle"], - ) - .register_documented( - "clone", - |_self: Ref| { - let output: Val = { - { - let output: Val = ::clone( - &_self, - ) - .into(); - output - } - }; - output - }, - "", - &["_self"], - ) - .register_documented( - "direction_recip", - |_self: Ref| { - let output: Val = { - { - let output: Val = bevy::math::bounding::RayCast2d::direction_recip( - &_self, - ) - .into(); - output - } - }; - output - }, - " Get the cached multiplicative inverse of the direction of the ray.", - &["_self"], - ) - .register_documented( - "from_ray", - |ray: Val, max: f32| { - let output: Val = { - { - let output: Val = bevy::math::bounding::RayCast2d::from_ray( - ray.into_inner(), - max, - ) - .into(); - output - } - }; - output - }, - " Construct a [`RayCast2d`] from a [`Ray2d`] and max distance.", - &["ray", "max"], - ) - .register_documented( - "new", - | - origin: Val, - direction: Val, - max: f32| - { - let output: Val = { - { - let output: Val = bevy::math::bounding::RayCast2d::new( - origin.into_inner(), - direction.into_inner(), - max, - ) - .into(); - output - } - }; - output - }, - " Construct a [`RayCast2d`] from an origin, [`Dir2`], and max distance.", - &["origin", "direction", "max"], - ); - let registry = world - .get_resource_or_init::(); - let mut registry = registry.write(); - registry - .register_type_data::< - bevy::math::bounding::RayCast2d, - bevy_mod_scripting_core::bindings::MarkAsGenerated, - >(); - } - pub(crate) fn register_aabb_cast_2_d_functions(world: &mut bevy::ecs::world::World) { - bevy_mod_scripting_core::bindings::function::namespace::NamespaceBuilder::< - bevy::math::bounding::AabbCast2d, - >::new(world) - .register_documented( - "aabb_collision_at", - | - _self: Ref, - aabb: Val| - { - let output: ::core::option::Option = { - { - let output: ::core::option::Option = bevy::math::bounding::AabbCast2d::aabb_collision_at( - &_self, - aabb.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Get the distance at which the [`Aabb2d`]s collide, if at all.", - &["_self", "aabb"], - ) - .register_documented( - "clone", - |_self: Ref| { - let output: Val = { - { - let output: Val = ::clone( - &_self, - ) - .into(); - output - } - }; - output - }, - "", - &["_self"], - ) - .register_documented( - "from_ray", - | - aabb: Val, - ray: Val, - max: f32| - { - let output: Val = { - { - let output: Val = bevy::math::bounding::AabbCast2d::from_ray( - aabb.into_inner(), - ray.into_inner(), - max, - ) - .into(); - output - } - }; - output - }, - " Construct an [`AabbCast2d`] from an [`Aabb2d`], [`Ray2d`], and max distance.", - &["aabb", "ray", "max"], - ) - .register_documented( - "new", - | - aabb: Val, - origin: Val, - direction: Val, - max: f32| - { - let output: Val = { - { - let output: Val = bevy::math::bounding::AabbCast2d::new( - aabb.into_inner(), - origin.into_inner(), - direction.into_inner(), - max, - ) - .into(); - output - } - }; - output - }, - " Construct an [`AabbCast2d`] from an [`Aabb2d`], origin, [`Dir2`], and max distance.", - &["aabb", "origin", "direction", "max"], - ); - let registry = world - .get_resource_or_init::(); - let mut registry = registry.write(); - registry - .register_type_data::< - bevy::math::bounding::AabbCast2d, - bevy_mod_scripting_core::bindings::MarkAsGenerated, - >(); - } - pub(crate) fn register_bounding_circle_cast_functions( - world: &mut bevy::ecs::world::World, - ) { - bevy_mod_scripting_core::bindings::function::namespace::NamespaceBuilder::< - bevy::math::bounding::BoundingCircleCast, - >::new(world) - .register_documented( - "circle_collision_at", - | - _self: Ref, - circle: Val| - { - let output: ::core::option::Option = { - { - let output: ::core::option::Option = bevy::math::bounding::BoundingCircleCast::circle_collision_at( - &_self, - circle.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Get the distance at which the [`BoundingCircle`]s collide, if at all.", - &["_self", "circle"], - ) - .register_documented( - "clone", - |_self: Ref| { - let output: Val = { - { - let output: Val = ::clone( - &_self, - ) - .into(); - output - } - }; - output - }, - "", - &["_self"], - ) - .register_documented( - "from_ray", - | - circle: Val, - ray: Val, - max: f32| - { - let output: Val = { - { - let output: Val = bevy::math::bounding::BoundingCircleCast::from_ray( - circle.into_inner(), - ray.into_inner(), - max, - ) - .into(); - output - } - }; - output - }, - " Construct a [`BoundingCircleCast`] from a [`BoundingCircle`], [`Ray2d`], and max distance.", - &["circle", "ray", "max"], - ) - .register_documented( - "new", - | - circle: Val, - origin: Val, - direction: Val, - max: f32| - { - let output: Val = { - { - let output: Val = bevy::math::bounding::BoundingCircleCast::new( - circle.into_inner(), - origin.into_inner(), - direction.into_inner(), - max, - ) - .into(); - output - } - }; - output - }, - " Construct a [`BoundingCircleCast`] from a [`BoundingCircle`], origin, [`Dir2`], and max distance.", - &["circle", "origin", "direction", "max"], - ); - let registry = world - .get_resource_or_init::(); - let mut registry = registry.write(); - registry - .register_type_data::< - bevy::math::bounding::BoundingCircleCast, - bevy_mod_scripting_core::bindings::MarkAsGenerated, - >(); - } - pub(crate) fn register_ray_cast_3_d_functions(world: &mut bevy::ecs::world::World) { - bevy_mod_scripting_core::bindings::function::namespace::NamespaceBuilder::< - bevy::math::bounding::RayCast3d, - >::new(world) - .register_documented( - "aabb_intersection_at", - | - _self: Ref, - aabb: Ref| - { - let output: ::core::option::Option = { - { - let output: ::core::option::Option = bevy::math::bounding::RayCast3d::aabb_intersection_at( - &_self, - &aabb, - ) - .into(); - output - } - }; - output - }, - " Get the distance of an intersection with an [`Aabb3d`], if any.", - &["_self", "aabb"], - ) - .register_documented( - "clone", - |_self: Ref| { - let output: Val = { - { - let output: Val = ::clone( - &_self, - ) - .into(); - output - } - }; - output - }, - "", - &["_self"], - ) - .register_documented( - "direction_recip", - |_self: Ref| { - let output: Val = { - { - let output: Val = bevy::math::bounding::RayCast3d::direction_recip( - &_self, - ) - .into(); - output - } - }; - output - }, - " Get the cached multiplicative inverse of the direction of the ray.", - &["_self"], - ) - .register_documented( - "from_ray", - |ray: Val, max: f32| { - let output: Val = { - { - let output: Val = bevy::math::bounding::RayCast3d::from_ray( - ray.into_inner(), - max, - ) - .into(); - output - } - }; - output - }, - " Construct a [`RayCast3d`] from a [`Ray3d`] and max distance.", - &["ray", "max"], - ) - .register_documented( - "sphere_intersection_at", - | - _self: Ref, - sphere: Ref| - { - let output: ::core::option::Option = { - { - let output: ::core::option::Option = bevy::math::bounding::RayCast3d::sphere_intersection_at( - &_self, - &sphere, - ) - .into(); - output - } - }; - output - }, - " Get the distance of an intersection with a [`BoundingSphere`], if any.", - &["_self", "sphere"], - ); - let registry = world - .get_resource_or_init::(); - let mut registry = registry.write(); - registry - .register_type_data::< - bevy::math::bounding::RayCast3d, - bevy_mod_scripting_core::bindings::MarkAsGenerated, - >(); - } - pub(crate) fn register_aabb_cast_3_d_functions(world: &mut bevy::ecs::world::World) { - bevy_mod_scripting_core::bindings::function::namespace::NamespaceBuilder::< - bevy::math::bounding::AabbCast3d, - >::new(world) - .register_documented( - "aabb_collision_at", - | - _self: Ref, - aabb: Val| - { - let output: ::core::option::Option = { - { - let output: ::core::option::Option = bevy::math::bounding::AabbCast3d::aabb_collision_at( - &_self, - aabb.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Get the distance at which the [`Aabb3d`]s collide, if at all.", - &["_self", "aabb"], - ) - .register_documented( - "clone", - |_self: Ref| { - let output: Val = { - { - let output: Val = ::clone( - &_self, - ) - .into(); - output - } - }; - output - }, - "", - &["_self"], - ) - .register_documented( - "from_ray", - | - aabb: Val, - ray: Val, - max: f32| - { - let output: Val = { - { - let output: Val = bevy::math::bounding::AabbCast3d::from_ray( - aabb.into_inner(), - ray.into_inner(), - max, - ) - .into(); - output - } - }; - output - }, - " Construct an [`AabbCast3d`] from an [`Aabb3d`], [`Ray3d`], and max distance.", - &["aabb", "ray", "max"], - ); - let registry = world - .get_resource_or_init::(); - let mut registry = registry.write(); - registry - .register_type_data::< - bevy::math::bounding::AabbCast3d, - bevy_mod_scripting_core::bindings::MarkAsGenerated, - >(); - } - pub(crate) fn register_bounding_sphere_cast_functions( - world: &mut bevy::ecs::world::World, - ) { - bevy_mod_scripting_core::bindings::function::namespace::NamespaceBuilder::< - bevy::math::bounding::BoundingSphereCast, - >::new(world) - .register_documented( - "clone", - |_self: Ref| { - let output: Val = { - { - let output: Val = ::clone( - &_self, - ) - .into(); - output - } - }; - output - }, - "", - &["_self"], - ) - .register_documented( - "from_ray", - | - sphere: Val, - ray: Val, - max: f32| - { - let output: Val = { - { - let output: Val = bevy::math::bounding::BoundingSphereCast::from_ray( - sphere.into_inner(), - ray.into_inner(), - max, - ) - .into(); - output - } - }; - output - }, - " Construct a [`BoundingSphereCast`] from a [`BoundingSphere`], [`Ray3d`], and max distance.", - &["sphere", "ray", "max"], - ) - .register_documented( - "sphere_collision_at", - | - _self: Ref, - sphere: Val| - { - let output: ::core::option::Option = { - { - let output: ::core::option::Option = bevy::math::bounding::BoundingSphereCast::sphere_collision_at( - &_self, - sphere.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Get the distance at which the [`BoundingSphere`]s collide, if at all.", - &["_self", "sphere"], - ); - let registry = world - .get_resource_or_init::(); - let mut registry = registry.write(); - registry - .register_type_data::< - bevy::math::bounding::BoundingSphereCast, - bevy_mod_scripting_core::bindings::MarkAsGenerated, - >(); - } - pub(crate) fn register_interval_functions(world: &mut bevy::ecs::world::World) { - bevy_mod_scripting_core::bindings::function::namespace::NamespaceBuilder::< - bevy::math::curve::interval::Interval, - >::new(world) - .register_documented( - "clamp", - |_self: Val, value: f32| { - let output: f32 = { - { - let output: f32 = bevy::math::curve::interval::Interval::clamp( - _self.into_inner(), - value, - ) - .into(); - output - } - }; - output - }, - " Clamp the given `value` to lie within this interval.", - &["_self", "value"], - ) - .register_documented( - "clone", - |_self: Ref| { - let output: Val = { - { - let output: Val = ::clone( - &_self, - ) - .into(); - output - } - }; - output - }, - "", - &["_self"], - ) - .register_documented( - "contains", - |_self: Val, item: f32| { - let output: bool = { - { - let output: bool = bevy::math::curve::interval::Interval::contains( - _self.into_inner(), - item, - ) - .into(); - output - } - }; - output - }, - " Returns `true` if `item` is contained in this interval.", - &["_self", "item"], - ) - .register_documented( - "contains_interval", - | - _self: Val, - other: Val| - { - let output: bool = { - { - let output: bool = bevy::math::curve::interval::Interval::contains_interval( - _self.into_inner(), - other.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns `true` if the other interval is contained in this interval.\n This is non-strict: each interval will contain itself.", - &["_self", "other"], - ) - .register_documented( - "end", - |_self: Val| { - let output: f32 = { - { - let output: f32 = bevy::math::curve::interval::Interval::end( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Get the end of this interval.", - &["_self"], - ) - .register_documented( - "eq", - | - _self: Ref, - other: Ref| - { - let output: bool = { - { - let output: bool = >::eq(&_self, &other) - .into(); - output - } - }; - output - }, - "", - &["_self", "other"], - ) - .register_documented( - "has_finite_end", - |_self: Val| { - let output: bool = { - { - let output: bool = bevy::math::curve::interval::Interval::has_finite_end( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns `true` if this interval has a finite end.", - &["_self"], - ) - .register_documented( - "has_finite_start", - |_self: Val| { - let output: bool = { - { - let output: bool = bevy::math::curve::interval::Interval::has_finite_start( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns `true` if this interval has a finite start.", - &["_self"], - ) - .register_documented( - "is_bounded", - |_self: Val| { - let output: bool = { - { - let output: bool = bevy::math::curve::interval::Interval::is_bounded( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns `true` if this interval is bounded — that is, if both its start and end are finite.\n Equivalently, an interval is bounded if its length is finite.", - &["_self"], - ) - .register_documented( - "length", - |_self: Val| { - let output: f32 = { - { - let output: f32 = bevy::math::curve::interval::Interval::length( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Get the length of this interval. Note that the result may be infinite (`f32::INFINITY`).", - &["_self"], - ) - .register_documented( - "start", - |_self: Val| { - let output: f32 = { - { - let output: f32 = bevy::math::curve::interval::Interval::start( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Get the start of this interval.", - &["_self"], - ); - let registry = world - .get_resource_or_init::(); - let mut registry = registry.write(); - registry - .register_type_data::< - bevy::math::curve::interval::Interval, - bevy_mod_scripting_core::bindings::MarkAsGenerated, - >(); - } - pub(crate) fn register_float_ord_functions(world: &mut bevy::ecs::world::World) { - bevy_mod_scripting_core::bindings::function::namespace::NamespaceBuilder::< - bevy::math::FloatOrd, - >::new(world) - .register_documented( - "clone", - |_self: Ref| { - let output: Val = { - { - let output: Val = ::clone( - &_self, - ) - .into(); - output - } - }; - output - }, - "", - &["_self"], - ) - .register_documented( - "eq", - |_self: Ref, other: Ref| { - let output: bool = { - { - let output: bool = >::eq(&_self, &other) - .into(); - output - } - }; - output - }, - "", - &["_self", "other"], - ) - .register_documented( - "ge", - |_self: Ref, other: Ref| { - let output: bool = { - { - let output: bool = >::ge(&_self, &other) - .into(); - output - } - }; - output - }, - "", - &["_self", "other"], - ) - .register_documented( - "gt", - |_self: Ref, other: Ref| { - let output: bool = { - { - let output: bool = >::gt(&_self, &other) - .into(); - output - } - }; - output - }, - "", - &["_self", "other"], - ) - .register_documented( - "le", - |_self: Ref, other: Ref| { - let output: bool = { - { - let output: bool = >::le(&_self, &other) - .into(); - output - } - }; - output - }, - "", - &["_self", "other"], - ) - .register_documented( - "lt", - |_self: Ref, other: Ref| { - let output: bool = { - { - let output: bool = >::lt(&_self, &other) - .into(); - output - } - }; - output - }, - "", - &["_self", "other"], - ) - .register_documented( - "neg", - |_self: Val| { - let output: Val = { - { - let output: Val = ::neg( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - "", - &["_self"], - ); - let registry = world - .get_resource_or_init::(); - let mut registry = registry.write(); - registry - .register_type_data::< - bevy::math::FloatOrd, - bevy_mod_scripting_core::bindings::MarkAsGenerated, - >(); - } - pub(crate) fn register_plane_3_d_functions(world: &mut bevy::ecs::world::World) { - bevy_mod_scripting_core::bindings::function::namespace::NamespaceBuilder::< - bevy::math::primitives::Plane3d, - >::new(world) - .register_documented( - "clone", - |_self: Ref| { - let output: Val = { - { - let output: Val = ::clone( - &_self, - ) - .into(); - output - } - }; - output - }, - "", - &["_self"], - ) - .register_documented( - "eq", - | - _self: Ref, - other: Ref| - { - let output: bool = { - { - let output: bool = >::eq(&_self, &other) - .into(); - output - } - }; - output - }, - "", - &["_self", "other"], - ) - .register_documented( - "new", - | - normal: Val, - half_size: Val| - { - let output: Val = { - { - let output: Val = bevy::math::primitives::Plane3d::new( - normal.into_inner(), - half_size.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Create a new `Plane3d` from a normal and a half size\n # Panics\n Panics if the given `normal` is zero (or very close to zero), or non-finite.", - &["normal", "half_size"], - ); - let registry = world - .get_resource_or_init::(); - let mut registry = registry.write(); - registry - .register_type_data::< - bevy::math::primitives::Plane3d, - bevy_mod_scripting_core::bindings::MarkAsGenerated, - >(); - } - pub(crate) fn register_tetrahedron_functions(world: &mut bevy::ecs::world::World) { - bevy_mod_scripting_core::bindings::function::namespace::NamespaceBuilder::< - bevy::math::primitives::Tetrahedron, - >::new(world) - .register_documented( - "centroid", - |_self: Ref| { - let output: Val = { - { - let output: Val = bevy::math::primitives::Tetrahedron::centroid( - &_self, - ) - .into(); - output - } - }; - output - }, - " Get the centroid of the tetrahedron.\n This function finds the geometric center of the tetrahedron\n by averaging the vertices: `centroid = (a + b + c + d) / 4`.", - &["_self"], - ) - .register_documented( - "clone", - |_self: Ref| { - let output: Val = { - { - let output: Val = ::clone( - &_self, - ) - .into(); - output - } - }; - output - }, - "", - &["_self"], - ) - .register_documented( - "eq", - | - _self: Ref, - other: Ref| - { - let output: bool = { - { - let output: bool = >::eq(&_self, &other) - .into(); - output - } - }; - output - }, - "", - &["_self", "other"], - ) - .register_documented( - "new", - | - a: Val, - b: Val, - c: Val, - d: Val| - { - let output: Val = { - { - let output: Val = bevy::math::primitives::Tetrahedron::new( - a.into_inner(), - b.into_inner(), - c.into_inner(), - d.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Create a new [`Tetrahedron`] from points `a`, `b`, `c` and `d`.", - &["a", "b", "c", "d"], - ) - .register_documented( - "signed_volume", - |_self: Ref| { - let output: f32 = { - { - let output: f32 = bevy::math::primitives::Tetrahedron::signed_volume( - &_self, - ) - .into(); - output - } - }; - output - }, - " Get the signed volume of the tetrahedron.\n If it's negative, the normal vector of the face defined by\n the first three points using the right-hand rule points\n away from the fourth vertex.", - &["_self"], - ); - let registry = world - .get_resource_or_init::(); - let mut registry = registry.write(); - registry - .register_type_data::< - bevy::math::primitives::Tetrahedron, - bevy_mod_scripting_core::bindings::MarkAsGenerated, - >(); - } - pub(crate) fn register_ease_function_functions(world: &mut bevy::ecs::world::World) { - bevy_mod_scripting_core::bindings::function::namespace::NamespaceBuilder::< - bevy::math::curve::easing::EaseFunction, - >::new(world) - .register_documented( - "clone", - |_self: Ref| { - let output: Val = { - { - let output: Val = ::clone( - &_self, - ) - .into(); - output - } - }; - output - }, - "", - &["_self"], - ) - .register_documented( - "eq", - | - _self: Ref, - other: Ref| - { - let output: bool = { - { - let output: bool = >::eq(&_self, &other) - .into(); - output - } - }; - output - }, - "", - &["_self", "other"], - ); - let registry = world - .get_resource_or_init::(); - let mut registry = registry.write(); - registry - .register_type_data::< - bevy::math::curve::easing::EaseFunction, - bevy_mod_scripting_core::bindings::MarkAsGenerated, - >(); - } - pub(crate) fn register_jump_at_functions(world: &mut bevy::ecs::world::World) { - bevy_mod_scripting_core::bindings::function::namespace::NamespaceBuilder::< - bevy::math::curve::easing::JumpAt, - >::new(world) - .register_documented( - "assert_receiver_is_total_eq", - |_self: Ref| { - let output: () = { - { - let output: () = ::assert_receiver_is_total_eq( - &_self, - ) - .into(); - output - } - }; - output - }, - "", - &["_self"], - ) - .register_documented( - "clone", - |_self: Ref| { - let output: Val = { - { - let output: Val = ::clone( - &_self, - ) - .into(); - output - } - }; - output - }, - "", - &["_self"], - ) - .register_documented( - "eq", - | - _self: Ref, - other: Ref| - { - let output: bool = { - { - let output: bool = >::eq(&_self, &other) - .into(); - output - } - }; - output - }, - "", - &["_self", "other"], - ); - let registry = world - .get_resource_or_init::(); - let mut registry = registry.write(); - registry - .register_type_data::< - bevy::math::curve::easing::JumpAt, - bevy_mod_scripting_core::bindings::MarkAsGenerated, - >(); - } - impl ::bevy::app::Plugin for BevyMathScriptingPlugin { - fn build(&self, app: &mut ::bevy::prelude::App) { - let mut world = app.world_mut(); - register_aspect_ratio_functions(&mut world); - register_compass_octant_functions(&mut world); - register_compass_quadrant_functions(&mut world); - register_isometry_2_d_functions(&mut world); - register_isometry_3_d_functions(&mut world); - register_ray_2_d_functions(&mut world); - register_ray_3_d_functions(&mut world); - register_rot_2_functions(&mut world); - register_dir_2_functions(&mut world); - register_dir_3_functions(&mut world); - register_dir_3_a_functions(&mut world); - register_i_rect_functions(&mut world); - register_rect_functions(&mut world); - register_u_rect_functions(&mut world); - register_affine_3_functions(&mut world); - register_aabb_2_d_functions(&mut world); - register_bounding_circle_functions(&mut world); - register_circle_functions(&mut world); - register_annulus_functions(&mut world); - register_arc_2_d_functions(&mut world); - register_capsule_2_d_functions(&mut world); - register_circular_sector_functions(&mut world); - register_circular_segment_functions(&mut world); - register_ellipse_functions(&mut world); - register_line_2_d_functions(&mut world); - register_plane_2_d_functions(&mut world); - register_rectangle_functions(&mut world); - register_regular_polygon_functions(&mut world); - register_rhombus_functions(&mut world); - register_segment_2_d_functions(&mut world); - register_triangle_2_d_functions(&mut world); - register_aabb_3_d_functions(&mut world); - register_bounding_sphere_functions(&mut world); - register_sphere_functions(&mut world); - register_cuboid_functions(&mut world); - register_cylinder_functions(&mut world); - register_capsule_3_d_functions(&mut world); - register_cone_functions(&mut world); - register_conical_frustum_functions(&mut world); - register_infinite_plane_3_d_functions(&mut world); - register_line_3_d_functions(&mut world); - register_segment_3_d_functions(&mut world); - register_torus_functions(&mut world); - register_triangle_3_d_functions(&mut world); - register_ray_cast_2_d_functions(&mut world); - register_aabb_cast_2_d_functions(&mut world); - register_bounding_circle_cast_functions(&mut world); - register_ray_cast_3_d_functions(&mut world); - register_aabb_cast_3_d_functions(&mut world); - register_bounding_sphere_cast_functions(&mut world); - register_interval_functions(&mut world); - register_float_ord_functions(&mut world); - register_plane_3_d_functions(&mut world); - register_tetrahedron_functions(&mut world); - register_ease_function_functions(&mut world); - register_jump_at_functions(&mut world); - } - } \ No newline at end of file +// @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_ecs::prelude::*; +use bevy_mod_scripting_derive::script_bindings; +use crate::*; +pub struct BevyMathScriptingPlugin; +#[script_bindings( + remote, + name = "aspect_ratio_functions", + bms_core_path = "bevy_mod_scripting_core", + generated +)] +impl ::bevy_math::AspectRatio { + fn clone(_self: Ref<::bevy_math::AspectRatio>) -> Val<::bevy_math::AspectRatio> { + let output: Val<::bevy_math::AspectRatio> = <::bevy_math::AspectRatio as ::core::clone::Clone>::clone( + &_self, + ) + .into(); + output + } + fn eq( + _self: Ref<::bevy_math::AspectRatio>, + other: Ref<::bevy_math::AspectRatio>, + ) -> bool { + let output: bool = <::bevy_math::AspectRatio as ::core::cmp::PartialEq< + ::bevy_math::AspectRatio, + >>::eq(&_self, &other) + .into(); + output + } + /// Returns the inverse of this aspect ratio (height/width). + fn inverse(_self: Ref<::bevy_math::AspectRatio>) -> Val<::bevy_math::AspectRatio> { + let output: Val<::bevy_math::AspectRatio> = ::bevy_math::AspectRatio::inverse( + &_self, + ) + .into(); + output + } + /// Returns true if the aspect ratio represents a landscape orientation. + fn is_landscape(_self: Ref<::bevy_math::AspectRatio>) -> bool { + let output: bool = ::bevy_math::AspectRatio::is_landscape(&_self).into(); + output + } + /// Returns true if the aspect ratio represents a portrait orientation. + fn is_portrait(_self: Ref<::bevy_math::AspectRatio>) -> bool { + let output: bool = ::bevy_math::AspectRatio::is_portrait(&_self).into(); + output + } + /// Returns true if the aspect ratio is exactly square. + fn is_square(_self: Ref<::bevy_math::AspectRatio>) -> bool { + let output: bool = ::bevy_math::AspectRatio::is_square(&_self).into(); + output + } + /// Returns the aspect ratio as a f32 value. + fn ratio(_self: Ref<::bevy_math::AspectRatio>) -> f32 { + let output: f32 = ::bevy_math::AspectRatio::ratio(&_self).into(); + output + } +} +#[script_bindings( + remote, + name = "compass_octant_functions", + bms_core_path = "bevy_mod_scripting_core", + generated +)] +impl ::bevy_math::CompassOctant { + fn assert_receiver_is_total_eq(_self: Ref<::bevy_math::CompassOctant>) -> () { + let output: () = <::bevy_math::CompassOctant as ::core::cmp::Eq>::assert_receiver_is_total_eq( + &_self, + ) + .into(); + output + } + fn clone(_self: Ref<::bevy_math::CompassOctant>) -> Val<::bevy_math::CompassOctant> { + let output: Val<::bevy_math::CompassOctant> = <::bevy_math::CompassOctant as ::core::clone::Clone>::clone( + &_self, + ) + .into(); + output + } + fn eq( + _self: Ref<::bevy_math::CompassOctant>, + other: Ref<::bevy_math::CompassOctant>, + ) -> bool { + let output: bool = <::bevy_math::CompassOctant as ::core::cmp::PartialEq< + ::bevy_math::CompassOctant, + >>::eq(&_self, &other) + .into(); + output + } + fn neg(_self: Val<::bevy_math::CompassOctant>) -> Val<::bevy_math::CompassOctant> { + let output: Val<::bevy_math::CompassOctant> = <::bevy_math::CompassOctant as ::core::ops::Neg>::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<::bevy_math::CompassOctant>, + ) -> Val<::bevy_math::CompassOctant> { + let output: Val<::bevy_math::CompassOctant> = ::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<::bevy_math::CompassOctant>) -> usize { + let output: usize = ::bevy_math::CompassOctant::to_index(_self.into_inner()) + .into(); + output + } +} +#[script_bindings( + remote, + name = "compass_quadrant_functions", + bms_core_path = "bevy_mod_scripting_core", + generated +)] +impl ::bevy_math::CompassQuadrant { + fn assert_receiver_is_total_eq(_self: Ref<::bevy_math::CompassQuadrant>) -> () { + let output: () = <::bevy_math::CompassQuadrant as ::core::cmp::Eq>::assert_receiver_is_total_eq( + &_self, + ) + .into(); + output + } + fn clone( + _self: Ref<::bevy_math::CompassQuadrant>, + ) -> Val<::bevy_math::CompassQuadrant> { + let output: Val<::bevy_math::CompassQuadrant> = <::bevy_math::CompassQuadrant as ::core::clone::Clone>::clone( + &_self, + ) + .into(); + output + } + fn eq( + _self: Ref<::bevy_math::CompassQuadrant>, + other: Ref<::bevy_math::CompassQuadrant>, + ) -> bool { + let output: bool = <::bevy_math::CompassQuadrant as ::core::cmp::PartialEq< + ::bevy_math::CompassQuadrant, + >>::eq(&_self, &other) + .into(); + output + } + fn neg( + _self: Val<::bevy_math::CompassQuadrant>, + ) -> Val<::bevy_math::CompassQuadrant> { + let output: Val<::bevy_math::CompassQuadrant> = <::bevy_math::CompassQuadrant as ::core::ops::Neg>::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<::bevy_math::CompassQuadrant>, + ) -> Val<::bevy_math::CompassQuadrant> { + let output: Val<::bevy_math::CompassQuadrant> = ::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<::bevy_math::CompassQuadrant>) -> usize { + let output: usize = ::bevy_math::CompassQuadrant::to_index(_self.into_inner()) + .into(); + output + } +} +#[script_bindings( + remote, + name = "isometry_2_d_functions", + bms_core_path = "bevy_mod_scripting_core", + generated +)] +impl ::bevy_math::Isometry2d { + fn clone(_self: Ref<::bevy_math::Isometry2d>) -> Val<::bevy_math::Isometry2d> { + let output: Val<::bevy_math::Isometry2d> = <::bevy_math::Isometry2d as ::core::clone::Clone>::clone( + &_self, + ) + .into(); + output + } + fn eq( + _self: Ref<::bevy_math::Isometry2d>, + other: Ref<::bevy_math::Isometry2d>, + ) -> bool { + let output: bool = <::bevy_math::Isometry2d as ::core::cmp::PartialEq< + ::bevy_math::Isometry2d, + >>::eq(&_self, &other) + .into(); + output + } + /// Create a two-dimensional isometry from a rotation. + fn from_rotation(rotation: Val<::bevy_math::Rot2>) -> Val<::bevy_math::Isometry2d> { + let output: Val<::bevy_math::Isometry2d> = ::bevy_math::Isometry2d::from_rotation( + rotation.into_inner(), + ) + .into(); + output + } + /// Create a two-dimensional isometry from a translation. + fn from_translation( + translation: Val<::bevy_math::prelude::Vec2>, + ) -> Val<::bevy_math::Isometry2d> { + let output: Val<::bevy_math::Isometry2d> = ::bevy_math::Isometry2d::from_translation( + translation.into_inner(), + ) + .into(); + output + } + /// Create a two-dimensional isometry from a translation with the given `x` and `y` components. + fn from_xy(x: f32, y: f32) -> Val<::bevy_math::Isometry2d> { + let output: Val<::bevy_math::Isometry2d> = ::bevy_math::Isometry2d::from_xy(x, y) + .into(); + output + } + /// The inverse isometry that undoes this one. + fn inverse(_self: Ref<::bevy_math::Isometry2d>) -> Val<::bevy_math::Isometry2d> { + let output: Val<::bevy_math::Isometry2d> = ::bevy_math::Isometry2d::inverse( + &_self, + ) + .into(); + output + } + /// Compute `iso1.inverse() * iso2` in a more efficient way for one-shot cases. + /// If the same isometry is used multiple times, it is more efficient to instead compute + /// the inverse once and use that for each transformation. + fn inverse_mul( + _self: Ref<::bevy_math::Isometry2d>, + rhs: Val<::bevy_math::Isometry2d>, + ) -> Val<::bevy_math::Isometry2d> { + let output: Val<::bevy_math::Isometry2d> = ::bevy_math::Isometry2d::inverse_mul( + &_self, + rhs.into_inner(), + ) + .into(); + output + } + /// Transform a point by rotating and translating it using the inverse of this isometry. + /// This is more efficient than `iso.inverse().transform_point(point)` for one-shot cases. + /// If the same isometry is used multiple times, it is more efficient to instead compute + /// the inverse once and use that for each transformation. + fn inverse_transform_point( + _self: Ref<::bevy_math::Isometry2d>, + point: Val<::bevy_math::prelude::Vec2>, + ) -> Val<::bevy_math::prelude::Vec2> { + let output: Val<::bevy_math::prelude::Vec2> = ::bevy_math::Isometry2d::inverse_transform_point( + &_self, + point.into_inner(), + ) + .into(); + output + } + fn mul( + _self: Val<::bevy_math::Isometry2d>, + rhs: Val<::bevy_math::Isometry2d>, + ) -> Val<::bevy_math::Isometry2d> { + let output: Val<::bevy_math::Isometry2d> = <::bevy_math::Isometry2d as ::core::ops::Mul< + ::bevy_math::Isometry2d, + >>::mul(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + fn mul( + _self: Val<::bevy_math::Isometry2d>, + rhs: Val<::bevy_math::prelude::Dir2>, + ) -> Val<::bevy_math::prelude::Dir2> { + let output: Val<::bevy_math::prelude::Dir2> = <::bevy_math::Isometry2d as ::core::ops::Mul< + ::bevy_math::prelude::Dir2, + >>::mul(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + fn mul( + _self: Val<::bevy_math::Isometry2d>, + rhs: Val<::bevy_math::prelude::Vec2>, + ) -> Val<::bevy_math::prelude::Vec2> { + let output: Val<::bevy_math::prelude::Vec2> = <::bevy_math::Isometry2d as ::core::ops::Mul< + ::bevy_math::prelude::Vec2, + >>::mul(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + /// Create a two-dimensional isometry from a rotation and a translation. + fn new( + translation: Val<::bevy_math::prelude::Vec2>, + rotation: Val<::bevy_math::Rot2>, + ) -> Val<::bevy_math::Isometry2d> { + let output: Val<::bevy_math::Isometry2d> = ::bevy_math::Isometry2d::new( + translation.into_inner(), + rotation.into_inner(), + ) + .into(); + output + } + /// Transform a point by rotating and translating it using this isometry. + fn transform_point( + _self: Ref<::bevy_math::Isometry2d>, + point: Val<::bevy_math::prelude::Vec2>, + ) -> Val<::bevy_math::prelude::Vec2> { + let output: Val<::bevy_math::prelude::Vec2> = ::bevy_math::Isometry2d::transform_point( + &_self, + point.into_inner(), + ) + .into(); + output + } +} +#[script_bindings( + remote, + name = "isometry_3_d_functions", + bms_core_path = "bevy_mod_scripting_core", + generated +)] +impl ::bevy_math::Isometry3d { + fn clone(_self: Ref<::bevy_math::Isometry3d>) -> Val<::bevy_math::Isometry3d> { + let output: Val<::bevy_math::Isometry3d> = <::bevy_math::Isometry3d as ::core::clone::Clone>::clone( + &_self, + ) + .into(); + output + } + fn eq( + _self: Ref<::bevy_math::Isometry3d>, + other: Ref<::bevy_math::Isometry3d>, + ) -> bool { + let output: bool = <::bevy_math::Isometry3d as ::core::cmp::PartialEq< + ::bevy_math::Isometry3d, + >>::eq(&_self, &other) + .into(); + output + } + /// Create a three-dimensional isometry from a rotation. + fn from_rotation( + rotation: Val<::bevy_math::prelude::Quat>, + ) -> Val<::bevy_math::Isometry3d> { + let output: Val<::bevy_math::Isometry3d> = ::bevy_math::Isometry3d::from_rotation( + rotation.into_inner(), + ) + .into(); + output + } + /// Create a three-dimensional isometry from a translation with the given `x`, `y`, and `z` components. + fn from_xyz(x: f32, y: f32, z: f32) -> Val<::bevy_math::Isometry3d> { + let output: Val<::bevy_math::Isometry3d> = ::bevy_math::Isometry3d::from_xyz( + x, + y, + z, + ) + .into(); + output + } + /// The inverse isometry that undoes this one. + fn inverse(_self: Ref<::bevy_math::Isometry3d>) -> Val<::bevy_math::Isometry3d> { + let output: Val<::bevy_math::Isometry3d> = ::bevy_math::Isometry3d::inverse( + &_self, + ) + .into(); + output + } + /// Compute `iso1.inverse() * iso2` in a more efficient way for one-shot cases. + /// If the same isometry is used multiple times, it is more efficient to instead compute + /// the inverse once and use that for each transformation. + fn inverse_mul( + _self: Ref<::bevy_math::Isometry3d>, + rhs: Val<::bevy_math::Isometry3d>, + ) -> Val<::bevy_math::Isometry3d> { + let output: Val<::bevy_math::Isometry3d> = ::bevy_math::Isometry3d::inverse_mul( + &_self, + rhs.into_inner(), + ) + .into(); + output + } + fn mul( + _self: Val<::bevy_math::Isometry3d>, + rhs: Val<::bevy_math::Isometry3d>, + ) -> Val<::bevy_math::Isometry3d> { + let output: Val<::bevy_math::Isometry3d> = <::bevy_math::Isometry3d as ::core::ops::Mul< + ::bevy_math::Isometry3d, + >>::mul(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + fn mul( + _self: Val<::bevy_math::Isometry3d>, + rhs: Val<::bevy_math::prelude::Dir3>, + ) -> Val<::bevy_math::prelude::Dir3> { + let output: Val<::bevy_math::prelude::Dir3> = <::bevy_math::Isometry3d as ::core::ops::Mul< + ::bevy_math::prelude::Dir3, + >>::mul(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + fn mul( + _self: Val<::bevy_math::Isometry3d>, + rhs: Val<::bevy_math::prelude::Vec3>, + ) -> Val<::bevy_math::prelude::Vec3> { + let output: Val<::bevy_math::prelude::Vec3> = <::bevy_math::Isometry3d as ::core::ops::Mul< + ::bevy_math::prelude::Vec3, + >>::mul(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + fn mul( + _self: Val<::bevy_math::Isometry3d>, + rhs: Val<::bevy_math::prelude::Vec3A>, + ) -> Val<::bevy_math::prelude::Vec3A> { + let output: Val<::bevy_math::prelude::Vec3A> = <::bevy_math::Isometry3d as ::core::ops::Mul< + ::bevy_math::prelude::Vec3A, + >>::mul(_self.into_inner(), rhs.into_inner()) + .into(); + output + } +} +#[script_bindings( + remote, + name = "ray_2_d_functions", + bms_core_path = "bevy_mod_scripting_core", + generated +)] +impl ::bevy_math::Ray2d { + fn clone(_self: Ref<::bevy_math::Ray2d>) -> Val<::bevy_math::Ray2d> { + let output: Val<::bevy_math::Ray2d> = <::bevy_math::Ray2d as ::core::clone::Clone>::clone( + &_self, + ) + .into(); + output + } + fn eq(_self: Ref<::bevy_math::Ray2d>, other: Ref<::bevy_math::Ray2d>) -> bool { + let output: bool = <::bevy_math::Ray2d as ::core::cmp::PartialEq< + ::bevy_math::Ray2d, + >>::eq(&_self, &other) + .into(); + output + } + /// Get a point at a given distance along the ray + fn get_point( + _self: Ref<::bevy_math::Ray2d>, + distance: f32, + ) -> Val<::bevy_math::prelude::Vec2> { + let output: Val<::bevy_math::prelude::Vec2> = ::bevy_math::Ray2d::get_point( + &_self, + distance, + ) + .into(); + output + } + /// Get the distance to a plane if the ray intersects it + fn intersect_plane( + _self: Ref<::bevy_math::Ray2d>, + plane_origin: Val<::bevy_math::prelude::Vec2>, + plane: Val<::bevy_math::primitives::Plane2d>, + ) -> ::core::option::Option { + let output: ::core::option::Option = ::bevy_math::Ray2d::intersect_plane( + &_self, + plane_origin.into_inner(), + plane.into_inner(), + ) + .into(); + output + } + /// Create a new `Ray2d` from a given origin and direction + fn new( + origin: Val<::bevy_math::prelude::Vec2>, + direction: Val<::bevy_math::prelude::Dir2>, + ) -> Val<::bevy_math::Ray2d> { + let output: Val<::bevy_math::Ray2d> = ::bevy_math::Ray2d::new( + origin.into_inner(), + direction.into_inner(), + ) + .into(); + output + } +} +#[script_bindings( + remote, + name = "ray_3_d_functions", + bms_core_path = "bevy_mod_scripting_core", + generated +)] +impl ::bevy_math::Ray3d { + fn clone(_self: Ref<::bevy_math::Ray3d>) -> Val<::bevy_math::Ray3d> { + let output: Val<::bevy_math::Ray3d> = <::bevy_math::Ray3d as ::core::clone::Clone>::clone( + &_self, + ) + .into(); + output + } + fn eq(_self: Ref<::bevy_math::Ray3d>, other: Ref<::bevy_math::Ray3d>) -> bool { + let output: bool = <::bevy_math::Ray3d as ::core::cmp::PartialEq< + ::bevy_math::Ray3d, + >>::eq(&_self, &other) + .into(); + output + } + /// Get a point at a given distance along the ray + fn get_point( + _self: Ref<::bevy_math::Ray3d>, + distance: f32, + ) -> Val<::bevy_math::prelude::Vec3> { + let output: Val<::bevy_math::prelude::Vec3> = ::bevy_math::Ray3d::get_point( + &_self, + distance, + ) + .into(); + output + } + /// Get the distance to a plane if the ray intersects it + fn intersect_plane( + _self: Ref<::bevy_math::Ray3d>, + plane_origin: Val<::bevy_math::prelude::Vec3>, + plane: Val<::bevy_math::primitives::InfinitePlane3d>, + ) -> ::core::option::Option { + let output: ::core::option::Option = ::bevy_math::Ray3d::intersect_plane( + &_self, + plane_origin.into_inner(), + plane.into_inner(), + ) + .into(); + output + } + /// Create a new `Ray3d` from a given origin and direction + fn new( + origin: Val<::bevy_math::prelude::Vec3>, + direction: Val<::bevy_math::prelude::Dir3>, + ) -> Val<::bevy_math::Ray3d> { + let output: Val<::bevy_math::Ray3d> = ::bevy_math::Ray3d::new( + origin.into_inner(), + direction.into_inner(), + ) + .into(); + output + } +} +#[script_bindings( + remote, + name = "rot_2_functions", + bms_core_path = "bevy_mod_scripting_core", + generated +)] +impl ::bevy_math::Rot2 { + /// Returns the angle in radians needed to make `self` and `other` coincide. + fn angle_to(_self: Val<::bevy_math::Rot2>, other: Val<::bevy_math::Rot2>) -> f32 { + let output: f32 = ::bevy_math::Rot2::angle_to( + _self.into_inner(), + other.into_inner(), + ) + .into(); + output + } + /// Returns the rotation in degrees in the `(-180, 180]` range. + fn as_degrees(_self: Val<::bevy_math::Rot2>) -> f32 { + let output: f32 = ::bevy_math::Rot2::as_degrees(_self.into_inner()).into(); + output + } + /// Returns the rotation in radians in the `(-pi, pi]` range. + fn as_radians(_self: Val<::bevy_math::Rot2>) -> f32 { + let output: f32 = ::bevy_math::Rot2::as_radians(_self.into_inner()).into(); + output + } + /// Returns the rotation as a fraction of a full 360 degree turn. + fn as_turn_fraction(_self: Val<::bevy_math::Rot2>) -> f32 { + let output: f32 = ::bevy_math::Rot2::as_turn_fraction(_self.into_inner()).into(); + output + } + fn clone(_self: Ref<::bevy_math::Rot2>) -> Val<::bevy_math::Rot2> { + let output: Val<::bevy_math::Rot2> = <::bevy_math::Rot2 as ::core::clone::Clone>::clone( + &_self, + ) + .into(); + output + } + /// Creates a [`Rot2`] from a counterclockwise angle in degrees. + /// # Note + /// The input rotation will always be clamped to the range `(-180°, 180°]` by design. + /// # Example + /// ``` + /// # use 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<::bevy_math::Rot2> { + let output: Val<::bevy_math::Rot2> = ::bevy_math::Rot2::degrees(degrees).into(); + output + } + fn eq(_self: Ref<::bevy_math::Rot2>, other: Ref<::bevy_math::Rot2>) -> bool { + let output: bool = <::bevy_math::Rot2 as ::core::cmp::PartialEq< + ::bevy_math::Rot2, + >>::eq(&_self, &other) + .into(); + output + } + /// Returns `self` after an approximate normalization, assuming the value is already nearly normalized. + /// Useful for preventing numerical error accumulation. + /// See [`Dir3::fast_renormalize`](crate::Dir3::fast_renormalize) for an example of when such error accumulation might occur. + fn fast_renormalize(_self: Val<::bevy_math::Rot2>) -> Val<::bevy_math::Rot2> { + let output: Val<::bevy_math::Rot2> = ::bevy_math::Rot2::fast_renormalize( + _self.into_inner(), + ) + .into(); + output + } + /// Creates a [`Rot2`] from the sine and cosine of an angle in radians. + /// The rotation is only valid if `sin * sin + cos * cos == 1.0`. + /// # Panics + /// Panics if `sin * sin + cos * cos != 1.0` when the `glam_assert` feature is enabled. + fn from_sin_cos(sin: f32, cos: f32) -> Val<::bevy_math::Rot2> { + let output: Val<::bevy_math::Rot2> = ::bevy_math::Rot2::from_sin_cos(sin, cos) + .into(); + output + } + /// Returns the inverse of the rotation. This is also the conjugate + /// of the unit complex number representing the rotation. + fn inverse(_self: Val<::bevy_math::Rot2>) -> Val<::bevy_math::Rot2> { + let output: Val<::bevy_math::Rot2> = ::bevy_math::Rot2::inverse( + _self.into_inner(), + ) + .into(); + output + } + /// Returns `true` if the rotation is neither infinite nor NaN. + fn is_finite(_self: Val<::bevy_math::Rot2>) -> bool { + let output: bool = ::bevy_math::Rot2::is_finite(_self.into_inner()).into(); + output + } + /// Returns `true` if the rotation is NaN. + fn is_nan(_self: Val<::bevy_math::Rot2>) -> bool { + let output: bool = ::bevy_math::Rot2::is_nan(_self.into_inner()).into(); + output + } + /// Returns `true` if the rotation is near [`Rot2::IDENTITY`]. + fn is_near_identity(_self: Val<::bevy_math::Rot2>) -> bool { + let output: bool = ::bevy_math::Rot2::is_near_identity(_self.into_inner()) + .into(); + output + } + /// Returns whether `self` has a length of `1.0` or not. + /// Uses a precision threshold of approximately `1e-4`. + fn is_normalized(_self: Val<::bevy_math::Rot2>) -> bool { + let output: bool = ::bevy_math::Rot2::is_normalized(_self.into_inner()).into(); + output + } + /// Computes the length or norm of the complex number used to represent the rotation. + /// The length is typically expected to be `1.0`. Unexpectedly denormalized rotations + /// can be a result of incorrect construction or floating point error caused by + /// successive operations. + fn length(_self: Val<::bevy_math::Rot2>) -> f32 { + let output: f32 = ::bevy_math::Rot2::length(_self.into_inner()).into(); + output + } + /// Computes `1.0 / self.length()`. + /// For valid results, `self` must _not_ have a length of zero. + fn length_recip(_self: Val<::bevy_math::Rot2>) -> f32 { + let output: f32 = ::bevy_math::Rot2::length_recip(_self.into_inner()).into(); + output + } + /// Computes the squared length or norm of the complex number used to represent the rotation. + /// This is generally faster than [`Rot2::length()`], as it avoids a square + /// root operation. + /// The length is typically expected to be `1.0`. Unexpectedly denormalized rotations + /// can be a result of incorrect construction or floating point error caused by + /// successive operations. + fn length_squared(_self: Val<::bevy_math::Rot2>) -> f32 { + let output: f32 = ::bevy_math::Rot2::length_squared(_self.into_inner()).into(); + output + } + fn mul( + _self: Val<::bevy_math::Rot2>, + rhs: Val<::bevy_math::Rot2>, + ) -> Val<::bevy_math::Rot2> { + let output: Val<::bevy_math::Rot2> = <::bevy_math::Rot2 as ::core::ops::Mul< + ::bevy_math::Rot2, + >>::mul(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + /// Rotates the [`Dir2`] using a [`Rot2`]. + fn mul( + _self: Val<::bevy_math::Rot2>, + direction: Val<::bevy_math::prelude::Dir2>, + ) -> Val<::bevy_math::prelude::Dir2> { + let output: Val<::bevy_math::prelude::Dir2> = <::bevy_math::Rot2 as ::core::ops::Mul< + ::bevy_math::prelude::Dir2, + >>::mul(_self.into_inner(), direction.into_inner()) + .into(); + output + } + /// Rotates a [`Vec2`] by a [`Rot2`]. + fn mul( + _self: Val<::bevy_math::Rot2>, + rhs: Val<::bevy_math::prelude::Vec2>, + ) -> Val<::bevy_math::prelude::Vec2> { + let output: Val<::bevy_math::prelude::Vec2> = <::bevy_math::Rot2 as ::core::ops::Mul< + ::bevy_math::prelude::Vec2, + >>::mul(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + /// Performs a linear interpolation between `self` and `rhs` based on + /// the value `s`, and normalizes the rotation afterwards. + /// When `s == 0.0`, the result will be equal to `self`. + /// When `s == 1.0`, the result will be equal to `rhs`. + /// This is slightly more efficient than [`slerp`](Self::slerp), and produces a similar result + /// when the difference between the two rotations is small. At larger differences, + /// the result resembles a kind of ease-in-out effect. + /// If you would like the angular velocity to remain constant, consider using [`slerp`](Self::slerp) instead. + /// # Details + /// `nlerp` corresponds to computing an angle for a point at position `s` on a line drawn + /// between the endpoints of the arc formed by `self` and `rhs` on a unit circle, + /// and normalizing the result afterwards. + /// Note that if the angles are opposite like 0 and π, the line will pass through the origin, + /// and the resulting angle will always be either `self` or `rhs` depending on `s`. + /// If `s` happens to be `0.5` in this case, a valid rotation cannot be computed, and `self` + /// will be returned as a fallback. + /// # Example + /// ``` + /// # use bevy_math::Rot2; + /// # + /// let rot1 = Rot2::IDENTITY; + /// let rot2 = Rot2::degrees(135.0); + /// let result1 = rot1.nlerp(rot2, 1.0 / 3.0); + /// assert_eq!(result1.as_degrees(), 28.675055); + /// let result2 = rot1.nlerp(rot2, 0.5); + /// assert_eq!(result2.as_degrees(), 67.5); + /// ``` + fn nlerp( + _self: Val<::bevy_math::Rot2>, + end: Val<::bevy_math::Rot2>, + s: f32, + ) -> Val<::bevy_math::Rot2> { + let output: Val<::bevy_math::Rot2> = ::bevy_math::Rot2::nlerp( + _self.into_inner(), + end.into_inner(), + s, + ) + .into(); + output + } + /// Returns `self` with a length of `1.0`. + /// Note that [`Rot2`] should typically already be normalized by design. + /// Manual normalization is only needed when successive operations result in + /// accumulated floating point error, or if the rotation was constructed + /// with invalid values. + /// # Panics + /// Panics if `self` has a length of zero, NaN, or infinity when debug assertions are enabled. + fn normalize(_self: Val<::bevy_math::Rot2>) -> Val<::bevy_math::Rot2> { + let output: Val<::bevy_math::Rot2> = ::bevy_math::Rot2::normalize( + _self.into_inner(), + ) + .into(); + output + } + /// Creates a [`Rot2`] from a counterclockwise angle in radians. + /// # Note + /// The input rotation will always be clamped to the range `(-π, π]` by design. + /// # Example + /// ``` + /// # use bevy_math::Rot2; + /// # use approx::assert_relative_eq; + /// # 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<::bevy_math::Rot2> { + let output: Val<::bevy_math::Rot2> = ::bevy_math::Rot2::radians(radians).into(); + output + } + /// Returns the sine and cosine of the rotation angle in radians. + fn sin_cos(_self: Val<::bevy_math::Rot2>) -> (f32, f32) { + let output: (f32, f32) = ::bevy_math::Rot2::sin_cos(_self.into_inner()).into(); + output + } + /// Performs a spherical linear interpolation between `self` and `end` + /// based on the value `s`. + /// This corresponds to interpolating between the two angles at a constant angular velocity. + /// When `s == 0.0`, the result will be equal to `self`. + /// When `s == 1.0`, the result will be equal to `rhs`. + /// If you would like the rotation to have a kind of ease-in-out effect, consider + /// using the slightly more efficient [`nlerp`](Self::nlerp) instead. + /// # Example + /// ``` + /// # use bevy_math::Rot2; + /// # + /// let rot1 = Rot2::IDENTITY; + /// let rot2 = Rot2::degrees(135.0); + /// let result1 = rot1.slerp(rot2, 1.0 / 3.0); + /// assert_eq!(result1.as_degrees(), 45.0); + /// let result2 = rot1.slerp(rot2, 0.5); + /// assert_eq!(result2.as_degrees(), 67.5); + /// ``` + fn slerp( + _self: Val<::bevy_math::Rot2>, + end: Val<::bevy_math::Rot2>, + s: f32, + ) -> Val<::bevy_math::Rot2> { + let output: Val<::bevy_math::Rot2> = ::bevy_math::Rot2::slerp( + _self.into_inner(), + end.into_inner(), + s, + ) + .into(); + output + } + /// Creates a [`Rot2`] from a counterclockwise fraction of a full turn of 360 degrees. + /// # Note + /// The input rotation will always be clamped to the range `(-50%, 50%]` by design. + /// # Example + /// ``` + /// # use 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<::bevy_math::Rot2> { + let output: Val<::bevy_math::Rot2> = ::bevy_math::Rot2::turn_fraction(fraction) + .into(); + output + } +} +#[script_bindings( + remote, + name = "dir_2_functions", + bms_core_path = "bevy_mod_scripting_core", + generated +)] +impl ::bevy_math::prelude::Dir2 { + /// Returns the inner [`Vec2`] + fn as_vec2( + _self: Ref<::bevy_math::prelude::Dir2>, + ) -> Val<::bevy_math::prelude::Vec2> { + let output: Val<::bevy_math::prelude::Vec2> = ::bevy_math::prelude::Dir2::as_vec2( + &_self, + ) + .into(); + output + } + fn clone(_self: Ref<::bevy_math::prelude::Dir2>) -> Val<::bevy_math::prelude::Dir2> { + let output: Val<::bevy_math::prelude::Dir2> = <::bevy_math::prelude::Dir2 as ::core::clone::Clone>::clone( + &_self, + ) + .into(); + output + } + fn eq( + _self: Ref<::bevy_math::prelude::Dir2>, + other: Ref<::bevy_math::prelude::Dir2>, + ) -> bool { + let output: bool = <::bevy_math::prelude::Dir2 as ::core::cmp::PartialEq< + ::bevy_math::prelude::Dir2, + >>::eq(&_self, &other) + .into(); + output + } + /// Returns `self` after an approximate normalization, assuming the value is already nearly normalized. + /// Useful for preventing numerical error accumulation. + /// See [`Dir3::fast_renormalize`] for an example of when such error accumulation might occur. + fn fast_renormalize( + _self: Val<::bevy_math::prelude::Dir2>, + ) -> Val<::bevy_math::prelude::Dir2> { + let output: Val<::bevy_math::prelude::Dir2> = ::bevy_math::prelude::Dir2::fast_renormalize( + _self.into_inner(), + ) + .into(); + output + } + /// Create a direction from its `x` and `y` components, assuming the resulting vector is normalized. + /// # Warning + /// The vector produced from `x` and `y` must be normalized, i.e its length must be `1.0`. + fn from_xy_unchecked(x: f32, y: f32) -> Val<::bevy_math::prelude::Dir2> { + let output: Val<::bevy_math::prelude::Dir2> = ::bevy_math::prelude::Dir2::from_xy_unchecked( + x, + y, + ) + .into(); + output + } + fn mul( + _self: Val<::bevy_math::prelude::Dir2>, + rhs: f32, + ) -> Val<::bevy_math::prelude::Vec2> { + let output: Val<::bevy_math::prelude::Vec2> = <::bevy_math::prelude::Dir2 as ::core::ops::Mul< + f32, + >>::mul(_self.into_inner(), rhs) + .into(); + output + } + fn neg(_self: Val<::bevy_math::prelude::Dir2>) -> Val<::bevy_math::prelude::Dir2> { + let output: Val<::bevy_math::prelude::Dir2> = <::bevy_math::prelude::Dir2 as ::core::ops::Neg>::neg( + _self.into_inner(), + ) + .into(); + output + } + /// Create a [`Dir2`] from a [`Vec2`] that is already normalized. + /// # Warning + /// `value` must be normalized, i.e its length must be `1.0`. + fn new_unchecked( + value: Val<::bevy_math::prelude::Vec2>, + ) -> Val<::bevy_math::prelude::Dir2> { + let output: Val<::bevy_math::prelude::Dir2> = ::bevy_math::prelude::Dir2::new_unchecked( + value.into_inner(), + ) + .into(); + output + } + /// Get the rotation that rotates `other` to this direction. + fn rotation_from( + _self: Val<::bevy_math::prelude::Dir2>, + other: Val<::bevy_math::prelude::Dir2>, + ) -> Val<::bevy_math::Rot2> { + let output: Val<::bevy_math::Rot2> = ::bevy_math::prelude::Dir2::rotation_from( + _self.into_inner(), + other.into_inner(), + ) + .into(); + output + } + /// Get the rotation that rotates the X-axis to this direction. + fn rotation_from_x( + _self: Val<::bevy_math::prelude::Dir2>, + ) -> Val<::bevy_math::Rot2> { + let output: Val<::bevy_math::Rot2> = ::bevy_math::prelude::Dir2::rotation_from_x( + _self.into_inner(), + ) + .into(); + output + } + /// Get the rotation that rotates the Y-axis to this direction. + fn rotation_from_y( + _self: Val<::bevy_math::prelude::Dir2>, + ) -> Val<::bevy_math::Rot2> { + let output: Val<::bevy_math::Rot2> = ::bevy_math::prelude::Dir2::rotation_from_y( + _self.into_inner(), + ) + .into(); + output + } + /// Get the rotation that rotates this direction to `other`. + fn rotation_to( + _self: Val<::bevy_math::prelude::Dir2>, + other: Val<::bevy_math::prelude::Dir2>, + ) -> Val<::bevy_math::Rot2> { + let output: Val<::bevy_math::Rot2> = ::bevy_math::prelude::Dir2::rotation_to( + _self.into_inner(), + other.into_inner(), + ) + .into(); + output + } + /// Get the rotation that rotates this direction to the X-axis. + fn rotation_to_x(_self: Val<::bevy_math::prelude::Dir2>) -> Val<::bevy_math::Rot2> { + let output: Val<::bevy_math::Rot2> = ::bevy_math::prelude::Dir2::rotation_to_x( + _self.into_inner(), + ) + .into(); + output + } + /// Get the rotation that rotates this direction to the Y-axis. + fn rotation_to_y(_self: Val<::bevy_math::prelude::Dir2>) -> Val<::bevy_math::Rot2> { + let output: Val<::bevy_math::Rot2> = ::bevy_math::prelude::Dir2::rotation_to_y( + _self.into_inner(), + ) + .into(); + output + } + /// Performs a spherical linear interpolation between `self` and `rhs` + /// based on the value `s`. + /// This corresponds to interpolating between the two directions at a constant angular velocity. + /// When `s == 0.0`, the result will be equal to `self`. + /// When `s == 1.0`, the result will be equal to `rhs`. + /// # Example + /// ``` + /// # use bevy_math::Dir2; + /// # use approx::{assert_relative_eq, RelativeEq}; + /// # + /// 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( + _self: Val<::bevy_math::prelude::Dir2>, + rhs: Val<::bevy_math::prelude::Dir2>, + s: f32, + ) -> Val<::bevy_math::prelude::Dir2> { + let output: Val<::bevy_math::prelude::Dir2> = ::bevy_math::prelude::Dir2::slerp( + _self.into_inner(), + rhs.into_inner(), + s, + ) + .into(); + output + } +} +#[script_bindings( + remote, + name = "dir_3_functions", + bms_core_path = "bevy_mod_scripting_core", + generated +)] +impl ::bevy_math::prelude::Dir3 { + /// Returns the inner [`Vec3`] + fn as_vec3( + _self: Ref<::bevy_math::prelude::Dir3>, + ) -> Val<::bevy_math::prelude::Vec3> { + let output: Val<::bevy_math::prelude::Vec3> = ::bevy_math::prelude::Dir3::as_vec3( + &_self, + ) + .into(); + output + } + fn clone(_self: Ref<::bevy_math::prelude::Dir3>) -> Val<::bevy_math::prelude::Dir3> { + let output: Val<::bevy_math::prelude::Dir3> = <::bevy_math::prelude::Dir3 as ::core::clone::Clone>::clone( + &_self, + ) + .into(); + output + } + fn eq( + _self: Ref<::bevy_math::prelude::Dir3>, + other: Ref<::bevy_math::prelude::Dir3>, + ) -> bool { + let output: bool = <::bevy_math::prelude::Dir3 as ::core::cmp::PartialEq< + ::bevy_math::prelude::Dir3, + >>::eq(&_self, &other) + .into(); + output + } + /// Returns `self` after an approximate normalization, assuming the value is already nearly normalized. + /// Useful for preventing numerical error accumulation. + /// # Example + /// The following seemingly benign code would start accumulating errors over time, + /// leading to `dir` eventually not being normalized anymore. + /// ``` + /// # use bevy_math::prelude::*; + /// # let N: usize = 200; + /// let mut dir = Dir3::X; + /// let quaternion = Quat::from_euler(EulerRot::XYZ, 1.0, 2.0, 3.0); + /// for i in 0..N { + /// dir = quaternion * dir; + /// } + /// ``` + /// Instead, do the following. + /// ``` + /// # use bevy_math::prelude::*; + /// # let N: usize = 200; + /// let mut dir = Dir3::X; + /// let quaternion = Quat::from_euler(EulerRot::XYZ, 1.0, 2.0, 3.0); + /// for i in 0..N { + /// dir = quaternion * dir; + /// dir = dir.fast_renormalize(); + /// } + /// ``` + fn fast_renormalize( + _self: Val<::bevy_math::prelude::Dir3>, + ) -> Val<::bevy_math::prelude::Dir3> { + let output: Val<::bevy_math::prelude::Dir3> = ::bevy_math::prelude::Dir3::fast_renormalize( + _self.into_inner(), + ) + .into(); + output + } + /// Create a direction from its `x`, `y`, and `z` components, assuming the resulting vector is normalized. + /// # Warning + /// The vector produced from `x`, `y`, and `z` must be normalized, i.e its length must be `1.0`. + fn from_xyz_unchecked(x: f32, y: f32, z: f32) -> Val<::bevy_math::prelude::Dir3> { + let output: Val<::bevy_math::prelude::Dir3> = ::bevy_math::prelude::Dir3::from_xyz_unchecked( + x, + y, + z, + ) + .into(); + output + } + fn mul( + _self: Val<::bevy_math::prelude::Dir3>, + rhs: f32, + ) -> Val<::bevy_math::prelude::Vec3> { + let output: Val<::bevy_math::prelude::Vec3> = <::bevy_math::prelude::Dir3 as ::core::ops::Mul< + f32, + >>::mul(_self.into_inner(), rhs) + .into(); + output + } + fn neg(_self: Val<::bevy_math::prelude::Dir3>) -> Val<::bevy_math::prelude::Dir3> { + let output: Val<::bevy_math::prelude::Dir3> = <::bevy_math::prelude::Dir3 as ::core::ops::Neg>::neg( + _self.into_inner(), + ) + .into(); + output + } + /// Create a [`Dir3`] from a [`Vec3`] that is already normalized. + /// # Warning + /// `value` must be normalized, i.e its length must be `1.0`. + fn new_unchecked( + value: Val<::bevy_math::prelude::Vec3>, + ) -> Val<::bevy_math::prelude::Dir3> { + let output: Val<::bevy_math::prelude::Dir3> = ::bevy_math::prelude::Dir3::new_unchecked( + value.into_inner(), + ) + .into(); + output + } + /// Performs a spherical linear interpolation between `self` and `rhs` + /// based on the value `s`. + /// This corresponds to interpolating between the two directions at a constant angular velocity. + /// When `s == 0.0`, the result will be equal to `self`. + /// When `s == 1.0`, the result will be equal to `rhs`. + /// # Example + /// ``` + /// # use bevy_math::Dir3; + /// # use approx::{assert_relative_eq, RelativeEq}; + /// # + /// 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( + _self: Val<::bevy_math::prelude::Dir3>, + rhs: Val<::bevy_math::prelude::Dir3>, + s: f32, + ) -> Val<::bevy_math::prelude::Dir3> { + let output: Val<::bevy_math::prelude::Dir3> = ::bevy_math::prelude::Dir3::slerp( + _self.into_inner(), + rhs.into_inner(), + s, + ) + .into(); + output + } +} +#[script_bindings( + remote, + name = "dir_3_a_functions", + bms_core_path = "bevy_mod_scripting_core", + generated +)] +impl ::bevy_math::prelude::Dir3A { + /// Returns the inner [`Vec3A`] + fn as_vec3a( + _self: Ref<::bevy_math::prelude::Dir3A>, + ) -> Val<::bevy_math::prelude::Vec3A> { + let output: Val<::bevy_math::prelude::Vec3A> = ::bevy_math::prelude::Dir3A::as_vec3a( + &_self, + ) + .into(); + output + } + fn clone( + _self: Ref<::bevy_math::prelude::Dir3A>, + ) -> Val<::bevy_math::prelude::Dir3A> { + let output: Val<::bevy_math::prelude::Dir3A> = <::bevy_math::prelude::Dir3A as ::core::clone::Clone>::clone( + &_self, + ) + .into(); + output + } + fn eq( + _self: Ref<::bevy_math::prelude::Dir3A>, + other: Ref<::bevy_math::prelude::Dir3A>, + ) -> bool { + let output: bool = <::bevy_math::prelude::Dir3A as ::core::cmp::PartialEq< + ::bevy_math::prelude::Dir3A, + >>::eq(&_self, &other) + .into(); + output + } + /// Returns `self` after an approximate normalization, assuming the value is already nearly normalized. + /// Useful for preventing numerical error accumulation. + /// See [`Dir3::fast_renormalize`] for an example of when such error accumulation might occur. + fn fast_renormalize( + _self: Val<::bevy_math::prelude::Dir3A>, + ) -> Val<::bevy_math::prelude::Dir3A> { + let output: Val<::bevy_math::prelude::Dir3A> = ::bevy_math::prelude::Dir3A::fast_renormalize( + _self.into_inner(), + ) + .into(); + output + } + /// Create a direction from its `x`, `y`, and `z` components, assuming the resulting vector is normalized. + /// # Warning + /// The vector produced from `x`, `y`, and `z` must be normalized, i.e its length must be `1.0`. + fn from_xyz_unchecked(x: f32, y: f32, z: f32) -> Val<::bevy_math::prelude::Dir3A> { + let output: Val<::bevy_math::prelude::Dir3A> = ::bevy_math::prelude::Dir3A::from_xyz_unchecked( + x, + y, + z, + ) + .into(); + output + } + fn mul( + _self: Val<::bevy_math::prelude::Dir3A>, + rhs: f32, + ) -> Val<::bevy_math::prelude::Vec3A> { + let output: Val<::bevy_math::prelude::Vec3A> = <::bevy_math::prelude::Dir3A as ::core::ops::Mul< + f32, + >>::mul(_self.into_inner(), rhs) + .into(); + output + } + fn neg(_self: Val<::bevy_math::prelude::Dir3A>) -> Val<::bevy_math::prelude::Dir3A> { + let output: Val<::bevy_math::prelude::Dir3A> = <::bevy_math::prelude::Dir3A as ::core::ops::Neg>::neg( + _self.into_inner(), + ) + .into(); + output + } + /// 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<::bevy_math::prelude::Vec3A>, + ) -> Val<::bevy_math::prelude::Dir3A> { + let output: Val<::bevy_math::prelude::Dir3A> = ::bevy_math::prelude::Dir3A::new_unchecked( + value.into_inner(), + ) + .into(); + output + } + /// Performs a spherical linear interpolation between `self` and `rhs` + /// based on the value `s`. + /// This corresponds to interpolating between the two directions at a constant angular velocity. + /// When `s == 0.0`, the result will be equal to `self`. + /// When `s == 1.0`, the result will be equal to `rhs`. + /// # Example + /// ``` + /// # use bevy_math::Dir3A; + /// # use approx::{assert_relative_eq, RelativeEq}; + /// # + /// 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( + _self: Val<::bevy_math::prelude::Dir3A>, + rhs: Val<::bevy_math::prelude::Dir3A>, + s: f32, + ) -> Val<::bevy_math::prelude::Dir3A> { + let output: Val<::bevy_math::prelude::Dir3A> = ::bevy_math::prelude::Dir3A::slerp( + _self.into_inner(), + rhs.into_inner(), + s, + ) + .into(); + output + } +} +#[script_bindings( + remote, + name = "i_rect_functions", + bms_core_path = "bevy_mod_scripting_core", + generated +)] +impl ::bevy_math::prelude::IRect { + /// Returns self as [`Rect`] (f32) + fn as_rect( + _self: Ref<::bevy_math::prelude::IRect>, + ) -> Val<::bevy_math::prelude::Rect> { + let output: Val<::bevy_math::prelude::Rect> = ::bevy_math::prelude::IRect::as_rect( + &_self, + ) + .into(); + output + } + /// Returns self as [`URect`] (u32) + fn as_urect( + _self: Ref<::bevy_math::prelude::IRect>, + ) -> Val<::bevy_math::prelude::URect> { + let output: Val<::bevy_math::prelude::URect> = ::bevy_math::prelude::IRect::as_urect( + &_self, + ) + .into(); + output + } + fn assert_receiver_is_total_eq(_self: Ref<::bevy_math::prelude::IRect>) -> () { + let output: () = <::bevy_math::prelude::IRect as ::core::cmp::Eq>::assert_receiver_is_total_eq( + &_self, + ) + .into(); + output + } + /// The center point of the rectangle. + /// # Rounding Behavior + /// If the (min + max) contains odd numbers they will be rounded down to the nearest whole number when calculating the center. + /// # Examples + /// ``` + /// # use bevy_math::{IRect, IVec2}; + /// let r = IRect::new(0, 0, 5, 2); // w=5 h=2 + /// assert_eq!(r.center(), IVec2::new(2, 1)); + /// ``` + fn center( + _self: Ref<::bevy_math::prelude::IRect>, + ) -> Val<::bevy_math::prelude::IVec2> { + let output: Val<::bevy_math::prelude::IVec2> = ::bevy_math::prelude::IRect::center( + &_self, + ) + .into(); + output + } + fn clone( + _self: Ref<::bevy_math::prelude::IRect>, + ) -> Val<::bevy_math::prelude::IRect> { + let output: Val<::bevy_math::prelude::IRect> = <::bevy_math::prelude::IRect as ::core::clone::Clone>::clone( + &_self, + ) + .into(); + output + } + /// Check if a point lies within this rectangle, inclusive of its edges. + /// # Examples + /// ``` + /// # use bevy_math::IRect; + /// let r = IRect::new(0, 0, 5, 1); // w=5 h=1 + /// assert!(r.contains(r.center())); + /// assert!(r.contains(r.min)); + /// assert!(r.contains(r.max)); + /// ``` + fn contains( + _self: Ref<::bevy_math::prelude::IRect>, + point: Val<::bevy_math::prelude::IVec2>, + ) -> bool { + let output: bool = ::bevy_math::prelude::IRect::contains( + &_self, + point.into_inner(), + ) + .into(); + output + } + fn eq( + _self: Ref<::bevy_math::prelude::IRect>, + other: Ref<::bevy_math::prelude::IRect>, + ) -> bool { + let output: bool = <::bevy_math::prelude::IRect as ::core::cmp::PartialEq< + ::bevy_math::prelude::IRect, + >>::eq(&_self, &other) + .into(); + output + } + /// Create a new rectangle from its center and half-size. + /// # Panics + /// This method panics if any of the components of the half-size is negative. + /// # Examples + /// ``` + /// # use bevy_math::{IRect, IVec2}; + /// let r = IRect::from_center_half_size(IVec2::ZERO, IVec2::ONE); // w=2 h=2 + /// assert_eq!(r.min, IVec2::splat(-1)); + /// assert_eq!(r.max, IVec2::splat(1)); + /// ``` + fn from_center_half_size( + origin: Val<::bevy_math::prelude::IVec2>, + half_size: Val<::bevy_math::prelude::IVec2>, + ) -> Val<::bevy_math::prelude::IRect> { + let output: Val<::bevy_math::prelude::IRect> = ::bevy_math::prelude::IRect::from_center_half_size( + origin.into_inner(), + half_size.into_inner(), + ) + .into(); + output + } + /// Create a new rectangle from its center and size. + /// # Rounding Behavior + /// If the size contains odd numbers they will be rounded down to the nearest whole number. + /// # Panics + /// This method panics if any of the components of the size is negative. + /// # Examples + /// ``` + /// # use bevy_math::{IRect, IVec2}; + /// let r = IRect::from_center_size(IVec2::ZERO, IVec2::new(3, 2)); // w=2 h=2 + /// assert_eq!(r.min, IVec2::splat(-1)); + /// assert_eq!(r.max, IVec2::splat(1)); + /// ``` + fn from_center_size( + origin: Val<::bevy_math::prelude::IVec2>, + size: Val<::bevy_math::prelude::IVec2>, + ) -> Val<::bevy_math::prelude::IRect> { + let output: Val<::bevy_math::prelude::IRect> = ::bevy_math::prelude::IRect::from_center_size( + origin.into_inner(), + size.into_inner(), + ) + .into(); + output + } + /// Create a new rectangle from two corner points. + /// The two points do not need to be the minimum and/or maximum corners. + /// They only need to be two opposite corners. + /// # Examples + /// ``` + /// # use bevy_math::{IRect, IVec2}; + /// // Unit rect from [0,0] to [1,1] + /// let r = IRect::from_corners(IVec2::ZERO, IVec2::ONE); // w=1 h=1 + /// // Same; the points do not need to be ordered + /// let r = IRect::from_corners(IVec2::ONE, IVec2::ZERO); // w=1 h=1 + /// ``` + fn from_corners( + p0: Val<::bevy_math::prelude::IVec2>, + p1: Val<::bevy_math::prelude::IVec2>, + ) -> Val<::bevy_math::prelude::IRect> { + let output: Val<::bevy_math::prelude::IRect> = ::bevy_math::prelude::IRect::from_corners( + p0.into_inner(), + p1.into_inner(), + ) + .into(); + output + } + /// Rectangle half-size. + /// # Rounding Behavior + /// If the full size contains odd numbers they will be rounded down to the nearest whole number when calculating the half size. + /// # Examples + /// ``` + /// # use bevy_math::{IRect, IVec2}; + /// let r = IRect::new(0, 0, 4, 3); // w=4 h=3 + /// assert_eq!(r.half_size(), IVec2::new(2, 1)); + /// ``` + fn half_size( + _self: Ref<::bevy_math::prelude::IRect>, + ) -> Val<::bevy_math::prelude::IVec2> { + let output: Val<::bevy_math::prelude::IVec2> = ::bevy_math::prelude::IRect::half_size( + &_self, + ) + .into(); + output + } + /// Rectangle height (max.y - min.y). + /// # Examples + /// ``` + /// # use bevy_math::IRect; + /// let r = IRect::new(0, 0, 5, 1); // w=5 h=1 + /// assert_eq!(r.height(), 1); + /// ``` + fn height(_self: Ref<::bevy_math::prelude::IRect>) -> i32 { + let output: i32 = ::bevy_math::prelude::IRect::height(&_self).into(); + output + } + /// Create a new rectangle by expanding it evenly on all sides. + /// A positive expansion value produces a larger rectangle, + /// while a negative expansion value produces a smaller rectangle. + /// If this would result in zero or negative width or height, [`IRect::EMPTY`] is returned instead. + /// # Examples + /// ``` + /// # use bevy_math::{IRect, IVec2}; + /// let r = IRect::new(0, 0, 5, 1); // w=5 h=1 + /// let r2 = r.inflate(3); // w=11 h=7 + /// assert_eq!(r2.min, IVec2::splat(-3)); + /// assert_eq!(r2.max, IVec2::new(8, 4)); + /// let r = IRect::new(0, -1, 4, 3); // w=4 h=4 + /// let r2 = r.inflate(-1); // w=2 h=2 + /// assert_eq!(r2.min, IVec2::new(1, 0)); + /// assert_eq!(r2.max, IVec2::new(3, 2)); + /// ``` + fn inflate( + _self: Ref<::bevy_math::prelude::IRect>, + expansion: i32, + ) -> Val<::bevy_math::prelude::IRect> { + let output: Val<::bevy_math::prelude::IRect> = ::bevy_math::prelude::IRect::inflate( + &_self, + expansion, + ) + .into(); + output + } + /// Build a new rectangle formed of the intersection of this rectangle and another rectangle. + /// The intersection is the largest rectangle enclosed in both rectangles. If the intersection + /// is empty, this method returns an empty rectangle ([`IRect::is_empty()`] returns `true`), but + /// the actual values of [`IRect::min`] and [`IRect::max`] are implementation-dependent. + /// # Examples + /// ``` + /// # use bevy_math::{IRect, IVec2}; + /// let r1 = IRect::new(0, 0, 5, 1); // w=5 h=1 + /// let r2 = IRect::new(1, -1, 3, 3); // w=2 h=4 + /// let r = r1.intersect(r2); + /// assert_eq!(r.min, IVec2::new(1, 0)); + /// assert_eq!(r.max, IVec2::new(3, 1)); + /// ``` + fn intersect( + _self: Ref<::bevy_math::prelude::IRect>, + other: Val<::bevy_math::prelude::IRect>, + ) -> Val<::bevy_math::prelude::IRect> { + let output: Val<::bevy_math::prelude::IRect> = ::bevy_math::prelude::IRect::intersect( + &_self, + other.into_inner(), + ) + .into(); + output + } + /// Check if the rectangle is empty. + /// # Examples + /// ``` + /// # use bevy_math::{IRect, IVec2}; + /// let r = IRect::from_corners(IVec2::ZERO, IVec2::new(0, 1)); // w=0 h=1 + /// assert!(r.is_empty()); + /// ``` + fn is_empty(_self: Ref<::bevy_math::prelude::IRect>) -> bool { + let output: bool = ::bevy_math::prelude::IRect::is_empty(&_self).into(); + output + } + /// Create a new rectangle from two corner points. + /// The two points do not need to be the minimum and/or maximum corners. + /// They only need to be two opposite corners. + /// # Examples + /// ``` + /// # use bevy_math::IRect; + /// let r = IRect::new(0, 4, 10, 6); // w=10 h=2 + /// let r = IRect::new(2, 3, 5, -1); // w=3 h=4 + /// ``` + fn new(x0: i32, y0: i32, x1: i32, y1: i32) -> Val<::bevy_math::prelude::IRect> { + let output: Val<::bevy_math::prelude::IRect> = ::bevy_math::prelude::IRect::new( + x0, + y0, + x1, + y1, + ) + .into(); + output + } + /// Rectangle size. + /// # Examples + /// ``` + /// # use bevy_math::{IRect, IVec2}; + /// let r = IRect::new(0, 0, 5, 1); // w=5 h=1 + /// assert_eq!(r.size(), IVec2::new(5, 1)); + /// ``` + fn size( + _self: Ref<::bevy_math::prelude::IRect>, + ) -> Val<::bevy_math::prelude::IVec2> { + let output: Val<::bevy_math::prelude::IVec2> = ::bevy_math::prelude::IRect::size( + &_self, + ) + .into(); + output + } + /// Build a new rectangle formed of the union of this rectangle and another rectangle. + /// The union is the smallest rectangle enclosing both rectangles. + /// # Examples + /// ``` + /// # use bevy_math::{IRect, IVec2}; + /// let r1 = IRect::new(0, 0, 5, 1); // w=5 h=1 + /// let r2 = IRect::new(1, -1, 3, 3); // w=2 h=4 + /// let r = r1.union(r2); + /// assert_eq!(r.min, IVec2::new(0, -1)); + /// assert_eq!(r.max, IVec2::new(5, 3)); + /// ``` + fn union( + _self: Ref<::bevy_math::prelude::IRect>, + other: Val<::bevy_math::prelude::IRect>, + ) -> Val<::bevy_math::prelude::IRect> { + let output: Val<::bevy_math::prelude::IRect> = ::bevy_math::prelude::IRect::union( + &_self, + other.into_inner(), + ) + .into(); + output + } + /// Build a new rectangle formed of the union of this rectangle and a point. + /// The union is the smallest rectangle enclosing both the rectangle and the point. If the + /// point is already inside the rectangle, this method returns a copy of the rectangle. + /// # Examples + /// ``` + /// # use bevy_math::{IRect, IVec2}; + /// let r = IRect::new(0, 0, 5, 1); // w=5 h=1 + /// let u = r.union_point(IVec2::new(3, 6)); + /// assert_eq!(u.min, IVec2::ZERO); + /// assert_eq!(u.max, IVec2::new(5, 6)); + /// ``` + fn union_point( + _self: Ref<::bevy_math::prelude::IRect>, + other: Val<::bevy_math::prelude::IVec2>, + ) -> Val<::bevy_math::prelude::IRect> { + let output: Val<::bevy_math::prelude::IRect> = ::bevy_math::prelude::IRect::union_point( + &_self, + other.into_inner(), + ) + .into(); + output + } + /// Rectangle width (max.x - min.x). + /// # Examples + /// ``` + /// # use bevy_math::IRect; + /// let r = IRect::new(0, 0, 5, 1); // w=5 h=1 + /// assert_eq!(r.width(), 5); + /// ``` + fn width(_self: Ref<::bevy_math::prelude::IRect>) -> i32 { + let output: i32 = ::bevy_math::prelude::IRect::width(&_self).into(); + output + } +} +#[script_bindings( + remote, + name = "rect_functions", + bms_core_path = "bevy_mod_scripting_core", + generated +)] +impl ::bevy_math::prelude::Rect { + /// Returns self as [`IRect`] (i32) + fn as_irect( + _self: Ref<::bevy_math::prelude::Rect>, + ) -> Val<::bevy_math::prelude::IRect> { + let output: Val<::bevy_math::prelude::IRect> = ::bevy_math::prelude::Rect::as_irect( + &_self, + ) + .into(); + output + } + /// Returns self as [`URect`] (u32) + fn as_urect( + _self: Ref<::bevy_math::prelude::Rect>, + ) -> Val<::bevy_math::prelude::URect> { + let output: Val<::bevy_math::prelude::URect> = ::bevy_math::prelude::Rect::as_urect( + &_self, + ) + .into(); + output + } + /// The center point of the rectangle. + /// # Examples + /// ``` + /// # use bevy_math::{Rect, Vec2}; + /// let r = Rect::new(0., 0., 5., 1.); // w=5 h=1 + /// assert!(r.center().abs_diff_eq(Vec2::new(2.5, 0.5), 1e-5)); + /// ``` + fn center( + _self: Ref<::bevy_math::prelude::Rect>, + ) -> Val<::bevy_math::prelude::Vec2> { + let output: Val<::bevy_math::prelude::Vec2> = ::bevy_math::prelude::Rect::center( + &_self, + ) + .into(); + output + } + fn clone(_self: Ref<::bevy_math::prelude::Rect>) -> Val<::bevy_math::prelude::Rect> { + let output: Val<::bevy_math::prelude::Rect> = <::bevy_math::prelude::Rect as ::core::clone::Clone>::clone( + &_self, + ) + .into(); + output + } + /// Check if a point lies within this rectangle, inclusive of its edges. + /// # Examples + /// ``` + /// # use bevy_math::Rect; + /// let r = Rect::new(0., 0., 5., 1.); // w=5 h=1 + /// assert!(r.contains(r.center())); + /// assert!(r.contains(r.min)); + /// assert!(r.contains(r.max)); + /// ``` + fn contains( + _self: Ref<::bevy_math::prelude::Rect>, + point: Val<::bevy_math::prelude::Vec2>, + ) -> bool { + let output: bool = ::bevy_math::prelude::Rect::contains( + &_self, + point.into_inner(), + ) + .into(); + output + } + fn eq( + _self: Ref<::bevy_math::prelude::Rect>, + other: Ref<::bevy_math::prelude::Rect>, + ) -> bool { + let output: bool = <::bevy_math::prelude::Rect as ::core::cmp::PartialEq< + ::bevy_math::prelude::Rect, + >>::eq(&_self, &other) + .into(); + output + } + /// Create a new rectangle from its center and half-size. + /// # Panics + /// This method panics if any of the components of the half-size is negative. + /// # Examples + /// ``` + /// # use bevy_math::{Rect, Vec2}; + /// let r = Rect::from_center_half_size(Vec2::ZERO, Vec2::ONE); // w=2 h=2 + /// assert!(r.min.abs_diff_eq(Vec2::splat(-1.), 1e-5)); + /// assert!(r.max.abs_diff_eq(Vec2::splat(1.), 1e-5)); + /// ``` + fn from_center_half_size( + origin: Val<::bevy_math::prelude::Vec2>, + half_size: Val<::bevy_math::prelude::Vec2>, + ) -> Val<::bevy_math::prelude::Rect> { + let output: Val<::bevy_math::prelude::Rect> = ::bevy_math::prelude::Rect::from_center_half_size( + origin.into_inner(), + half_size.into_inner(), + ) + .into(); + output + } + /// Create a new rectangle from its center and size. + /// # Panics + /// This method panics if any of the components of the size is negative. + /// # Examples + /// ``` + /// # use bevy_math::{Rect, Vec2}; + /// let r = Rect::from_center_size(Vec2::ZERO, Vec2::ONE); // w=1 h=1 + /// assert!(r.min.abs_diff_eq(Vec2::splat(-0.5), 1e-5)); + /// assert!(r.max.abs_diff_eq(Vec2::splat(0.5), 1e-5)); + /// ``` + fn from_center_size( + origin: Val<::bevy_math::prelude::Vec2>, + size: Val<::bevy_math::prelude::Vec2>, + ) -> Val<::bevy_math::prelude::Rect> { + let output: Val<::bevy_math::prelude::Rect> = ::bevy_math::prelude::Rect::from_center_size( + origin.into_inner(), + size.into_inner(), + ) + .into(); + output + } + /// Create a new rectangle from two corner points. + /// The two points do not need to be the minimum and/or maximum corners. + /// They only need to be two opposite corners. + /// # Examples + /// ``` + /// # use bevy_math::{Rect, Vec2}; + /// // Unit rect from [0,0] to [1,1] + /// let r = Rect::from_corners(Vec2::ZERO, Vec2::ONE); // w=1 h=1 + /// // Same; the points do not need to be ordered + /// let r = Rect::from_corners(Vec2::ONE, Vec2::ZERO); // w=1 h=1 + /// ``` + fn from_corners( + p0: Val<::bevy_math::prelude::Vec2>, + p1: Val<::bevy_math::prelude::Vec2>, + ) -> Val<::bevy_math::prelude::Rect> { + let output: Val<::bevy_math::prelude::Rect> = ::bevy_math::prelude::Rect::from_corners( + p0.into_inner(), + p1.into_inner(), + ) + .into(); + output + } + /// Rectangle half-size. + /// # Examples + /// ``` + /// # use bevy_math::{Rect, Vec2}; + /// let r = Rect::new(0., 0., 5., 1.); // w=5 h=1 + /// assert!(r.half_size().abs_diff_eq(Vec2::new(2.5, 0.5), 1e-5)); + /// ``` + fn half_size( + _self: Ref<::bevy_math::prelude::Rect>, + ) -> Val<::bevy_math::prelude::Vec2> { + let output: Val<::bevy_math::prelude::Vec2> = ::bevy_math::prelude::Rect::half_size( + &_self, + ) + .into(); + output + } + /// Rectangle height (max.y - min.y). + /// # Examples + /// ``` + /// # use bevy_math::Rect; + /// let r = Rect::new(0., 0., 5., 1.); // w=5 h=1 + /// assert!((r.height() - 1.).abs() <= 1e-5); + /// ``` + fn height(_self: Ref<::bevy_math::prelude::Rect>) -> f32 { + let output: f32 = ::bevy_math::prelude::Rect::height(&_self).into(); + output + } + /// Create a new rectangle by expanding it evenly on all sides. + /// A positive expansion value produces a larger rectangle, + /// while a negative expansion value produces a smaller rectangle. + /// If this would result in zero or negative width or height, [`Rect::EMPTY`] is returned instead. + /// # Examples + /// ``` + /// # use bevy_math::{Rect, Vec2}; + /// let r = Rect::new(0., 0., 5., 1.); // w=5 h=1 + /// let r2 = r.inflate(3.); // w=11 h=7 + /// assert!(r2.min.abs_diff_eq(Vec2::splat(-3.), 1e-5)); + /// assert!(r2.max.abs_diff_eq(Vec2::new(8., 4.), 1e-5)); + /// let r = Rect::new(0., -1., 6., 7.); // w=6 h=8 + /// let r2 = r.inflate(-2.); // w=11 h=7 + /// assert!(r2.min.abs_diff_eq(Vec2::new(2., 1.), 1e-5)); + /// assert!(r2.max.abs_diff_eq(Vec2::new(4., 5.), 1e-5)); + /// ``` + fn inflate( + _self: Ref<::bevy_math::prelude::Rect>, + expansion: f32, + ) -> Val<::bevy_math::prelude::Rect> { + let output: Val<::bevy_math::prelude::Rect> = ::bevy_math::prelude::Rect::inflate( + &_self, + expansion, + ) + .into(); + output + } + /// Build a new rectangle formed of the intersection of this rectangle and another rectangle. + /// The intersection is the largest rectangle enclosed in both rectangles. If the intersection + /// is empty, this method returns an empty rectangle ([`Rect::is_empty()`] returns `true`), but + /// the actual values of [`Rect::min`] and [`Rect::max`] are implementation-dependent. + /// # Examples + /// ``` + /// # use bevy_math::{Rect, Vec2}; + /// let r1 = Rect::new(0., 0., 5., 1.); // w=5 h=1 + /// let r2 = Rect::new(1., -1., 3., 3.); // w=2 h=4 + /// let r = r1.intersect(r2); + /// assert!(r.min.abs_diff_eq(Vec2::new(1., 0.), 1e-5)); + /// assert!(r.max.abs_diff_eq(Vec2::new(3., 1.), 1e-5)); + /// ``` + fn intersect( + _self: Ref<::bevy_math::prelude::Rect>, + other: Val<::bevy_math::prelude::Rect>, + ) -> Val<::bevy_math::prelude::Rect> { + let output: Val<::bevy_math::prelude::Rect> = ::bevy_math::prelude::Rect::intersect( + &_self, + other.into_inner(), + ) + .into(); + output + } + /// Check if the rectangle is empty. + /// # Examples + /// ``` + /// # use bevy_math::{Rect, Vec2}; + /// let r = Rect::from_corners(Vec2::ZERO, Vec2::new(0., 1.)); // w=0 h=1 + /// assert!(r.is_empty()); + /// ``` + fn is_empty(_self: Ref<::bevy_math::prelude::Rect>) -> bool { + let output: bool = ::bevy_math::prelude::Rect::is_empty(&_self).into(); + output + } + /// Create a new rectangle from two corner points. + /// The two points do not need to be the minimum and/or maximum corners. + /// They only need to be two opposite corners. + /// # Examples + /// ``` + /// # use bevy_math::Rect; + /// let r = Rect::new(0., 4., 10., 6.); // w=10 h=2 + /// let r = Rect::new(2., 3., 5., -1.); // w=3 h=4 + /// ``` + fn new(x0: f32, y0: f32, x1: f32, y1: f32) -> Val<::bevy_math::prelude::Rect> { + let output: Val<::bevy_math::prelude::Rect> = ::bevy_math::prelude::Rect::new( + x0, + y0, + x1, + y1, + ) + .into(); + output + } + /// Build a new rectangle from this one with its coordinates expressed + /// relative to `other` in a normalized ([0..1] x [0..1]) coordinate system. + /// # Examples + /// ``` + /// # use bevy_math::{Rect, Vec2}; + /// let r = Rect::new(2., 3., 4., 6.); + /// let s = Rect::new(0., 0., 10., 10.); + /// let n = r.normalize(s); + /// assert_eq!(n.min.x, 0.2); + /// assert_eq!(n.min.y, 0.3); + /// assert_eq!(n.max.x, 0.4); + /// assert_eq!(n.max.y, 0.6); + /// ``` + fn normalize( + _self: Ref<::bevy_math::prelude::Rect>, + other: Val<::bevy_math::prelude::Rect>, + ) -> Val<::bevy_math::prelude::Rect> { + let output: Val<::bevy_math::prelude::Rect> = ::bevy_math::prelude::Rect::normalize( + &_self, + other.into_inner(), + ) + .into(); + output + } + /// Rectangle size. + /// # Examples + /// ``` + /// # use bevy_math::{Rect, Vec2}; + /// let r = Rect::new(0., 0., 5., 1.); // w=5 h=1 + /// assert!(r.size().abs_diff_eq(Vec2::new(5., 1.), 1e-5)); + /// ``` + fn size(_self: Ref<::bevy_math::prelude::Rect>) -> Val<::bevy_math::prelude::Vec2> { + let output: Val<::bevy_math::prelude::Vec2> = ::bevy_math::prelude::Rect::size( + &_self, + ) + .into(); + output + } + /// Build a new rectangle formed of the union of this rectangle and another rectangle. + /// The union is the smallest rectangle enclosing both rectangles. + /// # Examples + /// ``` + /// # use bevy_math::{Rect, Vec2}; + /// let r1 = Rect::new(0., 0., 5., 1.); // w=5 h=1 + /// let r2 = Rect::new(1., -1., 3., 3.); // w=2 h=4 + /// let r = r1.union(r2); + /// assert!(r.min.abs_diff_eq(Vec2::new(0., -1.), 1e-5)); + /// assert!(r.max.abs_diff_eq(Vec2::new(5., 3.), 1e-5)); + /// ``` + fn union( + _self: Ref<::bevy_math::prelude::Rect>, + other: Val<::bevy_math::prelude::Rect>, + ) -> Val<::bevy_math::prelude::Rect> { + let output: Val<::bevy_math::prelude::Rect> = ::bevy_math::prelude::Rect::union( + &_self, + other.into_inner(), + ) + .into(); + output + } + /// Build a new rectangle formed of the union of this rectangle and a point. + /// The union is the smallest rectangle enclosing both the rectangle and the point. If the + /// point is already inside the rectangle, this method returns a copy of the rectangle. + /// # Examples + /// ``` + /// # use bevy_math::{Rect, Vec2}; + /// let r = Rect::new(0., 0., 5., 1.); // w=5 h=1 + /// let u = r.union_point(Vec2::new(3., 6.)); + /// assert!(u.min.abs_diff_eq(Vec2::ZERO, 1e-5)); + /// assert!(u.max.abs_diff_eq(Vec2::new(5., 6.), 1e-5)); + /// ``` + fn union_point( + _self: Ref<::bevy_math::prelude::Rect>, + other: Val<::bevy_math::prelude::Vec2>, + ) -> Val<::bevy_math::prelude::Rect> { + let output: Val<::bevy_math::prelude::Rect> = ::bevy_math::prelude::Rect::union_point( + &_self, + other.into_inner(), + ) + .into(); + output + } + /// Rectangle width (max.x - min.x). + /// # Examples + /// ``` + /// # use bevy_math::Rect; + /// let r = Rect::new(0., 0., 5., 1.); // w=5 h=1 + /// assert!((r.width() - 5.).abs() <= 1e-5); + /// ``` + fn width(_self: Ref<::bevy_math::prelude::Rect>) -> f32 { + let output: f32 = ::bevy_math::prelude::Rect::width(&_self).into(); + output + } +} +#[script_bindings( + remote, + name = "u_rect_functions", + bms_core_path = "bevy_mod_scripting_core", + generated +)] +impl ::bevy_math::prelude::URect { + /// Returns self as [`IRect`] (i32) + fn as_irect( + _self: Ref<::bevy_math::prelude::URect>, + ) -> Val<::bevy_math::prelude::IRect> { + let output: Val<::bevy_math::prelude::IRect> = ::bevy_math::prelude::URect::as_irect( + &_self, + ) + .into(); + output + } + /// Returns self as [`Rect`] (f32) + fn as_rect( + _self: Ref<::bevy_math::prelude::URect>, + ) -> Val<::bevy_math::prelude::Rect> { + let output: Val<::bevy_math::prelude::Rect> = ::bevy_math::prelude::URect::as_rect( + &_self, + ) + .into(); + output + } + fn assert_receiver_is_total_eq(_self: Ref<::bevy_math::prelude::URect>) -> () { + let output: () = <::bevy_math::prelude::URect as ::core::cmp::Eq>::assert_receiver_is_total_eq( + &_self, + ) + .into(); + output + } + /// The center point of the rectangle. + /// # Rounding Behavior + /// If the (min + max) contains odd numbers they will be rounded down to the nearest whole number when calculating the center. + /// # Examples + /// ``` + /// # use bevy_math::{URect, UVec2}; + /// let r = URect::new(0, 0, 4, 2); // w=4 h=2 + /// assert_eq!(r.center(), UVec2::new(2, 1)); + /// ``` + fn center( + _self: Ref<::bevy_math::prelude::URect>, + ) -> Val<::bevy_math::prelude::UVec2> { + let output: Val<::bevy_math::prelude::UVec2> = ::bevy_math::prelude::URect::center( + &_self, + ) + .into(); + output + } + fn clone( + _self: Ref<::bevy_math::prelude::URect>, + ) -> Val<::bevy_math::prelude::URect> { + let output: Val<::bevy_math::prelude::URect> = <::bevy_math::prelude::URect as ::core::clone::Clone>::clone( + &_self, + ) + .into(); + output + } + /// Check if a point lies within this rectangle, inclusive of its edges. + /// # Examples + /// ``` + /// # use bevy_math::URect; + /// let r = URect::new(0, 0, 5, 1); // w=5 h=1 + /// assert!(r.contains(r.center())); + /// assert!(r.contains(r.min)); + /// assert!(r.contains(r.max)); + /// ``` + fn contains( + _self: Ref<::bevy_math::prelude::URect>, + point: Val<::bevy_math::prelude::UVec2>, + ) -> bool { + let output: bool = ::bevy_math::prelude::URect::contains( + &_self, + point.into_inner(), + ) + .into(); + output + } + fn eq( + _self: Ref<::bevy_math::prelude::URect>, + other: Ref<::bevy_math::prelude::URect>, + ) -> bool { + let output: bool = <::bevy_math::prelude::URect as ::core::cmp::PartialEq< + ::bevy_math::prelude::URect, + >>::eq(&_self, &other) + .into(); + output + } + /// Create a new rectangle from its center and half-size. + /// # Panics + /// This method panics if any of the components of the half-size is negative or if `origin - half_size` results in any negatives. + /// # Examples + /// ``` + /// # use bevy_math::{URect, UVec2}; + /// let r = URect::from_center_half_size(UVec2::ONE, UVec2::ONE); // w=2 h=2 + /// assert_eq!(r.min, UVec2::splat(0)); + /// assert_eq!(r.max, UVec2::splat(2)); + /// ``` + fn from_center_half_size( + origin: Val<::bevy_math::prelude::UVec2>, + half_size: Val<::bevy_math::prelude::UVec2>, + ) -> Val<::bevy_math::prelude::URect> { + let output: Val<::bevy_math::prelude::URect> = ::bevy_math::prelude::URect::from_center_half_size( + origin.into_inner(), + half_size.into_inner(), + ) + .into(); + output + } + /// Create a new rectangle from its center and size. + /// # Rounding Behavior + /// If the size contains odd numbers they will be rounded down to the nearest whole number. + /// # Panics + /// This method panics if any of the components of the size is negative or if `origin - (size / 2)` results in any negatives. + /// # Examples + /// ``` + /// # use bevy_math::{URect, UVec2}; + /// let r = URect::from_center_size(UVec2::ONE, UVec2::splat(2)); // w=2 h=2 + /// assert_eq!(r.min, UVec2::splat(0)); + /// assert_eq!(r.max, UVec2::splat(2)); + /// ``` + fn from_center_size( + origin: Val<::bevy_math::prelude::UVec2>, + size: Val<::bevy_math::prelude::UVec2>, + ) -> Val<::bevy_math::prelude::URect> { + let output: Val<::bevy_math::prelude::URect> = ::bevy_math::prelude::URect::from_center_size( + origin.into_inner(), + size.into_inner(), + ) + .into(); + output + } + /// Create a new rectangle from two corner points. + /// The two points do not need to be the minimum and/or maximum corners. + /// They only need to be two opposite corners. + /// # Examples + /// ``` + /// # use bevy_math::{URect, UVec2}; + /// // Unit rect from [0,0] to [1,1] + /// let r = URect::from_corners(UVec2::ZERO, UVec2::ONE); // w=1 h=1 + /// // Same; the points do not need to be ordered + /// let r = URect::from_corners(UVec2::ONE, UVec2::ZERO); // w=1 h=1 + /// ``` + fn from_corners( + p0: Val<::bevy_math::prelude::UVec2>, + p1: Val<::bevy_math::prelude::UVec2>, + ) -> Val<::bevy_math::prelude::URect> { + let output: Val<::bevy_math::prelude::URect> = ::bevy_math::prelude::URect::from_corners( + p0.into_inner(), + p1.into_inner(), + ) + .into(); + output + } + /// Rectangle half-size. + /// # Rounding Behavior + /// If the full size contains odd numbers they will be rounded down to the nearest whole number when calculating the half size. + /// # Examples + /// ``` + /// # use bevy_math::{URect, UVec2}; + /// let r = URect::new(0, 0, 4, 2); // w=4 h=2 + /// assert_eq!(r.half_size(), UVec2::new(2, 1)); + /// ``` + fn half_size( + _self: Ref<::bevy_math::prelude::URect>, + ) -> Val<::bevy_math::prelude::UVec2> { + let output: Val<::bevy_math::prelude::UVec2> = ::bevy_math::prelude::URect::half_size( + &_self, + ) + .into(); + output + } + /// Rectangle height (max.y - min.y). + /// # Examples + /// ``` + /// # use bevy_math::URect; + /// let r = URect::new(0, 0, 5, 1); // w=5 h=1 + /// assert_eq!(r.height(), 1); + /// ``` + fn height(_self: Ref<::bevy_math::prelude::URect>) -> u32 { + let output: u32 = ::bevy_math::prelude::URect::height(&_self).into(); + output + } + /// Create a new rectangle by expanding it evenly on all sides. + /// A positive expansion value produces a larger rectangle, + /// while a negative expansion value produces a smaller rectangle. + /// If this would result in zero width or height, [`URect::EMPTY`] is returned instead. + /// # Examples + /// ``` + /// # use bevy_math::{URect, UVec2}; + /// let r = URect::new(4, 4, 6, 6); // w=2 h=2 + /// let r2 = r.inflate(1); // w=4 h=4 + /// assert_eq!(r2.min, UVec2::splat(3)); + /// assert_eq!(r2.max, UVec2::splat(7)); + /// let r = URect::new(4, 4, 8, 8); // w=4 h=4 + /// let r2 = r.inflate(-1); // w=2 h=2 + /// assert_eq!(r2.min, UVec2::splat(5)); + /// assert_eq!(r2.max, UVec2::splat(7)); + /// ``` + fn inflate( + _self: Ref<::bevy_math::prelude::URect>, + expansion: i32, + ) -> Val<::bevy_math::prelude::URect> { + let output: Val<::bevy_math::prelude::URect> = ::bevy_math::prelude::URect::inflate( + &_self, + expansion, + ) + .into(); + output + } + /// Build a new rectangle formed of the intersection of this rectangle and another rectangle. + /// The intersection is the largest rectangle enclosed in both rectangles. If the intersection + /// is empty, this method returns an empty rectangle ([`URect::is_empty()`] returns `true`), but + /// the actual values of [`URect::min`] and [`URect::max`] are implementation-dependent. + /// # Examples + /// ``` + /// # use bevy_math::{URect, UVec2}; + /// let r1 = URect::new(0, 0, 2, 2); // w=2 h=2 + /// let r2 = URect::new(1, 1, 3, 3); // w=2 h=2 + /// let r = r1.intersect(r2); + /// assert_eq!(r.min, UVec2::new(1, 1)); + /// assert_eq!(r.max, UVec2::new(2, 2)); + /// ``` + fn intersect( + _self: Ref<::bevy_math::prelude::URect>, + other: Val<::bevy_math::prelude::URect>, + ) -> Val<::bevy_math::prelude::URect> { + let output: Val<::bevy_math::prelude::URect> = ::bevy_math::prelude::URect::intersect( + &_self, + other.into_inner(), + ) + .into(); + output + } + /// Check if the rectangle is empty. + /// # Examples + /// ``` + /// # use bevy_math::{URect, UVec2}; + /// let r = URect::from_corners(UVec2::ZERO, UVec2::new(0, 1)); // w=0 h=1 + /// assert!(r.is_empty()); + /// ``` + fn is_empty(_self: Ref<::bevy_math::prelude::URect>) -> bool { + let output: bool = ::bevy_math::prelude::URect::is_empty(&_self).into(); + output + } + /// Create a new rectangle from two corner points. + /// The two points do not need to be the minimum and/or maximum corners. + /// They only need to be two opposite corners. + /// # Examples + /// ``` + /// # use bevy_math::URect; + /// let r = URect::new(0, 4, 10, 6); // w=10 h=2 + /// let r = URect::new(2, 4, 5, 0); // w=3 h=4 + /// ``` + fn new(x0: u32, y0: u32, x1: u32, y1: u32) -> Val<::bevy_math::prelude::URect> { + let output: Val<::bevy_math::prelude::URect> = ::bevy_math::prelude::URect::new( + x0, + y0, + x1, + y1, + ) + .into(); + output + } + /// Rectangle size. + /// # Examples + /// ``` + /// # use bevy_math::{URect, UVec2}; + /// let r = URect::new(0, 0, 5, 1); // w=5 h=1 + /// assert_eq!(r.size(), UVec2::new(5, 1)); + /// ``` + fn size( + _self: Ref<::bevy_math::prelude::URect>, + ) -> Val<::bevy_math::prelude::UVec2> { + let output: Val<::bevy_math::prelude::UVec2> = ::bevy_math::prelude::URect::size( + &_self, + ) + .into(); + output + } + /// Build a new rectangle formed of the union of this rectangle and another rectangle. + /// The union is the smallest rectangle enclosing both rectangles. + /// # Examples + /// ``` + /// # use bevy_math::{URect, UVec2}; + /// let r1 = URect::new(0, 0, 5, 1); // w=5 h=1 + /// let r2 = URect::new(1, 0, 3, 8); // w=2 h=4 + /// let r = r1.union(r2); + /// assert_eq!(r.min, UVec2::new(0, 0)); + /// assert_eq!(r.max, UVec2::new(5, 8)); + /// ``` + fn union( + _self: Ref<::bevy_math::prelude::URect>, + other: Val<::bevy_math::prelude::URect>, + ) -> Val<::bevy_math::prelude::URect> { + let output: Val<::bevy_math::prelude::URect> = ::bevy_math::prelude::URect::union( + &_self, + other.into_inner(), + ) + .into(); + output + } + /// Build a new rectangle formed of the union of this rectangle and a point. + /// The union is the smallest rectangle enclosing both the rectangle and the point. If the + /// point is already inside the rectangle, this method returns a copy of the rectangle. + /// # Examples + /// ``` + /// # use bevy_math::{URect, UVec2}; + /// let r = URect::new(0, 0, 5, 1); // w=5 h=1 + /// let u = r.union_point(UVec2::new(3, 6)); + /// assert_eq!(u.min, UVec2::ZERO); + /// assert_eq!(u.max, UVec2::new(5, 6)); + /// ``` + fn union_point( + _self: Ref<::bevy_math::prelude::URect>, + other: Val<::bevy_math::prelude::UVec2>, + ) -> Val<::bevy_math::prelude::URect> { + let output: Val<::bevy_math::prelude::URect> = ::bevy_math::prelude::URect::union_point( + &_self, + other.into_inner(), + ) + .into(); + output + } + /// Rectangle width (max.x - min.x). + /// # Examples + /// ``` + /// # use bevy_math::URect; + /// let r = URect::new(0, 0, 5, 1); // w=5 h=1 + /// assert_eq!(r.width(), 5); + /// ``` + fn width(_self: Ref<::bevy_math::prelude::URect>) -> u32 { + let output: u32 = ::bevy_math::prelude::URect::width(&_self).into(); + output + } +} +#[script_bindings( + remote, + name = "affine_3_functions", + bms_core_path = "bevy_mod_scripting_core", + generated +)] +impl ::bevy_math::Affine3 {} +#[script_bindings( + remote, + name = "aabb_2_d_functions", + bms_core_path = "bevy_mod_scripting_core", + generated +)] +impl ::bevy_math::bounding::Aabb2d { + /// Computes the smallest [`BoundingCircle`] containing this [`Aabb2d`]. + fn bounding_circle( + _self: Ref<::bevy_math::bounding::Aabb2d>, + ) -> Val<::bevy_math::bounding::BoundingCircle> { + let output: Val<::bevy_math::bounding::BoundingCircle> = ::bevy_math::bounding::Aabb2d::bounding_circle( + &_self, + ) + .into(); + output + } + fn clone( + _self: Ref<::bevy_math::bounding::Aabb2d>, + ) -> Val<::bevy_math::bounding::Aabb2d> { + let output: Val<::bevy_math::bounding::Aabb2d> = <::bevy_math::bounding::Aabb2d as ::core::clone::Clone>::clone( + &_self, + ) + .into(); + output + } + /// Finds the point on the AABB that is closest to the given `point`. + /// If the point is outside the AABB, the returned point will be on the perimeter of the AABB. + /// Otherwise, it will be inside the AABB and returned as is. + fn closest_point( + _self: Ref<::bevy_math::bounding::Aabb2d>, + point: Val<::bevy_math::prelude::Vec2>, + ) -> Val<::bevy_math::prelude::Vec2> { + let output: Val<::bevy_math::prelude::Vec2> = ::bevy_math::bounding::Aabb2d::closest_point( + &_self, + point.into_inner(), + ) + .into(); + output + } + fn eq( + _self: Ref<::bevy_math::bounding::Aabb2d>, + other: Ref<::bevy_math::bounding::Aabb2d>, + ) -> bool { + let output: bool = <::bevy_math::bounding::Aabb2d as ::core::cmp::PartialEq< + ::bevy_math::bounding::Aabb2d, + >>::eq(&_self, &other) + .into(); + output + } + /// Constructs an AABB from its center and half-size. + fn new( + center: Val<::bevy_math::prelude::Vec2>, + half_size: Val<::bevy_math::prelude::Vec2>, + ) -> Val<::bevy_math::bounding::Aabb2d> { + let output: Val<::bevy_math::bounding::Aabb2d> = ::bevy_math::bounding::Aabb2d::new( + center.into_inner(), + half_size.into_inner(), + ) + .into(); + output + } +} +#[script_bindings( + remote, + name = "bounding_circle_functions", + bms_core_path = "bevy_mod_scripting_core", + generated +)] +impl ::bevy_math::bounding::BoundingCircle { + /// Computes the smallest [`Aabb2d`] containing this [`BoundingCircle`]. + fn aabb_2d( + _self: Ref<::bevy_math::bounding::BoundingCircle>, + ) -> Val<::bevy_math::bounding::Aabb2d> { + let output: Val<::bevy_math::bounding::Aabb2d> = ::bevy_math::bounding::BoundingCircle::aabb_2d( + &_self, + ) + .into(); + output + } + fn clone( + _self: Ref<::bevy_math::bounding::BoundingCircle>, + ) -> Val<::bevy_math::bounding::BoundingCircle> { + let output: Val<::bevy_math::bounding::BoundingCircle> = <::bevy_math::bounding::BoundingCircle as ::core::clone::Clone>::clone( + &_self, + ) + .into(); + output + } + /// Finds the point on the bounding circle that is closest to the given `point`. + /// If the point is outside the circle, the returned point will be on the perimeter of the circle. + /// Otherwise, it will be inside the circle and returned as is. + fn closest_point( + _self: Ref<::bevy_math::bounding::BoundingCircle>, + point: Val<::bevy_math::prelude::Vec2>, + ) -> Val<::bevy_math::prelude::Vec2> { + let output: Val<::bevy_math::prelude::Vec2> = ::bevy_math::bounding::BoundingCircle::closest_point( + &_self, + point.into_inner(), + ) + .into(); + output + } + fn eq( + _self: Ref<::bevy_math::bounding::BoundingCircle>, + other: Ref<::bevy_math::bounding::BoundingCircle>, + ) -> bool { + let output: bool = <::bevy_math::bounding::BoundingCircle as ::core::cmp::PartialEq< + ::bevy_math::bounding::BoundingCircle, + >>::eq(&_self, &other) + .into(); + output + } + /// Constructs a bounding circle from its center and radius. + fn new( + center: Val<::bevy_math::prelude::Vec2>, + radius: f32, + ) -> Val<::bevy_math::bounding::BoundingCircle> { + let output: Val<::bevy_math::bounding::BoundingCircle> = ::bevy_math::bounding::BoundingCircle::new( + center.into_inner(), + radius, + ) + .into(); + output + } + /// Get the radius of the bounding circle + fn radius(_self: Ref<::bevy_math::bounding::BoundingCircle>) -> f32 { + let output: f32 = ::bevy_math::bounding::BoundingCircle::radius(&_self).into(); + output + } +} +#[script_bindings( + remote, + name = "circle_functions", + bms_core_path = "bevy_mod_scripting_core", + generated +)] +impl ::bevy_math::primitives::Circle { + fn clone( + _self: Ref<::bevy_math::primitives::Circle>, + ) -> Val<::bevy_math::primitives::Circle> { + let output: Val<::bevy_math::primitives::Circle> = <::bevy_math::primitives::Circle as ::core::clone::Clone>::clone( + &_self, + ) + .into(); + output + } + /// Finds the point on the circle that is closest to the given `point`. + /// If the point is outside the circle, the returned point will be on the perimeter of the circle. + /// Otherwise, it will be inside the circle and returned as is. + fn closest_point( + _self: Ref<::bevy_math::primitives::Circle>, + point: Val<::bevy_math::prelude::Vec2>, + ) -> Val<::bevy_math::prelude::Vec2> { + let output: Val<::bevy_math::prelude::Vec2> = ::bevy_math::primitives::Circle::closest_point( + &_self, + point.into_inner(), + ) + .into(); + output + } + /// Get the diameter of the circle + fn diameter(_self: Ref<::bevy_math::primitives::Circle>) -> f32 { + let output: f32 = ::bevy_math::primitives::Circle::diameter(&_self).into(); + output + } + fn eq( + _self: Ref<::bevy_math::primitives::Circle>, + other: Ref<::bevy_math::primitives::Circle>, + ) -> bool { + let output: bool = <::bevy_math::primitives::Circle as ::core::cmp::PartialEq< + ::bevy_math::primitives::Circle, + >>::eq(&_self, &other) + .into(); + output + } + /// Create a new [`Circle`] from a `radius` + fn new(radius: f32) -> Val<::bevy_math::primitives::Circle> { + let output: Val<::bevy_math::primitives::Circle> = ::bevy_math::primitives::Circle::new( + radius, + ) + .into(); + output + } +} +#[script_bindings( + remote, + name = "annulus_functions", + bms_core_path = "bevy_mod_scripting_core", + generated +)] +impl ::bevy_math::primitives::Annulus { + fn clone( + _self: Ref<::bevy_math::primitives::Annulus>, + ) -> Val<::bevy_math::primitives::Annulus> { + let output: Val<::bevy_math::primitives::Annulus> = <::bevy_math::primitives::Annulus as ::core::clone::Clone>::clone( + &_self, + ) + .into(); + output + } + /// Finds the point on the annulus that is closest to the given `point`: + /// - If the point is outside of the annulus completely, the returned point will be on the outer perimeter. + /// - If the point is inside of the inner circle (hole) of the annulus, the returned point will be on the inner perimeter. + /// - Otherwise, the returned point is overlapping the annulus and returned as is. + fn closest_point( + _self: Ref<::bevy_math::primitives::Annulus>, + point: Val<::bevy_math::prelude::Vec2>, + ) -> Val<::bevy_math::prelude::Vec2> { + let output: Val<::bevy_math::prelude::Vec2> = ::bevy_math::primitives::Annulus::closest_point( + &_self, + point.into_inner(), + ) + .into(); + output + } + /// Get the diameter of the annulus + fn diameter(_self: Ref<::bevy_math::primitives::Annulus>) -> f32 { + let output: f32 = ::bevy_math::primitives::Annulus::diameter(&_self).into(); + output + } + fn eq( + _self: Ref<::bevy_math::primitives::Annulus>, + other: Ref<::bevy_math::primitives::Annulus>, + ) -> bool { + let output: bool = <::bevy_math::primitives::Annulus as ::core::cmp::PartialEq< + ::bevy_math::primitives::Annulus, + >>::eq(&_self, &other) + .into(); + output + } + /// Create a new [`Annulus`] from the radii of the inner and outer circle + fn new( + inner_radius: f32, + outer_radius: f32, + ) -> Val<::bevy_math::primitives::Annulus> { + let output: Val<::bevy_math::primitives::Annulus> = ::bevy_math::primitives::Annulus::new( + inner_radius, + outer_radius, + ) + .into(); + output + } + /// Get the thickness of the annulus + fn thickness(_self: Ref<::bevy_math::primitives::Annulus>) -> f32 { + let output: f32 = ::bevy_math::primitives::Annulus::thickness(&_self).into(); + output + } +} +#[script_bindings( + remote, + name = "arc_2_d_functions", + bms_core_path = "bevy_mod_scripting_core", + generated +)] +impl ::bevy_math::primitives::Arc2d { + /// Get the angle of the arc + fn angle(_self: Ref<::bevy_math::primitives::Arc2d>) -> f32 { + let output: f32 = ::bevy_math::primitives::Arc2d::angle(&_self).into(); + output + } + /// Get the length of the apothem of this arc, that is, + /// the distance from the center of the circle to the midpoint of the chord, in the direction of the midpoint of the arc. + /// Equivalently, the [`radius`](Self::radius) minus the [`sagitta`](Self::sagitta). + /// Note that for a [`major`](Self::is_major) arc, the apothem will be negative. + fn apothem(_self: Ref<::bevy_math::primitives::Arc2d>) -> f32 { + let output: f32 = ::bevy_math::primitives::Arc2d::apothem(&_self).into(); + output + } + /// Get the distance between the endpoints (the length of the chord) + fn chord_length(_self: Ref<::bevy_math::primitives::Arc2d>) -> f32 { + let output: f32 = ::bevy_math::primitives::Arc2d::chord_length(&_self).into(); + output + } + /// Get the midpoint of the two endpoints (the midpoint of the chord) + fn chord_midpoint( + _self: Ref<::bevy_math::primitives::Arc2d>, + ) -> Val<::bevy_math::prelude::Vec2> { + let output: Val<::bevy_math::prelude::Vec2> = ::bevy_math::primitives::Arc2d::chord_midpoint( + &_self, + ) + .into(); + output + } + fn clone( + _self: Ref<::bevy_math::primitives::Arc2d>, + ) -> Val<::bevy_math::primitives::Arc2d> { + let output: Val<::bevy_math::primitives::Arc2d> = <::bevy_math::primitives::Arc2d as ::core::clone::Clone>::clone( + &_self, + ) + .into(); + output + } + fn eq( + _self: Ref<::bevy_math::primitives::Arc2d>, + other: Ref<::bevy_math::primitives::Arc2d>, + ) -> bool { + let output: bool = <::bevy_math::primitives::Arc2d as ::core::cmp::PartialEq< + ::bevy_math::primitives::Arc2d, + >>::eq(&_self, &other) + .into(); + output + } + /// Create a new [`Arc2d`] from a `radius` and an `angle` in degrees. + fn from_degrees(radius: f32, angle: f32) -> Val<::bevy_math::primitives::Arc2d> { + let output: Val<::bevy_math::primitives::Arc2d> = ::bevy_math::primitives::Arc2d::from_degrees( + radius, + angle, + ) + .into(); + output + } + /// Create a new [`Arc2d`] from a `radius` and an `angle` in radians + fn from_radians(radius: f32, angle: f32) -> Val<::bevy_math::primitives::Arc2d> { + let output: Val<::bevy_math::primitives::Arc2d> = ::bevy_math::primitives::Arc2d::from_radians( + radius, + angle, + ) + .into(); + output + } + /// Create a new [`Arc2d`] from a `radius` and a `fraction` of a single turn. + /// For instance, `0.5` turns is a semicircle. + fn from_turns(radius: f32, fraction: f32) -> Val<::bevy_math::primitives::Arc2d> { + let output: Val<::bevy_math::primitives::Arc2d> = ::bevy_math::primitives::Arc2d::from_turns( + radius, + fraction, + ) + .into(); + output + } + /// Get half the distance between the endpoints (half the length of the chord) + fn half_chord_length(_self: Ref<::bevy_math::primitives::Arc2d>) -> f32 { + let output: f32 = ::bevy_math::primitives::Arc2d::half_chord_length(&_self) + .into(); + output + } + /// Produces true if the arc is at least half a circle. + /// **Note:** This is not the negation of [`is_minor`](Self::is_minor): an exact semicircle is both major and minor. + fn is_major(_self: Ref<::bevy_math::primitives::Arc2d>) -> bool { + let output: bool = ::bevy_math::primitives::Arc2d::is_major(&_self).into(); + output + } + /// Produces true if the arc is at most half a circle. + /// **Note:** This is not the negation of [`is_major`](Self::is_major): an exact semicircle is both major and minor. + fn is_minor(_self: Ref<::bevy_math::primitives::Arc2d>) -> bool { + let output: bool = ::bevy_math::primitives::Arc2d::is_minor(&_self).into(); + output + } + /// Get the left-hand end point of the arc + fn left_endpoint( + _self: Ref<::bevy_math::primitives::Arc2d>, + ) -> Val<::bevy_math::prelude::Vec2> { + let output: Val<::bevy_math::prelude::Vec2> = ::bevy_math::primitives::Arc2d::left_endpoint( + &_self, + ) + .into(); + output + } + /// Get the length of the arc + fn length(_self: Ref<::bevy_math::primitives::Arc2d>) -> f32 { + let output: f32 = ::bevy_math::primitives::Arc2d::length(&_self).into(); + output + } + /// Get the midpoint of the arc + fn midpoint( + _self: Ref<::bevy_math::primitives::Arc2d>, + ) -> Val<::bevy_math::prelude::Vec2> { + let output: Val<::bevy_math::prelude::Vec2> = ::bevy_math::primitives::Arc2d::midpoint( + &_self, + ) + .into(); + output + } + /// Create a new [`Arc2d`] from a `radius` and a `half_angle` + fn new(radius: f32, half_angle: f32) -> Val<::bevy_math::primitives::Arc2d> { + let output: Val<::bevy_math::primitives::Arc2d> = ::bevy_math::primitives::Arc2d::new( + radius, + half_angle, + ) + .into(); + output + } + /// Get the right-hand end point of the arc + fn right_endpoint( + _self: Ref<::bevy_math::primitives::Arc2d>, + ) -> Val<::bevy_math::prelude::Vec2> { + let output: Val<::bevy_math::prelude::Vec2> = ::bevy_math::primitives::Arc2d::right_endpoint( + &_self, + ) + .into(); + output + } + /// Get the length of the sagitta of this arc, that is, + /// the length of the line between the midpoints of the arc and its chord. + /// Equivalently, the height of the triangle whose base is the chord and whose apex is the midpoint of the arc. + /// The sagitta is also the sum of the [`radius`](Self::radius) and the [`apothem`](Self::apothem). + fn sagitta(_self: Ref<::bevy_math::primitives::Arc2d>) -> f32 { + let output: f32 = ::bevy_math::primitives::Arc2d::sagitta(&_self).into(); + output + } +} +#[script_bindings( + remote, + name = "capsule_2_d_functions", + bms_core_path = "bevy_mod_scripting_core", + generated +)] +impl ::bevy_math::primitives::Capsule2d { + fn clone( + _self: Ref<::bevy_math::primitives::Capsule2d>, + ) -> Val<::bevy_math::primitives::Capsule2d> { + let output: Val<::bevy_math::primitives::Capsule2d> = <::bevy_math::primitives::Capsule2d as ::core::clone::Clone>::clone( + &_self, + ) + .into(); + output + } + fn eq( + _self: Ref<::bevy_math::primitives::Capsule2d>, + other: Ref<::bevy_math::primitives::Capsule2d>, + ) -> bool { + let output: bool = <::bevy_math::primitives::Capsule2d as ::core::cmp::PartialEq< + ::bevy_math::primitives::Capsule2d, + >>::eq(&_self, &other) + .into(); + output + } + /// Create a new `Capsule2d` from a radius and length + fn new(radius: f32, length: f32) -> Val<::bevy_math::primitives::Capsule2d> { + let output: Val<::bevy_math::primitives::Capsule2d> = ::bevy_math::primitives::Capsule2d::new( + radius, + length, + ) + .into(); + output + } + /// Get the part connecting the semicircular ends of the capsule as a [`Rectangle`] + fn to_inner_rectangle( + _self: Ref<::bevy_math::primitives::Capsule2d>, + ) -> Val<::bevy_math::primitives::Rectangle> { + let output: Val<::bevy_math::primitives::Rectangle> = ::bevy_math::primitives::Capsule2d::to_inner_rectangle( + &_self, + ) + .into(); + output + } +} +#[script_bindings( + remote, + name = "circular_sector_functions", + bms_core_path = "bevy_mod_scripting_core", + generated +)] +impl ::bevy_math::primitives::CircularSector { + /// Get the angle of the sector + fn angle(_self: Ref<::bevy_math::primitives::CircularSector>) -> f32 { + let output: f32 = ::bevy_math::primitives::CircularSector::angle(&_self).into(); + output + } + /// Get the length of the apothem of this sector + /// See [`Arc2d::apothem`] + fn apothem(_self: Ref<::bevy_math::primitives::CircularSector>) -> f32 { + let output: f32 = ::bevy_math::primitives::CircularSector::apothem(&_self) + .into(); + output + } + /// Get the length of the arc defining the sector + fn arc_length(_self: Ref<::bevy_math::primitives::CircularSector>) -> f32 { + let output: f32 = ::bevy_math::primitives::CircularSector::arc_length(&_self) + .into(); + output + } + /// Get the length of the chord defined by the sector + /// See [`Arc2d::chord_length`] + fn chord_length(_self: Ref<::bevy_math::primitives::CircularSector>) -> f32 { + let output: f32 = ::bevy_math::primitives::CircularSector::chord_length(&_self) + .into(); + output + } + /// Get the midpoint of the chord defined by the sector + /// See [`Arc2d::chord_midpoint`] + fn chord_midpoint( + _self: Ref<::bevy_math::primitives::CircularSector>, + ) -> Val<::bevy_math::prelude::Vec2> { + let output: Val<::bevy_math::prelude::Vec2> = ::bevy_math::primitives::CircularSector::chord_midpoint( + &_self, + ) + .into(); + output + } + fn clone( + _self: Ref<::bevy_math::primitives::CircularSector>, + ) -> Val<::bevy_math::primitives::CircularSector> { + let output: Val<::bevy_math::primitives::CircularSector> = <::bevy_math::primitives::CircularSector as ::core::clone::Clone>::clone( + &_self, + ) + .into(); + output + } + fn eq( + _self: Ref<::bevy_math::primitives::CircularSector>, + other: Ref<::bevy_math::primitives::CircularSector>, + ) -> bool { + let output: bool = <::bevy_math::primitives::CircularSector as ::core::cmp::PartialEq< + ::bevy_math::primitives::CircularSector, + >>::eq(&_self, &other) + .into(); + output + } + /// Create a new [`CircularSector`] from a `radius` and an `angle` in degrees. + fn from_degrees( + radius: f32, + angle: f32, + ) -> Val<::bevy_math::primitives::CircularSector> { + let output: Val<::bevy_math::primitives::CircularSector> = ::bevy_math::primitives::CircularSector::from_degrees( + radius, + angle, + ) + .into(); + output + } + /// Create a new [`CircularSector`] from a `radius` and an `angle` in radians. + fn from_radians( + radius: f32, + angle: f32, + ) -> Val<::bevy_math::primitives::CircularSector> { + let output: Val<::bevy_math::primitives::CircularSector> = ::bevy_math::primitives::CircularSector::from_radians( + radius, + angle, + ) + .into(); + output + } + /// Create a new [`CircularSector`] from a `radius` and a number of `turns` of a circle. + /// For instance, `0.5` turns is a semicircle. + fn from_turns( + radius: f32, + fraction: f32, + ) -> Val<::bevy_math::primitives::CircularSector> { + let output: Val<::bevy_math::primitives::CircularSector> = ::bevy_math::primitives::CircularSector::from_turns( + radius, + fraction, + ) + .into(); + output + } + /// Get half the angle of the sector + fn half_angle(_self: Ref<::bevy_math::primitives::CircularSector>) -> f32 { + let output: f32 = ::bevy_math::primitives::CircularSector::half_angle(&_self) + .into(); + output + } + /// Get half the length of the chord defined by the sector + /// See [`Arc2d::half_chord_length`] + fn half_chord_length(_self: Ref<::bevy_math::primitives::CircularSector>) -> f32 { + let output: f32 = ::bevy_math::primitives::CircularSector::half_chord_length( + &_self, + ) + .into(); + output + } + /// Create a new [`CircularSector`] from a `radius` and an `angle` + fn new(radius: f32, angle: f32) -> Val<::bevy_math::primitives::CircularSector> { + let output: Val<::bevy_math::primitives::CircularSector> = ::bevy_math::primitives::CircularSector::new( + radius, + angle, + ) + .into(); + output + } + /// Get the radius of the sector + fn radius(_self: Ref<::bevy_math::primitives::CircularSector>) -> f32 { + let output: f32 = ::bevy_math::primitives::CircularSector::radius(&_self).into(); + output + } + /// Get the length of the sagitta of this sector + /// See [`Arc2d::sagitta`] + fn sagitta(_self: Ref<::bevy_math::primitives::CircularSector>) -> f32 { + let output: f32 = ::bevy_math::primitives::CircularSector::sagitta(&_self) + .into(); + output + } +} +#[script_bindings( + remote, + name = "circular_segment_functions", + bms_core_path = "bevy_mod_scripting_core", + generated +)] +impl ::bevy_math::primitives::CircularSegment { + /// Get the angle of the segment + fn angle(_self: Ref<::bevy_math::primitives::CircularSegment>) -> f32 { + let output: f32 = ::bevy_math::primitives::CircularSegment::angle(&_self).into(); + output + } + /// Get the length of the apothem of this segment, + /// which is the signed distance between the segment and the center of its circle + /// See [`Arc2d::apothem`] + fn apothem(_self: Ref<::bevy_math::primitives::CircularSegment>) -> f32 { + let output: f32 = ::bevy_math::primitives::CircularSegment::apothem(&_self) + .into(); + output + } + /// Get the length of the arc defining the segment + fn arc_length(_self: Ref<::bevy_math::primitives::CircularSegment>) -> f32 { + let output: f32 = ::bevy_math::primitives::CircularSegment::arc_length(&_self) + .into(); + output + } + /// Get the length of the segment's base, also known as its chord + fn chord_length(_self: Ref<::bevy_math::primitives::CircularSegment>) -> f32 { + let output: f32 = ::bevy_math::primitives::CircularSegment::chord_length(&_self) + .into(); + output + } + /// Get the midpoint of the segment's base, also known as its chord + fn chord_midpoint( + _self: Ref<::bevy_math::primitives::CircularSegment>, + ) -> Val<::bevy_math::prelude::Vec2> { + let output: Val<::bevy_math::prelude::Vec2> = ::bevy_math::primitives::CircularSegment::chord_midpoint( + &_self, + ) + .into(); + output + } + fn clone( + _self: Ref<::bevy_math::primitives::CircularSegment>, + ) -> Val<::bevy_math::primitives::CircularSegment> { + let output: Val<::bevy_math::primitives::CircularSegment> = <::bevy_math::primitives::CircularSegment as ::core::clone::Clone>::clone( + &_self, + ) + .into(); + output + } + fn eq( + _self: Ref<::bevy_math::primitives::CircularSegment>, + other: Ref<::bevy_math::primitives::CircularSegment>, + ) -> bool { + let output: bool = <::bevy_math::primitives::CircularSegment as ::core::cmp::PartialEq< + ::bevy_math::primitives::CircularSegment, + >>::eq(&_self, &other) + .into(); + output + } + /// Create a new [`CircularSegment`] from a `radius` and an `angle` in degrees. + fn from_degrees( + radius: f32, + angle: f32, + ) -> Val<::bevy_math::primitives::CircularSegment> { + let output: Val<::bevy_math::primitives::CircularSegment> = ::bevy_math::primitives::CircularSegment::from_degrees( + radius, + angle, + ) + .into(); + output + } + /// Create a new [`CircularSegment`] from a `radius` and an `angle` in radians. + fn from_radians( + radius: f32, + angle: f32, + ) -> Val<::bevy_math::primitives::CircularSegment> { + let output: Val<::bevy_math::primitives::CircularSegment> = ::bevy_math::primitives::CircularSegment::from_radians( + radius, + angle, + ) + .into(); + output + } + /// Create a new [`CircularSegment`] from a `radius` and a number of `turns` of a circle. + /// For instance, `0.5` turns is a semicircle. + fn from_turns( + radius: f32, + fraction: f32, + ) -> Val<::bevy_math::primitives::CircularSegment> { + let output: Val<::bevy_math::primitives::CircularSegment> = ::bevy_math::primitives::CircularSegment::from_turns( + radius, + fraction, + ) + .into(); + output + } + /// Get the half-angle of the segment + fn half_angle(_self: Ref<::bevy_math::primitives::CircularSegment>) -> f32 { + let output: f32 = ::bevy_math::primitives::CircularSegment::half_angle(&_self) + .into(); + output + } + /// Get half the length of the segment's base, also known as its chord + fn half_chord_length(_self: Ref<::bevy_math::primitives::CircularSegment>) -> f32 { + let output: f32 = ::bevy_math::primitives::CircularSegment::half_chord_length( + &_self, + ) + .into(); + output + } + /// Create a new [`CircularSegment`] from a `radius`, and an `angle` + fn new(radius: f32, angle: f32) -> Val<::bevy_math::primitives::CircularSegment> { + let output: Val<::bevy_math::primitives::CircularSegment> = ::bevy_math::primitives::CircularSegment::new( + radius, + angle, + ) + .into(); + output + } + /// Get the radius of the segment + fn radius(_self: Ref<::bevy_math::primitives::CircularSegment>) -> f32 { + let output: f32 = ::bevy_math::primitives::CircularSegment::radius(&_self) + .into(); + output + } + /// Get the length of the sagitta of this segment, also known as its height + /// See [`Arc2d::sagitta`] + fn sagitta(_self: Ref<::bevy_math::primitives::CircularSegment>) -> f32 { + let output: f32 = ::bevy_math::primitives::CircularSegment::sagitta(&_self) + .into(); + output + } +} +#[script_bindings( + remote, + name = "ellipse_functions", + bms_core_path = "bevy_mod_scripting_core", + generated +)] +impl ::bevy_math::primitives::Ellipse { + fn clone( + _self: Ref<::bevy_math::primitives::Ellipse>, + ) -> Val<::bevy_math::primitives::Ellipse> { + let output: Val<::bevy_math::primitives::Ellipse> = <::bevy_math::primitives::Ellipse as ::core::clone::Clone>::clone( + &_self, + ) + .into(); + output + } + /// Returns the [eccentricity](https://en.wikipedia.org/wiki/Eccentricity_(mathematics)) of the ellipse. + /// It can be thought of as a measure of how "stretched" or elongated the ellipse is. + /// The value should be in the range [0, 1), where 0 represents a circle, and 1 represents a parabola. + fn eccentricity(_self: Ref<::bevy_math::primitives::Ellipse>) -> f32 { + let output: f32 = ::bevy_math::primitives::Ellipse::eccentricity(&_self).into(); + output + } + fn eq( + _self: Ref<::bevy_math::primitives::Ellipse>, + other: Ref<::bevy_math::primitives::Ellipse>, + ) -> bool { + let output: bool = <::bevy_math::primitives::Ellipse as ::core::cmp::PartialEq< + ::bevy_math::primitives::Ellipse, + >>::eq(&_self, &other) + .into(); + output + } + /// Get the focal length of the ellipse. This corresponds to the distance between one of the foci and the center of the ellipse. + /// The focal length of an ellipse is related to its eccentricity by `eccentricity = focal_length / semi_major` + fn focal_length(_self: Ref<::bevy_math::primitives::Ellipse>) -> f32 { + let output: f32 = ::bevy_math::primitives::Ellipse::focal_length(&_self).into(); + output + } + /// Create a new `Ellipse` from a given full size. + /// `size.x` is the diameter along the X axis, and `size.y` is the diameter along the Y axis. + fn from_size( + size: Val<::bevy_math::prelude::Vec2>, + ) -> Val<::bevy_math::primitives::Ellipse> { + let output: Val<::bevy_math::primitives::Ellipse> = ::bevy_math::primitives::Ellipse::from_size( + size.into_inner(), + ) + .into(); + output + } + /// Create a new `Ellipse` from half of its width and height. + /// This corresponds to the two perpendicular radii defining the ellipse. + fn new(half_width: f32, half_height: f32) -> Val<::bevy_math::primitives::Ellipse> { + let output: Val<::bevy_math::primitives::Ellipse> = ::bevy_math::primitives::Ellipse::new( + half_width, + half_height, + ) + .into(); + output + } + /// Returns the length of the semi-major axis. This corresponds to the longest radius of the ellipse. + fn semi_major(_self: Ref<::bevy_math::primitives::Ellipse>) -> f32 { + let output: f32 = ::bevy_math::primitives::Ellipse::semi_major(&_self).into(); + output + } + /// Returns the length of the semi-minor axis. This corresponds to the shortest radius of the ellipse. + fn semi_minor(_self: Ref<::bevy_math::primitives::Ellipse>) -> f32 { + let output: f32 = ::bevy_math::primitives::Ellipse::semi_minor(&_self).into(); + output + } +} +#[script_bindings( + remote, + name = "line_2_d_functions", + bms_core_path = "bevy_mod_scripting_core", + generated +)] +impl ::bevy_math::primitives::Line2d { + fn clone( + _self: Ref<::bevy_math::primitives::Line2d>, + ) -> Val<::bevy_math::primitives::Line2d> { + let output: Val<::bevy_math::primitives::Line2d> = <::bevy_math::primitives::Line2d as ::core::clone::Clone>::clone( + &_self, + ) + .into(); + output + } + fn eq( + _self: Ref<::bevy_math::primitives::Line2d>, + other: Ref<::bevy_math::primitives::Line2d>, + ) -> bool { + let output: bool = <::bevy_math::primitives::Line2d as ::core::cmp::PartialEq< + ::bevy_math::primitives::Line2d, + >>::eq(&_self, &other) + .into(); + output + } +} +#[script_bindings( + remote, + name = "plane_2_d_functions", + bms_core_path = "bevy_mod_scripting_core", + generated +)] +impl ::bevy_math::primitives::Plane2d { + fn clone( + _self: Ref<::bevy_math::primitives::Plane2d>, + ) -> Val<::bevy_math::primitives::Plane2d> { + let output: Val<::bevy_math::primitives::Plane2d> = <::bevy_math::primitives::Plane2d as ::core::clone::Clone>::clone( + &_self, + ) + .into(); + output + } + fn eq( + _self: Ref<::bevy_math::primitives::Plane2d>, + other: Ref<::bevy_math::primitives::Plane2d>, + ) -> bool { + let output: bool = <::bevy_math::primitives::Plane2d as ::core::cmp::PartialEq< + ::bevy_math::primitives::Plane2d, + >>::eq(&_self, &other) + .into(); + output + } + /// Create a new `Plane2d` from a normal + /// # Panics + /// Panics if the given `normal` is zero (or very close to zero), or non-finite. + fn new( + normal: Val<::bevy_math::prelude::Vec2>, + ) -> Val<::bevy_math::primitives::Plane2d> { + let output: Val<::bevy_math::primitives::Plane2d> = ::bevy_math::primitives::Plane2d::new( + normal.into_inner(), + ) + .into(); + output + } +} +#[script_bindings( + remote, + name = "rectangle_functions", + bms_core_path = "bevy_mod_scripting_core", + generated +)] +impl ::bevy_math::primitives::Rectangle { + fn clone( + _self: Ref<::bevy_math::primitives::Rectangle>, + ) -> Val<::bevy_math::primitives::Rectangle> { + let output: Val<::bevy_math::primitives::Rectangle> = <::bevy_math::primitives::Rectangle as ::core::clone::Clone>::clone( + &_self, + ) + .into(); + output + } + /// Finds the point on the rectangle that is closest to the given `point`. + /// If the point is outside the rectangle, the returned point will be on the perimeter of the rectangle. + /// Otherwise, it will be inside the rectangle and returned as is. + fn closest_point( + _self: Ref<::bevy_math::primitives::Rectangle>, + point: Val<::bevy_math::prelude::Vec2>, + ) -> Val<::bevy_math::prelude::Vec2> { + let output: Val<::bevy_math::prelude::Vec2> = ::bevy_math::primitives::Rectangle::closest_point( + &_self, + point.into_inner(), + ) + .into(); + output + } + fn eq( + _self: Ref<::bevy_math::primitives::Rectangle>, + other: Ref<::bevy_math::primitives::Rectangle>, + ) -> bool { + let output: bool = <::bevy_math::primitives::Rectangle as ::core::cmp::PartialEq< + ::bevy_math::primitives::Rectangle, + >>::eq(&_self, &other) + .into(); + output + } + /// Create a new `Rectangle` from two corner points + fn from_corners( + point1: Val<::bevy_math::prelude::Vec2>, + point2: Val<::bevy_math::prelude::Vec2>, + ) -> Val<::bevy_math::primitives::Rectangle> { + let output: Val<::bevy_math::primitives::Rectangle> = ::bevy_math::primitives::Rectangle::from_corners( + point1.into_inner(), + point2.into_inner(), + ) + .into(); + output + } + /// Create a `Rectangle` from a single length. + /// The resulting `Rectangle` will be the same size in every direction. + fn from_length(length: f32) -> Val<::bevy_math::primitives::Rectangle> { + let output: Val<::bevy_math::primitives::Rectangle> = ::bevy_math::primitives::Rectangle::from_length( + length, + ) + .into(); + output + } + /// Create a new `Rectangle` from a given full size + fn from_size( + size: Val<::bevy_math::prelude::Vec2>, + ) -> Val<::bevy_math::primitives::Rectangle> { + let output: Val<::bevy_math::primitives::Rectangle> = ::bevy_math::primitives::Rectangle::from_size( + size.into_inner(), + ) + .into(); + output + } + /// Create a new `Rectangle` from a full width and height + fn new(width: f32, height: f32) -> Val<::bevy_math::primitives::Rectangle> { + let output: Val<::bevy_math::primitives::Rectangle> = ::bevy_math::primitives::Rectangle::new( + width, + height, + ) + .into(); + output + } + /// Get the size of the rectangle + fn size( + _self: Ref<::bevy_math::primitives::Rectangle>, + ) -> Val<::bevy_math::prelude::Vec2> { + let output: Val<::bevy_math::prelude::Vec2> = ::bevy_math::primitives::Rectangle::size( + &_self, + ) + .into(); + output + } +} +#[script_bindings( + remote, + name = "regular_polygon_functions", + bms_core_path = "bevy_mod_scripting_core", + generated +)] +impl ::bevy_math::primitives::RegularPolygon { + /// Get the radius of the circumcircle on which all vertices + /// of the regular polygon lie + fn circumradius(_self: Ref<::bevy_math::primitives::RegularPolygon>) -> f32 { + let output: f32 = ::bevy_math::primitives::RegularPolygon::circumradius(&_self) + .into(); + output + } + fn clone( + _self: Ref<::bevy_math::primitives::RegularPolygon>, + ) -> Val<::bevy_math::primitives::RegularPolygon> { + let output: Val<::bevy_math::primitives::RegularPolygon> = <::bevy_math::primitives::RegularPolygon as ::core::clone::Clone>::clone( + &_self, + ) + .into(); + output + } + fn eq( + _self: Ref<::bevy_math::primitives::RegularPolygon>, + other: Ref<::bevy_math::primitives::RegularPolygon>, + ) -> bool { + let output: bool = <::bevy_math::primitives::RegularPolygon as ::core::cmp::PartialEq< + ::bevy_math::primitives::RegularPolygon, + >>::eq(&_self, &other) + .into(); + output + } + /// Get the external angle of the regular polygon in degrees. + /// This is the angle formed by two adjacent sides with points + /// within the angle being in the exterior of the polygon + fn external_angle_degrees( + _self: Ref<::bevy_math::primitives::RegularPolygon>, + ) -> f32 { + let output: f32 = ::bevy_math::primitives::RegularPolygon::external_angle_degrees( + &_self, + ) + .into(); + output + } + /// Get the external angle of the regular polygon in radians. + /// This is the angle formed by two adjacent sides with points + /// within the angle being in the exterior of the polygon + fn external_angle_radians( + _self: Ref<::bevy_math::primitives::RegularPolygon>, + ) -> f32 { + let output: f32 = ::bevy_math::primitives::RegularPolygon::external_angle_radians( + &_self, + ) + .into(); + output + } + /// Get the inradius or apothem of the regular polygon. + /// This is the radius of the largest circle that can + /// be drawn within the polygon + fn inradius(_self: Ref<::bevy_math::primitives::RegularPolygon>) -> f32 { + let output: f32 = ::bevy_math::primitives::RegularPolygon::inradius(&_self) + .into(); + output + } + /// Get the internal angle of the regular polygon in degrees. + /// This is the angle formed by two adjacent sides with points + /// within the angle being in the interior of the polygon + fn internal_angle_degrees( + _self: Ref<::bevy_math::primitives::RegularPolygon>, + ) -> f32 { + let output: f32 = ::bevy_math::primitives::RegularPolygon::internal_angle_degrees( + &_self, + ) + .into(); + output + } + /// Get the internal angle of the regular polygon in radians. + /// This is the angle formed by two adjacent sides with points + /// within the angle being in the interior of the polygon + fn internal_angle_radians( + _self: Ref<::bevy_math::primitives::RegularPolygon>, + ) -> f32 { + let output: f32 = ::bevy_math::primitives::RegularPolygon::internal_angle_radians( + &_self, + ) + .into(); + output + } + /// Create a new `RegularPolygon` + /// from the radius of the circumcircle and a number of sides + /// # Panics + /// Panics if `circumradius` is negative + fn new( + circumradius: f32, + sides: u32, + ) -> Val<::bevy_math::primitives::RegularPolygon> { + let output: Val<::bevy_math::primitives::RegularPolygon> = ::bevy_math::primitives::RegularPolygon::new( + circumradius, + sides, + ) + .into(); + output + } + /// Get the length of one side of the regular polygon + fn side_length(_self: Ref<::bevy_math::primitives::RegularPolygon>) -> f32 { + let output: f32 = ::bevy_math::primitives::RegularPolygon::side_length(&_self) + .into(); + output + } +} +#[script_bindings( + remote, + name = "rhombus_functions", + bms_core_path = "bevy_mod_scripting_core", + generated +)] +impl ::bevy_math::primitives::Rhombus { + /// Get the radius of the circumcircle on which all vertices + /// of the rhombus lie + fn circumradius(_self: Ref<::bevy_math::primitives::Rhombus>) -> f32 { + let output: f32 = ::bevy_math::primitives::Rhombus::circumradius(&_self).into(); + output + } + fn clone( + _self: Ref<::bevy_math::primitives::Rhombus>, + ) -> Val<::bevy_math::primitives::Rhombus> { + let output: Val<::bevy_math::primitives::Rhombus> = <::bevy_math::primitives::Rhombus as ::core::clone::Clone>::clone( + &_self, + ) + .into(); + output + } + /// Finds the point on the rhombus that is closest to the given `point`. + /// If the point is outside the rhombus, the returned point will be on the perimeter of the rhombus. + /// Otherwise, it will be inside the rhombus and returned as is. + fn closest_point( + _self: Ref<::bevy_math::primitives::Rhombus>, + point: Val<::bevy_math::prelude::Vec2>, + ) -> Val<::bevy_math::prelude::Vec2> { + let output: Val<::bevy_math::prelude::Vec2> = ::bevy_math::primitives::Rhombus::closest_point( + &_self, + point.into_inner(), + ) + .into(); + output + } + fn eq( + _self: Ref<::bevy_math::primitives::Rhombus>, + other: Ref<::bevy_math::primitives::Rhombus>, + ) -> bool { + let output: bool = <::bevy_math::primitives::Rhombus as ::core::cmp::PartialEq< + ::bevy_math::primitives::Rhombus, + >>::eq(&_self, &other) + .into(); + output + } + /// Create a new `Rhombus` from a given inradius with all inner angles equal. + fn from_inradius(inradius: f32) -> Val<::bevy_math::primitives::Rhombus> { + let output: Val<::bevy_math::primitives::Rhombus> = ::bevy_math::primitives::Rhombus::from_inradius( + inradius, + ) + .into(); + output + } + /// Create a new `Rhombus` from a side length with all inner angles equal. + fn from_side(side: f32) -> Val<::bevy_math::primitives::Rhombus> { + let output: Val<::bevy_math::primitives::Rhombus> = ::bevy_math::primitives::Rhombus::from_side( + side, + ) + .into(); + output + } + /// Get the radius of the largest circle that can + /// be drawn within the rhombus + fn inradius(_self: Ref<::bevy_math::primitives::Rhombus>) -> f32 { + let output: f32 = ::bevy_math::primitives::Rhombus::inradius(&_self).into(); + output + } + /// Create a new `Rhombus` from a vertical and horizontal diagonal sizes. + fn new( + horizontal_diagonal: f32, + vertical_diagonal: f32, + ) -> Val<::bevy_math::primitives::Rhombus> { + let output: Val<::bevy_math::primitives::Rhombus> = ::bevy_math::primitives::Rhombus::new( + horizontal_diagonal, + vertical_diagonal, + ) + .into(); + output + } + /// Get the length of each side of the rhombus + fn side(_self: Ref<::bevy_math::primitives::Rhombus>) -> f32 { + let output: f32 = ::bevy_math::primitives::Rhombus::side(&_self).into(); + output + } +} +#[script_bindings( + remote, + name = "segment_2_d_functions", + bms_core_path = "bevy_mod_scripting_core", + generated +)] +impl ::bevy_math::primitives::Segment2d { + /// Compute the midpoint between the two endpoints of the line segment. + fn center( + _self: Ref<::bevy_math::primitives::Segment2d>, + ) -> Val<::bevy_math::prelude::Vec2> { + let output: Val<::bevy_math::prelude::Vec2> = ::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<::bevy_math::primitives::Segment2d>, + ) -> Val<::bevy_math::primitives::Segment2d> { + let output: Val<::bevy_math::primitives::Segment2d> = ::bevy_math::primitives::Segment2d::centered( + &_self, + ) + .into(); + output + } + fn clone( + _self: Ref<::bevy_math::primitives::Segment2d>, + ) -> Val<::bevy_math::primitives::Segment2d> { + let output: Val<::bevy_math::primitives::Segment2d> = <::bevy_math::primitives::Segment2d as ::core::clone::Clone>::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<::bevy_math::primitives::Segment2d>, + ) -> Val<::bevy_math::prelude::Dir2> { + let output: Val<::bevy_math::prelude::Dir2> = ::bevy_math::primitives::Segment2d::direction( + &_self, + ) + .into(); + output + } + fn eq( + _self: Ref<::bevy_math::primitives::Segment2d>, + other: Ref<::bevy_math::primitives::Segment2d>, + ) -> bool { + let output: bool = <::bevy_math::primitives::Segment2d as ::core::cmp::PartialEq< + ::bevy_math::primitives::Segment2d, + >>::eq(&_self, &other) + .into(); + output + } + /// 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<::bevy_math::prelude::Dir2>, + length: f32, + ) -> Val<::bevy_math::primitives::Segment2d> { + let output: Val<::bevy_math::primitives::Segment2d> = ::bevy_math::primitives::Segment2d::from_direction_and_length( + direction.into_inner(), + length, + ) + .into(); + output + } + /// 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<::bevy_math::Ray2d>, + length: f32, + ) -> Val<::bevy_math::primitives::Segment2d> { + let output: Val<::bevy_math::primitives::Segment2d> = ::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<::bevy_math::prelude::Vec2>, + ) -> Val<::bevy_math::primitives::Segment2d> { + let output: Val<::bevy_math::primitives::Segment2d> = ::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<::bevy_math::primitives::Segment2d>, + ) -> Val<::bevy_math::prelude::Dir2> { + let output: Val<::bevy_math::prelude::Dir2> = ::bevy_math::primitives::Segment2d::left_normal( + &_self, + ) + .into(); + output + } + /// Compute the length of the line segment. + fn length(_self: Ref<::bevy_math::primitives::Segment2d>) -> 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<::bevy_math::primitives::Segment2d>) -> f32 { + let output: f32 = ::bevy_math::primitives::Segment2d::length_squared(&_self) + .into(); + output + } + /// Create a new `Segment2d` from its endpoints. + fn new( + point1: Val<::bevy_math::prelude::Vec2>, + point2: Val<::bevy_math::prelude::Vec2>, + ) -> Val<::bevy_math::primitives::Segment2d> { + let output: Val<::bevy_math::primitives::Segment2d> = ::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<::bevy_math::primitives::Segment2d>, + ) -> Val<::bevy_math::prelude::Vec2> { + let output: Val<::bevy_math::prelude::Vec2> = ::bevy_math::primitives::Segment2d::point1( + &_self, + ) + .into(); + output + } + /// Get the position of the second endpoint of the line segment. + fn point2( + _self: Ref<::bevy_math::primitives::Segment2d>, + ) -> Val<::bevy_math::prelude::Vec2> { + let output: Val<::bevy_math::prelude::Vec2> = ::bevy_math::primitives::Segment2d::point2( + &_self, + ) + .into(); + output + } + /// Compute the segment with a new length, keeping the same direction and center. + fn resized( + _self: Ref<::bevy_math::primitives::Segment2d>, + length: f32, + ) -> Val<::bevy_math::primitives::Segment2d> { + let output: Val<::bevy_math::primitives::Segment2d> = ::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<::bevy_math::primitives::Segment2d>) -> () { + 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<::bevy_math::primitives::Segment2d>, + ) -> Val<::bevy_math::primitives::Segment2d> { + let output: Val<::bevy_math::primitives::Segment2d> = ::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<::bevy_math::primitives::Segment2d>, + ) -> Val<::bevy_math::prelude::Dir2> { + let output: Val<::bevy_math::prelude::Dir2> = ::bevy_math::primitives::Segment2d::right_normal( + &_self, + ) + .into(); + output + } + /// Compute the segment rotated around the origin by the given rotation. + fn rotated( + _self: Ref<::bevy_math::primitives::Segment2d>, + rotation: Val<::bevy_math::Rot2>, + ) -> Val<::bevy_math::primitives::Segment2d> { + let output: Val<::bevy_math::primitives::Segment2d> = ::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<::bevy_math::primitives::Segment2d>, + rotation: Val<::bevy_math::Rot2>, + point: Val<::bevy_math::prelude::Vec2>, + ) -> Val<::bevy_math::primitives::Segment2d> { + let output: Val<::bevy_math::primitives::Segment2d> = ::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<::bevy_math::primitives::Segment2d>, + rotation: Val<::bevy_math::Rot2>, + ) -> Val<::bevy_math::primitives::Segment2d> { + let output: Val<::bevy_math::primitives::Segment2d> = ::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<::bevy_math::primitives::Segment2d>, + ) -> Val<::bevy_math::prelude::Vec2> { + let output: Val<::bevy_math::prelude::Vec2> = ::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<::bevy_math::primitives::Segment2d>, + ) -> Val<::bevy_math::prelude::Vec2> { + let output: Val<::bevy_math::prelude::Vec2> = ::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<::bevy_math::primitives::Segment2d>, + ) -> Val<::bevy_math::prelude::Vec2> { + let output: Val<::bevy_math::prelude::Vec2> = ::bevy_math::primitives::Segment2d::scaled_right_normal( + &_self, + ) + .into(); + output + } + /// Compute the segment translated by the given vector. + fn translated( + _self: Ref<::bevy_math::primitives::Segment2d>, + translation: Val<::bevy_math::prelude::Vec2>, + ) -> Val<::bevy_math::primitives::Segment2d> { + let output: Val<::bevy_math::primitives::Segment2d> = ::bevy_math::primitives::Segment2d::translated( + &_self, + translation.into_inner(), + ) + .into(); + output + } +} +#[script_bindings( + remote, + name = "triangle_2_d_functions", + bms_core_path = "bevy_mod_scripting_core", + generated +)] +impl ::bevy_math::primitives::Triangle2d { + fn clone( + _self: Ref<::bevy_math::primitives::Triangle2d>, + ) -> Val<::bevy_math::primitives::Triangle2d> { + let output: Val<::bevy_math::primitives::Triangle2d> = <::bevy_math::primitives::Triangle2d as ::core::clone::Clone>::clone( + &_self, + ) + .into(); + output + } + fn eq( + _self: Ref<::bevy_math::primitives::Triangle2d>, + other: Ref<::bevy_math::primitives::Triangle2d>, + ) -> bool { + let output: bool = <::bevy_math::primitives::Triangle2d as ::core::cmp::PartialEq< + ::bevy_math::primitives::Triangle2d, + >>::eq(&_self, &other) + .into(); + output + } + /// Checks if the triangle is acute, meaning all angles are less than 90 degrees + fn is_acute(_self: Ref<::bevy_math::primitives::Triangle2d>) -> bool { + let output: bool = ::bevy_math::primitives::Triangle2d::is_acute(&_self).into(); + output + } + /// Checks if the triangle is degenerate, meaning it has zero area. + /// A triangle is degenerate if the cross product of the vectors `ab` and `ac` has a length less than `10e-7`. + /// This indicates that the three vertices are collinear or nearly collinear. + fn is_degenerate(_self: Ref<::bevy_math::primitives::Triangle2d>) -> bool { + let output: bool = ::bevy_math::primitives::Triangle2d::is_degenerate(&_self) + .into(); + output + } + /// Checks if the triangle is obtuse, meaning one angle is greater than 90 degrees + fn is_obtuse(_self: Ref<::bevy_math::primitives::Triangle2d>) -> bool { + let output: bool = ::bevy_math::primitives::Triangle2d::is_obtuse(&_self).into(); + output + } + /// Create a new `Triangle2d` from points `a`, `b`, and `c` + fn new( + a: Val<::bevy_math::prelude::Vec2>, + b: Val<::bevy_math::prelude::Vec2>, + c: Val<::bevy_math::prelude::Vec2>, + ) -> Val<::bevy_math::primitives::Triangle2d> { + let output: Val<::bevy_math::primitives::Triangle2d> = ::bevy_math::primitives::Triangle2d::new( + a.into_inner(), + b.into_inner(), + c.into_inner(), + ) + .into(); + output + } + /// Reverse the [`WindingOrder`] of the triangle + /// by swapping the first and last vertices. + fn reverse(mut _self: Mut<::bevy_math::primitives::Triangle2d>) -> () { + let output: () = ::bevy_math::primitives::Triangle2d::reverse(&mut _self).into(); + output + } + /// This triangle but reversed. + fn reversed( + _self: Val<::bevy_math::primitives::Triangle2d>, + ) -> Val<::bevy_math::primitives::Triangle2d> { + let output: Val<::bevy_math::primitives::Triangle2d> = ::bevy_math::primitives::Triangle2d::reversed( + _self.into_inner(), + ) + .into(); + output + } +} +#[script_bindings( + remote, + name = "aabb_3_d_functions", + bms_core_path = "bevy_mod_scripting_core", + generated +)] +impl ::bevy_math::bounding::Aabb3d { + /// Computes the smallest [`BoundingSphere`] containing this [`Aabb3d`]. + fn bounding_sphere( + _self: Ref<::bevy_math::bounding::Aabb3d>, + ) -> Val<::bevy_math::bounding::BoundingSphere> { + let output: Val<::bevy_math::bounding::BoundingSphere> = ::bevy_math::bounding::Aabb3d::bounding_sphere( + &_self, + ) + .into(); + output + } + fn clone( + _self: Ref<::bevy_math::bounding::Aabb3d>, + ) -> Val<::bevy_math::bounding::Aabb3d> { + let output: Val<::bevy_math::bounding::Aabb3d> = <::bevy_math::bounding::Aabb3d as ::core::clone::Clone>::clone( + &_self, + ) + .into(); + output + } + fn eq( + _self: Ref<::bevy_math::bounding::Aabb3d>, + other: Ref<::bevy_math::bounding::Aabb3d>, + ) -> bool { + let output: bool = <::bevy_math::bounding::Aabb3d as ::core::cmp::PartialEq< + ::bevy_math::bounding::Aabb3d, + >>::eq(&_self, &other) + .into(); + output + } +} +#[script_bindings( + remote, + name = "bounding_sphere_functions", + bms_core_path = "bevy_mod_scripting_core", + generated +)] +impl ::bevy_math::bounding::BoundingSphere { + /// Computes the smallest [`Aabb3d`] containing this [`BoundingSphere`]. + fn aabb_3d( + _self: Ref<::bevy_math::bounding::BoundingSphere>, + ) -> Val<::bevy_math::bounding::Aabb3d> { + let output: Val<::bevy_math::bounding::Aabb3d> = ::bevy_math::bounding::BoundingSphere::aabb_3d( + &_self, + ) + .into(); + output + } + fn clone( + _self: Ref<::bevy_math::bounding::BoundingSphere>, + ) -> Val<::bevy_math::bounding::BoundingSphere> { + let output: Val<::bevy_math::bounding::BoundingSphere> = <::bevy_math::bounding::BoundingSphere as ::core::clone::Clone>::clone( + &_self, + ) + .into(); + output + } + fn eq( + _self: Ref<::bevy_math::bounding::BoundingSphere>, + other: Ref<::bevy_math::bounding::BoundingSphere>, + ) -> bool { + let output: bool = <::bevy_math::bounding::BoundingSphere as ::core::cmp::PartialEq< + ::bevy_math::bounding::BoundingSphere, + >>::eq(&_self, &other) + .into(); + output + } + /// Get the radius of the bounding sphere + fn radius(_self: Ref<::bevy_math::bounding::BoundingSphere>) -> f32 { + let output: f32 = ::bevy_math::bounding::BoundingSphere::radius(&_self).into(); + output + } +} +#[script_bindings( + remote, + name = "sphere_functions", + bms_core_path = "bevy_mod_scripting_core", + generated +)] +impl ::bevy_math::primitives::Sphere { + fn clone( + _self: Ref<::bevy_math::primitives::Sphere>, + ) -> Val<::bevy_math::primitives::Sphere> { + let output: Val<::bevy_math::primitives::Sphere> = <::bevy_math::primitives::Sphere as ::core::clone::Clone>::clone( + &_self, + ) + .into(); + output + } + /// Finds the point on the sphere that is closest to the given `point`. + /// If the point is outside the sphere, the returned point will be on the surface of the sphere. + /// Otherwise, it will be inside the sphere and returned as is. + fn closest_point( + _self: Ref<::bevy_math::primitives::Sphere>, + point: Val<::bevy_math::prelude::Vec3>, + ) -> Val<::bevy_math::prelude::Vec3> { + let output: Val<::bevy_math::prelude::Vec3> = ::bevy_math::primitives::Sphere::closest_point( + &_self, + point.into_inner(), + ) + .into(); + output + } + /// Get the diameter of the sphere + fn diameter(_self: Ref<::bevy_math::primitives::Sphere>) -> f32 { + let output: f32 = ::bevy_math::primitives::Sphere::diameter(&_self).into(); + output + } + fn eq( + _self: Ref<::bevy_math::primitives::Sphere>, + other: Ref<::bevy_math::primitives::Sphere>, + ) -> bool { + let output: bool = <::bevy_math::primitives::Sphere as ::core::cmp::PartialEq< + ::bevy_math::primitives::Sphere, + >>::eq(&_self, &other) + .into(); + output + } + /// Create a new [`Sphere`] from a `radius` + fn new(radius: f32) -> Val<::bevy_math::primitives::Sphere> { + let output: Val<::bevy_math::primitives::Sphere> = ::bevy_math::primitives::Sphere::new( + radius, + ) + .into(); + output + } +} +#[script_bindings( + remote, + name = "cuboid_functions", + bms_core_path = "bevy_mod_scripting_core", + generated +)] +impl ::bevy_math::primitives::Cuboid { + fn clone( + _self: Ref<::bevy_math::primitives::Cuboid>, + ) -> Val<::bevy_math::primitives::Cuboid> { + let output: Val<::bevy_math::primitives::Cuboid> = <::bevy_math::primitives::Cuboid as ::core::clone::Clone>::clone( + &_self, + ) + .into(); + output + } + /// Finds the point on the cuboid that is closest to the given `point`. + /// If the point is outside the cuboid, the returned point will be on the surface of the cuboid. + /// Otherwise, it will be inside the cuboid and returned as is. + fn closest_point( + _self: Ref<::bevy_math::primitives::Cuboid>, + point: Val<::bevy_math::prelude::Vec3>, + ) -> Val<::bevy_math::prelude::Vec3> { + let output: Val<::bevy_math::prelude::Vec3> = ::bevy_math::primitives::Cuboid::closest_point( + &_self, + point.into_inner(), + ) + .into(); + output + } + fn eq( + _self: Ref<::bevy_math::primitives::Cuboid>, + other: Ref<::bevy_math::primitives::Cuboid>, + ) -> bool { + let output: bool = <::bevy_math::primitives::Cuboid as ::core::cmp::PartialEq< + ::bevy_math::primitives::Cuboid, + >>::eq(&_self, &other) + .into(); + output + } + /// Create a new `Cuboid` from two corner points + fn from_corners( + point1: Val<::bevy_math::prelude::Vec3>, + point2: Val<::bevy_math::prelude::Vec3>, + ) -> Val<::bevy_math::primitives::Cuboid> { + let output: Val<::bevy_math::primitives::Cuboid> = ::bevy_math::primitives::Cuboid::from_corners( + point1.into_inner(), + point2.into_inner(), + ) + .into(); + output + } + /// Create a `Cuboid` from a single length. + /// The resulting `Cuboid` will be the same size in every direction. + fn from_length(length: f32) -> Val<::bevy_math::primitives::Cuboid> { + let output: Val<::bevy_math::primitives::Cuboid> = ::bevy_math::primitives::Cuboid::from_length( + length, + ) + .into(); + output + } + /// Create a new `Cuboid` from a given full size + fn from_size( + size: Val<::bevy_math::prelude::Vec3>, + ) -> Val<::bevy_math::primitives::Cuboid> { + let output: Val<::bevy_math::primitives::Cuboid> = ::bevy_math::primitives::Cuboid::from_size( + size.into_inner(), + ) + .into(); + output + } + /// Create a new `Cuboid` from a full x, y, and z length + fn new( + x_length: f32, + y_length: f32, + z_length: f32, + ) -> Val<::bevy_math::primitives::Cuboid> { + let output: Val<::bevy_math::primitives::Cuboid> = ::bevy_math::primitives::Cuboid::new( + x_length, + y_length, + z_length, + ) + .into(); + output + } + /// Get the size of the cuboid + fn size( + _self: Ref<::bevy_math::primitives::Cuboid>, + ) -> Val<::bevy_math::prelude::Vec3> { + let output: Val<::bevy_math::prelude::Vec3> = ::bevy_math::primitives::Cuboid::size( + &_self, + ) + .into(); + output + } +} +#[script_bindings( + remote, + name = "cylinder_functions", + bms_core_path = "bevy_mod_scripting_core", + generated +)] +impl ::bevy_math::primitives::Cylinder { + /// Get the base of the cylinder as a [`Circle`] + fn base( + _self: Ref<::bevy_math::primitives::Cylinder>, + ) -> Val<::bevy_math::primitives::Circle> { + let output: Val<::bevy_math::primitives::Circle> = ::bevy_math::primitives::Cylinder::base( + &_self, + ) + .into(); + output + } + /// Get the surface area of one base of the cylinder + fn base_area(_self: Ref<::bevy_math::primitives::Cylinder>) -> f32 { + let output: f32 = ::bevy_math::primitives::Cylinder::base_area(&_self).into(); + output + } + fn clone( + _self: Ref<::bevy_math::primitives::Cylinder>, + ) -> Val<::bevy_math::primitives::Cylinder> { + let output: Val<::bevy_math::primitives::Cylinder> = <::bevy_math::primitives::Cylinder as ::core::clone::Clone>::clone( + &_self, + ) + .into(); + output + } + fn eq( + _self: Ref<::bevy_math::primitives::Cylinder>, + other: Ref<::bevy_math::primitives::Cylinder>, + ) -> bool { + let output: bool = <::bevy_math::primitives::Cylinder as ::core::cmp::PartialEq< + ::bevy_math::primitives::Cylinder, + >>::eq(&_self, &other) + .into(); + output + } + /// Get the surface area of the side of the cylinder, + /// also known as the lateral area + fn lateral_area(_self: Ref<::bevy_math::primitives::Cylinder>) -> f32 { + let output: f32 = ::bevy_math::primitives::Cylinder::lateral_area(&_self).into(); + output + } + /// Create a new `Cylinder` from a radius and full height + fn new(radius: f32, height: f32) -> Val<::bevy_math::primitives::Cylinder> { + let output: Val<::bevy_math::primitives::Cylinder> = ::bevy_math::primitives::Cylinder::new( + radius, + height, + ) + .into(); + output + } +} +#[script_bindings( + remote, + name = "capsule_3_d_functions", + bms_core_path = "bevy_mod_scripting_core", + generated +)] +impl ::bevy_math::primitives::Capsule3d { + fn clone( + _self: Ref<::bevy_math::primitives::Capsule3d>, + ) -> Val<::bevy_math::primitives::Capsule3d> { + let output: Val<::bevy_math::primitives::Capsule3d> = <::bevy_math::primitives::Capsule3d as ::core::clone::Clone>::clone( + &_self, + ) + .into(); + output + } + fn eq( + _self: Ref<::bevy_math::primitives::Capsule3d>, + other: Ref<::bevy_math::primitives::Capsule3d>, + ) -> bool { + let output: bool = <::bevy_math::primitives::Capsule3d as ::core::cmp::PartialEq< + ::bevy_math::primitives::Capsule3d, + >>::eq(&_self, &other) + .into(); + output + } + /// Create a new `Capsule3d` from a radius and length + fn new(radius: f32, length: f32) -> Val<::bevy_math::primitives::Capsule3d> { + let output: Val<::bevy_math::primitives::Capsule3d> = ::bevy_math::primitives::Capsule3d::new( + radius, + length, + ) + .into(); + output + } + /// Get the part connecting the hemispherical ends + /// of the capsule as a [`Cylinder`] + fn to_cylinder( + _self: Ref<::bevy_math::primitives::Capsule3d>, + ) -> Val<::bevy_math::primitives::Cylinder> { + let output: Val<::bevy_math::primitives::Cylinder> = ::bevy_math::primitives::Capsule3d::to_cylinder( + &_self, + ) + .into(); + output + } +} +#[script_bindings( + remote, + name = "cone_functions", + bms_core_path = "bevy_mod_scripting_core", + generated +)] +impl ::bevy_math::primitives::Cone { + /// Get the base of the cone as a [`Circle`] + fn base( + _self: Ref<::bevy_math::primitives::Cone>, + ) -> Val<::bevy_math::primitives::Circle> { + let output: Val<::bevy_math::primitives::Circle> = ::bevy_math::primitives::Cone::base( + &_self, + ) + .into(); + output + } + /// Get the surface area of the base of the cone + fn base_area(_self: Ref<::bevy_math::primitives::Cone>) -> f32 { + let output: f32 = ::bevy_math::primitives::Cone::base_area(&_self).into(); + output + } + fn clone( + _self: Ref<::bevy_math::primitives::Cone>, + ) -> Val<::bevy_math::primitives::Cone> { + let output: Val<::bevy_math::primitives::Cone> = <::bevy_math::primitives::Cone as ::core::clone::Clone>::clone( + &_self, + ) + .into(); + output + } + fn eq( + _self: Ref<::bevy_math::primitives::Cone>, + other: Ref<::bevy_math::primitives::Cone>, + ) -> bool { + let output: bool = <::bevy_math::primitives::Cone as ::core::cmp::PartialEq< + ::bevy_math::primitives::Cone, + >>::eq(&_self, &other) + .into(); + output + } + /// Get the surface area of the side of the cone, + /// also known as the lateral area + fn lateral_area(_self: Ref<::bevy_math::primitives::Cone>) -> f32 { + let output: f32 = ::bevy_math::primitives::Cone::lateral_area(&_self).into(); + output + } + /// Create a new [`Cone`] from a radius and height. + fn new(radius: f32, height: f32) -> Val<::bevy_math::primitives::Cone> { + let output: Val<::bevy_math::primitives::Cone> = ::bevy_math::primitives::Cone::new( + radius, + height, + ) + .into(); + output + } + /// Get the slant height of the cone, the length of the line segment + /// connecting a point on the base to the apex + fn slant_height(_self: Ref<::bevy_math::primitives::Cone>) -> f32 { + let output: f32 = ::bevy_math::primitives::Cone::slant_height(&_self).into(); + output + } +} +#[script_bindings( + remote, + name = "conical_frustum_functions", + bms_core_path = "bevy_mod_scripting_core", + generated +)] +impl ::bevy_math::primitives::ConicalFrustum { + fn clone( + _self: Ref<::bevy_math::primitives::ConicalFrustum>, + ) -> Val<::bevy_math::primitives::ConicalFrustum> { + let output: Val<::bevy_math::primitives::ConicalFrustum> = <::bevy_math::primitives::ConicalFrustum as ::core::clone::Clone>::clone( + &_self, + ) + .into(); + output + } + fn eq( + _self: Ref<::bevy_math::primitives::ConicalFrustum>, + other: Ref<::bevy_math::primitives::ConicalFrustum>, + ) -> bool { + let output: bool = <::bevy_math::primitives::ConicalFrustum as ::core::cmp::PartialEq< + ::bevy_math::primitives::ConicalFrustum, + >>::eq(&_self, &other) + .into(); + output + } +} +#[script_bindings( + remote, + name = "infinite_plane_3_d_functions", + bms_core_path = "bevy_mod_scripting_core", + generated +)] +impl ::bevy_math::primitives::InfinitePlane3d { + fn clone( + _self: Ref<::bevy_math::primitives::InfinitePlane3d>, + ) -> Val<::bevy_math::primitives::InfinitePlane3d> { + let output: Val<::bevy_math::primitives::InfinitePlane3d> = <::bevy_math::primitives::InfinitePlane3d as ::core::clone::Clone>::clone( + &_self, + ) + .into(); + output + } + fn eq( + _self: Ref<::bevy_math::primitives::InfinitePlane3d>, + other: Ref<::bevy_math::primitives::InfinitePlane3d>, + ) -> bool { + let output: bool = <::bevy_math::primitives::InfinitePlane3d as ::core::cmp::PartialEq< + ::bevy_math::primitives::InfinitePlane3d, + >>::eq(&_self, &other) + .into(); + output + } + /// Computes an [`Isometry3d`] which transforms points from the XY-plane to this plane with the + /// given `origin`. + /// ## Guarantees + /// * the transformation is a [congruence] meaning it will preserve all distances and angles of + /// the transformed geometry + /// * uses the least rotation possible to transform the geometry + /// * if two geometries are transformed with the same isometry, then the relations between + /// them, like distances, are also preserved + /// * compared to projections, the transformation is lossless (up to floating point errors) + /// reversible + /// ## Non-Guarantees + /// * the rotation used is generally not unique + /// * the orientation of the transformed geometry in the XY plane might be arbitrary, to + /// enforce some kind of alignment the user has to use an extra transformation ontop of this + /// one + /// See [`isometries_xy`] for example usescases. + /// [congruence]: https://en.wikipedia.org/wiki/Congruence_(geometry) + /// [`isometries_xy`]: `InfinitePlane3d::isometries_xy` + fn isometry_from_xy( + _self: Ref<::bevy_math::primitives::InfinitePlane3d>, + origin: Val<::bevy_math::prelude::Vec3>, + ) -> Val<::bevy_math::Isometry3d> { + let output: Val<::bevy_math::Isometry3d> = ::bevy_math::primitives::InfinitePlane3d::isometry_from_xy( + &_self, + origin.into_inner(), + ) + .into(); + output + } + /// Computes an [`Isometry3d`] which transforms points from the plane in 3D space with the given + /// `origin` to the XY-plane. + /// ## Guarantees + /// * the transformation is a [congruence] meaning it will preserve all distances and angles of + /// the transformed geometry + /// * uses the least rotation possible to transform the geometry + /// * if two geometries are transformed with the same isometry, then the relations between + /// them, like distances, are also preserved + /// * compared to projections, the transformation is lossless (up to floating point errors) + /// reversible + /// ## Non-Guarantees + /// * the rotation used is generally not unique + /// * the orientation of the transformed geometry in the XY plane might be arbitrary, to + /// enforce some kind of alignment the user has to use an extra transformation ontop of this + /// one + /// See [`isometries_xy`] for example usescases. + /// [congruence]: https://en.wikipedia.org/wiki/Congruence_(geometry) + /// [`isometries_xy`]: `InfinitePlane3d::isometries_xy` + fn isometry_into_xy( + _self: Ref<::bevy_math::primitives::InfinitePlane3d>, + origin: Val<::bevy_math::prelude::Vec3>, + ) -> Val<::bevy_math::Isometry3d> { + let output: Val<::bevy_math::Isometry3d> = ::bevy_math::primitives::InfinitePlane3d::isometry_into_xy( + &_self, + origin.into_inner(), + ) + .into(); + output + } +} +#[script_bindings( + remote, + name = "line_3_d_functions", + bms_core_path = "bevy_mod_scripting_core", + generated +)] +impl ::bevy_math::primitives::Line3d { + fn clone( + _self: Ref<::bevy_math::primitives::Line3d>, + ) -> Val<::bevy_math::primitives::Line3d> { + let output: Val<::bevy_math::primitives::Line3d> = <::bevy_math::primitives::Line3d as ::core::clone::Clone>::clone( + &_self, + ) + .into(); + output + } + fn eq( + _self: Ref<::bevy_math::primitives::Line3d>, + other: Ref<::bevy_math::primitives::Line3d>, + ) -> bool { + let output: bool = <::bevy_math::primitives::Line3d as ::core::cmp::PartialEq< + ::bevy_math::primitives::Line3d, + >>::eq(&_self, &other) + .into(); + output + } +} +#[script_bindings( + remote, + name = "segment_3_d_functions", + bms_core_path = "bevy_mod_scripting_core", + generated +)] +impl ::bevy_math::primitives::Segment3d { + /// Compute the midpoint between the two endpoints of the line segment. + fn center( + _self: Ref<::bevy_math::primitives::Segment3d>, + ) -> Val<::bevy_math::prelude::Vec3> { + let output: Val<::bevy_math::prelude::Vec3> = ::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<::bevy_math::primitives::Segment3d>, + ) -> Val<::bevy_math::primitives::Segment3d> { + let output: Val<::bevy_math::primitives::Segment3d> = ::bevy_math::primitives::Segment3d::centered( + &_self, + ) + .into(); + output + } + fn clone( + _self: Ref<::bevy_math::primitives::Segment3d>, + ) -> Val<::bevy_math::primitives::Segment3d> { + let output: Val<::bevy_math::primitives::Segment3d> = <::bevy_math::primitives::Segment3d as ::core::clone::Clone>::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<::bevy_math::primitives::Segment3d>, + ) -> Val<::bevy_math::prelude::Dir3> { + let output: Val<::bevy_math::prelude::Dir3> = ::bevy_math::primitives::Segment3d::direction( + &_self, + ) + .into(); + output + } + fn eq( + _self: Ref<::bevy_math::primitives::Segment3d>, + other: Ref<::bevy_math::primitives::Segment3d>, + ) -> bool { + let output: bool = <::bevy_math::primitives::Segment3d as ::core::cmp::PartialEq< + ::bevy_math::primitives::Segment3d, + >>::eq(&_self, &other) + .into(); + output + } + /// 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<::bevy_math::prelude::Dir3>, + length: f32, + ) -> Val<::bevy_math::primitives::Segment3d> { + let output: Val<::bevy_math::primitives::Segment3d> = ::bevy_math::primitives::Segment3d::from_direction_and_length( + direction.into_inner(), + length, + ) + .into(); + output + } + /// 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<::bevy_math::Ray3d>, + length: f32, + ) -> Val<::bevy_math::primitives::Segment3d> { + let output: Val<::bevy_math::primitives::Segment3d> = ::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<::bevy_math::prelude::Vec3>, + ) -> Val<::bevy_math::primitives::Segment3d> { + let output: Val<::bevy_math::primitives::Segment3d> = ::bevy_math::primitives::Segment3d::from_scaled_direction( + scaled_direction.into_inner(), + ) + .into(); + output + } + /// Compute the length of the line segment. + fn length(_self: Ref<::bevy_math::primitives::Segment3d>) -> 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<::bevy_math::primitives::Segment3d>) -> f32 { + let output: f32 = ::bevy_math::primitives::Segment3d::length_squared(&_self) + .into(); + output + } + /// Create a new `Segment3d` from its endpoints. + fn new( + point1: Val<::bevy_math::prelude::Vec3>, + point2: Val<::bevy_math::prelude::Vec3>, + ) -> Val<::bevy_math::primitives::Segment3d> { + let output: Val<::bevy_math::primitives::Segment3d> = ::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<::bevy_math::primitives::Segment3d>, + ) -> Val<::bevy_math::prelude::Vec3> { + let output: Val<::bevy_math::prelude::Vec3> = ::bevy_math::primitives::Segment3d::point1( + &_self, + ) + .into(); + output + } + /// Get the position of the second endpoint of the line segment. + fn point2( + _self: Ref<::bevy_math::primitives::Segment3d>, + ) -> Val<::bevy_math::prelude::Vec3> { + let output: Val<::bevy_math::prelude::Vec3> = ::bevy_math::primitives::Segment3d::point2( + &_self, + ) + .into(); + output + } + /// Compute the segment with a new length, keeping the same direction and center. + fn resized( + _self: Ref<::bevy_math::primitives::Segment3d>, + length: f32, + ) -> Val<::bevy_math::primitives::Segment3d> { + let output: Val<::bevy_math::primitives::Segment3d> = ::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<::bevy_math::primitives::Segment3d>) -> () { + 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<::bevy_math::primitives::Segment3d>, + ) -> Val<::bevy_math::primitives::Segment3d> { + let output: Val<::bevy_math::primitives::Segment3d> = ::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<::bevy_math::primitives::Segment3d>, + rotation: Val<::bevy_math::prelude::Quat>, + ) -> Val<::bevy_math::primitives::Segment3d> { + let output: Val<::bevy_math::primitives::Segment3d> = ::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<::bevy_math::primitives::Segment3d>, + rotation: Val<::bevy_math::prelude::Quat>, + point: Val<::bevy_math::prelude::Vec3>, + ) -> Val<::bevy_math::primitives::Segment3d> { + let output: Val<::bevy_math::primitives::Segment3d> = ::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<::bevy_math::primitives::Segment3d>, + rotation: Val<::bevy_math::prelude::Quat>, + ) -> Val<::bevy_math::primitives::Segment3d> { + let output: Val<::bevy_math::primitives::Segment3d> = ::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<::bevy_math::primitives::Segment3d>, + ) -> Val<::bevy_math::prelude::Vec3> { + let output: Val<::bevy_math::prelude::Vec3> = ::bevy_math::primitives::Segment3d::scaled_direction( + &_self, + ) + .into(); + output + } + /// Compute the segment translated by the given vector. + fn translated( + _self: Ref<::bevy_math::primitives::Segment3d>, + translation: Val<::bevy_math::prelude::Vec3>, + ) -> Val<::bevy_math::primitives::Segment3d> { + let output: Val<::bevy_math::primitives::Segment3d> = ::bevy_math::primitives::Segment3d::translated( + &_self, + translation.into_inner(), + ) + .into(); + output + } +} +#[script_bindings( + remote, + name = "torus_functions", + bms_core_path = "bevy_mod_scripting_core", + generated +)] +impl ::bevy_math::primitives::Torus { + fn clone( + _self: Ref<::bevy_math::primitives::Torus>, + ) -> Val<::bevy_math::primitives::Torus> { + let output: Val<::bevy_math::primitives::Torus> = <::bevy_math::primitives::Torus as ::core::clone::Clone>::clone( + &_self, + ) + .into(); + output + } + fn eq( + _self: Ref<::bevy_math::primitives::Torus>, + other: Ref<::bevy_math::primitives::Torus>, + ) -> bool { + let output: bool = <::bevy_math::primitives::Torus as ::core::cmp::PartialEq< + ::bevy_math::primitives::Torus, + >>::eq(&_self, &other) + .into(); + output + } + /// Get the inner radius of the torus. + /// For a ring torus, this corresponds to the radius of the hole, + /// or `major_radius - minor_radius` + fn inner_radius(_self: Ref<::bevy_math::primitives::Torus>) -> f32 { + let output: f32 = ::bevy_math::primitives::Torus::inner_radius(&_self).into(); + output + } + /// Create a new `Torus` from an inner and outer radius. + /// The inner radius is the radius of the hole, and the outer radius + /// is the radius of the entire object + fn new(inner_radius: f32, outer_radius: f32) -> Val<::bevy_math::primitives::Torus> { + let output: Val<::bevy_math::primitives::Torus> = ::bevy_math::primitives::Torus::new( + inner_radius, + outer_radius, + ) + .into(); + output + } + /// Get the outer radius of the torus. + /// This corresponds to the overall radius of the entire object, + /// or `major_radius + minor_radius` + fn outer_radius(_self: Ref<::bevy_math::primitives::Torus>) -> f32 { + let output: f32 = ::bevy_math::primitives::Torus::outer_radius(&_self).into(); + output + } +} +#[script_bindings( + remote, + name = "triangle_3_d_functions", + bms_core_path = "bevy_mod_scripting_core", + generated +)] +impl ::bevy_math::primitives::Triangle3d { + /// Get the centroid of the triangle. + /// This function finds the geometric center of the triangle by averaging the vertices: + /// `centroid = (a + b + c) / 3`. + fn centroid( + _self: Ref<::bevy_math::primitives::Triangle3d>, + ) -> Val<::bevy_math::prelude::Vec3> { + let output: Val<::bevy_math::prelude::Vec3> = ::bevy_math::primitives::Triangle3d::centroid( + &_self, + ) + .into(); + output + } + /// Get the circumcenter of the triangle. + fn circumcenter( + _self: Ref<::bevy_math::primitives::Triangle3d>, + ) -> Val<::bevy_math::prelude::Vec3> { + let output: Val<::bevy_math::prelude::Vec3> = ::bevy_math::primitives::Triangle3d::circumcenter( + &_self, + ) + .into(); + output + } + fn clone( + _self: Ref<::bevy_math::primitives::Triangle3d>, + ) -> Val<::bevy_math::primitives::Triangle3d> { + let output: Val<::bevy_math::primitives::Triangle3d> = <::bevy_math::primitives::Triangle3d as ::core::clone::Clone>::clone( + &_self, + ) + .into(); + output + } + fn eq( + _self: Ref<::bevy_math::primitives::Triangle3d>, + other: Ref<::bevy_math::primitives::Triangle3d>, + ) -> bool { + let output: bool = <::bevy_math::primitives::Triangle3d as ::core::cmp::PartialEq< + ::bevy_math::primitives::Triangle3d, + >>::eq(&_self, &other) + .into(); + output + } + /// Checks if the triangle is acute, meaning all angles are less than 90 degrees + fn is_acute(_self: Ref<::bevy_math::primitives::Triangle3d>) -> bool { + let output: bool = ::bevy_math::primitives::Triangle3d::is_acute(&_self).into(); + output + } + /// Checks if the triangle is degenerate, meaning it has zero area. + /// A triangle is degenerate if the cross product of the vectors `ab` and `ac` has a length less than `10e-7`. + /// This indicates that the three vertices are collinear or nearly collinear. + fn is_degenerate(_self: Ref<::bevy_math::primitives::Triangle3d>) -> bool { + let output: bool = ::bevy_math::primitives::Triangle3d::is_degenerate(&_self) + .into(); + output + } + /// Checks if the triangle is obtuse, meaning one angle is greater than 90 degrees + fn is_obtuse(_self: Ref<::bevy_math::primitives::Triangle3d>) -> bool { + let output: bool = ::bevy_math::primitives::Triangle3d::is_obtuse(&_self).into(); + output + } + /// Create a new [`Triangle3d`] from points `a`, `b`, and `c`. + fn new( + a: Val<::bevy_math::prelude::Vec3>, + b: Val<::bevy_math::prelude::Vec3>, + c: Val<::bevy_math::prelude::Vec3>, + ) -> Val<::bevy_math::primitives::Triangle3d> { + let output: Val<::bevy_math::primitives::Triangle3d> = ::bevy_math::primitives::Triangle3d::new( + a.into_inner(), + b.into_inner(), + c.into_inner(), + ) + .into(); + output + } + /// Reverse the triangle by swapping the first and last vertices. + fn reverse(mut _self: Mut<::bevy_math::primitives::Triangle3d>) -> () { + let output: () = ::bevy_math::primitives::Triangle3d::reverse(&mut _self).into(); + output + } + /// This triangle but reversed. + fn reversed( + _self: Val<::bevy_math::primitives::Triangle3d>, + ) -> Val<::bevy_math::primitives::Triangle3d> { + let output: Val<::bevy_math::primitives::Triangle3d> = ::bevy_math::primitives::Triangle3d::reversed( + _self.into_inner(), + ) + .into(); + output + } +} +#[script_bindings( + remote, + name = "ray_cast_2_d_functions", + bms_core_path = "bevy_mod_scripting_core", + generated +)] +impl ::bevy_math::bounding::RayCast2d { + /// Get the distance of an intersection with an [`Aabb2d`], if any. + fn aabb_intersection_at( + _self: Ref<::bevy_math::bounding::RayCast2d>, + aabb: Ref<::bevy_math::bounding::Aabb2d>, + ) -> ::core::option::Option { + let output: ::core::option::Option = ::bevy_math::bounding::RayCast2d::aabb_intersection_at( + &_self, + &aabb, + ) + .into(); + output + } + /// Get the distance of an intersection with a [`BoundingCircle`], if any. + fn circle_intersection_at( + _self: Ref<::bevy_math::bounding::RayCast2d>, + circle: Ref<::bevy_math::bounding::BoundingCircle>, + ) -> ::core::option::Option { + let output: ::core::option::Option = ::bevy_math::bounding::RayCast2d::circle_intersection_at( + &_self, + &circle, + ) + .into(); + output + } + fn clone( + _self: Ref<::bevy_math::bounding::RayCast2d>, + ) -> Val<::bevy_math::bounding::RayCast2d> { + let output: Val<::bevy_math::bounding::RayCast2d> = <::bevy_math::bounding::RayCast2d as ::core::clone::Clone>::clone( + &_self, + ) + .into(); + output + } + /// Get the cached multiplicative inverse of the direction of the ray. + fn direction_recip( + _self: Ref<::bevy_math::bounding::RayCast2d>, + ) -> Val<::bevy_math::prelude::Vec2> { + let output: Val<::bevy_math::prelude::Vec2> = ::bevy_math::bounding::RayCast2d::direction_recip( + &_self, + ) + .into(); + output + } + /// Construct a [`RayCast2d`] from a [`Ray2d`] and max distance. + fn from_ray( + ray: Val<::bevy_math::Ray2d>, + max: f32, + ) -> Val<::bevy_math::bounding::RayCast2d> { + let output: Val<::bevy_math::bounding::RayCast2d> = ::bevy_math::bounding::RayCast2d::from_ray( + ray.into_inner(), + max, + ) + .into(); + output + } + /// Construct a [`RayCast2d`] from an origin, [`Dir2`], and max distance. + fn new( + origin: Val<::bevy_math::prelude::Vec2>, + direction: Val<::bevy_math::prelude::Dir2>, + max: f32, + ) -> Val<::bevy_math::bounding::RayCast2d> { + let output: Val<::bevy_math::bounding::RayCast2d> = ::bevy_math::bounding::RayCast2d::new( + origin.into_inner(), + direction.into_inner(), + max, + ) + .into(); + output + } +} +#[script_bindings( + remote, + name = "aabb_cast_2_d_functions", + bms_core_path = "bevy_mod_scripting_core", + generated +)] +impl ::bevy_math::bounding::AabbCast2d { + /// Get the distance at which the [`Aabb2d`]s collide, if at all. + fn aabb_collision_at( + _self: Ref<::bevy_math::bounding::AabbCast2d>, + aabb: Val<::bevy_math::bounding::Aabb2d>, + ) -> ::core::option::Option { + let output: ::core::option::Option = ::bevy_math::bounding::AabbCast2d::aabb_collision_at( + &_self, + aabb.into_inner(), + ) + .into(); + output + } + fn clone( + _self: Ref<::bevy_math::bounding::AabbCast2d>, + ) -> Val<::bevy_math::bounding::AabbCast2d> { + let output: Val<::bevy_math::bounding::AabbCast2d> = <::bevy_math::bounding::AabbCast2d as ::core::clone::Clone>::clone( + &_self, + ) + .into(); + output + } + /// Construct an [`AabbCast2d`] from an [`Aabb2d`], [`Ray2d`], and max distance. + fn from_ray( + aabb: Val<::bevy_math::bounding::Aabb2d>, + ray: Val<::bevy_math::Ray2d>, + max: f32, + ) -> Val<::bevy_math::bounding::AabbCast2d> { + let output: Val<::bevy_math::bounding::AabbCast2d> = ::bevy_math::bounding::AabbCast2d::from_ray( + aabb.into_inner(), + ray.into_inner(), + max, + ) + .into(); + output + } + /// Construct an [`AabbCast2d`] from an [`Aabb2d`], origin, [`Dir2`], and max distance. + fn new( + aabb: Val<::bevy_math::bounding::Aabb2d>, + origin: Val<::bevy_math::prelude::Vec2>, + direction: Val<::bevy_math::prelude::Dir2>, + max: f32, + ) -> Val<::bevy_math::bounding::AabbCast2d> { + let output: Val<::bevy_math::bounding::AabbCast2d> = ::bevy_math::bounding::AabbCast2d::new( + aabb.into_inner(), + origin.into_inner(), + direction.into_inner(), + max, + ) + .into(); + output + } +} +#[script_bindings( + remote, + name = "bounding_circle_cast_functions", + bms_core_path = "bevy_mod_scripting_core", + generated +)] +impl ::bevy_math::bounding::BoundingCircleCast { + /// Get the distance at which the [`BoundingCircle`]s collide, if at all. + fn circle_collision_at( + _self: Ref<::bevy_math::bounding::BoundingCircleCast>, + circle: Val<::bevy_math::bounding::BoundingCircle>, + ) -> ::core::option::Option { + let output: ::core::option::Option = ::bevy_math::bounding::BoundingCircleCast::circle_collision_at( + &_self, + circle.into_inner(), + ) + .into(); + output + } + fn clone( + _self: Ref<::bevy_math::bounding::BoundingCircleCast>, + ) -> Val<::bevy_math::bounding::BoundingCircleCast> { + let output: Val<::bevy_math::bounding::BoundingCircleCast> = <::bevy_math::bounding::BoundingCircleCast as ::core::clone::Clone>::clone( + &_self, + ) + .into(); + output + } + /// Construct a [`BoundingCircleCast`] from a [`BoundingCircle`], [`Ray2d`], and max distance. + fn from_ray( + circle: Val<::bevy_math::bounding::BoundingCircle>, + ray: Val<::bevy_math::Ray2d>, + max: f32, + ) -> Val<::bevy_math::bounding::BoundingCircleCast> { + let output: Val<::bevy_math::bounding::BoundingCircleCast> = ::bevy_math::bounding::BoundingCircleCast::from_ray( + circle.into_inner(), + ray.into_inner(), + max, + ) + .into(); + output + } + /// Construct a [`BoundingCircleCast`] from a [`BoundingCircle`], origin, [`Dir2`], and max distance. + fn new( + circle: Val<::bevy_math::bounding::BoundingCircle>, + origin: Val<::bevy_math::prelude::Vec2>, + direction: Val<::bevy_math::prelude::Dir2>, + max: f32, + ) -> Val<::bevy_math::bounding::BoundingCircleCast> { + let output: Val<::bevy_math::bounding::BoundingCircleCast> = ::bevy_math::bounding::BoundingCircleCast::new( + circle.into_inner(), + origin.into_inner(), + direction.into_inner(), + max, + ) + .into(); + output + } +} +#[script_bindings( + remote, + name = "ray_cast_3_d_functions", + bms_core_path = "bevy_mod_scripting_core", + generated +)] +impl ::bevy_math::bounding::RayCast3d { + /// Get the distance of an intersection with an [`Aabb3d`], if any. + fn aabb_intersection_at( + _self: Ref<::bevy_math::bounding::RayCast3d>, + aabb: Ref<::bevy_math::bounding::Aabb3d>, + ) -> ::core::option::Option { + let output: ::core::option::Option = ::bevy_math::bounding::RayCast3d::aabb_intersection_at( + &_self, + &aabb, + ) + .into(); + output + } + fn clone( + _self: Ref<::bevy_math::bounding::RayCast3d>, + ) -> Val<::bevy_math::bounding::RayCast3d> { + let output: Val<::bevy_math::bounding::RayCast3d> = <::bevy_math::bounding::RayCast3d as ::core::clone::Clone>::clone( + &_self, + ) + .into(); + output + } + /// Get the cached multiplicative inverse of the direction of the ray. + fn direction_recip( + _self: Ref<::bevy_math::bounding::RayCast3d>, + ) -> Val<::bevy_math::prelude::Vec3A> { + let output: Val<::bevy_math::prelude::Vec3A> = ::bevy_math::bounding::RayCast3d::direction_recip( + &_self, + ) + .into(); + output + } + /// Construct a [`RayCast3d`] from a [`Ray3d`] and max distance. + fn from_ray( + ray: Val<::bevy_math::Ray3d>, + max: f32, + ) -> Val<::bevy_math::bounding::RayCast3d> { + let output: Val<::bevy_math::bounding::RayCast3d> = ::bevy_math::bounding::RayCast3d::from_ray( + ray.into_inner(), + max, + ) + .into(); + output + } + /// Get the distance of an intersection with a [`BoundingSphere`], if any. + fn sphere_intersection_at( + _self: Ref<::bevy_math::bounding::RayCast3d>, + sphere: Ref<::bevy_math::bounding::BoundingSphere>, + ) -> ::core::option::Option { + let output: ::core::option::Option = ::bevy_math::bounding::RayCast3d::sphere_intersection_at( + &_self, + &sphere, + ) + .into(); + output + } +} +#[script_bindings( + remote, + name = "aabb_cast_3_d_functions", + bms_core_path = "bevy_mod_scripting_core", + generated +)] +impl ::bevy_math::bounding::AabbCast3d { + /// Get the distance at which the [`Aabb3d`]s collide, if at all. + fn aabb_collision_at( + _self: Ref<::bevy_math::bounding::AabbCast3d>, + aabb: Val<::bevy_math::bounding::Aabb3d>, + ) -> ::core::option::Option { + let output: ::core::option::Option = ::bevy_math::bounding::AabbCast3d::aabb_collision_at( + &_self, + aabb.into_inner(), + ) + .into(); + output + } + fn clone( + _self: Ref<::bevy_math::bounding::AabbCast3d>, + ) -> Val<::bevy_math::bounding::AabbCast3d> { + let output: Val<::bevy_math::bounding::AabbCast3d> = <::bevy_math::bounding::AabbCast3d as ::core::clone::Clone>::clone( + &_self, + ) + .into(); + output + } + /// Construct an [`AabbCast3d`] from an [`Aabb3d`], [`Ray3d`], and max distance. + fn from_ray( + aabb: Val<::bevy_math::bounding::Aabb3d>, + ray: Val<::bevy_math::Ray3d>, + max: f32, + ) -> Val<::bevy_math::bounding::AabbCast3d> { + let output: Val<::bevy_math::bounding::AabbCast3d> = ::bevy_math::bounding::AabbCast3d::from_ray( + aabb.into_inner(), + ray.into_inner(), + max, + ) + .into(); + output + } +} +#[script_bindings( + remote, + name = "bounding_sphere_cast_functions", + bms_core_path = "bevy_mod_scripting_core", + generated +)] +impl ::bevy_math::bounding::BoundingSphereCast { + fn clone( + _self: Ref<::bevy_math::bounding::BoundingSphereCast>, + ) -> Val<::bevy_math::bounding::BoundingSphereCast> { + let output: Val<::bevy_math::bounding::BoundingSphereCast> = <::bevy_math::bounding::BoundingSphereCast as ::core::clone::Clone>::clone( + &_self, + ) + .into(); + output + } + /// Construct a [`BoundingSphereCast`] from a [`BoundingSphere`], [`Ray3d`], and max distance. + fn from_ray( + sphere: Val<::bevy_math::bounding::BoundingSphere>, + ray: Val<::bevy_math::Ray3d>, + max: f32, + ) -> Val<::bevy_math::bounding::BoundingSphereCast> { + let output: Val<::bevy_math::bounding::BoundingSphereCast> = ::bevy_math::bounding::BoundingSphereCast::from_ray( + sphere.into_inner(), + ray.into_inner(), + max, + ) + .into(); + output + } + /// Get the distance at which the [`BoundingSphere`]s collide, if at all. + fn sphere_collision_at( + _self: Ref<::bevy_math::bounding::BoundingSphereCast>, + sphere: Val<::bevy_math::bounding::BoundingSphere>, + ) -> ::core::option::Option { + let output: ::core::option::Option = ::bevy_math::bounding::BoundingSphereCast::sphere_collision_at( + &_self, + sphere.into_inner(), + ) + .into(); + output + } +} +#[script_bindings( + remote, + name = "interval_functions", + bms_core_path = "bevy_mod_scripting_core", + generated +)] +impl ::bevy_math::curve::interval::Interval { + /// Clamp the given `value` to lie within this interval. + fn clamp(_self: Val<::bevy_math::curve::interval::Interval>, value: f32) -> f32 { + let output: f32 = ::bevy_math::curve::interval::Interval::clamp( + _self.into_inner(), + value, + ) + .into(); + output + } + fn clone( + _self: Ref<::bevy_math::curve::interval::Interval>, + ) -> Val<::bevy_math::curve::interval::Interval> { + let output: Val<::bevy_math::curve::interval::Interval> = <::bevy_math::curve::interval::Interval as ::core::clone::Clone>::clone( + &_self, + ) + .into(); + output + } + /// Returns `true` if `item` is contained in this interval. + fn contains(_self: Val<::bevy_math::curve::interval::Interval>, item: f32) -> bool { + let output: bool = ::bevy_math::curve::interval::Interval::contains( + _self.into_inner(), + item, + ) + .into(); + output + } + /// Returns `true` if the other interval is contained in this interval. + /// This is non-strict: each interval will contain itself. + fn contains_interval( + _self: Val<::bevy_math::curve::interval::Interval>, + other: Val<::bevy_math::curve::interval::Interval>, + ) -> bool { + let output: bool = ::bevy_math::curve::interval::Interval::contains_interval( + _self.into_inner(), + other.into_inner(), + ) + .into(); + output + } + /// Get the end of this interval. + fn end(_self: Val<::bevy_math::curve::interval::Interval>) -> f32 { + let output: f32 = ::bevy_math::curve::interval::Interval::end(_self.into_inner()) + .into(); + output + } + fn eq( + _self: Ref<::bevy_math::curve::interval::Interval>, + other: Ref<::bevy_math::curve::interval::Interval>, + ) -> bool { + let output: bool = <::bevy_math::curve::interval::Interval as ::core::cmp::PartialEq< + ::bevy_math::curve::interval::Interval, + >>::eq(&_self, &other) + .into(); + output + } + /// Returns `true` if this interval has a finite end. + fn has_finite_end(_self: Val<::bevy_math::curve::interval::Interval>) -> bool { + let output: bool = ::bevy_math::curve::interval::Interval::has_finite_end( + _self.into_inner(), + ) + .into(); + output + } + /// Returns `true` if this interval has a finite start. + fn has_finite_start(_self: Val<::bevy_math::curve::interval::Interval>) -> bool { + let output: bool = ::bevy_math::curve::interval::Interval::has_finite_start( + _self.into_inner(), + ) + .into(); + output + } + /// Returns `true` if this interval is bounded — that is, if both its start and end are finite. + /// Equivalently, an interval is bounded if its length is finite. + fn is_bounded(_self: Val<::bevy_math::curve::interval::Interval>) -> bool { + let output: bool = ::bevy_math::curve::interval::Interval::is_bounded( + _self.into_inner(), + ) + .into(); + output + } + /// Get the length of this interval. Note that the result may be infinite (`f32::INFINITY`). + fn length(_self: Val<::bevy_math::curve::interval::Interval>) -> f32 { + let output: f32 = ::bevy_math::curve::interval::Interval::length( + _self.into_inner(), + ) + .into(); + output + } + /// Get the start of this interval. + fn start(_self: Val<::bevy_math::curve::interval::Interval>) -> f32 { + let output: f32 = ::bevy_math::curve::interval::Interval::start( + _self.into_inner(), + ) + .into(); + output + } +} +#[script_bindings( + remote, + name = "float_ord_functions", + bms_core_path = "bevy_mod_scripting_core", + generated +)] +impl ::bevy_math::FloatOrd { + fn clone(_self: Ref<::bevy_math::FloatOrd>) -> Val<::bevy_math::FloatOrd> { + let output: Val<::bevy_math::FloatOrd> = <::bevy_math::FloatOrd as ::core::clone::Clone>::clone( + &_self, + ) + .into(); + output + } + fn eq(_self: Ref<::bevy_math::FloatOrd>, other: Ref<::bevy_math::FloatOrd>) -> bool { + let output: bool = <::bevy_math::FloatOrd as ::core::cmp::PartialEq< + ::bevy_math::FloatOrd, + >>::eq(&_self, &other) + .into(); + output + } + fn ge(_self: Ref<::bevy_math::FloatOrd>, other: Ref<::bevy_math::FloatOrd>) -> bool { + let output: bool = <::bevy_math::FloatOrd as ::core::cmp::PartialOrd< + ::bevy_math::FloatOrd, + >>::ge(&_self, &other) + .into(); + output + } + fn gt(_self: Ref<::bevy_math::FloatOrd>, other: Ref<::bevy_math::FloatOrd>) -> bool { + let output: bool = <::bevy_math::FloatOrd as ::core::cmp::PartialOrd< + ::bevy_math::FloatOrd, + >>::gt(&_self, &other) + .into(); + output + } + fn le(_self: Ref<::bevy_math::FloatOrd>, other: Ref<::bevy_math::FloatOrd>) -> bool { + let output: bool = <::bevy_math::FloatOrd as ::core::cmp::PartialOrd< + ::bevy_math::FloatOrd, + >>::le(&_self, &other) + .into(); + output + } + fn lt(_self: Ref<::bevy_math::FloatOrd>, other: Ref<::bevy_math::FloatOrd>) -> bool { + let output: bool = <::bevy_math::FloatOrd as ::core::cmp::PartialOrd< + ::bevy_math::FloatOrd, + >>::lt(&_self, &other) + .into(); + output + } + fn neg(_self: Val<::bevy_math::FloatOrd>) -> Val<::bevy_math::FloatOrd> { + let output: Val<::bevy_math::FloatOrd> = <::bevy_math::FloatOrd as ::core::ops::Neg>::neg( + _self.into_inner(), + ) + .into(); + output + } +} +#[script_bindings( + remote, + name = "plane_3_d_functions", + bms_core_path = "bevy_mod_scripting_core", + generated +)] +impl ::bevy_math::primitives::Plane3d { + fn clone( + _self: Ref<::bevy_math::primitives::Plane3d>, + ) -> Val<::bevy_math::primitives::Plane3d> { + let output: Val<::bevy_math::primitives::Plane3d> = <::bevy_math::primitives::Plane3d as ::core::clone::Clone>::clone( + &_self, + ) + .into(); + output + } + fn eq( + _self: Ref<::bevy_math::primitives::Plane3d>, + other: Ref<::bevy_math::primitives::Plane3d>, + ) -> bool { + let output: bool = <::bevy_math::primitives::Plane3d as ::core::cmp::PartialEq< + ::bevy_math::primitives::Plane3d, + >>::eq(&_self, &other) + .into(); + output + } + /// Create a new `Plane3d` from a normal and a half size + /// # Panics + /// Panics if the given `normal` is zero (or very close to zero), or non-finite. + fn new( + normal: Val<::bevy_math::prelude::Vec3>, + half_size: Val<::bevy_math::prelude::Vec2>, + ) -> Val<::bevy_math::primitives::Plane3d> { + let output: Val<::bevy_math::primitives::Plane3d> = ::bevy_math::primitives::Plane3d::new( + normal.into_inner(), + half_size.into_inner(), + ) + .into(); + output + } +} +#[script_bindings( + remote, + name = "tetrahedron_functions", + bms_core_path = "bevy_mod_scripting_core", + generated +)] +impl ::bevy_math::primitives::Tetrahedron { + /// Get the centroid of the tetrahedron. + /// This function finds the geometric center of the tetrahedron + /// by averaging the vertices: `centroid = (a + b + c + d) / 4`. + fn centroid( + _self: Ref<::bevy_math::primitives::Tetrahedron>, + ) -> Val<::bevy_math::prelude::Vec3> { + let output: Val<::bevy_math::prelude::Vec3> = ::bevy_math::primitives::Tetrahedron::centroid( + &_self, + ) + .into(); + output + } + fn clone( + _self: Ref<::bevy_math::primitives::Tetrahedron>, + ) -> Val<::bevy_math::primitives::Tetrahedron> { + let output: Val<::bevy_math::primitives::Tetrahedron> = <::bevy_math::primitives::Tetrahedron as ::core::clone::Clone>::clone( + &_self, + ) + .into(); + output + } + fn eq( + _self: Ref<::bevy_math::primitives::Tetrahedron>, + other: Ref<::bevy_math::primitives::Tetrahedron>, + ) -> bool { + let output: bool = <::bevy_math::primitives::Tetrahedron as ::core::cmp::PartialEq< + ::bevy_math::primitives::Tetrahedron, + >>::eq(&_self, &other) + .into(); + output + } + /// Create a new [`Tetrahedron`] from points `a`, `b`, `c` and `d`. + fn new( + a: Val<::bevy_math::prelude::Vec3>, + b: Val<::bevy_math::prelude::Vec3>, + c: Val<::bevy_math::prelude::Vec3>, + d: Val<::bevy_math::prelude::Vec3>, + ) -> Val<::bevy_math::primitives::Tetrahedron> { + let output: Val<::bevy_math::primitives::Tetrahedron> = ::bevy_math::primitives::Tetrahedron::new( + a.into_inner(), + b.into_inner(), + c.into_inner(), + d.into_inner(), + ) + .into(); + output + } + /// Get the signed volume of the tetrahedron. + /// If it's negative, the normal vector of the face defined by + /// the first three points using the right-hand rule points + /// away from the fourth vertex. + fn signed_volume(_self: Ref<::bevy_math::primitives::Tetrahedron>) -> f32 { + let output: f32 = ::bevy_math::primitives::Tetrahedron::signed_volume(&_self) + .into(); + output + } +} +#[script_bindings( + remote, + name = "ease_function_functions", + bms_core_path = "bevy_mod_scripting_core", + generated +)] +impl ::bevy_math::curve::easing::EaseFunction { + fn clone( + _self: Ref<::bevy_math::curve::easing::EaseFunction>, + ) -> Val<::bevy_math::curve::easing::EaseFunction> { + let output: Val<::bevy_math::curve::easing::EaseFunction> = <::bevy_math::curve::easing::EaseFunction as ::core::clone::Clone>::clone( + &_self, + ) + .into(); + output + } + fn eq( + _self: Ref<::bevy_math::curve::easing::EaseFunction>, + other: Ref<::bevy_math::curve::easing::EaseFunction>, + ) -> bool { + let output: bool = <::bevy_math::curve::easing::EaseFunction as ::core::cmp::PartialEq< + ::bevy_math::curve::easing::EaseFunction, + >>::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<::bevy_math::curve::easing::JumpAt>, + ) -> () { + let output: () = <::bevy_math::curve::easing::JumpAt as ::core::cmp::Eq>::assert_receiver_is_total_eq( + &_self, + ) + .into(); + output + } + fn clone( + _self: Ref<::bevy_math::curve::easing::JumpAt>, + ) -> Val<::bevy_math::curve::easing::JumpAt> { + let output: Val<::bevy_math::curve::easing::JumpAt> = <::bevy_math::curve::easing::JumpAt as ::core::clone::Clone>::clone( + &_self, + ) + .into(); + output + } + fn eq( + _self: Ref<::bevy_math::curve::easing::JumpAt>, + other: Ref<::bevy_math::curve::easing::JumpAt>, + ) -> bool { + let output: bool = <::bevy_math::curve::easing::JumpAt as ::core::cmp::PartialEq< + ::bevy_math::curve::easing::JumpAt, + >>::eq(&_self, &other) + .into(); + output + } +} +impl Plugin for BevyMathScriptingPlugin { + fn build(&self, app: &mut App) { + let mut world = app.world_mut(); + register_aspect_ratio_functions(&mut world); + register_compass_octant_functions(&mut world); + register_compass_quadrant_functions(&mut world); + register_isometry_2_d_functions(&mut world); + register_isometry_3_d_functions(&mut world); + register_ray_2_d_functions(&mut world); + register_ray_3_d_functions(&mut world); + register_rot_2_functions(&mut world); + register_dir_2_functions(&mut world); + register_dir_3_functions(&mut world); + register_dir_3_a_functions(&mut world); + register_i_rect_functions(&mut world); + register_rect_functions(&mut world); + register_u_rect_functions(&mut world); + register_affine_3_functions(&mut world); + register_aabb_2_d_functions(&mut world); + register_bounding_circle_functions(&mut world); + register_circle_functions(&mut world); + register_annulus_functions(&mut world); + register_arc_2_d_functions(&mut world); + register_capsule_2_d_functions(&mut world); + register_circular_sector_functions(&mut world); + register_circular_segment_functions(&mut world); + register_ellipse_functions(&mut world); + register_line_2_d_functions(&mut world); + register_plane_2_d_functions(&mut world); + register_rectangle_functions(&mut world); + register_regular_polygon_functions(&mut world); + register_rhombus_functions(&mut world); + register_segment_2_d_functions(&mut world); + register_triangle_2_d_functions(&mut world); + register_aabb_3_d_functions(&mut world); + register_bounding_sphere_functions(&mut world); + register_sphere_functions(&mut world); + register_cuboid_functions(&mut world); + register_cylinder_functions(&mut world); + register_capsule_3_d_functions(&mut world); + register_cone_functions(&mut world); + register_conical_frustum_functions(&mut world); + register_infinite_plane_3_d_functions(&mut world); + register_line_3_d_functions(&mut world); + register_segment_3_d_functions(&mut world); + register_torus_functions(&mut world); + register_triangle_3_d_functions(&mut world); + register_ray_cast_2_d_functions(&mut world); + register_aabb_cast_2_d_functions(&mut world); + register_bounding_circle_cast_functions(&mut world); + register_ray_cast_3_d_functions(&mut world); + register_aabb_cast_3_d_functions(&mut world); + register_bounding_sphere_cast_functions(&mut world); + register_interval_functions(&mut world); + register_float_ord_functions(&mut world); + 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 8e10ed67c8..efdaf9faad 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 @@ -1,53985 +1,28165 @@ - #![allow(clippy::all)] - #![allow(unused, deprecated, dead_code)] - 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 BevyReflectScriptingPlugin; - pub(crate) fn register_atomic_bool_functions(world: &mut bevy::ecs::world::World) { - bevy_mod_scripting_core::bindings::function::namespace::NamespaceBuilder::< - ::core::sync::atomic::AtomicBool, - >::new(world) - .register_documented( - "into_inner", - |_self: Val<::core::sync::atomic::AtomicBool>| { - let output: bool = { - { - let output: bool = ::core::sync::atomic::AtomicBool::into_inner( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Consumes the atomic and returns the contained value.\n This is safe because passing `self` by value guarantees that no other threads are\n concurrently accessing the atomic data.\n # Examples\n ```\n use std::sync::atomic::AtomicBool;\n let some_bool = AtomicBool::new(true);\n assert_eq!(some_bool.into_inner(), true);\n ```", - &["_self"], - ) - .register_documented( - "new", - |v: bool| { - let output: Val<::core::sync::atomic::AtomicBool> = { - { - let output: Val<::core::sync::atomic::AtomicBool> = ::core::sync::atomic::AtomicBool::new( - v, - ) - .into(); - output - } - }; - output - }, - " Creates a new `AtomicBool`.\n # Examples\n ```\n use std::sync::atomic::AtomicBool;\n let atomic_true = AtomicBool::new(true);\n let atomic_false = AtomicBool::new(false);\n ```", - &["v"], - ); - let registry = world - .get_resource_or_init::(); - let mut registry = registry.write(); - registry - .register_type_data::< - ::core::sync::atomic::AtomicBool, - bevy_mod_scripting_core::bindings::MarkAsGenerated, - >(); - } - pub(crate) fn register_atomic_i_16_functions(world: &mut bevy::ecs::world::World) { - bevy_mod_scripting_core::bindings::function::namespace::NamespaceBuilder::< - ::core::sync::atomic::AtomicI16, - >::new(world) - .register_documented( - "into_inner", - |_self: Val<::core::sync::atomic::AtomicI16>| { - let output: i16 = { - { - let output: i16 = ::core::sync::atomic::AtomicI16::into_inner( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Consumes the atomic and returns the contained value.\n This is safe because passing `self` by value guarantees that no other threads are\n concurrently accessing the atomic data.\n # Examples\n ```\nuse std::sync::atomic::AtomicI16;\nlet some_var = AtomicI16::new(5);\n assert_eq!(some_var.into_inner(), 5);\n ```", - &["_self"], - ) - .register_documented( - "new", - |v: i16| { - let output: Val<::core::sync::atomic::AtomicI16> = { - { - let output: Val<::core::sync::atomic::AtomicI16> = ::core::sync::atomic::AtomicI16::new( - v, - ) - .into(); - output - } - }; - output - }, - " Creates a new atomic integer.\n # Examples\n ```\nuse std::sync::atomic::AtomicI16;\nlet atomic_forty_two = AtomicI16::new(42);\n ```", - &["v"], - ); - let registry = world - .get_resource_or_init::(); - let mut registry = registry.write(); - registry - .register_type_data::< - ::core::sync::atomic::AtomicI16, - bevy_mod_scripting_core::bindings::MarkAsGenerated, - >(); - } - pub(crate) fn register_atomic_i_32_functions(world: &mut bevy::ecs::world::World) { - bevy_mod_scripting_core::bindings::function::namespace::NamespaceBuilder::< - ::core::sync::atomic::AtomicI32, - >::new(world) - .register_documented( - "into_inner", - |_self: Val<::core::sync::atomic::AtomicI32>| { - let output: i32 = { - { - let output: i32 = ::core::sync::atomic::AtomicI32::into_inner( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Consumes the atomic and returns the contained value.\n This is safe because passing `self` by value guarantees that no other threads are\n concurrently accessing the atomic data.\n # Examples\n ```\nuse std::sync::atomic::AtomicI32;\nlet some_var = AtomicI32::new(5);\n assert_eq!(some_var.into_inner(), 5);\n ```", - &["_self"], - ) - .register_documented( - "new", - |v: i32| { - let output: Val<::core::sync::atomic::AtomicI32> = { - { - let output: Val<::core::sync::atomic::AtomicI32> = ::core::sync::atomic::AtomicI32::new( - v, - ) - .into(); - output - } - }; - output - }, - " Creates a new atomic integer.\n # Examples\n ```\nuse std::sync::atomic::AtomicI32;\nlet atomic_forty_two = AtomicI32::new(42);\n ```", - &["v"], - ); - let registry = world - .get_resource_or_init::(); - let mut registry = registry.write(); - registry - .register_type_data::< - ::core::sync::atomic::AtomicI32, - bevy_mod_scripting_core::bindings::MarkAsGenerated, - >(); - } - pub(crate) fn register_atomic_i_64_functions(world: &mut bevy::ecs::world::World) { - bevy_mod_scripting_core::bindings::function::namespace::NamespaceBuilder::< - ::core::sync::atomic::AtomicI64, - >::new(world) - .register_documented( - "into_inner", - |_self: Val<::core::sync::atomic::AtomicI64>| { - let output: i64 = { - { - let output: i64 = ::core::sync::atomic::AtomicI64::into_inner( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Consumes the atomic and returns the contained value.\n This is safe because passing `self` by value guarantees that no other threads are\n concurrently accessing the atomic data.\n # Examples\n ```\nuse std::sync::atomic::AtomicI64;\nlet some_var = AtomicI64::new(5);\n assert_eq!(some_var.into_inner(), 5);\n ```", - &["_self"], - ) - .register_documented( - "new", - |v: i64| { - let output: Val<::core::sync::atomic::AtomicI64> = { - { - let output: Val<::core::sync::atomic::AtomicI64> = ::core::sync::atomic::AtomicI64::new( - v, - ) - .into(); - output - } - }; - output - }, - " Creates a new atomic integer.\n # Examples\n ```\nuse std::sync::atomic::AtomicI64;\nlet atomic_forty_two = AtomicI64::new(42);\n ```", - &["v"], - ); - let registry = world - .get_resource_or_init::(); - let mut registry = registry.write(); - registry - .register_type_data::< - ::core::sync::atomic::AtomicI64, - bevy_mod_scripting_core::bindings::MarkAsGenerated, - >(); - } - pub(crate) fn register_atomic_i_8_functions(world: &mut bevy::ecs::world::World) { - bevy_mod_scripting_core::bindings::function::namespace::NamespaceBuilder::< - ::core::sync::atomic::AtomicI8, - >::new(world) - .register_documented( - "into_inner", - |_self: Val<::core::sync::atomic::AtomicI8>| { - let output: i8 = { - { - let output: i8 = ::core::sync::atomic::AtomicI8::into_inner( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Consumes the atomic and returns the contained value.\n This is safe because passing `self` by value guarantees that no other threads are\n concurrently accessing the atomic data.\n # Examples\n ```\nuse std::sync::atomic::AtomicI8;\nlet some_var = AtomicI8::new(5);\n assert_eq!(some_var.into_inner(), 5);\n ```", - &["_self"], - ) - .register_documented( - "new", - |v: i8| { - let output: Val<::core::sync::atomic::AtomicI8> = { - { - let output: Val<::core::sync::atomic::AtomicI8> = ::core::sync::atomic::AtomicI8::new( - v, - ) - .into(); - output - } - }; - output - }, - " Creates a new atomic integer.\n # Examples\n ```\nuse std::sync::atomic::AtomicI8;\nlet atomic_forty_two = AtomicI8::new(42);\n ```", - &["v"], - ); - let registry = world - .get_resource_or_init::(); - let mut registry = registry.write(); - registry - .register_type_data::< - ::core::sync::atomic::AtomicI8, - bevy_mod_scripting_core::bindings::MarkAsGenerated, - >(); - } - pub(crate) fn register_atomic_isize_functions(world: &mut bevy::ecs::world::World) { - bevy_mod_scripting_core::bindings::function::namespace::NamespaceBuilder::< - ::core::sync::atomic::AtomicIsize, - >::new(world) - .register_documented( - "into_inner", - |_self: Val<::core::sync::atomic::AtomicIsize>| { - let output: isize = { - { - let output: isize = ::core::sync::atomic::AtomicIsize::into_inner( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Consumes the atomic and returns the contained value.\n This is safe because passing `self` by value guarantees that no other threads are\n concurrently accessing the atomic data.\n # Examples\n ```\nuse std::sync::atomic::AtomicIsize;\nlet some_var = AtomicIsize::new(5);\n assert_eq!(some_var.into_inner(), 5);\n ```", - &["_self"], - ) - .register_documented( - "new", - |v: isize| { - let output: Val<::core::sync::atomic::AtomicIsize> = { - { - let output: Val<::core::sync::atomic::AtomicIsize> = ::core::sync::atomic::AtomicIsize::new( - v, - ) - .into(); - output - } - }; - output - }, - " Creates a new atomic integer.\n # Examples\n ```\nuse std::sync::atomic::AtomicIsize;\nlet atomic_forty_two = AtomicIsize::new(42);\n ```", - &["v"], - ); - let registry = world - .get_resource_or_init::(); - let mut registry = registry.write(); - registry - .register_type_data::< - ::core::sync::atomic::AtomicIsize, - bevy_mod_scripting_core::bindings::MarkAsGenerated, - >(); - } - pub(crate) fn register_atomic_u_16_functions(world: &mut bevy::ecs::world::World) { - bevy_mod_scripting_core::bindings::function::namespace::NamespaceBuilder::< - ::core::sync::atomic::AtomicU16, - >::new(world) - .register_documented( - "into_inner", - |_self: Val<::core::sync::atomic::AtomicU16>| { - let output: u16 = { - { - let output: u16 = ::core::sync::atomic::AtomicU16::into_inner( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Consumes the atomic and returns the contained value.\n This is safe because passing `self` by value guarantees that no other threads are\n concurrently accessing the atomic data.\n # Examples\n ```\nuse std::sync::atomic::AtomicU16;\nlet some_var = AtomicU16::new(5);\n assert_eq!(some_var.into_inner(), 5);\n ```", - &["_self"], - ) - .register_documented( - "new", - |v: u16| { - let output: Val<::core::sync::atomic::AtomicU16> = { - { - let output: Val<::core::sync::atomic::AtomicU16> = ::core::sync::atomic::AtomicU16::new( - v, - ) - .into(); - output - } - }; - output - }, - " Creates a new atomic integer.\n # Examples\n ```\nuse std::sync::atomic::AtomicU16;\nlet atomic_forty_two = AtomicU16::new(42);\n ```", - &["v"], - ); - let registry = world - .get_resource_or_init::(); - let mut registry = registry.write(); - registry - .register_type_data::< - ::core::sync::atomic::AtomicU16, - bevy_mod_scripting_core::bindings::MarkAsGenerated, - >(); - } - pub(crate) fn register_atomic_u_32_functions(world: &mut bevy::ecs::world::World) { - bevy_mod_scripting_core::bindings::function::namespace::NamespaceBuilder::< - ::core::sync::atomic::AtomicU32, - >::new(world) - .register_documented( - "into_inner", - |_self: Val<::core::sync::atomic::AtomicU32>| { - let output: u32 = { - { - let output: u32 = ::core::sync::atomic::AtomicU32::into_inner( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Consumes the atomic and returns the contained value.\n This is safe because passing `self` by value guarantees that no other threads are\n concurrently accessing the atomic data.\n # Examples\n ```\nuse std::sync::atomic::AtomicU32;\nlet some_var = AtomicU32::new(5);\n assert_eq!(some_var.into_inner(), 5);\n ```", - &["_self"], - ) - .register_documented( - "new", - |v: u32| { - let output: Val<::core::sync::atomic::AtomicU32> = { - { - let output: Val<::core::sync::atomic::AtomicU32> = ::core::sync::atomic::AtomicU32::new( - v, - ) - .into(); - output - } - }; - output - }, - " Creates a new atomic integer.\n # Examples\n ```\nuse std::sync::atomic::AtomicU32;\nlet atomic_forty_two = AtomicU32::new(42);\n ```", - &["v"], - ); - let registry = world - .get_resource_or_init::(); - let mut registry = registry.write(); - registry - .register_type_data::< - ::core::sync::atomic::AtomicU32, - bevy_mod_scripting_core::bindings::MarkAsGenerated, - >(); - } - pub(crate) fn register_atomic_u_64_functions(world: &mut bevy::ecs::world::World) { - bevy_mod_scripting_core::bindings::function::namespace::NamespaceBuilder::< - ::core::sync::atomic::AtomicU64, - >::new(world) - .register_documented( - "into_inner", - |_self: Val<::core::sync::atomic::AtomicU64>| { - let output: u64 = { - { - let output: u64 = ::core::sync::atomic::AtomicU64::into_inner( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Consumes the atomic and returns the contained value.\n This is safe because passing `self` by value guarantees that no other threads are\n concurrently accessing the atomic data.\n # Examples\n ```\nuse std::sync::atomic::AtomicU64;\nlet some_var = AtomicU64::new(5);\n assert_eq!(some_var.into_inner(), 5);\n ```", - &["_self"], - ) - .register_documented( - "new", - |v: u64| { - let output: Val<::core::sync::atomic::AtomicU64> = { - { - let output: Val<::core::sync::atomic::AtomicU64> = ::core::sync::atomic::AtomicU64::new( - v, - ) - .into(); - output - } - }; - output - }, - " Creates a new atomic integer.\n # Examples\n ```\nuse std::sync::atomic::AtomicU64;\nlet atomic_forty_two = AtomicU64::new(42);\n ```", - &["v"], - ); - let registry = world - .get_resource_or_init::(); - let mut registry = registry.write(); - registry - .register_type_data::< - ::core::sync::atomic::AtomicU64, - bevy_mod_scripting_core::bindings::MarkAsGenerated, - >(); - } - pub(crate) fn register_atomic_u_8_functions(world: &mut bevy::ecs::world::World) { - bevy_mod_scripting_core::bindings::function::namespace::NamespaceBuilder::< - ::core::sync::atomic::AtomicU8, - >::new(world) - .register_documented( - "into_inner", - |_self: Val<::core::sync::atomic::AtomicU8>| { - let output: u8 = { - { - let output: u8 = ::core::sync::atomic::AtomicU8::into_inner( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Consumes the atomic and returns the contained value.\n This is safe because passing `self` by value guarantees that no other threads are\n concurrently accessing the atomic data.\n # Examples\n ```\nuse std::sync::atomic::AtomicU8;\nlet some_var = AtomicU8::new(5);\n assert_eq!(some_var.into_inner(), 5);\n ```", - &["_self"], - ) - .register_documented( - "new", - |v: u8| { - let output: Val<::core::sync::atomic::AtomicU8> = { - { - let output: Val<::core::sync::atomic::AtomicU8> = ::core::sync::atomic::AtomicU8::new( - v, - ) - .into(); - output - } - }; - output - }, - " Creates a new atomic integer.\n # Examples\n ```\nuse std::sync::atomic::AtomicU8;\nlet atomic_forty_two = AtomicU8::new(42);\n ```", - &["v"], - ); - let registry = world - .get_resource_or_init::(); - let mut registry = registry.write(); - registry - .register_type_data::< - ::core::sync::atomic::AtomicU8, - bevy_mod_scripting_core::bindings::MarkAsGenerated, - >(); - } - pub(crate) fn register_atomic_usize_functions(world: &mut bevy::ecs::world::World) { - bevy_mod_scripting_core::bindings::function::namespace::NamespaceBuilder::< - ::core::sync::atomic::AtomicUsize, - >::new(world) - .register_documented( - "into_inner", - |_self: Val<::core::sync::atomic::AtomicUsize>| { - let output: usize = { - { - let output: usize = ::core::sync::atomic::AtomicUsize::into_inner( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Consumes the atomic and returns the contained value.\n This is safe because passing `self` by value guarantees that no other threads are\n concurrently accessing the atomic data.\n # Examples\n ```\nuse std::sync::atomic::AtomicUsize;\nlet some_var = AtomicUsize::new(5);\n assert_eq!(some_var.into_inner(), 5);\n ```", - &["_self"], - ) - .register_documented( - "new", - |v: usize| { - let output: Val<::core::sync::atomic::AtomicUsize> = { - { - let output: Val<::core::sync::atomic::AtomicUsize> = ::core::sync::atomic::AtomicUsize::new( - v, - ) - .into(); - output - } - }; - output - }, - " Creates a new atomic integer.\n # Examples\n ```\nuse std::sync::atomic::AtomicUsize;\nlet atomic_forty_two = AtomicUsize::new(42);\n ```", - &["v"], - ); - let registry = world - .get_resource_or_init::(); - let mut registry = registry.write(); - registry - .register_type_data::< - ::core::sync::atomic::AtomicUsize, - bevy_mod_scripting_core::bindings::MarkAsGenerated, - >(); - } - pub(crate) fn register_duration_functions(world: &mut bevy::ecs::world::World) { - bevy_mod_scripting_core::bindings::function::namespace::NamespaceBuilder::< +// @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_ecs::prelude::*; +use bevy_mod_scripting_derive::script_bindings; +use crate::*; +pub struct BevyReflectScriptingPlugin; +#[script_bindings( + remote, + name = "atomic_bool_functions", + bms_core_path = "bevy_mod_scripting_core", + generated +)] +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. + /// # Examples + /// ``` + /// use std::sync::atomic::AtomicBool; + /// let some_bool = AtomicBool::new(true); + /// assert_eq!(some_bool.into_inner(), true); + /// ``` + fn into_inner(_self: Val<::core::sync::atomic::AtomicBool>) -> bool { + let output: bool = ::core::sync::atomic::AtomicBool::into_inner( + _self.into_inner(), + ) + .into(); + output + } + /// Creates a new `AtomicBool`. + /// # Examples + /// ``` + /// use std::sync::atomic::AtomicBool; + /// let atomic_true = AtomicBool::new(true); + /// let atomic_false = AtomicBool::new(false); + /// ``` + fn new(v: bool) -> Val<::core::sync::atomic::AtomicBool> { + let output: Val<::core::sync::atomic::AtomicBool> = ::core::sync::atomic::AtomicBool::new( + v, + ) + .into(); + output + } +} +#[script_bindings( + remote, + name = "atomic_i_16_functions", + bms_core_path = "bevy_mod_scripting_core", + generated +)] +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. + /// # Examples + /// ``` + /// use std::sync::atomic::AtomicI16; + /// let some_var = AtomicI16::new(5); + /// assert_eq!(some_var.into_inner(), 5); + /// ``` + fn into_inner(_self: Val<::core::sync::atomic::AtomicI16>) -> i16 { + let output: i16 = ::core::sync::atomic::AtomicI16::into_inner(_self.into_inner()) + .into(); + output + } + /// Creates a new atomic integer. + /// # Examples + /// ``` + /// use std::sync::atomic::AtomicI16; + /// let atomic_forty_two = AtomicI16::new(42); + /// ``` + fn new(v: i16) -> Val<::core::sync::atomic::AtomicI16> { + let output: Val<::core::sync::atomic::AtomicI16> = ::core::sync::atomic::AtomicI16::new( + v, + ) + .into(); + output + } +} +#[script_bindings( + remote, + name = "atomic_i_32_functions", + bms_core_path = "bevy_mod_scripting_core", + generated +)] +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. + /// # Examples + /// ``` + /// use std::sync::atomic::AtomicI32; + /// let some_var = AtomicI32::new(5); + /// assert_eq!(some_var.into_inner(), 5); + /// ``` + fn into_inner(_self: Val<::core::sync::atomic::AtomicI32>) -> i32 { + let output: i32 = ::core::sync::atomic::AtomicI32::into_inner(_self.into_inner()) + .into(); + output + } + /// Creates a new atomic integer. + /// # Examples + /// ``` + /// use std::sync::atomic::AtomicI32; + /// let atomic_forty_two = AtomicI32::new(42); + /// ``` + fn new(v: i32) -> Val<::core::sync::atomic::AtomicI32> { + let output: Val<::core::sync::atomic::AtomicI32> = ::core::sync::atomic::AtomicI32::new( + v, + ) + .into(); + output + } +} +#[script_bindings( + remote, + name = "atomic_i_64_functions", + bms_core_path = "bevy_mod_scripting_core", + generated +)] +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. + /// # Examples + /// ``` + /// use std::sync::atomic::AtomicI64; + /// let some_var = AtomicI64::new(5); + /// assert_eq!(some_var.into_inner(), 5); + /// ``` + fn into_inner(_self: Val<::core::sync::atomic::AtomicI64>) -> i64 { + let output: i64 = ::core::sync::atomic::AtomicI64::into_inner(_self.into_inner()) + .into(); + output + } + /// Creates a new atomic integer. + /// # Examples + /// ``` + /// use std::sync::atomic::AtomicI64; + /// let atomic_forty_two = AtomicI64::new(42); + /// ``` + fn new(v: i64) -> Val<::core::sync::atomic::AtomicI64> { + let output: Val<::core::sync::atomic::AtomicI64> = ::core::sync::atomic::AtomicI64::new( + v, + ) + .into(); + output + } +} +#[script_bindings( + remote, + name = "atomic_i_8_functions", + bms_core_path = "bevy_mod_scripting_core", + generated +)] +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. + /// # Examples + /// ``` + /// use std::sync::atomic::AtomicI8; + /// let some_var = AtomicI8::new(5); + /// assert_eq!(some_var.into_inner(), 5); + /// ``` + fn into_inner(_self: Val<::core::sync::atomic::AtomicI8>) -> i8 { + let output: i8 = ::core::sync::atomic::AtomicI8::into_inner(_self.into_inner()) + .into(); + output + } + /// Creates a new atomic integer. + /// # Examples + /// ``` + /// use std::sync::atomic::AtomicI8; + /// let atomic_forty_two = AtomicI8::new(42); + /// ``` + fn new(v: i8) -> Val<::core::sync::atomic::AtomicI8> { + let output: Val<::core::sync::atomic::AtomicI8> = ::core::sync::atomic::AtomicI8::new( + v, + ) + .into(); + output + } +} +#[script_bindings( + remote, + name = "atomic_isize_functions", + bms_core_path = "bevy_mod_scripting_core", + generated +)] +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. + /// # Examples + /// ``` + /// use std::sync::atomic::AtomicIsize; + /// let some_var = AtomicIsize::new(5); + /// assert_eq!(some_var.into_inner(), 5); + /// ``` + fn into_inner(_self: Val<::core::sync::atomic::AtomicIsize>) -> isize { + let output: isize = ::core::sync::atomic::AtomicIsize::into_inner( + _self.into_inner(), + ) + .into(); + output + } + /// Creates a new atomic integer. + /// # Examples + /// ``` + /// use std::sync::atomic::AtomicIsize; + /// let atomic_forty_two = AtomicIsize::new(42); + /// ``` + fn new(v: isize) -> Val<::core::sync::atomic::AtomicIsize> { + let output: Val<::core::sync::atomic::AtomicIsize> = ::core::sync::atomic::AtomicIsize::new( + v, + ) + .into(); + output + } +} +#[script_bindings( + remote, + name = "atomic_u_16_functions", + bms_core_path = "bevy_mod_scripting_core", + generated +)] +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. + /// # Examples + /// ``` + /// use std::sync::atomic::AtomicU16; + /// let some_var = AtomicU16::new(5); + /// assert_eq!(some_var.into_inner(), 5); + /// ``` + fn into_inner(_self: Val<::core::sync::atomic::AtomicU16>) -> u16 { + let output: u16 = ::core::sync::atomic::AtomicU16::into_inner(_self.into_inner()) + .into(); + output + } + /// Creates a new atomic integer. + /// # Examples + /// ``` + /// use std::sync::atomic::AtomicU16; + /// let atomic_forty_two = AtomicU16::new(42); + /// ``` + fn new(v: u16) -> Val<::core::sync::atomic::AtomicU16> { + let output: Val<::core::sync::atomic::AtomicU16> = ::core::sync::atomic::AtomicU16::new( + v, + ) + .into(); + output + } +} +#[script_bindings( + remote, + name = "atomic_u_32_functions", + bms_core_path = "bevy_mod_scripting_core", + generated +)] +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. + /// # Examples + /// ``` + /// use std::sync::atomic::AtomicU32; + /// let some_var = AtomicU32::new(5); + /// assert_eq!(some_var.into_inner(), 5); + /// ``` + fn into_inner(_self: Val<::core::sync::atomic::AtomicU32>) -> u32 { + let output: u32 = ::core::sync::atomic::AtomicU32::into_inner(_self.into_inner()) + .into(); + output + } + /// Creates a new atomic integer. + /// # Examples + /// ``` + /// use std::sync::atomic::AtomicU32; + /// let atomic_forty_two = AtomicU32::new(42); + /// ``` + fn new(v: u32) -> Val<::core::sync::atomic::AtomicU32> { + let output: Val<::core::sync::atomic::AtomicU32> = ::core::sync::atomic::AtomicU32::new( + v, + ) + .into(); + output + } +} +#[script_bindings( + remote, + name = "atomic_u_64_functions", + bms_core_path = "bevy_mod_scripting_core", + generated +)] +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. + /// # Examples + /// ``` + /// use std::sync::atomic::AtomicU64; + /// let some_var = AtomicU64::new(5); + /// assert_eq!(some_var.into_inner(), 5); + /// ``` + fn into_inner(_self: Val<::core::sync::atomic::AtomicU64>) -> u64 { + let output: u64 = ::core::sync::atomic::AtomicU64::into_inner(_self.into_inner()) + .into(); + output + } + /// Creates a new atomic integer. + /// # Examples + /// ``` + /// use std::sync::atomic::AtomicU64; + /// let atomic_forty_two = AtomicU64::new(42); + /// ``` + fn new(v: u64) -> Val<::core::sync::atomic::AtomicU64> { + let output: Val<::core::sync::atomic::AtomicU64> = ::core::sync::atomic::AtomicU64::new( + v, + ) + .into(); + output + } +} +#[script_bindings( + remote, + name = "atomic_u_8_functions", + bms_core_path = "bevy_mod_scripting_core", + generated +)] +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. + /// # Examples + /// ``` + /// use std::sync::atomic::AtomicU8; + /// let some_var = AtomicU8::new(5); + /// assert_eq!(some_var.into_inner(), 5); + /// ``` + fn into_inner(_self: Val<::core::sync::atomic::AtomicU8>) -> u8 { + let output: u8 = ::core::sync::atomic::AtomicU8::into_inner(_self.into_inner()) + .into(); + output + } + /// Creates a new atomic integer. + /// # Examples + /// ``` + /// use std::sync::atomic::AtomicU8; + /// let atomic_forty_two = AtomicU8::new(42); + /// ``` + fn new(v: u8) -> Val<::core::sync::atomic::AtomicU8> { + let output: Val<::core::sync::atomic::AtomicU8> = ::core::sync::atomic::AtomicU8::new( + v, + ) + .into(); + output + } +} +#[script_bindings( + remote, + name = "atomic_usize_functions", + bms_core_path = "bevy_mod_scripting_core", + generated +)] +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. + /// # Examples + /// ``` + /// use std::sync::atomic::AtomicUsize; + /// let some_var = AtomicUsize::new(5); + /// assert_eq!(some_var.into_inner(), 5); + /// ``` + fn into_inner(_self: Val<::core::sync::atomic::AtomicUsize>) -> usize { + let output: usize = ::core::sync::atomic::AtomicUsize::into_inner( + _self.into_inner(), + ) + .into(); + output + } + /// Creates a new atomic integer. + /// # Examples + /// ``` + /// use std::sync::atomic::AtomicUsize; + /// let atomic_forty_two = AtomicUsize::new(42); + /// ``` + fn new(v: usize) -> Val<::core::sync::atomic::AtomicUsize> { + let output: Val<::core::sync::atomic::AtomicUsize> = ::core::sync::atomic::AtomicUsize::new( + v, + ) + .into(); + output + } +} +#[script_bindings( + remote, + name = "duration_functions", + bms_core_path = "bevy_mod_scripting_core", + generated +)] +impl ::core::time::Duration { + /// Computes the absolute difference between `self` and `other`. + /// # Examples + /// ``` + /// use std::time::Duration; + /// assert_eq!(Duration::new(100, 0).abs_diff(Duration::new(80, 0)), Duration::new(20, 0)); + /// 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<::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(), + ) + .into(); + output + } + fn add( + _self: Val<::core::time::Duration>, + 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 + } + /// Returns the total number of whole microseconds contained by this `Duration`. + /// # Examples + /// ``` + /// use std::time::Duration; + /// let duration = Duration::new(5, 730_023_852); + /// assert_eq!(duration.as_micros(), 5_730_023); + /// ``` + 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`. + /// # Examples + /// ``` + /// use std::time::Duration; + /// let duration = Duration::new(5, 730_023_852); + /// assert_eq!(duration.as_millis(), 5_730); + /// ``` + 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`. + /// # Examples + /// ``` + /// use std::time::Duration; + /// let duration = Duration::new(5, 730_023_852); + /// assert_eq!(duration.as_nanos(), 5_730_023_852); + /// ``` + 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`. + /// The returned value does not include the fractional (nanosecond) part of the + /// duration, which can be obtained using [`subsec_nanos`]. + /// # Examples + /// ``` + /// use std::time::Duration; + /// let duration = Duration::new(5, 730_023_852); + /// assert_eq!(duration.as_secs(), 5); + /// ``` + /// To determine the total number of seconds represented by the `Duration` + /// including the fractional part, use [`as_secs_f64`] or [`as_secs_f32`] + /// [`as_secs_f64`]: Duration::as_secs_f64 + /// [`as_secs_f32`]: Duration::as_secs_f32 + /// [`subsec_nanos`]: Duration::subsec_nanos + 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`. + /// The returned value includes the fractional (nanosecond) part of the duration. + /// # Examples + /// ``` + /// use std::time::Duration; + /// let dur = Duration::new(2, 700_000_000); + /// assert_eq!(dur.as_secs_f32(), 2.7); + /// ``` + 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`. + /// The returned value includes the fractional (nanosecond) part of the duration. + /// # Examples + /// ``` + /// use std::time::Duration; + /// let dur = Duration::new(2, 700_000_000); + /// assert_eq!(dur.as_secs_f64(), 2.7); + /// ``` + 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<::core::time::Duration>) -> () { + let output: () = <::core::time::Duration as ::core::cmp::Eq>::assert_receiver_is_total_eq( + &_self, + ) + .into(); + output + } + 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<::core::time::Duration>, 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(); + output + } + /// Divides `Duration` by `Duration` and returns `f32`. + /// # Examples + /// ``` + /// use std::time::Duration; + /// let dur1 = Duration::new(2, 700_000_000); + /// let dur2 = Duration::new(5, 400_000_000); + /// assert_eq!(dur1.div_duration_f32(dur2), 0.5); + /// ``` + fn div_duration_f32( + _self: Val<::core::time::Duration>, + rhs: Val<::core::time::Duration>, + ) -> f32 { + let output: f32 = ::core::time::Duration::div_duration_f32( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Divides `Duration` by `Duration` and returns `f64`. + /// # Examples + /// ``` + /// use std::time::Duration; + /// let dur1 = Duration::new(2, 700_000_000); + /// let dur2 = Duration::new(5, 400_000_000); + /// assert_eq!(dur1.div_duration_f64(dur2), 0.5); + /// ``` + fn div_duration_f64( + _self: Val<::core::time::Duration>, + rhs: Val<::core::time::Duration>, + ) -> f64 { + let output: f64 = ::core::time::Duration::div_duration_f64( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Divides `Duration` by `f32`. + /// # Panics + /// This method will panic if result is negative, overflows `Duration` or not finite. + /// # Examples + /// ``` + /// use std::time::Duration; + /// let dur = Duration::new(2, 700_000_000); + /// // note that due to rounding errors result is slightly + /// // different from 0.859_872_611 + /// assert_eq!(dur.div_f32(3.14), Duration::new(0, 859_872_580)); + /// assert_eq!(dur.div_f32(3.14e5), Duration::new(0, 8_599)); + /// ``` + fn div_f32( + _self: Val<::core::time::Duration>, + rhs: f32, + ) -> Val<::core::time::Duration> { + let output: Val<::core::time::Duration> = ::core::time::Duration::div_f32( + _self.into_inner(), + rhs, + ) + .into(); + output + } + /// Divides `Duration` by `f64`. + /// # Panics + /// This method will panic if result is negative, overflows `Duration` or not finite. + /// # Examples + /// ``` + /// use std::time::Duration; + /// let dur = Duration::new(2, 700_000_000); + /// assert_eq!(dur.div_f64(3.14), Duration::new(0, 859_872_611)); + /// assert_eq!(dur.div_f64(3.14e5), Duration::new(0, 8_599)); + /// ``` + fn div_f64( + _self: Val<::core::time::Duration>, + rhs: 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<::core::time::Duration>, + other: Ref<::core::time::Duration>, + ) -> bool { + let output: bool = <::core::time::Duration as ::core::cmp::PartialEq< + ::core::time::Duration, + >>::eq(&_self, &other) + .into(); + output + } + /// Creates a new `Duration` from the specified number of microseconds. + /// # Examples + /// ``` + /// use std::time::Duration; + /// let duration = Duration::from_micros(1_000_002); + /// assert_eq!(1, duration.as_secs()); + /// assert_eq!(2_000, duration.subsec_nanos()); + /// ``` + fn from_micros(micros: u64) -> Val<::core::time::Duration> { + let output: Val<::core::time::Duration> = ::core::time::Duration::from_micros( + micros, + ) + .into(); + output + } + /// Creates a new `Duration` from the specified number of milliseconds. + /// # Examples + /// ``` + /// use std::time::Duration; + /// let duration = Duration::from_millis(2_569); + /// assert_eq!(2, duration.as_secs()); + /// assert_eq!(569_000_000, duration.subsec_nanos()); + /// ``` + fn from_millis(millis: u64) -> Val<::core::time::Duration> { + let output: Val<::core::time::Duration> = ::core::time::Duration::from_millis( + millis, + ) + .into(); + output + } + /// Creates a new `Duration` from the specified number of nanoseconds. + /// Note: Using this on the return value of `as_nanos()` might cause unexpected behavior: + /// `as_nanos()` returns a u128, and can return values that do not fit in u64, e.g. 585 years. + /// Instead, consider using the pattern `Duration::new(d.as_secs(), d.subsec_nanos())` + /// if you cannot copy/clone the Duration directly. + /// # Examples + /// ``` + /// use std::time::Duration; + /// let duration = Duration::from_nanos(1_000_000_123); + /// assert_eq!(1, duration.as_secs()); + /// assert_eq!(123, duration.subsec_nanos()); + /// ``` + fn from_nanos(nanos: u64) -> Val<::core::time::Duration> { + let output: Val<::core::time::Duration> = ::core::time::Duration::from_nanos( + nanos, + ) + .into(); + output + } + /// Creates a new `Duration` from the specified number of whole seconds. + /// # Examples + /// ``` + /// use std::time::Duration; + /// let duration = Duration::from_secs(5); + /// assert_eq!(5, duration.as_secs()); + /// assert_eq!(0, duration.subsec_nanos()); + /// ``` + fn from_secs(secs: u64) -> Val<::core::time::Duration> { + let output: Val<::core::time::Duration> = ::core::time::Duration::from_secs(secs) + .into(); + output + } + /// Creates a new `Duration` from the specified number of seconds represented + /// as `f32`. + /// # Panics + /// This constructor will panic if `secs` is negative, overflows `Duration` or not finite. + /// # Examples + /// ``` + /// use std::time::Duration; + /// let res = Duration::from_secs_f32(0.0); + /// assert_eq!(res, Duration::new(0, 0)); + /// let res = Duration::from_secs_f32(1e-20); + /// assert_eq!(res, Duration::new(0, 0)); + /// let res = Duration::from_secs_f32(4.2e-7); + /// assert_eq!(res, Duration::new(0, 420)); + /// let res = Duration::from_secs_f32(2.7); + /// assert_eq!(res, Duration::new(2, 700_000_048)); + /// let res = Duration::from_secs_f32(3e10); + /// assert_eq!(res, Duration::new(30_000_001_024, 0)); + /// // subnormal float + /// let res = Duration::from_secs_f32(f32::from_bits(1)); + /// assert_eq!(res, Duration::new(0, 0)); + /// // conversion uses rounding + /// let res = Duration::from_secs_f32(0.999e-9); + /// assert_eq!(res, Duration::new(0, 1)); + /// ``` + fn from_secs_f32(secs: f32) -> Val<::core::time::Duration> { + let output: Val<::core::time::Duration> = ::core::time::Duration::from_secs_f32( + secs, + ) + .into(); + output + } + /// Creates a new `Duration` from the specified number of seconds represented + /// as `f64`. + /// # Panics + /// This constructor will panic if `secs` is negative, overflows `Duration` or not finite. + /// # Examples + /// ``` + /// use std::time::Duration; + /// let res = Duration::from_secs_f64(0.0); + /// assert_eq!(res, Duration::new(0, 0)); + /// let res = Duration::from_secs_f64(1e-20); + /// assert_eq!(res, Duration::new(0, 0)); + /// let res = Duration::from_secs_f64(4.2e-7); + /// assert_eq!(res, Duration::new(0, 420)); + /// let res = Duration::from_secs_f64(2.7); + /// assert_eq!(res, Duration::new(2, 700_000_000)); + /// let res = Duration::from_secs_f64(3e10); + /// assert_eq!(res, Duration::new(30_000_000_000, 0)); + /// // subnormal float + /// let res = Duration::from_secs_f64(f64::from_bits(1)); + /// assert_eq!(res, Duration::new(0, 0)); + /// // conversion uses rounding + /// let res = Duration::from_secs_f64(0.999e-9); + /// assert_eq!(res, Duration::new(0, 1)); + /// ``` + fn from_secs_f64(secs: f64) -> Val<::core::time::Duration> { + let output: Val<::core::time::Duration> = ::core::time::Duration::from_secs_f64( + secs, + ) + .into(); + output + } + /// Returns true if this `Duration` spans no time. + /// # Examples + /// ``` + /// use std::time::Duration; + /// assert!(Duration::ZERO.is_zero()); + /// assert!(Duration::new(0, 0).is_zero()); + /// assert!(Duration::from_nanos(0).is_zero()); + /// assert!(Duration::from_secs(0).is_zero()); + /// assert!(!Duration::new(1, 1).is_zero()); + /// assert!(!Duration::from_nanos(1).is_zero()); + /// assert!(!Duration::from_secs(1).is_zero()); + /// ``` + fn is_zero(_self: Ref<::core::time::Duration>) -> bool { + let output: bool = ::core::time::Duration::is_zero(&_self).into(); + output + } + fn mul(_self: Val<::core::time::Duration>, 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(); + output + } + /// Multiplies `Duration` by `f32`. + /// # Panics + /// This method will panic if result is negative, overflows `Duration` or not finite. + /// # Examples + /// ``` + /// use std::time::Duration; + /// let dur = Duration::new(2, 700_000_000); + /// assert_eq!(dur.mul_f32(3.14), Duration::new(8, 478_000_641)); + /// assert_eq!(dur.mul_f32(3.14e5), Duration::new(847_800, 0)); + /// ``` + fn mul_f32( + _self: Val<::core::time::Duration>, + rhs: f32, + ) -> Val<::core::time::Duration> { + let output: Val<::core::time::Duration> = ::core::time::Duration::mul_f32( + _self.into_inner(), + rhs, + ) + .into(); + output + } + /// Multiplies `Duration` by `f64`. + /// # Panics + /// This method will panic if result is negative, overflows `Duration` or not finite. + /// # Examples + /// ``` + /// use std::time::Duration; + /// let dur = Duration::new(2, 700_000_000); + /// assert_eq!(dur.mul_f64(3.14), Duration::new(8, 478_000_000)); + /// assert_eq!(dur.mul_f64(3.14e5), Duration::new(847_800, 0)); + /// ``` + fn mul_f64( + _self: Val<::core::time::Duration>, + rhs: f64, + ) -> Val<::core::time::Duration> { + let output: Val<::core::time::Duration> = ::core::time::Duration::mul_f64( + _self.into_inner(), + rhs, + ) + .into(); + output + } + /// Creates a new `Duration` from the specified number of whole seconds and + /// additional nanoseconds. + /// If the number of nanoseconds is greater than 1 billion (the number of + /// nanoseconds in a second), then it will carry over into the seconds provided. + /// # Panics + /// This constructor will panic if the carry from the nanoseconds overflows + /// the seconds counter. + /// # Examples + /// ``` + /// use std::time::Duration; + /// let five_seconds = Duration::new(5, 0); + /// ``` + fn new(secs: u64, nanos: u32) -> Val<::core::time::Duration> { + let output: Val<::core::time::Duration> = ::core::time::Duration::new( + secs, + nanos, + ) + .into(); + output + } + /// Saturating `Duration` addition. Computes `self + other`, returning [`Duration::MAX`] + /// if overflow occurred. + /// # Examples + /// ``` + /// #![feature(duration_constants)] + /// use std::time::Duration; + /// assert_eq!(Duration::new(0, 0).saturating_add(Duration::new(0, 1)), Duration::new(0, 1)); + /// assert_eq!(Duration::new(1, 0).saturating_add(Duration::new(u64::MAX, 0)), Duration::MAX); + /// ``` + fn 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(), + ) + .into(); + output + } + /// Saturating `Duration` multiplication. Computes `self * other`, returning + /// [`Duration::MAX`] if overflow occurred. + /// # Examples + /// ``` + /// #![feature(duration_constants)] + /// use std::time::Duration; + /// assert_eq!(Duration::new(0, 500_000_001).saturating_mul(2), Duration::new(1, 2)); + /// assert_eq!(Duration::new(u64::MAX - 1, 0).saturating_mul(2), Duration::MAX); + /// ``` + fn saturating_mul( + _self: Val<::core::time::Duration>, + rhs: u32, + ) -> Val<::core::time::Duration> { + let output: Val<::core::time::Duration> = ::core::time::Duration::saturating_mul( + _self.into_inner(), + rhs, + ) + .into(); + output + } + /// Saturating `Duration` subtraction. Computes `self - other`, returning [`Duration::ZERO`] + /// if the result would be negative or if overflow occurred. + /// # Examples + /// ``` + /// use std::time::Duration; + /// assert_eq!(Duration::new(0, 1).saturating_sub(Duration::new(0, 0)), Duration::new(0, 1)); + /// assert_eq!(Duration::new(0, 0).saturating_sub(Duration::new(0, 1)), Duration::ZERO); + /// ``` + fn 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(), + ) + .into(); + output + } + fn sub( + _self: Val<::core::time::Duration>, + 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 + } + /// Returns the fractional part of this `Duration`, in whole microseconds. + /// This method does **not** return the length of the duration when + /// represented by microseconds. The returned number always represents a + /// fractional portion of a second (i.e., it is less than one million). + /// # Examples + /// ``` + /// use std::time::Duration; + /// let duration = Duration::from_micros(1_234_567); + /// assert_eq!(duration.as_secs(), 1); + /// assert_eq!(duration.subsec_micros(), 234_567); + /// ``` + 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. + /// This method does **not** return the length of the duration when + /// represented by milliseconds. The returned number always represents a + /// fractional portion of a second (i.e., it is less than one thousand). + /// # Examples + /// ``` + /// use std::time::Duration; + /// let duration = Duration::from_millis(5_432); + /// assert_eq!(duration.as_secs(), 5); + /// assert_eq!(duration.subsec_millis(), 432); + /// ``` + 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. + /// This method does **not** return the length of the duration when + /// represented by nanoseconds. The returned number always represents a + /// fractional portion of a second (i.e., it is less than one billion). + /// # Examples + /// ``` + /// use std::time::Duration; + /// let duration = Duration::from_millis(5_010); + /// assert_eq!(duration.as_secs(), 5); + /// assert_eq!(duration.subsec_nanos(), 10_000_000); + /// ``` + fn subsec_nanos(_self: Ref<::core::time::Duration>) -> u32 { + let output: u32 = ::core::time::Duration::subsec_nanos(&_self).into(); + output + } +} +#[script_bindings( + remote, + name = "instant_functions", + bms_core_path = "bevy_mod_scripting_core", + generated +)] +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<::std::time::Instant>, + 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<::std::time::Instant>) -> () { + let output: () = <::std::time::Instant as ::core::cmp::Eq>::assert_receiver_is_total_eq( + &_self, + ) + .into(); + output + } + 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(); + output + } + /// Returns the amount of time elapsed from another instant to this one, + /// or zero duration if that instant is later than this one. + /// # Panics + /// Previous Rust versions panicked when `earlier` was later than `self`. Currently this + /// method saturates. Future versions may reintroduce the panic in some circumstances. + /// See [Monotonicity]. + /// [Monotonicity]: Instant#monotonicity + /// # Examples + /// ```no_run + /// use std::time::{Duration, Instant}; + /// use std::thread::sleep; + /// let now = Instant::now(); + /// sleep(Duration::new(1, 0)); + /// let new_now = Instant::now(); + /// println!("{:?}", new_now.duration_since(now)); + /// println!("{:?}", now.duration_since(new_now)); // 0ns + /// ``` + fn 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(), + ) + .into(); + output + } + /// Returns the amount of time elapsed since this instant. + /// # Panics + /// Previous Rust versions panicked when the current time was earlier than self. Currently this + /// method returns a Duration of zero in that case. Future versions may reintroduce the panic. + /// See [Monotonicity]. + /// [Monotonicity]: Instant#monotonicity + /// # Examples + /// ```no_run + /// use std::thread::sleep; + /// use std::time::{Duration, Instant}; + /// let instant = Instant::now(); + /// let three_secs = Duration::from_secs(3); + /// sleep(three_secs); + /// assert!(instant.elapsed() >= three_secs); + /// ``` + 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<::std::time::Instant>, other: Ref<::std::time::Instant>) -> bool { + let output: bool = <::std::time::Instant as ::core::cmp::PartialEq< + ::std::time::Instant, + >>::eq(&_self, &other) + .into(); + output + } + /// Returns an instant corresponding to "now". + /// # Examples + /// ``` + /// use std::time::Instant; + /// let now = Instant::now(); + /// ``` + 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, + /// or zero duration if that instant is later than this one. + /// # Examples + /// ```no_run + /// use std::time::{Duration, Instant}; + /// use std::thread::sleep; + /// let now = Instant::now(); + /// sleep(Duration::new(1, 0)); + /// let new_now = Instant::now(); + /// println!("{:?}", new_now.saturating_duration_since(now)); + /// println!("{:?}", now.saturating_duration_since(new_now)); // 0ns + /// ``` + fn 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(), + ) + .into(); + output + } + fn sub( + _self: Val<::std::time::Instant>, + 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, - >::new(world) - .register_documented( - "abs_diff", - |_self: Val<::core::time::Duration>, other: Val<::core::time::Duration>| { - let output: Val<::core::time::Duration> = { - { - let output: Val<::core::time::Duration> = ::core::time::Duration::abs_diff( - _self.into_inner(), - other.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Computes the absolute difference between `self` and `other`.\n # Examples\n ```\n use std::time::Duration;\n assert_eq!(Duration::new(100, 0).abs_diff(Duration::new(80, 0)), Duration::new(20, 0));\n assert_eq!(Duration::new(100, 400_000_000).abs_diff(Duration::new(110, 0)), Duration::new(9, 600_000_000));\n ```", - &["_self", "other"], - ) - .register_documented( - "add", - |_self: Val<::core::time::Duration>, rhs: Val<::core::time::Duration>| { - let output: 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 - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "as_micros", - |_self: Ref<::core::time::Duration>| { - let output: u128 = { - { - let output: u128 = ::core::time::Duration::as_micros(&_self) - .into(); - output - } - }; - output - }, - " Returns the total number of whole microseconds contained by this `Duration`.\n # Examples\n ```\n use std::time::Duration;\n let duration = Duration::new(5, 730_023_852);\n assert_eq!(duration.as_micros(), 5_730_023);\n ```", - &["_self"], - ) - .register_documented( - "as_millis", - |_self: Ref<::core::time::Duration>| { - let output: u128 = { - { - let output: u128 = ::core::time::Duration::as_millis(&_self) - .into(); - output - } - }; - output - }, - " Returns the total number of whole milliseconds contained by this `Duration`.\n # Examples\n ```\n use std::time::Duration;\n let duration = Duration::new(5, 730_023_852);\n assert_eq!(duration.as_millis(), 5_730);\n ```", - &["_self"], - ) - .register_documented( - "as_nanos", - |_self: Ref<::core::time::Duration>| { - let output: u128 = { - { - let output: u128 = ::core::time::Duration::as_nanos(&_self) - .into(); - output - } - }; - output - }, - " Returns the total number of nanoseconds contained by this `Duration`.\n # Examples\n ```\n use std::time::Duration;\n let duration = Duration::new(5, 730_023_852);\n assert_eq!(duration.as_nanos(), 5_730_023_852);\n ```", - &["_self"], - ) - .register_documented( - "as_secs", - |_self: Ref<::core::time::Duration>| { - let output: u64 = { - { - let output: u64 = ::core::time::Duration::as_secs(&_self) - .into(); - output - } - }; - output - }, - " Returns the number of _whole_ seconds contained by this `Duration`.\n The returned value does not include the fractional (nanosecond) part of the\n duration, which can be obtained using [`subsec_nanos`].\n # Examples\n ```\n use std::time::Duration;\n let duration = Duration::new(5, 730_023_852);\n assert_eq!(duration.as_secs(), 5);\n ```\n To determine the total number of seconds represented by the `Duration`\n including the fractional part, use [`as_secs_f64`] or [`as_secs_f32`]\n [`as_secs_f64`]: Duration::as_secs_f64\n [`as_secs_f32`]: Duration::as_secs_f32\n [`subsec_nanos`]: Duration::subsec_nanos", - &["_self"], - ) - .register_documented( - "as_secs_f32", - |_self: Ref<::core::time::Duration>| { - let output: f32 = { - { - let output: f32 = ::core::time::Duration::as_secs_f32(&_self) - .into(); - output - } - }; - output - }, - " Returns the number of seconds contained by this `Duration` as `f32`.\n The returned value includes the fractional (nanosecond) part of the duration.\n # Examples\n ```\n use std::time::Duration;\n let dur = Duration::new(2, 700_000_000);\n assert_eq!(dur.as_secs_f32(), 2.7);\n ```", - &["_self"], - ) - .register_documented( - "as_secs_f64", - |_self: Ref<::core::time::Duration>| { - let output: f64 = { - { - let output: f64 = ::core::time::Duration::as_secs_f64(&_self) - .into(); - output - } - }; - output - }, - " Returns the number of seconds contained by this `Duration` as `f64`.\n The returned value includes the fractional (nanosecond) part of the duration.\n # Examples\n ```\n use std::time::Duration;\n let dur = Duration::new(2, 700_000_000);\n assert_eq!(dur.as_secs_f64(), 2.7);\n ```", - &["_self"], - ) - .register_documented( - "assert_receiver_is_total_eq", - |_self: Ref<::core::time::Duration>| { - let output: () = { - { - let output: () = <::core::time::Duration as ::core::cmp::Eq>::assert_receiver_is_total_eq( - &_self, - ) - .into(); - output - } - }; - output - }, - "", - &["_self"], - ) - .register_documented( - "clone", - |_self: Ref<::core::time::Duration>| { - let output: 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 - } - }; - output - }, - "", - &["_self"], - ) - .register_documented( - "div", - |_self: Val<::core::time::Duration>, rhs: u32| { - let output: Val<::core::time::Duration> = { - { - let output: Val<::core::time::Duration> = <::core::time::Duration as ::core::ops::Div< - u32, - >>::div(_self.into_inner(), rhs) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "div_duration_f32", - |_self: Val<::core::time::Duration>, rhs: Val<::core::time::Duration>| { - let output: f32 = { - { - let output: f32 = ::core::time::Duration::div_duration_f32( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Divides `Duration` by `Duration` and returns `f32`.\n # Examples\n ```\n use std::time::Duration;\n let dur1 = Duration::new(2, 700_000_000);\n let dur2 = Duration::new(5, 400_000_000);\n assert_eq!(dur1.div_duration_f32(dur2), 0.5);\n ```", - &["_self", "rhs"], - ) - .register_documented( - "div_duration_f64", - |_self: Val<::core::time::Duration>, rhs: Val<::core::time::Duration>| { - let output: f64 = { - { - let output: f64 = ::core::time::Duration::div_duration_f64( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Divides `Duration` by `Duration` and returns `f64`.\n # Examples\n ```\n use std::time::Duration;\n let dur1 = Duration::new(2, 700_000_000);\n let dur2 = Duration::new(5, 400_000_000);\n assert_eq!(dur1.div_duration_f64(dur2), 0.5);\n ```", - &["_self", "rhs"], - ) - .register_documented( - "div_f32", - |_self: Val<::core::time::Duration>, rhs: f32| { - let output: Val<::core::time::Duration> = { - { - let output: Val<::core::time::Duration> = ::core::time::Duration::div_f32( - _self.into_inner(), - rhs, - ) - .into(); - output - } - }; - output - }, - " Divides `Duration` by `f32`.\n # Panics\n This method will panic if result is negative, overflows `Duration` or not finite.\n # Examples\n ```\n use std::time::Duration;\n let dur = Duration::new(2, 700_000_000);\n // note that due to rounding errors result is slightly\n // different from 0.859_872_611\n assert_eq!(dur.div_f32(3.14), Duration::new(0, 859_872_580));\n assert_eq!(dur.div_f32(3.14e5), Duration::new(0, 8_599));\n ```", - &["_self", "rhs"], - ) - .register_documented( - "div_f64", - |_self: Val<::core::time::Duration>, rhs: f64| { - let output: Val<::core::time::Duration> = { - { - let output: Val<::core::time::Duration> = ::core::time::Duration::div_f64( - _self.into_inner(), - rhs, - ) - .into(); - output - } - }; - output - }, - " Divides `Duration` by `f64`.\n # Panics\n This method will panic if result is negative, overflows `Duration` or not finite.\n # Examples\n ```\n use std::time::Duration;\n let dur = Duration::new(2, 700_000_000);\n assert_eq!(dur.div_f64(3.14), Duration::new(0, 859_872_611));\n assert_eq!(dur.div_f64(3.14e5), Duration::new(0, 8_599));\n ```", - &["_self", "rhs"], - ) - .register_documented( - "eq", - |_self: Ref<::core::time::Duration>, other: Ref<::core::time::Duration>| { - let output: bool = { - { - let output: bool = <::core::time::Duration as ::core::cmp::PartialEq< - ::core::time::Duration, - >>::eq(&_self, &other) - .into(); - output - } - }; - output - }, - "", - &["_self", "other"], - ) - .register_documented( - "from_micros", - |micros: u64| { - let output: Val<::core::time::Duration> = { - { - let output: Val<::core::time::Duration> = ::core::time::Duration::from_micros( - micros, - ) - .into(); - output - } - }; - output - }, - " Creates a new `Duration` from the specified number of microseconds.\n # Examples\n ```\n use std::time::Duration;\n let duration = Duration::from_micros(1_000_002);\n assert_eq!(1, duration.as_secs());\n assert_eq!(2_000, duration.subsec_nanos());\n ```", - &["micros"], - ) - .register_documented( - "from_millis", - |millis: u64| { - let output: Val<::core::time::Duration> = { - { - let output: Val<::core::time::Duration> = ::core::time::Duration::from_millis( - millis, - ) - .into(); - output - } - }; - output - }, - " Creates a new `Duration` from the specified number of milliseconds.\n # Examples\n ```\n use std::time::Duration;\n let duration = Duration::from_millis(2_569);\n assert_eq!(2, duration.as_secs());\n assert_eq!(569_000_000, duration.subsec_nanos());\n ```", - &["millis"], - ) - .register_documented( - "from_nanos", - |nanos: u64| { - let output: Val<::core::time::Duration> = { - { - let output: Val<::core::time::Duration> = ::core::time::Duration::from_nanos( - nanos, - ) - .into(); - output - } - }; - output - }, - " Creates a new `Duration` from the specified number of nanoseconds.\n Note: Using this on the return value of `as_nanos()` might cause unexpected behavior:\n `as_nanos()` returns a u128, and can return values that do not fit in u64, e.g. 585 years.\n Instead, consider using the pattern `Duration::new(d.as_secs(), d.subsec_nanos())`\n if you cannot copy/clone the Duration directly.\n # Examples\n ```\n use std::time::Duration;\n let duration = Duration::from_nanos(1_000_000_123);\n assert_eq!(1, duration.as_secs());\n assert_eq!(123, duration.subsec_nanos());\n ```", - &["nanos"], - ) - .register_documented( - "from_secs", - |secs: u64| { - let output: Val<::core::time::Duration> = { - { - let output: Val<::core::time::Duration> = ::core::time::Duration::from_secs( - secs, - ) - .into(); - output - } - }; - output - }, - " Creates a new `Duration` from the specified number of whole seconds.\n # Examples\n ```\n use std::time::Duration;\n let duration = Duration::from_secs(5);\n assert_eq!(5, duration.as_secs());\n assert_eq!(0, duration.subsec_nanos());\n ```", - &["secs"], - ) - .register_documented( - "from_secs_f32", - |secs: f32| { - let output: Val<::core::time::Duration> = { - { - let output: Val<::core::time::Duration> = ::core::time::Duration::from_secs_f32( - secs, - ) - .into(); - output - } - }; - output - }, - " Creates a new `Duration` from the specified number of seconds represented\n as `f32`.\n # Panics\n This constructor will panic if `secs` is negative, overflows `Duration` or not finite.\n # Examples\n ```\n use std::time::Duration;\n let res = Duration::from_secs_f32(0.0);\n assert_eq!(res, Duration::new(0, 0));\n let res = Duration::from_secs_f32(1e-20);\n assert_eq!(res, Duration::new(0, 0));\n let res = Duration::from_secs_f32(4.2e-7);\n assert_eq!(res, Duration::new(0, 420));\n let res = Duration::from_secs_f32(2.7);\n assert_eq!(res, Duration::new(2, 700_000_048));\n let res = Duration::from_secs_f32(3e10);\n assert_eq!(res, Duration::new(30_000_001_024, 0));\n // subnormal float\n let res = Duration::from_secs_f32(f32::from_bits(1));\n assert_eq!(res, Duration::new(0, 0));\n // conversion uses rounding\n let res = Duration::from_secs_f32(0.999e-9);\n assert_eq!(res, Duration::new(0, 1));\n ```", - &["secs"], - ) - .register_documented( - "from_secs_f64", - |secs: f64| { - let output: Val<::core::time::Duration> = { - { - let output: Val<::core::time::Duration> = ::core::time::Duration::from_secs_f64( - secs, - ) - .into(); - output - } - }; - output - }, - " Creates a new `Duration` from the specified number of seconds represented\n as `f64`.\n # Panics\n This constructor will panic if `secs` is negative, overflows `Duration` or not finite.\n # Examples\n ```\n use std::time::Duration;\n let res = Duration::from_secs_f64(0.0);\n assert_eq!(res, Duration::new(0, 0));\n let res = Duration::from_secs_f64(1e-20);\n assert_eq!(res, Duration::new(0, 0));\n let res = Duration::from_secs_f64(4.2e-7);\n assert_eq!(res, Duration::new(0, 420));\n let res = Duration::from_secs_f64(2.7);\n assert_eq!(res, Duration::new(2, 700_000_000));\n let res = Duration::from_secs_f64(3e10);\n assert_eq!(res, Duration::new(30_000_000_000, 0));\n // subnormal float\n let res = Duration::from_secs_f64(f64::from_bits(1));\n assert_eq!(res, Duration::new(0, 0));\n // conversion uses rounding\n let res = Duration::from_secs_f64(0.999e-9);\n assert_eq!(res, Duration::new(0, 1));\n ```", - &["secs"], - ) - .register_documented( - "is_zero", - |_self: Ref<::core::time::Duration>| { - let output: bool = { - { - let output: bool = ::core::time::Duration::is_zero(&_self) - .into(); - output - } - }; - output - }, - " Returns true if this `Duration` spans no time.\n # Examples\n ```\n use std::time::Duration;\n assert!(Duration::ZERO.is_zero());\n assert!(Duration::new(0, 0).is_zero());\n assert!(Duration::from_nanos(0).is_zero());\n assert!(Duration::from_secs(0).is_zero());\n assert!(!Duration::new(1, 1).is_zero());\n assert!(!Duration::from_nanos(1).is_zero());\n assert!(!Duration::from_secs(1).is_zero());\n ```", - &["_self"], - ) - .register_documented( - "mul", - |_self: Val<::core::time::Duration>, rhs: u32| { - let output: Val<::core::time::Duration> = { - { - let output: Val<::core::time::Duration> = <::core::time::Duration as ::core::ops::Mul< - u32, - >>::mul(_self.into_inner(), rhs) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "mul_f32", - |_self: Val<::core::time::Duration>, rhs: f32| { - let output: Val<::core::time::Duration> = { - { - let output: Val<::core::time::Duration> = ::core::time::Duration::mul_f32( - _self.into_inner(), - rhs, - ) - .into(); - output - } - }; - output - }, - " Multiplies `Duration` by `f32`.\n # Panics\n This method will panic if result is negative, overflows `Duration` or not finite.\n # Examples\n ```\n use std::time::Duration;\n let dur = Duration::new(2, 700_000_000);\n assert_eq!(dur.mul_f32(3.14), Duration::new(8, 478_000_641));\n assert_eq!(dur.mul_f32(3.14e5), Duration::new(847_800, 0));\n ```", - &["_self", "rhs"], - ) - .register_documented( - "mul_f64", - |_self: Val<::core::time::Duration>, rhs: f64| { - let output: Val<::core::time::Duration> = { - { - let output: Val<::core::time::Duration> = ::core::time::Duration::mul_f64( - _self.into_inner(), - rhs, - ) - .into(); - output - } - }; - output - }, - " Multiplies `Duration` by `f64`.\n # Panics\n This method will panic if result is negative, overflows `Duration` or not finite.\n # Examples\n ```\n use std::time::Duration;\n let dur = Duration::new(2, 700_000_000);\n assert_eq!(dur.mul_f64(3.14), Duration::new(8, 478_000_000));\n assert_eq!(dur.mul_f64(3.14e5), Duration::new(847_800, 0));\n ```", - &["_self", "rhs"], - ) - .register_documented( - "new", - |secs: u64, nanos: u32| { - let output: Val<::core::time::Duration> = { - { - let output: Val<::core::time::Duration> = ::core::time::Duration::new( - secs, - nanos, - ) - .into(); - output - } - }; - output - }, - " Creates a new `Duration` from the specified number of whole seconds and\n additional nanoseconds.\n If the number of nanoseconds is greater than 1 billion (the number of\n nanoseconds in a second), then it will carry over into the seconds provided.\n # Panics\n This constructor will panic if the carry from the nanoseconds overflows\n the seconds counter.\n # Examples\n ```\n use std::time::Duration;\n let five_seconds = Duration::new(5, 0);\n ```", - &["secs", "nanos"], - ) - .register_documented( - "saturating_add", - |_self: Val<::core::time::Duration>, rhs: Val<::core::time::Duration>| { - let output: Val<::core::time::Duration> = { - { - let output: Val<::core::time::Duration> = ::core::time::Duration::saturating_add( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Saturating `Duration` addition. Computes `self + other`, returning [`Duration::MAX`]\n if overflow occurred.\n # Examples\n ```\n #![feature(duration_constants)]\n use std::time::Duration;\n assert_eq!(Duration::new(0, 0).saturating_add(Duration::new(0, 1)), Duration::new(0, 1));\n assert_eq!(Duration::new(1, 0).saturating_add(Duration::new(u64::MAX, 0)), Duration::MAX);\n ```", - &["_self", "rhs"], - ) - .register_documented( - "saturating_mul", - |_self: Val<::core::time::Duration>, rhs: u32| { - let output: Val<::core::time::Duration> = { - { - let output: Val<::core::time::Duration> = ::core::time::Duration::saturating_mul( - _self.into_inner(), - rhs, - ) - .into(); - output - } - }; - output - }, - " Saturating `Duration` multiplication. Computes `self * other`, returning\n [`Duration::MAX`] if overflow occurred.\n # Examples\n ```\n #![feature(duration_constants)]\n use std::time::Duration;\n assert_eq!(Duration::new(0, 500_000_001).saturating_mul(2), Duration::new(1, 2));\n assert_eq!(Duration::new(u64::MAX - 1, 0).saturating_mul(2), Duration::MAX);\n ```", - &["_self", "rhs"], - ) - .register_documented( - "saturating_sub", - |_self: Val<::core::time::Duration>, rhs: Val<::core::time::Duration>| { - let output: Val<::core::time::Duration> = { - { - let output: Val<::core::time::Duration> = ::core::time::Duration::saturating_sub( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Saturating `Duration` subtraction. Computes `self - other`, returning [`Duration::ZERO`]\n if the result would be negative or if overflow occurred.\n # Examples\n ```\n use std::time::Duration;\n assert_eq!(Duration::new(0, 1).saturating_sub(Duration::new(0, 0)), Duration::new(0, 1));\n assert_eq!(Duration::new(0, 0).saturating_sub(Duration::new(0, 1)), Duration::ZERO);\n ```", - &["_self", "rhs"], - ) - .register_documented( - "sub", - |_self: Val<::core::time::Duration>, rhs: Val<::core::time::Duration>| { - let output: 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 - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "subsec_micros", - |_self: Ref<::core::time::Duration>| { - let output: u32 = { - { - let output: u32 = ::core::time::Duration::subsec_micros( - &_self, - ) - .into(); - output - } - }; - output - }, - " Returns the fractional part of this `Duration`, in whole microseconds.\n This method does **not** return the length of the duration when\n represented by microseconds. The returned number always represents a\n fractional portion of a second (i.e., it is less than one million).\n # Examples\n ```\n use std::time::Duration;\n let duration = Duration::from_micros(1_234_567);\n assert_eq!(duration.as_secs(), 1);\n assert_eq!(duration.subsec_micros(), 234_567);\n ```", - &["_self"], - ) - .register_documented( - "subsec_millis", - |_self: Ref<::core::time::Duration>| { - let output: u32 = { - { - let output: u32 = ::core::time::Duration::subsec_millis( - &_self, - ) - .into(); - output - } - }; - output - }, - " Returns the fractional part of this `Duration`, in whole milliseconds.\n This method does **not** return the length of the duration when\n represented by milliseconds. The returned number always represents a\n fractional portion of a second (i.e., it is less than one thousand).\n # Examples\n ```\n use std::time::Duration;\n let duration = Duration::from_millis(5_432);\n assert_eq!(duration.as_secs(), 5);\n assert_eq!(duration.subsec_millis(), 432);\n ```", - &["_self"], - ) - .register_documented( - "subsec_nanos", - |_self: Ref<::core::time::Duration>| { - let output: u32 = { - { - let output: u32 = ::core::time::Duration::subsec_nanos( - &_self, - ) - .into(); - output - } - }; - output - }, - " Returns the fractional part of this `Duration`, in nanoseconds.\n This method does **not** return the length of the duration when\n represented by nanoseconds. The returned number always represents a\n fractional portion of a second (i.e., it is less than one billion).\n # Examples\n ```\n use std::time::Duration;\n let duration = Duration::from_millis(5_010);\n assert_eq!(duration.as_secs(), 5);\n assert_eq!(duration.subsec_nanos(), 10_000_000);\n ```", - &["_self"], - ); - let registry = world - .get_resource_or_init::(); - let mut registry = registry.write(); - registry - .register_type_data::< - ::core::time::Duration, - bevy_mod_scripting_core::bindings::MarkAsGenerated, - >(); - } - pub(crate) fn register_instant_functions(world: &mut bevy::ecs::world::World) { - bevy_mod_scripting_core::bindings::function::namespace::NamespaceBuilder::< + >>::sub(_self.into_inner(), other.into_inner()) + .into(); + output + } + /// Returns the amount of time elapsed from another instant to this one, + /// or zero duration if that instant is later than this one. + /// # Panics + /// Previous Rust versions panicked when `other` was later than `self`. Currently this + /// method saturates. Future versions may reintroduce the panic in some circumstances. + /// See [Monotonicity]. + /// [Monotonicity]: Instant#monotonicity + fn sub( + _self: Val<::std::time::Instant>, + 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, - >::new(world) - .register_documented( - "add", - |_self: Val<::std::time::Instant>, other: Val<::core::time::Duration>| { - let output: 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 - } - }; - output - }, - " # Panics\n This function may panic if the resulting point in time cannot be represented by the\n underlying data structure. See [`Instant::checked_add`] for a version without panic.", - &["_self", "other"], - ) - .register_documented( - "assert_receiver_is_total_eq", - |_self: Ref<::std::time::Instant>| { - let output: () = { - { - let output: () = <::std::time::Instant as ::core::cmp::Eq>::assert_receiver_is_total_eq( - &_self, - ) - .into(); - output - } - }; - output - }, - "", - &["_self"], - ) - .register_documented( - "clone", - |_self: Ref<::std::time::Instant>| { - let output: 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(); - output - } - }; - output - }, - "", - &["_self"], - ) - .register_documented( - "duration_since", - |_self: Ref<::std::time::Instant>, earlier: Val<::std::time::Instant>| { - let output: Val<::core::time::Duration> = { - { - let output: Val<::core::time::Duration> = ::std::time::Instant::duration_since( - &_self, - earlier.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns the amount of time elapsed from another instant to this one,\n or zero duration if that instant is later than this one.\n # Panics\n Previous Rust versions panicked when `earlier` was later than `self`. Currently this\n method saturates. Future versions may reintroduce the panic in some circumstances.\n See [Monotonicity].\n [Monotonicity]: Instant#monotonicity\n # Examples\n ```no_run\n use std::time::{Duration, Instant};\n use std::thread::sleep;\n let now = Instant::now();\n sleep(Duration::new(1, 0));\n let new_now = Instant::now();\n println!(\"{:?}\", new_now.duration_since(now));\n println!(\"{:?}\", now.duration_since(new_now)); // 0ns\n ```", - &["_self", "earlier"], - ) - .register_documented( - "elapsed", - |_self: Ref<::std::time::Instant>| { - let output: Val<::core::time::Duration> = { - { - let output: Val<::core::time::Duration> = ::std::time::Instant::elapsed( - &_self, - ) - .into(); - output - } - }; - output - }, - " Returns the amount of time elapsed since this instant.\n # Panics\n Previous Rust versions panicked when the current time was earlier than self. Currently this\n method returns a Duration of zero in that case. Future versions may reintroduce the panic.\n See [Monotonicity].\n [Monotonicity]: Instant#monotonicity\n # Examples\n ```no_run\n use std::thread::sleep;\n use std::time::{Duration, Instant};\n let instant = Instant::now();\n let three_secs = Duration::from_secs(3);\n sleep(three_secs);\n assert!(instant.elapsed() >= three_secs);\n ```", - &["_self"], - ) - .register_documented( - "eq", - |_self: Ref<::std::time::Instant>, other: Ref<::std::time::Instant>| { - let output: bool = { - { - let output: bool = <::std::time::Instant as ::core::cmp::PartialEq< - ::std::time::Instant, - >>::eq(&_self, &other) - .into(); - output - } - }; - output - }, - "", - &["_self", "other"], - ) - .register_documented( - "now", - || { - let output: Val<::std::time::Instant> = { - { - let output: Val<::std::time::Instant> = ::std::time::Instant::now() - .into(); - output - } - }; - output - }, - " Returns an instant corresponding to \"now\".\n # Examples\n ```\n use std::time::Instant;\n let now = Instant::now();\n ```", - &[], - ) - .register_documented( - "saturating_duration_since", - |_self: Ref<::std::time::Instant>, earlier: Val<::std::time::Instant>| { - let output: Val<::core::time::Duration> = { - { - let output: Val<::core::time::Duration> = ::std::time::Instant::saturating_duration_since( - &_self, - earlier.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns the amount of time elapsed from another instant to this one,\n or zero duration if that instant is later than this one.\n # Examples\n ```no_run\n use std::time::{Duration, Instant};\n use std::thread::sleep;\n let now = Instant::now();\n sleep(Duration::new(1, 0));\n let new_now = Instant::now();\n println!(\"{:?}\", new_now.saturating_duration_since(now));\n println!(\"{:?}\", now.saturating_duration_since(new_now)); // 0ns\n ```", - &["_self", "earlier"], - ) - .register_documented( - "sub", - |_self: Val<::std::time::Instant>, other: Val<::core::time::Duration>| { - let output: 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 - } - }; - output - }, - "", - &["_self", "other"], - ) - .register_documented( - "sub", - |_self: Val<::std::time::Instant>, other: Val<::std::time::Instant>| { - let output: 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 - } - }; - output - }, - " Returns the amount of time elapsed from another instant to this one,\n or zero duration if that instant is later than this one.\n # Panics\n Previous Rust versions panicked when `other` was later than `self`. Currently this\n method saturates. Future versions may reintroduce the panic in some circumstances.\n See [Monotonicity].\n [Monotonicity]: Instant#monotonicity", - &["_self", "other"], - ); - let registry = world - .get_resource_or_init::(); - let mut registry = registry.write(); - registry - .register_type_data::< - ::std::time::Instant, - bevy_mod_scripting_core::bindings::MarkAsGenerated, - >(); - } - pub(crate) fn register_range_full_functions(world: &mut bevy::ecs::world::World) { - bevy_mod_scripting_core::bindings::function::namespace::NamespaceBuilder::< + >>::sub(_self.into_inner(), other.into_inner()) + .into(); + output + } +} +#[script_bindings( + remote, + name = "range_full_functions", + bms_core_path = "bevy_mod_scripting_core", + generated +)] +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, - >::new(world) - .register_documented( - "assert_receiver_is_total_eq", - |_self: Ref<::core::ops::RangeFull>| { - let output: () = { - { - let output: () = <::core::ops::RangeFull as ::core::cmp::Eq>::assert_receiver_is_total_eq( - &_self, - ) - .into(); - output - } - }; - output - }, - "", - &["_self"], - ) - .register_documented( - "clone", - |_self: Ref<::core::ops::RangeFull>| { - let output: 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 - } - }; - output - }, - "", - &["_self"], - ) - .register_documented( - "eq", - |_self: Ref<::core::ops::RangeFull>, other: Ref<::core::ops::RangeFull>| { - let output: bool = { - { - let output: bool = <::core::ops::RangeFull as ::core::cmp::PartialEq< - ::core::ops::RangeFull, - >>::eq(&_self, &other) - .into(); - output - } - }; - output - }, - "", - &["_self", "other"], - ); - let registry = world - .get_resource_or_init::(); - let mut registry = registry.write(); - registry - .register_type_data::< - ::core::ops::RangeFull, - bevy_mod_scripting_core::bindings::MarkAsGenerated, - >(); - } - pub(crate) fn register_type_id_functions(world: &mut bevy::ecs::world::World) { - bevy_mod_scripting_core::bindings::function::namespace::NamespaceBuilder::< + >>::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<::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<::core::any::TypeId>, other: Ref<::core::any::TypeId>) -> bool { + let output: bool = <::core::any::TypeId as ::core::cmp::PartialEq< ::core::any::TypeId, - >::new(world) - .register_documented( - "assert_receiver_is_total_eq", - |_self: Ref<::core::any::TypeId>| { - let output: () = { - { - let output: () = <::core::any::TypeId as ::core::cmp::Eq>::assert_receiver_is_total_eq( - &_self, - ) - .into(); - output - } - }; - output - }, - "", - &["_self"], - ) - .register_documented( - "clone", - |_self: Ref<::core::any::TypeId>| { - let output: 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 - } - }; - output - }, - "", - &["_self"], - ) - .register_documented( - "eq", - |_self: Ref<::core::any::TypeId>, other: Ref<::core::any::TypeId>| { - let output: bool = { - { - let output: bool = <::core::any::TypeId as ::core::cmp::PartialEq< - ::core::any::TypeId, - >>::eq(&_self, &other) - .into(); - output - } - }; - output - }, - "", - &["_self", "other"], - ); - let registry = world - .get_resource_or_init::(); - let mut registry = registry.write(); - registry - .register_type_data::< - ::core::any::TypeId, - bevy_mod_scripting_core::bindings::MarkAsGenerated, - >(); - } - pub(crate) fn register_quat_functions(world: &mut bevy::ecs::world::World) { - bevy_mod_scripting_core::bindings::function::namespace::NamespaceBuilder::< - bevy::math::Quat, - >::new(world) - .register_documented( - "abs_diff_eq", - | - _self: Val, - rhs: Val, - max_abs_diff: f32| - { - let output: bool = { - { - let output: bool = bevy::math::Quat::abs_diff_eq( - _self.into_inner(), - rhs.into_inner(), - max_abs_diff, - ) - .into(); - output - } - }; - output - }, - " Returns true if the absolute difference of all elements between `self` and `rhs`\n is less than or equal to `max_abs_diff`.\n This can be used to compare if two quaternions contain similar elements. It works\n best when comparing with a known value. The `max_abs_diff` that should be used used\n depends on the values being compared against.\n For more see\n [comparing floating point numbers](https://randomascii.wordpress.com/2012/02/25/comparing-floating-point-numbers-2012-edition/).", - &["_self", "rhs", "max_abs_diff"], - ) - .register_documented( - "add", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = >::add(_self.into_inner(), rhs.into_inner()) - .into(); - output - } - }; - output - }, - " Adds two quaternions.\n The sum is not guaranteed to be normalized.\n Note that addition is not the same as combining the rotations represented by the\n two quaternions! That corresponds to multiplication.", - &["_self", "rhs"], - ) - .register_documented( - "angle_between", - |_self: Val, rhs: Val| { - let output: f32 = { - { - let output: f32 = bevy::math::Quat::angle_between( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns the angle (in radians) for the minimal rotation\n for transforming this quaternion into another.\n Both quaternions must be normalized.\n # Panics\n Will panic if `self` or `rhs` are not normalized when `glam_assert` is enabled.", - &["_self", "rhs"], - ) - .register_documented( - "as_dquat", - |_self: Val| { - let output: Val = { - { - let output: Val = bevy::math::Quat::as_dquat( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - "", - &["_self"], - ) - .register_documented( - "clone", - |_self: Ref| { - let output: Val = { - { - let output: Val = ::clone( - &_self, - ) - .into(); - output - } - }; - output - }, - "", - &["_self"], - ) - .register_documented( - "conjugate", - |_self: Val| { - let output: Val = { - { - let output: Val = bevy::math::Quat::conjugate( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns the quaternion conjugate of `self`. For a unit quaternion the\n conjugate is also the inverse.", - &["_self"], - ) - .register_documented( - "div", - |_self: Val, rhs: f32| { - let output: Val = { - { - let output: Val = >::div(_self.into_inner(), rhs) - .into(); - output - } - }; - output - }, - " Divides a quaternion by a scalar value.\n The quotient is not guaranteed to be normalized.", - &["_self", "rhs"], - ) - .register_documented( - "dot", - |_self: Val, rhs: Val| { - let output: f32 = { - { - let output: f32 = bevy::math::Quat::dot( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Computes the dot product of `self` and `rhs`. The dot product is\n equal to the cosine of the angle between two quaternion rotations.", - &["_self", "rhs"], - ) - .register_documented( - "eq", - |_self: Ref, rhs: Ref| { - let output: bool = { - { - let output: bool = >::eq(&_self, &rhs) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "from_affine3", - |a: Ref| { - let output: Val = { - { - let output: Val = bevy::math::Quat::from_affine3( - &a, - ) - .into(); - output - } - }; - output - }, - " Creates a quaternion from a 3x3 rotation matrix inside a 3D affine transform.\n Note if the input affine matrix contain scales, shears, or other non-rotation\n transformations then the resulting quaternion will be ill-defined.\n # Panics\n Will panic if any input affine matrix column is not normalized when `glam_assert` is\n enabled.", - &["a"], - ) - .register_documented( - "from_array", - |a: [f32; 4]| { - let output: Val = { - { - let output: Val = bevy::math::Quat::from_array( - a, - ) - .into(); - output - } - }; - output - }, - " Creates a rotation quaternion from an array.\n # Preconditions\n This function does not check if the input is normalized, it is up to the user to\n provide normalized input or to normalized the resulting quaternion.", - &["a"], - ) - .register_documented( - "from_axis_angle", - |axis: Val, angle: f32| { - let output: Val = { - { - let output: Val = bevy::math::Quat::from_axis_angle( - axis.into_inner(), - angle, - ) - .into(); - output - } - }; - output - }, - " Create a quaternion for a normalized rotation `axis` and `angle` (in radians).\n The axis must be a unit vector.\n # Panics\n Will panic if `axis` is not normalized when `glam_assert` is enabled.", - &["axis", "angle"], - ) - .register_documented( - "from_euler", - |euler: Val, a: f32, b: f32, c: f32| { - let output: Val = { - { - let output: Val = bevy::math::Quat::from_euler( - euler.into_inner(), - a, - b, - c, - ) - .into(); - output - } - }; - output - }, - " Creates a quaternion from the given Euler rotation sequence and the angles (in radians).", - &["euler", "a", "b", "c"], - ) - .register_documented( - "from_mat3", - |mat: Ref| { - let output: Val = { - { - let output: Val = bevy::math::Quat::from_mat3( - &mat, - ) - .into(); - output - } - }; - output - }, - " Creates a quaternion from a 3x3 rotation matrix.\n Note if the input matrix contain scales, shears, or other non-rotation transformations then\n the resulting quaternion will be ill-defined.\n # Panics\n Will panic if any input matrix column is not normalized when `glam_assert` is enabled.", - &["mat"], - ) - .register_documented( - "from_mat3a", - |mat: Ref| { - let output: Val = { - { - let output: Val = bevy::math::Quat::from_mat3a( - &mat, - ) - .into(); - output - } - }; - output - }, - " Creates a quaternion from a 3x3 SIMD aligned rotation matrix.\n Note if the input matrix contain scales, shears, or other non-rotation transformations then\n the resulting quaternion will be ill-defined.\n # Panics\n Will panic if any input matrix column is not normalized when `glam_assert` is enabled.", - &["mat"], - ) - .register_documented( - "from_mat4", - |mat: Ref| { - let output: Val = { - { - let output: Val = bevy::math::Quat::from_mat4( - &mat, - ) - .into(); - output - } - }; - output - }, - " Creates a quaternion from the upper 3x3 rotation matrix inside a homogeneous 4x4 matrix.\n Note if the upper 3x3 matrix contain scales, shears, or other non-rotation transformations\n then the resulting quaternion will be ill-defined.\n # Panics\n Will panic if any column of the upper 3x3 rotation matrix is not normalized when\n `glam_assert` is enabled.", - &["mat"], - ) - .register_documented( - "from_rotation_arc", - |from: Val, to: Val| { - let output: Val = { - { - let output: Val = bevy::math::Quat::from_rotation_arc( - from.into_inner(), - to.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Gets the minimal rotation for transforming `from` to `to`. The rotation is in the\n plane spanned by the two vectors. Will rotate at most 180 degrees.\n The inputs must be unit vectors.\n `from_rotation_arc(from, to) * from ≈ to`.\n For near-singular cases (from≈to and from≈-to) the current implementation\n is only accurate to about 0.001 (for `f32`).\n # Panics\n Will panic if `from` or `to` are not normalized when `glam_assert` is enabled.", - &["from", "to"], - ) - .register_documented( - "from_rotation_arc_2d", - |from: Val, to: Val| { - let output: Val = { - { - let output: Val = bevy::math::Quat::from_rotation_arc_2d( - from.into_inner(), - to.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Gets the minimal rotation for transforming `from` to `to`. The resulting rotation is\n around the z axis. Will rotate at most 180 degrees.\n The inputs must be unit vectors.\n `from_rotation_arc_2d(from, to) * from ≈ to`.\n For near-singular cases (from≈to and from≈-to) the current implementation\n is only accurate to about 0.001 (for `f32`).\n # Panics\n Will panic if `from` or `to` are not normalized when `glam_assert` is enabled.", - &["from", "to"], - ) - .register_documented( - "from_rotation_arc_colinear", - |from: Val, to: Val| { - let output: Val = { - { - let output: Val = bevy::math::Quat::from_rotation_arc_colinear( - from.into_inner(), - to.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Gets the minimal rotation for transforming `from` to either `to` or `-to`. This means\n that the resulting quaternion will rotate `from` so that it is colinear with `to`.\n The rotation is in the plane spanned by the two vectors. Will rotate at most 90\n degrees.\n The inputs must be unit vectors.\n `to.dot(from_rotation_arc_colinear(from, to) * from).abs() ≈ 1`.\n # Panics\n Will panic if `from` or `to` are not normalized when `glam_assert` is enabled.", - &["from", "to"], - ) - .register_documented( - "from_rotation_x", - |angle: f32| { - let output: Val = { - { - let output: Val = bevy::math::Quat::from_rotation_x( - angle, - ) - .into(); - output - } - }; - output - }, - " Creates a quaternion from the `angle` (in radians) around the x axis.", - &["angle"], - ) - .register_documented( - "from_rotation_y", - |angle: f32| { - let output: Val = { - { - let output: Val = bevy::math::Quat::from_rotation_y( - angle, - ) - .into(); - output - } - }; - output - }, - " Creates a quaternion from the `angle` (in radians) around the y axis.", - &["angle"], - ) - .register_documented( - "from_rotation_z", - |angle: f32| { - let output: Val = { - { - let output: Val = bevy::math::Quat::from_rotation_z( - angle, - ) - .into(); - output - } - }; - output - }, - " Creates a quaternion from the `angle` (in radians) around the z axis.", - &["angle"], - ) - .register_documented( - "from_scaled_axis", - |v: Val| { - let output: Val = { - { - let output: Val = bevy::math::Quat::from_scaled_axis( - v.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Create a quaternion that rotates `v.length()` radians around `v.normalize()`.\n `from_scaled_axis(Vec3::ZERO)` results in the identity quaternion.", - &["v"], - ) - .register_documented( - "from_vec4", - |v: Val| { - let output: Val = { - { - let output: Val = bevy::math::Quat::from_vec4( - v.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Creates a new rotation quaternion from a 4D vector.\n # Preconditions\n This function does not check if the input is normalized, it is up to the user to\n provide normalized input or to normalized the resulting quaternion.", - &["v"], - ) - .register_documented( - "from_xyzw", - |x: f32, y: f32, z: f32, w: f32| { - let output: Val = { - { - let output: Val = bevy::math::Quat::from_xyzw( - x, - y, - z, - w, - ) - .into(); - output - } - }; - output - }, - " Creates a new rotation quaternion.\n This should generally not be called manually unless you know what you are doing.\n Use one of the other constructors instead such as `identity` or `from_axis_angle`.\n `from_xyzw` is mostly used by unit tests and `serde` deserialization.\n # Preconditions\n This function does not check if the input is normalized, it is up to the user to\n provide normalized input or to normalized the resulting quaternion.", - &["x", "y", "z", "w"], - ) - .register_documented( - "inverse", - |_self: Val| { - let output: Val = { - { - let output: Val = bevy::math::Quat::inverse( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns the inverse of a normalized quaternion.\n Typically quaternion inverse returns the conjugate of a normalized quaternion.\n Because `self` is assumed to already be unit length this method *does not* normalize\n before returning the conjugate.\n # Panics\n Will panic if `self` is not normalized when `glam_assert` is enabled.", - &["_self"], - ) - .register_documented( - "is_finite", - |_self: Val| { - let output: bool = { - { - let output: bool = bevy::math::Quat::is_finite( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns `true` if, and only if, all elements are finite.\n If any element is either `NaN`, positive or negative infinity, this will return `false`.", - &["_self"], - ) - .register_documented( - "is_nan", - |_self: Val| { - let output: bool = { - { - let output: bool = bevy::math::Quat::is_nan( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns `true` if any elements are `NAN`.", - &["_self"], - ) - .register_documented( - "is_near_identity", - |_self: Val| { - let output: bool = { - { - let output: bool = bevy::math::Quat::is_near_identity( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - "", - &["_self"], - ) - .register_documented( - "is_normalized", - |_self: Val| { - let output: bool = { - { - let output: bool = bevy::math::Quat::is_normalized( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns whether `self` of length `1.0` or not.\n Uses a precision threshold of `1e-6`.", - &["_self"], - ) - .register_documented( - "length", - |_self: Val| { - let output: f32 = { - { - let output: f32 = bevy::math::Quat::length( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Computes the length of `self`.", - &["_self"], - ) - .register_documented( - "length_recip", - |_self: Val| { - let output: f32 = { - { - let output: f32 = bevy::math::Quat::length_recip( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Computes `1.0 / length()`.\n For valid results, `self` must _not_ be of length zero.", - &["_self"], - ) - .register_documented( - "length_squared", - |_self: Val| { - let output: f32 = { - { - let output: f32 = bevy::math::Quat::length_squared( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Computes the squared length of `self`.\n This is generally faster than `length()` as it avoids a square\n root operation.", - &["_self"], - ) - .register_documented( - "lerp", - |_self: Val, end: Val, s: f32| { - let output: Val = { - { - let output: Val = bevy::math::Quat::lerp( - _self.into_inner(), - end.into_inner(), - s, - ) - .into(); - output - } - }; - output - }, - " Performs a linear interpolation between `self` and `rhs` based on\n the value `s`.\n When `s` is `0.0`, the result will be equal to `self`. When `s`\n is `1.0`, the result will be equal to `rhs`.\n # Panics\n Will panic if `self` or `end` are not normalized when `glam_assert` is enabled.", - &["_self", "end", "s"], - ) - .register_documented( - "mul", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = >::mul(_self.into_inner(), rhs.into_inner()) - .into(); - output - } - }; - output - }, - " Multiplies two quaternions. If they each represent a rotation, the result will\n represent the combined rotation.\n Note that due to floating point rounding the result may not be perfectly\n normalized.\n # Panics\n Will panic if `self` or `rhs` are not normalized when `glam_assert` is enabled.", - &["_self", "rhs"], - ) - .register_documented( - "mul", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = >::mul(_self.into_inner(), rhs.into_inner()) - .into(); - output - } - }; - output - }, - " Multiplies a quaternion and a 3D vector, returning the rotated vector.\n # Panics\n Will panic if `self` is not normalized when `glam_assert` is enabled.", - &["_self", "rhs"], - ) - .register_documented( - "mul", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = >::mul(_self.into_inner(), rhs.into_inner()) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "mul", - |_self: Val, rhs: f32| { - let output: Val = { - { - let output: Val = >::mul(_self.into_inner(), rhs) - .into(); - output - } - }; - output - }, - " Multiplies a quaternion by a scalar value.\n The product is not guaranteed to be normalized.", - &["_self", "rhs"], - ) - .register_documented( - "mul_quat", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::Quat::mul_quat( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Multiplies two quaternions. If they each represent a rotation, the result will\n represent the combined rotation.\n Note that due to floating point rounding the result may not be perfectly normalized.\n # Panics\n Will panic if `self` or `rhs` are not normalized when `glam_assert` is enabled.", - &["_self", "rhs"], - ) - .register_documented( - "mul_vec3", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::Quat::mul_vec3( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Multiplies a quaternion and a 3D vector, returning the rotated vector.\n # Panics\n Will panic if `self` is not normalized when `glam_assert` is enabled.", - &["_self", "rhs"], - ) - .register_documented( - "mul_vec3a", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::Quat::mul_vec3a( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Multiplies a quaternion and a 3D vector, returning the rotated vector.", - &["_self", "rhs"], - ) - .register_documented( - "neg", - |_self: Val| { - let output: Val = { - { - let output: Val = ::neg( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - "", - &["_self"], - ) - .register_documented( - "normalize", - |_self: Val| { - let output: Val = { - { - let output: Val = bevy::math::Quat::normalize( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns `self` normalized to length 1.0.\n For valid results, `self` must _not_ be of length zero.\n Panics\n Will panic if `self` is zero length when `glam_assert` is enabled.", - &["_self"], - ) - .register_documented( - "rotate_towards", - | - _self: Ref, - rhs: Val, - max_angle: f32| - { - let output: Val = { - { - let output: Val = bevy::math::Quat::rotate_towards( - &_self, - rhs.into_inner(), - max_angle, - ) - .into(); - output - } - }; - output - }, - " Rotates towards `rhs` up to `max_angle` (in radians).\n When `max_angle` is `0.0`, the result will be equal to `self`. When `max_angle` is equal to\n `self.angle_between(rhs)`, the result will be equal to `rhs`. If `max_angle` is negative,\n rotates towards the exact opposite of `rhs`. Will not go past the target.\n Both quaternions must be normalized.\n # Panics\n Will panic if `self` or `rhs` are not normalized when `glam_assert` is enabled.", - &["_self", "rhs", "max_angle"], - ) - .register_documented( - "slerp", - |_self: Val, end: Val, s: f32| { - let output: Val = { - { - let output: Val = bevy::math::Quat::slerp( - _self.into_inner(), - end.into_inner(), - s, - ) - .into(); - output - } - }; - output - }, - " Performs a spherical linear interpolation between `self` and `end`\n based on the value `s`.\n When `s` is `0.0`, the result will be equal to `self`. When `s`\n is `1.0`, the result will be equal to `end`.\n # Panics\n Will panic if `self` or `end` are not normalized when `glam_assert` is enabled.", - &["_self", "end", "s"], - ) - .register_documented( - "sub", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = >::sub(_self.into_inner(), rhs.into_inner()) - .into(); - output - } - }; - output - }, - " Subtracts the `rhs` quaternion from `self`.\n The difference is not guaranteed to be normalized.", - &["_self", "rhs"], - ) - .register_documented( - "to_array", - |_self: Ref| { - let output: [f32; 4] = { - { - let output: [f32; 4] = bevy::math::Quat::to_array(&_self) - .into(); - output - } - }; - output - }, - " `[x, y, z, w]`", - &["_self"], - ) - .register_documented( - "to_euler", - |_self: Val, order: Val| { - let output: (f32, f32, f32) = { - { - let output: (f32, f32, f32) = bevy::math::Quat::to_euler( - _self.into_inner(), - order.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns the rotation angles for the given euler rotation sequence.", - &["_self", "order"], - ) - .register_documented( - "to_scaled_axis", - |_self: Val| { - let output: Val = { - { - let output: Val = bevy::math::Quat::to_scaled_axis( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns the rotation axis scaled by the rotation in radians.", - &["_self"], - ) - .register_documented( - "xyz", - |_self: Val| { - let output: Val = { - { - let output: Val = bevy::math::Quat::xyz( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns the vector part of the quaternion.", - &["_self"], - ); - let registry = world - .get_resource_or_init::(); - let mut registry = registry.write(); - registry - .register_type_data::< - bevy::math::Quat, - bevy_mod_scripting_core::bindings::MarkAsGenerated, - >(); - } - pub(crate) fn register_vec_3_functions(world: &mut bevy::ecs::world::World) { - bevy_mod_scripting_core::bindings::function::namespace::NamespaceBuilder::< - bevy::math::Vec3, - >::new(world) - .register_documented( - "abs", - |_self: Val| { - let output: Val = { - { - let output: Val = bevy::math::Vec3::abs( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector containing the absolute value of each element of `self`.", - &["_self"], - ) - .register_documented( - "abs_diff_eq", - | - _self: Val, - rhs: Val, - max_abs_diff: f32| - { - let output: bool = { - { - let output: bool = bevy::math::Vec3::abs_diff_eq( - _self.into_inner(), - rhs.into_inner(), - max_abs_diff, - ) - .into(); - output - } - }; - output - }, - " Returns true if the absolute difference of all elements between `self` and `rhs` is\n less than or equal to `max_abs_diff`.\n This can be used to compare if two vectors contain similar elements. It works best when\n comparing with a known value. The `max_abs_diff` that should be used used depends on\n the values being compared against.\n For more see\n [comparing floating point numbers](https://randomascii.wordpress.com/2012/02/25/comparing-floating-point-numbers-2012-edition/).", - &["_self", "rhs", "max_abs_diff"], - ) - .register_documented( - "add", - |_self: Val, rhs: Ref| { - let output: Val = { - { - let output: Val = >::add(_self.into_inner(), &rhs) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "add", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = >::add(_self.into_inner(), rhs.into_inner()) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "add", - |_self: Val, rhs: f32| { - let output: Val = { - { - let output: Val = >::add(_self.into_inner(), rhs) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "angle_between", - |_self: Val, rhs: Val| { - let output: f32 = { - { - let output: f32 = bevy::math::Vec3::angle_between( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns the angle (in radians) between two vectors in the range `[0, +π]`.\n The inputs do not need to be unit vectors however they must be non-zero.", - &["_self", "rhs"], - ) - .register_documented( - "any_orthogonal_vector", - |_self: Ref| { - let output: Val = { - { - let output: Val = bevy::math::Vec3::any_orthogonal_vector( - &_self, - ) - .into(); - output - } - }; - output - }, - " Returns some vector that is orthogonal to the given one.\n The input vector must be finite and non-zero.\n The output vector is not necessarily unit length. For that use\n [`Self::any_orthonormal_vector()`] instead.", - &["_self"], - ) - .register_documented( - "any_orthonormal_vector", - |_self: Ref| { - let output: Val = { - { - let output: Val = bevy::math::Vec3::any_orthonormal_vector( - &_self, - ) - .into(); - output - } - }; - output - }, - " Returns any unit vector that is orthogonal to the given one.\n The input vector must be unit length.\n # Panics\n Will panic if `self` is not normalized when `glam_assert` is enabled.", - &["_self"], - ) - .register_documented( - "as_dvec3", - |_self: Ref| { - let output: Val = { - { - let output: Val = bevy::math::Vec3::as_dvec3( - &_self, - ) - .into(); - output - } - }; - output - }, - " Casts all elements of `self` to `f64`.", - &["_self"], - ) - .register_documented( - "as_i16vec3", - |_self: Ref| { - let output: Val = { - { - let output: Val = bevy::math::Vec3::as_i16vec3( - &_self, - ) - .into(); - output - } - }; - output - }, - " Casts all elements of `self` to `i16`.", - &["_self"], - ) - .register_documented( - "as_i64vec3", - |_self: Ref| { - let output: Val = { - { - let output: Val = bevy::math::Vec3::as_i64vec3( - &_self, - ) - .into(); - output - } - }; - output - }, - " Casts all elements of `self` to `i64`.", - &["_self"], - ) - .register_documented( - "as_i8vec3", - |_self: Ref| { - let output: Val = { - { - let output: Val = bevy::math::Vec3::as_i8vec3( - &_self, - ) - .into(); - output - } - }; - output - }, - " Casts all elements of `self` to `i8`.", - &["_self"], - ) - .register_documented( - "as_ivec3", - |_self: Ref| { - let output: Val = { - { - let output: Val = bevy::math::Vec3::as_ivec3( - &_self, - ) - .into(); - output - } - }; - output - }, - " Casts all elements of `self` to `i32`.", - &["_self"], - ) - .register_documented( - "as_u16vec3", - |_self: Ref| { - let output: Val = { - { - let output: Val = bevy::math::Vec3::as_u16vec3( - &_self, - ) - .into(); - output - } - }; - output - }, - " Casts all elements of `self` to `u16`.", - &["_self"], - ) - .register_documented( - "as_u64vec3", - |_self: Ref| { - let output: Val = { - { - let output: Val = bevy::math::Vec3::as_u64vec3( - &_self, - ) - .into(); - output - } - }; - output - }, - " Casts all elements of `self` to `u64`.", - &["_self"], - ) - .register_documented( - "as_u8vec3", - |_self: Ref| { - let output: Val = { - { - let output: Val = bevy::math::Vec3::as_u8vec3( - &_self, - ) - .into(); - output - } - }; - output - }, - " Casts all elements of `self` to `u8`.", - &["_self"], - ) - .register_documented( - "as_uvec3", - |_self: Ref| { - let output: Val = { - { - let output: Val = bevy::math::Vec3::as_uvec3( - &_self, - ) - .into(); - output - } - }; - output - }, - " Casts all elements of `self` to `u32`.", - &["_self"], - ) - .register_documented( - "ceil", - |_self: Val| { - let output: Val = { - { - let output: Val = bevy::math::Vec3::ceil( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector containing the smallest integer greater than or equal to a number for\n each element of `self`.", - &["_self"], - ) - .register_documented( - "clamp", - | - _self: Val, - min: Val, - max: Val| - { - let output: Val = { - { - let output: Val = bevy::math::Vec3::clamp( - _self.into_inner(), - min.into_inner(), - max.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Component-wise clamping of values, similar to [`f32::clamp`].\n Each element in `min` must be less-or-equal to the corresponding element in `max`.\n # Panics\n Will panic if `min` is greater than `max` when `glam_assert` is enabled.", - &["_self", "min", "max"], - ) - .register_documented( - "clamp_length", - |_self: Val, min: f32, max: f32| { - let output: Val = { - { - let output: Val = bevy::math::Vec3::clamp_length( - _self.into_inner(), - min, - max, - ) - .into(); - output - } - }; - output - }, - " Returns a vector with a length no less than `min` and no more than `max`.\n # Panics\n Will panic if `min` is greater than `max`, or if either `min` or `max` is negative, when `glam_assert` is enabled.", - &["_self", "min", "max"], - ) - .register_documented( - "clamp_length_max", - |_self: Val, max: f32| { - let output: Val = { - { - let output: Val = bevy::math::Vec3::clamp_length_max( - _self.into_inner(), - max, - ) - .into(); - output - } - }; - output - }, - " Returns a vector with a length no more than `max`.\n # Panics\n Will panic if `max` is negative when `glam_assert` is enabled.", - &["_self", "max"], - ) - .register_documented( - "clamp_length_min", - |_self: Val, min: f32| { - let output: Val = { - { - let output: Val = bevy::math::Vec3::clamp_length_min( - _self.into_inner(), - min, - ) - .into(); - output - } - }; - output - }, - " Returns a vector with a length no less than `min`.\n # Panics\n Will panic if `min` is negative when `glam_assert` is enabled.", - &["_self", "min"], - ) - .register_documented( - "clone", - |_self: Ref| { - let output: Val = { - { - let output: Val = ::clone( - &_self, - ) - .into(); - output - } - }; - output - }, - "", - &["_self"], - ) - .register_documented( - "cmpeq", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::Vec3::cmpeq( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector mask containing the result of a `==` comparison for each element of\n `self` and `rhs`.\n In other words, this computes `[self.x == rhs.x, self.y == rhs.y, ..]` for all\n elements.", - &["_self", "rhs"], - ) - .register_documented( - "cmpge", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::Vec3::cmpge( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector mask containing the result of a `>=` comparison for each element of\n `self` and `rhs`.\n In other words this computes `[self.x >= rhs.x, self.y >= rhs.y, ..]` for all\n elements.", - &["_self", "rhs"], - ) - .register_documented( - "cmpgt", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::Vec3::cmpgt( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector mask containing the result of a `>` comparison for each element of\n `self` and `rhs`.\n In other words this computes `[self.x > rhs.x, self.y > rhs.y, ..]` for all\n elements.", - &["_self", "rhs"], - ) - .register_documented( - "cmple", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::Vec3::cmple( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector mask containing the result of a `<=` comparison for each element of\n `self` and `rhs`.\n In other words this computes `[self.x <= rhs.x, self.y <= rhs.y, ..]` for all\n elements.", - &["_self", "rhs"], - ) - .register_documented( - "cmplt", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::Vec3::cmplt( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector mask containing the result of a `<` comparison for each element of\n `self` and `rhs`.\n In other words this computes `[self.x < rhs.x, self.y < rhs.y, ..]` for all\n elements.", - &["_self", "rhs"], - ) - .register_documented( - "cmpne", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::Vec3::cmpne( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector mask containing the result of a `!=` comparison for each element of\n `self` and `rhs`.\n In other words this computes `[self.x != rhs.x, self.y != rhs.y, ..]` for all\n elements.", - &["_self", "rhs"], - ) - .register_documented( - "copysign", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::Vec3::copysign( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector with signs of `rhs` and the magnitudes of `self`.", - &["_self", "rhs"], - ) - .register_documented( - "cross", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::Vec3::cross( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Computes the cross product of `self` and `rhs`.", - &["_self", "rhs"], - ) - .register_documented( - "distance", - |_self: Val, rhs: Val| { - let output: f32 = { - { - let output: f32 = bevy::math::Vec3::distance( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Computes the Euclidean distance between two points in space.", - &["_self", "rhs"], - ) - .register_documented( - "distance_squared", - |_self: Val, rhs: Val| { - let output: f32 = { - { - let output: f32 = bevy::math::Vec3::distance_squared( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Compute the squared euclidean distance between two points in space.", - &["_self", "rhs"], - ) - .register_documented( - "div", - |_self: Val, rhs: Ref| { - let output: Val = { - { - let output: Val = >::div(_self.into_inner(), &rhs) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "div", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = >::div(_self.into_inner(), rhs.into_inner()) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "div", - |_self: Val, rhs: f32| { - let output: Val = { - { - let output: Val = >::div(_self.into_inner(), rhs) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "div_euclid", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::Vec3::div_euclid( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns the element-wise quotient of [Euclidean division] of `self` by `rhs`.", - &["_self", "rhs"], - ) - .register_documented( - "dot", - |_self: Val, rhs: Val| { - let output: f32 = { - { - let output: f32 = bevy::math::Vec3::dot( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Computes the dot product of `self` and `rhs`.", - &["_self", "rhs"], - ) - .register_documented( - "dot_into_vec", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::Vec3::dot_into_vec( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector where every component is the dot product of `self` and `rhs`.", - &["_self", "rhs"], - ) - .register_documented( - "element_product", - |_self: Val| { - let output: f32 = { - { - let output: f32 = bevy::math::Vec3::element_product( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns the product of all elements of `self`.\n In other words, this computes `self.x * self.y * ..`.", - &["_self"], - ) - .register_documented( - "element_sum", - |_self: Val| { - let output: f32 = { - { - let output: f32 = bevy::math::Vec3::element_sum( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns the sum of all elements of `self`.\n In other words, this computes `self.x + self.y + ..`.", - &["_self"], - ) - .register_documented( - "eq", - |_self: Ref, other: Ref| { - let output: bool = { - { - let output: bool = >::eq(&_self, &other) - .into(); - output - } - }; - output - }, - "", - &["_self", "other"], - ) - .register_documented( - "exp", - |_self: Val| { - let output: Val = { - { - let output: Val = bevy::math::Vec3::exp( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector containing `e^self` (the exponential function) for each element of\n `self`.", - &["_self"], - ) - .register_documented( - "extend", - |_self: Val, w: f32| { - let output: Val = { - { - let output: Val = bevy::math::Vec3::extend( - _self.into_inner(), - w, - ) - .into(); - output - } - }; - output - }, - " Creates a 4D vector from `self` and the given `w` value.", - &["_self", "w"], - ) - .register_documented( - "floor", - |_self: Val| { - let output: Val = { - { - let output: Val = bevy::math::Vec3::floor( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector containing the largest integer less than or equal to a number for each\n element of `self`.", - &["_self"], - ) - .register_documented( - "fract", - |_self: Val| { - let output: Val = { - { - let output: Val = bevy::math::Vec3::fract( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector containing the fractional part of the vector as `self - self.trunc()`.\n Note that this differs from the GLSL implementation of `fract` which returns\n `self - self.floor()`.\n Note that this is fast but not precise for large numbers.", - &["_self"], - ) - .register_documented( - "fract_gl", - |_self: Val| { - let output: Val = { - { - let output: Val = bevy::math::Vec3::fract_gl( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector containing the fractional part of the vector as `self - self.floor()`.\n Note that this differs from the Rust implementation of `fract` which returns\n `self - self.trunc()`.\n Note that this is fast but not precise for large numbers.", - &["_self"], - ) - .register_documented( - "from_array", - |a: [f32; 3]| { - let output: Val = { - { - let output: Val = bevy::math::Vec3::from_array( - a, - ) - .into(); - output - } - }; - output - }, - " Creates a new vector from an array.", - &["a"], - ) - .register_documented( - "is_finite", - |_self: Val| { - let output: bool = { - { - let output: bool = bevy::math::Vec3::is_finite( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns `true` if, and only if, all elements are finite. If any element is either\n `NaN`, positive or negative infinity, this will return `false`.", - &["_self"], - ) - .register_documented( - "is_finite_mask", - |_self: Val| { - let output: Val = { - { - let output: Val = bevy::math::Vec3::is_finite_mask( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Performs `is_finite` on each element of self, returning a vector mask of the results.\n In other words, this computes `[x.is_finite(), y.is_finite(), ...]`.", - &["_self"], - ) - .register_documented( - "is_nan", - |_self: Val| { - let output: bool = { - { - let output: bool = bevy::math::Vec3::is_nan( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns `true` if any elements are `NaN`.", - &["_self"], - ) - .register_documented( - "is_nan_mask", - |_self: Val| { - let output: Val = { - { - let output: Val = bevy::math::Vec3::is_nan_mask( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Performs `is_nan` on each element of self, returning a vector mask of the results.\n In other words, this computes `[x.is_nan(), y.is_nan(), ...]`.", - &["_self"], - ) - .register_documented( - "is_negative_bitmask", - |_self: Val| { - let output: u32 = { - { - let output: u32 = bevy::math::Vec3::is_negative_bitmask( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a bitmask with the lowest 3 bits set to the sign bits from the elements of `self`.\n A negative element results in a `1` bit and a positive element in a `0` bit. Element `x` goes\n into the first lowest bit, element `y` into the second, etc.", - &["_self"], - ) - .register_documented( - "is_normalized", - |_self: Val| { - let output: bool = { - { - let output: bool = bevy::math::Vec3::is_normalized( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns whether `self` is length `1.0` or not.\n Uses a precision threshold of approximately `1e-4`.", - &["_self"], - ) - .register_documented( - "length", - |_self: Val| { - let output: f32 = { - { - let output: f32 = bevy::math::Vec3::length( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Computes the length of `self`.", - &["_self"], - ) - .register_documented( - "length_recip", - |_self: Val| { - let output: f32 = { - { - let output: f32 = bevy::math::Vec3::length_recip( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Computes `1.0 / length()`.\n For valid results, `self` must _not_ be of length zero.", - &["_self"], - ) - .register_documented( - "length_squared", - |_self: Val| { - let output: f32 = { - { - let output: f32 = bevy::math::Vec3::length_squared( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Computes the squared length of `self`.\n This is faster than `length()` as it avoids a square root operation.", - &["_self"], - ) - .register_documented( - "lerp", - |_self: Val, rhs: Val, s: f32| { - let output: Val = { - { - let output: Val = bevy::math::Vec3::lerp( - _self.into_inner(), - rhs.into_inner(), - s, - ) - .into(); - output - } - }; - output - }, - " Performs a linear interpolation between `self` and `rhs` based on the value `s`.\n When `s` is `0.0`, the result will be equal to `self`. When `s` is `1.0`, the result\n will be equal to `rhs`. When `s` is outside of range `[0, 1]`, the result is linearly\n extrapolated.", - &["_self", "rhs", "s"], - ) - .register_documented( - "max", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::Vec3::max( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector containing the maximum values for each element of `self` and `rhs`.\n In other words this computes `[self.x.max(rhs.x), self.y.max(rhs.y), ..]`.", - &["_self", "rhs"], - ) - .register_documented( - "max_element", - |_self: Val| { - let output: f32 = { - { - let output: f32 = bevy::math::Vec3::max_element( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns the horizontal maximum of `self`.\n In other words this computes `max(x, y, ..)`.", - &["_self"], - ) - .register_documented( - "midpoint", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::Vec3::midpoint( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Calculates the midpoint between `self` and `rhs`.\n The midpoint is the average of, or halfway point between, two vectors.\n `a.midpoint(b)` should yield the same result as `a.lerp(b, 0.5)`\n while being slightly cheaper to compute.", - &["_self", "rhs"], - ) - .register_documented( - "min", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::Vec3::min( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector containing the minimum values for each element of `self` and `rhs`.\n In other words this computes `[self.x.min(rhs.x), self.y.min(rhs.y), ..]`.", - &["_self", "rhs"], - ) - .register_documented( - "min_element", - |_self: Val| { - let output: f32 = { - { - let output: f32 = bevy::math::Vec3::min_element( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns the horizontal minimum of `self`.\n In other words this computes `min(x, y, ..)`.", - &["_self"], - ) - .register_documented( - "move_towards", - |_self: Ref, rhs: Val, d: f32| { - let output: Val = { - { - let output: Val = bevy::math::Vec3::move_towards( - &_self, - rhs.into_inner(), - d, - ) - .into(); - output - } - }; - output - }, - " Moves towards `rhs` based on the value `d`.\n When `d` is `0.0`, the result will be equal to `self`. When `d` is equal to\n `self.distance(rhs)`, the result will be equal to `rhs`. Will not go past `rhs`.", - &["_self", "rhs", "d"], - ) - .register_documented( - "mul", - |_self: Val, rhs: Ref| { - let output: Val = { - { - let output: Val = >::mul(_self.into_inner(), &rhs) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "mul", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = >::mul(_self.into_inner(), rhs.into_inner()) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "mul", - |_self: Val, rhs: f32| { - let output: Val = { - { - let output: Val = >::mul(_self.into_inner(), rhs) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "mul_add", - | - _self: Val, - a: Val, - b: Val| - { - let output: Val = { - { - let output: Val = bevy::math::Vec3::mul_add( - _self.into_inner(), - a.into_inner(), - b.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Fused multiply-add. Computes `(self * a) + b` element-wise with only one rounding\n error, yielding a more accurate result than an unfused multiply-add.\n Using `mul_add` *may* be more performant than an unfused multiply-add if the target\n architecture has a dedicated fma CPU instruction. However, this is not always true,\n and will be heavily dependant on designing algorithms with specific target hardware in\n mind.", - &["_self", "a", "b"], - ) - .register_documented( - "neg", - |_self: Val| { - let output: Val = { - { - let output: Val = ::neg( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - "", - &["_self"], - ) - .register_documented( - "new", - |x: f32, y: f32, z: f32| { - let output: Val = { - { - let output: Val = bevy::math::Vec3::new( - x, - y, - z, - ) - .into(); - output - } - }; - output - }, - " Creates a new vector.", - &["x", "y", "z"], - ) - .register_documented( - "normalize", - |_self: Val| { - let output: Val = { - { - let output: Val = bevy::math::Vec3::normalize( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns `self` normalized to length 1.0.\n For valid results, `self` must be finite and _not_ of length zero, nor very close to zero.\n See also [`Self::try_normalize()`] and [`Self::normalize_or_zero()`].\n Panics\n Will panic if the resulting normalized vector is not finite when `glam_assert` is enabled.", - &["_self"], - ) - .register_documented( - "normalize_or", - |_self: Val, fallback: Val| { - let output: Val = { - { - let output: Val = bevy::math::Vec3::normalize_or( - _self.into_inner(), - fallback.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns `self` normalized to length 1.0 if possible, else returns a\n fallback value.\n In particular, if the input is zero (or very close to zero), or non-finite,\n the result of this operation will be the fallback value.\n See also [`Self::try_normalize()`].", - &["_self", "fallback"], - ) - .register_documented( - "normalize_or_zero", - |_self: Val| { - let output: Val = { - { - let output: Val = bevy::math::Vec3::normalize_or_zero( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns `self` normalized to length 1.0 if possible, else returns zero.\n In particular, if the input is zero (or very close to zero), or non-finite,\n the result of this operation will be zero.\n See also [`Self::try_normalize()`].", - &["_self"], - ) - .register_documented( - "powf", - |_self: Val, n: f32| { - let output: Val = { - { - let output: Val = bevy::math::Vec3::powf( - _self.into_inner(), - n, - ) - .into(); - output - } - }; - output - }, - " Returns a vector containing each element of `self` raised to the power of `n`.", - &["_self", "n"], - ) - .register_documented( - "project_onto", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::Vec3::project_onto( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns the vector projection of `self` onto `rhs`.\n `rhs` must be of non-zero length.\n # Panics\n Will panic if `rhs` is zero length when `glam_assert` is enabled.", - &["_self", "rhs"], - ) - .register_documented( - "project_onto_normalized", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::Vec3::project_onto_normalized( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns the vector projection of `self` onto `rhs`.\n `rhs` must be normalized.\n # Panics\n Will panic if `rhs` is not normalized when `glam_assert` is enabled.", - &["_self", "rhs"], - ) - .register_documented( - "recip", - |_self: Val| { - let output: Val = { - { - let output: Val = bevy::math::Vec3::recip( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector containing the reciprocal `1.0/n` of each element of `self`.", - &["_self"], - ) - .register_documented( - "reflect", - |_self: Val, normal: Val| { - let output: Val = { - { - let output: Val = bevy::math::Vec3::reflect( - _self.into_inner(), - normal.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns the reflection vector for a given incident vector `self` and surface normal\n `normal`.\n `normal` must be normalized.\n # Panics\n Will panic if `normal` is not normalized when `glam_assert` is enabled.", - &["_self", "normal"], - ) - .register_documented( - "refract", - |_self: Val, normal: Val, eta: f32| { - let output: Val = { - { - let output: Val = bevy::math::Vec3::refract( - _self.into_inner(), - normal.into_inner(), - eta, - ) - .into(); - output - } - }; - output - }, - " Returns the refraction direction for a given incident vector `self`, surface normal\n `normal` and ratio of indices of refraction, `eta`. When total internal reflection occurs,\n a zero vector will be returned.\n `self` and `normal` must be normalized.\n # Panics\n Will panic if `self` or `normal` is not normalized when `glam_assert` is enabled.", - &["_self", "normal", "eta"], - ) - .register_documented( - "reject_from", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::Vec3::reject_from( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns the vector rejection of `self` from `rhs`.\n The vector rejection is the vector perpendicular to the projection of `self` onto\n `rhs`, in rhs words the result of `self - self.project_onto(rhs)`.\n `rhs` must be of non-zero length.\n # Panics\n Will panic if `rhs` has a length of zero when `glam_assert` is enabled.", - &["_self", "rhs"], - ) - .register_documented( - "reject_from_normalized", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::Vec3::reject_from_normalized( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns the vector rejection of `self` from `rhs`.\n The vector rejection is the vector perpendicular to the projection of `self` onto\n `rhs`, in rhs words the result of `self - self.project_onto(rhs)`.\n `rhs` must be normalized.\n # Panics\n Will panic if `rhs` is not normalized when `glam_assert` is enabled.", - &["_self", "rhs"], - ) - .register_documented( - "rem", - |_self: Val, rhs: Ref| { - let output: Val = { - { - let output: Val = >::rem(_self.into_inner(), &rhs) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "rem", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = >::rem(_self.into_inner(), rhs.into_inner()) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "rem", - |_self: Val, rhs: f32| { - let output: Val = { - { - let output: Val = >::rem(_self.into_inner(), rhs) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "rem_euclid", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::Vec3::rem_euclid( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns the element-wise remainder of [Euclidean division] of `self` by `rhs`.\n [Euclidean division]: f32::rem_euclid", - &["_self", "rhs"], - ) - .register_documented( - "round", - |_self: Val| { - let output: Val = { - { - let output: Val = bevy::math::Vec3::round( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector containing the nearest integer to a number for each element of `self`.\n Round half-way cases away from 0.0.", - &["_self"], - ) - .register_documented( - "select", - | - mask: Val, - if_true: Val, - if_false: Val| - { - let output: Val = { - { - let output: Val = bevy::math::Vec3::select( - mask.into_inner(), - if_true.into_inner(), - if_false.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Creates a vector from the elements in `if_true` and `if_false`, selecting which to use\n for each element of `self`.\n A true element in the mask uses the corresponding element from `if_true`, and false\n uses the element from `if_false`.", - &["mask", "if_true", "if_false"], - ) - .register_documented( - "signum", - |_self: Val| { - let output: Val = { - { - let output: Val = bevy::math::Vec3::signum( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector with elements representing the sign of `self`.\n - `1.0` if the number is positive, `+0.0` or `INFINITY`\n - `-1.0` if the number is negative, `-0.0` or `NEG_INFINITY`\n - `NAN` if the number is `NAN`", - &["_self"], - ) - .register_documented( - "splat", - |v: f32| { - let output: Val = { - { - let output: Val = bevy::math::Vec3::splat( - v, - ) - .into(); - output - } - }; - output - }, - " Creates a vector with all elements set to `v`.", - &["v"], - ) - .register_documented( - "sub", - |_self: Val, rhs: Ref| { - let output: Val = { - { - let output: Val = >::sub(_self.into_inner(), &rhs) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "sub", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = >::sub(_self.into_inner(), rhs.into_inner()) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "sub", - |_self: Val, rhs: f32| { - let output: Val = { - { - let output: Val = >::sub(_self.into_inner(), rhs) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "to_array", - |_self: Ref| { - let output: [f32; 3] = { - { - let output: [f32; 3] = bevy::math::Vec3::to_array(&_self) - .into(); - output - } - }; - output - }, - " `[x, y, z]`", - &["_self"], - ) - .register_documented( - "trunc", - |_self: Val| { - let output: Val = { - { - let output: Val = bevy::math::Vec3::trunc( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector containing the integer part each element of `self`. This means numbers are\n always truncated towards zero.", - &["_self"], - ) - .register_documented( - "truncate", - |_self: Val| { - let output: Val = { - { - let output: Val = bevy::math::Vec3::truncate( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Creates a 2D vector from the `x` and `y` elements of `self`, discarding `z`.\n Truncation may also be performed by using [`self.xy()`][crate::swizzles::Vec3Swizzles::xy()].", - &["_self"], - ) - .register_documented( - "with_x", - |_self: Val, x: f32| { - let output: Val = { - { - let output: Val = bevy::math::Vec3::with_x( - _self.into_inner(), - x, - ) - .into(); - output - } - }; - output - }, - " Creates a 3D vector from `self` with the given value of `x`.", - &["_self", "x"], - ) - .register_documented( - "with_y", - |_self: Val, y: f32| { - let output: Val = { - { - let output: Val = bevy::math::Vec3::with_y( - _self.into_inner(), - y, - ) - .into(); - output - } - }; - output - }, - " Creates a 3D vector from `self` with the given value of `y`.", - &["_self", "y"], - ) - .register_documented( - "with_z", - |_self: Val, z: f32| { - let output: Val = { - { - let output: Val = bevy::math::Vec3::with_z( - _self.into_inner(), - z, - ) - .into(); - output - } - }; - output - }, - " Creates a 3D vector from `self` with the given value of `z`.", - &["_self", "z"], - ); - let registry = world - .get_resource_or_init::(); - let mut registry = registry.write(); - registry - .register_type_data::< - bevy::math::Vec3, - bevy_mod_scripting_core::bindings::MarkAsGenerated, - >(); - } - pub(crate) fn register_socket_addr_functions(world: &mut bevy::ecs::world::World) { - bevy_mod_scripting_core::bindings::function::namespace::NamespaceBuilder::< + >>::eq(&_self, &other) + .into(); + output + } +} +#[script_bindings( + remote, + name = "quat_functions", + bms_core_path = "bevy_mod_scripting_core", + generated +)] +impl ::glam::Quat { + /// Returns true if the absolute difference of all elements between `self` and `rhs` + /// is less than or equal to `max_abs_diff`. + /// This can be used to compare if two quaternions contain similar elements. It works + /// best when comparing with a known value. The `max_abs_diff` that should be used used + /// depends on the values being compared against. + /// For more see + /// [comparing floating point numbers](https://randomascii.wordpress.com/2012/02/25/comparing-floating-point-numbers-2012-edition/). + fn abs_diff_eq( + _self: Val<::glam::Quat>, + rhs: Val<::glam::Quat>, + max_abs_diff: f32, + ) -> bool { + let output: bool = ::glam::Quat::abs_diff_eq( + _self.into_inner(), + rhs.into_inner(), + max_abs_diff, + ) + .into(); + output + } + /// Adds two quaternions. + /// The sum is not guaranteed to be normalized. + /// Note that addition is not the same as combining the rotations represented by the + /// two quaternions! That corresponds to multiplication. + fn add(_self: Val<::glam::Quat>, rhs: Val<::glam::Quat>) -> Val<::glam::Quat> { + let output: Val<::glam::Quat> = <::glam::Quat as ::core::ops::Add< + ::glam::Quat, + >>::add(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + /// Returns the angle (in radians) for the minimal rotation + /// for transforming this quaternion into another. + /// Both quaternions must be normalized. + /// # Panics + /// Will panic if `self` or `rhs` are not normalized when `glam_assert` is enabled. + fn angle_between(_self: Val<::glam::Quat>, rhs: Val<::glam::Quat>) -> f32 { + let output: f32 = ::glam::Quat::angle_between( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + fn as_dquat(_self: Val<::glam::Quat>) -> Val<::glam::DQuat> { + let output: Val<::glam::DQuat> = ::glam::Quat::as_dquat(_self.into_inner()) + .into(); + output + } + fn clone(_self: Ref<::glam::Quat>) -> Val<::glam::Quat> { + let output: Val<::glam::Quat> = <::glam::Quat as ::bevy_reflect::erased_serde::__private::serde::__private::Clone>::clone( + &_self, + ) + .into(); + output + } + /// Returns the quaternion conjugate of `self`. For a unit quaternion the + /// conjugate is also the inverse. + fn conjugate(_self: Val<::glam::Quat>) -> Val<::glam::Quat> { + let output: Val<::glam::Quat> = ::glam::Quat::conjugate(_self.into_inner()) + .into(); + output + } + /// Divides a quaternion by a scalar value. + /// The quotient is not guaranteed to be normalized. + fn div(_self: Val<::glam::Quat>, rhs: f32) -> Val<::glam::Quat> { + let output: Val<::glam::Quat> = <::glam::Quat as ::core::ops::Div< + f32, + >>::div(_self.into_inner(), rhs) + .into(); + output + } + /// Computes the dot product of `self` and `rhs`. The dot product is + /// equal to the cosine of the angle between two quaternion rotations. + fn dot(_self: Val<::glam::Quat>, rhs: Val<::glam::Quat>) -> f32 { + let output: f32 = ::glam::Quat::dot(_self.into_inner(), rhs.into_inner()).into(); + output + } + fn eq(_self: Ref<::glam::Quat>, rhs: Ref<::glam::Quat>) -> bool { + let output: bool = <::glam::Quat as ::core::cmp::PartialEq< + ::glam::Quat, + >>::eq(&_self, &rhs) + .into(); + output + } + /// Creates a quaternion from a 3x3 rotation matrix inside a 3D affine transform. + /// Note if the input affine matrix contain scales, shears, or other non-rotation + /// transformations then the resulting quaternion will be ill-defined. + /// # Panics + /// Will panic if any input affine matrix column is not normalized when `glam_assert` is + /// enabled. + fn from_affine3(a: Ref<::glam::Affine3A>) -> Val<::glam::Quat> { + let output: Val<::glam::Quat> = ::glam::Quat::from_affine3(&a).into(); + output + } + /// Creates a rotation quaternion from an array. + /// # Preconditions + /// This function does not check if the input is normalized, it is up to the user to + /// provide normalized input or to normalized the resulting quaternion. + fn from_array(a: [f32; 4]) -> Val<::glam::Quat> { + let output: Val<::glam::Quat> = ::glam::Quat::from_array(a).into(); + output + } + /// Create a quaternion for a normalized rotation `axis` and `angle` (in radians). + /// The axis must be a unit vector. + /// # Panics + /// Will panic if `axis` is not normalized when `glam_assert` is enabled. + fn from_axis_angle(axis: Val<::glam::Vec3>, angle: f32) -> Val<::glam::Quat> { + let output: Val<::glam::Quat> = ::glam::Quat::from_axis_angle( + axis.into_inner(), + angle, + ) + .into(); + output + } + /// Creates a quaternion from the given Euler rotation sequence and the angles (in radians). + fn from_euler( + euler: Val<::glam::EulerRot>, + a: f32, + b: f32, + c: f32, + ) -> Val<::glam::Quat> { + let output: Val<::glam::Quat> = ::glam::Quat::from_euler( + euler.into_inner(), + a, + b, + c, + ) + .into(); + output + } + /// Creates a quaternion from a 3x3 rotation matrix. + /// Note if the input matrix contain scales, shears, or other non-rotation transformations then + /// the resulting quaternion will be ill-defined. + /// # Panics + /// Will panic if any input matrix column is not normalized when `glam_assert` is enabled. + fn from_mat3(mat: Ref<::glam::Mat3>) -> Val<::glam::Quat> { + let output: Val<::glam::Quat> = ::glam::Quat::from_mat3(&mat).into(); + output + } + /// Creates a quaternion from a 3x3 SIMD aligned rotation matrix. + /// Note if the input matrix contain scales, shears, or other non-rotation transformations then + /// the resulting quaternion will be ill-defined. + /// # Panics + /// Will panic if any input matrix column is not normalized when `glam_assert` is enabled. + fn from_mat3a(mat: Ref<::glam::Mat3A>) -> Val<::glam::Quat> { + let output: Val<::glam::Quat> = ::glam::Quat::from_mat3a(&mat).into(); + output + } + /// Creates a quaternion from the upper 3x3 rotation matrix inside a homogeneous 4x4 matrix. + /// Note if the upper 3x3 matrix contain scales, shears, or other non-rotation transformations + /// then the resulting quaternion will be ill-defined. + /// # Panics + /// Will panic if any column of the upper 3x3 rotation matrix is not normalized when + /// `glam_assert` is enabled. + fn from_mat4(mat: Ref<::glam::Mat4>) -> Val<::glam::Quat> { + let output: Val<::glam::Quat> = ::glam::Quat::from_mat4(&mat).into(); + output + } + /// Gets the minimal rotation for transforming `from` to `to`. The rotation is in the + /// plane spanned by the two vectors. Will rotate at most 180 degrees. + /// The inputs must be unit vectors. + /// `from_rotation_arc(from, to) * from ≈ to`. + /// For near-singular cases (from≈to and from≈-to) the current implementation + /// is only accurate to about 0.001 (for `f32`). + /// # Panics + /// Will panic if `from` or `to` are not normalized when `glam_assert` is enabled. + fn from_rotation_arc( + from: Val<::glam::Vec3>, + to: Val<::glam::Vec3>, + ) -> Val<::glam::Quat> { + let output: Val<::glam::Quat> = ::glam::Quat::from_rotation_arc( + from.into_inner(), + to.into_inner(), + ) + .into(); + output + } + /// Gets the minimal rotation for transforming `from` to `to`. The resulting rotation is + /// around the z axis. Will rotate at most 180 degrees. + /// The inputs must be unit vectors. + /// `from_rotation_arc_2d(from, to) * from ≈ to`. + /// For near-singular cases (from≈to and from≈-to) the current implementation + /// is only accurate to about 0.001 (for `f32`). + /// # Panics + /// Will panic if `from` or `to` are not normalized when `glam_assert` is enabled. + fn from_rotation_arc_2d( + from: Val<::glam::Vec2>, + to: Val<::glam::Vec2>, + ) -> Val<::glam::Quat> { + let output: Val<::glam::Quat> = ::glam::Quat::from_rotation_arc_2d( + from.into_inner(), + to.into_inner(), + ) + .into(); + output + } + /// Gets the minimal rotation for transforming `from` to either `to` or `-to`. This means + /// that the resulting quaternion will rotate `from` so that it is colinear with `to`. + /// The rotation is in the plane spanned by the two vectors. Will rotate at most 90 + /// degrees. + /// The inputs must be unit vectors. + /// `to.dot(from_rotation_arc_colinear(from, to) * from).abs() ≈ 1`. + /// # Panics + /// Will panic if `from` or `to` are not normalized when `glam_assert` is enabled. + fn from_rotation_arc_colinear( + from: Val<::glam::Vec3>, + to: Val<::glam::Vec3>, + ) -> Val<::glam::Quat> { + let output: Val<::glam::Quat> = ::glam::Quat::from_rotation_arc_colinear( + from.into_inner(), + to.into_inner(), + ) + .into(); + output + } + /// Creates a quaternion from the `angle` (in radians) around the x axis. + fn from_rotation_x(angle: f32) -> Val<::glam::Quat> { + let output: Val<::glam::Quat> = ::glam::Quat::from_rotation_x(angle).into(); + output + } + /// Creates a quaternion from the `angle` (in radians) around the y axis. + fn from_rotation_y(angle: f32) -> Val<::glam::Quat> { + let output: Val<::glam::Quat> = ::glam::Quat::from_rotation_y(angle).into(); + output + } + /// Creates a quaternion from the `angle` (in radians) around the z axis. + fn from_rotation_z(angle: f32) -> Val<::glam::Quat> { + let output: Val<::glam::Quat> = ::glam::Quat::from_rotation_z(angle).into(); + output + } + /// Create a quaternion that rotates `v.length()` radians around `v.normalize()`. + /// `from_scaled_axis(Vec3::ZERO)` results in the identity quaternion. + fn from_scaled_axis(v: Val<::glam::Vec3>) -> Val<::glam::Quat> { + let output: Val<::glam::Quat> = ::glam::Quat::from_scaled_axis(v.into_inner()) + .into(); + output + } + /// Creates a new rotation quaternion from a 4D vector. + /// # Preconditions + /// This function does not check if the input is normalized, it is up to the user to + /// provide normalized input or to normalized the resulting quaternion. + fn from_vec4(v: Val<::glam::Vec4>) -> Val<::glam::Quat> { + let output: Val<::glam::Quat> = ::glam::Quat::from_vec4(v.into_inner()).into(); + output + } + /// Creates a new rotation quaternion. + /// This should generally not be called manually unless you know what you are doing. + /// Use one of the other constructors instead such as `identity` or `from_axis_angle`. + /// `from_xyzw` is mostly used by unit tests and `serde` deserialization. + /// # Preconditions + /// This function does not check if the input is normalized, it is up to the user to + /// provide normalized input or to normalized the resulting quaternion. + fn from_xyzw(x: f32, y: f32, z: f32, w: f32) -> Val<::glam::Quat> { + let output: Val<::glam::Quat> = ::glam::Quat::from_xyzw(x, y, z, w).into(); + output + } + /// Returns the inverse of a normalized quaternion. + /// Typically quaternion inverse returns the conjugate of a normalized quaternion. + /// Because `self` is assumed to already be unit length this method *does not* normalize + /// before returning the conjugate. + /// # Panics + /// Will panic if `self` is not normalized when `glam_assert` is enabled. + fn inverse(_self: Val<::glam::Quat>) -> Val<::glam::Quat> { + let output: Val<::glam::Quat> = ::glam::Quat::inverse(_self.into_inner()).into(); + output + } + /// Returns `true` if, and only if, all elements are finite. + /// If any element is either `NaN`, positive or negative infinity, this will return `false`. + fn is_finite(_self: Val<::glam::Quat>) -> bool { + let output: bool = ::glam::Quat::is_finite(_self.into_inner()).into(); + output + } + /// Returns `true` if any elements are `NAN`. + fn is_nan(_self: Val<::glam::Quat>) -> bool { + let output: bool = ::glam::Quat::is_nan(_self.into_inner()).into(); + output + } + fn is_near_identity(_self: Val<::glam::Quat>) -> bool { + let output: bool = ::glam::Quat::is_near_identity(_self.into_inner()).into(); + output + } + /// Returns whether `self` of length `1.0` or not. + /// Uses a precision threshold of `1e-6`. + fn is_normalized(_self: Val<::glam::Quat>) -> bool { + let output: bool = ::glam::Quat::is_normalized(_self.into_inner()).into(); + output + } + /// Computes the length of `self`. + fn length(_self: Val<::glam::Quat>) -> f32 { + let output: f32 = ::glam::Quat::length(_self.into_inner()).into(); + output + } + /// Computes `1.0 / length()`. + /// For valid results, `self` must _not_ be of length zero. + fn length_recip(_self: Val<::glam::Quat>) -> f32 { + let output: f32 = ::glam::Quat::length_recip(_self.into_inner()).into(); + output + } + /// Computes the squared length of `self`. + /// This is generally faster than `length()` as it avoids a square + /// root operation. + fn length_squared(_self: Val<::glam::Quat>) -> f32 { + let output: f32 = ::glam::Quat::length_squared(_self.into_inner()).into(); + output + } + /// Performs a linear interpolation between `self` and `rhs` based on + /// the value `s`. + /// When `s` is `0.0`, the result will be equal to `self`. When `s` + /// is `1.0`, the result will be equal to `rhs`. + /// # Panics + /// Will panic if `self` or `end` are not normalized when `glam_assert` is enabled. + fn lerp( + _self: Val<::glam::Quat>, + end: Val<::glam::Quat>, + s: f32, + ) -> Val<::glam::Quat> { + let output: Val<::glam::Quat> = ::glam::Quat::lerp( + _self.into_inner(), + end.into_inner(), + s, + ) + .into(); + output + } + /// Multiplies two quaternions. If they each represent a rotation, the result will + /// represent the combined rotation. + /// Note that due to floating point rounding the result may not be perfectly + /// normalized. + /// # Panics + /// Will panic if `self` or `rhs` are not normalized when `glam_assert` is enabled. + fn mul(_self: Val<::glam::Quat>, rhs: Val<::glam::Quat>) -> Val<::glam::Quat> { + let output: Val<::glam::Quat> = <::glam::Quat as ::core::ops::Mul< + ::glam::Quat, + >>::mul(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + /// Multiplies a quaternion and a 3D vector, returning the rotated vector. + /// # Panics + /// Will panic if `self` is not normalized when `glam_assert` is enabled. + fn mul(_self: Val<::glam::Quat>, rhs: Val<::glam::Vec3>) -> Val<::glam::Vec3> { + let output: Val<::glam::Vec3> = <::glam::Quat as ::core::ops::Mul< + ::glam::Vec3, + >>::mul(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + fn mul(_self: Val<::glam::Quat>, rhs: Val<::glam::Vec3A>) -> Val<::glam::Vec3A> { + let output: Val<::glam::Vec3A> = <::glam::Quat as ::core::ops::Mul< + ::glam::Vec3A, + >>::mul(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + /// Multiplies a quaternion by a scalar value. + /// The product is not guaranteed to be normalized. + fn mul(_self: Val<::glam::Quat>, rhs: f32) -> Val<::glam::Quat> { + let output: Val<::glam::Quat> = <::glam::Quat as ::core::ops::Mul< + f32, + >>::mul(_self.into_inner(), rhs) + .into(); + output + } + /// Multiplies two quaternions. If they each represent a rotation, the result will + /// represent the combined rotation. + /// Note that due to floating point rounding the result may not be perfectly normalized. + /// # Panics + /// Will panic if `self` or `rhs` are not normalized when `glam_assert` is enabled. + fn mul_quat(_self: Val<::glam::Quat>, rhs: Val<::glam::Quat>) -> Val<::glam::Quat> { + let output: Val<::glam::Quat> = ::glam::Quat::mul_quat( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Multiplies a quaternion and a 3D vector, returning the rotated vector. + /// # Panics + /// Will panic if `self` is not normalized when `glam_assert` is enabled. + fn mul_vec3(_self: Val<::glam::Quat>, rhs: Val<::glam::Vec3>) -> Val<::glam::Vec3> { + let output: Val<::glam::Vec3> = ::glam::Quat::mul_vec3( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Multiplies a quaternion and a 3D vector, returning the rotated vector. + fn mul_vec3a( + _self: Val<::glam::Quat>, + rhs: Val<::glam::Vec3A>, + ) -> Val<::glam::Vec3A> { + let output: Val<::glam::Vec3A> = ::glam::Quat::mul_vec3a( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + fn neg(_self: Val<::glam::Quat>) -> Val<::glam::Quat> { + let output: Val<::glam::Quat> = <::glam::Quat as ::core::ops::Neg>::neg( + _self.into_inner(), + ) + .into(); + output + } + /// Returns `self` normalized to length 1.0. + /// For valid results, `self` must _not_ be of length zero. + /// Panics + /// Will panic if `self` is zero length when `glam_assert` is enabled. + fn normalize(_self: Val<::glam::Quat>) -> Val<::glam::Quat> { + let output: Val<::glam::Quat> = ::glam::Quat::normalize(_self.into_inner()) + .into(); + output + } + /// Rotates towards `rhs` up to `max_angle` (in radians). + /// When `max_angle` is `0.0`, the result will be equal to `self`. When `max_angle` is equal to + /// `self.angle_between(rhs)`, the result will be equal to `rhs`. If `max_angle` is negative, + /// rotates towards the exact opposite of `rhs`. Will not go past the target. + /// Both quaternions must be normalized. + /// # Panics + /// Will panic if `self` or `rhs` are not normalized when `glam_assert` is enabled. + fn rotate_towards( + _self: Ref<::glam::Quat>, + rhs: Val<::glam::Quat>, + max_angle: f32, + ) -> Val<::glam::Quat> { + let output: Val<::glam::Quat> = ::glam::Quat::rotate_towards( + &_self, + rhs.into_inner(), + max_angle, + ) + .into(); + output + } + /// Performs a spherical linear interpolation between `self` and `end` + /// based on the value `s`. + /// When `s` is `0.0`, the result will be equal to `self`. When `s` + /// is `1.0`, the result will be equal to `end`. + /// # Panics + /// Will panic if `self` or `end` are not normalized when `glam_assert` is enabled. + fn slerp( + _self: Val<::glam::Quat>, + end: Val<::glam::Quat>, + s: f32, + ) -> Val<::glam::Quat> { + let output: Val<::glam::Quat> = ::glam::Quat::slerp( + _self.into_inner(), + end.into_inner(), + s, + ) + .into(); + output + } + /// Subtracts the `rhs` quaternion from `self`. + /// The difference is not guaranteed to be normalized. + fn sub(_self: Val<::glam::Quat>, rhs: Val<::glam::Quat>) -> Val<::glam::Quat> { + let output: Val<::glam::Quat> = <::glam::Quat as ::core::ops::Sub< + ::glam::Quat, + >>::sub(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + /// `[x, y, z, w]` + fn to_array(_self: Ref<::glam::Quat>) -> [f32; 4] { + let output: [f32; 4] = ::glam::Quat::to_array(&_self).into(); + output + } + /// Returns the rotation angles for the given euler rotation sequence. + fn to_euler( + _self: Val<::glam::Quat>, + order: Val<::glam::EulerRot>, + ) -> (f32, f32, f32) { + let output: (f32, f32, f32) = ::glam::Quat::to_euler( + _self.into_inner(), + order.into_inner(), + ) + .into(); + output + } + /// Returns the rotation axis scaled by the rotation in radians. + fn to_scaled_axis(_self: Val<::glam::Quat>) -> Val<::glam::Vec3> { + let output: Val<::glam::Vec3> = ::glam::Quat::to_scaled_axis(_self.into_inner()) + .into(); + output + } + /// Returns the vector part of the quaternion. + fn xyz(_self: Val<::glam::Quat>) -> Val<::glam::Vec3> { + let output: Val<::glam::Vec3> = ::glam::Quat::xyz(_self.into_inner()).into(); + output + } +} +#[script_bindings( + remote, + name = "vec_3_functions", + bms_core_path = "bevy_mod_scripting_core", + generated +)] +impl ::glam::Vec3 { + /// Returns a vector containing the absolute value of each element of `self`. + fn abs(_self: Val<::glam::Vec3>) -> Val<::glam::Vec3> { + let output: Val<::glam::Vec3> = ::glam::Vec3::abs(_self.into_inner()).into(); + output + } + /// Returns true if the absolute difference of all elements between `self` and `rhs` is + /// less than or equal to `max_abs_diff`. + /// This can be used to compare if two vectors contain similar elements. It works best when + /// comparing with a known value. The `max_abs_diff` that should be used used depends on + /// the values being compared against. + /// For more see + /// [comparing floating point numbers](https://randomascii.wordpress.com/2012/02/25/comparing-floating-point-numbers-2012-edition/). + fn abs_diff_eq( + _self: Val<::glam::Vec3>, + rhs: Val<::glam::Vec3>, + max_abs_diff: f32, + ) -> bool { + let output: bool = ::glam::Vec3::abs_diff_eq( + _self.into_inner(), + rhs.into_inner(), + max_abs_diff, + ) + .into(); + output + } + fn add(_self: Val<::glam::Vec3>, rhs: Ref<::glam::Vec3>) -> Val<::glam::Vec3> { + let output: Val<::glam::Vec3> = <::glam::Vec3 as ::core::ops::Add< + &::glam::Vec3, + >>::add(_self.into_inner(), &rhs) + .into(); + output + } + fn add(_self: Val<::glam::Vec3>, rhs: Val<::glam::Vec3>) -> Val<::glam::Vec3> { + let output: Val<::glam::Vec3> = <::glam::Vec3 as ::core::ops::Add< + ::glam::Vec3, + >>::add(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + fn add(_self: Val<::glam::Vec3>, rhs: f32) -> Val<::glam::Vec3> { + let output: Val<::glam::Vec3> = <::glam::Vec3 as ::core::ops::Add< + f32, + >>::add(_self.into_inner(), rhs) + .into(); + output + } + /// Returns the angle (in radians) between two vectors in the range `[0, +π]`. + /// The inputs do not need to be unit vectors however they must be non-zero. + fn angle_between(_self: Val<::glam::Vec3>, rhs: Val<::glam::Vec3>) -> f32 { + let output: f32 = ::glam::Vec3::angle_between( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Returns some vector that is orthogonal to the given one. + /// The input vector must be finite and non-zero. + /// The output vector is not necessarily unit length. For that use + /// [`Self::any_orthonormal_vector()`] instead. + fn any_orthogonal_vector(_self: Ref<::glam::Vec3>) -> Val<::glam::Vec3> { + let output: Val<::glam::Vec3> = ::glam::Vec3::any_orthogonal_vector(&_self) + .into(); + output + } + /// Returns any unit vector that is orthogonal to the given one. + /// The input vector must be unit length. + /// # Panics + /// Will panic if `self` is not normalized when `glam_assert` is enabled. + fn any_orthonormal_vector(_self: Ref<::glam::Vec3>) -> Val<::glam::Vec3> { + let output: Val<::glam::Vec3> = ::glam::Vec3::any_orthonormal_vector(&_self) + .into(); + output + } + /// Casts all elements of `self` to `f64`. + fn as_dvec3(_self: Ref<::glam::Vec3>) -> Val<::glam::DVec3> { + let output: Val<::glam::DVec3> = ::glam::Vec3::as_dvec3(&_self).into(); + output + } + /// Casts all elements of `self` to `i16`. + fn as_i16vec3(_self: Ref<::glam::Vec3>) -> Val<::glam::I16Vec3> { + let output: Val<::glam::I16Vec3> = ::glam::Vec3::as_i16vec3(&_self).into(); + output + } + /// Casts all elements of `self` to `i64`. + fn as_i64vec3(_self: Ref<::glam::Vec3>) -> Val<::glam::I64Vec3> { + let output: Val<::glam::I64Vec3> = ::glam::Vec3::as_i64vec3(&_self).into(); + output + } + /// Casts all elements of `self` to `i8`. + fn as_i8vec3(_self: Ref<::glam::Vec3>) -> Val<::glam::I8Vec3> { + let output: Val<::glam::I8Vec3> = ::glam::Vec3::as_i8vec3(&_self).into(); + output + } + /// Casts all elements of `self` to `i32`. + fn as_ivec3(_self: Ref<::glam::Vec3>) -> Val<::glam::IVec3> { + let output: Val<::glam::IVec3> = ::glam::Vec3::as_ivec3(&_self).into(); + output + } + /// Casts all elements of `self` to `u16`. + fn as_u16vec3(_self: Ref<::glam::Vec3>) -> Val<::glam::U16Vec3> { + let output: Val<::glam::U16Vec3> = ::glam::Vec3::as_u16vec3(&_self).into(); + output + } + /// Casts all elements of `self` to `u64`. + fn as_u64vec3(_self: Ref<::glam::Vec3>) -> Val<::glam::U64Vec3> { + let output: Val<::glam::U64Vec3> = ::glam::Vec3::as_u64vec3(&_self).into(); + output + } + /// Casts all elements of `self` to `u8`. + fn as_u8vec3(_self: Ref<::glam::Vec3>) -> Val<::glam::U8Vec3> { + let output: Val<::glam::U8Vec3> = ::glam::Vec3::as_u8vec3(&_self).into(); + output + } + /// Casts all elements of `self` to `u32`. + fn as_uvec3(_self: Ref<::glam::Vec3>) -> Val<::glam::UVec3> { + let output: Val<::glam::UVec3> = ::glam::Vec3::as_uvec3(&_self).into(); + output + } + /// Returns a vector containing the smallest integer greater than or equal to a number for + /// each element of `self`. + fn ceil(_self: Val<::glam::Vec3>) -> Val<::glam::Vec3> { + let output: Val<::glam::Vec3> = ::glam::Vec3::ceil(_self.into_inner()).into(); + output + } + /// Component-wise clamping of values, similar to [`f32::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<::glam::Vec3>, + min: Val<::glam::Vec3>, + max: Val<::glam::Vec3>, + ) -> Val<::glam::Vec3> { + let output: Val<::glam::Vec3> = ::glam::Vec3::clamp( + _self.into_inner(), + min.into_inner(), + max.into_inner(), + ) + .into(); + output + } + /// Returns a vector with a length no less than `min` and no more than `max`. + /// # Panics + /// Will panic if `min` is greater than `max`, or if either `min` or `max` is negative, when `glam_assert` is enabled. + fn clamp_length(_self: Val<::glam::Vec3>, min: f32, max: f32) -> Val<::glam::Vec3> { + let output: Val<::glam::Vec3> = ::glam::Vec3::clamp_length( + _self.into_inner(), + min, + max, + ) + .into(); + output + } + /// Returns a vector with a length no more than `max`. + /// # Panics + /// Will panic if `max` is negative when `glam_assert` is enabled. + fn clamp_length_max(_self: Val<::glam::Vec3>, max: f32) -> Val<::glam::Vec3> { + let output: Val<::glam::Vec3> = ::glam::Vec3::clamp_length_max( + _self.into_inner(), + max, + ) + .into(); + output + } + /// Returns a vector with a length no less than `min`. + /// # Panics + /// Will panic if `min` is negative when `glam_assert` is enabled. + fn clamp_length_min(_self: Val<::glam::Vec3>, min: f32) -> Val<::glam::Vec3> { + let output: Val<::glam::Vec3> = ::glam::Vec3::clamp_length_min( + _self.into_inner(), + min, + ) + .into(); + output + } + fn clone(_self: Ref<::glam::Vec3>) -> Val<::glam::Vec3> { + let output: Val<::glam::Vec3> = <::glam::Vec3 as ::bevy_reflect::erased_serde::__private::serde::__private::Clone>::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<::glam::Vec3>, rhs: Val<::glam::Vec3>) -> Val<::glam::BVec3> { + let output: Val<::glam::BVec3> = ::glam::Vec3::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<::glam::Vec3>, rhs: Val<::glam::Vec3>) -> Val<::glam::BVec3> { + let output: Val<::glam::BVec3> = ::glam::Vec3::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<::glam::Vec3>, rhs: Val<::glam::Vec3>) -> Val<::glam::BVec3> { + let output: Val<::glam::BVec3> = ::glam::Vec3::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<::glam::Vec3>, rhs: Val<::glam::Vec3>) -> Val<::glam::BVec3> { + let output: Val<::glam::BVec3> = ::glam::Vec3::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<::glam::Vec3>, rhs: Val<::glam::Vec3>) -> Val<::glam::BVec3> { + let output: Val<::glam::BVec3> = ::glam::Vec3::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<::glam::Vec3>, rhs: Val<::glam::Vec3>) -> Val<::glam::BVec3> { + let output: Val<::glam::BVec3> = ::glam::Vec3::cmpne( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Returns a vector with signs of `rhs` and the magnitudes of `self`. + fn copysign(_self: Val<::glam::Vec3>, rhs: Val<::glam::Vec3>) -> Val<::glam::Vec3> { + let output: Val<::glam::Vec3> = ::glam::Vec3::copysign( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Computes the cross product of `self` and `rhs`. + fn cross(_self: Val<::glam::Vec3>, rhs: Val<::glam::Vec3>) -> Val<::glam::Vec3> { + let output: Val<::glam::Vec3> = ::glam::Vec3::cross( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Computes the Euclidean distance between two points in space. + fn distance(_self: Val<::glam::Vec3>, rhs: Val<::glam::Vec3>) -> f32 { + let output: f32 = ::glam::Vec3::distance(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + /// Compute the squared euclidean distance between two points in space. + fn distance_squared(_self: Val<::glam::Vec3>, rhs: Val<::glam::Vec3>) -> f32 { + let output: f32 = ::glam::Vec3::distance_squared( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + fn div(_self: Val<::glam::Vec3>, rhs: Ref<::glam::Vec3>) -> Val<::glam::Vec3> { + let output: Val<::glam::Vec3> = <::glam::Vec3 as ::core::ops::Div< + &::glam::Vec3, + >>::div(_self.into_inner(), &rhs) + .into(); + output + } + fn div(_self: Val<::glam::Vec3>, rhs: Val<::glam::Vec3>) -> Val<::glam::Vec3> { + let output: Val<::glam::Vec3> = <::glam::Vec3 as ::core::ops::Div< + ::glam::Vec3, + >>::div(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + fn div(_self: Val<::glam::Vec3>, rhs: f32) -> Val<::glam::Vec3> { + let output: Val<::glam::Vec3> = <::glam::Vec3 as ::core::ops::Div< + f32, + >>::div(_self.into_inner(), rhs) + .into(); + output + } + /// Returns the element-wise quotient of [Euclidean division] of `self` by `rhs`. + fn div_euclid( + _self: Val<::glam::Vec3>, + rhs: Val<::glam::Vec3>, + ) -> Val<::glam::Vec3> { + let output: Val<::glam::Vec3> = ::glam::Vec3::div_euclid( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Computes the dot product of `self` and `rhs`. + fn dot(_self: Val<::glam::Vec3>, rhs: Val<::glam::Vec3>) -> f32 { + let output: f32 = ::glam::Vec3::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<::glam::Vec3>, + rhs: Val<::glam::Vec3>, + ) -> Val<::glam::Vec3> { + let output: Val<::glam::Vec3> = ::glam::Vec3::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<::glam::Vec3>) -> f32 { + let output: f32 = ::glam::Vec3::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<::glam::Vec3>) -> f32 { + let output: f32 = ::glam::Vec3::element_sum(_self.into_inner()).into(); + output + } + fn eq(_self: Ref<::glam::Vec3>, other: Ref<::glam::Vec3>) -> bool { + let output: bool = <::glam::Vec3 as ::core::cmp::PartialEq< + ::glam::Vec3, + >>::eq(&_self, &other) + .into(); + output + } + /// Returns a vector containing `e^self` (the exponential function) for each element of + /// `self`. + fn exp(_self: Val<::glam::Vec3>) -> Val<::glam::Vec3> { + let output: Val<::glam::Vec3> = ::glam::Vec3::exp(_self.into_inner()).into(); + output + } + /// Creates a 4D vector from `self` and the given `w` value. + fn extend(_self: Val<::glam::Vec3>, w: f32) -> Val<::glam::Vec4> { + let output: Val<::glam::Vec4> = ::glam::Vec3::extend(_self.into_inner(), w) + .into(); + output + } + /// Returns a vector containing the largest integer less than or equal to a number for each + /// element of `self`. + fn floor(_self: Val<::glam::Vec3>) -> Val<::glam::Vec3> { + let output: Val<::glam::Vec3> = ::glam::Vec3::floor(_self.into_inner()).into(); + output + } + /// Returns a vector containing the fractional part of the vector as `self - self.trunc()`. + /// Note that this differs from the GLSL implementation of `fract` which returns + /// `self - self.floor()`. + /// Note that this is fast but not precise for large numbers. + fn fract(_self: Val<::glam::Vec3>) -> Val<::glam::Vec3> { + let output: Val<::glam::Vec3> = ::glam::Vec3::fract(_self.into_inner()).into(); + output + } + /// Returns a vector containing the fractional part of the vector as `self - self.floor()`. + /// Note that this differs from the Rust implementation of `fract` which returns + /// `self - self.trunc()`. + /// Note that this is fast but not precise for large numbers. + fn fract_gl(_self: Val<::glam::Vec3>) -> Val<::glam::Vec3> { + let output: Val<::glam::Vec3> = ::glam::Vec3::fract_gl(_self.into_inner()) + .into(); + output + } + /// Creates a new vector from an array. + fn from_array(a: [f32; 3]) -> Val<::glam::Vec3> { + let output: Val<::glam::Vec3> = ::glam::Vec3::from_array(a).into(); + output + } + /// Returns `true` if, and only if, all elements are finite. If any element is either + /// `NaN`, positive or negative infinity, this will return `false`. + fn is_finite(_self: Val<::glam::Vec3>) -> bool { + let output: bool = ::glam::Vec3::is_finite(_self.into_inner()).into(); + output + } + /// Performs `is_finite` on each element of self, returning a vector mask of the results. + /// In other words, this computes `[x.is_finite(), y.is_finite(), ...]`. + fn is_finite_mask(_self: Val<::glam::Vec3>) -> Val<::glam::BVec3> { + let output: Val<::glam::BVec3> = ::glam::Vec3::is_finite_mask(_self.into_inner()) + .into(); + output + } + /// Returns `true` if any elements are `NaN`. + fn is_nan(_self: Val<::glam::Vec3>) -> bool { + let output: bool = ::glam::Vec3::is_nan(_self.into_inner()).into(); + output + } + /// Performs `is_nan` on each element of self, returning a vector mask of the results. + /// In other words, this computes `[x.is_nan(), y.is_nan(), ...]`. + fn is_nan_mask(_self: Val<::glam::Vec3>) -> Val<::glam::BVec3> { + let output: Val<::glam::BVec3> = ::glam::Vec3::is_nan_mask(_self.into_inner()) + .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<::glam::Vec3>) -> u32 { + let output: u32 = ::glam::Vec3::is_negative_bitmask(_self.into_inner()).into(); + output + } + /// Returns whether `self` is length `1.0` or not. + /// Uses a precision threshold of approximately `1e-4`. + fn is_normalized(_self: Val<::glam::Vec3>) -> bool { + let output: bool = ::glam::Vec3::is_normalized(_self.into_inner()).into(); + output + } + /// Computes the length of `self`. + fn length(_self: Val<::glam::Vec3>) -> f32 { + let output: f32 = ::glam::Vec3::length(_self.into_inner()).into(); + output + } + /// Computes `1.0 / length()`. + /// For valid results, `self` must _not_ be of length zero. + fn length_recip(_self: Val<::glam::Vec3>) -> f32 { + let output: f32 = ::glam::Vec3::length_recip(_self.into_inner()).into(); + output + } + /// Computes the squared length of `self`. + /// This is faster than `length()` as it avoids a square root operation. + fn length_squared(_self: Val<::glam::Vec3>) -> f32 { + let output: f32 = ::glam::Vec3::length_squared(_self.into_inner()).into(); + output + } + /// Performs a linear interpolation between `self` and `rhs` based on the value `s`. + /// When `s` is `0.0`, the result will be equal to `self`. When `s` is `1.0`, the result + /// will be equal to `rhs`. When `s` is outside of range `[0, 1]`, the result is linearly + /// extrapolated. + fn lerp( + _self: Val<::glam::Vec3>, + rhs: Val<::glam::Vec3>, + s: f32, + ) -> Val<::glam::Vec3> { + let output: Val<::glam::Vec3> = ::glam::Vec3::lerp( + _self.into_inner(), + rhs.into_inner(), + s, + ) + .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<::glam::Vec3>, rhs: Val<::glam::Vec3>) -> Val<::glam::Vec3> { + let output: Val<::glam::Vec3> = ::glam::Vec3::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<::glam::Vec3>) -> f32 { + let output: f32 = ::glam::Vec3::max_element(_self.into_inner()).into(); + output + } + /// Calculates the midpoint between `self` and `rhs`. + /// The midpoint is the average of, or halfway point between, two vectors. + /// `a.midpoint(b)` should yield the same result as `a.lerp(b, 0.5)` + /// while being slightly cheaper to compute. + fn midpoint(_self: Val<::glam::Vec3>, rhs: Val<::glam::Vec3>) -> Val<::glam::Vec3> { + let output: Val<::glam::Vec3> = ::glam::Vec3::midpoint( + _self.into_inner(), + rhs.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<::glam::Vec3>, rhs: Val<::glam::Vec3>) -> Val<::glam::Vec3> { + let output: Val<::glam::Vec3> = ::glam::Vec3::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<::glam::Vec3>) -> f32 { + let output: f32 = ::glam::Vec3::min_element(_self.into_inner()).into(); + output + } + /// Moves towards `rhs` based on the value `d`. + /// When `d` is `0.0`, the result will be equal to `self`. When `d` is equal to + /// `self.distance(rhs)`, the result will be equal to `rhs`. Will not go past `rhs`. + fn move_towards( + _self: Ref<::glam::Vec3>, + rhs: Val<::glam::Vec3>, + d: f32, + ) -> Val<::glam::Vec3> { + let output: Val<::glam::Vec3> = ::glam::Vec3::move_towards( + &_self, + rhs.into_inner(), + d, + ) + .into(); + output + } + fn mul(_self: Val<::glam::Vec3>, rhs: Ref<::glam::Vec3>) -> Val<::glam::Vec3> { + let output: Val<::glam::Vec3> = <::glam::Vec3 as ::core::ops::Mul< + &::glam::Vec3, + >>::mul(_self.into_inner(), &rhs) + .into(); + output + } + fn mul(_self: Val<::glam::Vec3>, rhs: Val<::glam::Vec3>) -> Val<::glam::Vec3> { + let output: Val<::glam::Vec3> = <::glam::Vec3 as ::core::ops::Mul< + ::glam::Vec3, + >>::mul(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + fn mul(_self: Val<::glam::Vec3>, rhs: f32) -> Val<::glam::Vec3> { + let output: Val<::glam::Vec3> = <::glam::Vec3 as ::core::ops::Mul< + f32, + >>::mul(_self.into_inner(), rhs) + .into(); + output + } + /// Fused multiply-add. Computes `(self * a) + b` element-wise with only one rounding + /// error, yielding a more accurate result than an unfused multiply-add. + /// Using `mul_add` *may* be more performant than an unfused multiply-add if the target + /// architecture has a dedicated fma CPU instruction. However, this is not always true, + /// and will be heavily dependant on designing algorithms with specific target hardware in + /// mind. + fn mul_add( + _self: Val<::glam::Vec3>, + a: Val<::glam::Vec3>, + b: Val<::glam::Vec3>, + ) -> Val<::glam::Vec3> { + let output: Val<::glam::Vec3> = ::glam::Vec3::mul_add( + _self.into_inner(), + a.into_inner(), + b.into_inner(), + ) + .into(); + output + } + fn neg(_self: Val<::glam::Vec3>) -> Val<::glam::Vec3> { + let output: Val<::glam::Vec3> = <::glam::Vec3 as ::core::ops::Neg>::neg( + _self.into_inner(), + ) + .into(); + output + } + /// Creates a new vector. + fn new(x: f32, y: f32, z: f32) -> Val<::glam::Vec3> { + let output: Val<::glam::Vec3> = ::glam::Vec3::new(x, y, z).into(); + output + } + /// Returns `self` normalized to length 1.0. + /// For valid results, `self` must be finite and _not_ of length zero, nor very close to zero. + /// See also [`Self::try_normalize()`] and [`Self::normalize_or_zero()`]. + /// Panics + /// Will panic if the resulting normalized vector is not finite when `glam_assert` is enabled. + fn normalize(_self: Val<::glam::Vec3>) -> Val<::glam::Vec3> { + let output: Val<::glam::Vec3> = ::glam::Vec3::normalize(_self.into_inner()) + .into(); + output + } + /// Returns `self` normalized to length 1.0 if possible, else returns a + /// fallback value. + /// In particular, if the input is zero (or very close to zero), or non-finite, + /// the result of this operation will be the fallback value. + /// See also [`Self::try_normalize()`]. + fn normalize_or( + _self: Val<::glam::Vec3>, + fallback: Val<::glam::Vec3>, + ) -> Val<::glam::Vec3> { + let output: Val<::glam::Vec3> = ::glam::Vec3::normalize_or( + _self.into_inner(), + fallback.into_inner(), + ) + .into(); + output + } + /// Returns `self` normalized to length 1.0 if possible, else returns zero. + /// In particular, if the input is zero (or very close to zero), or non-finite, + /// the result of this operation will be zero. + /// See also [`Self::try_normalize()`]. + fn normalize_or_zero(_self: Val<::glam::Vec3>) -> Val<::glam::Vec3> { + let output: Val<::glam::Vec3> = ::glam::Vec3::normalize_or_zero( + _self.into_inner(), + ) + .into(); + output + } + /// Returns a vector containing each element of `self` raised to the power of `n`. + fn powf(_self: Val<::glam::Vec3>, n: f32) -> Val<::glam::Vec3> { + let output: Val<::glam::Vec3> = ::glam::Vec3::powf(_self.into_inner(), n).into(); + output + } + /// Returns the vector projection of `self` onto `rhs`. + /// `rhs` must be of non-zero length. + /// # Panics + /// Will panic if `rhs` is zero length when `glam_assert` is enabled. + fn project_onto( + _self: Val<::glam::Vec3>, + rhs: Val<::glam::Vec3>, + ) -> Val<::glam::Vec3> { + let output: Val<::glam::Vec3> = ::glam::Vec3::project_onto( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Returns the vector projection of `self` onto `rhs`. + /// `rhs` must be normalized. + /// # Panics + /// Will panic if `rhs` is not normalized when `glam_assert` is enabled. + fn project_onto_normalized( + _self: Val<::glam::Vec3>, + rhs: Val<::glam::Vec3>, + ) -> Val<::glam::Vec3> { + let output: Val<::glam::Vec3> = ::glam::Vec3::project_onto_normalized( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Returns a vector containing the reciprocal `1.0/n` of each element of `self`. + fn recip(_self: Val<::glam::Vec3>) -> Val<::glam::Vec3> { + let output: Val<::glam::Vec3> = ::glam::Vec3::recip(_self.into_inner()).into(); + output + } + /// Returns the reflection vector for a given incident vector `self` and surface normal + /// `normal`. + /// `normal` must be normalized. + /// # Panics + /// Will panic if `normal` is not normalized when `glam_assert` is enabled. + fn reflect( + _self: Val<::glam::Vec3>, + normal: Val<::glam::Vec3>, + ) -> Val<::glam::Vec3> { + let output: Val<::glam::Vec3> = ::glam::Vec3::reflect( + _self.into_inner(), + normal.into_inner(), + ) + .into(); + output + } + /// Returns the refraction direction for a given incident vector `self`, surface normal + /// `normal` and ratio of indices of refraction, `eta`. When total internal reflection occurs, + /// a zero vector will be returned. + /// `self` and `normal` must be normalized. + /// # Panics + /// Will panic if `self` or `normal` is not normalized when `glam_assert` is enabled. + fn refract( + _self: Val<::glam::Vec3>, + normal: Val<::glam::Vec3>, + eta: f32, + ) -> Val<::glam::Vec3> { + let output: Val<::glam::Vec3> = ::glam::Vec3::refract( + _self.into_inner(), + normal.into_inner(), + eta, + ) + .into(); + output + } + /// Returns the vector rejection of `self` from `rhs`. + /// The vector rejection is the vector perpendicular to the projection of `self` onto + /// `rhs`, in rhs words the result of `self - self.project_onto(rhs)`. + /// `rhs` must be of non-zero length. + /// # Panics + /// Will panic if `rhs` has a length of zero when `glam_assert` is enabled. + fn reject_from( + _self: Val<::glam::Vec3>, + rhs: Val<::glam::Vec3>, + ) -> Val<::glam::Vec3> { + let output: Val<::glam::Vec3> = ::glam::Vec3::reject_from( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Returns the vector rejection of `self` from `rhs`. + /// The vector rejection is the vector perpendicular to the projection of `self` onto + /// `rhs`, in rhs words the result of `self - self.project_onto(rhs)`. + /// `rhs` must be normalized. + /// # Panics + /// Will panic if `rhs` is not normalized when `glam_assert` is enabled. + fn reject_from_normalized( + _self: Val<::glam::Vec3>, + rhs: Val<::glam::Vec3>, + ) -> Val<::glam::Vec3> { + let output: Val<::glam::Vec3> = ::glam::Vec3::reject_from_normalized( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + fn rem(_self: Val<::glam::Vec3>, rhs: Ref<::glam::Vec3>) -> Val<::glam::Vec3> { + let output: Val<::glam::Vec3> = <::glam::Vec3 as ::core::ops::Rem< + &::glam::Vec3, + >>::rem(_self.into_inner(), &rhs) + .into(); + output + } + fn rem(_self: Val<::glam::Vec3>, rhs: Val<::glam::Vec3>) -> Val<::glam::Vec3> { + let output: Val<::glam::Vec3> = <::glam::Vec3 as ::core::ops::Rem< + ::glam::Vec3, + >>::rem(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + fn rem(_self: Val<::glam::Vec3>, rhs: f32) -> Val<::glam::Vec3> { + let output: Val<::glam::Vec3> = <::glam::Vec3 as ::core::ops::Rem< + f32, + >>::rem(_self.into_inner(), rhs) + .into(); + output + } + /// Returns the element-wise remainder of [Euclidean division] of `self` by `rhs`. + /// [Euclidean division]: f32::rem_euclid + fn rem_euclid( + _self: Val<::glam::Vec3>, + rhs: Val<::glam::Vec3>, + ) -> Val<::glam::Vec3> { + let output: Val<::glam::Vec3> = ::glam::Vec3::rem_euclid( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Returns a vector containing the nearest integer to a number for each element of `self`. + /// Round half-way cases away from 0.0. + fn round(_self: Val<::glam::Vec3>) -> Val<::glam::Vec3> { + let output: Val<::glam::Vec3> = ::glam::Vec3::round(_self.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<::glam::BVec3>, + if_true: Val<::glam::Vec3>, + if_false: Val<::glam::Vec3>, + ) -> Val<::glam::Vec3> { + let output: Val<::glam::Vec3> = ::glam::Vec3::select( + mask.into_inner(), + if_true.into_inner(), + if_false.into_inner(), + ) + .into(); + output + } + /// Returns a vector with elements representing the sign of `self`. + /// - `1.0` if the number is positive, `+0.0` or `INFINITY` + /// - `-1.0` if the number is negative, `-0.0` or `NEG_INFINITY` + /// - `NAN` if the number is `NAN` + fn signum(_self: Val<::glam::Vec3>) -> Val<::glam::Vec3> { + let output: Val<::glam::Vec3> = ::glam::Vec3::signum(_self.into_inner()).into(); + output + } + /// Creates a vector with all elements set to `v`. + fn splat(v: f32) -> Val<::glam::Vec3> { + let output: Val<::glam::Vec3> = ::glam::Vec3::splat(v).into(); + output + } + fn sub(_self: Val<::glam::Vec3>, rhs: Ref<::glam::Vec3>) -> Val<::glam::Vec3> { + let output: Val<::glam::Vec3> = <::glam::Vec3 as ::core::ops::Sub< + &::glam::Vec3, + >>::sub(_self.into_inner(), &rhs) + .into(); + output + } + fn sub(_self: Val<::glam::Vec3>, rhs: Val<::glam::Vec3>) -> Val<::glam::Vec3> { + let output: Val<::glam::Vec3> = <::glam::Vec3 as ::core::ops::Sub< + ::glam::Vec3, + >>::sub(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + fn sub(_self: Val<::glam::Vec3>, rhs: f32) -> Val<::glam::Vec3> { + let output: Val<::glam::Vec3> = <::glam::Vec3 as ::core::ops::Sub< + f32, + >>::sub(_self.into_inner(), rhs) + .into(); + output + } + /// `[x, y, z]` + fn to_array(_self: Ref<::glam::Vec3>) -> [f32; 3] { + let output: [f32; 3] = ::glam::Vec3::to_array(&_self).into(); + output + } + /// Returns a vector containing the integer part each element of `self`. This means numbers are + /// always truncated towards zero. + fn trunc(_self: Val<::glam::Vec3>) -> Val<::glam::Vec3> { + let output: Val<::glam::Vec3> = ::glam::Vec3::trunc(_self.into_inner()).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<::glam::Vec3>) -> Val<::glam::Vec2> { + let output: Val<::glam::Vec2> = ::glam::Vec3::truncate(_self.into_inner()) + .into(); + output + } + /// Creates a 3D vector from `self` with the given value of `x`. + fn with_x(_self: Val<::glam::Vec3>, x: f32) -> Val<::glam::Vec3> { + let output: Val<::glam::Vec3> = ::glam::Vec3::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<::glam::Vec3>, y: f32) -> Val<::glam::Vec3> { + let output: Val<::glam::Vec3> = ::glam::Vec3::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<::glam::Vec3>, z: f32) -> Val<::glam::Vec3> { + let output: Val<::glam::Vec3> = ::glam::Vec3::with_z(_self.into_inner(), z) + .into(); + 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, - >::new(world) - .register_documented( - "assert_receiver_is_total_eq", - |_self: Ref<::core::net::SocketAddr>| { - let output: () = { - { - let output: () = <::core::net::SocketAddr as ::core::cmp::Eq>::assert_receiver_is_total_eq( - &_self, - ) - .into(); - output - } - }; - output - }, - "", - &["_self"], - ) - .register_documented( - "clone", - |_self: Ref<::core::net::SocketAddr>| { - let output: 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 - } - }; - output - }, - "", - &["_self"], - ) - .register_documented( - "eq", - | - _self: Ref<::core::net::SocketAddr>, - other: Ref<::core::net::SocketAddr>| - { - let output: bool = { - { - let output: bool = <::core::net::SocketAddr as ::core::cmp::PartialEq< - ::core::net::SocketAddr, - >>::eq(&_self, &other) - .into(); - output - } - }; - output - }, - "", - &["_self", "other"], - ) - .register_documented( - "is_ipv4", - |_self: Ref<::core::net::SocketAddr>| { - let output: bool = { - { - let output: bool = ::core::net::SocketAddr::is_ipv4(&_self) - .into(); - output - } - }; - output - }, - " Returns [`true`] if the [IP address] in this `SocketAddr` is an\n [`IPv4` address], and [`false`] otherwise.\n [IP address]: IpAddr\n [`IPv4` address]: IpAddr::V4\n # Examples\n ```\n use std::net::{IpAddr, Ipv4Addr, SocketAddr};\n let socket = SocketAddr::new(IpAddr::V4(Ipv4Addr::new(127, 0, 0, 1)), 8080);\n assert_eq!(socket.is_ipv4(), true);\n assert_eq!(socket.is_ipv6(), false);\n ```", - &["_self"], - ) - .register_documented( - "is_ipv6", - |_self: Ref<::core::net::SocketAddr>| { - let output: bool = { - { - let output: bool = ::core::net::SocketAddr::is_ipv6(&_self) - .into(); - output - } - }; - output - }, - " Returns [`true`] if the [IP address] in this `SocketAddr` is an\n [`IPv6` address], and [`false`] otherwise.\n [IP address]: IpAddr\n [`IPv6` address]: IpAddr::V6\n # Examples\n ```\n use std::net::{IpAddr, Ipv6Addr, SocketAddr};\n let socket = SocketAddr::new(IpAddr::V6(Ipv6Addr::new(0, 0, 0, 0, 0, 65535, 0, 1)), 8080);\n assert_eq!(socket.is_ipv4(), false);\n assert_eq!(socket.is_ipv6(), true);\n ```", - &["_self"], - ) - .register_documented( - "port", - |_self: Ref<::core::net::SocketAddr>| { - let output: u16 = { - { - let output: u16 = ::core::net::SocketAddr::port(&_self) - .into(); - output - } - }; - output - }, - " Returns the port number associated with this socket address.\n # Examples\n ```\n use std::net::{IpAddr, Ipv4Addr, SocketAddr};\n let socket = SocketAddr::new(IpAddr::V4(Ipv4Addr::new(127, 0, 0, 1)), 8080);\n assert_eq!(socket.port(), 8080);\n ```", - &["_self"], - ) - .register_documented( - "set_port", - |mut _self: Mut<::core::net::SocketAddr>, new_port: u16| { - let output: () = { - { - let output: () = ::core::net::SocketAddr::set_port( - &mut _self, - new_port, - ) - .into(); - output - } - }; - output - }, - " Changes the port number associated with this socket address.\n # Examples\n ```\n use std::net::{IpAddr, Ipv4Addr, SocketAddr};\n let mut socket = SocketAddr::new(IpAddr::V4(Ipv4Addr::new(127, 0, 0, 1)), 8080);\n socket.set_port(1025);\n assert_eq!(socket.port(), 1025);\n ```", - &["_self", "new_port"], - ); - let registry = world - .get_resource_or_init::(); - let mut registry = registry.write(); - registry - .register_type_data::< - ::core::net::SocketAddr, - bevy_mod_scripting_core::bindings::MarkAsGenerated, - >(); - } - pub(crate) fn register_i_vec_2_functions(world: &mut bevy::ecs::world::World) { - bevy_mod_scripting_core::bindings::function::namespace::NamespaceBuilder::< - bevy::math::IVec2, - >::new(world) - .register_documented( - "abs", - |_self: Val| { - let output: Val = { - { - let output: Val = bevy::math::IVec2::abs( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector containing the absolute value of each element of `self`.", - &["_self"], - ) - .register_documented( - "add", - |_self: Val, rhs: Ref| { - let output: Val = { - { - let output: Val = >::add(_self.into_inner(), &rhs) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "add", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = >::add(_self.into_inner(), rhs.into_inner()) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "add", - |_self: Val, rhs: i32| { - let output: Val = { - { - let output: Val = >::add(_self.into_inner(), rhs) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "as_dvec2", - |_self: Ref| { - let output: Val = { - { - let output: Val = bevy::math::IVec2::as_dvec2( - &_self, - ) - .into(); - output - } - }; - output - }, - " Casts all elements of `self` to `f64`.", - &["_self"], - ) - .register_documented( - "as_i16vec2", - |_self: Ref| { - let output: Val = { - { - let output: Val = bevy::math::IVec2::as_i16vec2( - &_self, - ) - .into(); - output - } - }; - output - }, - " Casts all elements of `self` to `i16`.", - &["_self"], - ) - .register_documented( - "as_i64vec2", - |_self: Ref| { - let output: Val = { - { - let output: Val = bevy::math::IVec2::as_i64vec2( - &_self, - ) - .into(); - output - } - }; - output - }, - " Casts all elements of `self` to `i64`.", - &["_self"], - ) - .register_documented( - "as_i8vec2", - |_self: Ref| { - let output: Val = { - { - let output: Val = bevy::math::IVec2::as_i8vec2( - &_self, - ) - .into(); - output - } - }; - output - }, - " Casts all elements of `self` to `i8`.", - &["_self"], - ) - .register_documented( - "as_u16vec2", - |_self: Ref| { - let output: Val = { - { - let output: Val = bevy::math::IVec2::as_u16vec2( - &_self, - ) - .into(); - output - } - }; - output - }, - " Casts all elements of `self` to `u16`.", - &["_self"], - ) - .register_documented( - "as_u64vec2", - |_self: Ref| { - let output: Val = { - { - let output: Val = bevy::math::IVec2::as_u64vec2( - &_self, - ) - .into(); - output - } - }; - output - }, - " Casts all elements of `self` to `u64`.", - &["_self"], - ) - .register_documented( - "as_u8vec2", - |_self: Ref| { - let output: Val = { - { - let output: Val = bevy::math::IVec2::as_u8vec2( - &_self, - ) - .into(); - output - } - }; - output - }, - " Casts all elements of `self` to `u8`.", - &["_self"], - ) - .register_documented( - "as_uvec2", - |_self: Ref| { - let output: Val = { - { - let output: Val = bevy::math::IVec2::as_uvec2( - &_self, - ) - .into(); - output - } - }; - output - }, - " Casts all elements of `self` to `u32`.", - &["_self"], - ) - .register_documented( - "as_vec2", - |_self: Ref| { - let output: Val = { - { - let output: Val = bevy::math::IVec2::as_vec2( - &_self, - ) - .into(); - output - } - }; - output - }, - " Casts all elements of `self` to `f32`.", - &["_self"], - ) - .register_documented( - "assert_receiver_is_total_eq", - |_self: Ref| { - let output: () = { - { - let output: () = ::assert_receiver_is_total_eq( - &_self, - ) - .into(); - output - } - }; - output - }, - "", - &["_self"], - ) - .register_documented( - "clamp", - | - _self: Val, - min: Val, - max: Val| - { - let output: Val = { - { - let output: Val = bevy::math::IVec2::clamp( - _self.into_inner(), - min.into_inner(), - max.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Component-wise clamping of values, similar to [`i32::clamp`].\n Each element in `min` must be less-or-equal to the corresponding element in `max`.\n # Panics\n Will panic if `min` is greater than `max` when `glam_assert` is enabled.", - &["_self", "min", "max"], - ) - .register_documented( - "clone", - |_self: Ref| { - let output: Val = { - { - let output: Val = ::clone( - &_self, - ) - .into(); - output - } - }; - output - }, - "", - &["_self"], - ) - .register_documented( - "cmpeq", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::IVec2::cmpeq( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector mask containing the result of a `==` comparison for each element of\n `self` and `rhs`.\n In other words, this computes `[self.x == rhs.x, self.y == rhs.y, ..]` for all\n elements.", - &["_self", "rhs"], - ) - .register_documented( - "cmpge", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::IVec2::cmpge( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector mask containing the result of a `>=` comparison for each element of\n `self` and `rhs`.\n In other words this computes `[self.x >= rhs.x, self.y >= rhs.y, ..]` for all\n elements.", - &["_self", "rhs"], - ) - .register_documented( - "cmpgt", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::IVec2::cmpgt( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector mask containing the result of a `>` comparison for each element of\n `self` and `rhs`.\n In other words this computes `[self.x > rhs.x, self.y > rhs.y, ..]` for all\n elements.", - &["_self", "rhs"], - ) - .register_documented( - "cmple", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::IVec2::cmple( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector mask containing the result of a `<=` comparison for each element of\n `self` and `rhs`.\n In other words this computes `[self.x <= rhs.x, self.y <= rhs.y, ..]` for all\n elements.", - &["_self", "rhs"], - ) - .register_documented( - "cmplt", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::IVec2::cmplt( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector mask containing the result of a `<` comparison for each element of\n `self` and `rhs`.\n In other words this computes `[self.x < rhs.x, self.y < rhs.y, ..]` for all\n elements.", - &["_self", "rhs"], - ) - .register_documented( - "cmpne", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::IVec2::cmpne( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector mask containing the result of a `!=` comparison for each element of\n `self` and `rhs`.\n In other words this computes `[self.x != rhs.x, self.y != rhs.y, ..]` for all\n elements.", - &["_self", "rhs"], - ) - .register_documented( - "distance_squared", - |_self: Val, rhs: Val| { - let output: i32 = { - { - let output: i32 = bevy::math::IVec2::distance_squared( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Compute the squared euclidean distance between two points in space.", - &["_self", "rhs"], - ) - .register_documented( - "div", - |_self: Val, rhs: Ref| { - let output: Val = { - { - let output: Val = >::div(_self.into_inner(), &rhs) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "div", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = >::div(_self.into_inner(), rhs.into_inner()) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "div", - |_self: Val, rhs: i32| { - let output: Val = { - { - let output: Val = >::div(_self.into_inner(), rhs) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "div_euclid", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::IVec2::div_euclid( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns the element-wise quotient of [Euclidean division] of `self` by `rhs`.\n # Panics\n This function will panic if any `rhs` element is 0 or the division results in overflow.", - &["_self", "rhs"], - ) - .register_documented( - "dot", - |_self: Val, rhs: Val| { - let output: i32 = { - { - let output: i32 = bevy::math::IVec2::dot( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Computes the dot product of `self` and `rhs`.", - &["_self", "rhs"], - ) - .register_documented( - "dot_into_vec", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::IVec2::dot_into_vec( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector where every component is the dot product of `self` and `rhs`.", - &["_self", "rhs"], - ) - .register_documented( - "element_product", - |_self: Val| { - let output: i32 = { - { - let output: i32 = bevy::math::IVec2::element_product( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns the product of all elements of `self`.\n In other words, this computes `self.x * self.y * ..`.", - &["_self"], - ) - .register_documented( - "element_sum", - |_self: Val| { - let output: i32 = { - { - let output: i32 = bevy::math::IVec2::element_sum( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns the sum of all elements of `self`.\n In other words, this computes `self.x + self.y + ..`.", - &["_self"], - ) - .register_documented( - "eq", - |_self: Ref, other: Ref| { - let output: bool = { - { - let output: bool = >::eq(&_self, &other) - .into(); - output - } - }; - output - }, - "", - &["_self", "other"], - ) - .register_documented( - "extend", - |_self: Val, z: i32| { - let output: Val = { - { - let output: Val = bevy::math::IVec2::extend( - _self.into_inner(), - z, - ) - .into(); - output - } - }; - output - }, - " Creates a 3D vector from `self` and the given `z` value.", - &["_self", "z"], - ) - .register_documented( - "from_array", - |a: [i32; 2]| { - let output: Val = { - { - let output: Val = bevy::math::IVec2::from_array( - a, - ) - .into(); - output - } - }; - output - }, - " Creates a new vector from an array.", - &["a"], - ) - .register_documented( - "is_negative_bitmask", - |_self: Val| { - let output: u32 = { - { - let output: u32 = bevy::math::IVec2::is_negative_bitmask( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a bitmask with the lowest 2 bits set to the sign bits from the elements of `self`.\n A negative element results in a `1` bit and a positive element in a `0` bit. Element `x` goes\n into the first lowest bit, element `y` into the second, etc.", - &["_self"], - ) - .register_documented( - "length_squared", - |_self: Val| { - let output: i32 = { - { - let output: i32 = bevy::math::IVec2::length_squared( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Computes the squared length of `self`.", - &["_self"], - ) - .register_documented( - "max", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::IVec2::max( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector containing the maximum values for each element of `self` and `rhs`.\n In other words this computes `[self.x.max(rhs.x), self.y.max(rhs.y), ..]`.", - &["_self", "rhs"], - ) - .register_documented( - "max_element", - |_self: Val| { - let output: i32 = { - { - let output: i32 = bevy::math::IVec2::max_element( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns the horizontal maximum of `self`.\n In other words this computes `max(x, y, ..)`.", - &["_self"], - ) - .register_documented( - "min", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::IVec2::min( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector containing the minimum values for each element of `self` and `rhs`.\n In other words this computes `[self.x.min(rhs.x), self.y.min(rhs.y), ..]`.", - &["_self", "rhs"], - ) - .register_documented( - "min_element", - |_self: Val| { - let output: i32 = { - { - let output: i32 = bevy::math::IVec2::min_element( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns the horizontal minimum of `self`.\n In other words this computes `min(x, y, ..)`.", - &["_self"], - ) - .register_documented( - "mul", - |_self: Val, rhs: Ref| { - let output: Val = { - { - let output: Val = >::mul(_self.into_inner(), &rhs) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "mul", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = >::mul(_self.into_inner(), rhs.into_inner()) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "mul", - |_self: Val, rhs: i32| { - let output: Val = { - { - let output: Val = >::mul(_self.into_inner(), rhs) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "neg", - |_self: Val| { - let output: Val = { - { - let output: Val = ::neg( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - "", - &["_self"], - ) - .register_documented( - "new", - |x: i32, y: i32| { - let output: Val = { - { - let output: Val = bevy::math::IVec2::new( - x, - y, - ) - .into(); - output - } - }; - output - }, - " Creates a new vector.", - &["x", "y"], - ) - .register_documented( - "perp", - |_self: Val| { - let output: Val = { - { - let output: Val = bevy::math::IVec2::perp( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector that is equal to `self` rotated by 90 degrees.", - &["_self"], - ) - .register_documented( - "perp_dot", - |_self: Val, rhs: Val| { - let output: i32 = { - { - let output: i32 = bevy::math::IVec2::perp_dot( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " The perpendicular dot product of `self` and `rhs`.\n Also known as the wedge product, 2D cross product, and determinant.", - &["_self", "rhs"], - ) - .register_documented( - "rem", - |_self: Val, rhs: Ref| { - let output: Val = { - { - let output: Val = >::rem(_self.into_inner(), &rhs) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "rem", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = >::rem(_self.into_inner(), rhs.into_inner()) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "rem", - |_self: Val, rhs: i32| { - let output: Val = { - { - let output: Val = >::rem(_self.into_inner(), rhs) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "rem_euclid", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::IVec2::rem_euclid( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns the element-wise remainder of [Euclidean division] of `self` by `rhs`.\n # Panics\n This function will panic if any `rhs` element is 0 or the division results in overflow.\n [Euclidean division]: i32::rem_euclid", - &["_self", "rhs"], - ) - .register_documented( - "rotate", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::IVec2::rotate( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns `rhs` rotated by the angle of `self`. If `self` is normalized,\n then this just rotation. This is what you usually want. Otherwise,\n it will be like a rotation with a multiplication by `self`'s length.", - &["_self", "rhs"], - ) - .register_documented( - "saturating_add", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::IVec2::saturating_add( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector containing the saturating addition of `self` and `rhs`.\n In other words this computes `[self.x.saturating_add(rhs.x), self.y.saturating_add(rhs.y), ..]`.", - &["_self", "rhs"], - ) - .register_documented( - "saturating_add_unsigned", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::IVec2::saturating_add_unsigned( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " In other words this computes `[self.x.saturating_add_unsigned(rhs.x), self.y.saturating_add_unsigned(rhs.y), ..]`.", - &["_self", "rhs"], - ) - .register_documented( - "saturating_div", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::IVec2::saturating_div( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector containing the saturating division of `self` and `rhs`.\n In other words this computes `[self.x.saturating_div(rhs.x), self.y.saturating_div(rhs.y), ..]`.", - &["_self", "rhs"], - ) - .register_documented( - "saturating_mul", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::IVec2::saturating_mul( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector containing the saturating multiplication of `self` and `rhs`.\n In other words this computes `[self.x.saturating_mul(rhs.x), self.y.saturating_mul(rhs.y), ..]`.", - &["_self", "rhs"], - ) - .register_documented( - "saturating_sub", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::IVec2::saturating_sub( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector containing the saturating subtraction of `self` and `rhs`.\n In other words this computes `[self.x.saturating_sub(rhs.x), self.y.saturating_sub(rhs.y), ..]`.", - &["_self", "rhs"], - ) - .register_documented( - "saturating_sub_unsigned", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::IVec2::saturating_sub_unsigned( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector containing the saturating subtraction of `self` and unsigned vector `rhs`.\n In other words this computes `[self.x.saturating_sub_unsigned(rhs.x), self.y.saturating_sub_unsigned(rhs.y), ..]`.", - &["_self", "rhs"], - ) - .register_documented( - "select", - | - mask: Val, - if_true: Val, - if_false: Val| - { - let output: Val = { - { - let output: Val = bevy::math::IVec2::select( - mask.into_inner(), - if_true.into_inner(), - if_false.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Creates a vector from the elements in `if_true` and `if_false`, selecting which to use\n for each element of `self`.\n A true element in the mask uses the corresponding element from `if_true`, and false\n uses the element from `if_false`.", - &["mask", "if_true", "if_false"], - ) - .register_documented( - "signum", - |_self: Val| { - let output: Val = { - { - let output: Val = bevy::math::IVec2::signum( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector with elements representing the sign of `self`.\n - `0` if the number is zero\n - `1` if the number is positive\n - `-1` if the number is negative", - &["_self"], - ) - .register_documented( - "splat", - |v: i32| { - let output: Val = { - { - let output: Val = bevy::math::IVec2::splat( - v, - ) - .into(); - output - } - }; - output - }, - " Creates a vector with all elements set to `v`.", - &["v"], - ) - .register_documented( - "sub", - |_self: Val, rhs: Ref| { - let output: Val = { - { - let output: Val = >::sub(_self.into_inner(), &rhs) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "sub", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = >::sub(_self.into_inner(), rhs.into_inner()) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "sub", - |_self: Val, rhs: i32| { - let output: Val = { - { - let output: Val = >::sub(_self.into_inner(), rhs) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "to_array", - |_self: Ref| { - let output: [i32; 2] = { - { - let output: [i32; 2] = bevy::math::IVec2::to_array(&_self) - .into(); - output - } - }; - output - }, - " `[x, y]`", - &["_self"], - ) - .register_documented( - "with_x", - |_self: Val, x: i32| { - let output: Val = { - { - let output: Val = bevy::math::IVec2::with_x( - _self.into_inner(), - x, - ) - .into(); - output - } - }; - output - }, - " Creates a 2D vector from `self` with the given value of `x`.", - &["_self", "x"], - ) - .register_documented( - "with_y", - |_self: Val, y: i32| { - let output: Val = { - { - let output: Val = bevy::math::IVec2::with_y( - _self.into_inner(), - y, - ) - .into(); - output - } - }; - output - }, - " Creates a 2D vector from `self` with the given value of `y`.", - &["_self", "y"], - ) - .register_documented( - "wrapping_add", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::IVec2::wrapping_add( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector containing the wrapping addition of `self` and `rhs`.\n In other words this computes `[self.x.wrapping_add(rhs.x), self.y.wrapping_add(rhs.y), ..]`.", - &["_self", "rhs"], - ) - .register_documented( - "wrapping_add_unsigned", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::IVec2::wrapping_add_unsigned( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector containing the wrapping addition of `self` and unsigned vector `rhs`.\n In other words this computes `[self.x.wrapping_add_unsigned(rhs.x), self.y.wrapping_add_unsigned(rhs.y), ..]`.", - &["_self", "rhs"], - ) - .register_documented( - "wrapping_div", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::IVec2::wrapping_div( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector containing the wrapping division of `self` and `rhs`.\n In other words this computes `[self.x.wrapping_div(rhs.x), self.y.wrapping_div(rhs.y), ..]`.", - &["_self", "rhs"], - ) - .register_documented( - "wrapping_mul", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::IVec2::wrapping_mul( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector containing the wrapping multiplication of `self` and `rhs`.\n In other words this computes `[self.x.wrapping_mul(rhs.x), self.y.wrapping_mul(rhs.y), ..]`.", - &["_self", "rhs"], - ) - .register_documented( - "wrapping_sub", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::IVec2::wrapping_sub( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector containing the wrapping subtraction of `self` and `rhs`.\n In other words this computes `[self.x.wrapping_sub(rhs.x), self.y.wrapping_sub(rhs.y), ..]`.", - &["_self", "rhs"], - ) - .register_documented( - "wrapping_sub_unsigned", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::IVec2::wrapping_sub_unsigned( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector containing the wrapping subtraction of `self` and unsigned vector `rhs`.\n In other words this computes `[self.x.wrapping_sub_unsigned(rhs.x), self.y.wrapping_sub_unsigned(rhs.y), ..]`.", - &["_self", "rhs"], - ); - let registry = world - .get_resource_or_init::(); - let mut registry = registry.write(); - registry - .register_type_data::< - bevy::math::IVec2, - bevy_mod_scripting_core::bindings::MarkAsGenerated, - >(); - } - pub(crate) fn register_i_vec_3_functions(world: &mut bevy::ecs::world::World) { - bevy_mod_scripting_core::bindings::function::namespace::NamespaceBuilder::< - bevy::math::IVec3, - >::new(world) - .register_documented( - "abs", - |_self: Val| { - let output: Val = { - { - let output: Val = bevy::math::IVec3::abs( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector containing the absolute value of each element of `self`.", - &["_self"], - ) - .register_documented( - "add", - |_self: Val, rhs: Ref| { - let output: Val = { - { - let output: Val = >::add(_self.into_inner(), &rhs) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "add", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = >::add(_self.into_inner(), rhs.into_inner()) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "add", - |_self: Val, rhs: i32| { - let output: Val = { - { - let output: Val = >::add(_self.into_inner(), rhs) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "as_dvec3", - |_self: Ref| { - let output: Val = { - { - let output: Val = bevy::math::IVec3::as_dvec3( - &_self, - ) - .into(); - output - } - }; - output - }, - " Casts all elements of `self` to `f64`.", - &["_self"], - ) - .register_documented( - "as_i16vec3", - |_self: Ref| { - let output: Val = { - { - let output: Val = bevy::math::IVec3::as_i16vec3( - &_self, - ) - .into(); - output - } - }; - output - }, - " Casts all elements of `self` to `i16`.", - &["_self"], - ) - .register_documented( - "as_i64vec3", - |_self: Ref| { - let output: Val = { - { - let output: Val = bevy::math::IVec3::as_i64vec3( - &_self, - ) - .into(); - output - } - }; - output - }, - " Casts all elements of `self` to `i64`.", - &["_self"], - ) - .register_documented( - "as_i8vec3", - |_self: Ref| { - let output: Val = { - { - let output: Val = bevy::math::IVec3::as_i8vec3( - &_self, - ) - .into(); - output - } - }; - output - }, - " Casts all elements of `self` to `i8`.", - &["_self"], - ) - .register_documented( - "as_u16vec3", - |_self: Ref| { - let output: Val = { - { - let output: Val = bevy::math::IVec3::as_u16vec3( - &_self, - ) - .into(); - output - } - }; - output - }, - " Casts all elements of `self` to `u16`.", - &["_self"], - ) - .register_documented( - "as_u64vec3", - |_self: Ref| { - let output: Val = { - { - let output: Val = bevy::math::IVec3::as_u64vec3( - &_self, - ) - .into(); - output - } - }; - output - }, - " Casts all elements of `self` to `u64`.", - &["_self"], - ) - .register_documented( - "as_u8vec3", - |_self: Ref| { - let output: Val = { - { - let output: Val = bevy::math::IVec3::as_u8vec3( - &_self, - ) - .into(); - output - } - }; - output - }, - " Casts all elements of `self` to `u8`.", - &["_self"], - ) - .register_documented( - "as_uvec3", - |_self: Ref| { - let output: Val = { - { - let output: Val = bevy::math::IVec3::as_uvec3( - &_self, - ) - .into(); - output - } - }; - output - }, - " Casts all elements of `self` to `u32`.", - &["_self"], - ) - .register_documented( - "as_vec3", - |_self: Ref| { - let output: Val = { - { - let output: Val = bevy::math::IVec3::as_vec3( - &_self, - ) - .into(); - output - } - }; - output - }, - " Casts all elements of `self` to `f32`.", - &["_self"], - ) - .register_documented( - "as_vec3a", - |_self: Ref| { - let output: Val = { - { - let output: Val = bevy::math::IVec3::as_vec3a( - &_self, - ) - .into(); - output - } - }; - output - }, - " Casts all elements of `self` to `f32`.", - &["_self"], - ) - .register_documented( - "assert_receiver_is_total_eq", - |_self: Ref| { - let output: () = { - { - let output: () = ::assert_receiver_is_total_eq( - &_self, - ) - .into(); - output - } - }; - output - }, - "", - &["_self"], - ) - .register_documented( - "clamp", - | - _self: Val, - min: Val, - max: Val| - { - let output: Val = { - { - let output: Val = bevy::math::IVec3::clamp( - _self.into_inner(), - min.into_inner(), - max.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Component-wise clamping of values, similar to [`i32::clamp`].\n Each element in `min` must be less-or-equal to the corresponding element in `max`.\n # Panics\n Will panic if `min` is greater than `max` when `glam_assert` is enabled.", - &["_self", "min", "max"], - ) - .register_documented( - "clone", - |_self: Ref| { - let output: Val = { - { - let output: Val = ::clone( - &_self, - ) - .into(); - output - } - }; - output - }, - "", - &["_self"], - ) - .register_documented( - "cmpeq", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::IVec3::cmpeq( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector mask containing the result of a `==` comparison for each element of\n `self` and `rhs`.\n In other words, this computes `[self.x == rhs.x, self.y == rhs.y, ..]` for all\n elements.", - &["_self", "rhs"], - ) - .register_documented( - "cmpge", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::IVec3::cmpge( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector mask containing the result of a `>=` comparison for each element of\n `self` and `rhs`.\n In other words this computes `[self.x >= rhs.x, self.y >= rhs.y, ..]` for all\n elements.", - &["_self", "rhs"], - ) - .register_documented( - "cmpgt", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::IVec3::cmpgt( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector mask containing the result of a `>` comparison for each element of\n `self` and `rhs`.\n In other words this computes `[self.x > rhs.x, self.y > rhs.y, ..]` for all\n elements.", - &["_self", "rhs"], - ) - .register_documented( - "cmple", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::IVec3::cmple( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector mask containing the result of a `<=` comparison for each element of\n `self` and `rhs`.\n In other words this computes `[self.x <= rhs.x, self.y <= rhs.y, ..]` for all\n elements.", - &["_self", "rhs"], - ) - .register_documented( - "cmplt", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::IVec3::cmplt( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector mask containing the result of a `<` comparison for each element of\n `self` and `rhs`.\n In other words this computes `[self.x < rhs.x, self.y < rhs.y, ..]` for all\n elements.", - &["_self", "rhs"], - ) - .register_documented( - "cmpne", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::IVec3::cmpne( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector mask containing the result of a `!=` comparison for each element of\n `self` and `rhs`.\n In other words this computes `[self.x != rhs.x, self.y != rhs.y, ..]` for all\n elements.", - &["_self", "rhs"], - ) - .register_documented( - "cross", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::IVec3::cross( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Computes the cross product of `self` and `rhs`.", - &["_self", "rhs"], - ) - .register_documented( - "distance_squared", - |_self: Val, rhs: Val| { - let output: i32 = { - { - let output: i32 = bevy::math::IVec3::distance_squared( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Compute the squared euclidean distance between two points in space.", - &["_self", "rhs"], - ) - .register_documented( - "div", - |_self: Val, rhs: Ref| { - let output: Val = { - { - let output: Val = >::div(_self.into_inner(), &rhs) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "div", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = >::div(_self.into_inner(), rhs.into_inner()) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "div", - |_self: Val, rhs: i32| { - let output: Val = { - { - let output: Val = >::div(_self.into_inner(), rhs) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "div_euclid", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::IVec3::div_euclid( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns the element-wise quotient of [Euclidean division] of `self` by `rhs`.\n # Panics\n This function will panic if any `rhs` element is 0 or the division results in overflow.", - &["_self", "rhs"], - ) - .register_documented( - "dot", - |_self: Val, rhs: Val| { - let output: i32 = { - { - let output: i32 = bevy::math::IVec3::dot( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Computes the dot product of `self` and `rhs`.", - &["_self", "rhs"], - ) - .register_documented( - "dot_into_vec", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::IVec3::dot_into_vec( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector where every component is the dot product of `self` and `rhs`.", - &["_self", "rhs"], - ) - .register_documented( - "element_product", - |_self: Val| { - let output: i32 = { - { - let output: i32 = bevy::math::IVec3::element_product( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns the product of all elements of `self`.\n In other words, this computes `self.x * self.y * ..`.", - &["_self"], - ) - .register_documented( - "element_sum", - |_self: Val| { - let output: i32 = { - { - let output: i32 = bevy::math::IVec3::element_sum( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns the sum of all elements of `self`.\n In other words, this computes `self.x + self.y + ..`.", - &["_self"], - ) - .register_documented( - "eq", - |_self: Ref, other: Ref| { - let output: bool = { - { - let output: bool = >::eq(&_self, &other) - .into(); - output - } - }; - output - }, - "", - &["_self", "other"], - ) - .register_documented( - "extend", - |_self: Val, w: i32| { - let output: Val = { - { - let output: Val = bevy::math::IVec3::extend( - _self.into_inner(), - w, - ) - .into(); - output - } - }; - output - }, - " Creates a 4D vector from `self` and the given `w` value.", - &["_self", "w"], - ) - .register_documented( - "from_array", - |a: [i32; 3]| { - let output: Val = { - { - let output: Val = bevy::math::IVec3::from_array( - a, - ) - .into(); - output - } - }; - output - }, - " Creates a new vector from an array.", - &["a"], - ) - .register_documented( - "is_negative_bitmask", - |_self: Val| { - let output: u32 = { - { - let output: u32 = bevy::math::IVec3::is_negative_bitmask( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a bitmask with the lowest 3 bits set to the sign bits from the elements of `self`.\n A negative element results in a `1` bit and a positive element in a `0` bit. Element `x` goes\n into the first lowest bit, element `y` into the second, etc.", - &["_self"], - ) - .register_documented( - "length_squared", - |_self: Val| { - let output: i32 = { - { - let output: i32 = bevy::math::IVec3::length_squared( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Computes the squared length of `self`.", - &["_self"], - ) - .register_documented( - "max", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::IVec3::max( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector containing the maximum values for each element of `self` and `rhs`.\n In other words this computes `[self.x.max(rhs.x), self.y.max(rhs.y), ..]`.", - &["_self", "rhs"], - ) - .register_documented( - "max_element", - |_self: Val| { - let output: i32 = { - { - let output: i32 = bevy::math::IVec3::max_element( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns the horizontal maximum of `self`.\n In other words this computes `max(x, y, ..)`.", - &["_self"], - ) - .register_documented( - "min", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::IVec3::min( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector containing the minimum values for each element of `self` and `rhs`.\n In other words this computes `[self.x.min(rhs.x), self.y.min(rhs.y), ..]`.", - &["_self", "rhs"], - ) - .register_documented( - "min_element", - |_self: Val| { - let output: i32 = { - { - let output: i32 = bevy::math::IVec3::min_element( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns the horizontal minimum of `self`.\n In other words this computes `min(x, y, ..)`.", - &["_self"], - ) - .register_documented( - "mul", - |_self: Val, rhs: Ref| { - let output: Val = { - { - let output: Val = >::mul(_self.into_inner(), &rhs) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "mul", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = >::mul(_self.into_inner(), rhs.into_inner()) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "mul", - |_self: Val, rhs: i32| { - let output: Val = { - { - let output: Val = >::mul(_self.into_inner(), rhs) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "neg", - |_self: Val| { - let output: Val = { - { - let output: Val = ::neg( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - "", - &["_self"], - ) - .register_documented( - "new", - |x: i32, y: i32, z: i32| { - let output: Val = { - { - let output: Val = bevy::math::IVec3::new( - x, - y, - z, - ) - .into(); - output - } - }; - output - }, - " Creates a new vector.", - &["x", "y", "z"], - ) - .register_documented( - "rem", - |_self: Val, rhs: Ref| { - let output: Val = { - { - let output: Val = >::rem(_self.into_inner(), &rhs) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "rem", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = >::rem(_self.into_inner(), rhs.into_inner()) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "rem", - |_self: Val, rhs: i32| { - let output: Val = { - { - let output: Val = >::rem(_self.into_inner(), rhs) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "rem_euclid", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::IVec3::rem_euclid( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns the element-wise remainder of [Euclidean division] of `self` by `rhs`.\n # Panics\n This function will panic if any `rhs` element is 0 or the division results in overflow.\n [Euclidean division]: i32::rem_euclid", - &["_self", "rhs"], - ) - .register_documented( - "saturating_add", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::IVec3::saturating_add( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector containing the saturating addition of `self` and `rhs`.\n In other words this computes `[self.x.saturating_add(rhs.x), self.y.saturating_add(rhs.y), ..]`.", - &["_self", "rhs"], - ) - .register_documented( - "saturating_add_unsigned", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::IVec3::saturating_add_unsigned( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " In other words this computes `[self.x.saturating_add_unsigned(rhs.x), self.y.saturating_add_unsigned(rhs.y), ..]`.", - &["_self", "rhs"], - ) - .register_documented( - "saturating_div", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::IVec3::saturating_div( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector containing the saturating division of `self` and `rhs`.\n In other words this computes `[self.x.saturating_div(rhs.x), self.y.saturating_div(rhs.y), ..]`.", - &["_self", "rhs"], - ) - .register_documented( - "saturating_mul", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::IVec3::saturating_mul( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector containing the saturating multiplication of `self` and `rhs`.\n In other words this computes `[self.x.saturating_mul(rhs.x), self.y.saturating_mul(rhs.y), ..]`.", - &["_self", "rhs"], - ) - .register_documented( - "saturating_sub", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::IVec3::saturating_sub( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector containing the saturating subtraction of `self` and `rhs`.\n In other words this computes `[self.x.saturating_sub(rhs.x), self.y.saturating_sub(rhs.y), ..]`.", - &["_self", "rhs"], - ) - .register_documented( - "saturating_sub_unsigned", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::IVec3::saturating_sub_unsigned( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector containing the saturating subtraction of `self` and unsigned vector `rhs`.\n In other words this computes `[self.x.saturating_sub_unsigned(rhs.x), self.y.saturating_sub_unsigned(rhs.y), ..]`.", - &["_self", "rhs"], - ) - .register_documented( - "select", - | - mask: Val, - if_true: Val, - if_false: Val| - { - let output: Val = { - { - let output: Val = bevy::math::IVec3::select( - mask.into_inner(), - if_true.into_inner(), - if_false.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Creates a vector from the elements in `if_true` and `if_false`, selecting which to use\n for each element of `self`.\n A true element in the mask uses the corresponding element from `if_true`, and false\n uses the element from `if_false`.", - &["mask", "if_true", "if_false"], - ) - .register_documented( - "signum", - |_self: Val| { - let output: Val = { - { - let output: Val = bevy::math::IVec3::signum( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector with elements representing the sign of `self`.\n - `0` if the number is zero\n - `1` if the number is positive\n - `-1` if the number is negative", - &["_self"], - ) - .register_documented( - "splat", - |v: i32| { - let output: Val = { - { - let output: Val = bevy::math::IVec3::splat( - v, - ) - .into(); - output - } - }; - output - }, - " Creates a vector with all elements set to `v`.", - &["v"], - ) - .register_documented( - "sub", - |_self: Val, rhs: Ref| { - let output: Val = { - { - let output: Val = >::sub(_self.into_inner(), &rhs) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "sub", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = >::sub(_self.into_inner(), rhs.into_inner()) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "sub", - |_self: Val, rhs: i32| { - let output: Val = { - { - let output: Val = >::sub(_self.into_inner(), rhs) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "to_array", - |_self: Ref| { - let output: [i32; 3] = { - { - let output: [i32; 3] = bevy::math::IVec3::to_array(&_self) - .into(); - output - } - }; - output - }, - " `[x, y, z]`", - &["_self"], - ) - .register_documented( - "truncate", - |_self: Val| { - let output: Val = { - { - let output: Val = bevy::math::IVec3::truncate( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Creates a 2D vector from the `x` and `y` elements of `self`, discarding `z`.\n Truncation may also be performed by using [`self.xy()`][crate::swizzles::Vec3Swizzles::xy()].", - &["_self"], - ) - .register_documented( - "with_x", - |_self: Val, x: i32| { - let output: Val = { - { - let output: Val = bevy::math::IVec3::with_x( - _self.into_inner(), - x, - ) - .into(); - output - } - }; - output - }, - " Creates a 3D vector from `self` with the given value of `x`.", - &["_self", "x"], - ) - .register_documented( - "with_y", - |_self: Val, y: i32| { - let output: Val = { - { - let output: Val = bevy::math::IVec3::with_y( - _self.into_inner(), - y, - ) - .into(); - output - } - }; - output - }, - " Creates a 3D vector from `self` with the given value of `y`.", - &["_self", "y"], - ) - .register_documented( - "with_z", - |_self: Val, z: i32| { - let output: Val = { - { - let output: Val = bevy::math::IVec3::with_z( - _self.into_inner(), - z, - ) - .into(); - output - } - }; - output - }, - " Creates a 3D vector from `self` with the given value of `z`.", - &["_self", "z"], - ) - .register_documented( - "wrapping_add", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::IVec3::wrapping_add( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector containing the wrapping addition of `self` and `rhs`.\n In other words this computes `[self.x.wrapping_add(rhs.x), self.y.wrapping_add(rhs.y), ..]`.", - &["_self", "rhs"], - ) - .register_documented( - "wrapping_add_unsigned", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::IVec3::wrapping_add_unsigned( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector containing the wrapping addition of `self` and unsigned vector `rhs`.\n In other words this computes `[self.x.wrapping_add_unsigned(rhs.x), self.y.wrapping_add_unsigned(rhs.y), ..]`.", - &["_self", "rhs"], - ) - .register_documented( - "wrapping_div", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::IVec3::wrapping_div( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector containing the wrapping division of `self` and `rhs`.\n In other words this computes `[self.x.wrapping_div(rhs.x), self.y.wrapping_div(rhs.y), ..]`.", - &["_self", "rhs"], - ) - .register_documented( - "wrapping_mul", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::IVec3::wrapping_mul( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector containing the wrapping multiplication of `self` and `rhs`.\n In other words this computes `[self.x.wrapping_mul(rhs.x), self.y.wrapping_mul(rhs.y), ..]`.", - &["_self", "rhs"], - ) - .register_documented( - "wrapping_sub", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::IVec3::wrapping_sub( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector containing the wrapping subtraction of `self` and `rhs`.\n In other words this computes `[self.x.wrapping_sub(rhs.x), self.y.wrapping_sub(rhs.y), ..]`.", - &["_self", "rhs"], - ) - .register_documented( - "wrapping_sub_unsigned", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::IVec3::wrapping_sub_unsigned( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector containing the wrapping subtraction of `self` and unsigned vector `rhs`.\n In other words this computes `[self.x.wrapping_sub_unsigned(rhs.x), self.y.wrapping_sub_unsigned(rhs.y), ..]`.", - &["_self", "rhs"], - ); - let registry = world - .get_resource_or_init::(); - let mut registry = registry.write(); - registry - .register_type_data::< - bevy::math::IVec3, - bevy_mod_scripting_core::bindings::MarkAsGenerated, - >(); - } - pub(crate) fn register_i_vec_4_functions(world: &mut bevy::ecs::world::World) { - bevy_mod_scripting_core::bindings::function::namespace::NamespaceBuilder::< - bevy::math::IVec4, - >::new(world) - .register_documented( - "abs", - |_self: Val| { - let output: Val = { - { - let output: Val = bevy::math::IVec4::abs( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector containing the absolute value of each element of `self`.", - &["_self"], - ) - .register_documented( - "add", - |_self: Val, rhs: Ref| { - let output: Val = { - { - let output: Val = >::add(_self.into_inner(), &rhs) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "add", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = >::add(_self.into_inner(), rhs.into_inner()) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "add", - |_self: Val, rhs: i32| { - let output: Val = { - { - let output: Val = >::add(_self.into_inner(), rhs) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "as_dvec4", - |_self: Ref| { - let output: Val = { - { - let output: Val = bevy::math::IVec4::as_dvec4( - &_self, - ) - .into(); - output - } - }; - output - }, - " Casts all elements of `self` to `f64`.", - &["_self"], - ) - .register_documented( - "as_i16vec4", - |_self: Ref| { - let output: Val = { - { - let output: Val = bevy::math::IVec4::as_i16vec4( - &_self, - ) - .into(); - output - } - }; - output - }, - " Casts all elements of `self` to `i16`.", - &["_self"], - ) - .register_documented( - "as_i64vec4", - |_self: Ref| { - let output: Val = { - { - let output: Val = bevy::math::IVec4::as_i64vec4( - &_self, - ) - .into(); - output - } - }; - output - }, - " Casts all elements of `self` to `i64`.", - &["_self"], - ) - .register_documented( - "as_i8vec4", - |_self: Ref| { - let output: Val = { - { - let output: Val = bevy::math::IVec4::as_i8vec4( - &_self, - ) - .into(); - output - } - }; - output - }, - " Casts all elements of `self` to `i8`.", - &["_self"], - ) - .register_documented( - "as_u16vec4", - |_self: Ref| { - let output: Val = { - { - let output: Val = bevy::math::IVec4::as_u16vec4( - &_self, - ) - .into(); - output - } - }; - output - }, - " Casts all elements of `self` to `u16`.", - &["_self"], - ) - .register_documented( - "as_u64vec4", - |_self: Ref| { - let output: Val = { - { - let output: Val = bevy::math::IVec4::as_u64vec4( - &_self, - ) - .into(); - output - } - }; - output - }, - " Casts all elements of `self` to `u64`.", - &["_self"], - ) - .register_documented( - "as_u8vec4", - |_self: Ref| { - let output: Val = { - { - let output: Val = bevy::math::IVec4::as_u8vec4( - &_self, - ) - .into(); - output - } - }; - output - }, - " Casts all elements of `self` to `u8`.", - &["_self"], - ) - .register_documented( - "as_uvec4", - |_self: Ref| { - let output: Val = { - { - let output: Val = bevy::math::IVec4::as_uvec4( - &_self, - ) - .into(); - output - } - }; - output - }, - " Casts all elements of `self` to `u32`.", - &["_self"], - ) - .register_documented( - "as_vec4", - |_self: Ref| { - let output: Val = { - { - let output: Val = bevy::math::IVec4::as_vec4( - &_self, - ) - .into(); - output - } - }; - output - }, - " Casts all elements of `self` to `f32`.", - &["_self"], - ) - .register_documented( - "assert_receiver_is_total_eq", - |_self: Ref| { - let output: () = { - { - let output: () = ::assert_receiver_is_total_eq( - &_self, - ) - .into(); - output - } - }; - output - }, - "", - &["_self"], - ) - .register_documented( - "clamp", - | - _self: Val, - min: Val, - max: Val| - { - let output: Val = { - { - let output: Val = bevy::math::IVec4::clamp( - _self.into_inner(), - min.into_inner(), - max.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Component-wise clamping of values, similar to [`i32::clamp`].\n Each element in `min` must be less-or-equal to the corresponding element in `max`.\n # Panics\n Will panic if `min` is greater than `max` when `glam_assert` is enabled.", - &["_self", "min", "max"], - ) - .register_documented( - "clone", - |_self: Ref| { - let output: Val = { - { - let output: Val = ::clone( - &_self, - ) - .into(); - output - } - }; - output - }, - "", - &["_self"], - ) - .register_documented( - "cmpeq", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::IVec4::cmpeq( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector mask containing the result of a `==` comparison for each element of\n `self` and `rhs`.\n In other words, this computes `[self.x == rhs.x, self.y == rhs.y, ..]` for all\n elements.", - &["_self", "rhs"], - ) - .register_documented( - "cmpge", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::IVec4::cmpge( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector mask containing the result of a `>=` comparison for each element of\n `self` and `rhs`.\n In other words this computes `[self.x >= rhs.x, self.y >= rhs.y, ..]` for all\n elements.", - &["_self", "rhs"], - ) - .register_documented( - "cmpgt", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::IVec4::cmpgt( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector mask containing the result of a `>` comparison for each element of\n `self` and `rhs`.\n In other words this computes `[self.x > rhs.x, self.y > rhs.y, ..]` for all\n elements.", - &["_self", "rhs"], - ) - .register_documented( - "cmple", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::IVec4::cmple( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector mask containing the result of a `<=` comparison for each element of\n `self` and `rhs`.\n In other words this computes `[self.x <= rhs.x, self.y <= rhs.y, ..]` for all\n elements.", - &["_self", "rhs"], - ) - .register_documented( - "cmplt", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::IVec4::cmplt( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector mask containing the result of a `<` comparison for each element of\n `self` and `rhs`.\n In other words this computes `[self.x < rhs.x, self.y < rhs.y, ..]` for all\n elements.", - &["_self", "rhs"], - ) - .register_documented( - "cmpne", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::IVec4::cmpne( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector mask containing the result of a `!=` comparison for each element of\n `self` and `rhs`.\n In other words this computes `[self.x != rhs.x, self.y != rhs.y, ..]` for all\n elements.", - &["_self", "rhs"], - ) - .register_documented( - "distance_squared", - |_self: Val, rhs: Val| { - let output: i32 = { - { - let output: i32 = bevy::math::IVec4::distance_squared( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Compute the squared euclidean distance between two points in space.", - &["_self", "rhs"], - ) - .register_documented( - "div", - |_self: Val, rhs: Ref| { - let output: Val = { - { - let output: Val = >::div(_self.into_inner(), &rhs) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "div", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = >::div(_self.into_inner(), rhs.into_inner()) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "div", - |_self: Val, rhs: i32| { - let output: Val = { - { - let output: Val = >::div(_self.into_inner(), rhs) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "div_euclid", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::IVec4::div_euclid( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns the element-wise quotient of [Euclidean division] of `self` by `rhs`.\n # Panics\n This function will panic if any `rhs` element is 0 or the division results in overflow.", - &["_self", "rhs"], - ) - .register_documented( - "dot", - |_self: Val, rhs: Val| { - let output: i32 = { - { - let output: i32 = bevy::math::IVec4::dot( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Computes the dot product of `self` and `rhs`.", - &["_self", "rhs"], - ) - .register_documented( - "dot_into_vec", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::IVec4::dot_into_vec( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector where every component is the dot product of `self` and `rhs`.", - &["_self", "rhs"], - ) - .register_documented( - "element_product", - |_self: Val| { - let output: i32 = { - { - let output: i32 = bevy::math::IVec4::element_product( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns the product of all elements of `self`.\n In other words, this computes `self.x * self.y * ..`.", - &["_self"], - ) - .register_documented( - "element_sum", - |_self: Val| { - let output: i32 = { - { - let output: i32 = bevy::math::IVec4::element_sum( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns the sum of all elements of `self`.\n In other words, this computes `self.x + self.y + ..`.", - &["_self"], - ) - .register_documented( - "eq", - |_self: Ref, other: Ref| { - let output: bool = { - { - let output: bool = >::eq(&_self, &other) - .into(); - output - } - }; - output - }, - "", - &["_self", "other"], - ) - .register_documented( - "from_array", - |a: [i32; 4]| { - let output: Val = { - { - let output: Val = bevy::math::IVec4::from_array( - a, - ) - .into(); - output - } - }; - output - }, - " Creates a new vector from an array.", - &["a"], - ) - .register_documented( - "is_negative_bitmask", - |_self: Val| { - let output: u32 = { - { - let output: u32 = bevy::math::IVec4::is_negative_bitmask( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a bitmask with the lowest 4 bits set to the sign bits from the elements of `self`.\n A negative element results in a `1` bit and a positive element in a `0` bit. Element `x` goes\n into the first lowest bit, element `y` into the second, etc.", - &["_self"], - ) - .register_documented( - "length_squared", - |_self: Val| { - let output: i32 = { - { - let output: i32 = bevy::math::IVec4::length_squared( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Computes the squared length of `self`.", - &["_self"], - ) - .register_documented( - "max", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::IVec4::max( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector containing the maximum values for each element of `self` and `rhs`.\n In other words this computes `[self.x.max(rhs.x), self.y.max(rhs.y), ..]`.", - &["_self", "rhs"], - ) - .register_documented( - "max_element", - |_self: Val| { - let output: i32 = { - { - let output: i32 = bevy::math::IVec4::max_element( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns the horizontal maximum of `self`.\n In other words this computes `max(x, y, ..)`.", - &["_self"], - ) - .register_documented( - "min", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::IVec4::min( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector containing the minimum values for each element of `self` and `rhs`.\n In other words this computes `[self.x.min(rhs.x), self.y.min(rhs.y), ..]`.", - &["_self", "rhs"], - ) - .register_documented( - "min_element", - |_self: Val| { - let output: i32 = { - { - let output: i32 = bevy::math::IVec4::min_element( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns the horizontal minimum of `self`.\n In other words this computes `min(x, y, ..)`.", - &["_self"], - ) - .register_documented( - "mul", - |_self: Val, rhs: Ref| { - let output: Val = { - { - let output: Val = >::mul(_self.into_inner(), &rhs) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "mul", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = >::mul(_self.into_inner(), rhs.into_inner()) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "mul", - |_self: Val, rhs: i32| { - let output: Val = { - { - let output: Val = >::mul(_self.into_inner(), rhs) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "neg", - |_self: Val| { - let output: Val = { - { - let output: Val = ::neg( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - "", - &["_self"], - ) - .register_documented( - "new", - |x: i32, y: i32, z: i32, w: i32| { - let output: Val = { - { - let output: Val = bevy::math::IVec4::new( - x, - y, - z, - w, - ) - .into(); - output - } - }; - output - }, - " Creates a new vector.", - &["x", "y", "z", "w"], - ) - .register_documented( - "rem", - |_self: Val, rhs: Ref| { - let output: Val = { - { - let output: Val = >::rem(_self.into_inner(), &rhs) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "rem", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = >::rem(_self.into_inner(), rhs.into_inner()) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "rem", - |_self: Val, rhs: i32| { - let output: Val = { - { - let output: Val = >::rem(_self.into_inner(), rhs) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "rem_euclid", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::IVec4::rem_euclid( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns the element-wise remainder of [Euclidean division] of `self` by `rhs`.\n # Panics\n This function will panic if any `rhs` element is 0 or the division results in overflow.\n [Euclidean division]: i32::rem_euclid", - &["_self", "rhs"], - ) - .register_documented( - "saturating_add", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::IVec4::saturating_add( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector containing the saturating addition of `self` and `rhs`.\n In other words this computes `[self.x.saturating_add(rhs.x), self.y.saturating_add(rhs.y), ..]`.", - &["_self", "rhs"], - ) - .register_documented( - "saturating_add_unsigned", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::IVec4::saturating_add_unsigned( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " In other words this computes `[self.x.saturating_add_unsigned(rhs.x), self.y.saturating_add_unsigned(rhs.y), ..]`.", - &["_self", "rhs"], - ) - .register_documented( - "saturating_div", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::IVec4::saturating_div( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector containing the saturating division of `self` and `rhs`.\n In other words this computes `[self.x.saturating_div(rhs.x), self.y.saturating_div(rhs.y), ..]`.", - &["_self", "rhs"], - ) - .register_documented( - "saturating_mul", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::IVec4::saturating_mul( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector containing the saturating multiplication of `self` and `rhs`.\n In other words this computes `[self.x.saturating_mul(rhs.x), self.y.saturating_mul(rhs.y), ..]`.", - &["_self", "rhs"], - ) - .register_documented( - "saturating_sub", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::IVec4::saturating_sub( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector containing the saturating subtraction of `self` and `rhs`.\n In other words this computes `[self.x.saturating_sub(rhs.x), self.y.saturating_sub(rhs.y), ..]`.", - &["_self", "rhs"], - ) - .register_documented( - "saturating_sub_unsigned", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::IVec4::saturating_sub_unsigned( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector containing the saturating subtraction of `self` and unsigned vector `rhs`.\n In other words this computes `[self.x.saturating_sub_unsigned(rhs.x), self.y.saturating_sub_unsigned(rhs.y), ..]`.", - &["_self", "rhs"], - ) - .register_documented( - "select", - | - mask: Val, - if_true: Val, - if_false: Val| - { - let output: Val = { - { - let output: Val = bevy::math::IVec4::select( - mask.into_inner(), - if_true.into_inner(), - if_false.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Creates a vector from the elements in `if_true` and `if_false`, selecting which to use\n for each element of `self`.\n A true element in the mask uses the corresponding element from `if_true`, and false\n uses the element from `if_false`.", - &["mask", "if_true", "if_false"], - ) - .register_documented( - "signum", - |_self: Val| { - let output: Val = { - { - let output: Val = bevy::math::IVec4::signum( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector with elements representing the sign of `self`.\n - `0` if the number is zero\n - `1` if the number is positive\n - `-1` if the number is negative", - &["_self"], - ) - .register_documented( - "splat", - |v: i32| { - let output: Val = { - { - let output: Val = bevy::math::IVec4::splat( - v, - ) - .into(); - output - } - }; - output - }, - " Creates a vector with all elements set to `v`.", - &["v"], - ) - .register_documented( - "sub", - |_self: Val, rhs: Ref| { - let output: Val = { - { - let output: Val = >::sub(_self.into_inner(), &rhs) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "sub", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = >::sub(_self.into_inner(), rhs.into_inner()) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "sub", - |_self: Val, rhs: i32| { - let output: Val = { - { - let output: Val = >::sub(_self.into_inner(), rhs) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "to_array", - |_self: Ref| { - let output: [i32; 4] = { - { - let output: [i32; 4] = bevy::math::IVec4::to_array(&_self) - .into(); - output - } - }; - output - }, - " `[x, y, z, w]`", - &["_self"], - ) - .register_documented( - "truncate", - |_self: Val| { - let output: Val = { - { - let output: Val = bevy::math::IVec4::truncate( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Creates a 3D vector from the `x`, `y` and `z` elements of `self`, discarding `w`.\n Truncation to [`IVec3`] may also be performed by using [`self.xyz()`][crate::swizzles::Vec4Swizzles::xyz()].", - &["_self"], - ) - .register_documented( - "with_w", - |_self: Val, w: i32| { - let output: Val = { - { - let output: Val = bevy::math::IVec4::with_w( - _self.into_inner(), - w, - ) - .into(); - output - } - }; - output - }, - " Creates a 4D vector from `self` with the given value of `w`.", - &["_self", "w"], - ) - .register_documented( - "with_x", - |_self: Val, x: i32| { - let output: Val = { - { - let output: Val = bevy::math::IVec4::with_x( - _self.into_inner(), - x, - ) - .into(); - output - } - }; - output - }, - " Creates a 4D vector from `self` with the given value of `x`.", - &["_self", "x"], - ) - .register_documented( - "with_y", - |_self: Val, y: i32| { - let output: Val = { - { - let output: Val = bevy::math::IVec4::with_y( - _self.into_inner(), - y, - ) - .into(); - output - } - }; - output - }, - " Creates a 4D vector from `self` with the given value of `y`.", - &["_self", "y"], - ) - .register_documented( - "with_z", - |_self: Val, z: i32| { - let output: Val = { - { - let output: Val = bevy::math::IVec4::with_z( - _self.into_inner(), - z, - ) - .into(); - output - } - }; - output - }, - " Creates a 4D vector from `self` with the given value of `z`.", - &["_self", "z"], - ) - .register_documented( - "wrapping_add", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::IVec4::wrapping_add( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector containing the wrapping addition of `self` and `rhs`.\n In other words this computes `[self.x.wrapping_add(rhs.x), self.y.wrapping_add(rhs.y), ..]`.", - &["_self", "rhs"], - ) - .register_documented( - "wrapping_add_unsigned", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::IVec4::wrapping_add_unsigned( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector containing the wrapping addition of `self` and unsigned vector `rhs`.\n In other words this computes `[self.x.wrapping_add_unsigned(rhs.x), self.y.wrapping_add_unsigned(rhs.y), ..]`.", - &["_self", "rhs"], - ) - .register_documented( - "wrapping_div", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::IVec4::wrapping_div( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector containing the wrapping division of `self` and `rhs`.\n In other words this computes `[self.x.wrapping_div(rhs.x), self.y.wrapping_div(rhs.y), ..]`.", - &["_self", "rhs"], - ) - .register_documented( - "wrapping_mul", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::IVec4::wrapping_mul( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector containing the wrapping multiplication of `self` and `rhs`.\n In other words this computes `[self.x.wrapping_mul(rhs.x), self.y.wrapping_mul(rhs.y), ..]`.", - &["_self", "rhs"], - ) - .register_documented( - "wrapping_sub", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::IVec4::wrapping_sub( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector containing the wrapping subtraction of `self` and `rhs`.\n In other words this computes `[self.x.wrapping_sub(rhs.x), self.y.wrapping_sub(rhs.y), ..]`.", - &["_self", "rhs"], - ) - .register_documented( - "wrapping_sub_unsigned", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::IVec4::wrapping_sub_unsigned( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector containing the wrapping subtraction of `self` and unsigned vector `rhs`.\n In other words this computes `[self.x.wrapping_sub_unsigned(rhs.x), self.y.wrapping_sub_unsigned(rhs.y), ..]`.", - &["_self", "rhs"], - ); - let registry = world - .get_resource_or_init::(); - let mut registry = registry.write(); - registry - .register_type_data::< - bevy::math::IVec4, - bevy_mod_scripting_core::bindings::MarkAsGenerated, - >(); - } - pub(crate) fn register_i_8_vec_2_functions(world: &mut bevy::ecs::world::World) { - bevy_mod_scripting_core::bindings::function::namespace::NamespaceBuilder::< - bevy::math::I8Vec2, - >::new(world) - .register_documented( - "abs", - |_self: Val| { - let output: Val = { - { - let output: Val = bevy::math::I8Vec2::abs( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector containing the absolute value of each element of `self`.", - &["_self"], - ) - .register_documented( - "add", - |_self: Val, rhs: Ref| { - let output: Val = { - { - let output: Val = >::add(_self.into_inner(), &rhs) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "add", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = >::add(_self.into_inner(), rhs.into_inner()) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "add", - |_self: Val, rhs: i8| { - let output: Val = { - { - let output: Val = >::add(_self.into_inner(), rhs) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "as_dvec2", - |_self: Ref| { - let output: Val = { - { - let output: Val = bevy::math::I8Vec2::as_dvec2( - &_self, - ) - .into(); - output - } - }; - output - }, - " Casts all elements of `self` to `f64`.", - &["_self"], - ) - .register_documented( - "as_i16vec2", - |_self: Ref| { - let output: Val = { - { - let output: Val = bevy::math::I8Vec2::as_i16vec2( - &_self, - ) - .into(); - output - } - }; - output - }, - " Casts all elements of `self` to `i16`.", - &["_self"], - ) - .register_documented( - "as_i64vec2", - |_self: Ref| { - let output: Val = { - { - let output: Val = bevy::math::I8Vec2::as_i64vec2( - &_self, - ) - .into(); - output - } - }; - output - }, - " Casts all elements of `self` to `i64`.", - &["_self"], - ) - .register_documented( - "as_ivec2", - |_self: Ref| { - let output: Val = { - { - let output: Val = bevy::math::I8Vec2::as_ivec2( - &_self, - ) - .into(); - output - } - }; - output - }, - " Casts all elements of `self` to `i32`.", - &["_self"], - ) - .register_documented( - "as_u16vec2", - |_self: Ref| { - let output: Val = { - { - let output: Val = bevy::math::I8Vec2::as_u16vec2( - &_self, - ) - .into(); - output - } - }; - output - }, - " Casts all elements of `self` to `u16`.", - &["_self"], - ) - .register_documented( - "as_u64vec2", - |_self: Ref| { - let output: Val = { - { - let output: Val = bevy::math::I8Vec2::as_u64vec2( - &_self, - ) - .into(); - output - } - }; - output - }, - " Casts all elements of `self` to `u64`.", - &["_self"], - ) - .register_documented( - "as_u8vec2", - |_self: Ref| { - let output: Val = { - { - let output: Val = bevy::math::I8Vec2::as_u8vec2( - &_self, - ) - .into(); - output - } - }; - output - }, - " Casts all elements of `self` to `u8`.", - &["_self"], - ) - .register_documented( - "as_uvec2", - |_self: Ref| { - let output: Val = { - { - let output: Val = bevy::math::I8Vec2::as_uvec2( - &_self, - ) - .into(); - output - } - }; - output - }, - " Casts all elements of `self` to `u32`.", - &["_self"], - ) - .register_documented( - "as_vec2", - |_self: Ref| { - let output: Val = { - { - let output: Val = bevy::math::I8Vec2::as_vec2( - &_self, - ) - .into(); - output - } - }; - output - }, - " Casts all elements of `self` to `f32`.", - &["_self"], - ) - .register_documented( - "assert_receiver_is_total_eq", - |_self: Ref| { - let output: () = { - { - let output: () = ::assert_receiver_is_total_eq( - &_self, - ) - .into(); - output - } - }; - output - }, - "", - &["_self"], - ) - .register_documented( - "clamp", - | - _self: Val, - min: Val, - max: Val| - { - let output: Val = { - { - let output: Val = bevy::math::I8Vec2::clamp( - _self.into_inner(), - min.into_inner(), - max.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Component-wise clamping of values, similar to [`i8::clamp`].\n Each element in `min` must be less-or-equal to the corresponding element in `max`.\n # Panics\n Will panic if `min` is greater than `max` when `glam_assert` is enabled.", - &["_self", "min", "max"], - ) - .register_documented( - "clone", - |_self: Ref| { - let output: Val = { - { - let output: Val = ::clone( - &_self, - ) - .into(); - output - } - }; - output - }, - "", - &["_self"], - ) - .register_documented( - "cmpeq", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::I8Vec2::cmpeq( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector mask containing the result of a `==` comparison for each element of\n `self` and `rhs`.\n In other words, this computes `[self.x == rhs.x, self.y == rhs.y, ..]` for all\n elements.", - &["_self", "rhs"], - ) - .register_documented( - "cmpge", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::I8Vec2::cmpge( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector mask containing the result of a `>=` comparison for each element of\n `self` and `rhs`.\n In other words this computes `[self.x >= rhs.x, self.y >= rhs.y, ..]` for all\n elements.", - &["_self", "rhs"], - ) - .register_documented( - "cmpgt", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::I8Vec2::cmpgt( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector mask containing the result of a `>` comparison for each element of\n `self` and `rhs`.\n In other words this computes `[self.x > rhs.x, self.y > rhs.y, ..]` for all\n elements.", - &["_self", "rhs"], - ) - .register_documented( - "cmple", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::I8Vec2::cmple( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector mask containing the result of a `<=` comparison for each element of\n `self` and `rhs`.\n In other words this computes `[self.x <= rhs.x, self.y <= rhs.y, ..]` for all\n elements.", - &["_self", "rhs"], - ) - .register_documented( - "cmplt", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::I8Vec2::cmplt( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector mask containing the result of a `<` comparison for each element of\n `self` and `rhs`.\n In other words this computes `[self.x < rhs.x, self.y < rhs.y, ..]` for all\n elements.", - &["_self", "rhs"], - ) - .register_documented( - "cmpne", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::I8Vec2::cmpne( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector mask containing the result of a `!=` comparison for each element of\n `self` and `rhs`.\n In other words this computes `[self.x != rhs.x, self.y != rhs.y, ..]` for all\n elements.", - &["_self", "rhs"], - ) - .register_documented( - "distance_squared", - |_self: Val, rhs: Val| { - let output: i8 = { - { - let output: i8 = bevy::math::I8Vec2::distance_squared( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Compute the squared euclidean distance between two points in space.", - &["_self", "rhs"], - ) - .register_documented( - "div", - |_self: Val, rhs: Ref| { - let output: Val = { - { - let output: Val = >::div(_self.into_inner(), &rhs) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "div", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = >::div(_self.into_inner(), rhs.into_inner()) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "div", - |_self: Val, rhs: i8| { - let output: Val = { - { - let output: Val = >::div(_self.into_inner(), rhs) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "div_euclid", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::I8Vec2::div_euclid( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns the element-wise quotient of [Euclidean division] of `self` by `rhs`.\n # Panics\n This function will panic if any `rhs` element is 0 or the division results in overflow.", - &["_self", "rhs"], - ) - .register_documented( - "dot", - |_self: Val, rhs: Val| { - let output: i8 = { - { - let output: i8 = bevy::math::I8Vec2::dot( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Computes the dot product of `self` and `rhs`.", - &["_self", "rhs"], - ) - .register_documented( - "dot_into_vec", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::I8Vec2::dot_into_vec( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector where every component is the dot product of `self` and `rhs`.", - &["_self", "rhs"], - ) - .register_documented( - "element_product", - |_self: Val| { - let output: i8 = { - { - let output: i8 = bevy::math::I8Vec2::element_product( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns the product of all elements of `self`.\n In other words, this computes `self.x * self.y * ..`.", - &["_self"], - ) - .register_documented( - "element_sum", - |_self: Val| { - let output: i8 = { - { - let output: i8 = bevy::math::I8Vec2::element_sum( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns the sum of all elements of `self`.\n In other words, this computes `self.x + self.y + ..`.", - &["_self"], - ) - .register_documented( - "eq", - |_self: Ref, other: Ref| { - let output: bool = { - { - let output: bool = >::eq(&_self, &other) - .into(); - output - } - }; - output - }, - "", - &["_self", "other"], - ) - .register_documented( - "extend", - |_self: Val, z: i8| { - let output: Val = { - { - let output: Val = bevy::math::I8Vec2::extend( - _self.into_inner(), - z, - ) - .into(); - output - } - }; - output - }, - " Creates a 3D vector from `self` and the given `z` value.", - &["_self", "z"], - ) - .register_documented( - "from_array", - |a: [i8; 2]| { - let output: Val = { - { - let output: Val = bevy::math::I8Vec2::from_array( - a, - ) - .into(); - output - } - }; - output - }, - " Creates a new vector from an array.", - &["a"], - ) - .register_documented( - "is_negative_bitmask", - |_self: Val| { - let output: u32 = { - { - let output: u32 = bevy::math::I8Vec2::is_negative_bitmask( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a bitmask with the lowest 2 bits set to the sign bits from the elements of `self`.\n A negative element results in a `1` bit and a positive element in a `0` bit. Element `x` goes\n into the first lowest bit, element `y` into the second, etc.", - &["_self"], - ) - .register_documented( - "length_squared", - |_self: Val| { - let output: i8 = { - { - let output: i8 = bevy::math::I8Vec2::length_squared( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Computes the squared length of `self`.", - &["_self"], - ) - .register_documented( - "max", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::I8Vec2::max( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector containing the maximum values for each element of `self` and `rhs`.\n In other words this computes `[self.x.max(rhs.x), self.y.max(rhs.y), ..]`.", - &["_self", "rhs"], - ) - .register_documented( - "max_element", - |_self: Val| { - let output: i8 = { - { - let output: i8 = bevy::math::I8Vec2::max_element( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns the horizontal maximum of `self`.\n In other words this computes `max(x, y, ..)`.", - &["_self"], - ) - .register_documented( - "min", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::I8Vec2::min( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector containing the minimum values for each element of `self` and `rhs`.\n In other words this computes `[self.x.min(rhs.x), self.y.min(rhs.y), ..]`.", - &["_self", "rhs"], - ) - .register_documented( - "min_element", - |_self: Val| { - let output: i8 = { - { - let output: i8 = bevy::math::I8Vec2::min_element( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns the horizontal minimum of `self`.\n In other words this computes `min(x, y, ..)`.", - &["_self"], - ) - .register_documented( - "mul", - |_self: Val, rhs: Ref| { - let output: Val = { - { - let output: Val = >::mul(_self.into_inner(), &rhs) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "mul", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = >::mul(_self.into_inner(), rhs.into_inner()) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "mul", - |_self: Val, rhs: i8| { - let output: Val = { - { - let output: Val = >::mul(_self.into_inner(), rhs) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "neg", - |_self: Val| { - let output: Val = { - { - let output: Val = ::neg( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - "", - &["_self"], - ) - .register_documented( - "new", - |x: i8, y: i8| { - let output: Val = { - { - let output: Val = bevy::math::I8Vec2::new( - x, - y, - ) - .into(); - output - } - }; - output - }, - " Creates a new vector.", - &["x", "y"], - ) - .register_documented( - "perp", - |_self: Val| { - let output: Val = { - { - let output: Val = bevy::math::I8Vec2::perp( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector that is equal to `self` rotated by 90 degrees.", - &["_self"], - ) - .register_documented( - "perp_dot", - |_self: Val, rhs: Val| { - let output: i8 = { - { - let output: i8 = bevy::math::I8Vec2::perp_dot( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " The perpendicular dot product of `self` and `rhs`.\n Also known as the wedge product, 2D cross product, and determinant.", - &["_self", "rhs"], - ) - .register_documented( - "rem", - |_self: Val, rhs: Ref| { - let output: Val = { - { - let output: Val = >::rem(_self.into_inner(), &rhs) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "rem", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = >::rem(_self.into_inner(), rhs.into_inner()) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "rem", - |_self: Val, rhs: i8| { - let output: Val = { - { - let output: Val = >::rem(_self.into_inner(), rhs) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "rem_euclid", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::I8Vec2::rem_euclid( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns the element-wise remainder of [Euclidean division] of `self` by `rhs`.\n # Panics\n This function will panic if any `rhs` element is 0 or the division results in overflow.\n [Euclidean division]: i8::rem_euclid", - &["_self", "rhs"], - ) - .register_documented( - "rotate", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::I8Vec2::rotate( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns `rhs` rotated by the angle of `self`. If `self` is normalized,\n then this just rotation. This is what you usually want. Otherwise,\n it will be like a rotation with a multiplication by `self`'s length.", - &["_self", "rhs"], - ) - .register_documented( - "saturating_add", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::I8Vec2::saturating_add( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector containing the saturating addition of `self` and `rhs`.\n In other words this computes `[self.x.saturating_add(rhs.x), self.y.saturating_add(rhs.y), ..]`.", - &["_self", "rhs"], - ) - .register_documented( - "saturating_add_unsigned", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::I8Vec2::saturating_add_unsigned( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " In other words this computes `[self.x.saturating_add_unsigned(rhs.x), self.y.saturating_add_unsigned(rhs.y), ..]`.", - &["_self", "rhs"], - ) - .register_documented( - "saturating_div", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::I8Vec2::saturating_div( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector containing the saturating division of `self` and `rhs`.\n In other words this computes `[self.x.saturating_div(rhs.x), self.y.saturating_div(rhs.y), ..]`.", - &["_self", "rhs"], - ) - .register_documented( - "saturating_mul", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::I8Vec2::saturating_mul( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector containing the saturating multiplication of `self` and `rhs`.\n In other words this computes `[self.x.saturating_mul(rhs.x), self.y.saturating_mul(rhs.y), ..]`.", - &["_self", "rhs"], - ) - .register_documented( - "saturating_sub", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::I8Vec2::saturating_sub( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector containing the saturating subtraction of `self` and `rhs`.\n In other words this computes `[self.x.saturating_sub(rhs.x), self.y.saturating_sub(rhs.y), ..]`.", - &["_self", "rhs"], - ) - .register_documented( - "saturating_sub_unsigned", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::I8Vec2::saturating_sub_unsigned( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector containing the saturating subtraction of `self` and unsigned vector `rhs`.\n In other words this computes `[self.x.saturating_sub_unsigned(rhs.x), self.y.saturating_sub_unsigned(rhs.y), ..]`.", - &["_self", "rhs"], - ) - .register_documented( - "select", - | - mask: Val, - if_true: Val, - if_false: Val| - { - let output: Val = { - { - let output: Val = bevy::math::I8Vec2::select( - mask.into_inner(), - if_true.into_inner(), - if_false.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Creates a vector from the elements in `if_true` and `if_false`, selecting which to use\n for each element of `self`.\n A true element in the mask uses the corresponding element from `if_true`, and false\n uses the element from `if_false`.", - &["mask", "if_true", "if_false"], - ) - .register_documented( - "signum", - |_self: Val| { - let output: Val = { - { - let output: Val = bevy::math::I8Vec2::signum( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector with elements representing the sign of `self`.\n - `0` if the number is zero\n - `1` if the number is positive\n - `-1` if the number is negative", - &["_self"], - ) - .register_documented( - "splat", - |v: i8| { - let output: Val = { - { - let output: Val = bevy::math::I8Vec2::splat( - v, - ) - .into(); - output - } - }; - output - }, - " Creates a vector with all elements set to `v`.", - &["v"], - ) - .register_documented( - "sub", - |_self: Val, rhs: Ref| { - let output: Val = { - { - let output: Val = >::sub(_self.into_inner(), &rhs) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "sub", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = >::sub(_self.into_inner(), rhs.into_inner()) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "sub", - |_self: Val, rhs: i8| { - let output: Val = { - { - let output: Val = >::sub(_self.into_inner(), rhs) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "to_array", - |_self: Ref| { - let output: [i8; 2] = { - { - let output: [i8; 2] = bevy::math::I8Vec2::to_array(&_self) - .into(); - output - } - }; - output - }, - " `[x, y]`", - &["_self"], - ) - .register_documented( - "with_x", - |_self: Val, x: i8| { - let output: Val = { - { - let output: Val = bevy::math::I8Vec2::with_x( - _self.into_inner(), - x, - ) - .into(); - output - } - }; - output - }, - " Creates a 2D vector from `self` with the given value of `x`.", - &["_self", "x"], - ) - .register_documented( - "with_y", - |_self: Val, y: i8| { - let output: Val = { - { - let output: Val = bevy::math::I8Vec2::with_y( - _self.into_inner(), - y, - ) - .into(); - output - } - }; - output - }, - " Creates a 2D vector from `self` with the given value of `y`.", - &["_self", "y"], - ) - .register_documented( - "wrapping_add", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::I8Vec2::wrapping_add( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector containing the wrapping addition of `self` and `rhs`.\n In other words this computes `[self.x.wrapping_add(rhs.x), self.y.wrapping_add(rhs.y), ..]`.", - &["_self", "rhs"], - ) - .register_documented( - "wrapping_add_unsigned", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::I8Vec2::wrapping_add_unsigned( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector containing the wrapping addition of `self` and unsigned vector `rhs`.\n In other words this computes `[self.x.wrapping_add_unsigned(rhs.x), self.y.wrapping_add_unsigned(rhs.y), ..]`.", - &["_self", "rhs"], - ) - .register_documented( - "wrapping_div", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::I8Vec2::wrapping_div( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector containing the wrapping division of `self` and `rhs`.\n In other words this computes `[self.x.wrapping_div(rhs.x), self.y.wrapping_div(rhs.y), ..]`.", - &["_self", "rhs"], - ) - .register_documented( - "wrapping_mul", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::I8Vec2::wrapping_mul( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector containing the wrapping multiplication of `self` and `rhs`.\n In other words this computes `[self.x.wrapping_mul(rhs.x), self.y.wrapping_mul(rhs.y), ..]`.", - &["_self", "rhs"], - ) - .register_documented( - "wrapping_sub", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::I8Vec2::wrapping_sub( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector containing the wrapping subtraction of `self` and `rhs`.\n In other words this computes `[self.x.wrapping_sub(rhs.x), self.y.wrapping_sub(rhs.y), ..]`.", - &["_self", "rhs"], - ) - .register_documented( - "wrapping_sub_unsigned", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::I8Vec2::wrapping_sub_unsigned( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector containing the wrapping subtraction of `self` and unsigned vector `rhs`.\n In other words this computes `[self.x.wrapping_sub_unsigned(rhs.x), self.y.wrapping_sub_unsigned(rhs.y), ..]`.", - &["_self", "rhs"], - ); - let registry = world - .get_resource_or_init::(); - let mut registry = registry.write(); - registry - .register_type_data::< - bevy::math::I8Vec2, - bevy_mod_scripting_core::bindings::MarkAsGenerated, - >(); - } - pub(crate) fn register_i_8_vec_3_functions(world: &mut bevy::ecs::world::World) { - bevy_mod_scripting_core::bindings::function::namespace::NamespaceBuilder::< - bevy::math::I8Vec3, - >::new(world) - .register_documented( - "abs", - |_self: Val| { - let output: Val = { - { - let output: Val = bevy::math::I8Vec3::abs( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector containing the absolute value of each element of `self`.", - &["_self"], - ) - .register_documented( - "add", - |_self: Val, rhs: Ref| { - let output: Val = { - { - let output: Val = >::add(_self.into_inner(), &rhs) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "add", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = >::add(_self.into_inner(), rhs.into_inner()) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "add", - |_self: Val, rhs: i8| { - let output: Val = { - { - let output: Val = >::add(_self.into_inner(), rhs) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "as_dvec3", - |_self: Ref| { - let output: Val = { - { - let output: Val = bevy::math::I8Vec3::as_dvec3( - &_self, - ) - .into(); - output - } - }; - output - }, - " Casts all elements of `self` to `f64`.", - &["_self"], - ) - .register_documented( - "as_i16vec3", - |_self: Ref| { - let output: Val = { - { - let output: Val = bevy::math::I8Vec3::as_i16vec3( - &_self, - ) - .into(); - output - } - }; - output - }, - " Casts all elements of `self` to `i16`.", - &["_self"], - ) - .register_documented( - "as_i64vec3", - |_self: Ref| { - let output: Val = { - { - let output: Val = bevy::math::I8Vec3::as_i64vec3( - &_self, - ) - .into(); - output - } - }; - output - }, - " Casts all elements of `self` to `i64`.", - &["_self"], - ) - .register_documented( - "as_ivec3", - |_self: Ref| { - let output: Val = { - { - let output: Val = bevy::math::I8Vec3::as_ivec3( - &_self, - ) - .into(); - output - } - }; - output - }, - " Casts all elements of `self` to `i32`.", - &["_self"], - ) - .register_documented( - "as_u16vec3", - |_self: Ref| { - let output: Val = { - { - let output: Val = bevy::math::I8Vec3::as_u16vec3( - &_self, - ) - .into(); - output - } - }; - output - }, - " Casts all elements of `self` to `u16`.", - &["_self"], - ) - .register_documented( - "as_u64vec3", - |_self: Ref| { - let output: Val = { - { - let output: Val = bevy::math::I8Vec3::as_u64vec3( - &_self, - ) - .into(); - output - } - }; - output - }, - " Casts all elements of `self` to `u64`.", - &["_self"], - ) - .register_documented( - "as_u8vec3", - |_self: Ref| { - let output: Val = { - { - let output: Val = bevy::math::I8Vec3::as_u8vec3( - &_self, - ) - .into(); - output - } - }; - output - }, - " Casts all elements of `self` to `u8`.", - &["_self"], - ) - .register_documented( - "as_uvec3", - |_self: Ref| { - let output: Val = { - { - let output: Val = bevy::math::I8Vec3::as_uvec3( - &_self, - ) - .into(); - output - } - }; - output - }, - " Casts all elements of `self` to `u32`.", - &["_self"], - ) - .register_documented( - "as_vec3", - |_self: Ref| { - let output: Val = { - { - let output: Val = bevy::math::I8Vec3::as_vec3( - &_self, - ) - .into(); - output - } - }; - output - }, - " Casts all elements of `self` to `f32`.", - &["_self"], - ) - .register_documented( - "as_vec3a", - |_self: Ref| { - let output: Val = { - { - let output: Val = bevy::math::I8Vec3::as_vec3a( - &_self, - ) - .into(); - output - } - }; - output - }, - " Casts all elements of `self` to `f32`.", - &["_self"], - ) - .register_documented( - "assert_receiver_is_total_eq", - |_self: Ref| { - let output: () = { - { - let output: () = ::assert_receiver_is_total_eq( - &_self, - ) - .into(); - output - } - }; - output - }, - "", - &["_self"], - ) - .register_documented( - "clamp", - | - _self: Val, - min: Val, - max: Val| - { - let output: Val = { - { - let output: Val = bevy::math::I8Vec3::clamp( - _self.into_inner(), - min.into_inner(), - max.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Component-wise clamping of values, similar to [`i8::clamp`].\n Each element in `min` must be less-or-equal to the corresponding element in `max`.\n # Panics\n Will panic if `min` is greater than `max` when `glam_assert` is enabled.", - &["_self", "min", "max"], - ) - .register_documented( - "clone", - |_self: Ref| { - let output: Val = { - { - let output: Val = ::clone( - &_self, - ) - .into(); - output - } - }; - output - }, - "", - &["_self"], - ) - .register_documented( - "cmpeq", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::I8Vec3::cmpeq( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector mask containing the result of a `==` comparison for each element of\n `self` and `rhs`.\n In other words, this computes `[self.x == rhs.x, self.y == rhs.y, ..]` for all\n elements.", - &["_self", "rhs"], - ) - .register_documented( - "cmpge", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::I8Vec3::cmpge( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector mask containing the result of a `>=` comparison for each element of\n `self` and `rhs`.\n In other words this computes `[self.x >= rhs.x, self.y >= rhs.y, ..]` for all\n elements.", - &["_self", "rhs"], - ) - .register_documented( - "cmpgt", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::I8Vec3::cmpgt( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector mask containing the result of a `>` comparison for each element of\n `self` and `rhs`.\n In other words this computes `[self.x > rhs.x, self.y > rhs.y, ..]` for all\n elements.", - &["_self", "rhs"], - ) - .register_documented( - "cmple", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::I8Vec3::cmple( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector mask containing the result of a `<=` comparison for each element of\n `self` and `rhs`.\n In other words this computes `[self.x <= rhs.x, self.y <= rhs.y, ..]` for all\n elements.", - &["_self", "rhs"], - ) - .register_documented( - "cmplt", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::I8Vec3::cmplt( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector mask containing the result of a `<` comparison for each element of\n `self` and `rhs`.\n In other words this computes `[self.x < rhs.x, self.y < rhs.y, ..]` for all\n elements.", - &["_self", "rhs"], - ) - .register_documented( - "cmpne", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::I8Vec3::cmpne( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector mask containing the result of a `!=` comparison for each element of\n `self` and `rhs`.\n In other words this computes `[self.x != rhs.x, self.y != rhs.y, ..]` for all\n elements.", - &["_self", "rhs"], - ) - .register_documented( - "cross", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::I8Vec3::cross( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Computes the cross product of `self` and `rhs`.", - &["_self", "rhs"], - ) - .register_documented( - "distance_squared", - |_self: Val, rhs: Val| { - let output: i8 = { - { - let output: i8 = bevy::math::I8Vec3::distance_squared( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Compute the squared euclidean distance between two points in space.", - &["_self", "rhs"], - ) - .register_documented( - "div", - |_self: Val, rhs: Ref| { - let output: Val = { - { - let output: Val = >::div(_self.into_inner(), &rhs) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "div", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = >::div(_self.into_inner(), rhs.into_inner()) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "div", - |_self: Val, rhs: i8| { - let output: Val = { - { - let output: Val = >::div(_self.into_inner(), rhs) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "div_euclid", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::I8Vec3::div_euclid( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns the element-wise quotient of [Euclidean division] of `self` by `rhs`.\n # Panics\n This function will panic if any `rhs` element is 0 or the division results in overflow.", - &["_self", "rhs"], - ) - .register_documented( - "dot", - |_self: Val, rhs: Val| { - let output: i8 = { - { - let output: i8 = bevy::math::I8Vec3::dot( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Computes the dot product of `self` and `rhs`.", - &["_self", "rhs"], - ) - .register_documented( - "dot_into_vec", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::I8Vec3::dot_into_vec( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector where every component is the dot product of `self` and `rhs`.", - &["_self", "rhs"], - ) - .register_documented( - "element_product", - |_self: Val| { - let output: i8 = { - { - let output: i8 = bevy::math::I8Vec3::element_product( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns the product of all elements of `self`.\n In other words, this computes `self.x * self.y * ..`.", - &["_self"], - ) - .register_documented( - "element_sum", - |_self: Val| { - let output: i8 = { - { - let output: i8 = bevy::math::I8Vec3::element_sum( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns the sum of all elements of `self`.\n In other words, this computes `self.x + self.y + ..`.", - &["_self"], - ) - .register_documented( - "eq", - |_self: Ref, other: Ref| { - let output: bool = { - { - let output: bool = >::eq(&_self, &other) - .into(); - output - } - }; - output - }, - "", - &["_self", "other"], - ) - .register_documented( - "extend", - |_self: Val, w: i8| { - let output: Val = { - { - let output: Val = bevy::math::I8Vec3::extend( - _self.into_inner(), - w, - ) - .into(); - output - } - }; - output - }, - " Creates a 4D vector from `self` and the given `w` value.", - &["_self", "w"], - ) - .register_documented( - "from_array", - |a: [i8; 3]| { - let output: Val = { - { - let output: Val = bevy::math::I8Vec3::from_array( - a, - ) - .into(); - output - } - }; - output - }, - " Creates a new vector from an array.", - &["a"], - ) - .register_documented( - "is_negative_bitmask", - |_self: Val| { - let output: u32 = { - { - let output: u32 = bevy::math::I8Vec3::is_negative_bitmask( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a bitmask with the lowest 3 bits set to the sign bits from the elements of `self`.\n A negative element results in a `1` bit and a positive element in a `0` bit. Element `x` goes\n into the first lowest bit, element `y` into the second, etc.", - &["_self"], - ) - .register_documented( - "length_squared", - |_self: Val| { - let output: i8 = { - { - let output: i8 = bevy::math::I8Vec3::length_squared( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Computes the squared length of `self`.", - &["_self"], - ) - .register_documented( - "max", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::I8Vec3::max( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector containing the maximum values for each element of `self` and `rhs`.\n In other words this computes `[self.x.max(rhs.x), self.y.max(rhs.y), ..]`.", - &["_self", "rhs"], - ) - .register_documented( - "max_element", - |_self: Val| { - let output: i8 = { - { - let output: i8 = bevy::math::I8Vec3::max_element( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns the horizontal maximum of `self`.\n In other words this computes `max(x, y, ..)`.", - &["_self"], - ) - .register_documented( - "min", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::I8Vec3::min( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector containing the minimum values for each element of `self` and `rhs`.\n In other words this computes `[self.x.min(rhs.x), self.y.min(rhs.y), ..]`.", - &["_self", "rhs"], - ) - .register_documented( - "min_element", - |_self: Val| { - let output: i8 = { - { - let output: i8 = bevy::math::I8Vec3::min_element( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns the horizontal minimum of `self`.\n In other words this computes `min(x, y, ..)`.", - &["_self"], - ) - .register_documented( - "mul", - |_self: Val, rhs: Ref| { - let output: Val = { - { - let output: Val = >::mul(_self.into_inner(), &rhs) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "mul", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = >::mul(_self.into_inner(), rhs.into_inner()) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "mul", - |_self: Val, rhs: i8| { - let output: Val = { - { - let output: Val = >::mul(_self.into_inner(), rhs) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "neg", - |_self: Val| { - let output: Val = { - { - let output: Val = ::neg( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - "", - &["_self"], - ) - .register_documented( - "new", - |x: i8, y: i8, z: i8| { - let output: Val = { - { - let output: Val = bevy::math::I8Vec3::new( - x, - y, - z, - ) - .into(); - output - } - }; - output - }, - " Creates a new vector.", - &["x", "y", "z"], - ) - .register_documented( - "rem", - |_self: Val, rhs: Ref| { - let output: Val = { - { - let output: Val = >::rem(_self.into_inner(), &rhs) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "rem", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = >::rem(_self.into_inner(), rhs.into_inner()) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "rem", - |_self: Val, rhs: i8| { - let output: Val = { - { - let output: Val = >::rem(_self.into_inner(), rhs) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "rem_euclid", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::I8Vec3::rem_euclid( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns the element-wise remainder of [Euclidean division] of `self` by `rhs`.\n # Panics\n This function will panic if any `rhs` element is 0 or the division results in overflow.\n [Euclidean division]: i8::rem_euclid", - &["_self", "rhs"], - ) - .register_documented( - "saturating_add", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::I8Vec3::saturating_add( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector containing the saturating addition of `self` and `rhs`.\n In other words this computes `[self.x.saturating_add(rhs.x), self.y.saturating_add(rhs.y), ..]`.", - &["_self", "rhs"], - ) - .register_documented( - "saturating_add_unsigned", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::I8Vec3::saturating_add_unsigned( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " In other words this computes `[self.x.saturating_add_unsigned(rhs.x), self.y.saturating_add_unsigned(rhs.y), ..]`.", - &["_self", "rhs"], - ) - .register_documented( - "saturating_div", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::I8Vec3::saturating_div( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector containing the saturating division of `self` and `rhs`.\n In other words this computes `[self.x.saturating_div(rhs.x), self.y.saturating_div(rhs.y), ..]`.", - &["_self", "rhs"], - ) - .register_documented( - "saturating_mul", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::I8Vec3::saturating_mul( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector containing the saturating multiplication of `self` and `rhs`.\n In other words this computes `[self.x.saturating_mul(rhs.x), self.y.saturating_mul(rhs.y), ..]`.", - &["_self", "rhs"], - ) - .register_documented( - "saturating_sub", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::I8Vec3::saturating_sub( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector containing the saturating subtraction of `self` and `rhs`.\n In other words this computes `[self.x.saturating_sub(rhs.x), self.y.saturating_sub(rhs.y), ..]`.", - &["_self", "rhs"], - ) - .register_documented( - "saturating_sub_unsigned", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::I8Vec3::saturating_sub_unsigned( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector containing the saturating subtraction of `self` and unsigned vector `rhs`.\n In other words this computes `[self.x.saturating_sub_unsigned(rhs.x), self.y.saturating_sub_unsigned(rhs.y), ..]`.", - &["_self", "rhs"], - ) - .register_documented( - "select", - | - mask: Val, - if_true: Val, - if_false: Val| - { - let output: Val = { - { - let output: Val = bevy::math::I8Vec3::select( - mask.into_inner(), - if_true.into_inner(), - if_false.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Creates a vector from the elements in `if_true` and `if_false`, selecting which to use\n for each element of `self`.\n A true element in the mask uses the corresponding element from `if_true`, and false\n uses the element from `if_false`.", - &["mask", "if_true", "if_false"], - ) - .register_documented( - "signum", - |_self: Val| { - let output: Val = { - { - let output: Val = bevy::math::I8Vec3::signum( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector with elements representing the sign of `self`.\n - `0` if the number is zero\n - `1` if the number is positive\n - `-1` if the number is negative", - &["_self"], - ) - .register_documented( - "splat", - |v: i8| { - let output: Val = { - { - let output: Val = bevy::math::I8Vec3::splat( - v, - ) - .into(); - output - } - }; - output - }, - " Creates a vector with all elements set to `v`.", - &["v"], - ) - .register_documented( - "sub", - |_self: Val, rhs: Ref| { - let output: Val = { - { - let output: Val = >::sub(_self.into_inner(), &rhs) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "sub", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = >::sub(_self.into_inner(), rhs.into_inner()) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "sub", - |_self: Val, rhs: i8| { - let output: Val = { - { - let output: Val = >::sub(_self.into_inner(), rhs) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "to_array", - |_self: Ref| { - let output: [i8; 3] = { - { - let output: [i8; 3] = bevy::math::I8Vec3::to_array(&_self) - .into(); - output - } - }; - output - }, - " `[x, y, z]`", - &["_self"], - ) - .register_documented( - "truncate", - |_self: Val| { - let output: Val = { - { - let output: Val = bevy::math::I8Vec3::truncate( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Creates a 2D vector from the `x` and `y` elements of `self`, discarding `z`.\n Truncation may also be performed by using [`self.xy()`][crate::swizzles::Vec3Swizzles::xy()].", - &["_self"], - ) - .register_documented( - "with_x", - |_self: Val, x: i8| { - let output: Val = { - { - let output: Val = bevy::math::I8Vec3::with_x( - _self.into_inner(), - x, - ) - .into(); - output - } - }; - output - }, - " Creates a 3D vector from `self` with the given value of `x`.", - &["_self", "x"], - ) - .register_documented( - "with_y", - |_self: Val, y: i8| { - let output: Val = { - { - let output: Val = bevy::math::I8Vec3::with_y( - _self.into_inner(), - y, - ) - .into(); - output - } - }; - output - }, - " Creates a 3D vector from `self` with the given value of `y`.", - &["_self", "y"], - ) - .register_documented( - "with_z", - |_self: Val, z: i8| { - let output: Val = { - { - let output: Val = bevy::math::I8Vec3::with_z( - _self.into_inner(), - z, - ) - .into(); - output - } - }; - output - }, - " Creates a 3D vector from `self` with the given value of `z`.", - &["_self", "z"], - ) - .register_documented( - "wrapping_add", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::I8Vec3::wrapping_add( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector containing the wrapping addition of `self` and `rhs`.\n In other words this computes `[self.x.wrapping_add(rhs.x), self.y.wrapping_add(rhs.y), ..]`.", - &["_self", "rhs"], - ) - .register_documented( - "wrapping_add_unsigned", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::I8Vec3::wrapping_add_unsigned( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector containing the wrapping addition of `self` and unsigned vector `rhs`.\n In other words this computes `[self.x.wrapping_add_unsigned(rhs.x), self.y.wrapping_add_unsigned(rhs.y), ..]`.", - &["_self", "rhs"], - ) - .register_documented( - "wrapping_div", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::I8Vec3::wrapping_div( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector containing the wrapping division of `self` and `rhs`.\n In other words this computes `[self.x.wrapping_div(rhs.x), self.y.wrapping_div(rhs.y), ..]`.", - &["_self", "rhs"], - ) - .register_documented( - "wrapping_mul", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::I8Vec3::wrapping_mul( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector containing the wrapping multiplication of `self` and `rhs`.\n In other words this computes `[self.x.wrapping_mul(rhs.x), self.y.wrapping_mul(rhs.y), ..]`.", - &["_self", "rhs"], - ) - .register_documented( - "wrapping_sub", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::I8Vec3::wrapping_sub( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector containing the wrapping subtraction of `self` and `rhs`.\n In other words this computes `[self.x.wrapping_sub(rhs.x), self.y.wrapping_sub(rhs.y), ..]`.", - &["_self", "rhs"], - ) - .register_documented( - "wrapping_sub_unsigned", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::I8Vec3::wrapping_sub_unsigned( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector containing the wrapping subtraction of `self` and unsigned vector `rhs`.\n In other words this computes `[self.x.wrapping_sub_unsigned(rhs.x), self.y.wrapping_sub_unsigned(rhs.y), ..]`.", - &["_self", "rhs"], - ); - let registry = world - .get_resource_or_init::(); - let mut registry = registry.write(); - registry - .register_type_data::< - bevy::math::I8Vec3, - bevy_mod_scripting_core::bindings::MarkAsGenerated, - >(); - } - pub(crate) fn register_i_8_vec_4_functions(world: &mut bevy::ecs::world::World) { - bevy_mod_scripting_core::bindings::function::namespace::NamespaceBuilder::< - bevy::math::I8Vec4, - >::new(world) - .register_documented( - "abs", - |_self: Val| { - let output: Val = { - { - let output: Val = bevy::math::I8Vec4::abs( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector containing the absolute value of each element of `self`.", - &["_self"], - ) - .register_documented( - "add", - |_self: Val, rhs: Ref| { - let output: Val = { - { - let output: Val = >::add(_self.into_inner(), &rhs) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "add", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = >::add(_self.into_inner(), rhs.into_inner()) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "add", - |_self: Val, rhs: i8| { - let output: Val = { - { - let output: Val = >::add(_self.into_inner(), rhs) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "as_dvec4", - |_self: Ref| { - let output: Val = { - { - let output: Val = bevy::math::I8Vec4::as_dvec4( - &_self, - ) - .into(); - output - } - }; - output - }, - " Casts all elements of `self` to `f64`.", - &["_self"], - ) - .register_documented( - "as_i16vec4", - |_self: Ref| { - let output: Val = { - { - let output: Val = bevy::math::I8Vec4::as_i16vec4( - &_self, - ) - .into(); - output - } - }; - output - }, - " Casts all elements of `self` to `i16`.", - &["_self"], - ) - .register_documented( - "as_i64vec4", - |_self: Ref| { - let output: Val = { - { - let output: Val = bevy::math::I8Vec4::as_i64vec4( - &_self, - ) - .into(); - output - } - }; - output - }, - " Casts all elements of `self` to `i64`.", - &["_self"], - ) - .register_documented( - "as_ivec4", - |_self: Ref| { - let output: Val = { - { - let output: Val = bevy::math::I8Vec4::as_ivec4( - &_self, - ) - .into(); - output - } - }; - output - }, - " Casts all elements of `self` to `i32`.", - &["_self"], - ) - .register_documented( - "as_u16vec4", - |_self: Ref| { - let output: Val = { - { - let output: Val = bevy::math::I8Vec4::as_u16vec4( - &_self, - ) - .into(); - output - } - }; - output - }, - " Casts all elements of `self` to `u16`.", - &["_self"], - ) - .register_documented( - "as_u64vec4", - |_self: Ref| { - let output: Val = { - { - let output: Val = bevy::math::I8Vec4::as_u64vec4( - &_self, - ) - .into(); - output - } - }; - output - }, - " Casts all elements of `self` to `u64`.", - &["_self"], - ) - .register_documented( - "as_u8vec4", - |_self: Ref| { - let output: Val = { - { - let output: Val = bevy::math::I8Vec4::as_u8vec4( - &_self, - ) - .into(); - output - } - }; - output - }, - " Casts all elements of `self` to `u8`.", - &["_self"], - ) - .register_documented( - "as_uvec4", - |_self: Ref| { - let output: Val = { - { - let output: Val = bevy::math::I8Vec4::as_uvec4( - &_self, - ) - .into(); - output - } - }; - output - }, - " Casts all elements of `self` to `u32`.", - &["_self"], - ) - .register_documented( - "as_vec4", - |_self: Ref| { - let output: Val = { - { - let output: Val = bevy::math::I8Vec4::as_vec4( - &_self, - ) - .into(); - output - } - }; - output - }, - " Casts all elements of `self` to `f32`.", - &["_self"], - ) - .register_documented( - "assert_receiver_is_total_eq", - |_self: Ref| { - let output: () = { - { - let output: () = ::assert_receiver_is_total_eq( - &_self, - ) - .into(); - output - } - }; - output - }, - "", - &["_self"], - ) - .register_documented( - "clamp", - | - _self: Val, - min: Val, - max: Val| - { - let output: Val = { - { - let output: Val = bevy::math::I8Vec4::clamp( - _self.into_inner(), - min.into_inner(), - max.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Component-wise clamping of values, similar to [`i8::clamp`].\n Each element in `min` must be less-or-equal to the corresponding element in `max`.\n # Panics\n Will panic if `min` is greater than `max` when `glam_assert` is enabled.", - &["_self", "min", "max"], - ) - .register_documented( - "clone", - |_self: Ref| { - let output: Val = { - { - let output: Val = ::clone( - &_self, - ) - .into(); - output - } - }; - output - }, - "", - &["_self"], - ) - .register_documented( - "cmpeq", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::I8Vec4::cmpeq( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector mask containing the result of a `==` comparison for each element of\n `self` and `rhs`.\n In other words, this computes `[self.x == rhs.x, self.y == rhs.y, ..]` for all\n elements.", - &["_self", "rhs"], - ) - .register_documented( - "cmpge", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::I8Vec4::cmpge( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector mask containing the result of a `>=` comparison for each element of\n `self` and `rhs`.\n In other words this computes `[self.x >= rhs.x, self.y >= rhs.y, ..]` for all\n elements.", - &["_self", "rhs"], - ) - .register_documented( - "cmpgt", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::I8Vec4::cmpgt( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector mask containing the result of a `>` comparison for each element of\n `self` and `rhs`.\n In other words this computes `[self.x > rhs.x, self.y > rhs.y, ..]` for all\n elements.", - &["_self", "rhs"], - ) - .register_documented( - "cmple", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::I8Vec4::cmple( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector mask containing the result of a `<=` comparison for each element of\n `self` and `rhs`.\n In other words this computes `[self.x <= rhs.x, self.y <= rhs.y, ..]` for all\n elements.", - &["_self", "rhs"], - ) - .register_documented( - "cmplt", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::I8Vec4::cmplt( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector mask containing the result of a `<` comparison for each element of\n `self` and `rhs`.\n In other words this computes `[self.x < rhs.x, self.y < rhs.y, ..]` for all\n elements.", - &["_self", "rhs"], - ) - .register_documented( - "cmpne", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::I8Vec4::cmpne( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector mask containing the result of a `!=` comparison for each element of\n `self` and `rhs`.\n In other words this computes `[self.x != rhs.x, self.y != rhs.y, ..]` for all\n elements.", - &["_self", "rhs"], - ) - .register_documented( - "distance_squared", - |_self: Val, rhs: Val| { - let output: i8 = { - { - let output: i8 = bevy::math::I8Vec4::distance_squared( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Compute the squared euclidean distance between two points in space.", - &["_self", "rhs"], - ) - .register_documented( - "div", - |_self: Val, rhs: Ref| { - let output: Val = { - { - let output: Val = >::div(_self.into_inner(), &rhs) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "div", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = >::div(_self.into_inner(), rhs.into_inner()) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "div", - |_self: Val, rhs: i8| { - let output: Val = { - { - let output: Val = >::div(_self.into_inner(), rhs) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "div_euclid", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::I8Vec4::div_euclid( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns the element-wise quotient of [Euclidean division] of `self` by `rhs`.\n # Panics\n This function will panic if any `rhs` element is 0 or the division results in overflow.", - &["_self", "rhs"], - ) - .register_documented( - "dot", - |_self: Val, rhs: Val| { - let output: i8 = { - { - let output: i8 = bevy::math::I8Vec4::dot( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Computes the dot product of `self` and `rhs`.", - &["_self", "rhs"], - ) - .register_documented( - "dot_into_vec", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::I8Vec4::dot_into_vec( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector where every component is the dot product of `self` and `rhs`.", - &["_self", "rhs"], - ) - .register_documented( - "element_product", - |_self: Val| { - let output: i8 = { - { - let output: i8 = bevy::math::I8Vec4::element_product( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns the product of all elements of `self`.\n In other words, this computes `self.x * self.y * ..`.", - &["_self"], - ) - .register_documented( - "element_sum", - |_self: Val| { - let output: i8 = { - { - let output: i8 = bevy::math::I8Vec4::element_sum( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns the sum of all elements of `self`.\n In other words, this computes `self.x + self.y + ..`.", - &["_self"], - ) - .register_documented( - "eq", - |_self: Ref, other: Ref| { - let output: bool = { - { - let output: bool = >::eq(&_self, &other) - .into(); - output - } - }; - output - }, - "", - &["_self", "other"], - ) - .register_documented( - "from_array", - |a: [i8; 4]| { - let output: Val = { - { - let output: Val = bevy::math::I8Vec4::from_array( - a, - ) - .into(); - output - } - }; - output - }, - " Creates a new vector from an array.", - &["a"], - ) - .register_documented( - "is_negative_bitmask", - |_self: Val| { - let output: u32 = { - { - let output: u32 = bevy::math::I8Vec4::is_negative_bitmask( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a bitmask with the lowest 4 bits set to the sign bits from the elements of `self`.\n A negative element results in a `1` bit and a positive element in a `0` bit. Element `x` goes\n into the first lowest bit, element `y` into the second, etc.", - &["_self"], - ) - .register_documented( - "length_squared", - |_self: Val| { - let output: i8 = { - { - let output: i8 = bevy::math::I8Vec4::length_squared( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Computes the squared length of `self`.", - &["_self"], - ) - .register_documented( - "max", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::I8Vec4::max( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector containing the maximum values for each element of `self` and `rhs`.\n In other words this computes `[self.x.max(rhs.x), self.y.max(rhs.y), ..]`.", - &["_self", "rhs"], - ) - .register_documented( - "max_element", - |_self: Val| { - let output: i8 = { - { - let output: i8 = bevy::math::I8Vec4::max_element( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns the horizontal maximum of `self`.\n In other words this computes `max(x, y, ..)`.", - &["_self"], - ) - .register_documented( - "min", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::I8Vec4::min( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector containing the minimum values for each element of `self` and `rhs`.\n In other words this computes `[self.x.min(rhs.x), self.y.min(rhs.y), ..]`.", - &["_self", "rhs"], - ) - .register_documented( - "min_element", - |_self: Val| { - let output: i8 = { - { - let output: i8 = bevy::math::I8Vec4::min_element( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns the horizontal minimum of `self`.\n In other words this computes `min(x, y, ..)`.", - &["_self"], - ) - .register_documented( - "mul", - |_self: Val, rhs: Ref| { - let output: Val = { - { - let output: Val = >::mul(_self.into_inner(), &rhs) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "mul", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = >::mul(_self.into_inner(), rhs.into_inner()) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "mul", - |_self: Val, rhs: i8| { - let output: Val = { - { - let output: Val = >::mul(_self.into_inner(), rhs) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "neg", - |_self: Val| { - let output: Val = { - { - let output: Val = ::neg( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - "", - &["_self"], - ) - .register_documented( - "new", - |x: i8, y: i8, z: i8, w: i8| { - let output: Val = { - { - let output: Val = bevy::math::I8Vec4::new( - x, - y, - z, - w, - ) - .into(); - output - } - }; - output - }, - " Creates a new vector.", - &["x", "y", "z", "w"], - ) - .register_documented( - "rem", - |_self: Val, rhs: Ref| { - let output: Val = { - { - let output: Val = >::rem(_self.into_inner(), &rhs) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "rem", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = >::rem(_self.into_inner(), rhs.into_inner()) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "rem", - |_self: Val, rhs: i8| { - let output: Val = { - { - let output: Val = >::rem(_self.into_inner(), rhs) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "rem_euclid", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::I8Vec4::rem_euclid( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns the element-wise remainder of [Euclidean division] of `self` by `rhs`.\n # Panics\n This function will panic if any `rhs` element is 0 or the division results in overflow.\n [Euclidean division]: i8::rem_euclid", - &["_self", "rhs"], - ) - .register_documented( - "saturating_add", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::I8Vec4::saturating_add( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector containing the saturating addition of `self` and `rhs`.\n In other words this computes `[self.x.saturating_add(rhs.x), self.y.saturating_add(rhs.y), ..]`.", - &["_self", "rhs"], - ) - .register_documented( - "saturating_add_unsigned", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::I8Vec4::saturating_add_unsigned( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " In other words this computes `[self.x.saturating_add_unsigned(rhs.x), self.y.saturating_add_unsigned(rhs.y), ..]`.", - &["_self", "rhs"], - ) - .register_documented( - "saturating_div", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::I8Vec4::saturating_div( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector containing the saturating division of `self` and `rhs`.\n In other words this computes `[self.x.saturating_div(rhs.x), self.y.saturating_div(rhs.y), ..]`.", - &["_self", "rhs"], - ) - .register_documented( - "saturating_mul", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::I8Vec4::saturating_mul( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector containing the saturating multiplication of `self` and `rhs`.\n In other words this computes `[self.x.saturating_mul(rhs.x), self.y.saturating_mul(rhs.y), ..]`.", - &["_self", "rhs"], - ) - .register_documented( - "saturating_sub", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::I8Vec4::saturating_sub( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector containing the saturating subtraction of `self` and `rhs`.\n In other words this computes `[self.x.saturating_sub(rhs.x), self.y.saturating_sub(rhs.y), ..]`.", - &["_self", "rhs"], - ) - .register_documented( - "saturating_sub_unsigned", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::I8Vec4::saturating_sub_unsigned( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector containing the saturating subtraction of `self` and unsigned vector `rhs`.\n In other words this computes `[self.x.saturating_sub_unsigned(rhs.x), self.y.saturating_sub_unsigned(rhs.y), ..]`.", - &["_self", "rhs"], - ) - .register_documented( - "select", - | - mask: Val, - if_true: Val, - if_false: Val| - { - let output: Val = { - { - let output: Val = bevy::math::I8Vec4::select( - mask.into_inner(), - if_true.into_inner(), - if_false.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Creates a vector from the elements in `if_true` and `if_false`, selecting which to use\n for each element of `self`.\n A true element in the mask uses the corresponding element from `if_true`, and false\n uses the element from `if_false`.", - &["mask", "if_true", "if_false"], - ) - .register_documented( - "signum", - |_self: Val| { - let output: Val = { - { - let output: Val = bevy::math::I8Vec4::signum( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector with elements representing the sign of `self`.\n - `0` if the number is zero\n - `1` if the number is positive\n - `-1` if the number is negative", - &["_self"], - ) - .register_documented( - "splat", - |v: i8| { - let output: Val = { - { - let output: Val = bevy::math::I8Vec4::splat( - v, - ) - .into(); - output - } - }; - output - }, - " Creates a vector with all elements set to `v`.", - &["v"], - ) - .register_documented( - "sub", - |_self: Val, rhs: Ref| { - let output: Val = { - { - let output: Val = >::sub(_self.into_inner(), &rhs) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "sub", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = >::sub(_self.into_inner(), rhs.into_inner()) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "sub", - |_self: Val, rhs: i8| { - let output: Val = { - { - let output: Val = >::sub(_self.into_inner(), rhs) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "to_array", - |_self: Ref| { - let output: [i8; 4] = { - { - let output: [i8; 4] = bevy::math::I8Vec4::to_array(&_self) - .into(); - output - } - }; - output - }, - " `[x, y, z, w]`", - &["_self"], - ) - .register_documented( - "truncate", - |_self: Val| { - let output: Val = { - { - let output: Val = bevy::math::I8Vec4::truncate( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Creates a 3D vector from the `x`, `y` and `z` elements of `self`, discarding `w`.\n Truncation to [`I8Vec3`] may also be performed by using [`self.xyz()`][crate::swizzles::Vec4Swizzles::xyz()].", - &["_self"], - ) - .register_documented( - "with_w", - |_self: Val, w: i8| { - let output: Val = { - { - let output: Val = bevy::math::I8Vec4::with_w( - _self.into_inner(), - w, - ) - .into(); - output - } - }; - output - }, - " Creates a 4D vector from `self` with the given value of `w`.", - &["_self", "w"], - ) - .register_documented( - "with_x", - |_self: Val, x: i8| { - let output: Val = { - { - let output: Val = bevy::math::I8Vec4::with_x( - _self.into_inner(), - x, - ) - .into(); - output - } - }; - output - }, - " Creates a 4D vector from `self` with the given value of `x`.", - &["_self", "x"], - ) - .register_documented( - "with_y", - |_self: Val, y: i8| { - let output: Val = { - { - let output: Val = bevy::math::I8Vec4::with_y( - _self.into_inner(), - y, - ) - .into(); - output - } - }; - output - }, - " Creates a 4D vector from `self` with the given value of `y`.", - &["_self", "y"], - ) - .register_documented( - "with_z", - |_self: Val, z: i8| { - let output: Val = { - { - let output: Val = bevy::math::I8Vec4::with_z( - _self.into_inner(), - z, - ) - .into(); - output - } - }; - output - }, - " Creates a 4D vector from `self` with the given value of `z`.", - &["_self", "z"], - ) - .register_documented( - "wrapping_add", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::I8Vec4::wrapping_add( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector containing the wrapping addition of `self` and `rhs`.\n In other words this computes `[self.x.wrapping_add(rhs.x), self.y.wrapping_add(rhs.y), ..]`.", - &["_self", "rhs"], - ) - .register_documented( - "wrapping_add_unsigned", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::I8Vec4::wrapping_add_unsigned( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector containing the wrapping addition of `self` and unsigned vector `rhs`.\n In other words this computes `[self.x.wrapping_add_unsigned(rhs.x), self.y.wrapping_add_unsigned(rhs.y), ..]`.", - &["_self", "rhs"], - ) - .register_documented( - "wrapping_div", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::I8Vec4::wrapping_div( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector containing the wrapping division of `self` and `rhs`.\n In other words this computes `[self.x.wrapping_div(rhs.x), self.y.wrapping_div(rhs.y), ..]`.", - &["_self", "rhs"], - ) - .register_documented( - "wrapping_mul", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::I8Vec4::wrapping_mul( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector containing the wrapping multiplication of `self` and `rhs`.\n In other words this computes `[self.x.wrapping_mul(rhs.x), self.y.wrapping_mul(rhs.y), ..]`.", - &["_self", "rhs"], - ) - .register_documented( - "wrapping_sub", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::I8Vec4::wrapping_sub( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector containing the wrapping subtraction of `self` and `rhs`.\n In other words this computes `[self.x.wrapping_sub(rhs.x), self.y.wrapping_sub(rhs.y), ..]`.", - &["_self", "rhs"], - ) - .register_documented( - "wrapping_sub_unsigned", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::I8Vec4::wrapping_sub_unsigned( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector containing the wrapping subtraction of `self` and unsigned vector `rhs`.\n In other words this computes `[self.x.wrapping_sub_unsigned(rhs.x), self.y.wrapping_sub_unsigned(rhs.y), ..]`.", - &["_self", "rhs"], - ); - let registry = world - .get_resource_or_init::(); - let mut registry = registry.write(); - registry - .register_type_data::< - bevy::math::I8Vec4, - bevy_mod_scripting_core::bindings::MarkAsGenerated, - >(); - } - pub(crate) fn register_i_16_vec_2_functions(world: &mut bevy::ecs::world::World) { - bevy_mod_scripting_core::bindings::function::namespace::NamespaceBuilder::< - bevy::math::I16Vec2, - >::new(world) - .register_documented( - "abs", - |_self: Val| { - let output: Val = { - { - let output: Val = bevy::math::I16Vec2::abs( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector containing the absolute value of each element of `self`.", - &["_self"], - ) - .register_documented( - "add", - |_self: Val, rhs: Ref| { - let output: Val = { - { - let output: Val = >::add(_self.into_inner(), &rhs) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "add", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = >::add(_self.into_inner(), rhs.into_inner()) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "add", - |_self: Val, rhs: i16| { - let output: Val = { - { - let output: Val = >::add(_self.into_inner(), rhs) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "as_dvec2", - |_self: Ref| { - let output: Val = { - { - let output: Val = bevy::math::I16Vec2::as_dvec2( - &_self, - ) - .into(); - output - } - }; - output - }, - " Casts all elements of `self` to `f64`.", - &["_self"], - ) - .register_documented( - "as_i64vec2", - |_self: Ref| { - let output: Val = { - { - let output: Val = bevy::math::I16Vec2::as_i64vec2( - &_self, - ) - .into(); - output - } - }; - output - }, - " Casts all elements of `self` to `i64`.", - &["_self"], - ) - .register_documented( - "as_i8vec2", - |_self: Ref| { - let output: Val = { - { - let output: Val = bevy::math::I16Vec2::as_i8vec2( - &_self, - ) - .into(); - output - } - }; - output - }, - " Casts all elements of `self` to `i8`.", - &["_self"], - ) - .register_documented( - "as_ivec2", - |_self: Ref| { - let output: Val = { - { - let output: Val = bevy::math::I16Vec2::as_ivec2( - &_self, - ) - .into(); - output - } - }; - output - }, - " Casts all elements of `self` to `i32`.", - &["_self"], - ) - .register_documented( - "as_u16vec2", - |_self: Ref| { - let output: Val = { - { - let output: Val = bevy::math::I16Vec2::as_u16vec2( - &_self, - ) - .into(); - output - } - }; - output - }, - " Casts all elements of `self` to `u16`.", - &["_self"], - ) - .register_documented( - "as_u64vec2", - |_self: Ref| { - let output: Val = { - { - let output: Val = bevy::math::I16Vec2::as_u64vec2( - &_self, - ) - .into(); - output - } - }; - output - }, - " Casts all elements of `self` to `u64`.", - &["_self"], - ) - .register_documented( - "as_u8vec2", - |_self: Ref| { - let output: Val = { - { - let output: Val = bevy::math::I16Vec2::as_u8vec2( - &_self, - ) - .into(); - output - } - }; - output - }, - " Casts all elements of `self` to `u8`.", - &["_self"], - ) - .register_documented( - "as_uvec2", - |_self: Ref| { - let output: Val = { - { - let output: Val = bevy::math::I16Vec2::as_uvec2( - &_self, - ) - .into(); - output - } - }; - output - }, - " Casts all elements of `self` to `u32`.", - &["_self"], - ) - .register_documented( - "as_vec2", - |_self: Ref| { - let output: Val = { - { - let output: Val = bevy::math::I16Vec2::as_vec2( - &_self, - ) - .into(); - output - } - }; - output - }, - " Casts all elements of `self` to `f32`.", - &["_self"], - ) - .register_documented( - "assert_receiver_is_total_eq", - |_self: Ref| { - let output: () = { - { - let output: () = ::assert_receiver_is_total_eq( - &_self, - ) - .into(); - output - } - }; - output - }, - "", - &["_self"], - ) - .register_documented( - "clamp", - | - _self: Val, - min: Val, - max: Val| - { - let output: Val = { - { - let output: Val = bevy::math::I16Vec2::clamp( - _self.into_inner(), - min.into_inner(), - max.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Component-wise clamping of values, similar to [`i16::clamp`].\n Each element in `min` must be less-or-equal to the corresponding element in `max`.\n # Panics\n Will panic if `min` is greater than `max` when `glam_assert` is enabled.", - &["_self", "min", "max"], - ) - .register_documented( - "clone", - |_self: Ref| { - let output: Val = { - { - let output: Val = ::clone( - &_self, - ) - .into(); - output - } - }; - output - }, - "", - &["_self"], - ) - .register_documented( - "cmpeq", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::I16Vec2::cmpeq( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector mask containing the result of a `==` comparison for each element of\n `self` and `rhs`.\n In other words, this computes `[self.x == rhs.x, self.y == rhs.y, ..]` for all\n elements.", - &["_self", "rhs"], - ) - .register_documented( - "cmpge", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::I16Vec2::cmpge( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector mask containing the result of a `>=` comparison for each element of\n `self` and `rhs`.\n In other words this computes `[self.x >= rhs.x, self.y >= rhs.y, ..]` for all\n elements.", - &["_self", "rhs"], - ) - .register_documented( - "cmpgt", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::I16Vec2::cmpgt( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector mask containing the result of a `>` comparison for each element of\n `self` and `rhs`.\n In other words this computes `[self.x > rhs.x, self.y > rhs.y, ..]` for all\n elements.", - &["_self", "rhs"], - ) - .register_documented( - "cmple", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::I16Vec2::cmple( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector mask containing the result of a `<=` comparison for each element of\n `self` and `rhs`.\n In other words this computes `[self.x <= rhs.x, self.y <= rhs.y, ..]` for all\n elements.", - &["_self", "rhs"], - ) - .register_documented( - "cmplt", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::I16Vec2::cmplt( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector mask containing the result of a `<` comparison for each element of\n `self` and `rhs`.\n In other words this computes `[self.x < rhs.x, self.y < rhs.y, ..]` for all\n elements.", - &["_self", "rhs"], - ) - .register_documented( - "cmpne", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::I16Vec2::cmpne( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector mask containing the result of a `!=` comparison for each element of\n `self` and `rhs`.\n In other words this computes `[self.x != rhs.x, self.y != rhs.y, ..]` for all\n elements.", - &["_self", "rhs"], - ) - .register_documented( - "distance_squared", - |_self: Val, rhs: Val| { - let output: i16 = { - { - let output: i16 = bevy::math::I16Vec2::distance_squared( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Compute the squared euclidean distance between two points in space.", - &["_self", "rhs"], - ) - .register_documented( - "div", - |_self: Val, rhs: Ref| { - let output: Val = { - { - let output: Val = >::div(_self.into_inner(), &rhs) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "div", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = >::div(_self.into_inner(), rhs.into_inner()) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "div", - |_self: Val, rhs: i16| { - let output: Val = { - { - let output: Val = >::div(_self.into_inner(), rhs) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "div_euclid", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::I16Vec2::div_euclid( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns the element-wise quotient of [Euclidean division] of `self` by `rhs`.\n # Panics\n This function will panic if any `rhs` element is 0 or the division results in overflow.", - &["_self", "rhs"], - ) - .register_documented( - "dot", - |_self: Val, rhs: Val| { - let output: i16 = { - { - let output: i16 = bevy::math::I16Vec2::dot( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Computes the dot product of `self` and `rhs`.", - &["_self", "rhs"], - ) - .register_documented( - "dot_into_vec", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::I16Vec2::dot_into_vec( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector where every component is the dot product of `self` and `rhs`.", - &["_self", "rhs"], - ) - .register_documented( - "element_product", - |_self: Val| { - let output: i16 = { - { - let output: i16 = bevy::math::I16Vec2::element_product( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns the product of all elements of `self`.\n In other words, this computes `self.x * self.y * ..`.", - &["_self"], - ) - .register_documented( - "element_sum", - |_self: Val| { - let output: i16 = { - { - let output: i16 = bevy::math::I16Vec2::element_sum( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns the sum of all elements of `self`.\n In other words, this computes `self.x + self.y + ..`.", - &["_self"], - ) - .register_documented( - "eq", - |_self: Ref, other: Ref| { - let output: bool = { - { - let output: bool = >::eq(&_self, &other) - .into(); - output - } - }; - output - }, - "", - &["_self", "other"], - ) - .register_documented( - "extend", - |_self: Val, z: i16| { - let output: Val = { - { - let output: Val = bevy::math::I16Vec2::extend( - _self.into_inner(), - z, - ) - .into(); - output - } - }; - output - }, - " Creates a 3D vector from `self` and the given `z` value.", - &["_self", "z"], - ) - .register_documented( - "from_array", - |a: [i16; 2]| { - let output: Val = { - { - let output: Val = bevy::math::I16Vec2::from_array( - a, - ) - .into(); - output - } - }; - output - }, - " Creates a new vector from an array.", - &["a"], - ) - .register_documented( - "is_negative_bitmask", - |_self: Val| { - let output: u32 = { - { - let output: u32 = bevy::math::I16Vec2::is_negative_bitmask( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a bitmask with the lowest 2 bits set to the sign bits from the elements of `self`.\n A negative element results in a `1` bit and a positive element in a `0` bit. Element `x` goes\n into the first lowest bit, element `y` into the second, etc.", - &["_self"], - ) - .register_documented( - "length_squared", - |_self: Val| { - let output: i16 = { - { - let output: i16 = bevy::math::I16Vec2::length_squared( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Computes the squared length of `self`.", - &["_self"], - ) - .register_documented( - "max", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::I16Vec2::max( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector containing the maximum values for each element of `self` and `rhs`.\n In other words this computes `[self.x.max(rhs.x), self.y.max(rhs.y), ..]`.", - &["_self", "rhs"], - ) - .register_documented( - "max_element", - |_self: Val| { - let output: i16 = { - { - let output: i16 = bevy::math::I16Vec2::max_element( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns the horizontal maximum of `self`.\n In other words this computes `max(x, y, ..)`.", - &["_self"], - ) - .register_documented( - "min", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::I16Vec2::min( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector containing the minimum values for each element of `self` and `rhs`.\n In other words this computes `[self.x.min(rhs.x), self.y.min(rhs.y), ..]`.", - &["_self", "rhs"], - ) - .register_documented( - "min_element", - |_self: Val| { - let output: i16 = { - { - let output: i16 = bevy::math::I16Vec2::min_element( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns the horizontal minimum of `self`.\n In other words this computes `min(x, y, ..)`.", - &["_self"], - ) - .register_documented( - "mul", - |_self: Val, rhs: Ref| { - let output: Val = { - { - let output: Val = >::mul(_self.into_inner(), &rhs) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "mul", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = >::mul(_self.into_inner(), rhs.into_inner()) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "mul", - |_self: Val, rhs: i16| { - let output: Val = { - { - let output: Val = >::mul(_self.into_inner(), rhs) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "neg", - |_self: Val| { - let output: Val = { - { - let output: Val = ::neg( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - "", - &["_self"], - ) - .register_documented( - "new", - |x: i16, y: i16| { - let output: Val = { - { - let output: Val = bevy::math::I16Vec2::new( - x, - y, - ) - .into(); - output - } - }; - output - }, - " Creates a new vector.", - &["x", "y"], - ) - .register_documented( - "perp", - |_self: Val| { - let output: Val = { - { - let output: Val = bevy::math::I16Vec2::perp( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector that is equal to `self` rotated by 90 degrees.", - &["_self"], - ) - .register_documented( - "perp_dot", - |_self: Val, rhs: Val| { - let output: i16 = { - { - let output: i16 = bevy::math::I16Vec2::perp_dot( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " The perpendicular dot product of `self` and `rhs`.\n Also known as the wedge product, 2D cross product, and determinant.", - &["_self", "rhs"], - ) - .register_documented( - "rem", - |_self: Val, rhs: Ref| { - let output: Val = { - { - let output: Val = >::rem(_self.into_inner(), &rhs) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "rem", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = >::rem(_self.into_inner(), rhs.into_inner()) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "rem", - |_self: Val, rhs: i16| { - let output: Val = { - { - let output: Val = >::rem(_self.into_inner(), rhs) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "rem_euclid", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::I16Vec2::rem_euclid( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns the element-wise remainder of [Euclidean division] of `self` by `rhs`.\n # Panics\n This function will panic if any `rhs` element is 0 or the division results in overflow.\n [Euclidean division]: i16::rem_euclid", - &["_self", "rhs"], - ) - .register_documented( - "rotate", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::I16Vec2::rotate( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns `rhs` rotated by the angle of `self`. If `self` is normalized,\n then this just rotation. This is what you usually want. Otherwise,\n it will be like a rotation with a multiplication by `self`'s length.", - &["_self", "rhs"], - ) - .register_documented( - "saturating_add", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::I16Vec2::saturating_add( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector containing the saturating addition of `self` and `rhs`.\n In other words this computes `[self.x.saturating_add(rhs.x), self.y.saturating_add(rhs.y), ..]`.", - &["_self", "rhs"], - ) - .register_documented( - "saturating_add_unsigned", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::I16Vec2::saturating_add_unsigned( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " In other words this computes `[self.x.saturating_add_unsigned(rhs.x), self.y.saturating_add_unsigned(rhs.y), ..]`.", - &["_self", "rhs"], - ) - .register_documented( - "saturating_div", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::I16Vec2::saturating_div( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector containing the saturating division of `self` and `rhs`.\n In other words this computes `[self.x.saturating_div(rhs.x), self.y.saturating_div(rhs.y), ..]`.", - &["_self", "rhs"], - ) - .register_documented( - "saturating_mul", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::I16Vec2::saturating_mul( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector containing the saturating multiplication of `self` and `rhs`.\n In other words this computes `[self.x.saturating_mul(rhs.x), self.y.saturating_mul(rhs.y), ..]`.", - &["_self", "rhs"], - ) - .register_documented( - "saturating_sub", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::I16Vec2::saturating_sub( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector containing the saturating subtraction of `self` and `rhs`.\n In other words this computes `[self.x.saturating_sub(rhs.x), self.y.saturating_sub(rhs.y), ..]`.", - &["_self", "rhs"], - ) - .register_documented( - "saturating_sub_unsigned", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::I16Vec2::saturating_sub_unsigned( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector containing the saturating subtraction of `self` and unsigned vector `rhs`.\n In other words this computes `[self.x.saturating_sub_unsigned(rhs.x), self.y.saturating_sub_unsigned(rhs.y), ..]`.", - &["_self", "rhs"], - ) - .register_documented( - "select", - | - mask: Val, - if_true: Val, - if_false: Val| - { - let output: Val = { - { - let output: Val = bevy::math::I16Vec2::select( - mask.into_inner(), - if_true.into_inner(), - if_false.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Creates a vector from the elements in `if_true` and `if_false`, selecting which to use\n for each element of `self`.\n A true element in the mask uses the corresponding element from `if_true`, and false\n uses the element from `if_false`.", - &["mask", "if_true", "if_false"], - ) - .register_documented( - "signum", - |_self: Val| { - let output: Val = { - { - let output: Val = bevy::math::I16Vec2::signum( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector with elements representing the sign of `self`.\n - `0` if the number is zero\n - `1` if the number is positive\n - `-1` if the number is negative", - &["_self"], - ) - .register_documented( - "splat", - |v: i16| { - let output: Val = { - { - let output: Val = bevy::math::I16Vec2::splat( - v, - ) - .into(); - output - } - }; - output - }, - " Creates a vector with all elements set to `v`.", - &["v"], - ) - .register_documented( - "sub", - |_self: Val, rhs: Ref| { - let output: Val = { - { - let output: Val = >::sub(_self.into_inner(), &rhs) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "sub", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = >::sub(_self.into_inner(), rhs.into_inner()) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "sub", - |_self: Val, rhs: i16| { - let output: Val = { - { - let output: Val = >::sub(_self.into_inner(), rhs) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "to_array", - |_self: Ref| { - let output: [i16; 2] = { - { - let output: [i16; 2] = bevy::math::I16Vec2::to_array(&_self) - .into(); - output - } - }; - output - }, - " `[x, y]`", - &["_self"], - ) - .register_documented( - "with_x", - |_self: Val, x: i16| { - let output: Val = { - { - let output: Val = bevy::math::I16Vec2::with_x( - _self.into_inner(), - x, - ) - .into(); - output - } - }; - output - }, - " Creates a 2D vector from `self` with the given value of `x`.", - &["_self", "x"], - ) - .register_documented( - "with_y", - |_self: Val, y: i16| { - let output: Val = { - { - let output: Val = bevy::math::I16Vec2::with_y( - _self.into_inner(), - y, - ) - .into(); - output - } - }; - output - }, - " Creates a 2D vector from `self` with the given value of `y`.", - &["_self", "y"], - ) - .register_documented( - "wrapping_add", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::I16Vec2::wrapping_add( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector containing the wrapping addition of `self` and `rhs`.\n In other words this computes `[self.x.wrapping_add(rhs.x), self.y.wrapping_add(rhs.y), ..]`.", - &["_self", "rhs"], - ) - .register_documented( - "wrapping_add_unsigned", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::I16Vec2::wrapping_add_unsigned( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector containing the wrapping addition of `self` and unsigned vector `rhs`.\n In other words this computes `[self.x.wrapping_add_unsigned(rhs.x), self.y.wrapping_add_unsigned(rhs.y), ..]`.", - &["_self", "rhs"], - ) - .register_documented( - "wrapping_div", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::I16Vec2::wrapping_div( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector containing the wrapping division of `self` and `rhs`.\n In other words this computes `[self.x.wrapping_div(rhs.x), self.y.wrapping_div(rhs.y), ..]`.", - &["_self", "rhs"], - ) - .register_documented( - "wrapping_mul", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::I16Vec2::wrapping_mul( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector containing the wrapping multiplication of `self` and `rhs`.\n In other words this computes `[self.x.wrapping_mul(rhs.x), self.y.wrapping_mul(rhs.y), ..]`.", - &["_self", "rhs"], - ) - .register_documented( - "wrapping_sub", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::I16Vec2::wrapping_sub( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector containing the wrapping subtraction of `self` and `rhs`.\n In other words this computes `[self.x.wrapping_sub(rhs.x), self.y.wrapping_sub(rhs.y), ..]`.", - &["_self", "rhs"], - ) - .register_documented( - "wrapping_sub_unsigned", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::I16Vec2::wrapping_sub_unsigned( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector containing the wrapping subtraction of `self` and unsigned vector `rhs`.\n In other words this computes `[self.x.wrapping_sub_unsigned(rhs.x), self.y.wrapping_sub_unsigned(rhs.y), ..]`.", - &["_self", "rhs"], - ); - let registry = world - .get_resource_or_init::(); - let mut registry = registry.write(); - registry - .register_type_data::< - bevy::math::I16Vec2, - bevy_mod_scripting_core::bindings::MarkAsGenerated, - >(); - } - pub(crate) fn register_i_16_vec_3_functions(world: &mut bevy::ecs::world::World) { - bevy_mod_scripting_core::bindings::function::namespace::NamespaceBuilder::< - bevy::math::I16Vec3, - >::new(world) - .register_documented( - "abs", - |_self: Val| { - let output: Val = { - { - let output: Val = bevy::math::I16Vec3::abs( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector containing the absolute value of each element of `self`.", - &["_self"], - ) - .register_documented( - "add", - |_self: Val, rhs: Ref| { - let output: Val = { - { - let output: Val = >::add(_self.into_inner(), &rhs) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "add", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = >::add(_self.into_inner(), rhs.into_inner()) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "add", - |_self: Val, rhs: i16| { - let output: Val = { - { - let output: Val = >::add(_self.into_inner(), rhs) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "as_dvec3", - |_self: Ref| { - let output: Val = { - { - let output: Val = bevy::math::I16Vec3::as_dvec3( - &_self, - ) - .into(); - output - } - }; - output - }, - " Casts all elements of `self` to `f64`.", - &["_self"], - ) - .register_documented( - "as_i64vec3", - |_self: Ref| { - let output: Val = { - { - let output: Val = bevy::math::I16Vec3::as_i64vec3( - &_self, - ) - .into(); - output - } - }; - output - }, - " Casts all elements of `self` to `i64`.", - &["_self"], - ) - .register_documented( - "as_i8vec3", - |_self: Ref| { - let output: Val = { - { - let output: Val = bevy::math::I16Vec3::as_i8vec3( - &_self, - ) - .into(); - output - } - }; - output - }, - " Casts all elements of `self` to `i8`.", - &["_self"], - ) - .register_documented( - "as_ivec3", - |_self: Ref| { - let output: Val = { - { - let output: Val = bevy::math::I16Vec3::as_ivec3( - &_self, - ) - .into(); - output - } - }; - output - }, - " Casts all elements of `self` to `i32`.", - &["_self"], - ) - .register_documented( - "as_u16vec3", - |_self: Ref| { - let output: Val = { - { - let output: Val = bevy::math::I16Vec3::as_u16vec3( - &_self, - ) - .into(); - output - } - }; - output - }, - " Casts all elements of `self` to `u16`.", - &["_self"], - ) - .register_documented( - "as_u64vec3", - |_self: Ref| { - let output: Val = { - { - let output: Val = bevy::math::I16Vec3::as_u64vec3( - &_self, - ) - .into(); - output - } - }; - output - }, - " Casts all elements of `self` to `u64`.", - &["_self"], - ) - .register_documented( - "as_u8vec3", - |_self: Ref| { - let output: Val = { - { - let output: Val = bevy::math::I16Vec3::as_u8vec3( - &_self, - ) - .into(); - output - } - }; - output - }, - " Casts all elements of `self` to `u8`.", - &["_self"], - ) - .register_documented( - "as_uvec3", - |_self: Ref| { - let output: Val = { - { - let output: Val = bevy::math::I16Vec3::as_uvec3( - &_self, - ) - .into(); - output - } - }; - output - }, - " Casts all elements of `self` to `u32`.", - &["_self"], - ) - .register_documented( - "as_vec3", - |_self: Ref| { - let output: Val = { - { - let output: Val = bevy::math::I16Vec3::as_vec3( - &_self, - ) - .into(); - output - } - }; - output - }, - " Casts all elements of `self` to `f32`.", - &["_self"], - ) - .register_documented( - "as_vec3a", - |_self: Ref| { - let output: Val = { - { - let output: Val = bevy::math::I16Vec3::as_vec3a( - &_self, - ) - .into(); - output - } - }; - output - }, - " Casts all elements of `self` to `f32`.", - &["_self"], - ) - .register_documented( - "assert_receiver_is_total_eq", - |_self: Ref| { - let output: () = { - { - let output: () = ::assert_receiver_is_total_eq( - &_self, - ) - .into(); - output - } - }; - output - }, - "", - &["_self"], - ) - .register_documented( - "clamp", - | - _self: Val, - min: Val, - max: Val| - { - let output: Val = { - { - let output: Val = bevy::math::I16Vec3::clamp( - _self.into_inner(), - min.into_inner(), - max.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Component-wise clamping of values, similar to [`i16::clamp`].\n Each element in `min` must be less-or-equal to the corresponding element in `max`.\n # Panics\n Will panic if `min` is greater than `max` when `glam_assert` is enabled.", - &["_self", "min", "max"], - ) - .register_documented( - "clone", - |_self: Ref| { - let output: Val = { - { - let output: Val = ::clone( - &_self, - ) - .into(); - output - } - }; - output - }, - "", - &["_self"], - ) - .register_documented( - "cmpeq", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::I16Vec3::cmpeq( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector mask containing the result of a `==` comparison for each element of\n `self` and `rhs`.\n In other words, this computes `[self.x == rhs.x, self.y == rhs.y, ..]` for all\n elements.", - &["_self", "rhs"], - ) - .register_documented( - "cmpge", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::I16Vec3::cmpge( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector mask containing the result of a `>=` comparison for each element of\n `self` and `rhs`.\n In other words this computes `[self.x >= rhs.x, self.y >= rhs.y, ..]` for all\n elements.", - &["_self", "rhs"], - ) - .register_documented( - "cmpgt", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::I16Vec3::cmpgt( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector mask containing the result of a `>` comparison for each element of\n `self` and `rhs`.\n In other words this computes `[self.x > rhs.x, self.y > rhs.y, ..]` for all\n elements.", - &["_self", "rhs"], - ) - .register_documented( - "cmple", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::I16Vec3::cmple( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector mask containing the result of a `<=` comparison for each element of\n `self` and `rhs`.\n In other words this computes `[self.x <= rhs.x, self.y <= rhs.y, ..]` for all\n elements.", - &["_self", "rhs"], - ) - .register_documented( - "cmplt", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::I16Vec3::cmplt( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector mask containing the result of a `<` comparison for each element of\n `self` and `rhs`.\n In other words this computes `[self.x < rhs.x, self.y < rhs.y, ..]` for all\n elements.", - &["_self", "rhs"], - ) - .register_documented( - "cmpne", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::I16Vec3::cmpne( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector mask containing the result of a `!=` comparison for each element of\n `self` and `rhs`.\n In other words this computes `[self.x != rhs.x, self.y != rhs.y, ..]` for all\n elements.", - &["_self", "rhs"], - ) - .register_documented( - "cross", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::I16Vec3::cross( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Computes the cross product of `self` and `rhs`.", - &["_self", "rhs"], - ) - .register_documented( - "distance_squared", - |_self: Val, rhs: Val| { - let output: i16 = { - { - let output: i16 = bevy::math::I16Vec3::distance_squared( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Compute the squared euclidean distance between two points in space.", - &["_self", "rhs"], - ) - .register_documented( - "div", - |_self: Val, rhs: Ref| { - let output: Val = { - { - let output: Val = >::div(_self.into_inner(), &rhs) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "div", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = >::div(_self.into_inner(), rhs.into_inner()) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "div", - |_self: Val, rhs: i16| { - let output: Val = { - { - let output: Val = >::div(_self.into_inner(), rhs) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "div_euclid", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::I16Vec3::div_euclid( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns the element-wise quotient of [Euclidean division] of `self` by `rhs`.\n # Panics\n This function will panic if any `rhs` element is 0 or the division results in overflow.", - &["_self", "rhs"], - ) - .register_documented( - "dot", - |_self: Val, rhs: Val| { - let output: i16 = { - { - let output: i16 = bevy::math::I16Vec3::dot( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Computes the dot product of `self` and `rhs`.", - &["_self", "rhs"], - ) - .register_documented( - "dot_into_vec", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::I16Vec3::dot_into_vec( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector where every component is the dot product of `self` and `rhs`.", - &["_self", "rhs"], - ) - .register_documented( - "element_product", - |_self: Val| { - let output: i16 = { - { - let output: i16 = bevy::math::I16Vec3::element_product( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns the product of all elements of `self`.\n In other words, this computes `self.x * self.y * ..`.", - &["_self"], - ) - .register_documented( - "element_sum", - |_self: Val| { - let output: i16 = { - { - let output: i16 = bevy::math::I16Vec3::element_sum( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns the sum of all elements of `self`.\n In other words, this computes `self.x + self.y + ..`.", - &["_self"], - ) - .register_documented( - "eq", - |_self: Ref, other: Ref| { - let output: bool = { - { - let output: bool = >::eq(&_self, &other) - .into(); - output - } - }; - output - }, - "", - &["_self", "other"], - ) - .register_documented( - "extend", - |_self: Val, w: i16| { - let output: Val = { - { - let output: Val = bevy::math::I16Vec3::extend( - _self.into_inner(), - w, - ) - .into(); - output - } - }; - output - }, - " Creates a 4D vector from `self` and the given `w` value.", - &["_self", "w"], - ) - .register_documented( - "from_array", - |a: [i16; 3]| { - let output: Val = { - { - let output: Val = bevy::math::I16Vec3::from_array( - a, - ) - .into(); - output - } - }; - output - }, - " Creates a new vector from an array.", - &["a"], - ) - .register_documented( - "is_negative_bitmask", - |_self: Val| { - let output: u32 = { - { - let output: u32 = bevy::math::I16Vec3::is_negative_bitmask( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a bitmask with the lowest 3 bits set to the sign bits from the elements of `self`.\n A negative element results in a `1` bit and a positive element in a `0` bit. Element `x` goes\n into the first lowest bit, element `y` into the second, etc.", - &["_self"], - ) - .register_documented( - "length_squared", - |_self: Val| { - let output: i16 = { - { - let output: i16 = bevy::math::I16Vec3::length_squared( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Computes the squared length of `self`.", - &["_self"], - ) - .register_documented( - "max", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::I16Vec3::max( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector containing the maximum values for each element of `self` and `rhs`.\n In other words this computes `[self.x.max(rhs.x), self.y.max(rhs.y), ..]`.", - &["_self", "rhs"], - ) - .register_documented( - "max_element", - |_self: Val| { - let output: i16 = { - { - let output: i16 = bevy::math::I16Vec3::max_element( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns the horizontal maximum of `self`.\n In other words this computes `max(x, y, ..)`.", - &["_self"], - ) - .register_documented( - "min", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::I16Vec3::min( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector containing the minimum values for each element of `self` and `rhs`.\n In other words this computes `[self.x.min(rhs.x), self.y.min(rhs.y), ..]`.", - &["_self", "rhs"], - ) - .register_documented( - "min_element", - |_self: Val| { - let output: i16 = { - { - let output: i16 = bevy::math::I16Vec3::min_element( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns the horizontal minimum of `self`.\n In other words this computes `min(x, y, ..)`.", - &["_self"], - ) - .register_documented( - "mul", - |_self: Val, rhs: Ref| { - let output: Val = { - { - let output: Val = >::mul(_self.into_inner(), &rhs) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "mul", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = >::mul(_self.into_inner(), rhs.into_inner()) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "mul", - |_self: Val, rhs: i16| { - let output: Val = { - { - let output: Val = >::mul(_self.into_inner(), rhs) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "neg", - |_self: Val| { - let output: Val = { - { - let output: Val = ::neg( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - "", - &["_self"], - ) - .register_documented( - "new", - |x: i16, y: i16, z: i16| { - let output: Val = { - { - let output: Val = bevy::math::I16Vec3::new( - x, - y, - z, - ) - .into(); - output - } - }; - output - }, - " Creates a new vector.", - &["x", "y", "z"], - ) - .register_documented( - "rem", - |_self: Val, rhs: Ref| { - let output: Val = { - { - let output: Val = >::rem(_self.into_inner(), &rhs) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "rem", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = >::rem(_self.into_inner(), rhs.into_inner()) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "rem", - |_self: Val, rhs: i16| { - let output: Val = { - { - let output: Val = >::rem(_self.into_inner(), rhs) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "rem_euclid", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::I16Vec3::rem_euclid( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns the element-wise remainder of [Euclidean division] of `self` by `rhs`.\n # Panics\n This function will panic if any `rhs` element is 0 or the division results in overflow.\n [Euclidean division]: i16::rem_euclid", - &["_self", "rhs"], - ) - .register_documented( - "saturating_add", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::I16Vec3::saturating_add( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector containing the saturating addition of `self` and `rhs`.\n In other words this computes `[self.x.saturating_add(rhs.x), self.y.saturating_add(rhs.y), ..]`.", - &["_self", "rhs"], - ) - .register_documented( - "saturating_add_unsigned", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::I16Vec3::saturating_add_unsigned( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " In other words this computes `[self.x.saturating_add_unsigned(rhs.x), self.y.saturating_add_unsigned(rhs.y), ..]`.", - &["_self", "rhs"], - ) - .register_documented( - "saturating_div", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::I16Vec3::saturating_div( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector containing the saturating division of `self` and `rhs`.\n In other words this computes `[self.x.saturating_div(rhs.x), self.y.saturating_div(rhs.y), ..]`.", - &["_self", "rhs"], - ) - .register_documented( - "saturating_mul", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::I16Vec3::saturating_mul( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector containing the saturating multiplication of `self` and `rhs`.\n In other words this computes `[self.x.saturating_mul(rhs.x), self.y.saturating_mul(rhs.y), ..]`.", - &["_self", "rhs"], - ) - .register_documented( - "saturating_sub", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::I16Vec3::saturating_sub( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector containing the saturating subtraction of `self` and `rhs`.\n In other words this computes `[self.x.saturating_sub(rhs.x), self.y.saturating_sub(rhs.y), ..]`.", - &["_self", "rhs"], - ) - .register_documented( - "saturating_sub_unsigned", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::I16Vec3::saturating_sub_unsigned( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector containing the saturating subtraction of `self` and unsigned vector `rhs`.\n In other words this computes `[self.x.saturating_sub_unsigned(rhs.x), self.y.saturating_sub_unsigned(rhs.y), ..]`.", - &["_self", "rhs"], - ) - .register_documented( - "select", - | - mask: Val, - if_true: Val, - if_false: Val| - { - let output: Val = { - { - let output: Val = bevy::math::I16Vec3::select( - mask.into_inner(), - if_true.into_inner(), - if_false.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Creates a vector from the elements in `if_true` and `if_false`, selecting which to use\n for each element of `self`.\n A true element in the mask uses the corresponding element from `if_true`, and false\n uses the element from `if_false`.", - &["mask", "if_true", "if_false"], - ) - .register_documented( - "signum", - |_self: Val| { - let output: Val = { - { - let output: Val = bevy::math::I16Vec3::signum( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector with elements representing the sign of `self`.\n - `0` if the number is zero\n - `1` if the number is positive\n - `-1` if the number is negative", - &["_self"], - ) - .register_documented( - "splat", - |v: i16| { - let output: Val = { - { - let output: Val = bevy::math::I16Vec3::splat( - v, - ) - .into(); - output - } - }; - output - }, - " Creates a vector with all elements set to `v`.", - &["v"], - ) - .register_documented( - "sub", - |_self: Val, rhs: Ref| { - let output: Val = { - { - let output: Val = >::sub(_self.into_inner(), &rhs) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "sub", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = >::sub(_self.into_inner(), rhs.into_inner()) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "sub", - |_self: Val, rhs: i16| { - let output: Val = { - { - let output: Val = >::sub(_self.into_inner(), rhs) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "to_array", - |_self: Ref| { - let output: [i16; 3] = { - { - let output: [i16; 3] = bevy::math::I16Vec3::to_array(&_self) - .into(); - output - } - }; - output - }, - " `[x, y, z]`", - &["_self"], - ) - .register_documented( - "truncate", - |_self: Val| { - let output: Val = { - { - let output: Val = bevy::math::I16Vec3::truncate( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Creates a 2D vector from the `x` and `y` elements of `self`, discarding `z`.\n Truncation may also be performed by using [`self.xy()`][crate::swizzles::Vec3Swizzles::xy()].", - &["_self"], - ) - .register_documented( - "with_x", - |_self: Val, x: i16| { - let output: Val = { - { - let output: Val = bevy::math::I16Vec3::with_x( - _self.into_inner(), - x, - ) - .into(); - output - } - }; - output - }, - " Creates a 3D vector from `self` with the given value of `x`.", - &["_self", "x"], - ) - .register_documented( - "with_y", - |_self: Val, y: i16| { - let output: Val = { - { - let output: Val = bevy::math::I16Vec3::with_y( - _self.into_inner(), - y, - ) - .into(); - output - } - }; - output - }, - " Creates a 3D vector from `self` with the given value of `y`.", - &["_self", "y"], - ) - .register_documented( - "with_z", - |_self: Val, z: i16| { - let output: Val = { - { - let output: Val = bevy::math::I16Vec3::with_z( - _self.into_inner(), - z, - ) - .into(); - output - } - }; - output - }, - " Creates a 3D vector from `self` with the given value of `z`.", - &["_self", "z"], - ) - .register_documented( - "wrapping_add", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::I16Vec3::wrapping_add( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector containing the wrapping addition of `self` and `rhs`.\n In other words this computes `[self.x.wrapping_add(rhs.x), self.y.wrapping_add(rhs.y), ..]`.", - &["_self", "rhs"], - ) - .register_documented( - "wrapping_add_unsigned", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::I16Vec3::wrapping_add_unsigned( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector containing the wrapping addition of `self` and unsigned vector `rhs`.\n In other words this computes `[self.x.wrapping_add_unsigned(rhs.x), self.y.wrapping_add_unsigned(rhs.y), ..]`.", - &["_self", "rhs"], - ) - .register_documented( - "wrapping_div", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::I16Vec3::wrapping_div( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector containing the wrapping division of `self` and `rhs`.\n In other words this computes `[self.x.wrapping_div(rhs.x), self.y.wrapping_div(rhs.y), ..]`.", - &["_self", "rhs"], - ) - .register_documented( - "wrapping_mul", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::I16Vec3::wrapping_mul( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector containing the wrapping multiplication of `self` and `rhs`.\n In other words this computes `[self.x.wrapping_mul(rhs.x), self.y.wrapping_mul(rhs.y), ..]`.", - &["_self", "rhs"], - ) - .register_documented( - "wrapping_sub", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::I16Vec3::wrapping_sub( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector containing the wrapping subtraction of `self` and `rhs`.\n In other words this computes `[self.x.wrapping_sub(rhs.x), self.y.wrapping_sub(rhs.y), ..]`.", - &["_self", "rhs"], - ) - .register_documented( - "wrapping_sub_unsigned", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::I16Vec3::wrapping_sub_unsigned( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector containing the wrapping subtraction of `self` and unsigned vector `rhs`.\n In other words this computes `[self.x.wrapping_sub_unsigned(rhs.x), self.y.wrapping_sub_unsigned(rhs.y), ..]`.", - &["_self", "rhs"], - ); - let registry = world - .get_resource_or_init::(); - let mut registry = registry.write(); - registry - .register_type_data::< - bevy::math::I16Vec3, - bevy_mod_scripting_core::bindings::MarkAsGenerated, - >(); - } - pub(crate) fn register_i_16_vec_4_functions(world: &mut bevy::ecs::world::World) { - bevy_mod_scripting_core::bindings::function::namespace::NamespaceBuilder::< - bevy::math::I16Vec4, - >::new(world) - .register_documented( - "abs", - |_self: Val| { - let output: Val = { - { - let output: Val = bevy::math::I16Vec4::abs( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector containing the absolute value of each element of `self`.", - &["_self"], - ) - .register_documented( - "add", - |_self: Val, rhs: Ref| { - let output: Val = { - { - let output: Val = >::add(_self.into_inner(), &rhs) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "add", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = >::add(_self.into_inner(), rhs.into_inner()) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "add", - |_self: Val, rhs: i16| { - let output: Val = { - { - let output: Val = >::add(_self.into_inner(), rhs) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "as_dvec4", - |_self: Ref| { - let output: Val = { - { - let output: Val = bevy::math::I16Vec4::as_dvec4( - &_self, - ) - .into(); - output - } - }; - output - }, - " Casts all elements of `self` to `f64`.", - &["_self"], - ) - .register_documented( - "as_i64vec4", - |_self: Ref| { - let output: Val = { - { - let output: Val = bevy::math::I16Vec4::as_i64vec4( - &_self, - ) - .into(); - output - } - }; - output - }, - " Casts all elements of `self` to `i64`.", - &["_self"], - ) - .register_documented( - "as_i8vec4", - |_self: Ref| { - let output: Val = { - { - let output: Val = bevy::math::I16Vec4::as_i8vec4( - &_self, - ) - .into(); - output - } - }; - output - }, - " Casts all elements of `self` to `i8`.", - &["_self"], - ) - .register_documented( - "as_ivec4", - |_self: Ref| { - let output: Val = { - { - let output: Val = bevy::math::I16Vec4::as_ivec4( - &_self, - ) - .into(); - output - } - }; - output - }, - " Casts all elements of `self` to `i32`.", - &["_self"], - ) - .register_documented( - "as_u16vec4", - |_self: Ref| { - let output: Val = { - { - let output: Val = bevy::math::I16Vec4::as_u16vec4( - &_self, - ) - .into(); - output - } - }; - output - }, - " Casts all elements of `self` to `u16`.", - &["_self"], - ) - .register_documented( - "as_u64vec4", - |_self: Ref| { - let output: Val = { - { - let output: Val = bevy::math::I16Vec4::as_u64vec4( - &_self, - ) - .into(); - output - } - }; - output - }, - " Casts all elements of `self` to `u64`.", - &["_self"], - ) - .register_documented( - "as_u8vec4", - |_self: Ref| { - let output: Val = { - { - let output: Val = bevy::math::I16Vec4::as_u8vec4( - &_self, - ) - .into(); - output - } - }; - output - }, - " Casts all elements of `self` to `u8`.", - &["_self"], - ) - .register_documented( - "as_uvec4", - |_self: Ref| { - let output: Val = { - { - let output: Val = bevy::math::I16Vec4::as_uvec4( - &_self, - ) - .into(); - output - } - }; - output - }, - " Casts all elements of `self` to `u32`.", - &["_self"], - ) - .register_documented( - "as_vec4", - |_self: Ref| { - let output: Val = { - { - let output: Val = bevy::math::I16Vec4::as_vec4( - &_self, - ) - .into(); - output - } - }; - output - }, - " Casts all elements of `self` to `f32`.", - &["_self"], - ) - .register_documented( - "assert_receiver_is_total_eq", - |_self: Ref| { - let output: () = { - { - let output: () = ::assert_receiver_is_total_eq( - &_self, - ) - .into(); - output - } - }; - output - }, - "", - &["_self"], - ) - .register_documented( - "clamp", - | - _self: Val, - min: Val, - max: Val| - { - let output: Val = { - { - let output: Val = bevy::math::I16Vec4::clamp( - _self.into_inner(), - min.into_inner(), - max.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Component-wise clamping of values, similar to [`i16::clamp`].\n Each element in `min` must be less-or-equal to the corresponding element in `max`.\n # Panics\n Will panic if `min` is greater than `max` when `glam_assert` is enabled.", - &["_self", "min", "max"], - ) - .register_documented( - "clone", - |_self: Ref| { - let output: Val = { - { - let output: Val = ::clone( - &_self, - ) - .into(); - output - } - }; - output - }, - "", - &["_self"], - ) - .register_documented( - "cmpeq", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::I16Vec4::cmpeq( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector mask containing the result of a `==` comparison for each element of\n `self` and `rhs`.\n In other words, this computes `[self.x == rhs.x, self.y == rhs.y, ..]` for all\n elements.", - &["_self", "rhs"], - ) - .register_documented( - "cmpge", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::I16Vec4::cmpge( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector mask containing the result of a `>=` comparison for each element of\n `self` and `rhs`.\n In other words this computes `[self.x >= rhs.x, self.y >= rhs.y, ..]` for all\n elements.", - &["_self", "rhs"], - ) - .register_documented( - "cmpgt", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::I16Vec4::cmpgt( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector mask containing the result of a `>` comparison for each element of\n `self` and `rhs`.\n In other words this computes `[self.x > rhs.x, self.y > rhs.y, ..]` for all\n elements.", - &["_self", "rhs"], - ) - .register_documented( - "cmple", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::I16Vec4::cmple( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector mask containing the result of a `<=` comparison for each element of\n `self` and `rhs`.\n In other words this computes `[self.x <= rhs.x, self.y <= rhs.y, ..]` for all\n elements.", - &["_self", "rhs"], - ) - .register_documented( - "cmplt", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::I16Vec4::cmplt( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector mask containing the result of a `<` comparison for each element of\n `self` and `rhs`.\n In other words this computes `[self.x < rhs.x, self.y < rhs.y, ..]` for all\n elements.", - &["_self", "rhs"], - ) - .register_documented( - "cmpne", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::I16Vec4::cmpne( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector mask containing the result of a `!=` comparison for each element of\n `self` and `rhs`.\n In other words this computes `[self.x != rhs.x, self.y != rhs.y, ..]` for all\n elements.", - &["_self", "rhs"], - ) - .register_documented( - "distance_squared", - |_self: Val, rhs: Val| { - let output: i16 = { - { - let output: i16 = bevy::math::I16Vec4::distance_squared( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Compute the squared euclidean distance between two points in space.", - &["_self", "rhs"], - ) - .register_documented( - "div", - |_self: Val, rhs: Ref| { - let output: Val = { - { - let output: Val = >::div(_self.into_inner(), &rhs) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "div", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = >::div(_self.into_inner(), rhs.into_inner()) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "div", - |_self: Val, rhs: i16| { - let output: Val = { - { - let output: Val = >::div(_self.into_inner(), rhs) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "div_euclid", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::I16Vec4::div_euclid( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns the element-wise quotient of [Euclidean division] of `self` by `rhs`.\n # Panics\n This function will panic if any `rhs` element is 0 or the division results in overflow.", - &["_self", "rhs"], - ) - .register_documented( - "dot", - |_self: Val, rhs: Val| { - let output: i16 = { - { - let output: i16 = bevy::math::I16Vec4::dot( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Computes the dot product of `self` and `rhs`.", - &["_self", "rhs"], - ) - .register_documented( - "dot_into_vec", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::I16Vec4::dot_into_vec( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector where every component is the dot product of `self` and `rhs`.", - &["_self", "rhs"], - ) - .register_documented( - "element_product", - |_self: Val| { - let output: i16 = { - { - let output: i16 = bevy::math::I16Vec4::element_product( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns the product of all elements of `self`.\n In other words, this computes `self.x * self.y * ..`.", - &["_self"], - ) - .register_documented( - "element_sum", - |_self: Val| { - let output: i16 = { - { - let output: i16 = bevy::math::I16Vec4::element_sum( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns the sum of all elements of `self`.\n In other words, this computes `self.x + self.y + ..`.", - &["_self"], - ) - .register_documented( - "eq", - |_self: Ref, other: Ref| { - let output: bool = { - { - let output: bool = >::eq(&_self, &other) - .into(); - output - } - }; - output - }, - "", - &["_self", "other"], - ) - .register_documented( - "from_array", - |a: [i16; 4]| { - let output: Val = { - { - let output: Val = bevy::math::I16Vec4::from_array( - a, - ) - .into(); - output - } - }; - output - }, - " Creates a new vector from an array.", - &["a"], - ) - .register_documented( - "is_negative_bitmask", - |_self: Val| { - let output: u32 = { - { - let output: u32 = bevy::math::I16Vec4::is_negative_bitmask( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a bitmask with the lowest 4 bits set to the sign bits from the elements of `self`.\n A negative element results in a `1` bit and a positive element in a `0` bit. Element `x` goes\n into the first lowest bit, element `y` into the second, etc.", - &["_self"], - ) - .register_documented( - "length_squared", - |_self: Val| { - let output: i16 = { - { - let output: i16 = bevy::math::I16Vec4::length_squared( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Computes the squared length of `self`.", - &["_self"], - ) - .register_documented( - "max", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::I16Vec4::max( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector containing the maximum values for each element of `self` and `rhs`.\n In other words this computes `[self.x.max(rhs.x), self.y.max(rhs.y), ..]`.", - &["_self", "rhs"], - ) - .register_documented( - "max_element", - |_self: Val| { - let output: i16 = { - { - let output: i16 = bevy::math::I16Vec4::max_element( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns the horizontal maximum of `self`.\n In other words this computes `max(x, y, ..)`.", - &["_self"], - ) - .register_documented( - "min", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::I16Vec4::min( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector containing the minimum values for each element of `self` and `rhs`.\n In other words this computes `[self.x.min(rhs.x), self.y.min(rhs.y), ..]`.", - &["_self", "rhs"], - ) - .register_documented( - "min_element", - |_self: Val| { - let output: i16 = { - { - let output: i16 = bevy::math::I16Vec4::min_element( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns the horizontal minimum of `self`.\n In other words this computes `min(x, y, ..)`.", - &["_self"], - ) - .register_documented( - "mul", - |_self: Val, rhs: Ref| { - let output: Val = { - { - let output: Val = >::mul(_self.into_inner(), &rhs) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "mul", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = >::mul(_self.into_inner(), rhs.into_inner()) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "mul", - |_self: Val, rhs: i16| { - let output: Val = { - { - let output: Val = >::mul(_self.into_inner(), rhs) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "neg", - |_self: Val| { - let output: Val = { - { - let output: Val = ::neg( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - "", - &["_self"], - ) - .register_documented( - "new", - |x: i16, y: i16, z: i16, w: i16| { - let output: Val = { - { - let output: Val = bevy::math::I16Vec4::new( - x, - y, - z, - w, - ) - .into(); - output - } - }; - output - }, - " Creates a new vector.", - &["x", "y", "z", "w"], - ) - .register_documented( - "rem", - |_self: Val, rhs: Ref| { - let output: Val = { - { - let output: Val = >::rem(_self.into_inner(), &rhs) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "rem", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = >::rem(_self.into_inner(), rhs.into_inner()) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "rem", - |_self: Val, rhs: i16| { - let output: Val = { - { - let output: Val = >::rem(_self.into_inner(), rhs) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "rem_euclid", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::I16Vec4::rem_euclid( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns the element-wise remainder of [Euclidean division] of `self` by `rhs`.\n # Panics\n This function will panic if any `rhs` element is 0 or the division results in overflow.\n [Euclidean division]: i16::rem_euclid", - &["_self", "rhs"], - ) - .register_documented( - "saturating_add", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::I16Vec4::saturating_add( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector containing the saturating addition of `self` and `rhs`.\n In other words this computes `[self.x.saturating_add(rhs.x), self.y.saturating_add(rhs.y), ..]`.", - &["_self", "rhs"], - ) - .register_documented( - "saturating_add_unsigned", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::I16Vec4::saturating_add_unsigned( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " In other words this computes `[self.x.saturating_add_unsigned(rhs.x), self.y.saturating_add_unsigned(rhs.y), ..]`.", - &["_self", "rhs"], - ) - .register_documented( - "saturating_div", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::I16Vec4::saturating_div( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector containing the saturating division of `self` and `rhs`.\n In other words this computes `[self.x.saturating_div(rhs.x), self.y.saturating_div(rhs.y), ..]`.", - &["_self", "rhs"], - ) - .register_documented( - "saturating_mul", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::I16Vec4::saturating_mul( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector containing the saturating multiplication of `self` and `rhs`.\n In other words this computes `[self.x.saturating_mul(rhs.x), self.y.saturating_mul(rhs.y), ..]`.", - &["_self", "rhs"], - ) - .register_documented( - "saturating_sub", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::I16Vec4::saturating_sub( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector containing the saturating subtraction of `self` and `rhs`.\n In other words this computes `[self.x.saturating_sub(rhs.x), self.y.saturating_sub(rhs.y), ..]`.", - &["_self", "rhs"], - ) - .register_documented( - "saturating_sub_unsigned", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::I16Vec4::saturating_sub_unsigned( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector containing the saturating subtraction of `self` and unsigned vector `rhs`.\n In other words this computes `[self.x.saturating_sub_unsigned(rhs.x), self.y.saturating_sub_unsigned(rhs.y), ..]`.", - &["_self", "rhs"], - ) - .register_documented( - "select", - | - mask: Val, - if_true: Val, - if_false: Val| - { - let output: Val = { - { - let output: Val = bevy::math::I16Vec4::select( - mask.into_inner(), - if_true.into_inner(), - if_false.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Creates a vector from the elements in `if_true` and `if_false`, selecting which to use\n for each element of `self`.\n A true element in the mask uses the corresponding element from `if_true`, and false\n uses the element from `if_false`.", - &["mask", "if_true", "if_false"], - ) - .register_documented( - "signum", - |_self: Val| { - let output: Val = { - { - let output: Val = bevy::math::I16Vec4::signum( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector with elements representing the sign of `self`.\n - `0` if the number is zero\n - `1` if the number is positive\n - `-1` if the number is negative", - &["_self"], - ) - .register_documented( - "splat", - |v: i16| { - let output: Val = { - { - let output: Val = bevy::math::I16Vec4::splat( - v, - ) - .into(); - output - } - }; - output - }, - " Creates a vector with all elements set to `v`.", - &["v"], - ) - .register_documented( - "sub", - |_self: Val, rhs: Ref| { - let output: Val = { - { - let output: Val = >::sub(_self.into_inner(), &rhs) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "sub", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = >::sub(_self.into_inner(), rhs.into_inner()) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "sub", - |_self: Val, rhs: i16| { - let output: Val = { - { - let output: Val = >::sub(_self.into_inner(), rhs) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "to_array", - |_self: Ref| { - let output: [i16; 4] = { - { - let output: [i16; 4] = bevy::math::I16Vec4::to_array(&_self) - .into(); - output - } - }; - output - }, - " `[x, y, z, w]`", - &["_self"], - ) - .register_documented( - "truncate", - |_self: Val| { - let output: Val = { - { - let output: Val = bevy::math::I16Vec4::truncate( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Creates a 3D vector from the `x`, `y` and `z` elements of `self`, discarding `w`.\n Truncation to [`I16Vec3`] may also be performed by using [`self.xyz()`][crate::swizzles::Vec4Swizzles::xyz()].", - &["_self"], - ) - .register_documented( - "with_w", - |_self: Val, w: i16| { - let output: Val = { - { - let output: Val = bevy::math::I16Vec4::with_w( - _self.into_inner(), - w, - ) - .into(); - output - } - }; - output - }, - " Creates a 4D vector from `self` with the given value of `w`.", - &["_self", "w"], - ) - .register_documented( - "with_x", - |_self: Val, x: i16| { - let output: Val = { - { - let output: Val = bevy::math::I16Vec4::with_x( - _self.into_inner(), - x, - ) - .into(); - output - } - }; - output - }, - " Creates a 4D vector from `self` with the given value of `x`.", - &["_self", "x"], - ) - .register_documented( - "with_y", - |_self: Val, y: i16| { - let output: Val = { - { - let output: Val = bevy::math::I16Vec4::with_y( - _self.into_inner(), - y, - ) - .into(); - output - } - }; - output - }, - " Creates a 4D vector from `self` with the given value of `y`.", - &["_self", "y"], - ) - .register_documented( - "with_z", - |_self: Val, z: i16| { - let output: Val = { - { - let output: Val = bevy::math::I16Vec4::with_z( - _self.into_inner(), - z, - ) - .into(); - output - } - }; - output - }, - " Creates a 4D vector from `self` with the given value of `z`.", - &["_self", "z"], - ) - .register_documented( - "wrapping_add", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::I16Vec4::wrapping_add( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector containing the wrapping addition of `self` and `rhs`.\n In other words this computes `[self.x.wrapping_add(rhs.x), self.y.wrapping_add(rhs.y), ..]`.", - &["_self", "rhs"], - ) - .register_documented( - "wrapping_add_unsigned", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::I16Vec4::wrapping_add_unsigned( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector containing the wrapping addition of `self` and unsigned vector `rhs`.\n In other words this computes `[self.x.wrapping_add_unsigned(rhs.x), self.y.wrapping_add_unsigned(rhs.y), ..]`.", - &["_self", "rhs"], - ) - .register_documented( - "wrapping_div", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::I16Vec4::wrapping_div( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector containing the wrapping division of `self` and `rhs`.\n In other words this computes `[self.x.wrapping_div(rhs.x), self.y.wrapping_div(rhs.y), ..]`.", - &["_self", "rhs"], - ) - .register_documented( - "wrapping_mul", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::I16Vec4::wrapping_mul( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector containing the wrapping multiplication of `self` and `rhs`.\n In other words this computes `[self.x.wrapping_mul(rhs.x), self.y.wrapping_mul(rhs.y), ..]`.", - &["_self", "rhs"], - ) - .register_documented( - "wrapping_sub", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::I16Vec4::wrapping_sub( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector containing the wrapping subtraction of `self` and `rhs`.\n In other words this computes `[self.x.wrapping_sub(rhs.x), self.y.wrapping_sub(rhs.y), ..]`.", - &["_self", "rhs"], - ) - .register_documented( - "wrapping_sub_unsigned", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::I16Vec4::wrapping_sub_unsigned( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector containing the wrapping subtraction of `self` and unsigned vector `rhs`.\n In other words this computes `[self.x.wrapping_sub_unsigned(rhs.x), self.y.wrapping_sub_unsigned(rhs.y), ..]`.", - &["_self", "rhs"], - ); - let registry = world - .get_resource_or_init::(); - let mut registry = registry.write(); - registry - .register_type_data::< - bevy::math::I16Vec4, - bevy_mod_scripting_core::bindings::MarkAsGenerated, - >(); - } - pub(crate) fn register_i_64_vec_2_functions(world: &mut bevy::ecs::world::World) { - bevy_mod_scripting_core::bindings::function::namespace::NamespaceBuilder::< - bevy::math::I64Vec2, - >::new(world) - .register_documented( - "abs", - |_self: Val| { - let output: Val = { - { - let output: Val = bevy::math::I64Vec2::abs( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector containing the absolute value of each element of `self`.", - &["_self"], - ) - .register_documented( - "add", - |_self: Val, rhs: Ref| { - let output: Val = { - { - let output: Val = >::add(_self.into_inner(), &rhs) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "add", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = >::add(_self.into_inner(), rhs.into_inner()) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "add", - |_self: Val, rhs: i64| { - let output: Val = { - { - let output: Val = >::add(_self.into_inner(), rhs) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "as_dvec2", - |_self: Ref| { - let output: Val = { - { - let output: Val = bevy::math::I64Vec2::as_dvec2( - &_self, - ) - .into(); - output - } - }; - output - }, - " Casts all elements of `self` to `f64`.", - &["_self"], - ) - .register_documented( - "as_i16vec2", - |_self: Ref| { - let output: Val = { - { - let output: Val = bevy::math::I64Vec2::as_i16vec2( - &_self, - ) - .into(); - output - } - }; - output - }, - " Casts all elements of `self` to `i16`.", - &["_self"], - ) - .register_documented( - "as_i8vec2", - |_self: Ref| { - let output: Val = { - { - let output: Val = bevy::math::I64Vec2::as_i8vec2( - &_self, - ) - .into(); - output - } - }; - output - }, - " Casts all elements of `self` to `i8`.", - &["_self"], - ) - .register_documented( - "as_ivec2", - |_self: Ref| { - let output: Val = { - { - let output: Val = bevy::math::I64Vec2::as_ivec2( - &_self, - ) - .into(); - output - } - }; - output - }, - " Casts all elements of `self` to `i32`.", - &["_self"], - ) - .register_documented( - "as_u16vec2", - |_self: Ref| { - let output: Val = { - { - let output: Val = bevy::math::I64Vec2::as_u16vec2( - &_self, - ) - .into(); - output - } - }; - output - }, - " Casts all elements of `self` to `u16`.", - &["_self"], - ) - .register_documented( - "as_u64vec2", - |_self: Ref| { - let output: Val = { - { - let output: Val = bevy::math::I64Vec2::as_u64vec2( - &_self, - ) - .into(); - output - } - }; - output - }, - " Casts all elements of `self` to `u64`.", - &["_self"], - ) - .register_documented( - "as_u8vec2", - |_self: Ref| { - let output: Val = { - { - let output: Val = bevy::math::I64Vec2::as_u8vec2( - &_self, - ) - .into(); - output - } - }; - output - }, - " Casts all elements of `self` to `u8`.", - &["_self"], - ) - .register_documented( - "as_uvec2", - |_self: Ref| { - let output: Val = { - { - let output: Val = bevy::math::I64Vec2::as_uvec2( - &_self, - ) - .into(); - output - } - }; - output - }, - " Casts all elements of `self` to `u32`.", - &["_self"], - ) - .register_documented( - "as_vec2", - |_self: Ref| { - let output: Val = { - { - let output: Val = bevy::math::I64Vec2::as_vec2( - &_self, - ) - .into(); - output - } - }; - output - }, - " Casts all elements of `self` to `f32`.", - &["_self"], - ) - .register_documented( - "assert_receiver_is_total_eq", - |_self: Ref| { - let output: () = { - { - let output: () = ::assert_receiver_is_total_eq( - &_self, - ) - .into(); - output - } - }; - output - }, - "", - &["_self"], - ) - .register_documented( - "clamp", - | - _self: Val, - min: Val, - max: Val| - { - let output: Val = { - { - let output: Val = bevy::math::I64Vec2::clamp( - _self.into_inner(), - min.into_inner(), - max.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Component-wise clamping of values, similar to [`i64::clamp`].\n Each element in `min` must be less-or-equal to the corresponding element in `max`.\n # Panics\n Will panic if `min` is greater than `max` when `glam_assert` is enabled.", - &["_self", "min", "max"], - ) - .register_documented( - "clone", - |_self: Ref| { - let output: Val = { - { - let output: Val = ::clone( - &_self, - ) - .into(); - output - } - }; - output - }, - "", - &["_self"], - ) - .register_documented( - "cmpeq", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::I64Vec2::cmpeq( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector mask containing the result of a `==` comparison for each element of\n `self` and `rhs`.\n In other words, this computes `[self.x == rhs.x, self.y == rhs.y, ..]` for all\n elements.", - &["_self", "rhs"], - ) - .register_documented( - "cmpge", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::I64Vec2::cmpge( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector mask containing the result of a `>=` comparison for each element of\n `self` and `rhs`.\n In other words this computes `[self.x >= rhs.x, self.y >= rhs.y, ..]` for all\n elements.", - &["_self", "rhs"], - ) - .register_documented( - "cmpgt", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::I64Vec2::cmpgt( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector mask containing the result of a `>` comparison for each element of\n `self` and `rhs`.\n In other words this computes `[self.x > rhs.x, self.y > rhs.y, ..]` for all\n elements.", - &["_self", "rhs"], - ) - .register_documented( - "cmple", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::I64Vec2::cmple( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector mask containing the result of a `<=` comparison for each element of\n `self` and `rhs`.\n In other words this computes `[self.x <= rhs.x, self.y <= rhs.y, ..]` for all\n elements.", - &["_self", "rhs"], - ) - .register_documented( - "cmplt", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::I64Vec2::cmplt( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector mask containing the result of a `<` comparison for each element of\n `self` and `rhs`.\n In other words this computes `[self.x < rhs.x, self.y < rhs.y, ..]` for all\n elements.", - &["_self", "rhs"], - ) - .register_documented( - "cmpne", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::I64Vec2::cmpne( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector mask containing the result of a `!=` comparison for each element of\n `self` and `rhs`.\n In other words this computes `[self.x != rhs.x, self.y != rhs.y, ..]` for all\n elements.", - &["_self", "rhs"], - ) - .register_documented( - "distance_squared", - |_self: Val, rhs: Val| { - let output: i64 = { - { - let output: i64 = bevy::math::I64Vec2::distance_squared( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Compute the squared euclidean distance between two points in space.", - &["_self", "rhs"], - ) - .register_documented( - "div", - |_self: Val, rhs: Ref| { - let output: Val = { - { - let output: Val = >::div(_self.into_inner(), &rhs) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "div", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = >::div(_self.into_inner(), rhs.into_inner()) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "div", - |_self: Val, rhs: i64| { - let output: Val = { - { - let output: Val = >::div(_self.into_inner(), rhs) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "div_euclid", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::I64Vec2::div_euclid( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns the element-wise quotient of [Euclidean division] of `self` by `rhs`.\n # Panics\n This function will panic if any `rhs` element is 0 or the division results in overflow.", - &["_self", "rhs"], - ) - .register_documented( - "dot", - |_self: Val, rhs: Val| { - let output: i64 = { - { - let output: i64 = bevy::math::I64Vec2::dot( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Computes the dot product of `self` and `rhs`.", - &["_self", "rhs"], - ) - .register_documented( - "dot_into_vec", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::I64Vec2::dot_into_vec( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector where every component is the dot product of `self` and `rhs`.", - &["_self", "rhs"], - ) - .register_documented( - "element_product", - |_self: Val| { - let output: i64 = { - { - let output: i64 = bevy::math::I64Vec2::element_product( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns the product of all elements of `self`.\n In other words, this computes `self.x * self.y * ..`.", - &["_self"], - ) - .register_documented( - "element_sum", - |_self: Val| { - let output: i64 = { - { - let output: i64 = bevy::math::I64Vec2::element_sum( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns the sum of all elements of `self`.\n In other words, this computes `self.x + self.y + ..`.", - &["_self"], - ) - .register_documented( - "eq", - |_self: Ref, other: Ref| { - let output: bool = { - { - let output: bool = >::eq(&_self, &other) - .into(); - output - } - }; - output - }, - "", - &["_self", "other"], - ) - .register_documented( - "extend", - |_self: Val, z: i64| { - let output: Val = { - { - let output: Val = bevy::math::I64Vec2::extend( - _self.into_inner(), - z, - ) - .into(); - output - } - }; - output - }, - " Creates a 3D vector from `self` and the given `z` value.", - &["_self", "z"], - ) - .register_documented( - "from_array", - |a: [i64; 2]| { - let output: Val = { - { - let output: Val = bevy::math::I64Vec2::from_array( - a, - ) - .into(); - output - } - }; - output - }, - " Creates a new vector from an array.", - &["a"], - ) - .register_documented( - "is_negative_bitmask", - |_self: Val| { - let output: u32 = { - { - let output: u32 = bevy::math::I64Vec2::is_negative_bitmask( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a bitmask with the lowest 2 bits set to the sign bits from the elements of `self`.\n A negative element results in a `1` bit and a positive element in a `0` bit. Element `x` goes\n into the first lowest bit, element `y` into the second, etc.", - &["_self"], - ) - .register_documented( - "length_squared", - |_self: Val| { - let output: i64 = { - { - let output: i64 = bevy::math::I64Vec2::length_squared( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Computes the squared length of `self`.", - &["_self"], - ) - .register_documented( - "max", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::I64Vec2::max( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector containing the maximum values for each element of `self` and `rhs`.\n In other words this computes `[self.x.max(rhs.x), self.y.max(rhs.y), ..]`.", - &["_self", "rhs"], - ) - .register_documented( - "max_element", - |_self: Val| { - let output: i64 = { - { - let output: i64 = bevy::math::I64Vec2::max_element( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns the horizontal maximum of `self`.\n In other words this computes `max(x, y, ..)`.", - &["_self"], - ) - .register_documented( - "min", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::I64Vec2::min( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector containing the minimum values for each element of `self` and `rhs`.\n In other words this computes `[self.x.min(rhs.x), self.y.min(rhs.y), ..]`.", - &["_self", "rhs"], - ) - .register_documented( - "min_element", - |_self: Val| { - let output: i64 = { - { - let output: i64 = bevy::math::I64Vec2::min_element( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns the horizontal minimum of `self`.\n In other words this computes `min(x, y, ..)`.", - &["_self"], - ) - .register_documented( - "mul", - |_self: Val, rhs: Ref| { - let output: Val = { - { - let output: Val = >::mul(_self.into_inner(), &rhs) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "mul", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = >::mul(_self.into_inner(), rhs.into_inner()) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "mul", - |_self: Val, rhs: i64| { - let output: Val = { - { - let output: Val = >::mul(_self.into_inner(), rhs) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "neg", - |_self: Val| { - let output: Val = { - { - let output: Val = ::neg( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - "", - &["_self"], - ) - .register_documented( - "new", - |x: i64, y: i64| { - let output: Val = { - { - let output: Val = bevy::math::I64Vec2::new( - x, - y, - ) - .into(); - output - } - }; - output - }, - " Creates a new vector.", - &["x", "y"], - ) - .register_documented( - "perp", - |_self: Val| { - let output: Val = { - { - let output: Val = bevy::math::I64Vec2::perp( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector that is equal to `self` rotated by 90 degrees.", - &["_self"], - ) - .register_documented( - "perp_dot", - |_self: Val, rhs: Val| { - let output: i64 = { - { - let output: i64 = bevy::math::I64Vec2::perp_dot( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " The perpendicular dot product of `self` and `rhs`.\n Also known as the wedge product, 2D cross product, and determinant.", - &["_self", "rhs"], - ) - .register_documented( - "rem", - |_self: Val, rhs: Ref| { - let output: Val = { - { - let output: Val = >::rem(_self.into_inner(), &rhs) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "rem", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = >::rem(_self.into_inner(), rhs.into_inner()) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "rem", - |_self: Val, rhs: i64| { - let output: Val = { - { - let output: Val = >::rem(_self.into_inner(), rhs) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "rem_euclid", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::I64Vec2::rem_euclid( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns the element-wise remainder of [Euclidean division] of `self` by `rhs`.\n # Panics\n This function will panic if any `rhs` element is 0 or the division results in overflow.\n [Euclidean division]: i64::rem_euclid", - &["_self", "rhs"], - ) - .register_documented( - "rotate", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::I64Vec2::rotate( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns `rhs` rotated by the angle of `self`. If `self` is normalized,\n then this just rotation. This is what you usually want. Otherwise,\n it will be like a rotation with a multiplication by `self`'s length.", - &["_self", "rhs"], - ) - .register_documented( - "saturating_add", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::I64Vec2::saturating_add( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector containing the saturating addition of `self` and `rhs`.\n In other words this computes `[self.x.saturating_add(rhs.x), self.y.saturating_add(rhs.y), ..]`.", - &["_self", "rhs"], - ) - .register_documented( - "saturating_add_unsigned", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::I64Vec2::saturating_add_unsigned( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " In other words this computes `[self.x.saturating_add_unsigned(rhs.x), self.y.saturating_add_unsigned(rhs.y), ..]`.", - &["_self", "rhs"], - ) - .register_documented( - "saturating_div", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::I64Vec2::saturating_div( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector containing the saturating division of `self` and `rhs`.\n In other words this computes `[self.x.saturating_div(rhs.x), self.y.saturating_div(rhs.y), ..]`.", - &["_self", "rhs"], - ) - .register_documented( - "saturating_mul", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::I64Vec2::saturating_mul( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector containing the saturating multiplication of `self` and `rhs`.\n In other words this computes `[self.x.saturating_mul(rhs.x), self.y.saturating_mul(rhs.y), ..]`.", - &["_self", "rhs"], - ) - .register_documented( - "saturating_sub", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::I64Vec2::saturating_sub( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector containing the saturating subtraction of `self` and `rhs`.\n In other words this computes `[self.x.saturating_sub(rhs.x), self.y.saturating_sub(rhs.y), ..]`.", - &["_self", "rhs"], - ) - .register_documented( - "saturating_sub_unsigned", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::I64Vec2::saturating_sub_unsigned( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector containing the saturating subtraction of `self` and unsigned vector `rhs`.\n In other words this computes `[self.x.saturating_sub_unsigned(rhs.x), self.y.saturating_sub_unsigned(rhs.y), ..]`.", - &["_self", "rhs"], - ) - .register_documented( - "select", - | - mask: Val, - if_true: Val, - if_false: Val| - { - let output: Val = { - { - let output: Val = bevy::math::I64Vec2::select( - mask.into_inner(), - if_true.into_inner(), - if_false.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Creates a vector from the elements in `if_true` and `if_false`, selecting which to use\n for each element of `self`.\n A true element in the mask uses the corresponding element from `if_true`, and false\n uses the element from `if_false`.", - &["mask", "if_true", "if_false"], - ) - .register_documented( - "signum", - |_self: Val| { - let output: Val = { - { - let output: Val = bevy::math::I64Vec2::signum( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector with elements representing the sign of `self`.\n - `0` if the number is zero\n - `1` if the number is positive\n - `-1` if the number is negative", - &["_self"], - ) - .register_documented( - "splat", - |v: i64| { - let output: Val = { - { - let output: Val = bevy::math::I64Vec2::splat( - v, - ) - .into(); - output - } - }; - output - }, - " Creates a vector with all elements set to `v`.", - &["v"], - ) - .register_documented( - "sub", - |_self: Val, rhs: Ref| { - let output: Val = { - { - let output: Val = >::sub(_self.into_inner(), &rhs) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "sub", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = >::sub(_self.into_inner(), rhs.into_inner()) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "sub", - |_self: Val, rhs: i64| { - let output: Val = { - { - let output: Val = >::sub(_self.into_inner(), rhs) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "to_array", - |_self: Ref| { - let output: [i64; 2] = { - { - let output: [i64; 2] = bevy::math::I64Vec2::to_array(&_self) - .into(); - output - } - }; - output - }, - " `[x, y]`", - &["_self"], - ) - .register_documented( - "with_x", - |_self: Val, x: i64| { - let output: Val = { - { - let output: Val = bevy::math::I64Vec2::with_x( - _self.into_inner(), - x, - ) - .into(); - output - } - }; - output - }, - " Creates a 2D vector from `self` with the given value of `x`.", - &["_self", "x"], - ) - .register_documented( - "with_y", - |_self: Val, y: i64| { - let output: Val = { - { - let output: Val = bevy::math::I64Vec2::with_y( - _self.into_inner(), - y, - ) - .into(); - output - } - }; - output - }, - " Creates a 2D vector from `self` with the given value of `y`.", - &["_self", "y"], - ) - .register_documented( - "wrapping_add", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::I64Vec2::wrapping_add( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector containing the wrapping addition of `self` and `rhs`.\n In other words this computes `[self.x.wrapping_add(rhs.x), self.y.wrapping_add(rhs.y), ..]`.", - &["_self", "rhs"], - ) - .register_documented( - "wrapping_add_unsigned", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::I64Vec2::wrapping_add_unsigned( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector containing the wrapping addition of `self` and unsigned vector `rhs`.\n In other words this computes `[self.x.wrapping_add_unsigned(rhs.x), self.y.wrapping_add_unsigned(rhs.y), ..]`.", - &["_self", "rhs"], - ) - .register_documented( - "wrapping_div", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::I64Vec2::wrapping_div( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector containing the wrapping division of `self` and `rhs`.\n In other words this computes `[self.x.wrapping_div(rhs.x), self.y.wrapping_div(rhs.y), ..]`.", - &["_self", "rhs"], - ) - .register_documented( - "wrapping_mul", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::I64Vec2::wrapping_mul( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector containing the wrapping multiplication of `self` and `rhs`.\n In other words this computes `[self.x.wrapping_mul(rhs.x), self.y.wrapping_mul(rhs.y), ..]`.", - &["_self", "rhs"], - ) - .register_documented( - "wrapping_sub", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::I64Vec2::wrapping_sub( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector containing the wrapping subtraction of `self` and `rhs`.\n In other words this computes `[self.x.wrapping_sub(rhs.x), self.y.wrapping_sub(rhs.y), ..]`.", - &["_self", "rhs"], - ) - .register_documented( - "wrapping_sub_unsigned", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::I64Vec2::wrapping_sub_unsigned( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector containing the wrapping subtraction of `self` and unsigned vector `rhs`.\n In other words this computes `[self.x.wrapping_sub_unsigned(rhs.x), self.y.wrapping_sub_unsigned(rhs.y), ..]`.", - &["_self", "rhs"], - ); - let registry = world - .get_resource_or_init::(); - let mut registry = registry.write(); - registry - .register_type_data::< - bevy::math::I64Vec2, - bevy_mod_scripting_core::bindings::MarkAsGenerated, - >(); - } - pub(crate) fn register_i_64_vec_3_functions(world: &mut bevy::ecs::world::World) { - bevy_mod_scripting_core::bindings::function::namespace::NamespaceBuilder::< - bevy::math::I64Vec3, - >::new(world) - .register_documented( - "abs", - |_self: Val| { - let output: Val = { - { - let output: Val = bevy::math::I64Vec3::abs( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector containing the absolute value of each element of `self`.", - &["_self"], - ) - .register_documented( - "add", - |_self: Val, rhs: Ref| { - let output: Val = { - { - let output: Val = >::add(_self.into_inner(), &rhs) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "add", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = >::add(_self.into_inner(), rhs.into_inner()) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "add", - |_self: Val, rhs: i64| { - let output: Val = { - { - let output: Val = >::add(_self.into_inner(), rhs) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "as_dvec3", - |_self: Ref| { - let output: Val = { - { - let output: Val = bevy::math::I64Vec3::as_dvec3( - &_self, - ) - .into(); - output - } - }; - output - }, - " Casts all elements of `self` to `f64`.", - &["_self"], - ) - .register_documented( - "as_i16vec3", - |_self: Ref| { - let output: Val = { - { - let output: Val = bevy::math::I64Vec3::as_i16vec3( - &_self, - ) - .into(); - output - } - }; - output - }, - " Casts all elements of `self` to `i16`.", - &["_self"], - ) - .register_documented( - "as_i8vec3", - |_self: Ref| { - let output: Val = { - { - let output: Val = bevy::math::I64Vec3::as_i8vec3( - &_self, - ) - .into(); - output - } - }; - output - }, - " Casts all elements of `self` to `i8`.", - &["_self"], - ) - .register_documented( - "as_ivec3", - |_self: Ref| { - let output: Val = { - { - let output: Val = bevy::math::I64Vec3::as_ivec3( - &_self, - ) - .into(); - output - } - }; - output - }, - " Casts all elements of `self` to `i32`.", - &["_self"], - ) - .register_documented( - "as_u16vec3", - |_self: Ref| { - let output: Val = { - { - let output: Val = bevy::math::I64Vec3::as_u16vec3( - &_self, - ) - .into(); - output - } - }; - output - }, - " Casts all elements of `self` to `u16`.", - &["_self"], - ) - .register_documented( - "as_u64vec3", - |_self: Ref| { - let output: Val = { - { - let output: Val = bevy::math::I64Vec3::as_u64vec3( - &_self, - ) - .into(); - output - } - }; - output - }, - " Casts all elements of `self` to `u64`.", - &["_self"], - ) - .register_documented( - "as_u8vec3", - |_self: Ref| { - let output: Val = { - { - let output: Val = bevy::math::I64Vec3::as_u8vec3( - &_self, - ) - .into(); - output - } - }; - output - }, - " Casts all elements of `self` to `u8`.", - &["_self"], - ) - .register_documented( - "as_uvec3", - |_self: Ref| { - let output: Val = { - { - let output: Val = bevy::math::I64Vec3::as_uvec3( - &_self, - ) - .into(); - output - } - }; - output - }, - " Casts all elements of `self` to `u32`.", - &["_self"], - ) - .register_documented( - "as_vec3", - |_self: Ref| { - let output: Val = { - { - let output: Val = bevy::math::I64Vec3::as_vec3( - &_self, - ) - .into(); - output - } - }; - output - }, - " Casts all elements of `self` to `f32`.", - &["_self"], - ) - .register_documented( - "as_vec3a", - |_self: Ref| { - let output: Val = { - { - let output: Val = bevy::math::I64Vec3::as_vec3a( - &_self, - ) - .into(); - output - } - }; - output - }, - " Casts all elements of `self` to `f32`.", - &["_self"], - ) - .register_documented( - "assert_receiver_is_total_eq", - |_self: Ref| { - let output: () = { - { - let output: () = ::assert_receiver_is_total_eq( - &_self, - ) - .into(); - output - } - }; - output - }, - "", - &["_self"], - ) - .register_documented( - "clamp", - | - _self: Val, - min: Val, - max: Val| - { - let output: Val = { - { - let output: Val = bevy::math::I64Vec3::clamp( - _self.into_inner(), - min.into_inner(), - max.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Component-wise clamping of values, similar to [`i64::clamp`].\n Each element in `min` must be less-or-equal to the corresponding element in `max`.\n # Panics\n Will panic if `min` is greater than `max` when `glam_assert` is enabled.", - &["_self", "min", "max"], - ) - .register_documented( - "clone", - |_self: Ref| { - let output: Val = { - { - let output: Val = ::clone( - &_self, - ) - .into(); - output - } - }; - output - }, - "", - &["_self"], - ) - .register_documented( - "cmpeq", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::I64Vec3::cmpeq( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector mask containing the result of a `==` comparison for each element of\n `self` and `rhs`.\n In other words, this computes `[self.x == rhs.x, self.y == rhs.y, ..]` for all\n elements.", - &["_self", "rhs"], - ) - .register_documented( - "cmpge", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::I64Vec3::cmpge( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector mask containing the result of a `>=` comparison for each element of\n `self` and `rhs`.\n In other words this computes `[self.x >= rhs.x, self.y >= rhs.y, ..]` for all\n elements.", - &["_self", "rhs"], - ) - .register_documented( - "cmpgt", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::I64Vec3::cmpgt( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector mask containing the result of a `>` comparison for each element of\n `self` and `rhs`.\n In other words this computes `[self.x > rhs.x, self.y > rhs.y, ..]` for all\n elements.", - &["_self", "rhs"], - ) - .register_documented( - "cmple", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::I64Vec3::cmple( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector mask containing the result of a `<=` comparison for each element of\n `self` and `rhs`.\n In other words this computes `[self.x <= rhs.x, self.y <= rhs.y, ..]` for all\n elements.", - &["_self", "rhs"], - ) - .register_documented( - "cmplt", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::I64Vec3::cmplt( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector mask containing the result of a `<` comparison for each element of\n `self` and `rhs`.\n In other words this computes `[self.x < rhs.x, self.y < rhs.y, ..]` for all\n elements.", - &["_self", "rhs"], - ) - .register_documented( - "cmpne", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::I64Vec3::cmpne( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector mask containing the result of a `!=` comparison for each element of\n `self` and `rhs`.\n In other words this computes `[self.x != rhs.x, self.y != rhs.y, ..]` for all\n elements.", - &["_self", "rhs"], - ) - .register_documented( - "cross", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::I64Vec3::cross( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Computes the cross product of `self` and `rhs`.", - &["_self", "rhs"], - ) - .register_documented( - "distance_squared", - |_self: Val, rhs: Val| { - let output: i64 = { - { - let output: i64 = bevy::math::I64Vec3::distance_squared( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Compute the squared euclidean distance between two points in space.", - &["_self", "rhs"], - ) - .register_documented( - "div", - |_self: Val, rhs: Ref| { - let output: Val = { - { - let output: Val = >::div(_self.into_inner(), &rhs) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "div", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = >::div(_self.into_inner(), rhs.into_inner()) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "div", - |_self: Val, rhs: i64| { - let output: Val = { - { - let output: Val = >::div(_self.into_inner(), rhs) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "div_euclid", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::I64Vec3::div_euclid( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns the element-wise quotient of [Euclidean division] of `self` by `rhs`.\n # Panics\n This function will panic if any `rhs` element is 0 or the division results in overflow.", - &["_self", "rhs"], - ) - .register_documented( - "dot", - |_self: Val, rhs: Val| { - let output: i64 = { - { - let output: i64 = bevy::math::I64Vec3::dot( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Computes the dot product of `self` and `rhs`.", - &["_self", "rhs"], - ) - .register_documented( - "dot_into_vec", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::I64Vec3::dot_into_vec( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector where every component is the dot product of `self` and `rhs`.", - &["_self", "rhs"], - ) - .register_documented( - "element_product", - |_self: Val| { - let output: i64 = { - { - let output: i64 = bevy::math::I64Vec3::element_product( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns the product of all elements of `self`.\n In other words, this computes `self.x * self.y * ..`.", - &["_self"], - ) - .register_documented( - "element_sum", - |_self: Val| { - let output: i64 = { - { - let output: i64 = bevy::math::I64Vec3::element_sum( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns the sum of all elements of `self`.\n In other words, this computes `self.x + self.y + ..`.", - &["_self"], - ) - .register_documented( - "eq", - |_self: Ref, other: Ref| { - let output: bool = { - { - let output: bool = >::eq(&_self, &other) - .into(); - output - } - }; - output - }, - "", - &["_self", "other"], - ) - .register_documented( - "extend", - |_self: Val, w: i64| { - let output: Val = { - { - let output: Val = bevy::math::I64Vec3::extend( - _self.into_inner(), - w, - ) - .into(); - output - } - }; - output - }, - " Creates a 4D vector from `self` and the given `w` value.", - &["_self", "w"], - ) - .register_documented( - "from_array", - |a: [i64; 3]| { - let output: Val = { - { - let output: Val = bevy::math::I64Vec3::from_array( - a, - ) - .into(); - output - } - }; - output - }, - " Creates a new vector from an array.", - &["a"], - ) - .register_documented( - "is_negative_bitmask", - |_self: Val| { - let output: u32 = { - { - let output: u32 = bevy::math::I64Vec3::is_negative_bitmask( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a bitmask with the lowest 3 bits set to the sign bits from the elements of `self`.\n A negative element results in a `1` bit and a positive element in a `0` bit. Element `x` goes\n into the first lowest bit, element `y` into the second, etc.", - &["_self"], - ) - .register_documented( - "length_squared", - |_self: Val| { - let output: i64 = { - { - let output: i64 = bevy::math::I64Vec3::length_squared( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Computes the squared length of `self`.", - &["_self"], - ) - .register_documented( - "max", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::I64Vec3::max( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector containing the maximum values for each element of `self` and `rhs`.\n In other words this computes `[self.x.max(rhs.x), self.y.max(rhs.y), ..]`.", - &["_self", "rhs"], - ) - .register_documented( - "max_element", - |_self: Val| { - let output: i64 = { - { - let output: i64 = bevy::math::I64Vec3::max_element( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns the horizontal maximum of `self`.\n In other words this computes `max(x, y, ..)`.", - &["_self"], - ) - .register_documented( - "min", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::I64Vec3::min( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector containing the minimum values for each element of `self` and `rhs`.\n In other words this computes `[self.x.min(rhs.x), self.y.min(rhs.y), ..]`.", - &["_self", "rhs"], - ) - .register_documented( - "min_element", - |_self: Val| { - let output: i64 = { - { - let output: i64 = bevy::math::I64Vec3::min_element( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns the horizontal minimum of `self`.\n In other words this computes `min(x, y, ..)`.", - &["_self"], - ) - .register_documented( - "mul", - |_self: Val, rhs: Ref| { - let output: Val = { - { - let output: Val = >::mul(_self.into_inner(), &rhs) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "mul", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = >::mul(_self.into_inner(), rhs.into_inner()) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "mul", - |_self: Val, rhs: i64| { - let output: Val = { - { - let output: Val = >::mul(_self.into_inner(), rhs) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "neg", - |_self: Val| { - let output: Val = { - { - let output: Val = ::neg( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - "", - &["_self"], - ) - .register_documented( - "new", - |x: i64, y: i64, z: i64| { - let output: Val = { - { - let output: Val = bevy::math::I64Vec3::new( - x, - y, - z, - ) - .into(); - output - } - }; - output - }, - " Creates a new vector.", - &["x", "y", "z"], - ) - .register_documented( - "rem", - |_self: Val, rhs: Ref| { - let output: Val = { - { - let output: Val = >::rem(_self.into_inner(), &rhs) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "rem", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = >::rem(_self.into_inner(), rhs.into_inner()) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "rem", - |_self: Val, rhs: i64| { - let output: Val = { - { - let output: Val = >::rem(_self.into_inner(), rhs) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "rem_euclid", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::I64Vec3::rem_euclid( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns the element-wise remainder of [Euclidean division] of `self` by `rhs`.\n # Panics\n This function will panic if any `rhs` element is 0 or the division results in overflow.\n [Euclidean division]: i64::rem_euclid", - &["_self", "rhs"], - ) - .register_documented( - "saturating_add", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::I64Vec3::saturating_add( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector containing the saturating addition of `self` and `rhs`.\n In other words this computes `[self.x.saturating_add(rhs.x), self.y.saturating_add(rhs.y), ..]`.", - &["_self", "rhs"], - ) - .register_documented( - "saturating_add_unsigned", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::I64Vec3::saturating_add_unsigned( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " In other words this computes `[self.x.saturating_add_unsigned(rhs.x), self.y.saturating_add_unsigned(rhs.y), ..]`.", - &["_self", "rhs"], - ) - .register_documented( - "saturating_div", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::I64Vec3::saturating_div( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector containing the saturating division of `self` and `rhs`.\n In other words this computes `[self.x.saturating_div(rhs.x), self.y.saturating_div(rhs.y), ..]`.", - &["_self", "rhs"], - ) - .register_documented( - "saturating_mul", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::I64Vec3::saturating_mul( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector containing the saturating multiplication of `self` and `rhs`.\n In other words this computes `[self.x.saturating_mul(rhs.x), self.y.saturating_mul(rhs.y), ..]`.", - &["_self", "rhs"], - ) - .register_documented( - "saturating_sub", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::I64Vec3::saturating_sub( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector containing the saturating subtraction of `self` and `rhs`.\n In other words this computes `[self.x.saturating_sub(rhs.x), self.y.saturating_sub(rhs.y), ..]`.", - &["_self", "rhs"], - ) - .register_documented( - "saturating_sub_unsigned", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::I64Vec3::saturating_sub_unsigned( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector containing the saturating subtraction of `self` and unsigned vector `rhs`.\n In other words this computes `[self.x.saturating_sub_unsigned(rhs.x), self.y.saturating_sub_unsigned(rhs.y), ..]`.", - &["_self", "rhs"], - ) - .register_documented( - "select", - | - mask: Val, - if_true: Val, - if_false: Val| - { - let output: Val = { - { - let output: Val = bevy::math::I64Vec3::select( - mask.into_inner(), - if_true.into_inner(), - if_false.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Creates a vector from the elements in `if_true` and `if_false`, selecting which to use\n for each element of `self`.\n A true element in the mask uses the corresponding element from `if_true`, and false\n uses the element from `if_false`.", - &["mask", "if_true", "if_false"], - ) - .register_documented( - "signum", - |_self: Val| { - let output: Val = { - { - let output: Val = bevy::math::I64Vec3::signum( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector with elements representing the sign of `self`.\n - `0` if the number is zero\n - `1` if the number is positive\n - `-1` if the number is negative", - &["_self"], - ) - .register_documented( - "splat", - |v: i64| { - let output: Val = { - { - let output: Val = bevy::math::I64Vec3::splat( - v, - ) - .into(); - output - } - }; - output - }, - " Creates a vector with all elements set to `v`.", - &["v"], - ) - .register_documented( - "sub", - |_self: Val, rhs: Ref| { - let output: Val = { - { - let output: Val = >::sub(_self.into_inner(), &rhs) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "sub", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = >::sub(_self.into_inner(), rhs.into_inner()) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "sub", - |_self: Val, rhs: i64| { - let output: Val = { - { - let output: Val = >::sub(_self.into_inner(), rhs) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "to_array", - |_self: Ref| { - let output: [i64; 3] = { - { - let output: [i64; 3] = bevy::math::I64Vec3::to_array(&_self) - .into(); - output - } - }; - output - }, - " `[x, y, z]`", - &["_self"], - ) - .register_documented( - "truncate", - |_self: Val| { - let output: Val = { - { - let output: Val = bevy::math::I64Vec3::truncate( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Creates a 2D vector from the `x` and `y` elements of `self`, discarding `z`.\n Truncation may also be performed by using [`self.xy()`][crate::swizzles::Vec3Swizzles::xy()].", - &["_self"], - ) - .register_documented( - "with_x", - |_self: Val, x: i64| { - let output: Val = { - { - let output: Val = bevy::math::I64Vec3::with_x( - _self.into_inner(), - x, - ) - .into(); - output - } - }; - output - }, - " Creates a 3D vector from `self` with the given value of `x`.", - &["_self", "x"], - ) - .register_documented( - "with_y", - |_self: Val, y: i64| { - let output: Val = { - { - let output: Val = bevy::math::I64Vec3::with_y( - _self.into_inner(), - y, - ) - .into(); - output - } - }; - output - }, - " Creates a 3D vector from `self` with the given value of `y`.", - &["_self", "y"], - ) - .register_documented( - "with_z", - |_self: Val, z: i64| { - let output: Val = { - { - let output: Val = bevy::math::I64Vec3::with_z( - _self.into_inner(), - z, - ) - .into(); - output - } - }; - output - }, - " Creates a 3D vector from `self` with the given value of `z`.", - &["_self", "z"], - ) - .register_documented( - "wrapping_add", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::I64Vec3::wrapping_add( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector containing the wrapping addition of `self` and `rhs`.\n In other words this computes `[self.x.wrapping_add(rhs.x), self.y.wrapping_add(rhs.y), ..]`.", - &["_self", "rhs"], - ) - .register_documented( - "wrapping_add_unsigned", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::I64Vec3::wrapping_add_unsigned( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector containing the wrapping addition of `self` and unsigned vector `rhs`.\n In other words this computes `[self.x.wrapping_add_unsigned(rhs.x), self.y.wrapping_add_unsigned(rhs.y), ..]`.", - &["_self", "rhs"], - ) - .register_documented( - "wrapping_div", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::I64Vec3::wrapping_div( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector containing the wrapping division of `self` and `rhs`.\n In other words this computes `[self.x.wrapping_div(rhs.x), self.y.wrapping_div(rhs.y), ..]`.", - &["_self", "rhs"], - ) - .register_documented( - "wrapping_mul", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::I64Vec3::wrapping_mul( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector containing the wrapping multiplication of `self` and `rhs`.\n In other words this computes `[self.x.wrapping_mul(rhs.x), self.y.wrapping_mul(rhs.y), ..]`.", - &["_self", "rhs"], - ) - .register_documented( - "wrapping_sub", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::I64Vec3::wrapping_sub( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector containing the wrapping subtraction of `self` and `rhs`.\n In other words this computes `[self.x.wrapping_sub(rhs.x), self.y.wrapping_sub(rhs.y), ..]`.", - &["_self", "rhs"], - ) - .register_documented( - "wrapping_sub_unsigned", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::I64Vec3::wrapping_sub_unsigned( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector containing the wrapping subtraction of `self` and unsigned vector `rhs`.\n In other words this computes `[self.x.wrapping_sub_unsigned(rhs.x), self.y.wrapping_sub_unsigned(rhs.y), ..]`.", - &["_self", "rhs"], - ); - let registry = world - .get_resource_or_init::(); - let mut registry = registry.write(); - registry - .register_type_data::< - bevy::math::I64Vec3, - bevy_mod_scripting_core::bindings::MarkAsGenerated, - >(); - } - pub(crate) fn register_i_64_vec_4_functions(world: &mut bevy::ecs::world::World) { - bevy_mod_scripting_core::bindings::function::namespace::NamespaceBuilder::< - bevy::math::I64Vec4, - >::new(world) - .register_documented( - "abs", - |_self: Val| { - let output: Val = { - { - let output: Val = bevy::math::I64Vec4::abs( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector containing the absolute value of each element of `self`.", - &["_self"], - ) - .register_documented( - "add", - |_self: Val, rhs: Ref| { - let output: Val = { - { - let output: Val = >::add(_self.into_inner(), &rhs) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "add", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = >::add(_self.into_inner(), rhs.into_inner()) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "add", - |_self: Val, rhs: i64| { - let output: Val = { - { - let output: Val = >::add(_self.into_inner(), rhs) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "as_dvec4", - |_self: Ref| { - let output: Val = { - { - let output: Val = bevy::math::I64Vec4::as_dvec4( - &_self, - ) - .into(); - output - } - }; - output - }, - " Casts all elements of `self` to `f64`.", - &["_self"], - ) - .register_documented( - "as_i16vec4", - |_self: Ref| { - let output: Val = { - { - let output: Val = bevy::math::I64Vec4::as_i16vec4( - &_self, - ) - .into(); - output - } - }; - output - }, - " Casts all elements of `self` to `i16`.", - &["_self"], - ) - .register_documented( - "as_i8vec4", - |_self: Ref| { - let output: Val = { - { - let output: Val = bevy::math::I64Vec4::as_i8vec4( - &_self, - ) - .into(); - output - } - }; - output - }, - " Casts all elements of `self` to `i8`.", - &["_self"], - ) - .register_documented( - "as_ivec4", - |_self: Ref| { - let output: Val = { - { - let output: Val = bevy::math::I64Vec4::as_ivec4( - &_self, - ) - .into(); - output - } - }; - output - }, - " Casts all elements of `self` to `i32`.", - &["_self"], - ) - .register_documented( - "as_u16vec4", - |_self: Ref| { - let output: Val = { - { - let output: Val = bevy::math::I64Vec4::as_u16vec4( - &_self, - ) - .into(); - output - } - }; - output - }, - " Casts all elements of `self` to `u16`.", - &["_self"], - ) - .register_documented( - "as_u64vec4", - |_self: Ref| { - let output: Val = { - { - let output: Val = bevy::math::I64Vec4::as_u64vec4( - &_self, - ) - .into(); - output - } - }; - output - }, - " Casts all elements of `self` to `u64`.", - &["_self"], - ) - .register_documented( - "as_u8vec4", - |_self: Ref| { - let output: Val = { - { - let output: Val = bevy::math::I64Vec4::as_u8vec4( - &_self, - ) - .into(); - output - } - }; - output - }, - " Casts all elements of `self` to `u8`.", - &["_self"], - ) - .register_documented( - "as_uvec4", - |_self: Ref| { - let output: Val = { - { - let output: Val = bevy::math::I64Vec4::as_uvec4( - &_self, - ) - .into(); - output - } - }; - output - }, - " Casts all elements of `self` to `u32`.", - &["_self"], - ) - .register_documented( - "as_vec4", - |_self: Ref| { - let output: Val = { - { - let output: Val = bevy::math::I64Vec4::as_vec4( - &_self, - ) - .into(); - output - } - }; - output - }, - " Casts all elements of `self` to `f32`.", - &["_self"], - ) - .register_documented( - "assert_receiver_is_total_eq", - |_self: Ref| { - let output: () = { - { - let output: () = ::assert_receiver_is_total_eq( - &_self, - ) - .into(); - output - } - }; - output - }, - "", - &["_self"], - ) - .register_documented( - "clamp", - | - _self: Val, - min: Val, - max: Val| - { - let output: Val = { - { - let output: Val = bevy::math::I64Vec4::clamp( - _self.into_inner(), - min.into_inner(), - max.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Component-wise clamping of values, similar to [`i64::clamp`].\n Each element in `min` must be less-or-equal to the corresponding element in `max`.\n # Panics\n Will panic if `min` is greater than `max` when `glam_assert` is enabled.", - &["_self", "min", "max"], - ) - .register_documented( - "clone", - |_self: Ref| { - let output: Val = { - { - let output: Val = ::clone( - &_self, - ) - .into(); - output - } - }; - output - }, - "", - &["_self"], - ) - .register_documented( - "cmpeq", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::I64Vec4::cmpeq( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector mask containing the result of a `==` comparison for each element of\n `self` and `rhs`.\n In other words, this computes `[self.x == rhs.x, self.y == rhs.y, ..]` for all\n elements.", - &["_self", "rhs"], - ) - .register_documented( - "cmpge", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::I64Vec4::cmpge( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector mask containing the result of a `>=` comparison for each element of\n `self` and `rhs`.\n In other words this computes `[self.x >= rhs.x, self.y >= rhs.y, ..]` for all\n elements.", - &["_self", "rhs"], - ) - .register_documented( - "cmpgt", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::I64Vec4::cmpgt( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector mask containing the result of a `>` comparison for each element of\n `self` and `rhs`.\n In other words this computes `[self.x > rhs.x, self.y > rhs.y, ..]` for all\n elements.", - &["_self", "rhs"], - ) - .register_documented( - "cmple", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::I64Vec4::cmple( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector mask containing the result of a `<=` comparison for each element of\n `self` and `rhs`.\n In other words this computes `[self.x <= rhs.x, self.y <= rhs.y, ..]` for all\n elements.", - &["_self", "rhs"], - ) - .register_documented( - "cmplt", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::I64Vec4::cmplt( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector mask containing the result of a `<` comparison for each element of\n `self` and `rhs`.\n In other words this computes `[self.x < rhs.x, self.y < rhs.y, ..]` for all\n elements.", - &["_self", "rhs"], - ) - .register_documented( - "cmpne", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::I64Vec4::cmpne( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector mask containing the result of a `!=` comparison for each element of\n `self` and `rhs`.\n In other words this computes `[self.x != rhs.x, self.y != rhs.y, ..]` for all\n elements.", - &["_self", "rhs"], - ) - .register_documented( - "distance_squared", - |_self: Val, rhs: Val| { - let output: i64 = { - { - let output: i64 = bevy::math::I64Vec4::distance_squared( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Compute the squared euclidean distance between two points in space.", - &["_self", "rhs"], - ) - .register_documented( - "div", - |_self: Val, rhs: Ref| { - let output: Val = { - { - let output: Val = >::div(_self.into_inner(), &rhs) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "div", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = >::div(_self.into_inner(), rhs.into_inner()) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "div", - |_self: Val, rhs: i64| { - let output: Val = { - { - let output: Val = >::div(_self.into_inner(), rhs) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "div_euclid", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::I64Vec4::div_euclid( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns the element-wise quotient of [Euclidean division] of `self` by `rhs`.\n # Panics\n This function will panic if any `rhs` element is 0 or the division results in overflow.", - &["_self", "rhs"], - ) - .register_documented( - "dot", - |_self: Val, rhs: Val| { - let output: i64 = { - { - let output: i64 = bevy::math::I64Vec4::dot( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Computes the dot product of `self` and `rhs`.", - &["_self", "rhs"], - ) - .register_documented( - "dot_into_vec", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::I64Vec4::dot_into_vec( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector where every component is the dot product of `self` and `rhs`.", - &["_self", "rhs"], - ) - .register_documented( - "element_product", - |_self: Val| { - let output: i64 = { - { - let output: i64 = bevy::math::I64Vec4::element_product( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns the product of all elements of `self`.\n In other words, this computes `self.x * self.y * ..`.", - &["_self"], - ) - .register_documented( - "element_sum", - |_self: Val| { - let output: i64 = { - { - let output: i64 = bevy::math::I64Vec4::element_sum( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns the sum of all elements of `self`.\n In other words, this computes `self.x + self.y + ..`.", - &["_self"], - ) - .register_documented( - "eq", - |_self: Ref, other: Ref| { - let output: bool = { - { - let output: bool = >::eq(&_self, &other) - .into(); - output - } - }; - output - }, - "", - &["_self", "other"], - ) - .register_documented( - "from_array", - |a: [i64; 4]| { - let output: Val = { - { - let output: Val = bevy::math::I64Vec4::from_array( - a, - ) - .into(); - output - } - }; - output - }, - " Creates a new vector from an array.", - &["a"], - ) - .register_documented( - "is_negative_bitmask", - |_self: Val| { - let output: u32 = { - { - let output: u32 = bevy::math::I64Vec4::is_negative_bitmask( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a bitmask with the lowest 4 bits set to the sign bits from the elements of `self`.\n A negative element results in a `1` bit and a positive element in a `0` bit. Element `x` goes\n into the first lowest bit, element `y` into the second, etc.", - &["_self"], - ) - .register_documented( - "length_squared", - |_self: Val| { - let output: i64 = { - { - let output: i64 = bevy::math::I64Vec4::length_squared( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Computes the squared length of `self`.", - &["_self"], - ) - .register_documented( - "max", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::I64Vec4::max( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector containing the maximum values for each element of `self` and `rhs`.\n In other words this computes `[self.x.max(rhs.x), self.y.max(rhs.y), ..]`.", - &["_self", "rhs"], - ) - .register_documented( - "max_element", - |_self: Val| { - let output: i64 = { - { - let output: i64 = bevy::math::I64Vec4::max_element( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns the horizontal maximum of `self`.\n In other words this computes `max(x, y, ..)`.", - &["_self"], - ) - .register_documented( - "min", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::I64Vec4::min( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector containing the minimum values for each element of `self` and `rhs`.\n In other words this computes `[self.x.min(rhs.x), self.y.min(rhs.y), ..]`.", - &["_self", "rhs"], - ) - .register_documented( - "min_element", - |_self: Val| { - let output: i64 = { - { - let output: i64 = bevy::math::I64Vec4::min_element( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns the horizontal minimum of `self`.\n In other words this computes `min(x, y, ..)`.", - &["_self"], - ) - .register_documented( - "mul", - |_self: Val, rhs: Ref| { - let output: Val = { - { - let output: Val = >::mul(_self.into_inner(), &rhs) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "mul", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = >::mul(_self.into_inner(), rhs.into_inner()) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "mul", - |_self: Val, rhs: i64| { - let output: Val = { - { - let output: Val = >::mul(_self.into_inner(), rhs) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "neg", - |_self: Val| { - let output: Val = { - { - let output: Val = ::neg( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - "", - &["_self"], - ) - .register_documented( - "new", - |x: i64, y: i64, z: i64, w: i64| { - let output: Val = { - { - let output: Val = bevy::math::I64Vec4::new( - x, - y, - z, - w, - ) - .into(); - output - } - }; - output - }, - " Creates a new vector.", - &["x", "y", "z", "w"], - ) - .register_documented( - "rem", - |_self: Val, rhs: Ref| { - let output: Val = { - { - let output: Val = >::rem(_self.into_inner(), &rhs) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "rem", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = >::rem(_self.into_inner(), rhs.into_inner()) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "rem", - |_self: Val, rhs: i64| { - let output: Val = { - { - let output: Val = >::rem(_self.into_inner(), rhs) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "rem_euclid", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::I64Vec4::rem_euclid( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns the element-wise remainder of [Euclidean division] of `self` by `rhs`.\n # Panics\n This function will panic if any `rhs` element is 0 or the division results in overflow.\n [Euclidean division]: i64::rem_euclid", - &["_self", "rhs"], - ) - .register_documented( - "saturating_add", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::I64Vec4::saturating_add( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector containing the saturating addition of `self` and `rhs`.\n In other words this computes `[self.x.saturating_add(rhs.x), self.y.saturating_add(rhs.y), ..]`.", - &["_self", "rhs"], - ) - .register_documented( - "saturating_add_unsigned", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::I64Vec4::saturating_add_unsigned( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " In other words this computes `[self.x.saturating_add_unsigned(rhs.x), self.y.saturating_add_unsigned(rhs.y), ..]`.", - &["_self", "rhs"], - ) - .register_documented( - "saturating_div", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::I64Vec4::saturating_div( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector containing the saturating division of `self` and `rhs`.\n In other words this computes `[self.x.saturating_div(rhs.x), self.y.saturating_div(rhs.y), ..]`.", - &["_self", "rhs"], - ) - .register_documented( - "saturating_mul", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::I64Vec4::saturating_mul( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector containing the saturating multiplication of `self` and `rhs`.\n In other words this computes `[self.x.saturating_mul(rhs.x), self.y.saturating_mul(rhs.y), ..]`.", - &["_self", "rhs"], - ) - .register_documented( - "saturating_sub", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::I64Vec4::saturating_sub( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector containing the saturating subtraction of `self` and `rhs`.\n In other words this computes `[self.x.saturating_sub(rhs.x), self.y.saturating_sub(rhs.y), ..]`.", - &["_self", "rhs"], - ) - .register_documented( - "saturating_sub_unsigned", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::I64Vec4::saturating_sub_unsigned( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector containing the saturating subtraction of `self` and unsigned vector `rhs`.\n In other words this computes `[self.x.saturating_sub_unsigned(rhs.x), self.y.saturating_sub_unsigned(rhs.y), ..]`.", - &["_self", "rhs"], - ) - .register_documented( - "select", - | - mask: Val, - if_true: Val, - if_false: Val| - { - let output: Val = { - { - let output: Val = bevy::math::I64Vec4::select( - mask.into_inner(), - if_true.into_inner(), - if_false.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Creates a vector from the elements in `if_true` and `if_false`, selecting which to use\n for each element of `self`.\n A true element in the mask uses the corresponding element from `if_true`, and false\n uses the element from `if_false`.", - &["mask", "if_true", "if_false"], - ) - .register_documented( - "signum", - |_self: Val| { - let output: Val = { - { - let output: Val = bevy::math::I64Vec4::signum( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector with elements representing the sign of `self`.\n - `0` if the number is zero\n - `1` if the number is positive\n - `-1` if the number is negative", - &["_self"], - ) - .register_documented( - "splat", - |v: i64| { - let output: Val = { - { - let output: Val = bevy::math::I64Vec4::splat( - v, - ) - .into(); - output - } - }; - output - }, - " Creates a vector with all elements set to `v`.", - &["v"], - ) - .register_documented( - "sub", - |_self: Val, rhs: Ref| { - let output: Val = { - { - let output: Val = >::sub(_self.into_inner(), &rhs) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "sub", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = >::sub(_self.into_inner(), rhs.into_inner()) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "sub", - |_self: Val, rhs: i64| { - let output: Val = { - { - let output: Val = >::sub(_self.into_inner(), rhs) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "to_array", - |_self: Ref| { - let output: [i64; 4] = { - { - let output: [i64; 4] = bevy::math::I64Vec4::to_array(&_self) - .into(); - output - } - }; - output - }, - " `[x, y, z, w]`", - &["_self"], - ) - .register_documented( - "truncate", - |_self: Val| { - let output: Val = { - { - let output: Val = bevy::math::I64Vec4::truncate( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Creates a 3D vector from the `x`, `y` and `z` elements of `self`, discarding `w`.\n Truncation to [`I64Vec3`] may also be performed by using [`self.xyz()`][crate::swizzles::Vec4Swizzles::xyz()].", - &["_self"], - ) - .register_documented( - "with_w", - |_self: Val, w: i64| { - let output: Val = { - { - let output: Val = bevy::math::I64Vec4::with_w( - _self.into_inner(), - w, - ) - .into(); - output - } - }; - output - }, - " Creates a 4D vector from `self` with the given value of `w`.", - &["_self", "w"], - ) - .register_documented( - "with_x", - |_self: Val, x: i64| { - let output: Val = { - { - let output: Val = bevy::math::I64Vec4::with_x( - _self.into_inner(), - x, - ) - .into(); - output - } - }; - output - }, - " Creates a 4D vector from `self` with the given value of `x`.", - &["_self", "x"], - ) - .register_documented( - "with_y", - |_self: Val, y: i64| { - let output: Val = { - { - let output: Val = bevy::math::I64Vec4::with_y( - _self.into_inner(), - y, - ) - .into(); - output - } - }; - output - }, - " Creates a 4D vector from `self` with the given value of `y`.", - &["_self", "y"], - ) - .register_documented( - "with_z", - |_self: Val, z: i64| { - let output: Val = { - { - let output: Val = bevy::math::I64Vec4::with_z( - _self.into_inner(), - z, - ) - .into(); - output - } - }; - output - }, - " Creates a 4D vector from `self` with the given value of `z`.", - &["_self", "z"], - ) - .register_documented( - "wrapping_add", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::I64Vec4::wrapping_add( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector containing the wrapping addition of `self` and `rhs`.\n In other words this computes `[self.x.wrapping_add(rhs.x), self.y.wrapping_add(rhs.y), ..]`.", - &["_self", "rhs"], - ) - .register_documented( - "wrapping_add_unsigned", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::I64Vec4::wrapping_add_unsigned( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector containing the wrapping addition of `self` and unsigned vector `rhs`.\n In other words this computes `[self.x.wrapping_add_unsigned(rhs.x), self.y.wrapping_add_unsigned(rhs.y), ..]`.", - &["_self", "rhs"], - ) - .register_documented( - "wrapping_div", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::I64Vec4::wrapping_div( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector containing the wrapping division of `self` and `rhs`.\n In other words this computes `[self.x.wrapping_div(rhs.x), self.y.wrapping_div(rhs.y), ..]`.", - &["_self", "rhs"], - ) - .register_documented( - "wrapping_mul", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::I64Vec4::wrapping_mul( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector containing the wrapping multiplication of `self` and `rhs`.\n In other words this computes `[self.x.wrapping_mul(rhs.x), self.y.wrapping_mul(rhs.y), ..]`.", - &["_self", "rhs"], - ) - .register_documented( - "wrapping_sub", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::I64Vec4::wrapping_sub( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector containing the wrapping subtraction of `self` and `rhs`.\n In other words this computes `[self.x.wrapping_sub(rhs.x), self.y.wrapping_sub(rhs.y), ..]`.", - &["_self", "rhs"], - ) - .register_documented( - "wrapping_sub_unsigned", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::I64Vec4::wrapping_sub_unsigned( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector containing the wrapping subtraction of `self` and unsigned vector `rhs`.\n In other words this computes `[self.x.wrapping_sub_unsigned(rhs.x), self.y.wrapping_sub_unsigned(rhs.y), ..]`.", - &["_self", "rhs"], - ); - let registry = world - .get_resource_or_init::(); - let mut registry = registry.write(); - registry - .register_type_data::< - bevy::math::I64Vec4, - bevy_mod_scripting_core::bindings::MarkAsGenerated, - >(); - } - pub(crate) fn register_u_vec_2_functions(world: &mut bevy::ecs::world::World) { - bevy_mod_scripting_core::bindings::function::namespace::NamespaceBuilder::< - bevy::math::UVec2, - >::new(world) - .register_documented( - "add", - |_self: Val, rhs: Ref| { - let output: Val = { - { - let output: Val = >::add(_self.into_inner(), &rhs) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "add", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = >::add(_self.into_inner(), rhs.into_inner()) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "add", - |_self: Val, rhs: u32| { - let output: Val = { - { - let output: Val = >::add(_self.into_inner(), rhs) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "as_dvec2", - |_self: Ref| { - let output: Val = { - { - let output: Val = bevy::math::UVec2::as_dvec2( - &_self, - ) - .into(); - output - } - }; - output - }, - " Casts all elements of `self` to `f64`.", - &["_self"], - ) - .register_documented( - "as_i16vec2", - |_self: Ref| { - let output: Val = { - { - let output: Val = bevy::math::UVec2::as_i16vec2( - &_self, - ) - .into(); - output - } - }; - output - }, - " Casts all elements of `self` to `i16`.", - &["_self"], - ) - .register_documented( - "as_i64vec2", - |_self: Ref| { - let output: Val = { - { - let output: Val = bevy::math::UVec2::as_i64vec2( - &_self, - ) - .into(); - output - } - }; - output - }, - " Casts all elements of `self` to `i64`.", - &["_self"], - ) - .register_documented( - "as_i8vec2", - |_self: Ref| { - let output: Val = { - { - let output: Val = bevy::math::UVec2::as_i8vec2( - &_self, - ) - .into(); - output - } - }; - output - }, - " Casts all elements of `self` to `i8`.", - &["_self"], - ) - .register_documented( - "as_ivec2", - |_self: Ref| { - let output: Val = { - { - let output: Val = bevy::math::UVec2::as_ivec2( - &_self, - ) - .into(); - output - } - }; - output - }, - " Casts all elements of `self` to `i32`.", - &["_self"], - ) - .register_documented( - "as_u16vec2", - |_self: Ref| { - let output: Val = { - { - let output: Val = bevy::math::UVec2::as_u16vec2( - &_self, - ) - .into(); - output - } - }; - output - }, - " Casts all elements of `self` to `u16`.", - &["_self"], - ) - .register_documented( - "as_u64vec2", - |_self: Ref| { - let output: Val = { - { - let output: Val = bevy::math::UVec2::as_u64vec2( - &_self, - ) - .into(); - output - } - }; - output - }, - " Casts all elements of `self` to `u64`.", - &["_self"], - ) - .register_documented( - "as_u8vec2", - |_self: Ref| { - let output: Val = { - { - let output: Val = bevy::math::UVec2::as_u8vec2( - &_self, - ) - .into(); - output - } - }; - output - }, - " Casts all elements of `self` to `u8`.", - &["_self"], - ) - .register_documented( - "as_vec2", - |_self: Ref| { - let output: Val = { - { - let output: Val = bevy::math::UVec2::as_vec2( - &_self, - ) - .into(); - output - } - }; - output - }, - " Casts all elements of `self` to `f32`.", - &["_self"], - ) - .register_documented( - "assert_receiver_is_total_eq", - |_self: Ref| { - let output: () = { - { - let output: () = ::assert_receiver_is_total_eq( - &_self, - ) - .into(); - output - } - }; - output - }, - "", - &["_self"], - ) - .register_documented( - "clamp", - | - _self: Val, - min: Val, - max: Val| - { - let output: Val = { - { - let output: Val = bevy::math::UVec2::clamp( - _self.into_inner(), - min.into_inner(), - max.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Component-wise clamping of values, similar to [`u32::clamp`].\n Each element in `min` must be less-or-equal to the corresponding element in `max`.\n # Panics\n Will panic if `min` is greater than `max` when `glam_assert` is enabled.", - &["_self", "min", "max"], - ) - .register_documented( - "clone", - |_self: Ref| { - let output: Val = { - { - let output: Val = ::clone( - &_self, - ) - .into(); - output - } - }; - output - }, - "", - &["_self"], - ) - .register_documented( - "cmpeq", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::UVec2::cmpeq( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector mask containing the result of a `==` comparison for each element of\n `self` and `rhs`.\n In other words, this computes `[self.x == rhs.x, self.y == rhs.y, ..]` for all\n elements.", - &["_self", "rhs"], - ) - .register_documented( - "cmpge", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::UVec2::cmpge( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector mask containing the result of a `>=` comparison for each element of\n `self` and `rhs`.\n In other words this computes `[self.x >= rhs.x, self.y >= rhs.y, ..]` for all\n elements.", - &["_self", "rhs"], - ) - .register_documented( - "cmpgt", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::UVec2::cmpgt( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector mask containing the result of a `>` comparison for each element of\n `self` and `rhs`.\n In other words this computes `[self.x > rhs.x, self.y > rhs.y, ..]` for all\n elements.", - &["_self", "rhs"], - ) - .register_documented( - "cmple", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::UVec2::cmple( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector mask containing the result of a `<=` comparison for each element of\n `self` and `rhs`.\n In other words this computes `[self.x <= rhs.x, self.y <= rhs.y, ..]` for all\n elements.", - &["_self", "rhs"], - ) - .register_documented( - "cmplt", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::UVec2::cmplt( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector mask containing the result of a `<` comparison for each element of\n `self` and `rhs`.\n In other words this computes `[self.x < rhs.x, self.y < rhs.y, ..]` for all\n elements.", - &["_self", "rhs"], - ) - .register_documented( - "cmpne", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::UVec2::cmpne( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector mask containing the result of a `!=` comparison for each element of\n `self` and `rhs`.\n In other words this computes `[self.x != rhs.x, self.y != rhs.y, ..]` for all\n elements.", - &["_self", "rhs"], - ) - .register_documented( - "div", - |_self: Val, rhs: Ref| { - let output: Val = { - { - let output: Val = >::div(_self.into_inner(), &rhs) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "div", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = >::div(_self.into_inner(), rhs.into_inner()) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "div", - |_self: Val, rhs: u32| { - let output: Val = { - { - let output: Val = >::div(_self.into_inner(), rhs) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "dot", - |_self: Val, rhs: Val| { - let output: u32 = { - { - let output: u32 = bevy::math::UVec2::dot( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Computes the dot product of `self` and `rhs`.", - &["_self", "rhs"], - ) - .register_documented( - "dot_into_vec", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::UVec2::dot_into_vec( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector where every component is the dot product of `self` and `rhs`.", - &["_self", "rhs"], - ) - .register_documented( - "element_product", - |_self: Val| { - let output: u32 = { - { - let output: u32 = bevy::math::UVec2::element_product( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns the product of all elements of `self`.\n In other words, this computes `self.x * self.y * ..`.", - &["_self"], - ) - .register_documented( - "element_sum", - |_self: Val| { - let output: u32 = { - { - let output: u32 = bevy::math::UVec2::element_sum( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns the sum of all elements of `self`.\n In other words, this computes `self.x + self.y + ..`.", - &["_self"], - ) - .register_documented( - "eq", - |_self: Ref, other: Ref| { - let output: bool = { - { - let output: bool = >::eq(&_self, &other) - .into(); - output - } - }; - output - }, - "", - &["_self", "other"], - ) - .register_documented( - "extend", - |_self: Val, z: u32| { - let output: Val = { - { - let output: Val = bevy::math::UVec2::extend( - _self.into_inner(), - z, - ) - .into(); - output - } - }; - output - }, - " Creates a 3D vector from `self` and the given `z` value.", - &["_self", "z"], - ) - .register_documented( - "from_array", - |a: [u32; 2]| { - let output: Val = { - { - let output: Val = bevy::math::UVec2::from_array( - a, - ) - .into(); - output - } - }; - output - }, - " Creates a new vector from an array.", - &["a"], - ) - .register_documented( - "length_squared", - |_self: Val| { - let output: u32 = { - { - let output: u32 = bevy::math::UVec2::length_squared( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Computes the squared length of `self`.", - &["_self"], - ) - .register_documented( - "max", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::UVec2::max( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector containing the maximum values for each element of `self` and `rhs`.\n In other words this computes `[self.x.max(rhs.x), self.y.max(rhs.y), ..]`.", - &["_self", "rhs"], - ) - .register_documented( - "max_element", - |_self: Val| { - let output: u32 = { - { - let output: u32 = bevy::math::UVec2::max_element( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns the horizontal maximum of `self`.\n In other words this computes `max(x, y, ..)`.", - &["_self"], - ) - .register_documented( - "min", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::UVec2::min( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector containing the minimum values for each element of `self` and `rhs`.\n In other words this computes `[self.x.min(rhs.x), self.y.min(rhs.y), ..]`.", - &["_self", "rhs"], - ) - .register_documented( - "min_element", - |_self: Val| { - let output: u32 = { - { - let output: u32 = bevy::math::UVec2::min_element( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns the horizontal minimum of `self`.\n In other words this computes `min(x, y, ..)`.", - &["_self"], - ) - .register_documented( - "mul", - |_self: Val, rhs: Ref| { - let output: Val = { - { - let output: Val = >::mul(_self.into_inner(), &rhs) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "mul", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = >::mul(_self.into_inner(), rhs.into_inner()) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "mul", - |_self: Val, rhs: u32| { - let output: Val = { - { - let output: Val = >::mul(_self.into_inner(), rhs) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "new", - |x: u32, y: u32| { - let output: Val = { - { - let output: Val = bevy::math::UVec2::new( - x, - y, - ) - .into(); - output - } - }; - output - }, - " Creates a new vector.", - &["x", "y"], - ) - .register_documented( - "rem", - |_self: Val, rhs: Ref| { - let output: Val = { - { - let output: Val = >::rem(_self.into_inner(), &rhs) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "rem", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = >::rem(_self.into_inner(), rhs.into_inner()) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "rem", - |_self: Val, rhs: u32| { - let output: Val = { - { - let output: Val = >::rem(_self.into_inner(), rhs) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "saturating_add", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::UVec2::saturating_add( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector containing the saturating addition of `self` and `rhs`.\n In other words this computes `[self.x.saturating_add(rhs.x), self.y.saturating_add(rhs.y), ..]`.", - &["_self", "rhs"], - ) - .register_documented( - "saturating_add_signed", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::UVec2::saturating_add_signed( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector containing the saturating addition of `self` and signed vector `rhs`.\n In other words this computes `[self.x.saturating_add_signed(rhs.x), self.y.saturating_add_signed(rhs.y), ..]`.", - &["_self", "rhs"], - ) - .register_documented( - "saturating_div", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::UVec2::saturating_div( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector containing the saturating division of `self` and `rhs`.\n In other words this computes `[self.x.saturating_div(rhs.x), self.y.saturating_div(rhs.y), ..]`.", - &["_self", "rhs"], - ) - .register_documented( - "saturating_mul", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::UVec2::saturating_mul( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector containing the saturating multiplication of `self` and `rhs`.\n In other words this computes `[self.x.saturating_mul(rhs.x), self.y.saturating_mul(rhs.y), ..]`.", - &["_self", "rhs"], - ) - .register_documented( - "saturating_sub", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::UVec2::saturating_sub( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector containing the saturating subtraction of `self` and `rhs`.\n In other words this computes `[self.x.saturating_sub(rhs.x), self.y.saturating_sub(rhs.y), ..]`.", - &["_self", "rhs"], - ) - .register_documented( - "select", - | - mask: Val, - if_true: Val, - if_false: Val| - { - let output: Val = { - { - let output: Val = bevy::math::UVec2::select( - mask.into_inner(), - if_true.into_inner(), - if_false.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Creates a vector from the elements in `if_true` and `if_false`, selecting which to use\n for each element of `self`.\n A true element in the mask uses the corresponding element from `if_true`, and false\n uses the element from `if_false`.", - &["mask", "if_true", "if_false"], - ) - .register_documented( - "splat", - |v: u32| { - let output: Val = { - { - let output: Val = bevy::math::UVec2::splat( - v, - ) - .into(); - output - } - }; - output - }, - " Creates a vector with all elements set to `v`.", - &["v"], - ) - .register_documented( - "sub", - |_self: Val, rhs: Ref| { - let output: Val = { - { - let output: Val = >::sub(_self.into_inner(), &rhs) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "sub", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = >::sub(_self.into_inner(), rhs.into_inner()) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "sub", - |_self: Val, rhs: u32| { - let output: Val = { - { - let output: Val = >::sub(_self.into_inner(), rhs) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "to_array", - |_self: Ref| { - let output: [u32; 2] = { - { - let output: [u32; 2] = bevy::math::UVec2::to_array(&_self) - .into(); - output - } - }; - output - }, - " `[x, y]`", - &["_self"], - ) - .register_documented( - "with_x", - |_self: Val, x: u32| { - let output: Val = { - { - let output: Val = bevy::math::UVec2::with_x( - _self.into_inner(), - x, - ) - .into(); - output - } - }; - output - }, - " Creates a 2D vector from `self` with the given value of `x`.", - &["_self", "x"], - ) - .register_documented( - "with_y", - |_self: Val, y: u32| { - let output: Val = { - { - let output: Val = bevy::math::UVec2::with_y( - _self.into_inner(), - y, - ) - .into(); - output - } - }; - output - }, - " Creates a 2D vector from `self` with the given value of `y`.", - &["_self", "y"], - ) - .register_documented( - "wrapping_add", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::UVec2::wrapping_add( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector containing the wrapping addition of `self` and `rhs`.\n In other words this computes `[self.x.wrapping_add(rhs.x), self.y.wrapping_add(rhs.y), ..]`.", - &["_self", "rhs"], - ) - .register_documented( - "wrapping_add_signed", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::UVec2::wrapping_add_signed( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector containing the wrapping addition of `self` and signed vector `rhs`.\n In other words this computes `[self.x.wrapping_add_signed(rhs.x), self.y.wrapping_add_signed(rhs.y), ..]`.", - &["_self", "rhs"], - ) - .register_documented( - "wrapping_div", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::UVec2::wrapping_div( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector containing the wrapping division of `self` and `rhs`.\n In other words this computes `[self.x.wrapping_div(rhs.x), self.y.wrapping_div(rhs.y), ..]`.", - &["_self", "rhs"], - ) - .register_documented( - "wrapping_mul", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::UVec2::wrapping_mul( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector containing the wrapping multiplication of `self` and `rhs`.\n In other words this computes `[self.x.wrapping_mul(rhs.x), self.y.wrapping_mul(rhs.y), ..]`.", - &["_self", "rhs"], - ) - .register_documented( - "wrapping_sub", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::UVec2::wrapping_sub( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector containing the wrapping subtraction of `self` and `rhs`.\n In other words this computes `[self.x.wrapping_sub(rhs.x), self.y.wrapping_sub(rhs.y), ..]`.", - &["_self", "rhs"], - ); - let registry = world - .get_resource_or_init::(); - let mut registry = registry.write(); - registry - .register_type_data::< - bevy::math::UVec2, - bevy_mod_scripting_core::bindings::MarkAsGenerated, - >(); - } - pub(crate) fn register_u_vec_3_functions(world: &mut bevy::ecs::world::World) { - bevy_mod_scripting_core::bindings::function::namespace::NamespaceBuilder::< - bevy::math::UVec3, - >::new(world) - .register_documented( - "add", - |_self: Val, rhs: Ref| { - let output: Val = { - { - let output: Val = >::add(_self.into_inner(), &rhs) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "add", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = >::add(_self.into_inner(), rhs.into_inner()) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "add", - |_self: Val, rhs: u32| { - let output: Val = { - { - let output: Val = >::add(_self.into_inner(), rhs) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "as_dvec3", - |_self: Ref| { - let output: Val = { - { - let output: Val = bevy::math::UVec3::as_dvec3( - &_self, - ) - .into(); - output - } - }; - output - }, - " Casts all elements of `self` to `f64`.", - &["_self"], - ) - .register_documented( - "as_i16vec3", - |_self: Ref| { - let output: Val = { - { - let output: Val = bevy::math::UVec3::as_i16vec3( - &_self, - ) - .into(); - output - } - }; - output - }, - " Casts all elements of `self` to `i16`.", - &["_self"], - ) - .register_documented( - "as_i64vec3", - |_self: Ref| { - let output: Val = { - { - let output: Val = bevy::math::UVec3::as_i64vec3( - &_self, - ) - .into(); - output - } - }; - output - }, - " Casts all elements of `self` to `i64`.", - &["_self"], - ) - .register_documented( - "as_i8vec3", - |_self: Ref| { - let output: Val = { - { - let output: Val = bevy::math::UVec3::as_i8vec3( - &_self, - ) - .into(); - output - } - }; - output - }, - " Casts all elements of `self` to `i8`.", - &["_self"], - ) - .register_documented( - "as_ivec3", - |_self: Ref| { - let output: Val = { - { - let output: Val = bevy::math::UVec3::as_ivec3( - &_self, - ) - .into(); - output - } - }; - output - }, - " Casts all elements of `self` to `i32`.", - &["_self"], - ) - .register_documented( - "as_u16vec3", - |_self: Ref| { - let output: Val = { - { - let output: Val = bevy::math::UVec3::as_u16vec3( - &_self, - ) - .into(); - output - } - }; - output - }, - " Casts all elements of `self` to `u16`.", - &["_self"], - ) - .register_documented( - "as_u64vec3", - |_self: Ref| { - let output: Val = { - { - let output: Val = bevy::math::UVec3::as_u64vec3( - &_self, - ) - .into(); - output - } - }; - output - }, - " Casts all elements of `self` to `u64`.", - &["_self"], - ) - .register_documented( - "as_u8vec3", - |_self: Ref| { - let output: Val = { - { - let output: Val = bevy::math::UVec3::as_u8vec3( - &_self, - ) - .into(); - output - } - }; - output - }, - " Casts all elements of `self` to `u8`.", - &["_self"], - ) - .register_documented( - "as_vec3", - |_self: Ref| { - let output: Val = { - { - let output: Val = bevy::math::UVec3::as_vec3( - &_self, - ) - .into(); - output - } - }; - output - }, - " Casts all elements of `self` to `f32`.", - &["_self"], - ) - .register_documented( - "as_vec3a", - |_self: Ref| { - let output: Val = { - { - let output: Val = bevy::math::UVec3::as_vec3a( - &_self, - ) - .into(); - output - } - }; - output - }, - " Casts all elements of `self` to `f32`.", - &["_self"], - ) - .register_documented( - "assert_receiver_is_total_eq", - |_self: Ref| { - let output: () = { - { - let output: () = ::assert_receiver_is_total_eq( - &_self, - ) - .into(); - output - } - }; - output - }, - "", - &["_self"], - ) - .register_documented( - "clamp", - | - _self: Val, - min: Val, - max: Val| - { - let output: Val = { - { - let output: Val = bevy::math::UVec3::clamp( - _self.into_inner(), - min.into_inner(), - max.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Component-wise clamping of values, similar to [`u32::clamp`].\n Each element in `min` must be less-or-equal to the corresponding element in `max`.\n # Panics\n Will panic if `min` is greater than `max` when `glam_assert` is enabled.", - &["_self", "min", "max"], - ) - .register_documented( - "clone", - |_self: Ref| { - let output: Val = { - { - let output: Val = ::clone( - &_self, - ) - .into(); - output - } - }; - output - }, - "", - &["_self"], - ) - .register_documented( - "cmpeq", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::UVec3::cmpeq( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector mask containing the result of a `==` comparison for each element of\n `self` and `rhs`.\n In other words, this computes `[self.x == rhs.x, self.y == rhs.y, ..]` for all\n elements.", - &["_self", "rhs"], - ) - .register_documented( - "cmpge", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::UVec3::cmpge( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector mask containing the result of a `>=` comparison for each element of\n `self` and `rhs`.\n In other words this computes `[self.x >= rhs.x, self.y >= rhs.y, ..]` for all\n elements.", - &["_self", "rhs"], - ) - .register_documented( - "cmpgt", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::UVec3::cmpgt( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector mask containing the result of a `>` comparison for each element of\n `self` and `rhs`.\n In other words this computes `[self.x > rhs.x, self.y > rhs.y, ..]` for all\n elements.", - &["_self", "rhs"], - ) - .register_documented( - "cmple", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::UVec3::cmple( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector mask containing the result of a `<=` comparison for each element of\n `self` and `rhs`.\n In other words this computes `[self.x <= rhs.x, self.y <= rhs.y, ..]` for all\n elements.", - &["_self", "rhs"], - ) - .register_documented( - "cmplt", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::UVec3::cmplt( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector mask containing the result of a `<` comparison for each element of\n `self` and `rhs`.\n In other words this computes `[self.x < rhs.x, self.y < rhs.y, ..]` for all\n elements.", - &["_self", "rhs"], - ) - .register_documented( - "cmpne", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::UVec3::cmpne( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector mask containing the result of a `!=` comparison for each element of\n `self` and `rhs`.\n In other words this computes `[self.x != rhs.x, self.y != rhs.y, ..]` for all\n elements.", - &["_self", "rhs"], - ) - .register_documented( - "cross", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::UVec3::cross( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Computes the cross product of `self` and `rhs`.", - &["_self", "rhs"], - ) - .register_documented( - "div", - |_self: Val, rhs: Ref| { - let output: Val = { - { - let output: Val = >::div(_self.into_inner(), &rhs) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "div", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = >::div(_self.into_inner(), rhs.into_inner()) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "div", - |_self: Val, rhs: u32| { - let output: Val = { - { - let output: Val = >::div(_self.into_inner(), rhs) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "dot", - |_self: Val, rhs: Val| { - let output: u32 = { - { - let output: u32 = bevy::math::UVec3::dot( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Computes the dot product of `self` and `rhs`.", - &["_self", "rhs"], - ) - .register_documented( - "dot_into_vec", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::UVec3::dot_into_vec( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector where every component is the dot product of `self` and `rhs`.", - &["_self", "rhs"], - ) - .register_documented( - "element_product", - |_self: Val| { - let output: u32 = { - { - let output: u32 = bevy::math::UVec3::element_product( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns the product of all elements of `self`.\n In other words, this computes `self.x * self.y * ..`.", - &["_self"], - ) - .register_documented( - "element_sum", - |_self: Val| { - let output: u32 = { - { - let output: u32 = bevy::math::UVec3::element_sum( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns the sum of all elements of `self`.\n In other words, this computes `self.x + self.y + ..`.", - &["_self"], - ) - .register_documented( - "eq", - |_self: Ref, other: Ref| { - let output: bool = { - { - let output: bool = >::eq(&_self, &other) - .into(); - output - } - }; - output - }, - "", - &["_self", "other"], - ) - .register_documented( - "extend", - |_self: Val, w: u32| { - let output: Val = { - { - let output: Val = bevy::math::UVec3::extend( - _self.into_inner(), - w, - ) - .into(); - output - } - }; - output - }, - " Creates a 4D vector from `self` and the given `w` value.", - &["_self", "w"], - ) - .register_documented( - "from_array", - |a: [u32; 3]| { - let output: Val = { - { - let output: Val = bevy::math::UVec3::from_array( - a, - ) - .into(); - output - } - }; - output - }, - " Creates a new vector from an array.", - &["a"], - ) - .register_documented( - "length_squared", - |_self: Val| { - let output: u32 = { - { - let output: u32 = bevy::math::UVec3::length_squared( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Computes the squared length of `self`.", - &["_self"], - ) - .register_documented( - "max", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::UVec3::max( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector containing the maximum values for each element of `self` and `rhs`.\n In other words this computes `[self.x.max(rhs.x), self.y.max(rhs.y), ..]`.", - &["_self", "rhs"], - ) - .register_documented( - "max_element", - |_self: Val| { - let output: u32 = { - { - let output: u32 = bevy::math::UVec3::max_element( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns the horizontal maximum of `self`.\n In other words this computes `max(x, y, ..)`.", - &["_self"], - ) - .register_documented( - "min", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::UVec3::min( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector containing the minimum values for each element of `self` and `rhs`.\n In other words this computes `[self.x.min(rhs.x), self.y.min(rhs.y), ..]`.", - &["_self", "rhs"], - ) - .register_documented( - "min_element", - |_self: Val| { - let output: u32 = { - { - let output: u32 = bevy::math::UVec3::min_element( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns the horizontal minimum of `self`.\n In other words this computes `min(x, y, ..)`.", - &["_self"], - ) - .register_documented( - "mul", - |_self: Val, rhs: Ref| { - let output: Val = { - { - let output: Val = >::mul(_self.into_inner(), &rhs) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "mul", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = >::mul(_self.into_inner(), rhs.into_inner()) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "mul", - |_self: Val, rhs: u32| { - let output: Val = { - { - let output: Val = >::mul(_self.into_inner(), rhs) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "new", - |x: u32, y: u32, z: u32| { - let output: Val = { - { - let output: Val = bevy::math::UVec3::new( - x, - y, - z, - ) - .into(); - output - } - }; - output - }, - " Creates a new vector.", - &["x", "y", "z"], - ) - .register_documented( - "rem", - |_self: Val, rhs: Ref| { - let output: Val = { - { - let output: Val = >::rem(_self.into_inner(), &rhs) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "rem", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = >::rem(_self.into_inner(), rhs.into_inner()) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "rem", - |_self: Val, rhs: u32| { - let output: Val = { - { - let output: Val = >::rem(_self.into_inner(), rhs) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "saturating_add", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::UVec3::saturating_add( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector containing the saturating addition of `self` and `rhs`.\n In other words this computes `[self.x.saturating_add(rhs.x), self.y.saturating_add(rhs.y), ..]`.", - &["_self", "rhs"], - ) - .register_documented( - "saturating_add_signed", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::UVec3::saturating_add_signed( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector containing the saturating addition of `self` and signed vector `rhs`.\n In other words this computes `[self.x.saturating_add_signed(rhs.x), self.y.saturating_add_signed(rhs.y), ..]`.", - &["_self", "rhs"], - ) - .register_documented( - "saturating_div", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::UVec3::saturating_div( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector containing the saturating division of `self` and `rhs`.\n In other words this computes `[self.x.saturating_div(rhs.x), self.y.saturating_div(rhs.y), ..]`.", - &["_self", "rhs"], - ) - .register_documented( - "saturating_mul", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::UVec3::saturating_mul( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector containing the saturating multiplication of `self` and `rhs`.\n In other words this computes `[self.x.saturating_mul(rhs.x), self.y.saturating_mul(rhs.y), ..]`.", - &["_self", "rhs"], - ) - .register_documented( - "saturating_sub", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::UVec3::saturating_sub( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector containing the saturating subtraction of `self` and `rhs`.\n In other words this computes `[self.x.saturating_sub(rhs.x), self.y.saturating_sub(rhs.y), ..]`.", - &["_self", "rhs"], - ) - .register_documented( - "select", - | - mask: Val, - if_true: Val, - if_false: Val| - { - let output: Val = { - { - let output: Val = bevy::math::UVec3::select( - mask.into_inner(), - if_true.into_inner(), - if_false.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Creates a vector from the elements in `if_true` and `if_false`, selecting which to use\n for each element of `self`.\n A true element in the mask uses the corresponding element from `if_true`, and false\n uses the element from `if_false`.", - &["mask", "if_true", "if_false"], - ) - .register_documented( - "splat", - |v: u32| { - let output: Val = { - { - let output: Val = bevy::math::UVec3::splat( - v, - ) - .into(); - output - } - }; - output - }, - " Creates a vector with all elements set to `v`.", - &["v"], - ) - .register_documented( - "sub", - |_self: Val, rhs: Ref| { - let output: Val = { - { - let output: Val = >::sub(_self.into_inner(), &rhs) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "sub", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = >::sub(_self.into_inner(), rhs.into_inner()) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "sub", - |_self: Val, rhs: u32| { - let output: Val = { - { - let output: Val = >::sub(_self.into_inner(), rhs) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "to_array", - |_self: Ref| { - let output: [u32; 3] = { - { - let output: [u32; 3] = bevy::math::UVec3::to_array(&_self) - .into(); - output - } - }; - output - }, - " `[x, y, z]`", - &["_self"], - ) - .register_documented( - "truncate", - |_self: Val| { - let output: Val = { - { - let output: Val = bevy::math::UVec3::truncate( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Creates a 2D vector from the `x` and `y` elements of `self`, discarding `z`.\n Truncation may also be performed by using [`self.xy()`][crate::swizzles::Vec3Swizzles::xy()].", - &["_self"], - ) - .register_documented( - "with_x", - |_self: Val, x: u32| { - let output: Val = { - { - let output: Val = bevy::math::UVec3::with_x( - _self.into_inner(), - x, - ) - .into(); - output - } - }; - output - }, - " Creates a 3D vector from `self` with the given value of `x`.", - &["_self", "x"], - ) - .register_documented( - "with_y", - |_self: Val, y: u32| { - let output: Val = { - { - let output: Val = bevy::math::UVec3::with_y( - _self.into_inner(), - y, - ) - .into(); - output - } - }; - output - }, - " Creates a 3D vector from `self` with the given value of `y`.", - &["_self", "y"], - ) - .register_documented( - "with_z", - |_self: Val, z: u32| { - let output: Val = { - { - let output: Val = bevy::math::UVec3::with_z( - _self.into_inner(), - z, - ) - .into(); - output - } - }; - output - }, - " Creates a 3D vector from `self` with the given value of `z`.", - &["_self", "z"], - ) - .register_documented( - "wrapping_add", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::UVec3::wrapping_add( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector containing the wrapping addition of `self` and `rhs`.\n In other words this computes `[self.x.wrapping_add(rhs.x), self.y.wrapping_add(rhs.y), ..]`.", - &["_self", "rhs"], - ) - .register_documented( - "wrapping_add_signed", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::UVec3::wrapping_add_signed( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector containing the wrapping addition of `self` and signed vector `rhs`.\n In other words this computes `[self.x.wrapping_add_signed(rhs.x), self.y.wrapping_add_signed(rhs.y), ..]`.", - &["_self", "rhs"], - ) - .register_documented( - "wrapping_div", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::UVec3::wrapping_div( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector containing the wrapping division of `self` and `rhs`.\n In other words this computes `[self.x.wrapping_div(rhs.x), self.y.wrapping_div(rhs.y), ..]`.", - &["_self", "rhs"], - ) - .register_documented( - "wrapping_mul", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::UVec3::wrapping_mul( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector containing the wrapping multiplication of `self` and `rhs`.\n In other words this computes `[self.x.wrapping_mul(rhs.x), self.y.wrapping_mul(rhs.y), ..]`.", - &["_self", "rhs"], - ) - .register_documented( - "wrapping_sub", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::UVec3::wrapping_sub( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector containing the wrapping subtraction of `self` and `rhs`.\n In other words this computes `[self.x.wrapping_sub(rhs.x), self.y.wrapping_sub(rhs.y), ..]`.", - &["_self", "rhs"], - ); - let registry = world - .get_resource_or_init::(); - let mut registry = registry.write(); - registry - .register_type_data::< - bevy::math::UVec3, - bevy_mod_scripting_core::bindings::MarkAsGenerated, - >(); - } - pub(crate) fn register_u_vec_4_functions(world: &mut bevy::ecs::world::World) { - bevy_mod_scripting_core::bindings::function::namespace::NamespaceBuilder::< - bevy::math::UVec4, - >::new(world) - .register_documented( - "add", - |_self: Val, rhs: Ref| { - let output: Val = { - { - let output: Val = >::add(_self.into_inner(), &rhs) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "add", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = >::add(_self.into_inner(), rhs.into_inner()) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "add", - |_self: Val, rhs: u32| { - let output: Val = { - { - let output: Val = >::add(_self.into_inner(), rhs) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "as_dvec4", - |_self: Ref| { - let output: Val = { - { - let output: Val = bevy::math::UVec4::as_dvec4( - &_self, - ) - .into(); - output - } - }; - output - }, - " Casts all elements of `self` to `f64`.", - &["_self"], - ) - .register_documented( - "as_i16vec4", - |_self: Ref| { - let output: Val = { - { - let output: Val = bevy::math::UVec4::as_i16vec4( - &_self, - ) - .into(); - output - } - }; - output - }, - " Casts all elements of `self` to `i16`.", - &["_self"], - ) - .register_documented( - "as_i64vec4", - |_self: Ref| { - let output: Val = { - { - let output: Val = bevy::math::UVec4::as_i64vec4( - &_self, - ) - .into(); - output - } - }; - output - }, - " Casts all elements of `self` to `i64`.", - &["_self"], - ) - .register_documented( - "as_i8vec4", - |_self: Ref| { - let output: Val = { - { - let output: Val = bevy::math::UVec4::as_i8vec4( - &_self, - ) - .into(); - output - } - }; - output - }, - " Casts all elements of `self` to `i8`.", - &["_self"], - ) - .register_documented( - "as_ivec4", - |_self: Ref| { - let output: Val = { - { - let output: Val = bevy::math::UVec4::as_ivec4( - &_self, - ) - .into(); - output - } - }; - output - }, - " Casts all elements of `self` to `i32`.", - &["_self"], - ) - .register_documented( - "as_u16vec4", - |_self: Ref| { - let output: Val = { - { - let output: Val = bevy::math::UVec4::as_u16vec4( - &_self, - ) - .into(); - output - } - }; - output - }, - " Casts all elements of `self` to `u16`.", - &["_self"], - ) - .register_documented( - "as_u64vec4", - |_self: Ref| { - let output: Val = { - { - let output: Val = bevy::math::UVec4::as_u64vec4( - &_self, - ) - .into(); - output - } - }; - output - }, - " Casts all elements of `self` to `u64`.", - &["_self"], - ) - .register_documented( - "as_u8vec4", - |_self: Ref| { - let output: Val = { - { - let output: Val = bevy::math::UVec4::as_u8vec4( - &_self, - ) - .into(); - output - } - }; - output - }, - " Casts all elements of `self` to `u8`.", - &["_self"], - ) - .register_documented( - "as_vec4", - |_self: Ref| { - let output: Val = { - { - let output: Val = bevy::math::UVec4::as_vec4( - &_self, - ) - .into(); - output - } - }; - output - }, - " Casts all elements of `self` to `f32`.", - &["_self"], - ) - .register_documented( - "assert_receiver_is_total_eq", - |_self: Ref| { - let output: () = { - { - let output: () = ::assert_receiver_is_total_eq( - &_self, - ) - .into(); - output - } - }; - output - }, - "", - &["_self"], - ) - .register_documented( - "clamp", - | - _self: Val, - min: Val, - max: Val| - { - let output: Val = { - { - let output: Val = bevy::math::UVec4::clamp( - _self.into_inner(), - min.into_inner(), - max.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Component-wise clamping of values, similar to [`u32::clamp`].\n Each element in `min` must be less-or-equal to the corresponding element in `max`.\n # Panics\n Will panic if `min` is greater than `max` when `glam_assert` is enabled.", - &["_self", "min", "max"], - ) - .register_documented( - "clone", - |_self: Ref| { - let output: Val = { - { - let output: Val = ::clone( - &_self, - ) - .into(); - output - } - }; - output - }, - "", - &["_self"], - ) - .register_documented( - "cmpeq", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::UVec4::cmpeq( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector mask containing the result of a `==` comparison for each element of\n `self` and `rhs`.\n In other words, this computes `[self.x == rhs.x, self.y == rhs.y, ..]` for all\n elements.", - &["_self", "rhs"], - ) - .register_documented( - "cmpge", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::UVec4::cmpge( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector mask containing the result of a `>=` comparison for each element of\n `self` and `rhs`.\n In other words this computes `[self.x >= rhs.x, self.y >= rhs.y, ..]` for all\n elements.", - &["_self", "rhs"], - ) - .register_documented( - "cmpgt", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::UVec4::cmpgt( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector mask containing the result of a `>` comparison for each element of\n `self` and `rhs`.\n In other words this computes `[self.x > rhs.x, self.y > rhs.y, ..]` for all\n elements.", - &["_self", "rhs"], - ) - .register_documented( - "cmple", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::UVec4::cmple( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector mask containing the result of a `<=` comparison for each element of\n `self` and `rhs`.\n In other words this computes `[self.x <= rhs.x, self.y <= rhs.y, ..]` for all\n elements.", - &["_self", "rhs"], - ) - .register_documented( - "cmplt", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::UVec4::cmplt( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector mask containing the result of a `<` comparison for each element of\n `self` and `rhs`.\n In other words this computes `[self.x < rhs.x, self.y < rhs.y, ..]` for all\n elements.", - &["_self", "rhs"], - ) - .register_documented( - "cmpne", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::UVec4::cmpne( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector mask containing the result of a `!=` comparison for each element of\n `self` and `rhs`.\n In other words this computes `[self.x != rhs.x, self.y != rhs.y, ..]` for all\n elements.", - &["_self", "rhs"], - ) - .register_documented( - "div", - |_self: Val, rhs: Ref| { - let output: Val = { - { - let output: Val = >::div(_self.into_inner(), &rhs) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "div", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = >::div(_self.into_inner(), rhs.into_inner()) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "div", - |_self: Val, rhs: u32| { - let output: Val = { - { - let output: Val = >::div(_self.into_inner(), rhs) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "dot", - |_self: Val, rhs: Val| { - let output: u32 = { - { - let output: u32 = bevy::math::UVec4::dot( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Computes the dot product of `self` and `rhs`.", - &["_self", "rhs"], - ) - .register_documented( - "dot_into_vec", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::UVec4::dot_into_vec( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector where every component is the dot product of `self` and `rhs`.", - &["_self", "rhs"], - ) - .register_documented( - "element_product", - |_self: Val| { - let output: u32 = { - { - let output: u32 = bevy::math::UVec4::element_product( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns the product of all elements of `self`.\n In other words, this computes `self.x * self.y * ..`.", - &["_self"], - ) - .register_documented( - "element_sum", - |_self: Val| { - let output: u32 = { - { - let output: u32 = bevy::math::UVec4::element_sum( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns the sum of all elements of `self`.\n In other words, this computes `self.x + self.y + ..`.", - &["_self"], - ) - .register_documented( - "eq", - |_self: Ref, other: Ref| { - let output: bool = { - { - let output: bool = >::eq(&_self, &other) - .into(); - output - } - }; - output - }, - "", - &["_self", "other"], - ) - .register_documented( - "from_array", - |a: [u32; 4]| { - let output: Val = { - { - let output: Val = bevy::math::UVec4::from_array( - a, - ) - .into(); - output - } - }; - output - }, - " Creates a new vector from an array.", - &["a"], - ) - .register_documented( - "length_squared", - |_self: Val| { - let output: u32 = { - { - let output: u32 = bevy::math::UVec4::length_squared( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Computes the squared length of `self`.", - &["_self"], - ) - .register_documented( - "max", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::UVec4::max( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector containing the maximum values for each element of `self` and `rhs`.\n In other words this computes `[self.x.max(rhs.x), self.y.max(rhs.y), ..]`.", - &["_self", "rhs"], - ) - .register_documented( - "max_element", - |_self: Val| { - let output: u32 = { - { - let output: u32 = bevy::math::UVec4::max_element( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns the horizontal maximum of `self`.\n In other words this computes `max(x, y, ..)`.", - &["_self"], - ) - .register_documented( - "min", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::UVec4::min( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector containing the minimum values for each element of `self` and `rhs`.\n In other words this computes `[self.x.min(rhs.x), self.y.min(rhs.y), ..]`.", - &["_self", "rhs"], - ) - .register_documented( - "min_element", - |_self: Val| { - let output: u32 = { - { - let output: u32 = bevy::math::UVec4::min_element( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns the horizontal minimum of `self`.\n In other words this computes `min(x, y, ..)`.", - &["_self"], - ) - .register_documented( - "mul", - |_self: Val, rhs: Ref| { - let output: Val = { - { - let output: Val = >::mul(_self.into_inner(), &rhs) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "mul", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = >::mul(_self.into_inner(), rhs.into_inner()) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "mul", - |_self: Val, rhs: u32| { - let output: Val = { - { - let output: Val = >::mul(_self.into_inner(), rhs) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "new", - |x: u32, y: u32, z: u32, w: u32| { - let output: Val = { - { - let output: Val = bevy::math::UVec4::new( - x, - y, - z, - w, - ) - .into(); - output - } - }; - output - }, - " Creates a new vector.", - &["x", "y", "z", "w"], - ) - .register_documented( - "rem", - |_self: Val, rhs: Ref| { - let output: Val = { - { - let output: Val = >::rem(_self.into_inner(), &rhs) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "rem", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = >::rem(_self.into_inner(), rhs.into_inner()) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "rem", - |_self: Val, rhs: u32| { - let output: Val = { - { - let output: Val = >::rem(_self.into_inner(), rhs) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "saturating_add", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::UVec4::saturating_add( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector containing the saturating addition of `self` and `rhs`.\n In other words this computes `[self.x.saturating_add(rhs.x), self.y.saturating_add(rhs.y), ..]`.", - &["_self", "rhs"], - ) - .register_documented( - "saturating_add_signed", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::UVec4::saturating_add_signed( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector containing the saturating addition of `self` and signed vector `rhs`.\n In other words this computes `[self.x.saturating_add_signed(rhs.x), self.y.saturating_add_signed(rhs.y), ..]`.", - &["_self", "rhs"], - ) - .register_documented( - "saturating_div", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::UVec4::saturating_div( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector containing the saturating division of `self` and `rhs`.\n In other words this computes `[self.x.saturating_div(rhs.x), self.y.saturating_div(rhs.y), ..]`.", - &["_self", "rhs"], - ) - .register_documented( - "saturating_mul", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::UVec4::saturating_mul( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector containing the saturating multiplication of `self` and `rhs`.\n In other words this computes `[self.x.saturating_mul(rhs.x), self.y.saturating_mul(rhs.y), ..]`.", - &["_self", "rhs"], - ) - .register_documented( - "saturating_sub", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::UVec4::saturating_sub( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector containing the saturating subtraction of `self` and `rhs`.\n In other words this computes `[self.x.saturating_sub(rhs.x), self.y.saturating_sub(rhs.y), ..]`.", - &["_self", "rhs"], - ) - .register_documented( - "select", - | - mask: Val, - if_true: Val, - if_false: Val| - { - let output: Val = { - { - let output: Val = bevy::math::UVec4::select( - mask.into_inner(), - if_true.into_inner(), - if_false.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Creates a vector from the elements in `if_true` and `if_false`, selecting which to use\n for each element of `self`.\n A true element in the mask uses the corresponding element from `if_true`, and false\n uses the element from `if_false`.", - &["mask", "if_true", "if_false"], - ) - .register_documented( - "splat", - |v: u32| { - let output: Val = { - { - let output: Val = bevy::math::UVec4::splat( - v, - ) - .into(); - output - } - }; - output - }, - " Creates a vector with all elements set to `v`.", - &["v"], - ) - .register_documented( - "sub", - |_self: Val, rhs: Ref| { - let output: Val = { - { - let output: Val = >::sub(_self.into_inner(), &rhs) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "sub", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = >::sub(_self.into_inner(), rhs.into_inner()) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "sub", - |_self: Val, rhs: u32| { - let output: Val = { - { - let output: Val = >::sub(_self.into_inner(), rhs) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "to_array", - |_self: Ref| { - let output: [u32; 4] = { - { - let output: [u32; 4] = bevy::math::UVec4::to_array(&_self) - .into(); - output - } - }; - output - }, - " `[x, y, z, w]`", - &["_self"], - ) - .register_documented( - "truncate", - |_self: Val| { - let output: Val = { - { - let output: Val = bevy::math::UVec4::truncate( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Creates a 3D vector from the `x`, `y` and `z` elements of `self`, discarding `w`.\n Truncation to [`UVec3`] may also be performed by using [`self.xyz()`][crate::swizzles::Vec4Swizzles::xyz()].", - &["_self"], - ) - .register_documented( - "with_w", - |_self: Val, w: u32| { - let output: Val = { - { - let output: Val = bevy::math::UVec4::with_w( - _self.into_inner(), - w, - ) - .into(); - output - } - }; - output - }, - " Creates a 4D vector from `self` with the given value of `w`.", - &["_self", "w"], - ) - .register_documented( - "with_x", - |_self: Val, x: u32| { - let output: Val = { - { - let output: Val = bevy::math::UVec4::with_x( - _self.into_inner(), - x, - ) - .into(); - output - } - }; - output - }, - " Creates a 4D vector from `self` with the given value of `x`.", - &["_self", "x"], - ) - .register_documented( - "with_y", - |_self: Val, y: u32| { - let output: Val = { - { - let output: Val = bevy::math::UVec4::with_y( - _self.into_inner(), - y, - ) - .into(); - output - } - }; - output - }, - " Creates a 4D vector from `self` with the given value of `y`.", - &["_self", "y"], - ) - .register_documented( - "with_z", - |_self: Val, z: u32| { - let output: Val = { - { - let output: Val = bevy::math::UVec4::with_z( - _self.into_inner(), - z, - ) - .into(); - output - } - }; - output - }, - " Creates a 4D vector from `self` with the given value of `z`.", - &["_self", "z"], - ) - .register_documented( - "wrapping_add", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::UVec4::wrapping_add( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector containing the wrapping addition of `self` and `rhs`.\n In other words this computes `[self.x.wrapping_add(rhs.x), self.y.wrapping_add(rhs.y), ..]`.", - &["_self", "rhs"], - ) - .register_documented( - "wrapping_add_signed", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::UVec4::wrapping_add_signed( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector containing the wrapping addition of `self` and signed vector `rhs`.\n In other words this computes `[self.x.wrapping_add_signed(rhs.x), self.y.wrapping_add_signed(rhs.y), ..]`.", - &["_self", "rhs"], - ) - .register_documented( - "wrapping_div", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::UVec4::wrapping_div( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector containing the wrapping division of `self` and `rhs`.\n In other words this computes `[self.x.wrapping_div(rhs.x), self.y.wrapping_div(rhs.y), ..]`.", - &["_self", "rhs"], - ) - .register_documented( - "wrapping_mul", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::UVec4::wrapping_mul( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector containing the wrapping multiplication of `self` and `rhs`.\n In other words this computes `[self.x.wrapping_mul(rhs.x), self.y.wrapping_mul(rhs.y), ..]`.", - &["_self", "rhs"], - ) - .register_documented( - "wrapping_sub", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::UVec4::wrapping_sub( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector containing the wrapping subtraction of `self` and `rhs`.\n In other words this computes `[self.x.wrapping_sub(rhs.x), self.y.wrapping_sub(rhs.y), ..]`.", - &["_self", "rhs"], - ); - let registry = world - .get_resource_or_init::(); - let mut registry = registry.write(); - registry - .register_type_data::< - bevy::math::UVec4, - bevy_mod_scripting_core::bindings::MarkAsGenerated, - >(); - } - pub(crate) fn register_u_8_vec_2_functions(world: &mut bevy::ecs::world::World) { - bevy_mod_scripting_core::bindings::function::namespace::NamespaceBuilder::< - bevy::math::U8Vec2, - >::new(world) - .register_documented( - "add", - |_self: Val, rhs: Ref| { - let output: Val = { - { - let output: Val = >::add(_self.into_inner(), &rhs) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "add", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = >::add(_self.into_inner(), rhs.into_inner()) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "add", - |_self: Val, rhs: u8| { - let output: Val = { - { - let output: Val = >::add(_self.into_inner(), rhs) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "as_dvec2", - |_self: Ref| { - let output: Val = { - { - let output: Val = bevy::math::U8Vec2::as_dvec2( - &_self, - ) - .into(); - output - } - }; - output - }, - " Casts all elements of `self` to `f64`.", - &["_self"], - ) - .register_documented( - "as_i16vec2", - |_self: Ref| { - let output: Val = { - { - let output: Val = bevy::math::U8Vec2::as_i16vec2( - &_self, - ) - .into(); - output - } - }; - output - }, - " Casts all elements of `self` to `i16`.", - &["_self"], - ) - .register_documented( - "as_i64vec2", - |_self: Ref| { - let output: Val = { - { - let output: Val = bevy::math::U8Vec2::as_i64vec2( - &_self, - ) - .into(); - output - } - }; - output - }, - " Casts all elements of `self` to `i64`.", - &["_self"], - ) - .register_documented( - "as_i8vec2", - |_self: Ref| { - let output: Val = { - { - let output: Val = bevy::math::U8Vec2::as_i8vec2( - &_self, - ) - .into(); - output - } - }; - output - }, - " Casts all elements of `self` to `i8`.", - &["_self"], - ) - .register_documented( - "as_ivec2", - |_self: Ref| { - let output: Val = { - { - let output: Val = bevy::math::U8Vec2::as_ivec2( - &_self, - ) - .into(); - output - } - }; - output - }, - " Casts all elements of `self` to `i32`.", - &["_self"], - ) - .register_documented( - "as_u16vec2", - |_self: Ref| { - let output: Val = { - { - let output: Val = bevy::math::U8Vec2::as_u16vec2( - &_self, - ) - .into(); - output - } - }; - output - }, - " Casts all elements of `self` to `u16`.", - &["_self"], - ) - .register_documented( - "as_u64vec2", - |_self: Ref| { - let output: Val = { - { - let output: Val = bevy::math::U8Vec2::as_u64vec2( - &_self, - ) - .into(); - output - } - }; - output - }, - " Casts all elements of `self` to `u64`.", - &["_self"], - ) - .register_documented( - "as_uvec2", - |_self: Ref| { - let output: Val = { - { - let output: Val = bevy::math::U8Vec2::as_uvec2( - &_self, - ) - .into(); - output - } - }; - output - }, - " Casts all elements of `self` to `u32`.", - &["_self"], - ) - .register_documented( - "as_vec2", - |_self: Ref| { - let output: Val = { - { - let output: Val = bevy::math::U8Vec2::as_vec2( - &_self, - ) - .into(); - output - } - }; - output - }, - " Casts all elements of `self` to `f32`.", - &["_self"], - ) - .register_documented( - "assert_receiver_is_total_eq", - |_self: Ref| { - let output: () = { - { - let output: () = ::assert_receiver_is_total_eq( - &_self, - ) - .into(); - output - } - }; - output - }, - "", - &["_self"], - ) - .register_documented( - "clamp", - | - _self: Val, - min: Val, - max: Val| - { - let output: Val = { - { - let output: Val = bevy::math::U8Vec2::clamp( - _self.into_inner(), - min.into_inner(), - max.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Component-wise clamping of values, similar to [`u8::clamp`].\n Each element in `min` must be less-or-equal to the corresponding element in `max`.\n # Panics\n Will panic if `min` is greater than `max` when `glam_assert` is enabled.", - &["_self", "min", "max"], - ) - .register_documented( - "clone", - |_self: Ref| { - let output: Val = { - { - let output: Val = ::clone( - &_self, - ) - .into(); - output - } - }; - output - }, - "", - &["_self"], - ) - .register_documented( - "cmpeq", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::U8Vec2::cmpeq( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector mask containing the result of a `==` comparison for each element of\n `self` and `rhs`.\n In other words, this computes `[self.x == rhs.x, self.y == rhs.y, ..]` for all\n elements.", - &["_self", "rhs"], - ) - .register_documented( - "cmpge", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::U8Vec2::cmpge( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector mask containing the result of a `>=` comparison for each element of\n `self` and `rhs`.\n In other words this computes `[self.x >= rhs.x, self.y >= rhs.y, ..]` for all\n elements.", - &["_self", "rhs"], - ) - .register_documented( - "cmpgt", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::U8Vec2::cmpgt( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector mask containing the result of a `>` comparison for each element of\n `self` and `rhs`.\n In other words this computes `[self.x > rhs.x, self.y > rhs.y, ..]` for all\n elements.", - &["_self", "rhs"], - ) - .register_documented( - "cmple", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::U8Vec2::cmple( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector mask containing the result of a `<=` comparison for each element of\n `self` and `rhs`.\n In other words this computes `[self.x <= rhs.x, self.y <= rhs.y, ..]` for all\n elements.", - &["_self", "rhs"], - ) - .register_documented( - "cmplt", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::U8Vec2::cmplt( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector mask containing the result of a `<` comparison for each element of\n `self` and `rhs`.\n In other words this computes `[self.x < rhs.x, self.y < rhs.y, ..]` for all\n elements.", - &["_self", "rhs"], - ) - .register_documented( - "cmpne", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::U8Vec2::cmpne( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector mask containing the result of a `!=` comparison for each element of\n `self` and `rhs`.\n In other words this computes `[self.x != rhs.x, self.y != rhs.y, ..]` for all\n elements.", - &["_self", "rhs"], - ) - .register_documented( - "div", - |_self: Val, rhs: Ref| { - let output: Val = { - { - let output: Val = >::div(_self.into_inner(), &rhs) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "div", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = >::div(_self.into_inner(), rhs.into_inner()) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "div", - |_self: Val, rhs: u8| { - let output: Val = { - { - let output: Val = >::div(_self.into_inner(), rhs) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "dot", - |_self: Val, rhs: Val| { - let output: u8 = { - { - let output: u8 = bevy::math::U8Vec2::dot( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Computes the dot product of `self` and `rhs`.", - &["_self", "rhs"], - ) - .register_documented( - "dot_into_vec", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::U8Vec2::dot_into_vec( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector where every component is the dot product of `self` and `rhs`.", - &["_self", "rhs"], - ) - .register_documented( - "element_product", - |_self: Val| { - let output: u8 = { - { - let output: u8 = bevy::math::U8Vec2::element_product( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns the product of all elements of `self`.\n In other words, this computes `self.x * self.y * ..`.", - &["_self"], - ) - .register_documented( - "element_sum", - |_self: Val| { - let output: u8 = { - { - let output: u8 = bevy::math::U8Vec2::element_sum( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns the sum of all elements of `self`.\n In other words, this computes `self.x + self.y + ..`.", - &["_self"], - ) - .register_documented( - "eq", - |_self: Ref, other: Ref| { - let output: bool = { - { - let output: bool = >::eq(&_self, &other) - .into(); - output - } - }; - output - }, - "", - &["_self", "other"], - ) - .register_documented( - "extend", - |_self: Val, z: u8| { - let output: Val = { - { - let output: Val = bevy::math::U8Vec2::extend( - _self.into_inner(), - z, - ) - .into(); - output - } - }; - output - }, - " Creates a 3D vector from `self` and the given `z` value.", - &["_self", "z"], - ) - .register_documented( - "from_array", - |a: [u8; 2]| { - let output: Val = { - { - let output: Val = bevy::math::U8Vec2::from_array( - a, - ) - .into(); - output - } - }; - output - }, - " Creates a new vector from an array.", - &["a"], - ) - .register_documented( - "length_squared", - |_self: Val| { - let output: u8 = { - { - let output: u8 = bevy::math::U8Vec2::length_squared( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Computes the squared length of `self`.", - &["_self"], - ) - .register_documented( - "max", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::U8Vec2::max( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector containing the maximum values for each element of `self` and `rhs`.\n In other words this computes `[self.x.max(rhs.x), self.y.max(rhs.y), ..]`.", - &["_self", "rhs"], - ) - .register_documented( - "max_element", - |_self: Val| { - let output: u8 = { - { - let output: u8 = bevy::math::U8Vec2::max_element( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns the horizontal maximum of `self`.\n In other words this computes `max(x, y, ..)`.", - &["_self"], - ) - .register_documented( - "min", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::U8Vec2::min( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector containing the minimum values for each element of `self` and `rhs`.\n In other words this computes `[self.x.min(rhs.x), self.y.min(rhs.y), ..]`.", - &["_self", "rhs"], - ) - .register_documented( - "min_element", - |_self: Val| { - let output: u8 = { - { - let output: u8 = bevy::math::U8Vec2::min_element( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns the horizontal minimum of `self`.\n In other words this computes `min(x, y, ..)`.", - &["_self"], - ) - .register_documented( - "mul", - |_self: Val, rhs: Ref| { - let output: Val = { - { - let output: Val = >::mul(_self.into_inner(), &rhs) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "mul", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = >::mul(_self.into_inner(), rhs.into_inner()) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "mul", - |_self: Val, rhs: u8| { - let output: Val = { - { - let output: Val = >::mul(_self.into_inner(), rhs) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "new", - |x: u8, y: u8| { - let output: Val = { - { - let output: Val = bevy::math::U8Vec2::new( - x, - y, - ) - .into(); - output - } - }; - output - }, - " Creates a new vector.", - &["x", "y"], - ) - .register_documented( - "rem", - |_self: Val, rhs: Ref| { - let output: Val = { - { - let output: Val = >::rem(_self.into_inner(), &rhs) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "rem", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = >::rem(_self.into_inner(), rhs.into_inner()) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "rem", - |_self: Val, rhs: u8| { - let output: Val = { - { - let output: Val = >::rem(_self.into_inner(), rhs) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "saturating_add", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::U8Vec2::saturating_add( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector containing the saturating addition of `self` and `rhs`.\n In other words this computes `[self.x.saturating_add(rhs.x), self.y.saturating_add(rhs.y), ..]`.", - &["_self", "rhs"], - ) - .register_documented( - "saturating_add_signed", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::U8Vec2::saturating_add_signed( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector containing the saturating addition of `self` and signed vector `rhs`.\n In other words this computes `[self.x.saturating_add_signed(rhs.x), self.y.saturating_add_signed(rhs.y), ..]`.", - &["_self", "rhs"], - ) - .register_documented( - "saturating_div", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::U8Vec2::saturating_div( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector containing the saturating division of `self` and `rhs`.\n In other words this computes `[self.x.saturating_div(rhs.x), self.y.saturating_div(rhs.y), ..]`.", - &["_self", "rhs"], - ) - .register_documented( - "saturating_mul", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::U8Vec2::saturating_mul( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector containing the saturating multiplication of `self` and `rhs`.\n In other words this computes `[self.x.saturating_mul(rhs.x), self.y.saturating_mul(rhs.y), ..]`.", - &["_self", "rhs"], - ) - .register_documented( - "saturating_sub", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::U8Vec2::saturating_sub( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector containing the saturating subtraction of `self` and `rhs`.\n In other words this computes `[self.x.saturating_sub(rhs.x), self.y.saturating_sub(rhs.y), ..]`.", - &["_self", "rhs"], - ) - .register_documented( - "select", - | - mask: Val, - if_true: Val, - if_false: Val| - { - let output: Val = { - { - let output: Val = bevy::math::U8Vec2::select( - mask.into_inner(), - if_true.into_inner(), - if_false.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Creates a vector from the elements in `if_true` and `if_false`, selecting which to use\n for each element of `self`.\n A true element in the mask uses the corresponding element from `if_true`, and false\n uses the element from `if_false`.", - &["mask", "if_true", "if_false"], - ) - .register_documented( - "splat", - |v: u8| { - let output: Val = { - { - let output: Val = bevy::math::U8Vec2::splat( - v, - ) - .into(); - output - } - }; - output - }, - " Creates a vector with all elements set to `v`.", - &["v"], - ) - .register_documented( - "sub", - |_self: Val, rhs: Ref| { - let output: Val = { - { - let output: Val = >::sub(_self.into_inner(), &rhs) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "sub", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = >::sub(_self.into_inner(), rhs.into_inner()) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "sub", - |_self: Val, rhs: u8| { - let output: Val = { - { - let output: Val = >::sub(_self.into_inner(), rhs) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "to_array", - |_self: Ref| { - let output: [u8; 2] = { - { - let output: [u8; 2] = bevy::math::U8Vec2::to_array(&_self) - .into(); - output - } - }; - output - }, - " `[x, y]`", - &["_self"], - ) - .register_documented( - "with_x", - |_self: Val, x: u8| { - let output: Val = { - { - let output: Val = bevy::math::U8Vec2::with_x( - _self.into_inner(), - x, - ) - .into(); - output - } - }; - output - }, - " Creates a 2D vector from `self` with the given value of `x`.", - &["_self", "x"], - ) - .register_documented( - "with_y", - |_self: Val, y: u8| { - let output: Val = { - { - let output: Val = bevy::math::U8Vec2::with_y( - _self.into_inner(), - y, - ) - .into(); - output - } - }; - output - }, - " Creates a 2D vector from `self` with the given value of `y`.", - &["_self", "y"], - ) - .register_documented( - "wrapping_add", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::U8Vec2::wrapping_add( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector containing the wrapping addition of `self` and `rhs`.\n In other words this computes `[self.x.wrapping_add(rhs.x), self.y.wrapping_add(rhs.y), ..]`.", - &["_self", "rhs"], - ) - .register_documented( - "wrapping_add_signed", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::U8Vec2::wrapping_add_signed( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector containing the wrapping addition of `self` and signed vector `rhs`.\n In other words this computes `[self.x.wrapping_add_signed(rhs.x), self.y.wrapping_add_signed(rhs.y), ..]`.", - &["_self", "rhs"], - ) - .register_documented( - "wrapping_div", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::U8Vec2::wrapping_div( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector containing the wrapping division of `self` and `rhs`.\n In other words this computes `[self.x.wrapping_div(rhs.x), self.y.wrapping_div(rhs.y), ..]`.", - &["_self", "rhs"], - ) - .register_documented( - "wrapping_mul", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::U8Vec2::wrapping_mul( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector containing the wrapping multiplication of `self` and `rhs`.\n In other words this computes `[self.x.wrapping_mul(rhs.x), self.y.wrapping_mul(rhs.y), ..]`.", - &["_self", "rhs"], - ) - .register_documented( - "wrapping_sub", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::U8Vec2::wrapping_sub( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector containing the wrapping subtraction of `self` and `rhs`.\n In other words this computes `[self.x.wrapping_sub(rhs.x), self.y.wrapping_sub(rhs.y), ..]`.", - &["_self", "rhs"], - ); - let registry = world - .get_resource_or_init::(); - let mut registry = registry.write(); - registry - .register_type_data::< - bevy::math::U8Vec2, - bevy_mod_scripting_core::bindings::MarkAsGenerated, - >(); - } - pub(crate) fn register_u_8_vec_3_functions(world: &mut bevy::ecs::world::World) { - bevy_mod_scripting_core::bindings::function::namespace::NamespaceBuilder::< - bevy::math::U8Vec3, - >::new(world) - .register_documented( - "add", - |_self: Val, rhs: Ref| { - let output: Val = { - { - let output: Val = >::add(_self.into_inner(), &rhs) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "add", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = >::add(_self.into_inner(), rhs.into_inner()) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "add", - |_self: Val, rhs: u8| { - let output: Val = { - { - let output: Val = >::add(_self.into_inner(), rhs) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "as_dvec3", - |_self: Ref| { - let output: Val = { - { - let output: Val = bevy::math::U8Vec3::as_dvec3( - &_self, - ) - .into(); - output - } - }; - output - }, - " Casts all elements of `self` to `f64`.", - &["_self"], - ) - .register_documented( - "as_i16vec3", - |_self: Ref| { - let output: Val = { - { - let output: Val = bevy::math::U8Vec3::as_i16vec3( - &_self, - ) - .into(); - output - } - }; - output - }, - " Casts all elements of `self` to `i16`.", - &["_self"], - ) - .register_documented( - "as_i64vec3", - |_self: Ref| { - let output: Val = { - { - let output: Val = bevy::math::U8Vec3::as_i64vec3( - &_self, - ) - .into(); - output - } - }; - output - }, - " Casts all elements of `self` to `i64`.", - &["_self"], - ) - .register_documented( - "as_i8vec3", - |_self: Ref| { - let output: Val = { - { - let output: Val = bevy::math::U8Vec3::as_i8vec3( - &_self, - ) - .into(); - output - } - }; - output - }, - " Casts all elements of `self` to `i8`.", - &["_self"], - ) - .register_documented( - "as_ivec3", - |_self: Ref| { - let output: Val = { - { - let output: Val = bevy::math::U8Vec3::as_ivec3( - &_self, - ) - .into(); - output - } - }; - output - }, - " Casts all elements of `self` to `i32`.", - &["_self"], - ) - .register_documented( - "as_u16vec3", - |_self: Ref| { - let output: Val = { - { - let output: Val = bevy::math::U8Vec3::as_u16vec3( - &_self, - ) - .into(); - output - } - }; - output - }, - " Casts all elements of `self` to `u16`.", - &["_self"], - ) - .register_documented( - "as_u64vec3", - |_self: Ref| { - let output: Val = { - { - let output: Val = bevy::math::U8Vec3::as_u64vec3( - &_self, - ) - .into(); - output - } - }; - output - }, - " Casts all elements of `self` to `u64`.", - &["_self"], - ) - .register_documented( - "as_uvec3", - |_self: Ref| { - let output: Val = { - { - let output: Val = bevy::math::U8Vec3::as_uvec3( - &_self, - ) - .into(); - output - } - }; - output - }, - " Casts all elements of `self` to `u32`.", - &["_self"], - ) - .register_documented( - "as_vec3", - |_self: Ref| { - let output: Val = { - { - let output: Val = bevy::math::U8Vec3::as_vec3( - &_self, - ) - .into(); - output - } - }; - output - }, - " Casts all elements of `self` to `f32`.", - &["_self"], - ) - .register_documented( - "as_vec3a", - |_self: Ref| { - let output: Val = { - { - let output: Val = bevy::math::U8Vec3::as_vec3a( - &_self, - ) - .into(); - output - } - }; - output - }, - " Casts all elements of `self` to `f32`.", - &["_self"], - ) - .register_documented( - "assert_receiver_is_total_eq", - |_self: Ref| { - let output: () = { - { - let output: () = ::assert_receiver_is_total_eq( - &_self, - ) - .into(); - output - } - }; - output - }, - "", - &["_self"], - ) - .register_documented( - "clamp", - | - _self: Val, - min: Val, - max: Val| - { - let output: Val = { - { - let output: Val = bevy::math::U8Vec3::clamp( - _self.into_inner(), - min.into_inner(), - max.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Component-wise clamping of values, similar to [`u8::clamp`].\n Each element in `min` must be less-or-equal to the corresponding element in `max`.\n # Panics\n Will panic if `min` is greater than `max` when `glam_assert` is enabled.", - &["_self", "min", "max"], - ) - .register_documented( - "clone", - |_self: Ref| { - let output: Val = { - { - let output: Val = ::clone( - &_self, - ) - .into(); - output - } - }; - output - }, - "", - &["_self"], - ) - .register_documented( - "cmpeq", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::U8Vec3::cmpeq( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector mask containing the result of a `==` comparison for each element of\n `self` and `rhs`.\n In other words, this computes `[self.x == rhs.x, self.y == rhs.y, ..]` for all\n elements.", - &["_self", "rhs"], - ) - .register_documented( - "cmpge", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::U8Vec3::cmpge( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector mask containing the result of a `>=` comparison for each element of\n `self` and `rhs`.\n In other words this computes `[self.x >= rhs.x, self.y >= rhs.y, ..]` for all\n elements.", - &["_self", "rhs"], - ) - .register_documented( - "cmpgt", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::U8Vec3::cmpgt( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector mask containing the result of a `>` comparison for each element of\n `self` and `rhs`.\n In other words this computes `[self.x > rhs.x, self.y > rhs.y, ..]` for all\n elements.", - &["_self", "rhs"], - ) - .register_documented( - "cmple", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::U8Vec3::cmple( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector mask containing the result of a `<=` comparison for each element of\n `self` and `rhs`.\n In other words this computes `[self.x <= rhs.x, self.y <= rhs.y, ..]` for all\n elements.", - &["_self", "rhs"], - ) - .register_documented( - "cmplt", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::U8Vec3::cmplt( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector mask containing the result of a `<` comparison for each element of\n `self` and `rhs`.\n In other words this computes `[self.x < rhs.x, self.y < rhs.y, ..]` for all\n elements.", - &["_self", "rhs"], - ) - .register_documented( - "cmpne", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::U8Vec3::cmpne( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector mask containing the result of a `!=` comparison for each element of\n `self` and `rhs`.\n In other words this computes `[self.x != rhs.x, self.y != rhs.y, ..]` for all\n elements.", - &["_self", "rhs"], - ) - .register_documented( - "cross", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::U8Vec3::cross( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Computes the cross product of `self` and `rhs`.", - &["_self", "rhs"], - ) - .register_documented( - "div", - |_self: Val, rhs: Ref| { - let output: Val = { - { - let output: Val = >::div(_self.into_inner(), &rhs) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "div", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = >::div(_self.into_inner(), rhs.into_inner()) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "div", - |_self: Val, rhs: u8| { - let output: Val = { - { - let output: Val = >::div(_self.into_inner(), rhs) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "dot", - |_self: Val, rhs: Val| { - let output: u8 = { - { - let output: u8 = bevy::math::U8Vec3::dot( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Computes the dot product of `self` and `rhs`.", - &["_self", "rhs"], - ) - .register_documented( - "dot_into_vec", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::U8Vec3::dot_into_vec( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector where every component is the dot product of `self` and `rhs`.", - &["_self", "rhs"], - ) - .register_documented( - "element_product", - |_self: Val| { - let output: u8 = { - { - let output: u8 = bevy::math::U8Vec3::element_product( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns the product of all elements of `self`.\n In other words, this computes `self.x * self.y * ..`.", - &["_self"], - ) - .register_documented( - "element_sum", - |_self: Val| { - let output: u8 = { - { - let output: u8 = bevy::math::U8Vec3::element_sum( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns the sum of all elements of `self`.\n In other words, this computes `self.x + self.y + ..`.", - &["_self"], - ) - .register_documented( - "eq", - |_self: Ref, other: Ref| { - let output: bool = { - { - let output: bool = >::eq(&_self, &other) - .into(); - output - } - }; - output - }, - "", - &["_self", "other"], - ) - .register_documented( - "extend", - |_self: Val, w: u8| { - let output: Val = { - { - let output: Val = bevy::math::U8Vec3::extend( - _self.into_inner(), - w, - ) - .into(); - output - } - }; - output - }, - " Creates a 4D vector from `self` and the given `w` value.", - &["_self", "w"], - ) - .register_documented( - "from_array", - |a: [u8; 3]| { - let output: Val = { - { - let output: Val = bevy::math::U8Vec3::from_array( - a, - ) - .into(); - output - } - }; - output - }, - " Creates a new vector from an array.", - &["a"], - ) - .register_documented( - "length_squared", - |_self: Val| { - let output: u8 = { - { - let output: u8 = bevy::math::U8Vec3::length_squared( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Computes the squared length of `self`.", - &["_self"], - ) - .register_documented( - "max", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::U8Vec3::max( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector containing the maximum values for each element of `self` and `rhs`.\n In other words this computes `[self.x.max(rhs.x), self.y.max(rhs.y), ..]`.", - &["_self", "rhs"], - ) - .register_documented( - "max_element", - |_self: Val| { - let output: u8 = { - { - let output: u8 = bevy::math::U8Vec3::max_element( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns the horizontal maximum of `self`.\n In other words this computes `max(x, y, ..)`.", - &["_self"], - ) - .register_documented( - "min", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::U8Vec3::min( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector containing the minimum values for each element of `self` and `rhs`.\n In other words this computes `[self.x.min(rhs.x), self.y.min(rhs.y), ..]`.", - &["_self", "rhs"], - ) - .register_documented( - "min_element", - |_self: Val| { - let output: u8 = { - { - let output: u8 = bevy::math::U8Vec3::min_element( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns the horizontal minimum of `self`.\n In other words this computes `min(x, y, ..)`.", - &["_self"], - ) - .register_documented( - "mul", - |_self: Val, rhs: Ref| { - let output: Val = { - { - let output: Val = >::mul(_self.into_inner(), &rhs) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "mul", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = >::mul(_self.into_inner(), rhs.into_inner()) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "mul", - |_self: Val, rhs: u8| { - let output: Val = { - { - let output: Val = >::mul(_self.into_inner(), rhs) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "new", - |x: u8, y: u8, z: u8| { - let output: Val = { - { - let output: Val = bevy::math::U8Vec3::new( - x, - y, - z, - ) - .into(); - output - } - }; - output - }, - " Creates a new vector.", - &["x", "y", "z"], - ) - .register_documented( - "rem", - |_self: Val, rhs: Ref| { - let output: Val = { - { - let output: Val = >::rem(_self.into_inner(), &rhs) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "rem", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = >::rem(_self.into_inner(), rhs.into_inner()) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "rem", - |_self: Val, rhs: u8| { - let output: Val = { - { - let output: Val = >::rem(_self.into_inner(), rhs) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "saturating_add", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::U8Vec3::saturating_add( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector containing the saturating addition of `self` and `rhs`.\n In other words this computes `[self.x.saturating_add(rhs.x), self.y.saturating_add(rhs.y), ..]`.", - &["_self", "rhs"], - ) - .register_documented( - "saturating_add_signed", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::U8Vec3::saturating_add_signed( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector containing the saturating addition of `self` and signed vector `rhs`.\n In other words this computes `[self.x.saturating_add_signed(rhs.x), self.y.saturating_add_signed(rhs.y), ..]`.", - &["_self", "rhs"], - ) - .register_documented( - "saturating_div", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::U8Vec3::saturating_div( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector containing the saturating division of `self` and `rhs`.\n In other words this computes `[self.x.saturating_div(rhs.x), self.y.saturating_div(rhs.y), ..]`.", - &["_self", "rhs"], - ) - .register_documented( - "saturating_mul", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::U8Vec3::saturating_mul( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector containing the saturating multiplication of `self` and `rhs`.\n In other words this computes `[self.x.saturating_mul(rhs.x), self.y.saturating_mul(rhs.y), ..]`.", - &["_self", "rhs"], - ) - .register_documented( - "saturating_sub", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::U8Vec3::saturating_sub( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector containing the saturating subtraction of `self` and `rhs`.\n In other words this computes `[self.x.saturating_sub(rhs.x), self.y.saturating_sub(rhs.y), ..]`.", - &["_self", "rhs"], - ) - .register_documented( - "select", - | - mask: Val, - if_true: Val, - if_false: Val| - { - let output: Val = { - { - let output: Val = bevy::math::U8Vec3::select( - mask.into_inner(), - if_true.into_inner(), - if_false.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Creates a vector from the elements in `if_true` and `if_false`, selecting which to use\n for each element of `self`.\n A true element in the mask uses the corresponding element from `if_true`, and false\n uses the element from `if_false`.", - &["mask", "if_true", "if_false"], - ) - .register_documented( - "splat", - |v: u8| { - let output: Val = { - { - let output: Val = bevy::math::U8Vec3::splat( - v, - ) - .into(); - output - } - }; - output - }, - " Creates a vector with all elements set to `v`.", - &["v"], - ) - .register_documented( - "sub", - |_self: Val, rhs: Ref| { - let output: Val = { - { - let output: Val = >::sub(_self.into_inner(), &rhs) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "sub", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = >::sub(_self.into_inner(), rhs.into_inner()) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "sub", - |_self: Val, rhs: u8| { - let output: Val = { - { - let output: Val = >::sub(_self.into_inner(), rhs) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "to_array", - |_self: Ref| { - let output: [u8; 3] = { - { - let output: [u8; 3] = bevy::math::U8Vec3::to_array(&_self) - .into(); - output - } - }; - output - }, - " `[x, y, z]`", - &["_self"], - ) - .register_documented( - "truncate", - |_self: Val| { - let output: Val = { - { - let output: Val = bevy::math::U8Vec3::truncate( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Creates a 2D vector from the `x` and `y` elements of `self`, discarding `z`.\n Truncation may also be performed by using [`self.xy()`][crate::swizzles::Vec3Swizzles::xy()].", - &["_self"], - ) - .register_documented( - "with_x", - |_self: Val, x: u8| { - let output: Val = { - { - let output: Val = bevy::math::U8Vec3::with_x( - _self.into_inner(), - x, - ) - .into(); - output - } - }; - output - }, - " Creates a 3D vector from `self` with the given value of `x`.", - &["_self", "x"], - ) - .register_documented( - "with_y", - |_self: Val, y: u8| { - let output: Val = { - { - let output: Val = bevy::math::U8Vec3::with_y( - _self.into_inner(), - y, - ) - .into(); - output - } - }; - output - }, - " Creates a 3D vector from `self` with the given value of `y`.", - &["_self", "y"], - ) - .register_documented( - "with_z", - |_self: Val, z: u8| { - let output: Val = { - { - let output: Val = bevy::math::U8Vec3::with_z( - _self.into_inner(), - z, - ) - .into(); - output - } - }; - output - }, - " Creates a 3D vector from `self` with the given value of `z`.", - &["_self", "z"], - ) - .register_documented( - "wrapping_add", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::U8Vec3::wrapping_add( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector containing the wrapping addition of `self` and `rhs`.\n In other words this computes `[self.x.wrapping_add(rhs.x), self.y.wrapping_add(rhs.y), ..]`.", - &["_self", "rhs"], - ) - .register_documented( - "wrapping_add_signed", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::U8Vec3::wrapping_add_signed( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector containing the wrapping addition of `self` and signed vector `rhs`.\n In other words this computes `[self.x.wrapping_add_signed(rhs.x), self.y.wrapping_add_signed(rhs.y), ..]`.", - &["_self", "rhs"], - ) - .register_documented( - "wrapping_div", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::U8Vec3::wrapping_div( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector containing the wrapping division of `self` and `rhs`.\n In other words this computes `[self.x.wrapping_div(rhs.x), self.y.wrapping_div(rhs.y), ..]`.", - &["_self", "rhs"], - ) - .register_documented( - "wrapping_mul", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::U8Vec3::wrapping_mul( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector containing the wrapping multiplication of `self` and `rhs`.\n In other words this computes `[self.x.wrapping_mul(rhs.x), self.y.wrapping_mul(rhs.y), ..]`.", - &["_self", "rhs"], - ) - .register_documented( - "wrapping_sub", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::U8Vec3::wrapping_sub( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector containing the wrapping subtraction of `self` and `rhs`.\n In other words this computes `[self.x.wrapping_sub(rhs.x), self.y.wrapping_sub(rhs.y), ..]`.", - &["_self", "rhs"], - ); - let registry = world - .get_resource_or_init::(); - let mut registry = registry.write(); - registry - .register_type_data::< - bevy::math::U8Vec3, - bevy_mod_scripting_core::bindings::MarkAsGenerated, - >(); - } - pub(crate) fn register_u_8_vec_4_functions(world: &mut bevy::ecs::world::World) { - bevy_mod_scripting_core::bindings::function::namespace::NamespaceBuilder::< - bevy::math::U8Vec4, - >::new(world) - .register_documented( - "add", - |_self: Val, rhs: Ref| { - let output: Val = { - { - let output: Val = >::add(_self.into_inner(), &rhs) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "add", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = >::add(_self.into_inner(), rhs.into_inner()) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "add", - |_self: Val, rhs: u8| { - let output: Val = { - { - let output: Val = >::add(_self.into_inner(), rhs) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "as_dvec4", - |_self: Ref| { - let output: Val = { - { - let output: Val = bevy::math::U8Vec4::as_dvec4( - &_self, - ) - .into(); - output - } - }; - output - }, - " Casts all elements of `self` to `f64`.", - &["_self"], - ) - .register_documented( - "as_i16vec4", - |_self: Ref| { - let output: Val = { - { - let output: Val = bevy::math::U8Vec4::as_i16vec4( - &_self, - ) - .into(); - output - } - }; - output - }, - " Casts all elements of `self` to `i16`.", - &["_self"], - ) - .register_documented( - "as_i64vec4", - |_self: Ref| { - let output: Val = { - { - let output: Val = bevy::math::U8Vec4::as_i64vec4( - &_self, - ) - .into(); - output - } - }; - output - }, - " Casts all elements of `self` to `i64`.", - &["_self"], - ) - .register_documented( - "as_i8vec4", - |_self: Ref| { - let output: Val = { - { - let output: Val = bevy::math::U8Vec4::as_i8vec4( - &_self, - ) - .into(); - output - } - }; - output - }, - " Casts all elements of `self` to `i8`.", - &["_self"], - ) - .register_documented( - "as_ivec4", - |_self: Ref| { - let output: Val = { - { - let output: Val = bevy::math::U8Vec4::as_ivec4( - &_self, - ) - .into(); - output - } - }; - output - }, - " Casts all elements of `self` to `i32`.", - &["_self"], - ) - .register_documented( - "as_u16vec4", - |_self: Ref| { - let output: Val = { - { - let output: Val = bevy::math::U8Vec4::as_u16vec4( - &_self, - ) - .into(); - output - } - }; - output - }, - " Casts all elements of `self` to `u16`.", - &["_self"], - ) - .register_documented( - "as_u64vec4", - |_self: Ref| { - let output: Val = { - { - let output: Val = bevy::math::U8Vec4::as_u64vec4( - &_self, - ) - .into(); - output - } - }; - output - }, - " Casts all elements of `self` to `u64`.", - &["_self"], - ) - .register_documented( - "as_uvec4", - |_self: Ref| { - let output: Val = { - { - let output: Val = bevy::math::U8Vec4::as_uvec4( - &_self, - ) - .into(); - output - } - }; - output - }, - " Casts all elements of `self` to `u32`.", - &["_self"], - ) - .register_documented( - "as_vec4", - |_self: Ref| { - let output: Val = { - { - let output: Val = bevy::math::U8Vec4::as_vec4( - &_self, - ) - .into(); - output - } - }; - output - }, - " Casts all elements of `self` to `f32`.", - &["_self"], - ) - .register_documented( - "assert_receiver_is_total_eq", - |_self: Ref| { - let output: () = { - { - let output: () = ::assert_receiver_is_total_eq( - &_self, - ) - .into(); - output - } - }; - output - }, - "", - &["_self"], - ) - .register_documented( - "clamp", - | - _self: Val, - min: Val, - max: Val| - { - let output: Val = { - { - let output: Val = bevy::math::U8Vec4::clamp( - _self.into_inner(), - min.into_inner(), - max.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Component-wise clamping of values, similar to [`u8::clamp`].\n Each element in `min` must be less-or-equal to the corresponding element in `max`.\n # Panics\n Will panic if `min` is greater than `max` when `glam_assert` is enabled.", - &["_self", "min", "max"], - ) - .register_documented( - "clone", - |_self: Ref| { - let output: Val = { - { - let output: Val = ::clone( - &_self, - ) - .into(); - output - } - }; - output - }, - "", - &["_self"], - ) - .register_documented( - "cmpeq", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::U8Vec4::cmpeq( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector mask containing the result of a `==` comparison for each element of\n `self` and `rhs`.\n In other words, this computes `[self.x == rhs.x, self.y == rhs.y, ..]` for all\n elements.", - &["_self", "rhs"], - ) - .register_documented( - "cmpge", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::U8Vec4::cmpge( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector mask containing the result of a `>=` comparison for each element of\n `self` and `rhs`.\n In other words this computes `[self.x >= rhs.x, self.y >= rhs.y, ..]` for all\n elements.", - &["_self", "rhs"], - ) - .register_documented( - "cmpgt", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::U8Vec4::cmpgt( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector mask containing the result of a `>` comparison for each element of\n `self` and `rhs`.\n In other words this computes `[self.x > rhs.x, self.y > rhs.y, ..]` for all\n elements.", - &["_self", "rhs"], - ) - .register_documented( - "cmple", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::U8Vec4::cmple( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector mask containing the result of a `<=` comparison for each element of\n `self` and `rhs`.\n In other words this computes `[self.x <= rhs.x, self.y <= rhs.y, ..]` for all\n elements.", - &["_self", "rhs"], - ) - .register_documented( - "cmplt", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::U8Vec4::cmplt( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector mask containing the result of a `<` comparison for each element of\n `self` and `rhs`.\n In other words this computes `[self.x < rhs.x, self.y < rhs.y, ..]` for all\n elements.", - &["_self", "rhs"], - ) - .register_documented( - "cmpne", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::U8Vec4::cmpne( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector mask containing the result of a `!=` comparison for each element of\n `self` and `rhs`.\n In other words this computes `[self.x != rhs.x, self.y != rhs.y, ..]` for all\n elements.", - &["_self", "rhs"], - ) - .register_documented( - "div", - |_self: Val, rhs: Ref| { - let output: Val = { - { - let output: Val = >::div(_self.into_inner(), &rhs) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "div", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = >::div(_self.into_inner(), rhs.into_inner()) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "div", - |_self: Val, rhs: u8| { - let output: Val = { - { - let output: Val = >::div(_self.into_inner(), rhs) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "dot", - |_self: Val, rhs: Val| { - let output: u8 = { - { - let output: u8 = bevy::math::U8Vec4::dot( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Computes the dot product of `self` and `rhs`.", - &["_self", "rhs"], - ) - .register_documented( - "dot_into_vec", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::U8Vec4::dot_into_vec( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector where every component is the dot product of `self` and `rhs`.", - &["_self", "rhs"], - ) - .register_documented( - "element_product", - |_self: Val| { - let output: u8 = { - { - let output: u8 = bevy::math::U8Vec4::element_product( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns the product of all elements of `self`.\n In other words, this computes `self.x * self.y * ..`.", - &["_self"], - ) - .register_documented( - "element_sum", - |_self: Val| { - let output: u8 = { - { - let output: u8 = bevy::math::U8Vec4::element_sum( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns the sum of all elements of `self`.\n In other words, this computes `self.x + self.y + ..`.", - &["_self"], - ) - .register_documented( - "eq", - |_self: Ref, other: Ref| { - let output: bool = { - { - let output: bool = >::eq(&_self, &other) - .into(); - output - } - }; - output - }, - "", - &["_self", "other"], - ) - .register_documented( - "from_array", - |a: [u8; 4]| { - let output: Val = { - { - let output: Val = bevy::math::U8Vec4::from_array( - a, - ) - .into(); - output - } - }; - output - }, - " Creates a new vector from an array.", - &["a"], - ) - .register_documented( - "length_squared", - |_self: Val| { - let output: u8 = { - { - let output: u8 = bevy::math::U8Vec4::length_squared( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Computes the squared length of `self`.", - &["_self"], - ) - .register_documented( - "max", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::U8Vec4::max( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector containing the maximum values for each element of `self` and `rhs`.\n In other words this computes `[self.x.max(rhs.x), self.y.max(rhs.y), ..]`.", - &["_self", "rhs"], - ) - .register_documented( - "max_element", - |_self: Val| { - let output: u8 = { - { - let output: u8 = bevy::math::U8Vec4::max_element( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns the horizontal maximum of `self`.\n In other words this computes `max(x, y, ..)`.", - &["_self"], - ) - .register_documented( - "min", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::U8Vec4::min( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector containing the minimum values for each element of `self` and `rhs`.\n In other words this computes `[self.x.min(rhs.x), self.y.min(rhs.y), ..]`.", - &["_self", "rhs"], - ) - .register_documented( - "min_element", - |_self: Val| { - let output: u8 = { - { - let output: u8 = bevy::math::U8Vec4::min_element( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns the horizontal minimum of `self`.\n In other words this computes `min(x, y, ..)`.", - &["_self"], - ) - .register_documented( - "mul", - |_self: Val, rhs: Ref| { - let output: Val = { - { - let output: Val = >::mul(_self.into_inner(), &rhs) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "mul", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = >::mul(_self.into_inner(), rhs.into_inner()) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "mul", - |_self: Val, rhs: u8| { - let output: Val = { - { - let output: Val = >::mul(_self.into_inner(), rhs) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "new", - |x: u8, y: u8, z: u8, w: u8| { - let output: Val = { - { - let output: Val = bevy::math::U8Vec4::new( - x, - y, - z, - w, - ) - .into(); - output - } - }; - output - }, - " Creates a new vector.", - &["x", "y", "z", "w"], - ) - .register_documented( - "rem", - |_self: Val, rhs: Ref| { - let output: Val = { - { - let output: Val = >::rem(_self.into_inner(), &rhs) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "rem", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = >::rem(_self.into_inner(), rhs.into_inner()) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "rem", - |_self: Val, rhs: u8| { - let output: Val = { - { - let output: Val = >::rem(_self.into_inner(), rhs) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "saturating_add", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::U8Vec4::saturating_add( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector containing the saturating addition of `self` and `rhs`.\n In other words this computes `[self.x.saturating_add(rhs.x), self.y.saturating_add(rhs.y), ..]`.", - &["_self", "rhs"], - ) - .register_documented( - "saturating_add_signed", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::U8Vec4::saturating_add_signed( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector containing the saturating addition of `self` and signed vector `rhs`.\n In other words this computes `[self.x.saturating_add_signed(rhs.x), self.y.saturating_add_signed(rhs.y), ..]`.", - &["_self", "rhs"], - ) - .register_documented( - "saturating_div", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::U8Vec4::saturating_div( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector containing the saturating division of `self` and `rhs`.\n In other words this computes `[self.x.saturating_div(rhs.x), self.y.saturating_div(rhs.y), ..]`.", - &["_self", "rhs"], - ) - .register_documented( - "saturating_mul", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::U8Vec4::saturating_mul( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector containing the saturating multiplication of `self` and `rhs`.\n In other words this computes `[self.x.saturating_mul(rhs.x), self.y.saturating_mul(rhs.y), ..]`.", - &["_self", "rhs"], - ) - .register_documented( - "saturating_sub", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::U8Vec4::saturating_sub( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector containing the saturating subtraction of `self` and `rhs`.\n In other words this computes `[self.x.saturating_sub(rhs.x), self.y.saturating_sub(rhs.y), ..]`.", - &["_self", "rhs"], - ) - .register_documented( - "select", - | - mask: Val, - if_true: Val, - if_false: Val| - { - let output: Val = { - { - let output: Val = bevy::math::U8Vec4::select( - mask.into_inner(), - if_true.into_inner(), - if_false.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Creates a vector from the elements in `if_true` and `if_false`, selecting which to use\n for each element of `self`.\n A true element in the mask uses the corresponding element from `if_true`, and false\n uses the element from `if_false`.", - &["mask", "if_true", "if_false"], - ) - .register_documented( - "splat", - |v: u8| { - let output: Val = { - { - let output: Val = bevy::math::U8Vec4::splat( - v, - ) - .into(); - output - } - }; - output - }, - " Creates a vector with all elements set to `v`.", - &["v"], - ) - .register_documented( - "sub", - |_self: Val, rhs: Ref| { - let output: Val = { - { - let output: Val = >::sub(_self.into_inner(), &rhs) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "sub", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = >::sub(_self.into_inner(), rhs.into_inner()) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "sub", - |_self: Val, rhs: u8| { - let output: Val = { - { - let output: Val = >::sub(_self.into_inner(), rhs) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "to_array", - |_self: Ref| { - let output: [u8; 4] = { - { - let output: [u8; 4] = bevy::math::U8Vec4::to_array(&_self) - .into(); - output - } - }; - output - }, - " `[x, y, z, w]`", - &["_self"], - ) - .register_documented( - "truncate", - |_self: Val| { - let output: Val = { - { - let output: Val = bevy::math::U8Vec4::truncate( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Creates a 3D vector from the `x`, `y` and `z` elements of `self`, discarding `w`.\n Truncation to [`U8Vec3`] may also be performed by using [`self.xyz()`][crate::swizzles::Vec4Swizzles::xyz()].", - &["_self"], - ) - .register_documented( - "with_w", - |_self: Val, w: u8| { - let output: Val = { - { - let output: Val = bevy::math::U8Vec4::with_w( - _self.into_inner(), - w, - ) - .into(); - output - } - }; - output - }, - " Creates a 4D vector from `self` with the given value of `w`.", - &["_self", "w"], - ) - .register_documented( - "with_x", - |_self: Val, x: u8| { - let output: Val = { - { - let output: Val = bevy::math::U8Vec4::with_x( - _self.into_inner(), - x, - ) - .into(); - output - } - }; - output - }, - " Creates a 4D vector from `self` with the given value of `x`.", - &["_self", "x"], - ) - .register_documented( - "with_y", - |_self: Val, y: u8| { - let output: Val = { - { - let output: Val = bevy::math::U8Vec4::with_y( - _self.into_inner(), - y, - ) - .into(); - output - } - }; - output - }, - " Creates a 4D vector from `self` with the given value of `y`.", - &["_self", "y"], - ) - .register_documented( - "with_z", - |_self: Val, z: u8| { - let output: Val = { - { - let output: Val = bevy::math::U8Vec4::with_z( - _self.into_inner(), - z, - ) - .into(); - output - } - }; - output - }, - " Creates a 4D vector from `self` with the given value of `z`.", - &["_self", "z"], - ) - .register_documented( - "wrapping_add", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::U8Vec4::wrapping_add( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector containing the wrapping addition of `self` and `rhs`.\n In other words this computes `[self.x.wrapping_add(rhs.x), self.y.wrapping_add(rhs.y), ..]`.", - &["_self", "rhs"], - ) - .register_documented( - "wrapping_add_signed", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::U8Vec4::wrapping_add_signed( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector containing the wrapping addition of `self` and signed vector `rhs`.\n In other words this computes `[self.x.wrapping_add_signed(rhs.x), self.y.wrapping_add_signed(rhs.y), ..]`.", - &["_self", "rhs"], - ) - .register_documented( - "wrapping_div", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::U8Vec4::wrapping_div( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector containing the wrapping division of `self` and `rhs`.\n In other words this computes `[self.x.wrapping_div(rhs.x), self.y.wrapping_div(rhs.y), ..]`.", - &["_self", "rhs"], - ) - .register_documented( - "wrapping_mul", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::U8Vec4::wrapping_mul( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector containing the wrapping multiplication of `self` and `rhs`.\n In other words this computes `[self.x.wrapping_mul(rhs.x), self.y.wrapping_mul(rhs.y), ..]`.", - &["_self", "rhs"], - ) - .register_documented( - "wrapping_sub", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::U8Vec4::wrapping_sub( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector containing the wrapping subtraction of `self` and `rhs`.\n In other words this computes `[self.x.wrapping_sub(rhs.x), self.y.wrapping_sub(rhs.y), ..]`.", - &["_self", "rhs"], - ); - let registry = world - .get_resource_or_init::(); - let mut registry = registry.write(); - registry - .register_type_data::< - bevy::math::U8Vec4, - bevy_mod_scripting_core::bindings::MarkAsGenerated, - >(); - } - pub(crate) fn register_u_16_vec_2_functions(world: &mut bevy::ecs::world::World) { - bevy_mod_scripting_core::bindings::function::namespace::NamespaceBuilder::< - bevy::math::U16Vec2, - >::new(world) - .register_documented( - "add", - |_self: Val, rhs: Ref| { - let output: Val = { - { - let output: Val = >::add(_self.into_inner(), &rhs) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "add", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = >::add(_self.into_inner(), rhs.into_inner()) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "add", - |_self: Val, rhs: u16| { - let output: Val = { - { - let output: Val = >::add(_self.into_inner(), rhs) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "as_dvec2", - |_self: Ref| { - let output: Val = { - { - let output: Val = bevy::math::U16Vec2::as_dvec2( - &_self, - ) - .into(); - output - } - }; - output - }, - " Casts all elements of `self` to `f64`.", - &["_self"], - ) - .register_documented( - "as_i16vec2", - |_self: Ref| { - let output: Val = { - { - let output: Val = bevy::math::U16Vec2::as_i16vec2( - &_self, - ) - .into(); - output - } - }; - output - }, - " Casts all elements of `self` to `i16`.", - &["_self"], - ) - .register_documented( - "as_i64vec2", - |_self: Ref| { - let output: Val = { - { - let output: Val = bevy::math::U16Vec2::as_i64vec2( - &_self, - ) - .into(); - output - } - }; - output - }, - " Casts all elements of `self` to `i64`.", - &["_self"], - ) - .register_documented( - "as_i8vec2", - |_self: Ref| { - let output: Val = { - { - let output: Val = bevy::math::U16Vec2::as_i8vec2( - &_self, - ) - .into(); - output - } - }; - output - }, - " Casts all elements of `self` to `i8`.", - &["_self"], - ) - .register_documented( - "as_ivec2", - |_self: Ref| { - let output: Val = { - { - let output: Val = bevy::math::U16Vec2::as_ivec2( - &_self, - ) - .into(); - output - } - }; - output - }, - " Casts all elements of `self` to `i32`.", - &["_self"], - ) - .register_documented( - "as_u64vec2", - |_self: Ref| { - let output: Val = { - { - let output: Val = bevy::math::U16Vec2::as_u64vec2( - &_self, - ) - .into(); - output - } - }; - output - }, - " Casts all elements of `self` to `u64`.", - &["_self"], - ) - .register_documented( - "as_u8vec2", - |_self: Ref| { - let output: Val = { - { - let output: Val = bevy::math::U16Vec2::as_u8vec2( - &_self, - ) - .into(); - output - } - }; - output - }, - " Casts all elements of `self` to `u8`.", - &["_self"], - ) - .register_documented( - "as_uvec2", - |_self: Ref| { - let output: Val = { - { - let output: Val = bevy::math::U16Vec2::as_uvec2( - &_self, - ) - .into(); - output - } - }; - output - }, - " Casts all elements of `self` to `u32`.", - &["_self"], - ) - .register_documented( - "as_vec2", - |_self: Ref| { - let output: Val = { - { - let output: Val = bevy::math::U16Vec2::as_vec2( - &_self, - ) - .into(); - output - } - }; - output - }, - " Casts all elements of `self` to `f32`.", - &["_self"], - ) - .register_documented( - "assert_receiver_is_total_eq", - |_self: Ref| { - let output: () = { - { - let output: () = ::assert_receiver_is_total_eq( - &_self, - ) - .into(); - output - } - }; - output - }, - "", - &["_self"], - ) - .register_documented( - "clamp", - | - _self: Val, - min: Val, - max: Val| - { - let output: Val = { - { - let output: Val = bevy::math::U16Vec2::clamp( - _self.into_inner(), - min.into_inner(), - max.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Component-wise clamping of values, similar to [`u16::clamp`].\n Each element in `min` must be less-or-equal to the corresponding element in `max`.\n # Panics\n Will panic if `min` is greater than `max` when `glam_assert` is enabled.", - &["_self", "min", "max"], - ) - .register_documented( - "clone", - |_self: Ref| { - let output: Val = { - { - let output: Val = ::clone( - &_self, - ) - .into(); - output - } - }; - output - }, - "", - &["_self"], - ) - .register_documented( - "cmpeq", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::U16Vec2::cmpeq( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector mask containing the result of a `==` comparison for each element of\n `self` and `rhs`.\n In other words, this computes `[self.x == rhs.x, self.y == rhs.y, ..]` for all\n elements.", - &["_self", "rhs"], - ) - .register_documented( - "cmpge", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::U16Vec2::cmpge( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector mask containing the result of a `>=` comparison for each element of\n `self` and `rhs`.\n In other words this computes `[self.x >= rhs.x, self.y >= rhs.y, ..]` for all\n elements.", - &["_self", "rhs"], - ) - .register_documented( - "cmpgt", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::U16Vec2::cmpgt( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector mask containing the result of a `>` comparison for each element of\n `self` and `rhs`.\n In other words this computes `[self.x > rhs.x, self.y > rhs.y, ..]` for all\n elements.", - &["_self", "rhs"], - ) - .register_documented( - "cmple", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::U16Vec2::cmple( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector mask containing the result of a `<=` comparison for each element of\n `self` and `rhs`.\n In other words this computes `[self.x <= rhs.x, self.y <= rhs.y, ..]` for all\n elements.", - &["_self", "rhs"], - ) - .register_documented( - "cmplt", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::U16Vec2::cmplt( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector mask containing the result of a `<` comparison for each element of\n `self` and `rhs`.\n In other words this computes `[self.x < rhs.x, self.y < rhs.y, ..]` for all\n elements.", - &["_self", "rhs"], - ) - .register_documented( - "cmpne", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::U16Vec2::cmpne( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector mask containing the result of a `!=` comparison for each element of\n `self` and `rhs`.\n In other words this computes `[self.x != rhs.x, self.y != rhs.y, ..]` for all\n elements.", - &["_self", "rhs"], - ) - .register_documented( - "div", - |_self: Val, rhs: Ref| { - let output: Val = { - { - let output: Val = >::div(_self.into_inner(), &rhs) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "div", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = >::div(_self.into_inner(), rhs.into_inner()) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "div", - |_self: Val, rhs: u16| { - let output: Val = { - { - let output: Val = >::div(_self.into_inner(), rhs) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "dot", - |_self: Val, rhs: Val| { - let output: u16 = { - { - let output: u16 = bevy::math::U16Vec2::dot( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Computes the dot product of `self` and `rhs`.", - &["_self", "rhs"], - ) - .register_documented( - "dot_into_vec", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::U16Vec2::dot_into_vec( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector where every component is the dot product of `self` and `rhs`.", - &["_self", "rhs"], - ) - .register_documented( - "element_product", - |_self: Val| { - let output: u16 = { - { - let output: u16 = bevy::math::U16Vec2::element_product( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns the product of all elements of `self`.\n In other words, this computes `self.x * self.y * ..`.", - &["_self"], - ) - .register_documented( - "element_sum", - |_self: Val| { - let output: u16 = { - { - let output: u16 = bevy::math::U16Vec2::element_sum( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns the sum of all elements of `self`.\n In other words, this computes `self.x + self.y + ..`.", - &["_self"], - ) - .register_documented( - "eq", - |_self: Ref, other: Ref| { - let output: bool = { - { - let output: bool = >::eq(&_self, &other) - .into(); - output - } - }; - output - }, - "", - &["_self", "other"], - ) - .register_documented( - "extend", - |_self: Val, z: u16| { - let output: Val = { - { - let output: Val = bevy::math::U16Vec2::extend( - _self.into_inner(), - z, - ) - .into(); - output - } - }; - output - }, - " Creates a 3D vector from `self` and the given `z` value.", - &["_self", "z"], - ) - .register_documented( - "from_array", - |a: [u16; 2]| { - let output: Val = { - { - let output: Val = bevy::math::U16Vec2::from_array( - a, - ) - .into(); - output - } - }; - output - }, - " Creates a new vector from an array.", - &["a"], - ) - .register_documented( - "length_squared", - |_self: Val| { - let output: u16 = { - { - let output: u16 = bevy::math::U16Vec2::length_squared( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Computes the squared length of `self`.", - &["_self"], - ) - .register_documented( - "max", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::U16Vec2::max( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector containing the maximum values for each element of `self` and `rhs`.\n In other words this computes `[self.x.max(rhs.x), self.y.max(rhs.y), ..]`.", - &["_self", "rhs"], - ) - .register_documented( - "max_element", - |_self: Val| { - let output: u16 = { - { - let output: u16 = bevy::math::U16Vec2::max_element( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns the horizontal maximum of `self`.\n In other words this computes `max(x, y, ..)`.", - &["_self"], - ) - .register_documented( - "min", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::U16Vec2::min( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector containing the minimum values for each element of `self` and `rhs`.\n In other words this computes `[self.x.min(rhs.x), self.y.min(rhs.y), ..]`.", - &["_self", "rhs"], - ) - .register_documented( - "min_element", - |_self: Val| { - let output: u16 = { - { - let output: u16 = bevy::math::U16Vec2::min_element( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns the horizontal minimum of `self`.\n In other words this computes `min(x, y, ..)`.", - &["_self"], - ) - .register_documented( - "mul", - |_self: Val, rhs: Ref| { - let output: Val = { - { - let output: Val = >::mul(_self.into_inner(), &rhs) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "mul", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = >::mul(_self.into_inner(), rhs.into_inner()) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "mul", - |_self: Val, rhs: u16| { - let output: Val = { - { - let output: Val = >::mul(_self.into_inner(), rhs) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "new", - |x: u16, y: u16| { - let output: Val = { - { - let output: Val = bevy::math::U16Vec2::new( - x, - y, - ) - .into(); - output - } - }; - output - }, - " Creates a new vector.", - &["x", "y"], - ) - .register_documented( - "rem", - |_self: Val, rhs: Ref| { - let output: Val = { - { - let output: Val = >::rem(_self.into_inner(), &rhs) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "rem", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = >::rem(_self.into_inner(), rhs.into_inner()) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "rem", - |_self: Val, rhs: u16| { - let output: Val = { - { - let output: Val = >::rem(_self.into_inner(), rhs) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "saturating_add", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::U16Vec2::saturating_add( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector containing the saturating addition of `self` and `rhs`.\n In other words this computes `[self.x.saturating_add(rhs.x), self.y.saturating_add(rhs.y), ..]`.", - &["_self", "rhs"], - ) - .register_documented( - "saturating_add_signed", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::U16Vec2::saturating_add_signed( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector containing the saturating addition of `self` and signed vector `rhs`.\n In other words this computes `[self.x.saturating_add_signed(rhs.x), self.y.saturating_add_signed(rhs.y), ..]`.", - &["_self", "rhs"], - ) - .register_documented( - "saturating_div", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::U16Vec2::saturating_div( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector containing the saturating division of `self` and `rhs`.\n In other words this computes `[self.x.saturating_div(rhs.x), self.y.saturating_div(rhs.y), ..]`.", - &["_self", "rhs"], - ) - .register_documented( - "saturating_mul", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::U16Vec2::saturating_mul( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector containing the saturating multiplication of `self` and `rhs`.\n In other words this computes `[self.x.saturating_mul(rhs.x), self.y.saturating_mul(rhs.y), ..]`.", - &["_self", "rhs"], - ) - .register_documented( - "saturating_sub", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::U16Vec2::saturating_sub( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector containing the saturating subtraction of `self` and `rhs`.\n In other words this computes `[self.x.saturating_sub(rhs.x), self.y.saturating_sub(rhs.y), ..]`.", - &["_self", "rhs"], - ) - .register_documented( - "select", - | - mask: Val, - if_true: Val, - if_false: Val| - { - let output: Val = { - { - let output: Val = bevy::math::U16Vec2::select( - mask.into_inner(), - if_true.into_inner(), - if_false.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Creates a vector from the elements in `if_true` and `if_false`, selecting which to use\n for each element of `self`.\n A true element in the mask uses the corresponding element from `if_true`, and false\n uses the element from `if_false`.", - &["mask", "if_true", "if_false"], - ) - .register_documented( - "splat", - |v: u16| { - let output: Val = { - { - let output: Val = bevy::math::U16Vec2::splat( - v, - ) - .into(); - output - } - }; - output - }, - " Creates a vector with all elements set to `v`.", - &["v"], - ) - .register_documented( - "sub", - |_self: Val, rhs: Ref| { - let output: Val = { - { - let output: Val = >::sub(_self.into_inner(), &rhs) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "sub", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = >::sub(_self.into_inner(), rhs.into_inner()) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "sub", - |_self: Val, rhs: u16| { - let output: Val = { - { - let output: Val = >::sub(_self.into_inner(), rhs) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "to_array", - |_self: Ref| { - let output: [u16; 2] = { - { - let output: [u16; 2] = bevy::math::U16Vec2::to_array(&_self) - .into(); - output - } - }; - output - }, - " `[x, y]`", - &["_self"], - ) - .register_documented( - "with_x", - |_self: Val, x: u16| { - let output: Val = { - { - let output: Val = bevy::math::U16Vec2::with_x( - _self.into_inner(), - x, - ) - .into(); - output - } - }; - output - }, - " Creates a 2D vector from `self` with the given value of `x`.", - &["_self", "x"], - ) - .register_documented( - "with_y", - |_self: Val, y: u16| { - let output: Val = { - { - let output: Val = bevy::math::U16Vec2::with_y( - _self.into_inner(), - y, - ) - .into(); - output - } - }; - output - }, - " Creates a 2D vector from `self` with the given value of `y`.", - &["_self", "y"], - ) - .register_documented( - "wrapping_add", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::U16Vec2::wrapping_add( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector containing the wrapping addition of `self` and `rhs`.\n In other words this computes `[self.x.wrapping_add(rhs.x), self.y.wrapping_add(rhs.y), ..]`.", - &["_self", "rhs"], - ) - .register_documented( - "wrapping_add_signed", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::U16Vec2::wrapping_add_signed( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector containing the wrapping addition of `self` and signed vector `rhs`.\n In other words this computes `[self.x.wrapping_add_signed(rhs.x), self.y.wrapping_add_signed(rhs.y), ..]`.", - &["_self", "rhs"], - ) - .register_documented( - "wrapping_div", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::U16Vec2::wrapping_div( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector containing the wrapping division of `self` and `rhs`.\n In other words this computes `[self.x.wrapping_div(rhs.x), self.y.wrapping_div(rhs.y), ..]`.", - &["_self", "rhs"], - ) - .register_documented( - "wrapping_mul", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::U16Vec2::wrapping_mul( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector containing the wrapping multiplication of `self` and `rhs`.\n In other words this computes `[self.x.wrapping_mul(rhs.x), self.y.wrapping_mul(rhs.y), ..]`.", - &["_self", "rhs"], - ) - .register_documented( - "wrapping_sub", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::U16Vec2::wrapping_sub( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector containing the wrapping subtraction of `self` and `rhs`.\n In other words this computes `[self.x.wrapping_sub(rhs.x), self.y.wrapping_sub(rhs.y), ..]`.", - &["_self", "rhs"], - ); - let registry = world - .get_resource_or_init::(); - let mut registry = registry.write(); - registry - .register_type_data::< - bevy::math::U16Vec2, - bevy_mod_scripting_core::bindings::MarkAsGenerated, - >(); - } - pub(crate) fn register_u_16_vec_3_functions(world: &mut bevy::ecs::world::World) { - bevy_mod_scripting_core::bindings::function::namespace::NamespaceBuilder::< - bevy::math::U16Vec3, - >::new(world) - .register_documented( - "add", - |_self: Val, rhs: Ref| { - let output: Val = { - { - let output: Val = >::add(_self.into_inner(), &rhs) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "add", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = >::add(_self.into_inner(), rhs.into_inner()) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "add", - |_self: Val, rhs: u16| { - let output: Val = { - { - let output: Val = >::add(_self.into_inner(), rhs) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "as_dvec3", - |_self: Ref| { - let output: Val = { - { - let output: Val = bevy::math::U16Vec3::as_dvec3( - &_self, - ) - .into(); - output - } - }; - output - }, - " Casts all elements of `self` to `f64`.", - &["_self"], - ) - .register_documented( - "as_i16vec3", - |_self: Ref| { - let output: Val = { - { - let output: Val = bevy::math::U16Vec3::as_i16vec3( - &_self, - ) - .into(); - output - } - }; - output - }, - " Casts all elements of `self` to `i16`.", - &["_self"], - ) - .register_documented( - "as_i64vec3", - |_self: Ref| { - let output: Val = { - { - let output: Val = bevy::math::U16Vec3::as_i64vec3( - &_self, - ) - .into(); - output - } - }; - output - }, - " Casts all elements of `self` to `i64`.", - &["_self"], - ) - .register_documented( - "as_i8vec3", - |_self: Ref| { - let output: Val = { - { - let output: Val = bevy::math::U16Vec3::as_i8vec3( - &_self, - ) - .into(); - output - } - }; - output - }, - " Casts all elements of `self` to `i8`.", - &["_self"], - ) - .register_documented( - "as_ivec3", - |_self: Ref| { - let output: Val = { - { - let output: Val = bevy::math::U16Vec3::as_ivec3( - &_self, - ) - .into(); - output - } - }; - output - }, - " Casts all elements of `self` to `i32`.", - &["_self"], - ) - .register_documented( - "as_u64vec3", - |_self: Ref| { - let output: Val = { - { - let output: Val = bevy::math::U16Vec3::as_u64vec3( - &_self, - ) - .into(); - output - } - }; - output - }, - " Casts all elements of `self` to `u64`.", - &["_self"], - ) - .register_documented( - "as_u8vec3", - |_self: Ref| { - let output: Val = { - { - let output: Val = bevy::math::U16Vec3::as_u8vec3( - &_self, - ) - .into(); - output - } - }; - output - }, - " Casts all elements of `self` to `u8`.", - &["_self"], - ) - .register_documented( - "as_uvec3", - |_self: Ref| { - let output: Val = { - { - let output: Val = bevy::math::U16Vec3::as_uvec3( - &_self, - ) - .into(); - output - } - }; - output - }, - " Casts all elements of `self` to `u32`.", - &["_self"], - ) - .register_documented( - "as_vec3", - |_self: Ref| { - let output: Val = { - { - let output: Val = bevy::math::U16Vec3::as_vec3( - &_self, - ) - .into(); - output - } - }; - output - }, - " Casts all elements of `self` to `f32`.", - &["_self"], - ) - .register_documented( - "as_vec3a", - |_self: Ref| { - let output: Val = { - { - let output: Val = bevy::math::U16Vec3::as_vec3a( - &_self, - ) - .into(); - output - } - }; - output - }, - " Casts all elements of `self` to `f32`.", - &["_self"], - ) - .register_documented( - "assert_receiver_is_total_eq", - |_self: Ref| { - let output: () = { - { - let output: () = ::assert_receiver_is_total_eq( - &_self, - ) - .into(); - output - } - }; - output - }, - "", - &["_self"], - ) - .register_documented( - "clamp", - | - _self: Val, - min: Val, - max: Val| - { - let output: Val = { - { - let output: Val = bevy::math::U16Vec3::clamp( - _self.into_inner(), - min.into_inner(), - max.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Component-wise clamping of values, similar to [`u16::clamp`].\n Each element in `min` must be less-or-equal to the corresponding element in `max`.\n # Panics\n Will panic if `min` is greater than `max` when `glam_assert` is enabled.", - &["_self", "min", "max"], - ) - .register_documented( - "clone", - |_self: Ref| { - let output: Val = { - { - let output: Val = ::clone( - &_self, - ) - .into(); - output - } - }; - output - }, - "", - &["_self"], - ) - .register_documented( - "cmpeq", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::U16Vec3::cmpeq( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector mask containing the result of a `==` comparison for each element of\n `self` and `rhs`.\n In other words, this computes `[self.x == rhs.x, self.y == rhs.y, ..]` for all\n elements.", - &["_self", "rhs"], - ) - .register_documented( - "cmpge", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::U16Vec3::cmpge( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector mask containing the result of a `>=` comparison for each element of\n `self` and `rhs`.\n In other words this computes `[self.x >= rhs.x, self.y >= rhs.y, ..]` for all\n elements.", - &["_self", "rhs"], - ) - .register_documented( - "cmpgt", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::U16Vec3::cmpgt( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector mask containing the result of a `>` comparison for each element of\n `self` and `rhs`.\n In other words this computes `[self.x > rhs.x, self.y > rhs.y, ..]` for all\n elements.", - &["_self", "rhs"], - ) - .register_documented( - "cmple", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::U16Vec3::cmple( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector mask containing the result of a `<=` comparison for each element of\n `self` and `rhs`.\n In other words this computes `[self.x <= rhs.x, self.y <= rhs.y, ..]` for all\n elements.", - &["_self", "rhs"], - ) - .register_documented( - "cmplt", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::U16Vec3::cmplt( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector mask containing the result of a `<` comparison for each element of\n `self` and `rhs`.\n In other words this computes `[self.x < rhs.x, self.y < rhs.y, ..]` for all\n elements.", - &["_self", "rhs"], - ) - .register_documented( - "cmpne", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::U16Vec3::cmpne( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector mask containing the result of a `!=` comparison for each element of\n `self` and `rhs`.\n In other words this computes `[self.x != rhs.x, self.y != rhs.y, ..]` for all\n elements.", - &["_self", "rhs"], - ) - .register_documented( - "cross", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::U16Vec3::cross( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Computes the cross product of `self` and `rhs`.", - &["_self", "rhs"], - ) - .register_documented( - "div", - |_self: Val, rhs: Ref| { - let output: Val = { - { - let output: Val = >::div(_self.into_inner(), &rhs) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "div", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = >::div(_self.into_inner(), rhs.into_inner()) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "div", - |_self: Val, rhs: u16| { - let output: Val = { - { - let output: Val = >::div(_self.into_inner(), rhs) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "dot", - |_self: Val, rhs: Val| { - let output: u16 = { - { - let output: u16 = bevy::math::U16Vec3::dot( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Computes the dot product of `self` and `rhs`.", - &["_self", "rhs"], - ) - .register_documented( - "dot_into_vec", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::U16Vec3::dot_into_vec( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector where every component is the dot product of `self` and `rhs`.", - &["_self", "rhs"], - ) - .register_documented( - "element_product", - |_self: Val| { - let output: u16 = { - { - let output: u16 = bevy::math::U16Vec3::element_product( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns the product of all elements of `self`.\n In other words, this computes `self.x * self.y * ..`.", - &["_self"], - ) - .register_documented( - "element_sum", - |_self: Val| { - let output: u16 = { - { - let output: u16 = bevy::math::U16Vec3::element_sum( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns the sum of all elements of `self`.\n In other words, this computes `self.x + self.y + ..`.", - &["_self"], - ) - .register_documented( - "eq", - |_self: Ref, other: Ref| { - let output: bool = { - { - let output: bool = >::eq(&_self, &other) - .into(); - output - } - }; - output - }, - "", - &["_self", "other"], - ) - .register_documented( - "extend", - |_self: Val, w: u16| { - let output: Val = { - { - let output: Val = bevy::math::U16Vec3::extend( - _self.into_inner(), - w, - ) - .into(); - output - } - }; - output - }, - " Creates a 4D vector from `self` and the given `w` value.", - &["_self", "w"], - ) - .register_documented( - "from_array", - |a: [u16; 3]| { - let output: Val = { - { - let output: Val = bevy::math::U16Vec3::from_array( - a, - ) - .into(); - output - } - }; - output - }, - " Creates a new vector from an array.", - &["a"], - ) - .register_documented( - "length_squared", - |_self: Val| { - let output: u16 = { - { - let output: u16 = bevy::math::U16Vec3::length_squared( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Computes the squared length of `self`.", - &["_self"], - ) - .register_documented( - "max", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::U16Vec3::max( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector containing the maximum values for each element of `self` and `rhs`.\n In other words this computes `[self.x.max(rhs.x), self.y.max(rhs.y), ..]`.", - &["_self", "rhs"], - ) - .register_documented( - "max_element", - |_self: Val| { - let output: u16 = { - { - let output: u16 = bevy::math::U16Vec3::max_element( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns the horizontal maximum of `self`.\n In other words this computes `max(x, y, ..)`.", - &["_self"], - ) - .register_documented( - "min", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::U16Vec3::min( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector containing the minimum values for each element of `self` and `rhs`.\n In other words this computes `[self.x.min(rhs.x), self.y.min(rhs.y), ..]`.", - &["_self", "rhs"], - ) - .register_documented( - "min_element", - |_self: Val| { - let output: u16 = { - { - let output: u16 = bevy::math::U16Vec3::min_element( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns the horizontal minimum of `self`.\n In other words this computes `min(x, y, ..)`.", - &["_self"], - ) - .register_documented( - "mul", - |_self: Val, rhs: Ref| { - let output: Val = { - { - let output: Val = >::mul(_self.into_inner(), &rhs) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "mul", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = >::mul(_self.into_inner(), rhs.into_inner()) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "mul", - |_self: Val, rhs: u16| { - let output: Val = { - { - let output: Val = >::mul(_self.into_inner(), rhs) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "new", - |x: u16, y: u16, z: u16| { - let output: Val = { - { - let output: Val = bevy::math::U16Vec3::new( - x, - y, - z, - ) - .into(); - output - } - }; - output - }, - " Creates a new vector.", - &["x", "y", "z"], - ) - .register_documented( - "rem", - |_self: Val, rhs: Ref| { - let output: Val = { - { - let output: Val = >::rem(_self.into_inner(), &rhs) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "rem", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = >::rem(_self.into_inner(), rhs.into_inner()) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "rem", - |_self: Val, rhs: u16| { - let output: Val = { - { - let output: Val = >::rem(_self.into_inner(), rhs) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "saturating_add", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::U16Vec3::saturating_add( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector containing the saturating addition of `self` and `rhs`.\n In other words this computes `[self.x.saturating_add(rhs.x), self.y.saturating_add(rhs.y), ..]`.", - &["_self", "rhs"], - ) - .register_documented( - "saturating_add_signed", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::U16Vec3::saturating_add_signed( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector containing the saturating addition of `self` and signed vector `rhs`.\n In other words this computes `[self.x.saturating_add_signed(rhs.x), self.y.saturating_add_signed(rhs.y), ..]`.", - &["_self", "rhs"], - ) - .register_documented( - "saturating_div", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::U16Vec3::saturating_div( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector containing the saturating division of `self` and `rhs`.\n In other words this computes `[self.x.saturating_div(rhs.x), self.y.saturating_div(rhs.y), ..]`.", - &["_self", "rhs"], - ) - .register_documented( - "saturating_mul", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::U16Vec3::saturating_mul( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector containing the saturating multiplication of `self` and `rhs`.\n In other words this computes `[self.x.saturating_mul(rhs.x), self.y.saturating_mul(rhs.y), ..]`.", - &["_self", "rhs"], - ) - .register_documented( - "saturating_sub", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::U16Vec3::saturating_sub( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector containing the saturating subtraction of `self` and `rhs`.\n In other words this computes `[self.x.saturating_sub(rhs.x), self.y.saturating_sub(rhs.y), ..]`.", - &["_self", "rhs"], - ) - .register_documented( - "select", - | - mask: Val, - if_true: Val, - if_false: Val| - { - let output: Val = { - { - let output: Val = bevy::math::U16Vec3::select( - mask.into_inner(), - if_true.into_inner(), - if_false.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Creates a vector from the elements in `if_true` and `if_false`, selecting which to use\n for each element of `self`.\n A true element in the mask uses the corresponding element from `if_true`, and false\n uses the element from `if_false`.", - &["mask", "if_true", "if_false"], - ) - .register_documented( - "splat", - |v: u16| { - let output: Val = { - { - let output: Val = bevy::math::U16Vec3::splat( - v, - ) - .into(); - output - } - }; - output - }, - " Creates a vector with all elements set to `v`.", - &["v"], - ) - .register_documented( - "sub", - |_self: Val, rhs: Ref| { - let output: Val = { - { - let output: Val = >::sub(_self.into_inner(), &rhs) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "sub", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = >::sub(_self.into_inner(), rhs.into_inner()) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "sub", - |_self: Val, rhs: u16| { - let output: Val = { - { - let output: Val = >::sub(_self.into_inner(), rhs) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "to_array", - |_self: Ref| { - let output: [u16; 3] = { - { - let output: [u16; 3] = bevy::math::U16Vec3::to_array(&_self) - .into(); - output - } - }; - output - }, - " `[x, y, z]`", - &["_self"], - ) - .register_documented( - "truncate", - |_self: Val| { - let output: Val = { - { - let output: Val = bevy::math::U16Vec3::truncate( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Creates a 2D vector from the `x` and `y` elements of `self`, discarding `z`.\n Truncation may also be performed by using [`self.xy()`][crate::swizzles::Vec3Swizzles::xy()].", - &["_self"], - ) - .register_documented( - "with_x", - |_self: Val, x: u16| { - let output: Val = { - { - let output: Val = bevy::math::U16Vec3::with_x( - _self.into_inner(), - x, - ) - .into(); - output - } - }; - output - }, - " Creates a 3D vector from `self` with the given value of `x`.", - &["_self", "x"], - ) - .register_documented( - "with_y", - |_self: Val, y: u16| { - let output: Val = { - { - let output: Val = bevy::math::U16Vec3::with_y( - _self.into_inner(), - y, - ) - .into(); - output - } - }; - output - }, - " Creates a 3D vector from `self` with the given value of `y`.", - &["_self", "y"], - ) - .register_documented( - "with_z", - |_self: Val, z: u16| { - let output: Val = { - { - let output: Val = bevy::math::U16Vec3::with_z( - _self.into_inner(), - z, - ) - .into(); - output - } - }; - output - }, - " Creates a 3D vector from `self` with the given value of `z`.", - &["_self", "z"], - ) - .register_documented( - "wrapping_add", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::U16Vec3::wrapping_add( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector containing the wrapping addition of `self` and `rhs`.\n In other words this computes `[self.x.wrapping_add(rhs.x), self.y.wrapping_add(rhs.y), ..]`.", - &["_self", "rhs"], - ) - .register_documented( - "wrapping_add_signed", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::U16Vec3::wrapping_add_signed( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector containing the wrapping addition of `self` and signed vector `rhs`.\n In other words this computes `[self.x.wrapping_add_signed(rhs.x), self.y.wrapping_add_signed(rhs.y), ..]`.", - &["_self", "rhs"], - ) - .register_documented( - "wrapping_div", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::U16Vec3::wrapping_div( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector containing the wrapping division of `self` and `rhs`.\n In other words this computes `[self.x.wrapping_div(rhs.x), self.y.wrapping_div(rhs.y), ..]`.", - &["_self", "rhs"], - ) - .register_documented( - "wrapping_mul", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::U16Vec3::wrapping_mul( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector containing the wrapping multiplication of `self` and `rhs`.\n In other words this computes `[self.x.wrapping_mul(rhs.x), self.y.wrapping_mul(rhs.y), ..]`.", - &["_self", "rhs"], - ) - .register_documented( - "wrapping_sub", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::U16Vec3::wrapping_sub( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector containing the wrapping subtraction of `self` and `rhs`.\n In other words this computes `[self.x.wrapping_sub(rhs.x), self.y.wrapping_sub(rhs.y), ..]`.", - &["_self", "rhs"], - ); - let registry = world - .get_resource_or_init::(); - let mut registry = registry.write(); - registry - .register_type_data::< - bevy::math::U16Vec3, - bevy_mod_scripting_core::bindings::MarkAsGenerated, - >(); - } - pub(crate) fn register_u_16_vec_4_functions(world: &mut bevy::ecs::world::World) { - bevy_mod_scripting_core::bindings::function::namespace::NamespaceBuilder::< - bevy::math::U16Vec4, - >::new(world) - .register_documented( - "add", - |_self: Val, rhs: Ref| { - let output: Val = { - { - let output: Val = >::add(_self.into_inner(), &rhs) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "add", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = >::add(_self.into_inner(), rhs.into_inner()) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "add", - |_self: Val, rhs: u16| { - let output: Val = { - { - let output: Val = >::add(_self.into_inner(), rhs) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "as_dvec4", - |_self: Ref| { - let output: Val = { - { - let output: Val = bevy::math::U16Vec4::as_dvec4( - &_self, - ) - .into(); - output - } - }; - output - }, - " Casts all elements of `self` to `f64`.", - &["_self"], - ) - .register_documented( - "as_i16vec4", - |_self: Ref| { - let output: Val = { - { - let output: Val = bevy::math::U16Vec4::as_i16vec4( - &_self, - ) - .into(); - output - } - }; - output - }, - " Casts all elements of `self` to `i16`.", - &["_self"], - ) - .register_documented( - "as_i64vec4", - |_self: Ref| { - let output: Val = { - { - let output: Val = bevy::math::U16Vec4::as_i64vec4( - &_self, - ) - .into(); - output - } - }; - output - }, - " Casts all elements of `self` to `i64`.", - &["_self"], - ) - .register_documented( - "as_i8vec4", - |_self: Ref| { - let output: Val = { - { - let output: Val = bevy::math::U16Vec4::as_i8vec4( - &_self, - ) - .into(); - output - } - }; - output - }, - " Casts all elements of `self` to `i8`.", - &["_self"], - ) - .register_documented( - "as_ivec4", - |_self: Ref| { - let output: Val = { - { - let output: Val = bevy::math::U16Vec4::as_ivec4( - &_self, - ) - .into(); - output - } - }; - output - }, - " Casts all elements of `self` to `i32`.", - &["_self"], - ) - .register_documented( - "as_u64vec4", - |_self: Ref| { - let output: Val = { - { - let output: Val = bevy::math::U16Vec4::as_u64vec4( - &_self, - ) - .into(); - output - } - }; - output - }, - " Casts all elements of `self` to `u64`.", - &["_self"], - ) - .register_documented( - "as_u8vec4", - |_self: Ref| { - let output: Val = { - { - let output: Val = bevy::math::U16Vec4::as_u8vec4( - &_self, - ) - .into(); - output - } - }; - output - }, - " Casts all elements of `self` to `u8`.", - &["_self"], - ) - .register_documented( - "as_uvec4", - |_self: Ref| { - let output: Val = { - { - let output: Val = bevy::math::U16Vec4::as_uvec4( - &_self, - ) - .into(); - output - } - }; - output - }, - " Casts all elements of `self` to `u32`.", - &["_self"], - ) - .register_documented( - "as_vec4", - |_self: Ref| { - let output: Val = { - { - let output: Val = bevy::math::U16Vec4::as_vec4( - &_self, - ) - .into(); - output - } - }; - output - }, - " Casts all elements of `self` to `f32`.", - &["_self"], - ) - .register_documented( - "assert_receiver_is_total_eq", - |_self: Ref| { - let output: () = { - { - let output: () = ::assert_receiver_is_total_eq( - &_self, - ) - .into(); - output - } - }; - output - }, - "", - &["_self"], - ) - .register_documented( - "clamp", - | - _self: Val, - min: Val, - max: Val| - { - let output: Val = { - { - let output: Val = bevy::math::U16Vec4::clamp( - _self.into_inner(), - min.into_inner(), - max.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Component-wise clamping of values, similar to [`u16::clamp`].\n Each element in `min` must be less-or-equal to the corresponding element in `max`.\n # Panics\n Will panic if `min` is greater than `max` when `glam_assert` is enabled.", - &["_self", "min", "max"], - ) - .register_documented( - "clone", - |_self: Ref| { - let output: Val = { - { - let output: Val = ::clone( - &_self, - ) - .into(); - output - } - }; - output - }, - "", - &["_self"], - ) - .register_documented( - "cmpeq", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::U16Vec4::cmpeq( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector mask containing the result of a `==` comparison for each element of\n `self` and `rhs`.\n In other words, this computes `[self.x == rhs.x, self.y == rhs.y, ..]` for all\n elements.", - &["_self", "rhs"], - ) - .register_documented( - "cmpge", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::U16Vec4::cmpge( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector mask containing the result of a `>=` comparison for each element of\n `self` and `rhs`.\n In other words this computes `[self.x >= rhs.x, self.y >= rhs.y, ..]` for all\n elements.", - &["_self", "rhs"], - ) - .register_documented( - "cmpgt", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::U16Vec4::cmpgt( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector mask containing the result of a `>` comparison for each element of\n `self` and `rhs`.\n In other words this computes `[self.x > rhs.x, self.y > rhs.y, ..]` for all\n elements.", - &["_self", "rhs"], - ) - .register_documented( - "cmple", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::U16Vec4::cmple( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector mask containing the result of a `<=` comparison for each element of\n `self` and `rhs`.\n In other words this computes `[self.x <= rhs.x, self.y <= rhs.y, ..]` for all\n elements.", - &["_self", "rhs"], - ) - .register_documented( - "cmplt", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::U16Vec4::cmplt( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector mask containing the result of a `<` comparison for each element of\n `self` and `rhs`.\n In other words this computes `[self.x < rhs.x, self.y < rhs.y, ..]` for all\n elements.", - &["_self", "rhs"], - ) - .register_documented( - "cmpne", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::U16Vec4::cmpne( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector mask containing the result of a `!=` comparison for each element of\n `self` and `rhs`.\n In other words this computes `[self.x != rhs.x, self.y != rhs.y, ..]` for all\n elements.", - &["_self", "rhs"], - ) - .register_documented( - "div", - |_self: Val, rhs: Ref| { - let output: Val = { - { - let output: Val = >::div(_self.into_inner(), &rhs) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "div", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = >::div(_self.into_inner(), rhs.into_inner()) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "div", - |_self: Val, rhs: u16| { - let output: Val = { - { - let output: Val = >::div(_self.into_inner(), rhs) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "dot", - |_self: Val, rhs: Val| { - let output: u16 = { - { - let output: u16 = bevy::math::U16Vec4::dot( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Computes the dot product of `self` and `rhs`.", - &["_self", "rhs"], - ) - .register_documented( - "dot_into_vec", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::U16Vec4::dot_into_vec( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector where every component is the dot product of `self` and `rhs`.", - &["_self", "rhs"], - ) - .register_documented( - "element_product", - |_self: Val| { - let output: u16 = { - { - let output: u16 = bevy::math::U16Vec4::element_product( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns the product of all elements of `self`.\n In other words, this computes `self.x * self.y * ..`.", - &["_self"], - ) - .register_documented( - "element_sum", - |_self: Val| { - let output: u16 = { - { - let output: u16 = bevy::math::U16Vec4::element_sum( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns the sum of all elements of `self`.\n In other words, this computes `self.x + self.y + ..`.", - &["_self"], - ) - .register_documented( - "eq", - |_self: Ref, other: Ref| { - let output: bool = { - { - let output: bool = >::eq(&_self, &other) - .into(); - output - } - }; - output - }, - "", - &["_self", "other"], - ) - .register_documented( - "from_array", - |a: [u16; 4]| { - let output: Val = { - { - let output: Val = bevy::math::U16Vec4::from_array( - a, - ) - .into(); - output - } - }; - output - }, - " Creates a new vector from an array.", - &["a"], - ) - .register_documented( - "length_squared", - |_self: Val| { - let output: u16 = { - { - let output: u16 = bevy::math::U16Vec4::length_squared( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Computes the squared length of `self`.", - &["_self"], - ) - .register_documented( - "max", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::U16Vec4::max( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector containing the maximum values for each element of `self` and `rhs`.\n In other words this computes `[self.x.max(rhs.x), self.y.max(rhs.y), ..]`.", - &["_self", "rhs"], - ) - .register_documented( - "max_element", - |_self: Val| { - let output: u16 = { - { - let output: u16 = bevy::math::U16Vec4::max_element( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns the horizontal maximum of `self`.\n In other words this computes `max(x, y, ..)`.", - &["_self"], - ) - .register_documented( - "min", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::U16Vec4::min( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector containing the minimum values for each element of `self` and `rhs`.\n In other words this computes `[self.x.min(rhs.x), self.y.min(rhs.y), ..]`.", - &["_self", "rhs"], - ) - .register_documented( - "min_element", - |_self: Val| { - let output: u16 = { - { - let output: u16 = bevy::math::U16Vec4::min_element( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns the horizontal minimum of `self`.\n In other words this computes `min(x, y, ..)`.", - &["_self"], - ) - .register_documented( - "mul", - |_self: Val, rhs: Ref| { - let output: Val = { - { - let output: Val = >::mul(_self.into_inner(), &rhs) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "mul", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = >::mul(_self.into_inner(), rhs.into_inner()) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "mul", - |_self: Val, rhs: u16| { - let output: Val = { - { - let output: Val = >::mul(_self.into_inner(), rhs) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "new", - |x: u16, y: u16, z: u16, w: u16| { - let output: Val = { - { - let output: Val = bevy::math::U16Vec4::new( - x, - y, - z, - w, - ) - .into(); - output - } - }; - output - }, - " Creates a new vector.", - &["x", "y", "z", "w"], - ) - .register_documented( - "rem", - |_self: Val, rhs: Ref| { - let output: Val = { - { - let output: Val = >::rem(_self.into_inner(), &rhs) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "rem", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = >::rem(_self.into_inner(), rhs.into_inner()) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "rem", - |_self: Val, rhs: u16| { - let output: Val = { - { - let output: Val = >::rem(_self.into_inner(), rhs) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "saturating_add", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::U16Vec4::saturating_add( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector containing the saturating addition of `self` and `rhs`.\n In other words this computes `[self.x.saturating_add(rhs.x), self.y.saturating_add(rhs.y), ..]`.", - &["_self", "rhs"], - ) - .register_documented( - "saturating_add_signed", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::U16Vec4::saturating_add_signed( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector containing the saturating addition of `self` and signed vector `rhs`.\n In other words this computes `[self.x.saturating_add_signed(rhs.x), self.y.saturating_add_signed(rhs.y), ..]`.", - &["_self", "rhs"], - ) - .register_documented( - "saturating_div", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::U16Vec4::saturating_div( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector containing the saturating division of `self` and `rhs`.\n In other words this computes `[self.x.saturating_div(rhs.x), self.y.saturating_div(rhs.y), ..]`.", - &["_self", "rhs"], - ) - .register_documented( - "saturating_mul", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::U16Vec4::saturating_mul( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector containing the saturating multiplication of `self` and `rhs`.\n In other words this computes `[self.x.saturating_mul(rhs.x), self.y.saturating_mul(rhs.y), ..]`.", - &["_self", "rhs"], - ) - .register_documented( - "saturating_sub", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::U16Vec4::saturating_sub( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector containing the saturating subtraction of `self` and `rhs`.\n In other words this computes `[self.x.saturating_sub(rhs.x), self.y.saturating_sub(rhs.y), ..]`.", - &["_self", "rhs"], - ) - .register_documented( - "select", - | - mask: Val, - if_true: Val, - if_false: Val| - { - let output: Val = { - { - let output: Val = bevy::math::U16Vec4::select( - mask.into_inner(), - if_true.into_inner(), - if_false.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Creates a vector from the elements in `if_true` and `if_false`, selecting which to use\n for each element of `self`.\n A true element in the mask uses the corresponding element from `if_true`, and false\n uses the element from `if_false`.", - &["mask", "if_true", "if_false"], - ) - .register_documented( - "splat", - |v: u16| { - let output: Val = { - { - let output: Val = bevy::math::U16Vec4::splat( - v, - ) - .into(); - output - } - }; - output - }, - " Creates a vector with all elements set to `v`.", - &["v"], - ) - .register_documented( - "sub", - |_self: Val, rhs: Ref| { - let output: Val = { - { - let output: Val = >::sub(_self.into_inner(), &rhs) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "sub", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = >::sub(_self.into_inner(), rhs.into_inner()) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "sub", - |_self: Val, rhs: u16| { - let output: Val = { - { - let output: Val = >::sub(_self.into_inner(), rhs) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "to_array", - |_self: Ref| { - let output: [u16; 4] = { - { - let output: [u16; 4] = bevy::math::U16Vec4::to_array(&_self) - .into(); - output - } - }; - output - }, - " `[x, y, z, w]`", - &["_self"], - ) - .register_documented( - "truncate", - |_self: Val| { - let output: Val = { - { - let output: Val = bevy::math::U16Vec4::truncate( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Creates a 3D vector from the `x`, `y` and `z` elements of `self`, discarding `w`.\n Truncation to [`U16Vec3`] may also be performed by using [`self.xyz()`][crate::swizzles::Vec4Swizzles::xyz()].", - &["_self"], - ) - .register_documented( - "with_w", - |_self: Val, w: u16| { - let output: Val = { - { - let output: Val = bevy::math::U16Vec4::with_w( - _self.into_inner(), - w, - ) - .into(); - output - } - }; - output - }, - " Creates a 4D vector from `self` with the given value of `w`.", - &["_self", "w"], - ) - .register_documented( - "with_x", - |_self: Val, x: u16| { - let output: Val = { - { - let output: Val = bevy::math::U16Vec4::with_x( - _self.into_inner(), - x, - ) - .into(); - output - } - }; - output - }, - " Creates a 4D vector from `self` with the given value of `x`.", - &["_self", "x"], - ) - .register_documented( - "with_y", - |_self: Val, y: u16| { - let output: Val = { - { - let output: Val = bevy::math::U16Vec4::with_y( - _self.into_inner(), - y, - ) - .into(); - output - } - }; - output - }, - " Creates a 4D vector from `self` with the given value of `y`.", - &["_self", "y"], - ) - .register_documented( - "with_z", - |_self: Val, z: u16| { - let output: Val = { - { - let output: Val = bevy::math::U16Vec4::with_z( - _self.into_inner(), - z, - ) - .into(); - output - } - }; - output - }, - " Creates a 4D vector from `self` with the given value of `z`.", - &["_self", "z"], - ) - .register_documented( - "wrapping_add", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::U16Vec4::wrapping_add( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector containing the wrapping addition of `self` and `rhs`.\n In other words this computes `[self.x.wrapping_add(rhs.x), self.y.wrapping_add(rhs.y), ..]`.", - &["_self", "rhs"], - ) - .register_documented( - "wrapping_add_signed", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::U16Vec4::wrapping_add_signed( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector containing the wrapping addition of `self` and signed vector `rhs`.\n In other words this computes `[self.x.wrapping_add_signed(rhs.x), self.y.wrapping_add_signed(rhs.y), ..]`.", - &["_self", "rhs"], - ) - .register_documented( - "wrapping_div", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::U16Vec4::wrapping_div( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector containing the wrapping division of `self` and `rhs`.\n In other words this computes `[self.x.wrapping_div(rhs.x), self.y.wrapping_div(rhs.y), ..]`.", - &["_self", "rhs"], - ) - .register_documented( - "wrapping_mul", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::U16Vec4::wrapping_mul( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector containing the wrapping multiplication of `self` and `rhs`.\n In other words this computes `[self.x.wrapping_mul(rhs.x), self.y.wrapping_mul(rhs.y), ..]`.", - &["_self", "rhs"], - ) - .register_documented( - "wrapping_sub", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::U16Vec4::wrapping_sub( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector containing the wrapping subtraction of `self` and `rhs`.\n In other words this computes `[self.x.wrapping_sub(rhs.x), self.y.wrapping_sub(rhs.y), ..]`.", - &["_self", "rhs"], - ); - let registry = world - .get_resource_or_init::(); - let mut registry = registry.write(); - registry - .register_type_data::< - bevy::math::U16Vec4, - bevy_mod_scripting_core::bindings::MarkAsGenerated, - >(); - } - pub(crate) fn register_u_64_vec_2_functions(world: &mut bevy::ecs::world::World) { - bevy_mod_scripting_core::bindings::function::namespace::NamespaceBuilder::< - bevy::math::U64Vec2, - >::new(world) - .register_documented( - "add", - |_self: Val, rhs: Ref| { - let output: Val = { - { - let output: Val = >::add(_self.into_inner(), &rhs) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "add", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = >::add(_self.into_inner(), rhs.into_inner()) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "add", - |_self: Val, rhs: u64| { - let output: Val = { - { - let output: Val = >::add(_self.into_inner(), rhs) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "as_dvec2", - |_self: Ref| { - let output: Val = { - { - let output: Val = bevy::math::U64Vec2::as_dvec2( - &_self, - ) - .into(); - output - } - }; - output - }, - " Casts all elements of `self` to `f64`.", - &["_self"], - ) - .register_documented( - "as_i16vec2", - |_self: Ref| { - let output: Val = { - { - let output: Val = bevy::math::U64Vec2::as_i16vec2( - &_self, - ) - .into(); - output - } - }; - output - }, - " Casts all elements of `self` to `i16`.", - &["_self"], - ) - .register_documented( - "as_i64vec2", - |_self: Ref| { - let output: Val = { - { - let output: Val = bevy::math::U64Vec2::as_i64vec2( - &_self, - ) - .into(); - output - } - }; - output - }, - " Casts all elements of `self` to `i64`.", - &["_self"], - ) - .register_documented( - "as_i8vec2", - |_self: Ref| { - let output: Val = { - { - let output: Val = bevy::math::U64Vec2::as_i8vec2( - &_self, - ) - .into(); - output - } - }; - output - }, - " Casts all elements of `self` to `i8`.", - &["_self"], - ) - .register_documented( - "as_ivec2", - |_self: Ref| { - let output: Val = { - { - let output: Val = bevy::math::U64Vec2::as_ivec2( - &_self, - ) - .into(); - output - } - }; - output - }, - " Casts all elements of `self` to `i32`.", - &["_self"], - ) - .register_documented( - "as_u16vec2", - |_self: Ref| { - let output: Val = { - { - let output: Val = bevy::math::U64Vec2::as_u16vec2( - &_self, - ) - .into(); - output - } - }; - output - }, - " Casts all elements of `self` to `u16`.", - &["_self"], - ) - .register_documented( - "as_u8vec2", - |_self: Ref| { - let output: Val = { - { - let output: Val = bevy::math::U64Vec2::as_u8vec2( - &_self, - ) - .into(); - output - } - }; - output - }, - " Casts all elements of `self` to `u8`.", - &["_self"], - ) - .register_documented( - "as_uvec2", - |_self: Ref| { - let output: Val = { - { - let output: Val = bevy::math::U64Vec2::as_uvec2( - &_self, - ) - .into(); - output - } - }; - output - }, - " Casts all elements of `self` to `u32`.", - &["_self"], - ) - .register_documented( - "as_vec2", - |_self: Ref| { - let output: Val = { - { - let output: Val = bevy::math::U64Vec2::as_vec2( - &_self, - ) - .into(); - output - } - }; - output - }, - " Casts all elements of `self` to `f32`.", - &["_self"], - ) - .register_documented( - "assert_receiver_is_total_eq", - |_self: Ref| { - let output: () = { - { - let output: () = ::assert_receiver_is_total_eq( - &_self, - ) - .into(); - output - } - }; - output - }, - "", - &["_self"], - ) - .register_documented( - "clamp", - | - _self: Val, - min: Val, - max: Val| - { - let output: Val = { - { - let output: Val = bevy::math::U64Vec2::clamp( - _self.into_inner(), - min.into_inner(), - max.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Component-wise clamping of values, similar to [`u64::clamp`].\n Each element in `min` must be less-or-equal to the corresponding element in `max`.\n # Panics\n Will panic if `min` is greater than `max` when `glam_assert` is enabled.", - &["_self", "min", "max"], - ) - .register_documented( - "clone", - |_self: Ref| { - let output: Val = { - { - let output: Val = ::clone( - &_self, - ) - .into(); - output - } - }; - output - }, - "", - &["_self"], - ) - .register_documented( - "cmpeq", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::U64Vec2::cmpeq( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector mask containing the result of a `==` comparison for each element of\n `self` and `rhs`.\n In other words, this computes `[self.x == rhs.x, self.y == rhs.y, ..]` for all\n elements.", - &["_self", "rhs"], - ) - .register_documented( - "cmpge", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::U64Vec2::cmpge( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector mask containing the result of a `>=` comparison for each element of\n `self` and `rhs`.\n In other words this computes `[self.x >= rhs.x, self.y >= rhs.y, ..]` for all\n elements.", - &["_self", "rhs"], - ) - .register_documented( - "cmpgt", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::U64Vec2::cmpgt( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector mask containing the result of a `>` comparison for each element of\n `self` and `rhs`.\n In other words this computes `[self.x > rhs.x, self.y > rhs.y, ..]` for all\n elements.", - &["_self", "rhs"], - ) - .register_documented( - "cmple", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::U64Vec2::cmple( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector mask containing the result of a `<=` comparison for each element of\n `self` and `rhs`.\n In other words this computes `[self.x <= rhs.x, self.y <= rhs.y, ..]` for all\n elements.", - &["_self", "rhs"], - ) - .register_documented( - "cmplt", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::U64Vec2::cmplt( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector mask containing the result of a `<` comparison for each element of\n `self` and `rhs`.\n In other words this computes `[self.x < rhs.x, self.y < rhs.y, ..]` for all\n elements.", - &["_self", "rhs"], - ) - .register_documented( - "cmpne", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::U64Vec2::cmpne( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector mask containing the result of a `!=` comparison for each element of\n `self` and `rhs`.\n In other words this computes `[self.x != rhs.x, self.y != rhs.y, ..]` for all\n elements.", - &["_self", "rhs"], - ) - .register_documented( - "div", - |_self: Val, rhs: Ref| { - let output: Val = { - { - let output: Val = >::div(_self.into_inner(), &rhs) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "div", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = >::div(_self.into_inner(), rhs.into_inner()) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "div", - |_self: Val, rhs: u64| { - let output: Val = { - { - let output: Val = >::div(_self.into_inner(), rhs) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "dot", - |_self: Val, rhs: Val| { - let output: u64 = { - { - let output: u64 = bevy::math::U64Vec2::dot( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Computes the dot product of `self` and `rhs`.", - &["_self", "rhs"], - ) - .register_documented( - "dot_into_vec", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::U64Vec2::dot_into_vec( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector where every component is the dot product of `self` and `rhs`.", - &["_self", "rhs"], - ) - .register_documented( - "element_product", - |_self: Val| { - let output: u64 = { - { - let output: u64 = bevy::math::U64Vec2::element_product( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns the product of all elements of `self`.\n In other words, this computes `self.x * self.y * ..`.", - &["_self"], - ) - .register_documented( - "element_sum", - |_self: Val| { - let output: u64 = { - { - let output: u64 = bevy::math::U64Vec2::element_sum( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns the sum of all elements of `self`.\n In other words, this computes `self.x + self.y + ..`.", - &["_self"], - ) - .register_documented( - "eq", - |_self: Ref, other: Ref| { - let output: bool = { - { - let output: bool = >::eq(&_self, &other) - .into(); - output - } - }; - output - }, - "", - &["_self", "other"], - ) - .register_documented( - "extend", - |_self: Val, z: u64| { - let output: Val = { - { - let output: Val = bevy::math::U64Vec2::extend( - _self.into_inner(), - z, - ) - .into(); - output - } - }; - output - }, - " Creates a 3D vector from `self` and the given `z` value.", - &["_self", "z"], - ) - .register_documented( - "from_array", - |a: [u64; 2]| { - let output: Val = { - { - let output: Val = bevy::math::U64Vec2::from_array( - a, - ) - .into(); - output - } - }; - output - }, - " Creates a new vector from an array.", - &["a"], - ) - .register_documented( - "length_squared", - |_self: Val| { - let output: u64 = { - { - let output: u64 = bevy::math::U64Vec2::length_squared( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Computes the squared length of `self`.", - &["_self"], - ) - .register_documented( - "max", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::U64Vec2::max( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector containing the maximum values for each element of `self` and `rhs`.\n In other words this computes `[self.x.max(rhs.x), self.y.max(rhs.y), ..]`.", - &["_self", "rhs"], - ) - .register_documented( - "max_element", - |_self: Val| { - let output: u64 = { - { - let output: u64 = bevy::math::U64Vec2::max_element( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns the horizontal maximum of `self`.\n In other words this computes `max(x, y, ..)`.", - &["_self"], - ) - .register_documented( - "min", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::U64Vec2::min( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector containing the minimum values for each element of `self` and `rhs`.\n In other words this computes `[self.x.min(rhs.x), self.y.min(rhs.y), ..]`.", - &["_self", "rhs"], - ) - .register_documented( - "min_element", - |_self: Val| { - let output: u64 = { - { - let output: u64 = bevy::math::U64Vec2::min_element( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns the horizontal minimum of `self`.\n In other words this computes `min(x, y, ..)`.", - &["_self"], - ) - .register_documented( - "mul", - |_self: Val, rhs: Ref| { - let output: Val = { - { - let output: Val = >::mul(_self.into_inner(), &rhs) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "mul", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = >::mul(_self.into_inner(), rhs.into_inner()) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "mul", - |_self: Val, rhs: u64| { - let output: Val = { - { - let output: Val = >::mul(_self.into_inner(), rhs) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "new", - |x: u64, y: u64| { - let output: Val = { - { - let output: Val = bevy::math::U64Vec2::new( - x, - y, - ) - .into(); - output - } - }; - output - }, - " Creates a new vector.", - &["x", "y"], - ) - .register_documented( - "rem", - |_self: Val, rhs: Ref| { - let output: Val = { - { - let output: Val = >::rem(_self.into_inner(), &rhs) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "rem", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = >::rem(_self.into_inner(), rhs.into_inner()) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "rem", - |_self: Val, rhs: u64| { - let output: Val = { - { - let output: Val = >::rem(_self.into_inner(), rhs) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "saturating_add", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::U64Vec2::saturating_add( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector containing the saturating addition of `self` and `rhs`.\n In other words this computes `[self.x.saturating_add(rhs.x), self.y.saturating_add(rhs.y), ..]`.", - &["_self", "rhs"], - ) - .register_documented( - "saturating_add_signed", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::U64Vec2::saturating_add_signed( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector containing the saturating addition of `self` and signed vector `rhs`.\n In other words this computes `[self.x.saturating_add_signed(rhs.x), self.y.saturating_add_signed(rhs.y), ..]`.", - &["_self", "rhs"], - ) - .register_documented( - "saturating_div", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::U64Vec2::saturating_div( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector containing the saturating division of `self` and `rhs`.\n In other words this computes `[self.x.saturating_div(rhs.x), self.y.saturating_div(rhs.y), ..]`.", - &["_self", "rhs"], - ) - .register_documented( - "saturating_mul", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::U64Vec2::saturating_mul( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector containing the saturating multiplication of `self` and `rhs`.\n In other words this computes `[self.x.saturating_mul(rhs.x), self.y.saturating_mul(rhs.y), ..]`.", - &["_self", "rhs"], - ) - .register_documented( - "saturating_sub", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::U64Vec2::saturating_sub( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector containing the saturating subtraction of `self` and `rhs`.\n In other words this computes `[self.x.saturating_sub(rhs.x), self.y.saturating_sub(rhs.y), ..]`.", - &["_self", "rhs"], - ) - .register_documented( - "select", - | - mask: Val, - if_true: Val, - if_false: Val| - { - let output: Val = { - { - let output: Val = bevy::math::U64Vec2::select( - mask.into_inner(), - if_true.into_inner(), - if_false.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Creates a vector from the elements in `if_true` and `if_false`, selecting which to use\n for each element of `self`.\n A true element in the mask uses the corresponding element from `if_true`, and false\n uses the element from `if_false`.", - &["mask", "if_true", "if_false"], - ) - .register_documented( - "splat", - |v: u64| { - let output: Val = { - { - let output: Val = bevy::math::U64Vec2::splat( - v, - ) - .into(); - output - } - }; - output - }, - " Creates a vector with all elements set to `v`.", - &["v"], - ) - .register_documented( - "sub", - |_self: Val, rhs: Ref| { - let output: Val = { - { - let output: Val = >::sub(_self.into_inner(), &rhs) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "sub", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = >::sub(_self.into_inner(), rhs.into_inner()) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "sub", - |_self: Val, rhs: u64| { - let output: Val = { - { - let output: Val = >::sub(_self.into_inner(), rhs) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "to_array", - |_self: Ref| { - let output: [u64; 2] = { - { - let output: [u64; 2] = bevy::math::U64Vec2::to_array(&_self) - .into(); - output - } - }; - output - }, - " `[x, y]`", - &["_self"], - ) - .register_documented( - "with_x", - |_self: Val, x: u64| { - let output: Val = { - { - let output: Val = bevy::math::U64Vec2::with_x( - _self.into_inner(), - x, - ) - .into(); - output - } - }; - output - }, - " Creates a 2D vector from `self` with the given value of `x`.", - &["_self", "x"], - ) - .register_documented( - "with_y", - |_self: Val, y: u64| { - let output: Val = { - { - let output: Val = bevy::math::U64Vec2::with_y( - _self.into_inner(), - y, - ) - .into(); - output - } - }; - output - }, - " Creates a 2D vector from `self` with the given value of `y`.", - &["_self", "y"], - ) - .register_documented( - "wrapping_add", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::U64Vec2::wrapping_add( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector containing the wrapping addition of `self` and `rhs`.\n In other words this computes `[self.x.wrapping_add(rhs.x), self.y.wrapping_add(rhs.y), ..]`.", - &["_self", "rhs"], - ) - .register_documented( - "wrapping_add_signed", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::U64Vec2::wrapping_add_signed( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector containing the wrapping addition of `self` and signed vector `rhs`.\n In other words this computes `[self.x.wrapping_add_signed(rhs.x), self.y.wrapping_add_signed(rhs.y), ..]`.", - &["_self", "rhs"], - ) - .register_documented( - "wrapping_div", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::U64Vec2::wrapping_div( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector containing the wrapping division of `self` and `rhs`.\n In other words this computes `[self.x.wrapping_div(rhs.x), self.y.wrapping_div(rhs.y), ..]`.", - &["_self", "rhs"], - ) - .register_documented( - "wrapping_mul", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::U64Vec2::wrapping_mul( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector containing the wrapping multiplication of `self` and `rhs`.\n In other words this computes `[self.x.wrapping_mul(rhs.x), self.y.wrapping_mul(rhs.y), ..]`.", - &["_self", "rhs"], - ) - .register_documented( - "wrapping_sub", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::U64Vec2::wrapping_sub( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector containing the wrapping subtraction of `self` and `rhs`.\n In other words this computes `[self.x.wrapping_sub(rhs.x), self.y.wrapping_sub(rhs.y), ..]`.", - &["_self", "rhs"], - ); - let registry = world - .get_resource_or_init::(); - let mut registry = registry.write(); - registry - .register_type_data::< - bevy::math::U64Vec2, - bevy_mod_scripting_core::bindings::MarkAsGenerated, - >(); - } - pub(crate) fn register_u_64_vec_3_functions(world: &mut bevy::ecs::world::World) { - bevy_mod_scripting_core::bindings::function::namespace::NamespaceBuilder::< - bevy::math::U64Vec3, - >::new(world) - .register_documented( - "add", - |_self: Val, rhs: Ref| { - let output: Val = { - { - let output: Val = >::add(_self.into_inner(), &rhs) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "add", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = >::add(_self.into_inner(), rhs.into_inner()) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "add", - |_self: Val, rhs: u64| { - let output: Val = { - { - let output: Val = >::add(_self.into_inner(), rhs) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "as_dvec3", - |_self: Ref| { - let output: Val = { - { - let output: Val = bevy::math::U64Vec3::as_dvec3( - &_self, - ) - .into(); - output - } - }; - output - }, - " Casts all elements of `self` to `f64`.", - &["_self"], - ) - .register_documented( - "as_i16vec3", - |_self: Ref| { - let output: Val = { - { - let output: Val = bevy::math::U64Vec3::as_i16vec3( - &_self, - ) - .into(); - output - } - }; - output - }, - " Casts all elements of `self` to `i16`.", - &["_self"], - ) - .register_documented( - "as_i64vec3", - |_self: Ref| { - let output: Val = { - { - let output: Val = bevy::math::U64Vec3::as_i64vec3( - &_self, - ) - .into(); - output - } - }; - output - }, - " Casts all elements of `self` to `i64`.", - &["_self"], - ) - .register_documented( - "as_i8vec3", - |_self: Ref| { - let output: Val = { - { - let output: Val = bevy::math::U64Vec3::as_i8vec3( - &_self, - ) - .into(); - output - } - }; - output - }, - " Casts all elements of `self` to `i8`.", - &["_self"], - ) - .register_documented( - "as_ivec3", - |_self: Ref| { - let output: Val = { - { - let output: Val = bevy::math::U64Vec3::as_ivec3( - &_self, - ) - .into(); - output - } - }; - output - }, - " Casts all elements of `self` to `i32`.", - &["_self"], - ) - .register_documented( - "as_u16vec3", - |_self: Ref| { - let output: Val = { - { - let output: Val = bevy::math::U64Vec3::as_u16vec3( - &_self, - ) - .into(); - output - } - }; - output - }, - " Casts all elements of `self` to `u16`.", - &["_self"], - ) - .register_documented( - "as_u8vec3", - |_self: Ref| { - let output: Val = { - { - let output: Val = bevy::math::U64Vec3::as_u8vec3( - &_self, - ) - .into(); - output - } - }; - output - }, - " Casts all elements of `self` to `u8`.", - &["_self"], - ) - .register_documented( - "as_uvec3", - |_self: Ref| { - let output: Val = { - { - let output: Val = bevy::math::U64Vec3::as_uvec3( - &_self, - ) - .into(); - output - } - }; - output - }, - " Casts all elements of `self` to `u32`.", - &["_self"], - ) - .register_documented( - "as_vec3", - |_self: Ref| { - let output: Val = { - { - let output: Val = bevy::math::U64Vec3::as_vec3( - &_self, - ) - .into(); - output - } - }; - output - }, - " Casts all elements of `self` to `f32`.", - &["_self"], - ) - .register_documented( - "as_vec3a", - |_self: Ref| { - let output: Val = { - { - let output: Val = bevy::math::U64Vec3::as_vec3a( - &_self, - ) - .into(); - output - } - }; - output - }, - " Casts all elements of `self` to `f32`.", - &["_self"], - ) - .register_documented( - "assert_receiver_is_total_eq", - |_self: Ref| { - let output: () = { - { - let output: () = ::assert_receiver_is_total_eq( - &_self, - ) - .into(); - output - } - }; - output - }, - "", - &["_self"], - ) - .register_documented( - "clamp", - | - _self: Val, - min: Val, - max: Val| - { - let output: Val = { - { - let output: Val = bevy::math::U64Vec3::clamp( - _self.into_inner(), - min.into_inner(), - max.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Component-wise clamping of values, similar to [`u64::clamp`].\n Each element in `min` must be less-or-equal to the corresponding element in `max`.\n # Panics\n Will panic if `min` is greater than `max` when `glam_assert` is enabled.", - &["_self", "min", "max"], - ) - .register_documented( - "clone", - |_self: Ref| { - let output: Val = { - { - let output: Val = ::clone( - &_self, - ) - .into(); - output - } - }; - output - }, - "", - &["_self"], - ) - .register_documented( - "cmpeq", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::U64Vec3::cmpeq( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector mask containing the result of a `==` comparison for each element of\n `self` and `rhs`.\n In other words, this computes `[self.x == rhs.x, self.y == rhs.y, ..]` for all\n elements.", - &["_self", "rhs"], - ) - .register_documented( - "cmpge", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::U64Vec3::cmpge( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector mask containing the result of a `>=` comparison for each element of\n `self` and `rhs`.\n In other words this computes `[self.x >= rhs.x, self.y >= rhs.y, ..]` for all\n elements.", - &["_self", "rhs"], - ) - .register_documented( - "cmpgt", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::U64Vec3::cmpgt( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector mask containing the result of a `>` comparison for each element of\n `self` and `rhs`.\n In other words this computes `[self.x > rhs.x, self.y > rhs.y, ..]` for all\n elements.", - &["_self", "rhs"], - ) - .register_documented( - "cmple", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::U64Vec3::cmple( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector mask containing the result of a `<=` comparison for each element of\n `self` and `rhs`.\n In other words this computes `[self.x <= rhs.x, self.y <= rhs.y, ..]` for all\n elements.", - &["_self", "rhs"], - ) - .register_documented( - "cmplt", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::U64Vec3::cmplt( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector mask containing the result of a `<` comparison for each element of\n `self` and `rhs`.\n In other words this computes `[self.x < rhs.x, self.y < rhs.y, ..]` for all\n elements.", - &["_self", "rhs"], - ) - .register_documented( - "cmpne", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::U64Vec3::cmpne( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector mask containing the result of a `!=` comparison for each element of\n `self` and `rhs`.\n In other words this computes `[self.x != rhs.x, self.y != rhs.y, ..]` for all\n elements.", - &["_self", "rhs"], - ) - .register_documented( - "cross", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::U64Vec3::cross( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Computes the cross product of `self` and `rhs`.", - &["_self", "rhs"], - ) - .register_documented( - "div", - |_self: Val, rhs: Ref| { - let output: Val = { - { - let output: Val = >::div(_self.into_inner(), &rhs) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "div", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = >::div(_self.into_inner(), rhs.into_inner()) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "div", - |_self: Val, rhs: u64| { - let output: Val = { - { - let output: Val = >::div(_self.into_inner(), rhs) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "dot", - |_self: Val, rhs: Val| { - let output: u64 = { - { - let output: u64 = bevy::math::U64Vec3::dot( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Computes the dot product of `self` and `rhs`.", - &["_self", "rhs"], - ) - .register_documented( - "dot_into_vec", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::U64Vec3::dot_into_vec( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector where every component is the dot product of `self` and `rhs`.", - &["_self", "rhs"], - ) - .register_documented( - "element_product", - |_self: Val| { - let output: u64 = { - { - let output: u64 = bevy::math::U64Vec3::element_product( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns the product of all elements of `self`.\n In other words, this computes `self.x * self.y * ..`.", - &["_self"], - ) - .register_documented( - "element_sum", - |_self: Val| { - let output: u64 = { - { - let output: u64 = bevy::math::U64Vec3::element_sum( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns the sum of all elements of `self`.\n In other words, this computes `self.x + self.y + ..`.", - &["_self"], - ) - .register_documented( - "eq", - |_self: Ref, other: Ref| { - let output: bool = { - { - let output: bool = >::eq(&_self, &other) - .into(); - output - } - }; - output - }, - "", - &["_self", "other"], - ) - .register_documented( - "extend", - |_self: Val, w: u64| { - let output: Val = { - { - let output: Val = bevy::math::U64Vec3::extend( - _self.into_inner(), - w, - ) - .into(); - output - } - }; - output - }, - " Creates a 4D vector from `self` and the given `w` value.", - &["_self", "w"], - ) - .register_documented( - "from_array", - |a: [u64; 3]| { - let output: Val = { - { - let output: Val = bevy::math::U64Vec3::from_array( - a, - ) - .into(); - output - } - }; - output - }, - " Creates a new vector from an array.", - &["a"], - ) - .register_documented( - "length_squared", - |_self: Val| { - let output: u64 = { - { - let output: u64 = bevy::math::U64Vec3::length_squared( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Computes the squared length of `self`.", - &["_self"], - ) - .register_documented( - "max", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::U64Vec3::max( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector containing the maximum values for each element of `self` and `rhs`.\n In other words this computes `[self.x.max(rhs.x), self.y.max(rhs.y), ..]`.", - &["_self", "rhs"], - ) - .register_documented( - "max_element", - |_self: Val| { - let output: u64 = { - { - let output: u64 = bevy::math::U64Vec3::max_element( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns the horizontal maximum of `self`.\n In other words this computes `max(x, y, ..)`.", - &["_self"], - ) - .register_documented( - "min", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::U64Vec3::min( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector containing the minimum values for each element of `self` and `rhs`.\n In other words this computes `[self.x.min(rhs.x), self.y.min(rhs.y), ..]`.", - &["_self", "rhs"], - ) - .register_documented( - "min_element", - |_self: Val| { - let output: u64 = { - { - let output: u64 = bevy::math::U64Vec3::min_element( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns the horizontal minimum of `self`.\n In other words this computes `min(x, y, ..)`.", - &["_self"], - ) - .register_documented( - "mul", - |_self: Val, rhs: Ref| { - let output: Val = { - { - let output: Val = >::mul(_self.into_inner(), &rhs) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "mul", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = >::mul(_self.into_inner(), rhs.into_inner()) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "mul", - |_self: Val, rhs: u64| { - let output: Val = { - { - let output: Val = >::mul(_self.into_inner(), rhs) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "new", - |x: u64, y: u64, z: u64| { - let output: Val = { - { - let output: Val = bevy::math::U64Vec3::new( - x, - y, - z, - ) - .into(); - output - } - }; - output - }, - " Creates a new vector.", - &["x", "y", "z"], - ) - .register_documented( - "rem", - |_self: Val, rhs: Ref| { - let output: Val = { - { - let output: Val = >::rem(_self.into_inner(), &rhs) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "rem", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = >::rem(_self.into_inner(), rhs.into_inner()) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "rem", - |_self: Val, rhs: u64| { - let output: Val = { - { - let output: Val = >::rem(_self.into_inner(), rhs) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "saturating_add", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::U64Vec3::saturating_add( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector containing the saturating addition of `self` and `rhs`.\n In other words this computes `[self.x.saturating_add(rhs.x), self.y.saturating_add(rhs.y), ..]`.", - &["_self", "rhs"], - ) - .register_documented( - "saturating_add_signed", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::U64Vec3::saturating_add_signed( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector containing the saturating addition of `self` and signed vector `rhs`.\n In other words this computes `[self.x.saturating_add_signed(rhs.x), self.y.saturating_add_signed(rhs.y), ..]`.", - &["_self", "rhs"], - ) - .register_documented( - "saturating_div", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::U64Vec3::saturating_div( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector containing the saturating division of `self` and `rhs`.\n In other words this computes `[self.x.saturating_div(rhs.x), self.y.saturating_div(rhs.y), ..]`.", - &["_self", "rhs"], - ) - .register_documented( - "saturating_mul", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::U64Vec3::saturating_mul( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector containing the saturating multiplication of `self` and `rhs`.\n In other words this computes `[self.x.saturating_mul(rhs.x), self.y.saturating_mul(rhs.y), ..]`.", - &["_self", "rhs"], - ) - .register_documented( - "saturating_sub", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::U64Vec3::saturating_sub( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector containing the saturating subtraction of `self` and `rhs`.\n In other words this computes `[self.x.saturating_sub(rhs.x), self.y.saturating_sub(rhs.y), ..]`.", - &["_self", "rhs"], - ) - .register_documented( - "select", - | - mask: Val, - if_true: Val, - if_false: Val| - { - let output: Val = { - { - let output: Val = bevy::math::U64Vec3::select( - mask.into_inner(), - if_true.into_inner(), - if_false.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Creates a vector from the elements in `if_true` and `if_false`, selecting which to use\n for each element of `self`.\n A true element in the mask uses the corresponding element from `if_true`, and false\n uses the element from `if_false`.", - &["mask", "if_true", "if_false"], - ) - .register_documented( - "splat", - |v: u64| { - let output: Val = { - { - let output: Val = bevy::math::U64Vec3::splat( - v, - ) - .into(); - output - } - }; - output - }, - " Creates a vector with all elements set to `v`.", - &["v"], - ) - .register_documented( - "sub", - |_self: Val, rhs: Ref| { - let output: Val = { - { - let output: Val = >::sub(_self.into_inner(), &rhs) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "sub", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = >::sub(_self.into_inner(), rhs.into_inner()) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "sub", - |_self: Val, rhs: u64| { - let output: Val = { - { - let output: Val = >::sub(_self.into_inner(), rhs) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "to_array", - |_self: Ref| { - let output: [u64; 3] = { - { - let output: [u64; 3] = bevy::math::U64Vec3::to_array(&_self) - .into(); - output - } - }; - output - }, - " `[x, y, z]`", - &["_self"], - ) - .register_documented( - "truncate", - |_self: Val| { - let output: Val = { - { - let output: Val = bevy::math::U64Vec3::truncate( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Creates a 2D vector from the `x` and `y` elements of `self`, discarding `z`.\n Truncation may also be performed by using [`self.xy()`][crate::swizzles::Vec3Swizzles::xy()].", - &["_self"], - ) - .register_documented( - "with_x", - |_self: Val, x: u64| { - let output: Val = { - { - let output: Val = bevy::math::U64Vec3::with_x( - _self.into_inner(), - x, - ) - .into(); - output - } - }; - output - }, - " Creates a 3D vector from `self` with the given value of `x`.", - &["_self", "x"], - ) - .register_documented( - "with_y", - |_self: Val, y: u64| { - let output: Val = { - { - let output: Val = bevy::math::U64Vec3::with_y( - _self.into_inner(), - y, - ) - .into(); - output - } - }; - output - }, - " Creates a 3D vector from `self` with the given value of `y`.", - &["_self", "y"], - ) - .register_documented( - "with_z", - |_self: Val, z: u64| { - let output: Val = { - { - let output: Val = bevy::math::U64Vec3::with_z( - _self.into_inner(), - z, - ) - .into(); - output - } - }; - output - }, - " Creates a 3D vector from `self` with the given value of `z`.", - &["_self", "z"], - ) - .register_documented( - "wrapping_add", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::U64Vec3::wrapping_add( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector containing the wrapping addition of `self` and `rhs`.\n In other words this computes `[self.x.wrapping_add(rhs.x), self.y.wrapping_add(rhs.y), ..]`.", - &["_self", "rhs"], - ) - .register_documented( - "wrapping_add_signed", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::U64Vec3::wrapping_add_signed( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector containing the wrapping addition of `self` and signed vector `rhs`.\n In other words this computes `[self.x.wrapping_add_signed(rhs.x), self.y.wrapping_add_signed(rhs.y), ..]`.", - &["_self", "rhs"], - ) - .register_documented( - "wrapping_div", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::U64Vec3::wrapping_div( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector containing the wrapping division of `self` and `rhs`.\n In other words this computes `[self.x.wrapping_div(rhs.x), self.y.wrapping_div(rhs.y), ..]`.", - &["_self", "rhs"], - ) - .register_documented( - "wrapping_mul", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::U64Vec3::wrapping_mul( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector containing the wrapping multiplication of `self` and `rhs`.\n In other words this computes `[self.x.wrapping_mul(rhs.x), self.y.wrapping_mul(rhs.y), ..]`.", - &["_self", "rhs"], - ) - .register_documented( - "wrapping_sub", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::U64Vec3::wrapping_sub( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector containing the wrapping subtraction of `self` and `rhs`.\n In other words this computes `[self.x.wrapping_sub(rhs.x), self.y.wrapping_sub(rhs.y), ..]`.", - &["_self", "rhs"], - ); - let registry = world - .get_resource_or_init::(); - let mut registry = registry.write(); - registry - .register_type_data::< - bevy::math::U64Vec3, - bevy_mod_scripting_core::bindings::MarkAsGenerated, - >(); - } - pub(crate) fn register_u_64_vec_4_functions(world: &mut bevy::ecs::world::World) { - bevy_mod_scripting_core::bindings::function::namespace::NamespaceBuilder::< - bevy::math::U64Vec4, - >::new(world) - .register_documented( - "add", - |_self: Val, rhs: Ref| { - let output: Val = { - { - let output: Val = >::add(_self.into_inner(), &rhs) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "add", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = >::add(_self.into_inner(), rhs.into_inner()) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "add", - |_self: Val, rhs: u64| { - let output: Val = { - { - let output: Val = >::add(_self.into_inner(), rhs) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "as_dvec4", - |_self: Ref| { - let output: Val = { - { - let output: Val = bevy::math::U64Vec4::as_dvec4( - &_self, - ) - .into(); - output - } - }; - output - }, - " Casts all elements of `self` to `f64`.", - &["_self"], - ) - .register_documented( - "as_i16vec4", - |_self: Ref| { - let output: Val = { - { - let output: Val = bevy::math::U64Vec4::as_i16vec4( - &_self, - ) - .into(); - output - } - }; - output - }, - " Casts all elements of `self` to `i16`.", - &["_self"], - ) - .register_documented( - "as_i64vec4", - |_self: Ref| { - let output: Val = { - { - let output: Val = bevy::math::U64Vec4::as_i64vec4( - &_self, - ) - .into(); - output - } - }; - output - }, - " Casts all elements of `self` to `i64`.", - &["_self"], - ) - .register_documented( - "as_i8vec4", - |_self: Ref| { - let output: Val = { - { - let output: Val = bevy::math::U64Vec4::as_i8vec4( - &_self, - ) - .into(); - output - } - }; - output - }, - " Casts all elements of `self` to `i8`.", - &["_self"], - ) - .register_documented( - "as_ivec4", - |_self: Ref| { - let output: Val = { - { - let output: Val = bevy::math::U64Vec4::as_ivec4( - &_self, - ) - .into(); - output - } - }; - output - }, - " Casts all elements of `self` to `i32`.", - &["_self"], - ) - .register_documented( - "as_u16vec4", - |_self: Ref| { - let output: Val = { - { - let output: Val = bevy::math::U64Vec4::as_u16vec4( - &_self, - ) - .into(); - output - } - }; - output - }, - " Casts all elements of `self` to `u16`.", - &["_self"], - ) - .register_documented( - "as_u8vec4", - |_self: Ref| { - let output: Val = { - { - let output: Val = bevy::math::U64Vec4::as_u8vec4( - &_self, - ) - .into(); - output - } - }; - output - }, - " Casts all elements of `self` to `u8`.", - &["_self"], - ) - .register_documented( - "as_uvec4", - |_self: Ref| { - let output: Val = { - { - let output: Val = bevy::math::U64Vec4::as_uvec4( - &_self, - ) - .into(); - output - } - }; - output - }, - " Casts all elements of `self` to `u32`.", - &["_self"], - ) - .register_documented( - "as_vec4", - |_self: Ref| { - let output: Val = { - { - let output: Val = bevy::math::U64Vec4::as_vec4( - &_self, - ) - .into(); - output - } - }; - output - }, - " Casts all elements of `self` to `f32`.", - &["_self"], - ) - .register_documented( - "assert_receiver_is_total_eq", - |_self: Ref| { - let output: () = { - { - let output: () = ::assert_receiver_is_total_eq( - &_self, - ) - .into(); - output - } - }; - output - }, - "", - &["_self"], - ) - .register_documented( - "clamp", - | - _self: Val, - min: Val, - max: Val| - { - let output: Val = { - { - let output: Val = bevy::math::U64Vec4::clamp( - _self.into_inner(), - min.into_inner(), - max.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Component-wise clamping of values, similar to [`u64::clamp`].\n Each element in `min` must be less-or-equal to the corresponding element in `max`.\n # Panics\n Will panic if `min` is greater than `max` when `glam_assert` is enabled.", - &["_self", "min", "max"], - ) - .register_documented( - "clone", - |_self: Ref| { - let output: Val = { - { - let output: Val = ::clone( - &_self, - ) - .into(); - output - } - }; - output - }, - "", - &["_self"], - ) - .register_documented( - "cmpeq", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::U64Vec4::cmpeq( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector mask containing the result of a `==` comparison for each element of\n `self` and `rhs`.\n In other words, this computes `[self.x == rhs.x, self.y == rhs.y, ..]` for all\n elements.", - &["_self", "rhs"], - ) - .register_documented( - "cmpge", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::U64Vec4::cmpge( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector mask containing the result of a `>=` comparison for each element of\n `self` and `rhs`.\n In other words this computes `[self.x >= rhs.x, self.y >= rhs.y, ..]` for all\n elements.", - &["_self", "rhs"], - ) - .register_documented( - "cmpgt", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::U64Vec4::cmpgt( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector mask containing the result of a `>` comparison for each element of\n `self` and `rhs`.\n In other words this computes `[self.x > rhs.x, self.y > rhs.y, ..]` for all\n elements.", - &["_self", "rhs"], - ) - .register_documented( - "cmple", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::U64Vec4::cmple( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector mask containing the result of a `<=` comparison for each element of\n `self` and `rhs`.\n In other words this computes `[self.x <= rhs.x, self.y <= rhs.y, ..]` for all\n elements.", - &["_self", "rhs"], - ) - .register_documented( - "cmplt", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::U64Vec4::cmplt( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector mask containing the result of a `<` comparison for each element of\n `self` and `rhs`.\n In other words this computes `[self.x < rhs.x, self.y < rhs.y, ..]` for all\n elements.", - &["_self", "rhs"], - ) - .register_documented( - "cmpne", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::U64Vec4::cmpne( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector mask containing the result of a `!=` comparison for each element of\n `self` and `rhs`.\n In other words this computes `[self.x != rhs.x, self.y != rhs.y, ..]` for all\n elements.", - &["_self", "rhs"], - ) - .register_documented( - "div", - |_self: Val, rhs: Ref| { - let output: Val = { - { - let output: Val = >::div(_self.into_inner(), &rhs) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "div", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = >::div(_self.into_inner(), rhs.into_inner()) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "div", - |_self: Val, rhs: u64| { - let output: Val = { - { - let output: Val = >::div(_self.into_inner(), rhs) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "dot", - |_self: Val, rhs: Val| { - let output: u64 = { - { - let output: u64 = bevy::math::U64Vec4::dot( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Computes the dot product of `self` and `rhs`.", - &["_self", "rhs"], - ) - .register_documented( - "dot_into_vec", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::U64Vec4::dot_into_vec( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector where every component is the dot product of `self` and `rhs`.", - &["_self", "rhs"], - ) - .register_documented( - "element_product", - |_self: Val| { - let output: u64 = { - { - let output: u64 = bevy::math::U64Vec4::element_product( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns the product of all elements of `self`.\n In other words, this computes `self.x * self.y * ..`.", - &["_self"], - ) - .register_documented( - "element_sum", - |_self: Val| { - let output: u64 = { - { - let output: u64 = bevy::math::U64Vec4::element_sum( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns the sum of all elements of `self`.\n In other words, this computes `self.x + self.y + ..`.", - &["_self"], - ) - .register_documented( - "eq", - |_self: Ref, other: Ref| { - let output: bool = { - { - let output: bool = >::eq(&_self, &other) - .into(); - output - } - }; - output - }, - "", - &["_self", "other"], - ) - .register_documented( - "from_array", - |a: [u64; 4]| { - let output: Val = { - { - let output: Val = bevy::math::U64Vec4::from_array( - a, - ) - .into(); - output - } - }; - output - }, - " Creates a new vector from an array.", - &["a"], - ) - .register_documented( - "length_squared", - |_self: Val| { - let output: u64 = { - { - let output: u64 = bevy::math::U64Vec4::length_squared( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Computes the squared length of `self`.", - &["_self"], - ) - .register_documented( - "max", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::U64Vec4::max( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector containing the maximum values for each element of `self` and `rhs`.\n In other words this computes `[self.x.max(rhs.x), self.y.max(rhs.y), ..]`.", - &["_self", "rhs"], - ) - .register_documented( - "max_element", - |_self: Val| { - let output: u64 = { - { - let output: u64 = bevy::math::U64Vec4::max_element( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns the horizontal maximum of `self`.\n In other words this computes `max(x, y, ..)`.", - &["_self"], - ) - .register_documented( - "min", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::U64Vec4::min( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector containing the minimum values for each element of `self` and `rhs`.\n In other words this computes `[self.x.min(rhs.x), self.y.min(rhs.y), ..]`.", - &["_self", "rhs"], - ) - .register_documented( - "min_element", - |_self: Val| { - let output: u64 = { - { - let output: u64 = bevy::math::U64Vec4::min_element( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns the horizontal minimum of `self`.\n In other words this computes `min(x, y, ..)`.", - &["_self"], - ) - .register_documented( - "mul", - |_self: Val, rhs: Ref| { - let output: Val = { - { - let output: Val = >::mul(_self.into_inner(), &rhs) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "mul", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = >::mul(_self.into_inner(), rhs.into_inner()) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "mul", - |_self: Val, rhs: u64| { - let output: Val = { - { - let output: Val = >::mul(_self.into_inner(), rhs) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "new", - |x: u64, y: u64, z: u64, w: u64| { - let output: Val = { - { - let output: Val = bevy::math::U64Vec4::new( - x, - y, - z, - w, - ) - .into(); - output - } - }; - output - }, - " Creates a new vector.", - &["x", "y", "z", "w"], - ) - .register_documented( - "rem", - |_self: Val, rhs: Ref| { - let output: Val = { - { - let output: Val = >::rem(_self.into_inner(), &rhs) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "rem", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = >::rem(_self.into_inner(), rhs.into_inner()) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "rem", - |_self: Val, rhs: u64| { - let output: Val = { - { - let output: Val = >::rem(_self.into_inner(), rhs) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "saturating_add", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::U64Vec4::saturating_add( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector containing the saturating addition of `self` and `rhs`.\n In other words this computes `[self.x.saturating_add(rhs.x), self.y.saturating_add(rhs.y), ..]`.", - &["_self", "rhs"], - ) - .register_documented( - "saturating_add_signed", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::U64Vec4::saturating_add_signed( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector containing the saturating addition of `self` and signed vector `rhs`.\n In other words this computes `[self.x.saturating_add_signed(rhs.x), self.y.saturating_add_signed(rhs.y), ..]`.", - &["_self", "rhs"], - ) - .register_documented( - "saturating_div", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::U64Vec4::saturating_div( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector containing the saturating division of `self` and `rhs`.\n In other words this computes `[self.x.saturating_div(rhs.x), self.y.saturating_div(rhs.y), ..]`.", - &["_self", "rhs"], - ) - .register_documented( - "saturating_mul", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::U64Vec4::saturating_mul( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector containing the saturating multiplication of `self` and `rhs`.\n In other words this computes `[self.x.saturating_mul(rhs.x), self.y.saturating_mul(rhs.y), ..]`.", - &["_self", "rhs"], - ) - .register_documented( - "saturating_sub", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::U64Vec4::saturating_sub( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector containing the saturating subtraction of `self` and `rhs`.\n In other words this computes `[self.x.saturating_sub(rhs.x), self.y.saturating_sub(rhs.y), ..]`.", - &["_self", "rhs"], - ) - .register_documented( - "select", - | - mask: Val, - if_true: Val, - if_false: Val| - { - let output: Val = { - { - let output: Val = bevy::math::U64Vec4::select( - mask.into_inner(), - if_true.into_inner(), - if_false.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Creates a vector from the elements in `if_true` and `if_false`, selecting which to use\n for each element of `self`.\n A true element in the mask uses the corresponding element from `if_true`, and false\n uses the element from `if_false`.", - &["mask", "if_true", "if_false"], - ) - .register_documented( - "splat", - |v: u64| { - let output: Val = { - { - let output: Val = bevy::math::U64Vec4::splat( - v, - ) - .into(); - output - } - }; - output - }, - " Creates a vector with all elements set to `v`.", - &["v"], - ) - .register_documented( - "sub", - |_self: Val, rhs: Ref| { - let output: Val = { - { - let output: Val = >::sub(_self.into_inner(), &rhs) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "sub", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = >::sub(_self.into_inner(), rhs.into_inner()) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "sub", - |_self: Val, rhs: u64| { - let output: Val = { - { - let output: Val = >::sub(_self.into_inner(), rhs) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "to_array", - |_self: Ref| { - let output: [u64; 4] = { - { - let output: [u64; 4] = bevy::math::U64Vec4::to_array(&_self) - .into(); - output - } - }; - output - }, - " `[x, y, z, w]`", - &["_self"], - ) - .register_documented( - "truncate", - |_self: Val| { - let output: Val = { - { - let output: Val = bevy::math::U64Vec4::truncate( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Creates a 3D vector from the `x`, `y` and `z` elements of `self`, discarding `w`.\n Truncation to [`U64Vec3`] may also be performed by using [`self.xyz()`][crate::swizzles::Vec4Swizzles::xyz()].", - &["_self"], - ) - .register_documented( - "with_w", - |_self: Val, w: u64| { - let output: Val = { - { - let output: Val = bevy::math::U64Vec4::with_w( - _self.into_inner(), - w, - ) - .into(); - output - } - }; - output - }, - " Creates a 4D vector from `self` with the given value of `w`.", - &["_self", "w"], - ) - .register_documented( - "with_x", - |_self: Val, x: u64| { - let output: Val = { - { - let output: Val = bevy::math::U64Vec4::with_x( - _self.into_inner(), - x, - ) - .into(); - output - } - }; - output - }, - " Creates a 4D vector from `self` with the given value of `x`.", - &["_self", "x"], - ) - .register_documented( - "with_y", - |_self: Val, y: u64| { - let output: Val = { - { - let output: Val = bevy::math::U64Vec4::with_y( - _self.into_inner(), - y, - ) - .into(); - output - } - }; - output - }, - " Creates a 4D vector from `self` with the given value of `y`.", - &["_self", "y"], - ) - .register_documented( - "with_z", - |_self: Val, z: u64| { - let output: Val = { - { - let output: Val = bevy::math::U64Vec4::with_z( - _self.into_inner(), - z, - ) - .into(); - output - } - }; - output - }, - " Creates a 4D vector from `self` with the given value of `z`.", - &["_self", "z"], - ) - .register_documented( - "wrapping_add", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::U64Vec4::wrapping_add( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector containing the wrapping addition of `self` and `rhs`.\n In other words this computes `[self.x.wrapping_add(rhs.x), self.y.wrapping_add(rhs.y), ..]`.", - &["_self", "rhs"], - ) - .register_documented( - "wrapping_add_signed", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::U64Vec4::wrapping_add_signed( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector containing the wrapping addition of `self` and signed vector `rhs`.\n In other words this computes `[self.x.wrapping_add_signed(rhs.x), self.y.wrapping_add_signed(rhs.y), ..]`.", - &["_self", "rhs"], - ) - .register_documented( - "wrapping_div", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::U64Vec4::wrapping_div( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector containing the wrapping division of `self` and `rhs`.\n In other words this computes `[self.x.wrapping_div(rhs.x), self.y.wrapping_div(rhs.y), ..]`.", - &["_self", "rhs"], - ) - .register_documented( - "wrapping_mul", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::U64Vec4::wrapping_mul( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector containing the wrapping multiplication of `self` and `rhs`.\n In other words this computes `[self.x.wrapping_mul(rhs.x), self.y.wrapping_mul(rhs.y), ..]`.", - &["_self", "rhs"], - ) - .register_documented( - "wrapping_sub", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::U64Vec4::wrapping_sub( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector containing the wrapping subtraction of `self` and `rhs`.\n In other words this computes `[self.x.wrapping_sub(rhs.x), self.y.wrapping_sub(rhs.y), ..]`.", - &["_self", "rhs"], - ); - let registry = world - .get_resource_or_init::(); - let mut registry = registry.write(); - registry - .register_type_data::< - bevy::math::U64Vec4, - bevy_mod_scripting_core::bindings::MarkAsGenerated, - >(); - } - pub(crate) fn register_vec_2_functions(world: &mut bevy::ecs::world::World) { - bevy_mod_scripting_core::bindings::function::namespace::NamespaceBuilder::< - bevy::math::Vec2, - >::new(world) - .register_documented( - "abs", - |_self: Val| { - let output: Val = { - { - let output: Val = bevy::math::Vec2::abs( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector containing the absolute value of each element of `self`.", - &["_self"], - ) - .register_documented( - "abs_diff_eq", - | - _self: Val, - rhs: Val, - max_abs_diff: f32| - { - let output: bool = { - { - let output: bool = bevy::math::Vec2::abs_diff_eq( - _self.into_inner(), - rhs.into_inner(), - max_abs_diff, - ) - .into(); - output - } - }; - output - }, - " Returns true if the absolute difference of all elements between `self` and `rhs` is\n less than or equal to `max_abs_diff`.\n This can be used to compare if two vectors contain similar elements. It works best when\n comparing with a known value. The `max_abs_diff` that should be used used depends on\n the values being compared against.\n For more see\n [comparing floating point numbers](https://randomascii.wordpress.com/2012/02/25/comparing-floating-point-numbers-2012-edition/).", - &["_self", "rhs", "max_abs_diff"], - ) - .register_documented( - "add", - |_self: Val, rhs: Ref| { - let output: Val = { - { - let output: Val = >::add(_self.into_inner(), &rhs) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "add", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = >::add(_self.into_inner(), rhs.into_inner()) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "add", - |_self: Val, rhs: f32| { - let output: Val = { - { - let output: Val = >::add(_self.into_inner(), rhs) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "angle_between", - |_self: Val, rhs: Val| { - let output: f32 = { - { - let output: f32 = bevy::math::Vec2::angle_between( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "angle_to", - |_self: Val, rhs: Val| { - let output: f32 = { - { - let output: f32 = bevy::math::Vec2::angle_to( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns the angle of rotation (in radians) from `self` to `rhs` in the range `[-π, +π]`.\n The inputs do not need to be unit vectors however they must be non-zero.", - &["_self", "rhs"], - ) - .register_documented( - "as_dvec2", - |_self: Ref| { - let output: Val = { - { - let output: Val = bevy::math::Vec2::as_dvec2( - &_self, - ) - .into(); - output - } - }; - output - }, - " Casts all elements of `self` to `f64`.", - &["_self"], - ) - .register_documented( - "as_i16vec2", - |_self: Ref| { - let output: Val = { - { - let output: Val = bevy::math::Vec2::as_i16vec2( - &_self, - ) - .into(); - output - } - }; - output - }, - " Casts all elements of `self` to `i16`.", - &["_self"], - ) - .register_documented( - "as_i64vec2", - |_self: Ref| { - let output: Val = { - { - let output: Val = bevy::math::Vec2::as_i64vec2( - &_self, - ) - .into(); - output - } - }; - output - }, - " Casts all elements of `self` to `i64`.", - &["_self"], - ) - .register_documented( - "as_i8vec2", - |_self: Ref| { - let output: Val = { - { - let output: Val = bevy::math::Vec2::as_i8vec2( - &_self, - ) - .into(); - output - } - }; - output - }, - " Casts all elements of `self` to `i8`.", - &["_self"], - ) - .register_documented( - "as_ivec2", - |_self: Ref| { - let output: Val = { - { - let output: Val = bevy::math::Vec2::as_ivec2( - &_self, - ) - .into(); - output - } - }; - output - }, - " Casts all elements of `self` to `i32`.", - &["_self"], - ) - .register_documented( - "as_u16vec2", - |_self: Ref| { - let output: Val = { - { - let output: Val = bevy::math::Vec2::as_u16vec2( - &_self, - ) - .into(); - output - } - }; - output - }, - " Casts all elements of `self` to `u16`.", - &["_self"], - ) - .register_documented( - "as_u64vec2", - |_self: Ref| { - let output: Val = { - { - let output: Val = bevy::math::Vec2::as_u64vec2( - &_self, - ) - .into(); - output - } - }; - output - }, - " Casts all elements of `self` to `u64`.", - &["_self"], - ) - .register_documented( - "as_u8vec2", - |_self: Ref| { - let output: Val = { - { - let output: Val = bevy::math::Vec2::as_u8vec2( - &_self, - ) - .into(); - output - } - }; - output - }, - " Casts all elements of `self` to `u8`.", - &["_self"], - ) - .register_documented( - "as_uvec2", - |_self: Ref| { - let output: Val = { - { - let output: Val = bevy::math::Vec2::as_uvec2( - &_self, - ) - .into(); - output - } - }; - output - }, - " Casts all elements of `self` to `u32`.", - &["_self"], - ) - .register_documented( - "ceil", - |_self: Val| { - let output: Val = { - { - let output: Val = bevy::math::Vec2::ceil( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector containing the smallest integer greater than or equal to a number for\n each element of `self`.", - &["_self"], - ) - .register_documented( - "clamp", - | - _self: Val, - min: Val, - max: Val| - { - let output: Val = { - { - let output: Val = bevy::math::Vec2::clamp( - _self.into_inner(), - min.into_inner(), - max.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Component-wise clamping of values, similar to [`f32::clamp`].\n Each element in `min` must be less-or-equal to the corresponding element in `max`.\n # Panics\n Will panic if `min` is greater than `max` when `glam_assert` is enabled.", - &["_self", "min", "max"], - ) - .register_documented( - "clamp_length", - |_self: Val, min: f32, max: f32| { - let output: Val = { - { - let output: Val = bevy::math::Vec2::clamp_length( - _self.into_inner(), - min, - max, - ) - .into(); - output - } - }; - output - }, - " Returns a vector with a length no less than `min` and no more than `max`.\n # Panics\n Will panic if `min` is greater than `max`, or if either `min` or `max` is negative, when `glam_assert` is enabled.", - &["_self", "min", "max"], - ) - .register_documented( - "clamp_length_max", - |_self: Val, max: f32| { - let output: Val = { - { - let output: Val = bevy::math::Vec2::clamp_length_max( - _self.into_inner(), - max, - ) - .into(); - output - } - }; - output - }, - " Returns a vector with a length no more than `max`.\n # Panics\n Will panic if `max` is negative when `glam_assert` is enabled.", - &["_self", "max"], - ) - .register_documented( - "clamp_length_min", - |_self: Val, min: f32| { - let output: Val = { - { - let output: Val = bevy::math::Vec2::clamp_length_min( - _self.into_inner(), - min, - ) - .into(); - output - } - }; - output - }, - " Returns a vector with a length no less than `min`.\n # Panics\n Will panic if `min` is negative when `glam_assert` is enabled.", - &["_self", "min"], - ) - .register_documented( - "clone", - |_self: Ref| { - let output: Val = { - { - let output: Val = ::clone( - &_self, - ) - .into(); - output - } - }; - output - }, - "", - &["_self"], - ) - .register_documented( - "cmpeq", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::Vec2::cmpeq( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector mask containing the result of a `==` comparison for each element of\n `self` and `rhs`.\n In other words, this computes `[self.x == rhs.x, self.y == rhs.y, ..]` for all\n elements.", - &["_self", "rhs"], - ) - .register_documented( - "cmpge", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::Vec2::cmpge( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector mask containing the result of a `>=` comparison for each element of\n `self` and `rhs`.\n In other words this computes `[self.x >= rhs.x, self.y >= rhs.y, ..]` for all\n elements.", - &["_self", "rhs"], - ) - .register_documented( - "cmpgt", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::Vec2::cmpgt( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector mask containing the result of a `>` comparison for each element of\n `self` and `rhs`.\n In other words this computes `[self.x > rhs.x, self.y > rhs.y, ..]` for all\n elements.", - &["_self", "rhs"], - ) - .register_documented( - "cmple", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::Vec2::cmple( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector mask containing the result of a `<=` comparison for each element of\n `self` and `rhs`.\n In other words this computes `[self.x <= rhs.x, self.y <= rhs.y, ..]` for all\n elements.", - &["_self", "rhs"], - ) - .register_documented( - "cmplt", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::Vec2::cmplt( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector mask containing the result of a `<` comparison for each element of\n `self` and `rhs`.\n In other words this computes `[self.x < rhs.x, self.y < rhs.y, ..]` for all\n elements.", - &["_self", "rhs"], - ) - .register_documented( - "cmpne", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::Vec2::cmpne( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector mask containing the result of a `!=` comparison for each element of\n `self` and `rhs`.\n In other words this computes `[self.x != rhs.x, self.y != rhs.y, ..]` for all\n elements.", - &["_self", "rhs"], - ) - .register_documented( - "copysign", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::Vec2::copysign( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector with signs of `rhs` and the magnitudes of `self`.", - &["_self", "rhs"], - ) - .register_documented( - "distance", - |_self: Val, rhs: Val| { - let output: f32 = { - { - let output: f32 = bevy::math::Vec2::distance( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Computes the Euclidean distance between two points in space.", - &["_self", "rhs"], - ) - .register_documented( - "distance_squared", - |_self: Val, rhs: Val| { - let output: f32 = { - { - let output: f32 = bevy::math::Vec2::distance_squared( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Compute the squared euclidean distance between two points in space.", - &["_self", "rhs"], - ) - .register_documented( - "div", - |_self: Val, rhs: Ref| { - let output: Val = { - { - let output: Val = >::div(_self.into_inner(), &rhs) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "div", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = >::div(_self.into_inner(), rhs.into_inner()) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "div", - |_self: Val, rhs: f32| { - let output: Val = { - { - let output: Val = >::div(_self.into_inner(), rhs) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "div_euclid", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::Vec2::div_euclid( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns the element-wise quotient of [Euclidean division] of `self` by `rhs`.", - &["_self", "rhs"], - ) - .register_documented( - "dot", - |_self: Val, rhs: Val| { - let output: f32 = { - { - let output: f32 = bevy::math::Vec2::dot( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Computes the dot product of `self` and `rhs`.", - &["_self", "rhs"], - ) - .register_documented( - "dot_into_vec", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::Vec2::dot_into_vec( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector where every component is the dot product of `self` and `rhs`.", - &["_self", "rhs"], - ) - .register_documented( - "element_product", - |_self: Val| { - let output: f32 = { - { - let output: f32 = bevy::math::Vec2::element_product( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns the product of all elements of `self`.\n In other words, this computes `self.x * self.y * ..`.", - &["_self"], - ) - .register_documented( - "element_sum", - |_self: Val| { - let output: f32 = { - { - let output: f32 = bevy::math::Vec2::element_sum( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns the sum of all elements of `self`.\n In other words, this computes `self.x + self.y + ..`.", - &["_self"], - ) - .register_documented( - "eq", - |_self: Ref, other: Ref| { - let output: bool = { - { - let output: bool = >::eq(&_self, &other) - .into(); - output - } - }; - output - }, - "", - &["_self", "other"], - ) - .register_documented( - "exp", - |_self: Val| { - let output: Val = { - { - let output: Val = bevy::math::Vec2::exp( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector containing `e^self` (the exponential function) for each element of\n `self`.", - &["_self"], - ) - .register_documented( - "extend", - |_self: Val, z: f32| { - let output: Val = { - { - let output: Val = bevy::math::Vec2::extend( - _self.into_inner(), - z, - ) - .into(); - output - } - }; - output - }, - " Creates a 3D vector from `self` and the given `z` value.", - &["_self", "z"], - ) - .register_documented( - "floor", - |_self: Val| { - let output: Val = { - { - let output: Val = bevy::math::Vec2::floor( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector containing the largest integer less than or equal to a number for each\n element of `self`.", - &["_self"], - ) - .register_documented( - "fract", - |_self: Val| { - let output: Val = { - { - let output: Val = bevy::math::Vec2::fract( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector containing the fractional part of the vector as `self - self.trunc()`.\n Note that this differs from the GLSL implementation of `fract` which returns\n `self - self.floor()`.\n Note that this is fast but not precise for large numbers.", - &["_self"], - ) - .register_documented( - "fract_gl", - |_self: Val| { - let output: Val = { - { - let output: Val = bevy::math::Vec2::fract_gl( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector containing the fractional part of the vector as `self - self.floor()`.\n Note that this differs from the Rust implementation of `fract` which returns\n `self - self.trunc()`.\n Note that this is fast but not precise for large numbers.", - &["_self"], - ) - .register_documented( - "from_angle", - |angle: f32| { - let output: Val = { - { - let output: Val = bevy::math::Vec2::from_angle( - angle, - ) - .into(); - output - } - }; - output - }, - " Creates a 2D vector containing `[angle.cos(), angle.sin()]`. This can be used in\n conjunction with the [`rotate()`][Self::rotate()] method, e.g.\n `Vec2::from_angle(PI).rotate(Vec2::Y)` will create the vector `[-1, 0]`\n and rotate [`Vec2::Y`] around it returning `-Vec2::Y`.", - &["angle"], - ) - .register_documented( - "from_array", - |a: [f32; 2]| { - let output: Val = { - { - let output: Val = bevy::math::Vec2::from_array( - a, - ) - .into(); - output - } - }; - output - }, - " Creates a new vector from an array.", - &["a"], - ) - .register_documented( - "is_finite", - |_self: Val| { - let output: bool = { - { - let output: bool = bevy::math::Vec2::is_finite( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns `true` if, and only if, all elements are finite. If any element is either\n `NaN`, positive or negative infinity, this will return `false`.", - &["_self"], - ) - .register_documented( - "is_finite_mask", - |_self: Val| { - let output: Val = { - { - let output: Val = bevy::math::Vec2::is_finite_mask( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Performs `is_finite` on each element of self, returning a vector mask of the results.\n In other words, this computes `[x.is_finite(), y.is_finite(), ...]`.", - &["_self"], - ) - .register_documented( - "is_nan", - |_self: Val| { - let output: bool = { - { - let output: bool = bevy::math::Vec2::is_nan( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns `true` if any elements are `NaN`.", - &["_self"], - ) - .register_documented( - "is_nan_mask", - |_self: Val| { - let output: Val = { - { - let output: Val = bevy::math::Vec2::is_nan_mask( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Performs `is_nan` on each element of self, returning a vector mask of the results.\n In other words, this computes `[x.is_nan(), y.is_nan(), ...]`.", - &["_self"], - ) - .register_documented( - "is_negative_bitmask", - |_self: Val| { - let output: u32 = { - { - let output: u32 = bevy::math::Vec2::is_negative_bitmask( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a bitmask with the lowest 2 bits set to the sign bits from the elements of `self`.\n A negative element results in a `1` bit and a positive element in a `0` bit. Element `x` goes\n into the first lowest bit, element `y` into the second, etc.", - &["_self"], - ) - .register_documented( - "is_normalized", - |_self: Val| { - let output: bool = { - { - let output: bool = bevy::math::Vec2::is_normalized( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns whether `self` is length `1.0` or not.\n Uses a precision threshold of approximately `1e-4`.", - &["_self"], - ) - .register_documented( - "length", - |_self: Val| { - let output: f32 = { - { - let output: f32 = bevy::math::Vec2::length( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Computes the length of `self`.", - &["_self"], - ) - .register_documented( - "length_recip", - |_self: Val| { - let output: f32 = { - { - let output: f32 = bevy::math::Vec2::length_recip( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Computes `1.0 / length()`.\n For valid results, `self` must _not_ be of length zero.", - &["_self"], - ) - .register_documented( - "length_squared", - |_self: Val| { - let output: f32 = { - { - let output: f32 = bevy::math::Vec2::length_squared( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Computes the squared length of `self`.\n This is faster than `length()` as it avoids a square root operation.", - &["_self"], - ) - .register_documented( - "lerp", - |_self: Val, rhs: Val, s: f32| { - let output: Val = { - { - let output: Val = bevy::math::Vec2::lerp( - _self.into_inner(), - rhs.into_inner(), - s, - ) - .into(); - output - } - }; - output - }, - " Performs a linear interpolation between `self` and `rhs` based on the value `s`.\n When `s` is `0.0`, the result will be equal to `self`. When `s` is `1.0`, the result\n will be equal to `rhs`. When `s` is outside of range `[0, 1]`, the result is linearly\n extrapolated.", - &["_self", "rhs", "s"], - ) - .register_documented( - "max", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::Vec2::max( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector containing the maximum values for each element of `self` and `rhs`.\n In other words this computes `[self.x.max(rhs.x), self.y.max(rhs.y), ..]`.", - &["_self", "rhs"], - ) - .register_documented( - "max_element", - |_self: Val| { - let output: f32 = { - { - let output: f32 = bevy::math::Vec2::max_element( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns the horizontal maximum of `self`.\n In other words this computes `max(x, y, ..)`.", - &["_self"], - ) - .register_documented( - "midpoint", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::Vec2::midpoint( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Calculates the midpoint between `self` and `rhs`.\n The midpoint is the average of, or halfway point between, two vectors.\n `a.midpoint(b)` should yield the same result as `a.lerp(b, 0.5)`\n while being slightly cheaper to compute.", - &["_self", "rhs"], - ) - .register_documented( - "min", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::Vec2::min( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector containing the minimum values for each element of `self` and `rhs`.\n In other words this computes `[self.x.min(rhs.x), self.y.min(rhs.y), ..]`.", - &["_self", "rhs"], - ) - .register_documented( - "min_element", - |_self: Val| { - let output: f32 = { - { - let output: f32 = bevy::math::Vec2::min_element( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns the horizontal minimum of `self`.\n In other words this computes `min(x, y, ..)`.", - &["_self"], - ) - .register_documented( - "move_towards", - |_self: Ref, rhs: Val, d: f32| { - let output: Val = { - { - let output: Val = bevy::math::Vec2::move_towards( - &_self, - rhs.into_inner(), - d, - ) - .into(); - output - } - }; - output - }, - " Moves towards `rhs` based on the value `d`.\n When `d` is `0.0`, the result will be equal to `self`. When `d` is equal to\n `self.distance(rhs)`, the result will be equal to `rhs`. Will not go past `rhs`.", - &["_self", "rhs", "d"], - ) - .register_documented( - "mul", - |_self: Val, rhs: Ref| { - let output: Val = { - { - let output: Val = >::mul(_self.into_inner(), &rhs) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "mul", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = >::mul(_self.into_inner(), rhs.into_inner()) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "mul", - |_self: Val, rhs: f32| { - let output: Val = { - { - let output: Val = >::mul(_self.into_inner(), rhs) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "mul_add", - | - _self: Val, - a: Val, - b: Val| - { - let output: Val = { - { - let output: Val = bevy::math::Vec2::mul_add( - _self.into_inner(), - a.into_inner(), - b.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Fused multiply-add. Computes `(self * a) + b` element-wise with only one rounding\n error, yielding a more accurate result than an unfused multiply-add.\n Using `mul_add` *may* be more performant than an unfused multiply-add if the target\n architecture has a dedicated fma CPU instruction. However, this is not always true,\n and will be heavily dependant on designing algorithms with specific target hardware in\n mind.", - &["_self", "a", "b"], - ) - .register_documented( - "neg", - |_self: Val| { - let output: Val = { - { - let output: Val = ::neg( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - "", - &["_self"], - ) - .register_documented( - "new", - |x: f32, y: f32| { - let output: Val = { - { - let output: Val = bevy::math::Vec2::new( - x, - y, - ) - .into(); - output - } - }; - output - }, - " Creates a new vector.", - &["x", "y"], - ) - .register_documented( - "normalize", - |_self: Val| { - let output: Val = { - { - let output: Val = bevy::math::Vec2::normalize( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns `self` normalized to length 1.0.\n For valid results, `self` must be finite and _not_ of length zero, nor very close to zero.\n See also [`Self::try_normalize()`] and [`Self::normalize_or_zero()`].\n Panics\n Will panic if the resulting normalized vector is not finite when `glam_assert` is enabled.", - &["_self"], - ) - .register_documented( - "normalize_or", - |_self: Val, fallback: Val| { - let output: Val = { - { - let output: Val = bevy::math::Vec2::normalize_or( - _self.into_inner(), - fallback.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns `self` normalized to length 1.0 if possible, else returns a\n fallback value.\n In particular, if the input is zero (or very close to zero), or non-finite,\n the result of this operation will be the fallback value.\n See also [`Self::try_normalize()`].", - &["_self", "fallback"], - ) - .register_documented( - "normalize_or_zero", - |_self: Val| { - let output: Val = { - { - let output: Val = bevy::math::Vec2::normalize_or_zero( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns `self` normalized to length 1.0 if possible, else returns zero.\n In particular, if the input is zero (or very close to zero), or non-finite,\n the result of this operation will be zero.\n See also [`Self::try_normalize()`].", - &["_self"], - ) - .register_documented( - "perp", - |_self: Val| { - let output: Val = { - { - let output: Val = bevy::math::Vec2::perp( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector that is equal to `self` rotated by 90 degrees.", - &["_self"], - ) - .register_documented( - "perp_dot", - |_self: Val, rhs: Val| { - let output: f32 = { - { - let output: f32 = bevy::math::Vec2::perp_dot( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " The perpendicular dot product of `self` and `rhs`.\n Also known as the wedge product, 2D cross product, and determinant.", - &["_self", "rhs"], - ) - .register_documented( - "powf", - |_self: Val, n: f32| { - let output: Val = { - { - let output: Val = bevy::math::Vec2::powf( - _self.into_inner(), - n, - ) - .into(); - output - } - }; - output - }, - " Returns a vector containing each element of `self` raised to the power of `n`.", - &["_self", "n"], - ) - .register_documented( - "project_onto", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::Vec2::project_onto( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns the vector projection of `self` onto `rhs`.\n `rhs` must be of non-zero length.\n # Panics\n Will panic if `rhs` is zero length when `glam_assert` is enabled.", - &["_self", "rhs"], - ) - .register_documented( - "project_onto_normalized", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::Vec2::project_onto_normalized( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns the vector projection of `self` onto `rhs`.\n `rhs` must be normalized.\n # Panics\n Will panic if `rhs` is not normalized when `glam_assert` is enabled.", - &["_self", "rhs"], - ) - .register_documented( - "recip", - |_self: Val| { - let output: Val = { - { - let output: Val = bevy::math::Vec2::recip( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector containing the reciprocal `1.0/n` of each element of `self`.", - &["_self"], - ) - .register_documented( - "reflect", - |_self: Val, normal: Val| { - let output: Val = { - { - let output: Val = bevy::math::Vec2::reflect( - _self.into_inner(), - normal.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns the reflection vector for a given incident vector `self` and surface normal\n `normal`.\n `normal` must be normalized.\n # Panics\n Will panic if `normal` is not normalized when `glam_assert` is enabled.", - &["_self", "normal"], - ) - .register_documented( - "refract", - |_self: Val, normal: Val, eta: f32| { - let output: Val = { - { - let output: Val = bevy::math::Vec2::refract( - _self.into_inner(), - normal.into_inner(), - eta, - ) - .into(); - output - } - }; - output - }, - " Returns the refraction direction for a given incident vector `self`, surface normal\n `normal` and ratio of indices of refraction, `eta`. When total internal reflection occurs,\n a zero vector will be returned.\n `self` and `normal` must be normalized.\n # Panics\n Will panic if `self` or `normal` is not normalized when `glam_assert` is enabled.", - &["_self", "normal", "eta"], - ) - .register_documented( - "reject_from", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::Vec2::reject_from( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns the vector rejection of `self` from `rhs`.\n The vector rejection is the vector perpendicular to the projection of `self` onto\n `rhs`, in rhs words the result of `self - self.project_onto(rhs)`.\n `rhs` must be of non-zero length.\n # Panics\n Will panic if `rhs` has a length of zero when `glam_assert` is enabled.", - &["_self", "rhs"], - ) - .register_documented( - "reject_from_normalized", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::Vec2::reject_from_normalized( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns the vector rejection of `self` from `rhs`.\n The vector rejection is the vector perpendicular to the projection of `self` onto\n `rhs`, in rhs words the result of `self - self.project_onto(rhs)`.\n `rhs` must be normalized.\n # Panics\n Will panic if `rhs` is not normalized when `glam_assert` is enabled.", - &["_self", "rhs"], - ) - .register_documented( - "rem", - |_self: Val, rhs: Ref| { - let output: Val = { - { - let output: Val = >::rem(_self.into_inner(), &rhs) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "rem", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = >::rem(_self.into_inner(), rhs.into_inner()) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "rem", - |_self: Val, rhs: f32| { - let output: Val = { - { - let output: Val = >::rem(_self.into_inner(), rhs) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "rem_euclid", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::Vec2::rem_euclid( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns the element-wise remainder of [Euclidean division] of `self` by `rhs`.\n [Euclidean division]: f32::rem_euclid", - &["_self", "rhs"], - ) - .register_documented( - "rotate", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::Vec2::rotate( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns `rhs` rotated by the angle of `self`. If `self` is normalized,\n then this just rotation. This is what you usually want. Otherwise,\n it will be like a rotation with a multiplication by `self`'s length.", - &["_self", "rhs"], - ) - .register_documented( - "rotate_towards", - | - _self: Ref, - rhs: Val, - max_angle: f32| - { - let output: Val = { - { - let output: Val = bevy::math::Vec2::rotate_towards( - &_self, - rhs.into_inner(), - max_angle, - ) - .into(); - output - } - }; - output - }, - " Rotates towards `rhs` up to `max_angle` (in radians).\n When `max_angle` is `0.0`, the result will be equal to `self`. When `max_angle` is equal to\n `self.angle_between(rhs)`, the result will be equal to `rhs`. If `max_angle` is negative,\n rotates towards the exact opposite of `rhs`. Will not go past the target.", - &["_self", "rhs", "max_angle"], - ) - .register_documented( - "round", - |_self: Val| { - let output: Val = { - { - let output: Val = bevy::math::Vec2::round( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector containing the nearest integer to a number for each element of `self`.\n Round half-way cases away from 0.0.", - &["_self"], - ) - .register_documented( - "select", - | - mask: Val, - if_true: Val, - if_false: Val| - { - let output: Val = { - { - let output: Val = bevy::math::Vec2::select( - mask.into_inner(), - if_true.into_inner(), - if_false.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Creates a vector from the elements in `if_true` and `if_false`, selecting which to use\n for each element of `self`.\n A true element in the mask uses the corresponding element from `if_true`, and false\n uses the element from `if_false`.", - &["mask", "if_true", "if_false"], - ) - .register_documented( - "signum", - |_self: Val| { - let output: Val = { - { - let output: Val = bevy::math::Vec2::signum( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector with elements representing the sign of `self`.\n - `1.0` if the number is positive, `+0.0` or `INFINITY`\n - `-1.0` if the number is negative, `-0.0` or `NEG_INFINITY`\n - `NAN` if the number is `NAN`", - &["_self"], - ) - .register_documented( - "splat", - |v: f32| { - let output: Val = { - { - let output: Val = bevy::math::Vec2::splat( - v, - ) - .into(); - output - } - }; - output - }, - " Creates a vector with all elements set to `v`.", - &["v"], - ) - .register_documented( - "sub", - |_self: Val, rhs: Ref| { - let output: Val = { - { - let output: Val = >::sub(_self.into_inner(), &rhs) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "sub", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = >::sub(_self.into_inner(), rhs.into_inner()) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "sub", - |_self: Val, rhs: f32| { - let output: Val = { - { - let output: Val = >::sub(_self.into_inner(), rhs) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "to_angle", - |_self: Val| { - let output: f32 = { - { - let output: f32 = bevy::math::Vec2::to_angle( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns the angle (in radians) of this vector in the range `[-π, +π]`.\n The input does not need to be a unit vector however it must be non-zero.", - &["_self"], - ) - .register_documented( - "to_array", - |_self: Ref| { - let output: [f32; 2] = { - { - let output: [f32; 2] = bevy::math::Vec2::to_array(&_self) - .into(); - output - } - }; - output - }, - " `[x, y]`", - &["_self"], - ) - .register_documented( - "trunc", - |_self: Val| { - let output: Val = { - { - let output: Val = bevy::math::Vec2::trunc( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector containing the integer part each element of `self`. This means numbers are\n always truncated towards zero.", - &["_self"], - ) - .register_documented( - "with_x", - |_self: Val, x: f32| { - let output: Val = { - { - let output: Val = bevy::math::Vec2::with_x( - _self.into_inner(), - x, - ) - .into(); - output - } - }; - output - }, - " Creates a 2D vector from `self` with the given value of `x`.", - &["_self", "x"], - ) - .register_documented( - "with_y", - |_self: Val, y: f32| { - let output: Val = { - { - let output: Val = bevy::math::Vec2::with_y( - _self.into_inner(), - y, - ) - .into(); - output - } - }; - output - }, - " Creates a 2D vector from `self` with the given value of `y`.", - &["_self", "y"], - ); - let registry = world - .get_resource_or_init::(); - let mut registry = registry.write(); - registry - .register_type_data::< - bevy::math::Vec2, - bevy_mod_scripting_core::bindings::MarkAsGenerated, - >(); - } - pub(crate) fn register_vec_3_a_functions(world: &mut bevy::ecs::world::World) { - bevy_mod_scripting_core::bindings::function::namespace::NamespaceBuilder::< - bevy::math::Vec3A, - >::new(world) - .register_documented( - "abs", - |_self: Val| { - let output: Val = { - { - let output: Val = bevy::math::Vec3A::abs( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector containing the absolute value of each element of `self`.", - &["_self"], - ) - .register_documented( - "abs_diff_eq", - | - _self: Val, - rhs: Val, - max_abs_diff: f32| - { - let output: bool = { - { - let output: bool = bevy::math::Vec3A::abs_diff_eq( - _self.into_inner(), - rhs.into_inner(), - max_abs_diff, - ) - .into(); - output - } - }; - output - }, - " Returns true if the absolute difference of all elements between `self` and `rhs` is\n less than or equal to `max_abs_diff`.\n This can be used to compare if two vectors contain similar elements. It works best when\n comparing with a known value. The `max_abs_diff` that should be used used depends on\n the values being compared against.\n For more see\n [comparing floating point numbers](https://randomascii.wordpress.com/2012/02/25/comparing-floating-point-numbers-2012-edition/).", - &["_self", "rhs", "max_abs_diff"], - ) - .register_documented( - "add", - |_self: Val, rhs: Ref| { - let output: Val = { - { - let output: Val = >::add(_self.into_inner(), &rhs) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "add", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = >::add(_self.into_inner(), rhs.into_inner()) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "add", - |_self: Val, rhs: f32| { - let output: Val = { - { - let output: Val = >::add(_self.into_inner(), rhs) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "angle_between", - |_self: Val, rhs: Val| { - let output: f32 = { - { - let output: f32 = bevy::math::Vec3A::angle_between( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns the angle (in radians) between two vectors in the range `[0, +π]`.\n The inputs do not need to be unit vectors however they must be non-zero.", - &["_self", "rhs"], - ) - .register_documented( - "any_orthogonal_vector", - |_self: Ref| { - let output: Val = { - { - let output: Val = bevy::math::Vec3A::any_orthogonal_vector( - &_self, - ) - .into(); - output - } - }; - output - }, - " Returns some vector that is orthogonal to the given one.\n The input vector must be finite and non-zero.\n The output vector is not necessarily unit length. For that use\n [`Self::any_orthonormal_vector()`] instead.", - &["_self"], - ) - .register_documented( - "any_orthonormal_vector", - |_self: Ref| { - let output: Val = { - { - let output: Val = bevy::math::Vec3A::any_orthonormal_vector( - &_self, - ) - .into(); - output - } - }; - output - }, - " Returns any unit vector that is orthogonal to the given one.\n The input vector must be unit length.\n # Panics\n Will panic if `self` is not normalized when `glam_assert` is enabled.", - &["_self"], - ) - .register_documented( - "as_dvec3", - |_self: Ref| { - let output: Val = { - { - let output: Val = bevy::math::Vec3A::as_dvec3( - &_self, - ) - .into(); - output - } - }; - output - }, - " Casts all elements of `self` to `f64`.", - &["_self"], - ) - .register_documented( - "as_i16vec3", - |_self: Ref| { - let output: Val = { - { - let output: Val = bevy::math::Vec3A::as_i16vec3( - &_self, - ) - .into(); - output - } - }; - output - }, - " Casts all elements of `self` to `i16`.", - &["_self"], - ) - .register_documented( - "as_i64vec3", - |_self: Ref| { - let output: Val = { - { - let output: Val = bevy::math::Vec3A::as_i64vec3( - &_self, - ) - .into(); - output - } - }; - output - }, - " Casts all elements of `self` to `i64`.", - &["_self"], - ) - .register_documented( - "as_i8vec3", - |_self: Ref| { - let output: Val = { - { - let output: Val = bevy::math::Vec3A::as_i8vec3( - &_self, - ) - .into(); - output - } - }; - output - }, - " Casts all elements of `self` to `i8`.", - &["_self"], - ) - .register_documented( - "as_ivec3", - |_self: Ref| { - let output: Val = { - { - let output: Val = bevy::math::Vec3A::as_ivec3( - &_self, - ) - .into(); - output - } - }; - output - }, - " Casts all elements of `self` to `i32`.", - &["_self"], - ) - .register_documented( - "as_u16vec3", - |_self: Ref| { - let output: Val = { - { - let output: Val = bevy::math::Vec3A::as_u16vec3( - &_self, - ) - .into(); - output - } - }; - output - }, - " Casts all elements of `self` to `u16`.", - &["_self"], - ) - .register_documented( - "as_u64vec3", - |_self: Ref| { - let output: Val = { - { - let output: Val = bevy::math::Vec3A::as_u64vec3( - &_self, - ) - .into(); - output - } - }; - output - }, - " Casts all elements of `self` to `u64`.", - &["_self"], - ) - .register_documented( - "as_u8vec3", - |_self: Ref| { - let output: Val = { - { - let output: Val = bevy::math::Vec3A::as_u8vec3( - &_self, - ) - .into(); - output - } - }; - output - }, - " Casts all elements of `self` to `u8`.", - &["_self"], - ) - .register_documented( - "as_uvec3", - |_self: Ref| { - let output: Val = { - { - let output: Val = bevy::math::Vec3A::as_uvec3( - &_self, - ) - .into(); - output - } - }; - output - }, - " Casts all elements of `self` to `u32`.", - &["_self"], - ) - .register_documented( - "ceil", - |_self: Val| { - let output: Val = { - { - let output: Val = bevy::math::Vec3A::ceil( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector containing the smallest integer greater than or equal to a number for\n each element of `self`.", - &["_self"], - ) - .register_documented( - "clamp", - | - _self: Val, - min: Val, - max: Val| - { - let output: Val = { - { - let output: Val = bevy::math::Vec3A::clamp( - _self.into_inner(), - min.into_inner(), - max.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Component-wise clamping of values, similar to [`f32::clamp`].\n Each element in `min` must be less-or-equal to the corresponding element in `max`.\n # Panics\n Will panic if `min` is greater than `max` when `glam_assert` is enabled.", - &["_self", "min", "max"], - ) - .register_documented( - "clamp_length", - |_self: Val, min: f32, max: f32| { - let output: Val = { - { - let output: Val = bevy::math::Vec3A::clamp_length( - _self.into_inner(), - min, - max, - ) - .into(); - output - } - }; - output - }, - " Returns a vector with a length no less than `min` and no more than `max`.\n # Panics\n Will panic if `min` is greater than `max`, or if either `min` or `max` is negative, when `glam_assert` is enabled.", - &["_self", "min", "max"], - ) - .register_documented( - "clamp_length_max", - |_self: Val, max: f32| { - let output: Val = { - { - let output: Val = bevy::math::Vec3A::clamp_length_max( - _self.into_inner(), - max, - ) - .into(); - output - } - }; - output - }, - " Returns a vector with a length no more than `max`.\n # Panics\n Will panic if `max` is negative when `glam_assert` is enabled.", - &["_self", "max"], - ) - .register_documented( - "clamp_length_min", - |_self: Val, min: f32| { - let output: Val = { - { - let output: Val = bevy::math::Vec3A::clamp_length_min( - _self.into_inner(), - min, - ) - .into(); - output - } - }; - output - }, - " Returns a vector with a length no less than `min`.\n # Panics\n Will panic if `min` is negative when `glam_assert` is enabled.", - &["_self", "min"], - ) - .register_documented( - "clone", - |_self: Ref| { - let output: Val = { - { - let output: Val = ::clone( - &_self, - ) - .into(); - output - } - }; - output - }, - "", - &["_self"], - ) - .register_documented( - "cmpeq", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::Vec3A::cmpeq( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector mask containing the result of a `==` comparison for each element of\n `self` and `rhs`.\n In other words, this computes `[self.x == rhs.x, self.y == rhs.y, ..]` for all\n elements.", - &["_self", "rhs"], - ) - .register_documented( - "cmpge", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::Vec3A::cmpge( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector mask containing the result of a `>=` comparison for each element of\n `self` and `rhs`.\n In other words this computes `[self.x >= rhs.x, self.y >= rhs.y, ..]` for all\n elements.", - &["_self", "rhs"], - ) - .register_documented( - "cmpgt", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::Vec3A::cmpgt( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector mask containing the result of a `>` comparison for each element of\n `self` and `rhs`.\n In other words this computes `[self.x > rhs.x, self.y > rhs.y, ..]` for all\n elements.", - &["_self", "rhs"], - ) - .register_documented( - "cmple", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::Vec3A::cmple( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector mask containing the result of a `<=` comparison for each element of\n `self` and `rhs`.\n In other words this computes `[self.x <= rhs.x, self.y <= rhs.y, ..]` for all\n elements.", - &["_self", "rhs"], - ) - .register_documented( - "cmplt", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::Vec3A::cmplt( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector mask containing the result of a `<` comparison for each element of\n `self` and `rhs`.\n In other words this computes `[self.x < rhs.x, self.y < rhs.y, ..]` for all\n elements.", - &["_self", "rhs"], - ) - .register_documented( - "cmpne", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::Vec3A::cmpne( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector mask containing the result of a `!=` comparison for each element of\n `self` and `rhs`.\n In other words this computes `[self.x != rhs.x, self.y != rhs.y, ..]` for all\n elements.", - &["_self", "rhs"], - ) - .register_documented( - "copysign", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::Vec3A::copysign( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector with signs of `rhs` and the magnitudes of `self`.", - &["_self", "rhs"], - ) - .register_documented( - "cross", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::Vec3A::cross( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Computes the cross product of `self` and `rhs`.", - &["_self", "rhs"], - ) - .register_documented( - "distance", - |_self: Val, rhs: Val| { - let output: f32 = { - { - let output: f32 = bevy::math::Vec3A::distance( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Computes the Euclidean distance between two points in space.", - &["_self", "rhs"], - ) - .register_documented( - "distance_squared", - |_self: Val, rhs: Val| { - let output: f32 = { - { - let output: f32 = bevy::math::Vec3A::distance_squared( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Compute the squared euclidean distance between two points in space.", - &["_self", "rhs"], - ) - .register_documented( - "div", - |_self: Val, rhs: Ref| { - let output: Val = { - { - let output: Val = >::div(_self.into_inner(), &rhs) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "div", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = >::div(_self.into_inner(), rhs.into_inner()) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "div", - |_self: Val, rhs: f32| { - let output: Val = { - { - let output: Val = >::div(_self.into_inner(), rhs) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "div_euclid", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::Vec3A::div_euclid( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns the element-wise quotient of [Euclidean division] of `self` by `rhs`.", - &["_self", "rhs"], - ) - .register_documented( - "dot", - |_self: Val, rhs: Val| { - let output: f32 = { - { - let output: f32 = bevy::math::Vec3A::dot( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Computes the dot product of `self` and `rhs`.", - &["_self", "rhs"], - ) - .register_documented( - "dot_into_vec", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::Vec3A::dot_into_vec( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector where every component is the dot product of `self` and `rhs`.", - &["_self", "rhs"], - ) - .register_documented( - "element_product", - |_self: Val| { - let output: f32 = { - { - let output: f32 = bevy::math::Vec3A::element_product( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns the product of all elements of `self`.\n In other words, this computes `self.x * self.y * ..`.", - &["_self"], - ) - .register_documented( - "element_sum", - |_self: Val| { - let output: f32 = { - { - let output: f32 = bevy::math::Vec3A::element_sum( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns the sum of all elements of `self`.\n In other words, this computes `self.x + self.y + ..`.", - &["_self"], - ) - .register_documented( - "eq", - |_self: Ref, rhs: Ref| { - let output: bool = { - { - let output: bool = >::eq(&_self, &rhs) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "exp", - |_self: Val| { - let output: Val = { - { - let output: Val = bevy::math::Vec3A::exp( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector containing `e^self` (the exponential function) for each element of\n `self`.", - &["_self"], - ) - .register_documented( - "extend", - |_self: Val, w: f32| { - let output: Val = { - { - let output: Val = bevy::math::Vec3A::extend( - _self.into_inner(), - w, - ) - .into(); - output - } - }; - output - }, - " Creates a 4D vector from `self` and the given `w` value.", - &["_self", "w"], - ) - .register_documented( - "floor", - |_self: Val| { - let output: Val = { - { - let output: Val = bevy::math::Vec3A::floor( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector containing the largest integer less than or equal to a number for each\n element of `self`.", - &["_self"], - ) - .register_documented( - "fract", - |_self: Val| { - let output: Val = { - { - let output: Val = bevy::math::Vec3A::fract( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector containing the fractional part of the vector as `self - self.trunc()`.\n Note that this differs from the GLSL implementation of `fract` which returns\n `self - self.floor()`.\n Note that this is fast but not precise for large numbers.", - &["_self"], - ) - .register_documented( - "fract_gl", - |_self: Val| { - let output: Val = { - { - let output: Val = bevy::math::Vec3A::fract_gl( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector containing the fractional part of the vector as `self - self.floor()`.\n Note that this differs from the Rust implementation of `fract` which returns\n `self - self.trunc()`.\n Note that this is fast but not precise for large numbers.", - &["_self"], - ) - .register_documented( - "from_array", - |a: [f32; 3]| { - let output: Val = { - { - let output: Val = bevy::math::Vec3A::from_array( - a, - ) - .into(); - output - } - }; - output - }, - " Creates a new vector from an array.", - &["a"], - ) - .register_documented( - "from_vec4", - |v: Val| { - let output: Val = { - { - let output: Val = bevy::math::Vec3A::from_vec4( - v.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Creates a [`Vec3A`] from the `x`, `y` and `z` elements of `self` discarding `w`.\n On architectures where SIMD is supported such as SSE2 on `x86_64` this conversion is a noop.", - &["v"], - ) - .register_documented( - "is_finite", - |_self: Val| { - let output: bool = { - { - let output: bool = bevy::math::Vec3A::is_finite( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns `true` if, and only if, all elements are finite. If any element is either\n `NaN`, positive or negative infinity, this will return `false`.", - &["_self"], - ) - .register_documented( - "is_finite_mask", - |_self: Val| { - let output: Val = { - { - let output: Val = bevy::math::Vec3A::is_finite_mask( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Performs `is_finite` on each element of self, returning a vector mask of the results.\n In other words, this computes `[x.is_finite(), y.is_finite(), ...]`.", - &["_self"], - ) - .register_documented( - "is_nan", - |_self: Val| { - let output: bool = { - { - let output: bool = bevy::math::Vec3A::is_nan( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns `true` if any elements are `NaN`.", - &["_self"], - ) - .register_documented( - "is_nan_mask", - |_self: Val| { - let output: Val = { - { - let output: Val = bevy::math::Vec3A::is_nan_mask( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Performs `is_nan` on each element of self, returning a vector mask of the results.\n In other words, this computes `[x.is_nan(), y.is_nan(), ...]`.", - &["_self"], - ) - .register_documented( - "is_negative_bitmask", - |_self: Val| { - let output: u32 = { - { - let output: u32 = bevy::math::Vec3A::is_negative_bitmask( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a bitmask with the lowest 3 bits set to the sign bits from the elements of `self`.\n A negative element results in a `1` bit and a positive element in a `0` bit. Element `x` goes\n into the first lowest bit, element `y` into the second, etc.", - &["_self"], - ) - .register_documented( - "is_normalized", - |_self: Val| { - let output: bool = { - { - let output: bool = bevy::math::Vec3A::is_normalized( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns whether `self` is length `1.0` or not.\n Uses a precision threshold of approximately `1e-4`.", - &["_self"], - ) - .register_documented( - "length", - |_self: Val| { - let output: f32 = { - { - let output: f32 = bevy::math::Vec3A::length( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Computes the length of `self`.", - &["_self"], - ) - .register_documented( - "length_recip", - |_self: Val| { - let output: f32 = { - { - let output: f32 = bevy::math::Vec3A::length_recip( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Computes `1.0 / length()`.\n For valid results, `self` must _not_ be of length zero.", - &["_self"], - ) - .register_documented( - "length_squared", - |_self: Val| { - let output: f32 = { - { - let output: f32 = bevy::math::Vec3A::length_squared( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Computes the squared length of `self`.\n This is faster than `length()` as it avoids a square root operation.", - &["_self"], - ) - .register_documented( - "lerp", - |_self: Val, rhs: Val, s: f32| { - let output: Val = { - { - let output: Val = bevy::math::Vec3A::lerp( - _self.into_inner(), - rhs.into_inner(), - s, - ) - .into(); - output - } - }; - output - }, - " Performs a linear interpolation between `self` and `rhs` based on the value `s`.\n When `s` is `0.0`, the result will be equal to `self`. When `s` is `1.0`, the result\n will be equal to `rhs`. When `s` is outside of range `[0, 1]`, the result is linearly\n extrapolated.", - &["_self", "rhs", "s"], - ) - .register_documented( - "max", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::Vec3A::max( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector containing the maximum values for each element of `self` and `rhs`.\n In other words this computes `[self.x.max(rhs.x), self.y.max(rhs.y), ..]`.", - &["_self", "rhs"], - ) - .register_documented( - "max_element", - |_self: Val| { - let output: f32 = { - { - let output: f32 = bevy::math::Vec3A::max_element( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns the horizontal maximum of `self`.\n In other words this computes `max(x, y, ..)`.", - &["_self"], - ) - .register_documented( - "midpoint", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::Vec3A::midpoint( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Calculates the midpoint between `self` and `rhs`.\n The midpoint is the average of, or halfway point between, two vectors.\n `a.midpoint(b)` should yield the same result as `a.lerp(b, 0.5)`\n while being slightly cheaper to compute.", - &["_self", "rhs"], - ) - .register_documented( - "min", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::Vec3A::min( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector containing the minimum values for each element of `self` and `rhs`.\n In other words this computes `[self.x.min(rhs.x), self.y.min(rhs.y), ..]`.", - &["_self", "rhs"], - ) - .register_documented( - "min_element", - |_self: Val| { - let output: f32 = { - { - let output: f32 = bevy::math::Vec3A::min_element( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns the horizontal minimum of `self`.\n In other words this computes `min(x, y, ..)`.", - &["_self"], - ) - .register_documented( - "move_towards", - |_self: Ref, rhs: Val, d: f32| { - let output: Val = { - { - let output: Val = bevy::math::Vec3A::move_towards( - &_self, - rhs.into_inner(), - d, - ) - .into(); - output - } - }; - output - }, - " Moves towards `rhs` based on the value `d`.\n When `d` is `0.0`, the result will be equal to `self`. When `d` is equal to\n `self.distance(rhs)`, the result will be equal to `rhs`. Will not go past `rhs`.", - &["_self", "rhs", "d"], - ) - .register_documented( - "mul", - |_self: Val, rhs: Ref| { - let output: Val = { - { - let output: Val = >::mul(_self.into_inner(), &rhs) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "mul", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = >::mul(_self.into_inner(), rhs.into_inner()) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "mul", - |_self: Val, rhs: f32| { - let output: Val = { - { - let output: Val = >::mul(_self.into_inner(), rhs) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "mul_add", - | - _self: Val, - a: Val, - b: Val| - { - let output: Val = { - { - let output: Val = bevy::math::Vec3A::mul_add( - _self.into_inner(), - a.into_inner(), - b.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Fused multiply-add. Computes `(self * a) + b` element-wise with only one rounding\n error, yielding a more accurate result than an unfused multiply-add.\n Using `mul_add` *may* be more performant than an unfused multiply-add if the target\n architecture has a dedicated fma CPU instruction. However, this is not always true,\n and will be heavily dependant on designing algorithms with specific target hardware in\n mind.", - &["_self", "a", "b"], - ) - .register_documented( - "neg", - |_self: Val| { - let output: Val = { - { - let output: Val = ::neg( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - "", - &["_self"], - ) - .register_documented( - "new", - |x: f32, y: f32, z: f32| { - let output: Val = { - { - let output: Val = bevy::math::Vec3A::new( - x, - y, - z, - ) - .into(); - output - } - }; - output - }, - " Creates a new vector.", - &["x", "y", "z"], - ) - .register_documented( - "normalize", - |_self: Val| { - let output: Val = { - { - let output: Val = bevy::math::Vec3A::normalize( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns `self` normalized to length 1.0.\n For valid results, `self` must be finite and _not_ of length zero, nor very close to zero.\n See also [`Self::try_normalize()`] and [`Self::normalize_or_zero()`].\n Panics\n Will panic if the resulting normalized vector is not finite when `glam_assert` is enabled.", - &["_self"], - ) - .register_documented( - "normalize_or", - |_self: Val, fallback: Val| { - let output: Val = { - { - let output: Val = bevy::math::Vec3A::normalize_or( - _self.into_inner(), - fallback.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns `self` normalized to length 1.0 if possible, else returns a\n fallback value.\n In particular, if the input is zero (or very close to zero), or non-finite,\n the result of this operation will be the fallback value.\n See also [`Self::try_normalize()`].", - &["_self", "fallback"], - ) - .register_documented( - "normalize_or_zero", - |_self: Val| { - let output: Val = { - { - let output: Val = bevy::math::Vec3A::normalize_or_zero( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns `self` normalized to length 1.0 if possible, else returns zero.\n In particular, if the input is zero (or very close to zero), or non-finite,\n the result of this operation will be zero.\n See also [`Self::try_normalize()`].", - &["_self"], - ) - .register_documented( - "powf", - |_self: Val, n: f32| { - let output: Val = { - { - let output: Val = bevy::math::Vec3A::powf( - _self.into_inner(), - n, - ) - .into(); - output - } - }; - output - }, - " Returns a vector containing each element of `self` raised to the power of `n`.", - &["_self", "n"], - ) - .register_documented( - "project_onto", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::Vec3A::project_onto( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns the vector projection of `self` onto `rhs`.\n `rhs` must be of non-zero length.\n # Panics\n Will panic if `rhs` is zero length when `glam_assert` is enabled.", - &["_self", "rhs"], - ) - .register_documented( - "project_onto_normalized", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::Vec3A::project_onto_normalized( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns the vector projection of `self` onto `rhs`.\n `rhs` must be normalized.\n # Panics\n Will panic if `rhs` is not normalized when `glam_assert` is enabled.", - &["_self", "rhs"], - ) - .register_documented( - "recip", - |_self: Val| { - let output: Val = { - { - let output: Val = bevy::math::Vec3A::recip( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector containing the reciprocal `1.0/n` of each element of `self`.", - &["_self"], - ) - .register_documented( - "reflect", - |_self: Val, normal: Val| { - let output: Val = { - { - let output: Val = bevy::math::Vec3A::reflect( - _self.into_inner(), - normal.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns the reflection vector for a given incident vector `self` and surface normal\n `normal`.\n `normal` must be normalized.\n # Panics\n Will panic if `normal` is not normalized when `glam_assert` is enabled.", - &["_self", "normal"], - ) - .register_documented( - "refract", - | - _self: Val, - normal: Val, - eta: f32| - { - let output: Val = { - { - let output: Val = bevy::math::Vec3A::refract( - _self.into_inner(), - normal.into_inner(), - eta, - ) - .into(); - output - } - }; - output - }, - " Returns the refraction direction for a given incident vector `self`, surface normal\n `normal` and ratio of indices of refraction, `eta`. When total internal reflection occurs,\n a zero vector will be returned.\n `self` and `normal` must be normalized.\n # Panics\n Will panic if `self` or `normal` is not normalized when `glam_assert` is enabled.", - &["_self", "normal", "eta"], - ) - .register_documented( - "reject_from", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::Vec3A::reject_from( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns the vector rejection of `self` from `rhs`.\n The vector rejection is the vector perpendicular to the projection of `self` onto\n `rhs`, in rhs words the result of `self - self.project_onto(rhs)`.\n `rhs` must be of non-zero length.\n # Panics\n Will panic if `rhs` has a length of zero when `glam_assert` is enabled.", - &["_self", "rhs"], - ) - .register_documented( - "reject_from_normalized", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::Vec3A::reject_from_normalized( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns the vector rejection of `self` from `rhs`.\n The vector rejection is the vector perpendicular to the projection of `self` onto\n `rhs`, in rhs words the result of `self - self.project_onto(rhs)`.\n `rhs` must be normalized.\n # Panics\n Will panic if `rhs` is not normalized when `glam_assert` is enabled.", - &["_self", "rhs"], - ) - .register_documented( - "rem", - |_self: Val, rhs: Ref| { - let output: Val = { - { - let output: Val = >::rem(_self.into_inner(), &rhs) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "rem", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = >::rem(_self.into_inner(), rhs.into_inner()) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "rem", - |_self: Val, rhs: f32| { - let output: Val = { - { - let output: Val = >::rem(_self.into_inner(), rhs) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "rem_euclid", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::Vec3A::rem_euclid( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns the element-wise remainder of [Euclidean division] of `self` by `rhs`.\n [Euclidean division]: f32::rem_euclid", - &["_self", "rhs"], - ) - .register_documented( - "round", - |_self: Val| { - let output: Val = { - { - let output: Val = bevy::math::Vec3A::round( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector containing the nearest integer to a number for each element of `self`.\n Round half-way cases away from 0.0.", - &["_self"], - ) - .register_documented( - "select", - | - mask: Val, - if_true: Val, - if_false: Val| - { - let output: Val = { - { - let output: Val = bevy::math::Vec3A::select( - mask.into_inner(), - if_true.into_inner(), - if_false.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Creates a vector from the elements in `if_true` and `if_false`, selecting which to use\n for each element of `self`.\n A true element in the mask uses the corresponding element from `if_true`, and false\n uses the element from `if_false`.", - &["mask", "if_true", "if_false"], - ) - .register_documented( - "signum", - |_self: Val| { - let output: Val = { - { - let output: Val = bevy::math::Vec3A::signum( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector with elements representing the sign of `self`.\n - `1.0` if the number is positive, `+0.0` or `INFINITY`\n - `-1.0` if the number is negative, `-0.0` or `NEG_INFINITY`\n - `NAN` if the number is `NAN`", - &["_self"], - ) - .register_documented( - "splat", - |v: f32| { - let output: Val = { - { - let output: Val = bevy::math::Vec3A::splat( - v, - ) - .into(); - output - } - }; - output - }, - " Creates a vector with all elements set to `v`.", - &["v"], - ) - .register_documented( - "sub", - |_self: Val, rhs: Ref| { - let output: Val = { - { - let output: Val = >::sub(_self.into_inner(), &rhs) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "sub", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = >::sub(_self.into_inner(), rhs.into_inner()) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "sub", - |_self: Val, rhs: f32| { - let output: Val = { - { - let output: Val = >::sub(_self.into_inner(), rhs) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "to_array", - |_self: Ref| { - let output: [f32; 3] = { - { - let output: [f32; 3] = bevy::math::Vec3A::to_array(&_self) - .into(); - output - } - }; - output - }, - " `[x, y, z]`", - &["_self"], - ) - .register_documented( - "trunc", - |_self: Val| { - let output: Val = { - { - let output: Val = bevy::math::Vec3A::trunc( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector containing the integer part each element of `self`. This means numbers are\n always truncated towards zero.", - &["_self"], - ) - .register_documented( - "truncate", - |_self: Val| { - let output: Val = { - { - let output: Val = bevy::math::Vec3A::truncate( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Creates a 2D vector from the `x` and `y` elements of `self`, discarding `z`.\n Truncation may also be performed by using [`self.xy()`][crate::swizzles::Vec3Swizzles::xy()].", - &["_self"], - ) - .register_documented( - "with_x", - |_self: Val, x: f32| { - let output: Val = { - { - let output: Val = bevy::math::Vec3A::with_x( - _self.into_inner(), - x, - ) - .into(); - output - } - }; - output - }, - " Creates a 3D vector from `self` with the given value of `x`.", - &["_self", "x"], - ) - .register_documented( - "with_y", - |_self: Val, y: f32| { - let output: Val = { - { - let output: Val = bevy::math::Vec3A::with_y( - _self.into_inner(), - y, - ) - .into(); - output - } - }; - output - }, - " Creates a 3D vector from `self` with the given value of `y`.", - &["_self", "y"], - ) - .register_documented( - "with_z", - |_self: Val, z: f32| { - let output: Val = { - { - let output: Val = bevy::math::Vec3A::with_z( - _self.into_inner(), - z, - ) - .into(); - output - } - }; - output - }, - " Creates a 3D vector from `self` with the given value of `z`.", - &["_self", "z"], - ); - let registry = world - .get_resource_or_init::(); - let mut registry = registry.write(); - registry - .register_type_data::< - bevy::math::Vec3A, - bevy_mod_scripting_core::bindings::MarkAsGenerated, - >(); - } - pub(crate) fn register_vec_4_functions(world: &mut bevy::ecs::world::World) { - bevy_mod_scripting_core::bindings::function::namespace::NamespaceBuilder::< - bevy::math::Vec4, - >::new(world) - .register_documented( - "abs", - |_self: Val| { - let output: Val = { - { - let output: Val = bevy::math::Vec4::abs( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector containing the absolute value of each element of `self`.", - &["_self"], - ) - .register_documented( - "abs_diff_eq", - | - _self: Val, - rhs: Val, - max_abs_diff: f32| - { - let output: bool = { - { - let output: bool = bevy::math::Vec4::abs_diff_eq( - _self.into_inner(), - rhs.into_inner(), - max_abs_diff, - ) - .into(); - output - } - }; - output - }, - " Returns true if the absolute difference of all elements between `self` and `rhs` is\n less than or equal to `max_abs_diff`.\n This can be used to compare if two vectors contain similar elements. It works best when\n comparing with a known value. The `max_abs_diff` that should be used used depends on\n the values being compared against.\n For more see\n [comparing floating point numbers](https://randomascii.wordpress.com/2012/02/25/comparing-floating-point-numbers-2012-edition/).", - &["_self", "rhs", "max_abs_diff"], - ) - .register_documented( - "add", - |_self: Val, rhs: Ref| { - let output: Val = { - { - let output: Val = >::add(_self.into_inner(), &rhs) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "add", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = >::add(_self.into_inner(), rhs.into_inner()) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "add", - |_self: Val, rhs: f32| { - let output: Val = { - { - let output: Val = >::add(_self.into_inner(), rhs) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "as_dvec4", - |_self: Ref| { - let output: Val = { - { - let output: Val = bevy::math::Vec4::as_dvec4( - &_self, - ) - .into(); - output - } - }; - output - }, - " Casts all elements of `self` to `f64`.", - &["_self"], - ) - .register_documented( - "as_i16vec4", - |_self: Ref| { - let output: Val = { - { - let output: Val = bevy::math::Vec4::as_i16vec4( - &_self, - ) - .into(); - output - } - }; - output - }, - " Casts all elements of `self` to `i16`.", - &["_self"], - ) - .register_documented( - "as_i64vec4", - |_self: Ref| { - let output: Val = { - { - let output: Val = bevy::math::Vec4::as_i64vec4( - &_self, - ) - .into(); - output - } - }; - output - }, - " Casts all elements of `self` to `i64`.", - &["_self"], - ) - .register_documented( - "as_i8vec4", - |_self: Ref| { - let output: Val = { - { - let output: Val = bevy::math::Vec4::as_i8vec4( - &_self, - ) - .into(); - output - } - }; - output - }, - " Casts all elements of `self` to `i8`.", - &["_self"], - ) - .register_documented( - "as_ivec4", - |_self: Ref| { - let output: Val = { - { - let output: Val = bevy::math::Vec4::as_ivec4( - &_self, - ) - .into(); - output - } - }; - output - }, - " Casts all elements of `self` to `i32`.", - &["_self"], - ) - .register_documented( - "as_u16vec4", - |_self: Ref| { - let output: Val = { - { - let output: Val = bevy::math::Vec4::as_u16vec4( - &_self, - ) - .into(); - output - } - }; - output - }, - " Casts all elements of `self` to `u16`.", - &["_self"], - ) - .register_documented( - "as_u64vec4", - |_self: Ref| { - let output: Val = { - { - let output: Val = bevy::math::Vec4::as_u64vec4( - &_self, - ) - .into(); - output - } - }; - output - }, - " Casts all elements of `self` to `u64`.", - &["_self"], - ) - .register_documented( - "as_u8vec4", - |_self: Ref| { - let output: Val = { - { - let output: Val = bevy::math::Vec4::as_u8vec4( - &_self, - ) - .into(); - output - } - }; - output - }, - " Casts all elements of `self` to `u8`.", - &["_self"], - ) - .register_documented( - "as_uvec4", - |_self: Ref| { - let output: Val = { - { - let output: Val = bevy::math::Vec4::as_uvec4( - &_self, - ) - .into(); - output - } - }; - output - }, - " Casts all elements of `self` to `u32`.", - &["_self"], - ) - .register_documented( - "ceil", - |_self: Val| { - let output: Val = { - { - let output: Val = bevy::math::Vec4::ceil( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector containing the smallest integer greater than or equal to a number for\n each element of `self`.", - &["_self"], - ) - .register_documented( - "clamp", - | - _self: Val, - min: Val, - max: Val| - { - let output: Val = { - { - let output: Val = bevy::math::Vec4::clamp( - _self.into_inner(), - min.into_inner(), - max.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Component-wise clamping of values, similar to [`f32::clamp`].\n Each element in `min` must be less-or-equal to the corresponding element in `max`.\n # Panics\n Will panic if `min` is greater than `max` when `glam_assert` is enabled.", - &["_self", "min", "max"], - ) - .register_documented( - "clamp_length", - |_self: Val, min: f32, max: f32| { - let output: Val = { - { - let output: Val = bevy::math::Vec4::clamp_length( - _self.into_inner(), - min, - max, - ) - .into(); - output - } - }; - output - }, - " Returns a vector with a length no less than `min` and no more than `max`.\n # Panics\n Will panic if `min` is greater than `max`, or if either `min` or `max` is negative, when `glam_assert` is enabled.", - &["_self", "min", "max"], - ) - .register_documented( - "clamp_length_max", - |_self: Val, max: f32| { - let output: Val = { - { - let output: Val = bevy::math::Vec4::clamp_length_max( - _self.into_inner(), - max, - ) - .into(); - output - } - }; - output - }, - " Returns a vector with a length no more than `max`.\n # Panics\n Will panic if `max` is negative when `glam_assert` is enabled.", - &["_self", "max"], - ) - .register_documented( - "clamp_length_min", - |_self: Val, min: f32| { - let output: Val = { - { - let output: Val = bevy::math::Vec4::clamp_length_min( - _self.into_inner(), - min, - ) - .into(); - output - } - }; - output - }, - " Returns a vector with a length no less than `min`.\n # Panics\n Will panic if `min` is negative when `glam_assert` is enabled.", - &["_self", "min"], - ) - .register_documented( - "clone", - |_self: Ref| { - let output: Val = { - { - let output: Val = ::clone( - &_self, - ) - .into(); - output - } - }; - output - }, - "", - &["_self"], - ) - .register_documented( - "cmpeq", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::Vec4::cmpeq( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector mask containing the result of a `==` comparison for each element of\n `self` and `rhs`.\n In other words, this computes `[self.x == rhs.x, self.y == rhs.y, ..]` for all\n elements.", - &["_self", "rhs"], - ) - .register_documented( - "cmpge", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::Vec4::cmpge( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector mask containing the result of a `>=` comparison for each element of\n `self` and `rhs`.\n In other words this computes `[self.x >= rhs.x, self.y >= rhs.y, ..]` for all\n elements.", - &["_self", "rhs"], - ) - .register_documented( - "cmpgt", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::Vec4::cmpgt( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector mask containing the result of a `>` comparison for each element of\n `self` and `rhs`.\n In other words this computes `[self.x > rhs.x, self.y > rhs.y, ..]` for all\n elements.", - &["_self", "rhs"], - ) - .register_documented( - "cmple", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::Vec4::cmple( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector mask containing the result of a `<=` comparison for each element of\n `self` and `rhs`.\n In other words this computes `[self.x <= rhs.x, self.y <= rhs.y, ..]` for all\n elements.", - &["_self", "rhs"], - ) - .register_documented( - "cmplt", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::Vec4::cmplt( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector mask containing the result of a `<` comparison for each element of\n `self` and `rhs`.\n In other words this computes `[self.x < rhs.x, self.y < rhs.y, ..]` for all\n elements.", - &["_self", "rhs"], - ) - .register_documented( - "cmpne", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::Vec4::cmpne( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector mask containing the result of a `!=` comparison for each element of\n `self` and `rhs`.\n In other words this computes `[self.x != rhs.x, self.y != rhs.y, ..]` for all\n elements.", - &["_self", "rhs"], - ) - .register_documented( - "copysign", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::Vec4::copysign( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector with signs of `rhs` and the magnitudes of `self`.", - &["_self", "rhs"], - ) - .register_documented( - "distance", - |_self: Val, rhs: Val| { - let output: f32 = { - { - let output: f32 = bevy::math::Vec4::distance( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Computes the Euclidean distance between two points in space.", - &["_self", "rhs"], - ) - .register_documented( - "distance_squared", - |_self: Val, rhs: Val| { - let output: f32 = { - { - let output: f32 = bevy::math::Vec4::distance_squared( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Compute the squared euclidean distance between two points in space.", - &["_self", "rhs"], - ) - .register_documented( - "div", - |_self: Val, rhs: Ref| { - let output: Val = { - { - let output: Val = >::div(_self.into_inner(), &rhs) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "div", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = >::div(_self.into_inner(), rhs.into_inner()) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "div", - |_self: Val, rhs: f32| { - let output: Val = { - { - let output: Val = >::div(_self.into_inner(), rhs) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "div_euclid", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::Vec4::div_euclid( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns the element-wise quotient of [Euclidean division] of `self` by `rhs`.", - &["_self", "rhs"], - ) - .register_documented( - "dot", - |_self: Val, rhs: Val| { - let output: f32 = { - { - let output: f32 = bevy::math::Vec4::dot( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Computes the dot product of `self` and `rhs`.", - &["_self", "rhs"], - ) - .register_documented( - "dot_into_vec", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::Vec4::dot_into_vec( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector where every component is the dot product of `self` and `rhs`.", - &["_self", "rhs"], - ) - .register_documented( - "element_product", - |_self: Val| { - let output: f32 = { - { - let output: f32 = bevy::math::Vec4::element_product( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns the product of all elements of `self`.\n In other words, this computes `self.x * self.y * ..`.", - &["_self"], - ) - .register_documented( - "element_sum", - |_self: Val| { - let output: f32 = { - { - let output: f32 = bevy::math::Vec4::element_sum( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns the sum of all elements of `self`.\n In other words, this computes `self.x + self.y + ..`.", - &["_self"], - ) - .register_documented( - "eq", - |_self: Ref, rhs: Ref| { - let output: bool = { - { - let output: bool = >::eq(&_self, &rhs) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "exp", - |_self: Val| { - let output: Val = { - { - let output: Val = bevy::math::Vec4::exp( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector containing `e^self` (the exponential function) for each element of\n `self`.", - &["_self"], - ) - .register_documented( - "floor", - |_self: Val| { - let output: Val = { - { - let output: Val = bevy::math::Vec4::floor( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector containing the largest integer less than or equal to a number for each\n element of `self`.", - &["_self"], - ) - .register_documented( - "fract", - |_self: Val| { - let output: Val = { - { - let output: Val = bevy::math::Vec4::fract( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector containing the fractional part of the vector as `self - self.trunc()`.\n Note that this differs from the GLSL implementation of `fract` which returns\n `self - self.floor()`.\n Note that this is fast but not precise for large numbers.", - &["_self"], - ) - .register_documented( - "fract_gl", - |_self: Val| { - let output: Val = { - { - let output: Val = bevy::math::Vec4::fract_gl( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector containing the fractional part of the vector as `self - self.floor()`.\n Note that this differs from the Rust implementation of `fract` which returns\n `self - self.trunc()`.\n Note that this is fast but not precise for large numbers.", - &["_self"], - ) - .register_documented( - "from_array", - |a: [f32; 4]| { - let output: Val = { - { - let output: Val = bevy::math::Vec4::from_array( - a, - ) - .into(); - output - } - }; - output - }, - " Creates a new vector from an array.", - &["a"], - ) - .register_documented( - "is_finite", - |_self: Val| { - let output: bool = { - { - let output: bool = bevy::math::Vec4::is_finite( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns `true` if, and only if, all elements are finite. If any element is either\n `NaN`, positive or negative infinity, this will return `false`.", - &["_self"], - ) - .register_documented( - "is_finite_mask", - |_self: Val| { - let output: Val = { - { - let output: Val = bevy::math::Vec4::is_finite_mask( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Performs `is_finite` on each element of self, returning a vector mask of the results.\n In other words, this computes `[x.is_finite(), y.is_finite(), ...]`.", - &["_self"], - ) - .register_documented( - "is_nan", - |_self: Val| { - let output: bool = { - { - let output: bool = bevy::math::Vec4::is_nan( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns `true` if any elements are `NaN`.", - &["_self"], - ) - .register_documented( - "is_nan_mask", - |_self: Val| { - let output: Val = { - { - let output: Val = bevy::math::Vec4::is_nan_mask( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Performs `is_nan` on each element of self, returning a vector mask of the results.\n In other words, this computes `[x.is_nan(), y.is_nan(), ...]`.", - &["_self"], - ) - .register_documented( - "is_negative_bitmask", - |_self: Val| { - let output: u32 = { - { - let output: u32 = bevy::math::Vec4::is_negative_bitmask( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a bitmask with the lowest 4 bits set to the sign bits from the elements of `self`.\n A negative element results in a `1` bit and a positive element in a `0` bit. Element `x` goes\n into the first lowest bit, element `y` into the second, etc.", - &["_self"], - ) - .register_documented( - "is_normalized", - |_self: Val| { - let output: bool = { - { - let output: bool = bevy::math::Vec4::is_normalized( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns whether `self` is length `1.0` or not.\n Uses a precision threshold of approximately `1e-4`.", - &["_self"], - ) - .register_documented( - "length", - |_self: Val| { - let output: f32 = { - { - let output: f32 = bevy::math::Vec4::length( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Computes the length of `self`.", - &["_self"], - ) - .register_documented( - "length_recip", - |_self: Val| { - let output: f32 = { - { - let output: f32 = bevy::math::Vec4::length_recip( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Computes `1.0 / length()`.\n For valid results, `self` must _not_ be of length zero.", - &["_self"], - ) - .register_documented( - "length_squared", - |_self: Val| { - let output: f32 = { - { - let output: f32 = bevy::math::Vec4::length_squared( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Computes the squared length of `self`.\n This is faster than `length()` as it avoids a square root operation.", - &["_self"], - ) - .register_documented( - "lerp", - |_self: Val, rhs: Val, s: f32| { - let output: Val = { - { - let output: Val = bevy::math::Vec4::lerp( - _self.into_inner(), - rhs.into_inner(), - s, - ) - .into(); - output - } - }; - output - }, - " Performs a linear interpolation between `self` and `rhs` based on the value `s`.\n When `s` is `0.0`, the result will be equal to `self`. When `s` is `1.0`, the result\n will be equal to `rhs`. When `s` is outside of range `[0, 1]`, the result is linearly\n extrapolated.", - &["_self", "rhs", "s"], - ) - .register_documented( - "max", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::Vec4::max( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector containing the maximum values for each element of `self` and `rhs`.\n In other words this computes `[self.x.max(rhs.x), self.y.max(rhs.y), ..]`.", - &["_self", "rhs"], - ) - .register_documented( - "max_element", - |_self: Val| { - let output: f32 = { - { - let output: f32 = bevy::math::Vec4::max_element( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns the horizontal maximum of `self`.\n In other words this computes `max(x, y, ..)`.", - &["_self"], - ) - .register_documented( - "midpoint", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::Vec4::midpoint( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Calculates the midpoint between `self` and `rhs`.\n The midpoint is the average of, or halfway point between, two vectors.\n `a.midpoint(b)` should yield the same result as `a.lerp(b, 0.5)`\n while being slightly cheaper to compute.", - &["_self", "rhs"], - ) - .register_documented( - "min", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::Vec4::min( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector containing the minimum values for each element of `self` and `rhs`.\n In other words this computes `[self.x.min(rhs.x), self.y.min(rhs.y), ..]`.", - &["_self", "rhs"], - ) - .register_documented( - "min_element", - |_self: Val| { - let output: f32 = { - { - let output: f32 = bevy::math::Vec4::min_element( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns the horizontal minimum of `self`.\n In other words this computes `min(x, y, ..)`.", - &["_self"], - ) - .register_documented( - "move_towards", - |_self: Ref, rhs: Val, d: f32| { - let output: Val = { - { - let output: Val = bevy::math::Vec4::move_towards( - &_self, - rhs.into_inner(), - d, - ) - .into(); - output - } - }; - output - }, - " Moves towards `rhs` based on the value `d`.\n When `d` is `0.0`, the result will be equal to `self`. When `d` is equal to\n `self.distance(rhs)`, the result will be equal to `rhs`. Will not go past `rhs`.", - &["_self", "rhs", "d"], - ) - .register_documented( - "mul", - |_self: Val, rhs: Ref| { - let output: Val = { - { - let output: Val = >::mul(_self.into_inner(), &rhs) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "mul", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = >::mul(_self.into_inner(), rhs.into_inner()) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "mul", - |_self: Val, rhs: f32| { - let output: Val = { - { - let output: Val = >::mul(_self.into_inner(), rhs) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "mul_add", - | - _self: Val, - a: Val, - b: Val| - { - let output: Val = { - { - let output: Val = bevy::math::Vec4::mul_add( - _self.into_inner(), - a.into_inner(), - b.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Fused multiply-add. Computes `(self * a) + b` element-wise with only one rounding\n error, yielding a more accurate result than an unfused multiply-add.\n Using `mul_add` *may* be more performant than an unfused multiply-add if the target\n architecture has a dedicated fma CPU instruction. However, this is not always true,\n and will be heavily dependant on designing algorithms with specific target hardware in\n mind.", - &["_self", "a", "b"], - ) - .register_documented( - "neg", - |_self: Val| { - let output: Val = { - { - let output: Val = ::neg( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - "", - &["_self"], - ) - .register_documented( - "new", - |x: f32, y: f32, z: f32, w: f32| { - let output: Val = { - { - let output: Val = bevy::math::Vec4::new( - x, - y, - z, - w, - ) - .into(); - output - } - }; - output - }, - " Creates a new vector.", - &["x", "y", "z", "w"], - ) - .register_documented( - "normalize", - |_self: Val| { - let output: Val = { - { - let output: Val = bevy::math::Vec4::normalize( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns `self` normalized to length 1.0.\n For valid results, `self` must be finite and _not_ of length zero, nor very close to zero.\n See also [`Self::try_normalize()`] and [`Self::normalize_or_zero()`].\n Panics\n Will panic if the resulting normalized vector is not finite when `glam_assert` is enabled.", - &["_self"], - ) - .register_documented( - "normalize_or", - |_self: Val, fallback: Val| { - let output: Val = { - { - let output: Val = bevy::math::Vec4::normalize_or( - _self.into_inner(), - fallback.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns `self` normalized to length 1.0 if possible, else returns a\n fallback value.\n In particular, if the input is zero (or very close to zero), or non-finite,\n the result of this operation will be the fallback value.\n See also [`Self::try_normalize()`].", - &["_self", "fallback"], - ) - .register_documented( - "normalize_or_zero", - |_self: Val| { - let output: Val = { - { - let output: Val = bevy::math::Vec4::normalize_or_zero( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns `self` normalized to length 1.0 if possible, else returns zero.\n In particular, if the input is zero (or very close to zero), or non-finite,\n the result of this operation will be zero.\n See also [`Self::try_normalize()`].", - &["_self"], - ) - .register_documented( - "powf", - |_self: Val, n: f32| { - let output: Val = { - { - let output: Val = bevy::math::Vec4::powf( - _self.into_inner(), - n, - ) - .into(); - output - } - }; - output - }, - " Returns a vector containing each element of `self` raised to the power of `n`.", - &["_self", "n"], - ) - .register_documented( - "project_onto", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::Vec4::project_onto( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns the vector projection of `self` onto `rhs`.\n `rhs` must be of non-zero length.\n # Panics\n Will panic if `rhs` is zero length when `glam_assert` is enabled.", - &["_self", "rhs"], - ) - .register_documented( - "project_onto_normalized", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::Vec4::project_onto_normalized( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns the vector projection of `self` onto `rhs`.\n `rhs` must be normalized.\n # Panics\n Will panic if `rhs` is not normalized when `glam_assert` is enabled.", - &["_self", "rhs"], - ) - .register_documented( - "recip", - |_self: Val| { - let output: Val = { - { - let output: Val = bevy::math::Vec4::recip( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector containing the reciprocal `1.0/n` of each element of `self`.", - &["_self"], - ) - .register_documented( - "reflect", - |_self: Val, normal: Val| { - let output: Val = { - { - let output: Val = bevy::math::Vec4::reflect( - _self.into_inner(), - normal.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns the reflection vector for a given incident vector `self` and surface normal\n `normal`.\n `normal` must be normalized.\n # Panics\n Will panic if `normal` is not normalized when `glam_assert` is enabled.", - &["_self", "normal"], - ) - .register_documented( - "refract", - |_self: Val, normal: Val, eta: f32| { - let output: Val = { - { - let output: Val = bevy::math::Vec4::refract( - _self.into_inner(), - normal.into_inner(), - eta, - ) - .into(); - output - } - }; - output - }, - " Returns the refraction direction for a given incident vector `self`, surface normal\n `normal` and ratio of indices of refraction, `eta`. When total internal reflection occurs,\n a zero vector will be returned.\n `self` and `normal` must be normalized.\n # Panics\n Will panic if `self` or `normal` is not normalized when `glam_assert` is enabled.", - &["_self", "normal", "eta"], - ) - .register_documented( - "reject_from", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::Vec4::reject_from( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns the vector rejection of `self` from `rhs`.\n The vector rejection is the vector perpendicular to the projection of `self` onto\n `rhs`, in rhs words the result of `self - self.project_onto(rhs)`.\n `rhs` must be of non-zero length.\n # Panics\n Will panic if `rhs` has a length of zero when `glam_assert` is enabled.", - &["_self", "rhs"], - ) - .register_documented( - "reject_from_normalized", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::Vec4::reject_from_normalized( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns the vector rejection of `self` from `rhs`.\n The vector rejection is the vector perpendicular to the projection of `self` onto\n `rhs`, in rhs words the result of `self - self.project_onto(rhs)`.\n `rhs` must be normalized.\n # Panics\n Will panic if `rhs` is not normalized when `glam_assert` is enabled.", - &["_self", "rhs"], - ) - .register_documented( - "rem", - |_self: Val, rhs: Ref| { - let output: Val = { - { - let output: Val = >::rem(_self.into_inner(), &rhs) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "rem", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = >::rem(_self.into_inner(), rhs.into_inner()) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "rem", - |_self: Val, rhs: f32| { - let output: Val = { - { - let output: Val = >::rem(_self.into_inner(), rhs) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "rem_euclid", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::Vec4::rem_euclid( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns the element-wise remainder of [Euclidean division] of `self` by `rhs`.\n [Euclidean division]: f32::rem_euclid", - &["_self", "rhs"], - ) - .register_documented( - "round", - |_self: Val| { - let output: Val = { - { - let output: Val = bevy::math::Vec4::round( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector containing the nearest integer to a number for each element of `self`.\n Round half-way cases away from 0.0.", - &["_self"], - ) - .register_documented( - "select", - | - mask: Val, - if_true: Val, - if_false: Val| - { - let output: Val = { - { - let output: Val = bevy::math::Vec4::select( - mask.into_inner(), - if_true.into_inner(), - if_false.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Creates a vector from the elements in `if_true` and `if_false`, selecting which to use\n for each element of `self`.\n A true element in the mask uses the corresponding element from `if_true`, and false\n uses the element from `if_false`.", - &["mask", "if_true", "if_false"], - ) - .register_documented( - "signum", - |_self: Val| { - let output: Val = { - { - let output: Val = bevy::math::Vec4::signum( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector with elements representing the sign of `self`.\n - `1.0` if the number is positive, `+0.0` or `INFINITY`\n - `-1.0` if the number is negative, `-0.0` or `NEG_INFINITY`\n - `NAN` if the number is `NAN`", - &["_self"], - ) - .register_documented( - "splat", - |v: f32| { - let output: Val = { - { - let output: Val = bevy::math::Vec4::splat( - v, - ) - .into(); - output - } - }; - output - }, - " Creates a vector with all elements set to `v`.", - &["v"], - ) - .register_documented( - "sub", - |_self: Val, rhs: Ref| { - let output: Val = { - { - let output: Val = >::sub(_self.into_inner(), &rhs) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "sub", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = >::sub(_self.into_inner(), rhs.into_inner()) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "sub", - |_self: Val, rhs: f32| { - let output: Val = { - { - let output: Val = >::sub(_self.into_inner(), rhs) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "to_array", - |_self: Ref| { - let output: [f32; 4] = { - { - let output: [f32; 4] = bevy::math::Vec4::to_array(&_self) - .into(); - output - } - }; - output - }, - " `[x, y, z, w]`", - &["_self"], - ) - .register_documented( - "trunc", - |_self: Val| { - let output: Val = { - { - let output: Val = bevy::math::Vec4::trunc( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector containing the integer part each element of `self`. This means numbers are\n always truncated towards zero.", - &["_self"], - ) - .register_documented( - "truncate", - |_self: Val| { - let output: Val = { - { - let output: Val = bevy::math::Vec4::truncate( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Creates a 3D vector from the `x`, `y` and `z` elements of `self`, discarding `w`.\n Truncation to [`Vec3`] may also be performed by using [`self.xyz()`][crate::swizzles::Vec4Swizzles::xyz()].\n To truncate to [`Vec3A`] use [`Vec3A::from()`].", - &["_self"], - ) - .register_documented( - "with_w", - |_self: Val, w: f32| { - let output: Val = { - { - let output: Val = bevy::math::Vec4::with_w( - _self.into_inner(), - w, - ) - .into(); - output - } - }; - output - }, - " Creates a 4D vector from `self` with the given value of `w`.", - &["_self", "w"], - ) - .register_documented( - "with_x", - |_self: Val, x: f32| { - let output: Val = { - { - let output: Val = bevy::math::Vec4::with_x( - _self.into_inner(), - x, - ) - .into(); - output - } - }; - output - }, - " Creates a 4D vector from `self` with the given value of `x`.", - &["_self", "x"], - ) - .register_documented( - "with_y", - |_self: Val, y: f32| { - let output: Val = { - { - let output: Val = bevy::math::Vec4::with_y( - _self.into_inner(), - y, - ) - .into(); - output - } - }; - output - }, - " Creates a 4D vector from `self` with the given value of `y`.", - &["_self", "y"], - ) - .register_documented( - "with_z", - |_self: Val, z: f32| { - let output: Val = { - { - let output: Val = bevy::math::Vec4::with_z( - _self.into_inner(), - z, - ) - .into(); - output - } - }; - output - }, - " Creates a 4D vector from `self` with the given value of `z`.", - &["_self", "z"], - ); - let registry = world - .get_resource_or_init::(); - let mut registry = registry.write(); - registry - .register_type_data::< - bevy::math::Vec4, - bevy_mod_scripting_core::bindings::MarkAsGenerated, - >(); - } - pub(crate) fn register_b_vec_2_functions(world: &mut bevy::ecs::world::World) { - bevy_mod_scripting_core::bindings::function::namespace::NamespaceBuilder::< - bevy::math::BVec2, - >::new(world) - .register_documented( - "all", - |_self: Val| { - let output: bool = { - { - let output: bool = bevy::math::BVec2::all(_self.into_inner()) - .into(); - output - } - }; - output - }, - " Returns true if all the elements are true, false otherwise.", - &["_self"], - ) - .register_documented( - "any", - |_self: Val| { - let output: bool = { - { - let output: bool = bevy::math::BVec2::any(_self.into_inner()) - .into(); - output - } - }; - output - }, - " Returns true if any of the elements are true, false otherwise.", - &["_self"], - ) - .register_documented( - "assert_receiver_is_total_eq", - |_self: Ref| { - let output: () = { - { - let output: () = ::assert_receiver_is_total_eq( - &_self, - ) - .into(); - output - } - }; - output - }, - "", - &["_self"], - ) - .register_documented( - "bitmask", - |_self: Val| { - let output: u32 = { - { - let output: u32 = bevy::math::BVec2::bitmask( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a bitmask with the lowest 2 bits set from the elements of `self`.\n A true element results in a `1` bit and a false element in a `0` bit. Element `x` goes\n into the first lowest bit, element `y` into the second, etc.", - &["_self"], - ) - .register_documented( - "clone", - |_self: Ref| { - let output: Val = { - { - let output: Val = ::clone( - &_self, - ) - .into(); - output - } - }; - output - }, - "", - &["_self"], - ) - .register_documented( - "eq", - |_self: Ref, other: Ref| { - let output: bool = { - { - let output: bool = >::eq(&_self, &other) - .into(); - output - } - }; - output - }, - "", - &["_self", "other"], - ) - .register_documented( - "from_array", - |a: [bool; 2]| { - let output: Val = { - { - let output: Val = bevy::math::BVec2::from_array( - a, - ) - .into(); - output - } - }; - output - }, - " Creates a new vector mask from a bool array.", - &["a"], - ) - .register_documented( - "new", - |x: bool, y: bool| { - let output: Val = { - { - let output: Val = bevy::math::BVec2::new( - x, - y, - ) - .into(); - output - } - }; - output - }, - " Creates a new vector mask.", - &["x", "y"], - ) - .register_documented( - "set", - |mut _self: Mut, index: usize, value: bool| { - let output: () = { - { - let output: () = bevy::math::BVec2::set( - &mut _self, - index, - value, - ) - .into(); - output - } - }; - output - }, - " Sets the element at `index`.\n Panics if `index` is greater than 1.", - &["_self", "index", "value"], - ) - .register_documented( - "splat", - |v: bool| { - let output: Val = { - { - let output: Val = bevy::math::BVec2::splat( - v, - ) - .into(); - output - } - }; - output - }, - " Creates a vector mask with all elements set to `v`.", - &["v"], - ) - .register_documented( - "test", - |_self: Ref, index: usize| { - let output: bool = { - { - let output: bool = bevy::math::BVec2::test(&_self, index) - .into(); - output - } - }; - output - }, - " Tests the value at `index`.\n Panics if `index` is greater than 1.", - &["_self", "index"], - ); - let registry = world - .get_resource_or_init::(); - let mut registry = registry.write(); - registry - .register_type_data::< - bevy::math::BVec2, - bevy_mod_scripting_core::bindings::MarkAsGenerated, - >(); - } - pub(crate) fn register_b_vec_3_functions(world: &mut bevy::ecs::world::World) { - bevy_mod_scripting_core::bindings::function::namespace::NamespaceBuilder::< - bevy::math::BVec3, - >::new(world) - .register_documented( - "all", - |_self: Val| { - let output: bool = { - { - let output: bool = bevy::math::BVec3::all(_self.into_inner()) - .into(); - output - } - }; - output - }, - " Returns true if all the elements are true, false otherwise.", - &["_self"], - ) - .register_documented( - "any", - |_self: Val| { - let output: bool = { - { - let output: bool = bevy::math::BVec3::any(_self.into_inner()) - .into(); - output - } - }; - output - }, - " Returns true if any of the elements are true, false otherwise.", - &["_self"], - ) - .register_documented( - "assert_receiver_is_total_eq", - |_self: Ref| { - let output: () = { - { - let output: () = ::assert_receiver_is_total_eq( - &_self, - ) - .into(); - output - } - }; - output - }, - "", - &["_self"], - ) - .register_documented( - "bitmask", - |_self: Val| { - let output: u32 = { - { - let output: u32 = bevy::math::BVec3::bitmask( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a bitmask with the lowest 3 bits set from the elements of `self`.\n A true element results in a `1` bit and a false element in a `0` bit. Element `x` goes\n into the first lowest bit, element `y` into the second, etc.", - &["_self"], - ) - .register_documented( - "clone", - |_self: Ref| { - let output: Val = { - { - let output: Val = ::clone( - &_self, - ) - .into(); - output - } - }; - output - }, - "", - &["_self"], - ) - .register_documented( - "eq", - |_self: Ref, other: Ref| { - let output: bool = { - { - let output: bool = >::eq(&_self, &other) - .into(); - output - } - }; - output - }, - "", - &["_self", "other"], - ) - .register_documented( - "from_array", - |a: [bool; 3]| { - let output: Val = { - { - let output: Val = bevy::math::BVec3::from_array( - a, - ) - .into(); - output - } - }; - output - }, - " Creates a new vector mask from a bool array.", - &["a"], - ) - .register_documented( - "new", - |x: bool, y: bool, z: bool| { - let output: Val = { - { - let output: Val = bevy::math::BVec3::new( - x, - y, - z, - ) - .into(); - output - } - }; - output - }, - " Creates a new vector mask.", - &["x", "y", "z"], - ) - .register_documented( - "set", - |mut _self: Mut, index: usize, value: bool| { - let output: () = { - { - let output: () = bevy::math::BVec3::set( - &mut _self, - index, - value, - ) - .into(); - output - } - }; - output - }, - " Sets the element at `index`.\n Panics if `index` is greater than 2.", - &["_self", "index", "value"], - ) - .register_documented( - "splat", - |v: bool| { - let output: Val = { - { - let output: Val = bevy::math::BVec3::splat( - v, - ) - .into(); - output - } - }; - output - }, - " Creates a vector mask with all elements set to `v`.", - &["v"], - ) - .register_documented( - "test", - |_self: Ref, index: usize| { - let output: bool = { - { - let output: bool = bevy::math::BVec3::test(&_self, index) - .into(); - output - } - }; - output - }, - " Tests the value at `index`.\n Panics if `index` is greater than 2.", - &["_self", "index"], - ); - let registry = world - .get_resource_or_init::(); - let mut registry = registry.write(); - registry - .register_type_data::< - bevy::math::BVec3, - bevy_mod_scripting_core::bindings::MarkAsGenerated, - >(); - } - pub(crate) fn register_b_vec_4_functions(world: &mut bevy::ecs::world::World) { - bevy_mod_scripting_core::bindings::function::namespace::NamespaceBuilder::< - bevy::math::BVec4, - >::new(world) - .register_documented( - "all", - |_self: Val| { - let output: bool = { - { - let output: bool = bevy::math::BVec4::all(_self.into_inner()) - .into(); - output - } - }; - output - }, - " Returns true if all the elements are true, false otherwise.", - &["_self"], - ) - .register_documented( - "any", - |_self: Val| { - let output: bool = { - { - let output: bool = bevy::math::BVec4::any(_self.into_inner()) - .into(); - output - } - }; - output - }, - " Returns true if any of the elements are true, false otherwise.", - &["_self"], - ) - .register_documented( - "assert_receiver_is_total_eq", - |_self: Ref| { - let output: () = { - { - let output: () = ::assert_receiver_is_total_eq( - &_self, - ) - .into(); - output - } - }; - output - }, - "", - &["_self"], - ) - .register_documented( - "bitmask", - |_self: Val| { - let output: u32 = { - { - let output: u32 = bevy::math::BVec4::bitmask( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a bitmask with the lowest 4 bits set from the elements of `self`.\n A true element results in a `1` bit and a false element in a `0` bit. Element `x` goes\n into the first lowest bit, element `y` into the second, etc.", - &["_self"], - ) - .register_documented( - "clone", - |_self: Ref| { - let output: Val = { - { - let output: Val = ::clone( - &_self, - ) - .into(); - output - } - }; - output - }, - "", - &["_self"], - ) - .register_documented( - "eq", - |_self: Ref, other: Ref| { - let output: bool = { - { - let output: bool = >::eq(&_self, &other) - .into(); - output - } - }; - output - }, - "", - &["_self", "other"], - ) - .register_documented( - "from_array", - |a: [bool; 4]| { - let output: Val = { - { - let output: Val = bevy::math::BVec4::from_array( - a, - ) - .into(); - output - } - }; - output - }, - " Creates a new vector mask from a bool array.", - &["a"], - ) - .register_documented( - "new", - |x: bool, y: bool, z: bool, w: bool| { - let output: Val = { - { - let output: Val = bevy::math::BVec4::new( - x, - y, - z, - w, - ) - .into(); - output - } - }; - output - }, - " Creates a new vector mask.", - &["x", "y", "z", "w"], - ) - .register_documented( - "set", - |mut _self: Mut, index: usize, value: bool| { - let output: () = { - { - let output: () = bevy::math::BVec4::set( - &mut _self, - index, - value, - ) - .into(); - output - } - }; - output - }, - " Sets the element at `index`.\n Panics if `index` is greater than 3.", - &["_self", "index", "value"], - ) - .register_documented( - "splat", - |v: bool| { - let output: Val = { - { - let output: Val = bevy::math::BVec4::splat( - v, - ) - .into(); - output - } - }; - output - }, - " Creates a vector mask with all elements set to `v`.", - &["v"], - ) - .register_documented( - "test", - |_self: Ref, index: usize| { - let output: bool = { - { - let output: bool = bevy::math::BVec4::test(&_self, index) - .into(); - output - } - }; - output - }, - " Tests the value at `index`.\n Panics if `index` is greater than 3.", - &["_self", "index"], - ); - let registry = world - .get_resource_or_init::(); - let mut registry = registry.write(); - registry - .register_type_data::< - bevy::math::BVec4, - bevy_mod_scripting_core::bindings::MarkAsGenerated, - >(); - } - pub(crate) fn register_d_vec_2_functions(world: &mut bevy::ecs::world::World) { - bevy_mod_scripting_core::bindings::function::namespace::NamespaceBuilder::< - bevy::math::DVec2, - >::new(world) - .register_documented( - "abs", - |_self: Val| { - let output: Val = { - { - let output: Val = bevy::math::DVec2::abs( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector containing the absolute value of each element of `self`.", - &["_self"], - ) - .register_documented( - "abs_diff_eq", - | - _self: Val, - rhs: Val, - max_abs_diff: f64| - { - let output: bool = { - { - let output: bool = bevy::math::DVec2::abs_diff_eq( - _self.into_inner(), - rhs.into_inner(), - max_abs_diff, - ) - .into(); - output - } - }; - output - }, - " Returns true if the absolute difference of all elements between `self` and `rhs` is\n less than or equal to `max_abs_diff`.\n This can be used to compare if two vectors contain similar elements. It works best when\n comparing with a known value. The `max_abs_diff` that should be used used depends on\n the values being compared against.\n For more see\n [comparing floating point numbers](https://randomascii.wordpress.com/2012/02/25/comparing-floating-point-numbers-2012-edition/).", - &["_self", "rhs", "max_abs_diff"], - ) - .register_documented( - "add", - |_self: Val, rhs: Ref| { - let output: Val = { - { - let output: Val = >::add(_self.into_inner(), &rhs) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "add", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = >::add(_self.into_inner(), rhs.into_inner()) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "add", - |_self: Val, rhs: f64| { - let output: Val = { - { - let output: Val = >::add(_self.into_inner(), rhs) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "angle_between", - |_self: Val, rhs: Val| { - let output: f64 = { - { - let output: f64 = bevy::math::DVec2::angle_between( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "angle_to", - |_self: Val, rhs: Val| { - let output: f64 = { - { - let output: f64 = bevy::math::DVec2::angle_to( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns the angle of rotation (in radians) from `self` to `rhs` in the range `[-π, +π]`.\n The inputs do not need to be unit vectors however they must be non-zero.", - &["_self", "rhs"], - ) - .register_documented( - "as_i16vec2", - |_self: Ref| { - let output: Val = { - { - let output: Val = bevy::math::DVec2::as_i16vec2( - &_self, - ) - .into(); - output - } - }; - output - }, - " Casts all elements of `self` to `i16`.", - &["_self"], - ) - .register_documented( - "as_i64vec2", - |_self: Ref| { - let output: Val = { - { - let output: Val = bevy::math::DVec2::as_i64vec2( - &_self, - ) - .into(); - output - } - }; - output - }, - " Casts all elements of `self` to `i64`.", - &["_self"], - ) - .register_documented( - "as_i8vec2", - |_self: Ref| { - let output: Val = { - { - let output: Val = bevy::math::DVec2::as_i8vec2( - &_self, - ) - .into(); - output - } - }; - output - }, - " Casts all elements of `self` to `i8`.", - &["_self"], - ) - .register_documented( - "as_ivec2", - |_self: Ref| { - let output: Val = { - { - let output: Val = bevy::math::DVec2::as_ivec2( - &_self, - ) - .into(); - output - } - }; - output - }, - " Casts all elements of `self` to `i32`.", - &["_self"], - ) - .register_documented( - "as_u16vec2", - |_self: Ref| { - let output: Val = { - { - let output: Val = bevy::math::DVec2::as_u16vec2( - &_self, - ) - .into(); - output - } - }; - output - }, - " Casts all elements of `self` to `u16`.", - &["_self"], - ) - .register_documented( - "as_u64vec2", - |_self: Ref| { - let output: Val = { - { - let output: Val = bevy::math::DVec2::as_u64vec2( - &_self, - ) - .into(); - output - } - }; - output - }, - " Casts all elements of `self` to `u64`.", - &["_self"], - ) - .register_documented( - "as_u8vec2", - |_self: Ref| { - let output: Val = { - { - let output: Val = bevy::math::DVec2::as_u8vec2( - &_self, - ) - .into(); - output - } - }; - output - }, - " Casts all elements of `self` to `u8`.", - &["_self"], - ) - .register_documented( - "as_uvec2", - |_self: Ref| { - let output: Val = { - { - let output: Val = bevy::math::DVec2::as_uvec2( - &_self, - ) - .into(); - output - } - }; - output - }, - " Casts all elements of `self` to `u32`.", - &["_self"], - ) - .register_documented( - "as_vec2", - |_self: Ref| { - let output: Val = { - { - let output: Val = bevy::math::DVec2::as_vec2( - &_self, - ) - .into(); - output - } - }; - output - }, - " Casts all elements of `self` to `f32`.", - &["_self"], - ) - .register_documented( - "ceil", - |_self: Val| { - let output: Val = { - { - let output: Val = bevy::math::DVec2::ceil( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector containing the smallest integer greater than or equal to a number for\n each element of `self`.", - &["_self"], - ) - .register_documented( - "clamp", - | - _self: Val, - min: Val, - max: Val| - { - let output: Val = { - { - let output: Val = bevy::math::DVec2::clamp( - _self.into_inner(), - min.into_inner(), - max.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Component-wise clamping of values, similar to [`f64::clamp`].\n Each element in `min` must be less-or-equal to the corresponding element in `max`.\n # Panics\n Will panic if `min` is greater than `max` when `glam_assert` is enabled.", - &["_self", "min", "max"], - ) - .register_documented( - "clamp_length", - |_self: Val, min: f64, max: f64| { - let output: Val = { - { - let output: Val = bevy::math::DVec2::clamp_length( - _self.into_inner(), - min, - max, - ) - .into(); - output - } - }; - output - }, - " Returns a vector with a length no less than `min` and no more than `max`.\n # Panics\n Will panic if `min` is greater than `max`, or if either `min` or `max` is negative, when `glam_assert` is enabled.", - &["_self", "min", "max"], - ) - .register_documented( - "clamp_length_max", - |_self: Val, max: f64| { - let output: Val = { - { - let output: Val = bevy::math::DVec2::clamp_length_max( - _self.into_inner(), - max, - ) - .into(); - output - } - }; - output - }, - " Returns a vector with a length no more than `max`.\n # Panics\n Will panic if `max` is negative when `glam_assert` is enabled.", - &["_self", "max"], - ) - .register_documented( - "clamp_length_min", - |_self: Val, min: f64| { - let output: Val = { - { - let output: Val = bevy::math::DVec2::clamp_length_min( - _self.into_inner(), - min, - ) - .into(); - output - } - }; - output - }, - " Returns a vector with a length no less than `min`.\n # Panics\n Will panic if `min` is negative when `glam_assert` is enabled.", - &["_self", "min"], - ) - .register_documented( - "clone", - |_self: Ref| { - let output: Val = { - { - let output: Val = ::clone( - &_self, - ) - .into(); - output - } - }; - output - }, - "", - &["_self"], - ) - .register_documented( - "cmpeq", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::DVec2::cmpeq( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector mask containing the result of a `==` comparison for each element of\n `self` and `rhs`.\n In other words, this computes `[self.x == rhs.x, self.y == rhs.y, ..]` for all\n elements.", - &["_self", "rhs"], - ) - .register_documented( - "cmpge", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::DVec2::cmpge( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector mask containing the result of a `>=` comparison for each element of\n `self` and `rhs`.\n In other words this computes `[self.x >= rhs.x, self.y >= rhs.y, ..]` for all\n elements.", - &["_self", "rhs"], - ) - .register_documented( - "cmpgt", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::DVec2::cmpgt( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector mask containing the result of a `>` comparison for each element of\n `self` and `rhs`.\n In other words this computes `[self.x > rhs.x, self.y > rhs.y, ..]` for all\n elements.", - &["_self", "rhs"], - ) - .register_documented( - "cmple", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::DVec2::cmple( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector mask containing the result of a `<=` comparison for each element of\n `self` and `rhs`.\n In other words this computes `[self.x <= rhs.x, self.y <= rhs.y, ..]` for all\n elements.", - &["_self", "rhs"], - ) - .register_documented( - "cmplt", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::DVec2::cmplt( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector mask containing the result of a `<` comparison for each element of\n `self` and `rhs`.\n In other words this computes `[self.x < rhs.x, self.y < rhs.y, ..]` for all\n elements.", - &["_self", "rhs"], - ) - .register_documented( - "cmpne", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::DVec2::cmpne( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector mask containing the result of a `!=` comparison for each element of\n `self` and `rhs`.\n In other words this computes `[self.x != rhs.x, self.y != rhs.y, ..]` for all\n elements.", - &["_self", "rhs"], - ) - .register_documented( - "copysign", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::DVec2::copysign( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector with signs of `rhs` and the magnitudes of `self`.", - &["_self", "rhs"], - ) - .register_documented( - "distance", - |_self: Val, rhs: Val| { - let output: f64 = { - { - let output: f64 = bevy::math::DVec2::distance( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Computes the Euclidean distance between two points in space.", - &["_self", "rhs"], - ) - .register_documented( - "distance_squared", - |_self: Val, rhs: Val| { - let output: f64 = { - { - let output: f64 = bevy::math::DVec2::distance_squared( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Compute the squared euclidean distance between two points in space.", - &["_self", "rhs"], - ) - .register_documented( - "div", - |_self: Val, rhs: Ref| { - let output: Val = { - { - let output: Val = >::div(_self.into_inner(), &rhs) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "div", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = >::div(_self.into_inner(), rhs.into_inner()) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "div", - |_self: Val, rhs: f64| { - let output: Val = { - { - let output: Val = >::div(_self.into_inner(), rhs) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "div_euclid", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::DVec2::div_euclid( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns the element-wise quotient of [Euclidean division] of `self` by `rhs`.", - &["_self", "rhs"], - ) - .register_documented( - "dot", - |_self: Val, rhs: Val| { - let output: f64 = { - { - let output: f64 = bevy::math::DVec2::dot( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Computes the dot product of `self` and `rhs`.", - &["_self", "rhs"], - ) - .register_documented( - "dot_into_vec", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::DVec2::dot_into_vec( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector where every component is the dot product of `self` and `rhs`.", - &["_self", "rhs"], - ) - .register_documented( - "element_product", - |_self: Val| { - let output: f64 = { - { - let output: f64 = bevy::math::DVec2::element_product( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns the product of all elements of `self`.\n In other words, this computes `self.x * self.y * ..`.", - &["_self"], - ) - .register_documented( - "element_sum", - |_self: Val| { - let output: f64 = { - { - let output: f64 = bevy::math::DVec2::element_sum( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns the sum of all elements of `self`.\n In other words, this computes `self.x + self.y + ..`.", - &["_self"], - ) - .register_documented( - "eq", - |_self: Ref, other: Ref| { - let output: bool = { - { - let output: bool = >::eq(&_self, &other) - .into(); - output - } - }; - output - }, - "", - &["_self", "other"], - ) - .register_documented( - "exp", - |_self: Val| { - let output: Val = { - { - let output: Val = bevy::math::DVec2::exp( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector containing `e^self` (the exponential function) for each element of\n `self`.", - &["_self"], - ) - .register_documented( - "extend", - |_self: Val, z: f64| { - let output: Val = { - { - let output: Val = bevy::math::DVec2::extend( - _self.into_inner(), - z, - ) - .into(); - output - } - }; - output - }, - " Creates a 3D vector from `self` and the given `z` value.", - &["_self", "z"], - ) - .register_documented( - "floor", - |_self: Val| { - let output: Val = { - { - let output: Val = bevy::math::DVec2::floor( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector containing the largest integer less than or equal to a number for each\n element of `self`.", - &["_self"], - ) - .register_documented( - "fract", - |_self: Val| { - let output: Val = { - { - let output: Val = bevy::math::DVec2::fract( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector containing the fractional part of the vector as `self - self.trunc()`.\n Note that this differs from the GLSL implementation of `fract` which returns\n `self - self.floor()`.\n Note that this is fast but not precise for large numbers.", - &["_self"], - ) - .register_documented( - "fract_gl", - |_self: Val| { - let output: Val = { - { - let output: Val = bevy::math::DVec2::fract_gl( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector containing the fractional part of the vector as `self - self.floor()`.\n Note that this differs from the Rust implementation of `fract` which returns\n `self - self.trunc()`.\n Note that this is fast but not precise for large numbers.", - &["_self"], - ) - .register_documented( - "from_angle", - |angle: f64| { - let output: Val = { - { - let output: Val = bevy::math::DVec2::from_angle( - angle, - ) - .into(); - output - } - }; - output - }, - " Creates a 2D vector containing `[angle.cos(), angle.sin()]`. This can be used in\n conjunction with the [`rotate()`][Self::rotate()] method, e.g.\n `DVec2::from_angle(PI).rotate(DVec2::Y)` will create the vector `[-1, 0]`\n and rotate [`DVec2::Y`] around it returning `-DVec2::Y`.", - &["angle"], - ) - .register_documented( - "from_array", - |a: [f64; 2]| { - let output: Val = { - { - let output: Val = bevy::math::DVec2::from_array( - a, - ) - .into(); - output - } - }; - output - }, - " Creates a new vector from an array.", - &["a"], - ) - .register_documented( - "is_finite", - |_self: Val| { - let output: bool = { - { - let output: bool = bevy::math::DVec2::is_finite( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns `true` if, and only if, all elements are finite. If any element is either\n `NaN`, positive or negative infinity, this will return `false`.", - &["_self"], - ) - .register_documented( - "is_finite_mask", - |_self: Val| { - let output: Val = { - { - let output: Val = bevy::math::DVec2::is_finite_mask( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Performs `is_finite` on each element of self, returning a vector mask of the results.\n In other words, this computes `[x.is_finite(), y.is_finite(), ...]`.", - &["_self"], - ) - .register_documented( - "is_nan", - |_self: Val| { - let output: bool = { - { - let output: bool = bevy::math::DVec2::is_nan( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns `true` if any elements are `NaN`.", - &["_self"], - ) - .register_documented( - "is_nan_mask", - |_self: Val| { - let output: Val = { - { - let output: Val = bevy::math::DVec2::is_nan_mask( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Performs `is_nan` on each element of self, returning a vector mask of the results.\n In other words, this computes `[x.is_nan(), y.is_nan(), ...]`.", - &["_self"], - ) - .register_documented( - "is_negative_bitmask", - |_self: Val| { - let output: u32 = { - { - let output: u32 = bevy::math::DVec2::is_negative_bitmask( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a bitmask with the lowest 2 bits set to the sign bits from the elements of `self`.\n A negative element results in a `1` bit and a positive element in a `0` bit. Element `x` goes\n into the first lowest bit, element `y` into the second, etc.", - &["_self"], - ) - .register_documented( - "is_normalized", - |_self: Val| { - let output: bool = { - { - let output: bool = bevy::math::DVec2::is_normalized( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns whether `self` is length `1.0` or not.\n Uses a precision threshold of approximately `1e-4`.", - &["_self"], - ) - .register_documented( - "length", - |_self: Val| { - let output: f64 = { - { - let output: f64 = bevy::math::DVec2::length( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Computes the length of `self`.", - &["_self"], - ) - .register_documented( - "length_recip", - |_self: Val| { - let output: f64 = { - { - let output: f64 = bevy::math::DVec2::length_recip( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Computes `1.0 / length()`.\n For valid results, `self` must _not_ be of length zero.", - &["_self"], - ) - .register_documented( - "length_squared", - |_self: Val| { - let output: f64 = { - { - let output: f64 = bevy::math::DVec2::length_squared( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Computes the squared length of `self`.\n This is faster than `length()` as it avoids a square root operation.", - &["_self"], - ) - .register_documented( - "lerp", - |_self: Val, rhs: Val, s: f64| { - let output: Val = { - { - let output: Val = bevy::math::DVec2::lerp( - _self.into_inner(), - rhs.into_inner(), - s, - ) - .into(); - output - } - }; - output - }, - " Performs a linear interpolation between `self` and `rhs` based on the value `s`.\n When `s` is `0.0`, the result will be equal to `self`. When `s` is `1.0`, the result\n will be equal to `rhs`. When `s` is outside of range `[0, 1]`, the result is linearly\n extrapolated.", - &["_self", "rhs", "s"], - ) - .register_documented( - "max", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::DVec2::max( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector containing the maximum values for each element of `self` and `rhs`.\n In other words this computes `[self.x.max(rhs.x), self.y.max(rhs.y), ..]`.", - &["_self", "rhs"], - ) - .register_documented( - "max_element", - |_self: Val| { - let output: f64 = { - { - let output: f64 = bevy::math::DVec2::max_element( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns the horizontal maximum of `self`.\n In other words this computes `max(x, y, ..)`.", - &["_self"], - ) - .register_documented( - "midpoint", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::DVec2::midpoint( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Calculates the midpoint between `self` and `rhs`.\n The midpoint is the average of, or halfway point between, two vectors.\n `a.midpoint(b)` should yield the same result as `a.lerp(b, 0.5)`\n while being slightly cheaper to compute.", - &["_self", "rhs"], - ) - .register_documented( - "min", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::DVec2::min( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector containing the minimum values for each element of `self` and `rhs`.\n In other words this computes `[self.x.min(rhs.x), self.y.min(rhs.y), ..]`.", - &["_self", "rhs"], - ) - .register_documented( - "min_element", - |_self: Val| { - let output: f64 = { - { - let output: f64 = bevy::math::DVec2::min_element( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns the horizontal minimum of `self`.\n In other words this computes `min(x, y, ..)`.", - &["_self"], - ) - .register_documented( - "move_towards", - |_self: Ref, rhs: Val, d: f64| { - let output: Val = { - { - let output: Val = bevy::math::DVec2::move_towards( - &_self, - rhs.into_inner(), - d, - ) - .into(); - output - } - }; - output - }, - " Moves towards `rhs` based on the value `d`.\n When `d` is `0.0`, the result will be equal to `self`. When `d` is equal to\n `self.distance(rhs)`, the result will be equal to `rhs`. Will not go past `rhs`.", - &["_self", "rhs", "d"], - ) - .register_documented( - "mul", - |_self: Val, rhs: Ref| { - let output: Val = { - { - let output: Val = >::mul(_self.into_inner(), &rhs) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "mul", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = >::mul(_self.into_inner(), rhs.into_inner()) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "mul", - |_self: Val, rhs: f64| { - let output: Val = { - { - let output: Val = >::mul(_self.into_inner(), rhs) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "mul_add", - | - _self: Val, - a: Val, - b: Val| - { - let output: Val = { - { - let output: Val = bevy::math::DVec2::mul_add( - _self.into_inner(), - a.into_inner(), - b.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Fused multiply-add. Computes `(self * a) + b` element-wise with only one rounding\n error, yielding a more accurate result than an unfused multiply-add.\n Using `mul_add` *may* be more performant than an unfused multiply-add if the target\n architecture has a dedicated fma CPU instruction. However, this is not always true,\n and will be heavily dependant on designing algorithms with specific target hardware in\n mind.", - &["_self", "a", "b"], - ) - .register_documented( - "neg", - |_self: Val| { - let output: Val = { - { - let output: Val = ::neg( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - "", - &["_self"], - ) - .register_documented( - "new", - |x: f64, y: f64| { - let output: Val = { - { - let output: Val = bevy::math::DVec2::new( - x, - y, - ) - .into(); - output - } - }; - output - }, - " Creates a new vector.", - &["x", "y"], - ) - .register_documented( - "normalize", - |_self: Val| { - let output: Val = { - { - let output: Val = bevy::math::DVec2::normalize( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns `self` normalized to length 1.0.\n For valid results, `self` must be finite and _not_ of length zero, nor very close to zero.\n See also [`Self::try_normalize()`] and [`Self::normalize_or_zero()`].\n Panics\n Will panic if the resulting normalized vector is not finite when `glam_assert` is enabled.", - &["_self"], - ) - .register_documented( - "normalize_or", - |_self: Val, fallback: Val| { - let output: Val = { - { - let output: Val = bevy::math::DVec2::normalize_or( - _self.into_inner(), - fallback.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns `self` normalized to length 1.0 if possible, else returns a\n fallback value.\n In particular, if the input is zero (or very close to zero), or non-finite,\n the result of this operation will be the fallback value.\n See also [`Self::try_normalize()`].", - &["_self", "fallback"], - ) - .register_documented( - "normalize_or_zero", - |_self: Val| { - let output: Val = { - { - let output: Val = bevy::math::DVec2::normalize_or_zero( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns `self` normalized to length 1.0 if possible, else returns zero.\n In particular, if the input is zero (or very close to zero), or non-finite,\n the result of this operation will be zero.\n See also [`Self::try_normalize()`].", - &["_self"], - ) - .register_documented( - "perp", - |_self: Val| { - let output: Val = { - { - let output: Val = bevy::math::DVec2::perp( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector that is equal to `self` rotated by 90 degrees.", - &["_self"], - ) - .register_documented( - "perp_dot", - |_self: Val, rhs: Val| { - let output: f64 = { - { - let output: f64 = bevy::math::DVec2::perp_dot( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " The perpendicular dot product of `self` and `rhs`.\n Also known as the wedge product, 2D cross product, and determinant.", - &["_self", "rhs"], - ) - .register_documented( - "powf", - |_self: Val, n: f64| { - let output: Val = { - { - let output: Val = bevy::math::DVec2::powf( - _self.into_inner(), - n, - ) - .into(); - output - } - }; - output - }, - " Returns a vector containing each element of `self` raised to the power of `n`.", - &["_self", "n"], - ) - .register_documented( - "project_onto", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::DVec2::project_onto( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns the vector projection of `self` onto `rhs`.\n `rhs` must be of non-zero length.\n # Panics\n Will panic if `rhs` is zero length when `glam_assert` is enabled.", - &["_self", "rhs"], - ) - .register_documented( - "project_onto_normalized", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::DVec2::project_onto_normalized( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns the vector projection of `self` onto `rhs`.\n `rhs` must be normalized.\n # Panics\n Will panic if `rhs` is not normalized when `glam_assert` is enabled.", - &["_self", "rhs"], - ) - .register_documented( - "recip", - |_self: Val| { - let output: Val = { - { - let output: Val = bevy::math::DVec2::recip( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector containing the reciprocal `1.0/n` of each element of `self`.", - &["_self"], - ) - .register_documented( - "reflect", - |_self: Val, normal: Val| { - let output: Val = { - { - let output: Val = bevy::math::DVec2::reflect( - _self.into_inner(), - normal.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns the reflection vector for a given incident vector `self` and surface normal\n `normal`.\n `normal` must be normalized.\n # Panics\n Will panic if `normal` is not normalized when `glam_assert` is enabled.", - &["_self", "normal"], - ) - .register_documented( - "refract", - | - _self: Val, - normal: Val, - eta: f64| - { - let output: Val = { - { - let output: Val = bevy::math::DVec2::refract( - _self.into_inner(), - normal.into_inner(), - eta, - ) - .into(); - output - } - }; - output - }, - " Returns the refraction direction for a given incident vector `self`, surface normal\n `normal` and ratio of indices of refraction, `eta`. When total internal reflection occurs,\n a zero vector will be returned.\n `self` and `normal` must be normalized.\n # Panics\n Will panic if `self` or `normal` is not normalized when `glam_assert` is enabled.", - &["_self", "normal", "eta"], - ) - .register_documented( - "reject_from", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::DVec2::reject_from( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns the vector rejection of `self` from `rhs`.\n The vector rejection is the vector perpendicular to the projection of `self` onto\n `rhs`, in rhs words the result of `self - self.project_onto(rhs)`.\n `rhs` must be of non-zero length.\n # Panics\n Will panic if `rhs` has a length of zero when `glam_assert` is enabled.", - &["_self", "rhs"], - ) - .register_documented( - "reject_from_normalized", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::DVec2::reject_from_normalized( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns the vector rejection of `self` from `rhs`.\n The vector rejection is the vector perpendicular to the projection of `self` onto\n `rhs`, in rhs words the result of `self - self.project_onto(rhs)`.\n `rhs` must be normalized.\n # Panics\n Will panic if `rhs` is not normalized when `glam_assert` is enabled.", - &["_self", "rhs"], - ) - .register_documented( - "rem", - |_self: Val, rhs: Ref| { - let output: Val = { - { - let output: Val = >::rem(_self.into_inner(), &rhs) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "rem", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = >::rem(_self.into_inner(), rhs.into_inner()) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "rem", - |_self: Val, rhs: f64| { - let output: Val = { - { - let output: Val = >::rem(_self.into_inner(), rhs) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "rem_euclid", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::DVec2::rem_euclid( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns the element-wise remainder of [Euclidean division] of `self` by `rhs`.\n [Euclidean division]: f64::rem_euclid", - &["_self", "rhs"], - ) - .register_documented( - "rotate", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::DVec2::rotate( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns `rhs` rotated by the angle of `self`. If `self` is normalized,\n then this just rotation. This is what you usually want. Otherwise,\n it will be like a rotation with a multiplication by `self`'s length.", - &["_self", "rhs"], - ) - .register_documented( - "rotate_towards", - | - _self: Ref, - rhs: Val, - max_angle: f64| - { - let output: Val = { - { - let output: Val = bevy::math::DVec2::rotate_towards( - &_self, - rhs.into_inner(), - max_angle, - ) - .into(); - output - } - }; - output - }, - " Rotates towards `rhs` up to `max_angle` (in radians).\n When `max_angle` is `0.0`, the result will be equal to `self`. When `max_angle` is equal to\n `self.angle_between(rhs)`, the result will be equal to `rhs`. If `max_angle` is negative,\n rotates towards the exact opposite of `rhs`. Will not go past the target.", - &["_self", "rhs", "max_angle"], - ) - .register_documented( - "round", - |_self: Val| { - let output: Val = { - { - let output: Val = bevy::math::DVec2::round( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector containing the nearest integer to a number for each element of `self`.\n Round half-way cases away from 0.0.", - &["_self"], - ) - .register_documented( - "select", - | - mask: Val, - if_true: Val, - if_false: Val| - { - let output: Val = { - { - let output: Val = bevy::math::DVec2::select( - mask.into_inner(), - if_true.into_inner(), - if_false.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Creates a vector from the elements in `if_true` and `if_false`, selecting which to use\n for each element of `self`.\n A true element in the mask uses the corresponding element from `if_true`, and false\n uses the element from `if_false`.", - &["mask", "if_true", "if_false"], - ) - .register_documented( - "signum", - |_self: Val| { - let output: Val = { - { - let output: Val = bevy::math::DVec2::signum( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector with elements representing the sign of `self`.\n - `1.0` if the number is positive, `+0.0` or `INFINITY`\n - `-1.0` if the number is negative, `-0.0` or `NEG_INFINITY`\n - `NAN` if the number is `NAN`", - &["_self"], - ) - .register_documented( - "splat", - |v: f64| { - let output: Val = { - { - let output: Val = bevy::math::DVec2::splat( - v, - ) - .into(); - output - } - }; - output - }, - " Creates a vector with all elements set to `v`.", - &["v"], - ) - .register_documented( - "sub", - |_self: Val, rhs: Ref| { - let output: Val = { - { - let output: Val = >::sub(_self.into_inner(), &rhs) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "sub", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = >::sub(_self.into_inner(), rhs.into_inner()) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "sub", - |_self: Val, rhs: f64| { - let output: Val = { - { - let output: Val = >::sub(_self.into_inner(), rhs) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "to_angle", - |_self: Val| { - let output: f64 = { - { - let output: f64 = bevy::math::DVec2::to_angle( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns the angle (in radians) of this vector in the range `[-π, +π]`.\n The input does not need to be a unit vector however it must be non-zero.", - &["_self"], - ) - .register_documented( - "to_array", - |_self: Ref| { - let output: [f64; 2] = { - { - let output: [f64; 2] = bevy::math::DVec2::to_array(&_self) - .into(); - output - } - }; - output - }, - " `[x, y]`", - &["_self"], - ) - .register_documented( - "trunc", - |_self: Val| { - let output: Val = { - { - let output: Val = bevy::math::DVec2::trunc( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector containing the integer part each element of `self`. This means numbers are\n always truncated towards zero.", - &["_self"], - ) - .register_documented( - "with_x", - |_self: Val, x: f64| { - let output: Val = { - { - let output: Val = bevy::math::DVec2::with_x( - _self.into_inner(), - x, - ) - .into(); - output - } - }; - output - }, - " Creates a 2D vector from `self` with the given value of `x`.", - &["_self", "x"], - ) - .register_documented( - "with_y", - |_self: Val, y: f64| { - let output: Val = { - { - let output: Val = bevy::math::DVec2::with_y( - _self.into_inner(), - y, - ) - .into(); - output - } - }; - output - }, - " Creates a 2D vector from `self` with the given value of `y`.", - &["_self", "y"], - ); - let registry = world - .get_resource_or_init::(); - let mut registry = registry.write(); - registry - .register_type_data::< - bevy::math::DVec2, - bevy_mod_scripting_core::bindings::MarkAsGenerated, - >(); - } - pub(crate) fn register_d_vec_3_functions(world: &mut bevy::ecs::world::World) { - bevy_mod_scripting_core::bindings::function::namespace::NamespaceBuilder::< - bevy::math::DVec3, - >::new(world) - .register_documented( - "abs", - |_self: Val| { - let output: Val = { - { - let output: Val = bevy::math::DVec3::abs( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector containing the absolute value of each element of `self`.", - &["_self"], - ) - .register_documented( - "abs_diff_eq", - | - _self: Val, - rhs: Val, - max_abs_diff: f64| - { - let output: bool = { - { - let output: bool = bevy::math::DVec3::abs_diff_eq( - _self.into_inner(), - rhs.into_inner(), - max_abs_diff, - ) - .into(); - output - } - }; - output - }, - " Returns true if the absolute difference of all elements between `self` and `rhs` is\n less than or equal to `max_abs_diff`.\n This can be used to compare if two vectors contain similar elements. It works best when\n comparing with a known value. The `max_abs_diff` that should be used used depends on\n the values being compared against.\n For more see\n [comparing floating point numbers](https://randomascii.wordpress.com/2012/02/25/comparing-floating-point-numbers-2012-edition/).", - &["_self", "rhs", "max_abs_diff"], - ) - .register_documented( - "add", - |_self: Val, rhs: Ref| { - let output: Val = { - { - let output: Val = >::add(_self.into_inner(), &rhs) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "add", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = >::add(_self.into_inner(), rhs.into_inner()) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "add", - |_self: Val, rhs: f64| { - let output: Val = { - { - let output: Val = >::add(_self.into_inner(), rhs) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "angle_between", - |_self: Val, rhs: Val| { - let output: f64 = { - { - let output: f64 = bevy::math::DVec3::angle_between( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns the angle (in radians) between two vectors in the range `[0, +π]`.\n The inputs do not need to be unit vectors however they must be non-zero.", - &["_self", "rhs"], - ) - .register_documented( - "any_orthogonal_vector", - |_self: Ref| { - let output: Val = { - { - let output: Val = bevy::math::DVec3::any_orthogonal_vector( - &_self, - ) - .into(); - output - } - }; - output - }, - " Returns some vector that is orthogonal to the given one.\n The input vector must be finite and non-zero.\n The output vector is not necessarily unit length. For that use\n [`Self::any_orthonormal_vector()`] instead.", - &["_self"], - ) - .register_documented( - "any_orthonormal_vector", - |_self: Ref| { - let output: Val = { - { - let output: Val = bevy::math::DVec3::any_orthonormal_vector( - &_self, - ) - .into(); - output - } - }; - output - }, - " Returns any unit vector that is orthogonal to the given one.\n The input vector must be unit length.\n # Panics\n Will panic if `self` is not normalized when `glam_assert` is enabled.", - &["_self"], - ) - .register_documented( - "as_i16vec3", - |_self: Ref| { - let output: Val = { - { - let output: Val = bevy::math::DVec3::as_i16vec3( - &_self, - ) - .into(); - output - } - }; - output - }, - " Casts all elements of `self` to `i16`.", - &["_self"], - ) - .register_documented( - "as_i64vec3", - |_self: Ref| { - let output: Val = { - { - let output: Val = bevy::math::DVec3::as_i64vec3( - &_self, - ) - .into(); - output - } - }; - output - }, - " Casts all elements of `self` to `i64`.", - &["_self"], - ) - .register_documented( - "as_i8vec3", - |_self: Ref| { - let output: Val = { - { - let output: Val = bevy::math::DVec3::as_i8vec3( - &_self, - ) - .into(); - output - } - }; - output - }, - " Casts all elements of `self` to `i8`.", - &["_self"], - ) - .register_documented( - "as_ivec3", - |_self: Ref| { - let output: Val = { - { - let output: Val = bevy::math::DVec3::as_ivec3( - &_self, - ) - .into(); - output - } - }; - output - }, - " Casts all elements of `self` to `i32`.", - &["_self"], - ) - .register_documented( - "as_u16vec3", - |_self: Ref| { - let output: Val = { - { - let output: Val = bevy::math::DVec3::as_u16vec3( - &_self, - ) - .into(); - output - } - }; - output - }, - " Casts all elements of `self` to `u16`.", - &["_self"], - ) - .register_documented( - "as_u64vec3", - |_self: Ref| { - let output: Val = { - { - let output: Val = bevy::math::DVec3::as_u64vec3( - &_self, - ) - .into(); - output - } - }; - output - }, - " Casts all elements of `self` to `u64`.", - &["_self"], - ) - .register_documented( - "as_u8vec3", - |_self: Ref| { - let output: Val = { - { - let output: Val = bevy::math::DVec3::as_u8vec3( - &_self, - ) - .into(); - output - } - }; - output - }, - " Casts all elements of `self` to `u8`.", - &["_self"], - ) - .register_documented( - "as_uvec3", - |_self: Ref| { - let output: Val = { - { - let output: Val = bevy::math::DVec3::as_uvec3( - &_self, - ) - .into(); - output - } - }; - output - }, - " Casts all elements of `self` to `u32`.", - &["_self"], - ) - .register_documented( - "as_vec3", - |_self: Ref| { - let output: Val = { - { - let output: Val = bevy::math::DVec3::as_vec3( - &_self, - ) - .into(); - output - } - }; - output - }, - " Casts all elements of `self` to `f32`.", - &["_self"], - ) - .register_documented( - "as_vec3a", - |_self: Ref| { - let output: Val = { - { - let output: Val = bevy::math::DVec3::as_vec3a( - &_self, - ) - .into(); - output - } - }; - output - }, - " Casts all elements of `self` to `f32`.", - &["_self"], - ) - .register_documented( - "ceil", - |_self: Val| { - let output: Val = { - { - let output: Val = bevy::math::DVec3::ceil( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector containing the smallest integer greater than or equal to a number for\n each element of `self`.", - &["_self"], - ) - .register_documented( - "clamp", - | - _self: Val, - min: Val, - max: Val| - { - let output: Val = { - { - let output: Val = bevy::math::DVec3::clamp( - _self.into_inner(), - min.into_inner(), - max.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Component-wise clamping of values, similar to [`f64::clamp`].\n Each element in `min` must be less-or-equal to the corresponding element in `max`.\n # Panics\n Will panic if `min` is greater than `max` when `glam_assert` is enabled.", - &["_self", "min", "max"], - ) - .register_documented( - "clamp_length", - |_self: Val, min: f64, max: f64| { - let output: Val = { - { - let output: Val = bevy::math::DVec3::clamp_length( - _self.into_inner(), - min, - max, - ) - .into(); - output - } - }; - output - }, - " Returns a vector with a length no less than `min` and no more than `max`.\n # Panics\n Will panic if `min` is greater than `max`, or if either `min` or `max` is negative, when `glam_assert` is enabled.", - &["_self", "min", "max"], - ) - .register_documented( - "clamp_length_max", - |_self: Val, max: f64| { - let output: Val = { - { - let output: Val = bevy::math::DVec3::clamp_length_max( - _self.into_inner(), - max, - ) - .into(); - output - } - }; - output - }, - " Returns a vector with a length no more than `max`.\n # Panics\n Will panic if `max` is negative when `glam_assert` is enabled.", - &["_self", "max"], - ) - .register_documented( - "clamp_length_min", - |_self: Val, min: f64| { - let output: Val = { - { - let output: Val = bevy::math::DVec3::clamp_length_min( - _self.into_inner(), - min, - ) - .into(); - output - } - }; - output - }, - " Returns a vector with a length no less than `min`.\n # Panics\n Will panic if `min` is negative when `glam_assert` is enabled.", - &["_self", "min"], - ) - .register_documented( - "clone", - |_self: Ref| { - let output: Val = { - { - let output: Val = ::clone( - &_self, - ) - .into(); - output - } - }; - output - }, - "", - &["_self"], - ) - .register_documented( - "cmpeq", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::DVec3::cmpeq( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector mask containing the result of a `==` comparison for each element of\n `self` and `rhs`.\n In other words, this computes `[self.x == rhs.x, self.y == rhs.y, ..]` for all\n elements.", - &["_self", "rhs"], - ) - .register_documented( - "cmpge", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::DVec3::cmpge( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector mask containing the result of a `>=` comparison for each element of\n `self` and `rhs`.\n In other words this computes `[self.x >= rhs.x, self.y >= rhs.y, ..]` for all\n elements.", - &["_self", "rhs"], - ) - .register_documented( - "cmpgt", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::DVec3::cmpgt( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector mask containing the result of a `>` comparison for each element of\n `self` and `rhs`.\n In other words this computes `[self.x > rhs.x, self.y > rhs.y, ..]` for all\n elements.", - &["_self", "rhs"], - ) - .register_documented( - "cmple", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::DVec3::cmple( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector mask containing the result of a `<=` comparison for each element of\n `self` and `rhs`.\n In other words this computes `[self.x <= rhs.x, self.y <= rhs.y, ..]` for all\n elements.", - &["_self", "rhs"], - ) - .register_documented( - "cmplt", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::DVec3::cmplt( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector mask containing the result of a `<` comparison for each element of\n `self` and `rhs`.\n In other words this computes `[self.x < rhs.x, self.y < rhs.y, ..]` for all\n elements.", - &["_self", "rhs"], - ) - .register_documented( - "cmpne", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::DVec3::cmpne( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector mask containing the result of a `!=` comparison for each element of\n `self` and `rhs`.\n In other words this computes `[self.x != rhs.x, self.y != rhs.y, ..]` for all\n elements.", - &["_self", "rhs"], - ) - .register_documented( - "copysign", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::DVec3::copysign( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector with signs of `rhs` and the magnitudes of `self`.", - &["_self", "rhs"], - ) - .register_documented( - "cross", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::DVec3::cross( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Computes the cross product of `self` and `rhs`.", - &["_self", "rhs"], - ) - .register_documented( - "distance", - |_self: Val, rhs: Val| { - let output: f64 = { - { - let output: f64 = bevy::math::DVec3::distance( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Computes the Euclidean distance between two points in space.", - &["_self", "rhs"], - ) - .register_documented( - "distance_squared", - |_self: Val, rhs: Val| { - let output: f64 = { - { - let output: f64 = bevy::math::DVec3::distance_squared( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Compute the squared euclidean distance between two points in space.", - &["_self", "rhs"], - ) - .register_documented( - "div", - |_self: Val, rhs: Ref| { - let output: Val = { - { - let output: Val = >::div(_self.into_inner(), &rhs) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "div", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = >::div(_self.into_inner(), rhs.into_inner()) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "div", - |_self: Val, rhs: f64| { - let output: Val = { - { - let output: Val = >::div(_self.into_inner(), rhs) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "div_euclid", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::DVec3::div_euclid( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns the element-wise quotient of [Euclidean division] of `self` by `rhs`.", - &["_self", "rhs"], - ) - .register_documented( - "dot", - |_self: Val, rhs: Val| { - let output: f64 = { - { - let output: f64 = bevy::math::DVec3::dot( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Computes the dot product of `self` and `rhs`.", - &["_self", "rhs"], - ) - .register_documented( - "dot_into_vec", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::DVec3::dot_into_vec( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector where every component is the dot product of `self` and `rhs`.", - &["_self", "rhs"], - ) - .register_documented( - "element_product", - |_self: Val| { - let output: f64 = { - { - let output: f64 = bevy::math::DVec3::element_product( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns the product of all elements of `self`.\n In other words, this computes `self.x * self.y * ..`.", - &["_self"], - ) - .register_documented( - "element_sum", - |_self: Val| { - let output: f64 = { - { - let output: f64 = bevy::math::DVec3::element_sum( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns the sum of all elements of `self`.\n In other words, this computes `self.x + self.y + ..`.", - &["_self"], - ) - .register_documented( - "eq", - |_self: Ref, other: Ref| { - let output: bool = { - { - let output: bool = >::eq(&_self, &other) - .into(); - output - } - }; - output - }, - "", - &["_self", "other"], - ) - .register_documented( - "exp", - |_self: Val| { - let output: Val = { - { - let output: Val = bevy::math::DVec3::exp( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector containing `e^self` (the exponential function) for each element of\n `self`.", - &["_self"], - ) - .register_documented( - "extend", - |_self: Val, w: f64| { - let output: Val = { - { - let output: Val = bevy::math::DVec3::extend( - _self.into_inner(), - w, - ) - .into(); - output - } - }; - output - }, - " Creates a 4D vector from `self` and the given `w` value.", - &["_self", "w"], - ) - .register_documented( - "floor", - |_self: Val| { - let output: Val = { - { - let output: Val = bevy::math::DVec3::floor( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector containing the largest integer less than or equal to a number for each\n element of `self`.", - &["_self"], - ) - .register_documented( - "fract", - |_self: Val| { - let output: Val = { - { - let output: Val = bevy::math::DVec3::fract( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector containing the fractional part of the vector as `self - self.trunc()`.\n Note that this differs from the GLSL implementation of `fract` which returns\n `self - self.floor()`.\n Note that this is fast but not precise for large numbers.", - &["_self"], - ) - .register_documented( - "fract_gl", - |_self: Val| { - let output: Val = { - { - let output: Val = bevy::math::DVec3::fract_gl( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector containing the fractional part of the vector as `self - self.floor()`.\n Note that this differs from the Rust implementation of `fract` which returns\n `self - self.trunc()`.\n Note that this is fast but not precise for large numbers.", - &["_self"], - ) - .register_documented( - "from_array", - |a: [f64; 3]| { - let output: Val = { - { - let output: Val = bevy::math::DVec3::from_array( - a, - ) - .into(); - output - } - }; - output - }, - " Creates a new vector from an array.", - &["a"], - ) - .register_documented( - "is_finite", - |_self: Val| { - let output: bool = { - { - let output: bool = bevy::math::DVec3::is_finite( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns `true` if, and only if, all elements are finite. If any element is either\n `NaN`, positive or negative infinity, this will return `false`.", - &["_self"], - ) - .register_documented( - "is_finite_mask", - |_self: Val| { - let output: Val = { - { - let output: Val = bevy::math::DVec3::is_finite_mask( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Performs `is_finite` on each element of self, returning a vector mask of the results.\n In other words, this computes `[x.is_finite(), y.is_finite(), ...]`.", - &["_self"], - ) - .register_documented( - "is_nan", - |_self: Val| { - let output: bool = { - { - let output: bool = bevy::math::DVec3::is_nan( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns `true` if any elements are `NaN`.", - &["_self"], - ) - .register_documented( - "is_nan_mask", - |_self: Val| { - let output: Val = { - { - let output: Val = bevy::math::DVec3::is_nan_mask( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Performs `is_nan` on each element of self, returning a vector mask of the results.\n In other words, this computes `[x.is_nan(), y.is_nan(), ...]`.", - &["_self"], - ) - .register_documented( - "is_negative_bitmask", - |_self: Val| { - let output: u32 = { - { - let output: u32 = bevy::math::DVec3::is_negative_bitmask( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a bitmask with the lowest 3 bits set to the sign bits from the elements of `self`.\n A negative element results in a `1` bit and a positive element in a `0` bit. Element `x` goes\n into the first lowest bit, element `y` into the second, etc.", - &["_self"], - ) - .register_documented( - "is_normalized", - |_self: Val| { - let output: bool = { - { - let output: bool = bevy::math::DVec3::is_normalized( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns whether `self` is length `1.0` or not.\n Uses a precision threshold of approximately `1e-4`.", - &["_self"], - ) - .register_documented( - "length", - |_self: Val| { - let output: f64 = { - { - let output: f64 = bevy::math::DVec3::length( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Computes the length of `self`.", - &["_self"], - ) - .register_documented( - "length_recip", - |_self: Val| { - let output: f64 = { - { - let output: f64 = bevy::math::DVec3::length_recip( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Computes `1.0 / length()`.\n For valid results, `self` must _not_ be of length zero.", - &["_self"], - ) - .register_documented( - "length_squared", - |_self: Val| { - let output: f64 = { - { - let output: f64 = bevy::math::DVec3::length_squared( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Computes the squared length of `self`.\n This is faster than `length()` as it avoids a square root operation.", - &["_self"], - ) - .register_documented( - "lerp", - |_self: Val, rhs: Val, s: f64| { - let output: Val = { - { - let output: Val = bevy::math::DVec3::lerp( - _self.into_inner(), - rhs.into_inner(), - s, - ) - .into(); - output - } - }; - output - }, - " Performs a linear interpolation between `self` and `rhs` based on the value `s`.\n When `s` is `0.0`, the result will be equal to `self`. When `s` is `1.0`, the result\n will be equal to `rhs`. When `s` is outside of range `[0, 1]`, the result is linearly\n extrapolated.", - &["_self", "rhs", "s"], - ) - .register_documented( - "max", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::DVec3::max( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector containing the maximum values for each element of `self` and `rhs`.\n In other words this computes `[self.x.max(rhs.x), self.y.max(rhs.y), ..]`.", - &["_self", "rhs"], - ) - .register_documented( - "max_element", - |_self: Val| { - let output: f64 = { - { - let output: f64 = bevy::math::DVec3::max_element( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns the horizontal maximum of `self`.\n In other words this computes `max(x, y, ..)`.", - &["_self"], - ) - .register_documented( - "midpoint", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::DVec3::midpoint( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Calculates the midpoint between `self` and `rhs`.\n The midpoint is the average of, or halfway point between, two vectors.\n `a.midpoint(b)` should yield the same result as `a.lerp(b, 0.5)`\n while being slightly cheaper to compute.", - &["_self", "rhs"], - ) - .register_documented( - "min", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::DVec3::min( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector containing the minimum values for each element of `self` and `rhs`.\n In other words this computes `[self.x.min(rhs.x), self.y.min(rhs.y), ..]`.", - &["_self", "rhs"], - ) - .register_documented( - "min_element", - |_self: Val| { - let output: f64 = { - { - let output: f64 = bevy::math::DVec3::min_element( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns the horizontal minimum of `self`.\n In other words this computes `min(x, y, ..)`.", - &["_self"], - ) - .register_documented( - "move_towards", - |_self: Ref, rhs: Val, d: f64| { - let output: Val = { - { - let output: Val = bevy::math::DVec3::move_towards( - &_self, - rhs.into_inner(), - d, - ) - .into(); - output - } - }; - output - }, - " Moves towards `rhs` based on the value `d`.\n When `d` is `0.0`, the result will be equal to `self`. When `d` is equal to\n `self.distance(rhs)`, the result will be equal to `rhs`. Will not go past `rhs`.", - &["_self", "rhs", "d"], - ) - .register_documented( - "mul", - |_self: Val, rhs: Ref| { - let output: Val = { - { - let output: Val = >::mul(_self.into_inner(), &rhs) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "mul", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = >::mul(_self.into_inner(), rhs.into_inner()) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "mul", - |_self: Val, rhs: f64| { - let output: Val = { - { - let output: Val = >::mul(_self.into_inner(), rhs) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "mul_add", - | - _self: Val, - a: Val, - b: Val| - { - let output: Val = { - { - let output: Val = bevy::math::DVec3::mul_add( - _self.into_inner(), - a.into_inner(), - b.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Fused multiply-add. Computes `(self * a) + b` element-wise with only one rounding\n error, yielding a more accurate result than an unfused multiply-add.\n Using `mul_add` *may* be more performant than an unfused multiply-add if the target\n architecture has a dedicated fma CPU instruction. However, this is not always true,\n and will be heavily dependant on designing algorithms with specific target hardware in\n mind.", - &["_self", "a", "b"], - ) - .register_documented( - "neg", - |_self: Val| { - let output: Val = { - { - let output: Val = ::neg( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - "", - &["_self"], - ) - .register_documented( - "new", - |x: f64, y: f64, z: f64| { - let output: Val = { - { - let output: Val = bevy::math::DVec3::new( - x, - y, - z, - ) - .into(); - output - } - }; - output - }, - " Creates a new vector.", - &["x", "y", "z"], - ) - .register_documented( - "normalize", - |_self: Val| { - let output: Val = { - { - let output: Val = bevy::math::DVec3::normalize( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns `self` normalized to length 1.0.\n For valid results, `self` must be finite and _not_ of length zero, nor very close to zero.\n See also [`Self::try_normalize()`] and [`Self::normalize_or_zero()`].\n Panics\n Will panic if the resulting normalized vector is not finite when `glam_assert` is enabled.", - &["_self"], - ) - .register_documented( - "normalize_or", - |_self: Val, fallback: Val| { - let output: Val = { - { - let output: Val = bevy::math::DVec3::normalize_or( - _self.into_inner(), - fallback.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns `self` normalized to length 1.0 if possible, else returns a\n fallback value.\n In particular, if the input is zero (or very close to zero), or non-finite,\n the result of this operation will be the fallback value.\n See also [`Self::try_normalize()`].", - &["_self", "fallback"], - ) - .register_documented( - "normalize_or_zero", - |_self: Val| { - let output: Val = { - { - let output: Val = bevy::math::DVec3::normalize_or_zero( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns `self` normalized to length 1.0 if possible, else returns zero.\n In particular, if the input is zero (or very close to zero), or non-finite,\n the result of this operation will be zero.\n See also [`Self::try_normalize()`].", - &["_self"], - ) - .register_documented( - "powf", - |_self: Val, n: f64| { - let output: Val = { - { - let output: Val = bevy::math::DVec3::powf( - _self.into_inner(), - n, - ) - .into(); - output - } - }; - output - }, - " Returns a vector containing each element of `self` raised to the power of `n`.", - &["_self", "n"], - ) - .register_documented( - "project_onto", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::DVec3::project_onto( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns the vector projection of `self` onto `rhs`.\n `rhs` must be of non-zero length.\n # Panics\n Will panic if `rhs` is zero length when `glam_assert` is enabled.", - &["_self", "rhs"], - ) - .register_documented( - "project_onto_normalized", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::DVec3::project_onto_normalized( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns the vector projection of `self` onto `rhs`.\n `rhs` must be normalized.\n # Panics\n Will panic if `rhs` is not normalized when `glam_assert` is enabled.", - &["_self", "rhs"], - ) - .register_documented( - "recip", - |_self: Val| { - let output: Val = { - { - let output: Val = bevy::math::DVec3::recip( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector containing the reciprocal `1.0/n` of each element of `self`.", - &["_self"], - ) - .register_documented( - "reflect", - |_self: Val, normal: Val| { - let output: Val = { - { - let output: Val = bevy::math::DVec3::reflect( - _self.into_inner(), - normal.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns the reflection vector for a given incident vector `self` and surface normal\n `normal`.\n `normal` must be normalized.\n # Panics\n Will panic if `normal` is not normalized when `glam_assert` is enabled.", - &["_self", "normal"], - ) - .register_documented( - "refract", - | - _self: Val, - normal: Val, - eta: f64| - { - let output: Val = { - { - let output: Val = bevy::math::DVec3::refract( - _self.into_inner(), - normal.into_inner(), - eta, - ) - .into(); - output - } - }; - output - }, - " Returns the refraction direction for a given incident vector `self`, surface normal\n `normal` and ratio of indices of refraction, `eta`. When total internal reflection occurs,\n a zero vector will be returned.\n `self` and `normal` must be normalized.\n # Panics\n Will panic if `self` or `normal` is not normalized when `glam_assert` is enabled.", - &["_self", "normal", "eta"], - ) - .register_documented( - "reject_from", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::DVec3::reject_from( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns the vector rejection of `self` from `rhs`.\n The vector rejection is the vector perpendicular to the projection of `self` onto\n `rhs`, in rhs words the result of `self - self.project_onto(rhs)`.\n `rhs` must be of non-zero length.\n # Panics\n Will panic if `rhs` has a length of zero when `glam_assert` is enabled.", - &["_self", "rhs"], - ) - .register_documented( - "reject_from_normalized", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::DVec3::reject_from_normalized( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns the vector rejection of `self` from `rhs`.\n The vector rejection is the vector perpendicular to the projection of `self` onto\n `rhs`, in rhs words the result of `self - self.project_onto(rhs)`.\n `rhs` must be normalized.\n # Panics\n Will panic if `rhs` is not normalized when `glam_assert` is enabled.", - &["_self", "rhs"], - ) - .register_documented( - "rem", - |_self: Val, rhs: Ref| { - let output: Val = { - { - let output: Val = >::rem(_self.into_inner(), &rhs) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "rem", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = >::rem(_self.into_inner(), rhs.into_inner()) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "rem", - |_self: Val, rhs: f64| { - let output: Val = { - { - let output: Val = >::rem(_self.into_inner(), rhs) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "rem_euclid", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::DVec3::rem_euclid( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns the element-wise remainder of [Euclidean division] of `self` by `rhs`.\n [Euclidean division]: f64::rem_euclid", - &["_self", "rhs"], - ) - .register_documented( - "round", - |_self: Val| { - let output: Val = { - { - let output: Val = bevy::math::DVec3::round( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector containing the nearest integer to a number for each element of `self`.\n Round half-way cases away from 0.0.", - &["_self"], - ) - .register_documented( - "select", - | - mask: Val, - if_true: Val, - if_false: Val| - { - let output: Val = { - { - let output: Val = bevy::math::DVec3::select( - mask.into_inner(), - if_true.into_inner(), - if_false.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Creates a vector from the elements in `if_true` and `if_false`, selecting which to use\n for each element of `self`.\n A true element in the mask uses the corresponding element from `if_true`, and false\n uses the element from `if_false`.", - &["mask", "if_true", "if_false"], - ) - .register_documented( - "signum", - |_self: Val| { - let output: Val = { - { - let output: Val = bevy::math::DVec3::signum( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector with elements representing the sign of `self`.\n - `1.0` if the number is positive, `+0.0` or `INFINITY`\n - `-1.0` if the number is negative, `-0.0` or `NEG_INFINITY`\n - `NAN` if the number is `NAN`", - &["_self"], - ) - .register_documented( - "splat", - |v: f64| { - let output: Val = { - { - let output: Val = bevy::math::DVec3::splat( - v, - ) - .into(); - output - } - }; - output - }, - " Creates a vector with all elements set to `v`.", - &["v"], - ) - .register_documented( - "sub", - |_self: Val, rhs: Ref| { - let output: Val = { - { - let output: Val = >::sub(_self.into_inner(), &rhs) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "sub", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = >::sub(_self.into_inner(), rhs.into_inner()) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "sub", - |_self: Val, rhs: f64| { - let output: Val = { - { - let output: Val = >::sub(_self.into_inner(), rhs) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "to_array", - |_self: Ref| { - let output: [f64; 3] = { - { - let output: [f64; 3] = bevy::math::DVec3::to_array(&_self) - .into(); - output - } - }; - output - }, - " `[x, y, z]`", - &["_self"], - ) - .register_documented( - "trunc", - |_self: Val| { - let output: Val = { - { - let output: Val = bevy::math::DVec3::trunc( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector containing the integer part each element of `self`. This means numbers are\n always truncated towards zero.", - &["_self"], - ) - .register_documented( - "truncate", - |_self: Val| { - let output: Val = { - { - let output: Val = bevy::math::DVec3::truncate( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Creates a 2D vector from the `x` and `y` elements of `self`, discarding `z`.\n Truncation may also be performed by using [`self.xy()`][crate::swizzles::Vec3Swizzles::xy()].", - &["_self"], - ) - .register_documented( - "with_x", - |_self: Val, x: f64| { - let output: Val = { - { - let output: Val = bevy::math::DVec3::with_x( - _self.into_inner(), - x, - ) - .into(); - output - } - }; - output - }, - " Creates a 3D vector from `self` with the given value of `x`.", - &["_self", "x"], - ) - .register_documented( - "with_y", - |_self: Val, y: f64| { - let output: Val = { - { - let output: Val = bevy::math::DVec3::with_y( - _self.into_inner(), - y, - ) - .into(); - output - } - }; - output - }, - " Creates a 3D vector from `self` with the given value of `y`.", - &["_self", "y"], - ) - .register_documented( - "with_z", - |_self: Val, z: f64| { - let output: Val = { - { - let output: Val = bevy::math::DVec3::with_z( - _self.into_inner(), - z, - ) - .into(); - output - } - }; - output - }, - " Creates a 3D vector from `self` with the given value of `z`.", - &["_self", "z"], - ); - let registry = world - .get_resource_or_init::(); - let mut registry = registry.write(); - registry - .register_type_data::< - bevy::math::DVec3, - bevy_mod_scripting_core::bindings::MarkAsGenerated, - >(); - } - pub(crate) fn register_d_vec_4_functions(world: &mut bevy::ecs::world::World) { - bevy_mod_scripting_core::bindings::function::namespace::NamespaceBuilder::< - bevy::math::DVec4, - >::new(world) - .register_documented( - "abs", - |_self: Val| { - let output: Val = { - { - let output: Val = bevy::math::DVec4::abs( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector containing the absolute value of each element of `self`.", - &["_self"], - ) - .register_documented( - "abs_diff_eq", - | - _self: Val, - rhs: Val, - max_abs_diff: f64| - { - let output: bool = { - { - let output: bool = bevy::math::DVec4::abs_diff_eq( - _self.into_inner(), - rhs.into_inner(), - max_abs_diff, - ) - .into(); - output - } - }; - output - }, - " Returns true if the absolute difference of all elements between `self` and `rhs` is\n less than or equal to `max_abs_diff`.\n This can be used to compare if two vectors contain similar elements. It works best when\n comparing with a known value. The `max_abs_diff` that should be used used depends on\n the values being compared against.\n For more see\n [comparing floating point numbers](https://randomascii.wordpress.com/2012/02/25/comparing-floating-point-numbers-2012-edition/).", - &["_self", "rhs", "max_abs_diff"], - ) - .register_documented( - "add", - |_self: Val, rhs: Ref| { - let output: Val = { - { - let output: Val = >::add(_self.into_inner(), &rhs) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "add", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = >::add(_self.into_inner(), rhs.into_inner()) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "add", - |_self: Val, rhs: f64| { - let output: Val = { - { - let output: Val = >::add(_self.into_inner(), rhs) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "as_i16vec4", - |_self: Ref| { - let output: Val = { - { - let output: Val = bevy::math::DVec4::as_i16vec4( - &_self, - ) - .into(); - output - } - }; - output - }, - " Casts all elements of `self` to `i16`.", - &["_self"], - ) - .register_documented( - "as_i64vec4", - |_self: Ref| { - let output: Val = { - { - let output: Val = bevy::math::DVec4::as_i64vec4( - &_self, - ) - .into(); - output - } - }; - output - }, - " Casts all elements of `self` to `i64`.", - &["_self"], - ) - .register_documented( - "as_i8vec4", - |_self: Ref| { - let output: Val = { - { - let output: Val = bevy::math::DVec4::as_i8vec4( - &_self, - ) - .into(); - output - } - }; - output - }, - " Casts all elements of `self` to `i8`.", - &["_self"], - ) - .register_documented( - "as_ivec4", - |_self: Ref| { - let output: Val = { - { - let output: Val = bevy::math::DVec4::as_ivec4( - &_self, - ) - .into(); - output - } - }; - output - }, - " Casts all elements of `self` to `i32`.", - &["_self"], - ) - .register_documented( - "as_u16vec4", - |_self: Ref| { - let output: Val = { - { - let output: Val = bevy::math::DVec4::as_u16vec4( - &_self, - ) - .into(); - output - } - }; - output - }, - " Casts all elements of `self` to `u16`.", - &["_self"], - ) - .register_documented( - "as_u64vec4", - |_self: Ref| { - let output: Val = { - { - let output: Val = bevy::math::DVec4::as_u64vec4( - &_self, - ) - .into(); - output - } - }; - output - }, - " Casts all elements of `self` to `u64`.", - &["_self"], - ) - .register_documented( - "as_u8vec4", - |_self: Ref| { - let output: Val = { - { - let output: Val = bevy::math::DVec4::as_u8vec4( - &_self, - ) - .into(); - output - } - }; - output - }, - " Casts all elements of `self` to `u8`.", - &["_self"], - ) - .register_documented( - "as_uvec4", - |_self: Ref| { - let output: Val = { - { - let output: Val = bevy::math::DVec4::as_uvec4( - &_self, - ) - .into(); - output - } - }; - output - }, - " Casts all elements of `self` to `u32`.", - &["_self"], - ) - .register_documented( - "as_vec4", - |_self: Ref| { - let output: Val = { - { - let output: Val = bevy::math::DVec4::as_vec4( - &_self, - ) - .into(); - output - } - }; - output - }, - " Casts all elements of `self` to `f32`.", - &["_self"], - ) - .register_documented( - "ceil", - |_self: Val| { - let output: Val = { - { - let output: Val = bevy::math::DVec4::ceil( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector containing the smallest integer greater than or equal to a number for\n each element of `self`.", - &["_self"], - ) - .register_documented( - "clamp", - | - _self: Val, - min: Val, - max: Val| - { - let output: Val = { - { - let output: Val = bevy::math::DVec4::clamp( - _self.into_inner(), - min.into_inner(), - max.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Component-wise clamping of values, similar to [`f64::clamp`].\n Each element in `min` must be less-or-equal to the corresponding element in `max`.\n # Panics\n Will panic if `min` is greater than `max` when `glam_assert` is enabled.", - &["_self", "min", "max"], - ) - .register_documented( - "clamp_length", - |_self: Val, min: f64, max: f64| { - let output: Val = { - { - let output: Val = bevy::math::DVec4::clamp_length( - _self.into_inner(), - min, - max, - ) - .into(); - output - } - }; - output - }, - " Returns a vector with a length no less than `min` and no more than `max`.\n # Panics\n Will panic if `min` is greater than `max`, or if either `min` or `max` is negative, when `glam_assert` is enabled.", - &["_self", "min", "max"], - ) - .register_documented( - "clamp_length_max", - |_self: Val, max: f64| { - let output: Val = { - { - let output: Val = bevy::math::DVec4::clamp_length_max( - _self.into_inner(), - max, - ) - .into(); - output - } - }; - output - }, - " Returns a vector with a length no more than `max`.\n # Panics\n Will panic if `max` is negative when `glam_assert` is enabled.", - &["_self", "max"], - ) - .register_documented( - "clamp_length_min", - |_self: Val, min: f64| { - let output: Val = { - { - let output: Val = bevy::math::DVec4::clamp_length_min( - _self.into_inner(), - min, - ) - .into(); - output - } - }; - output - }, - " Returns a vector with a length no less than `min`.\n # Panics\n Will panic if `min` is negative when `glam_assert` is enabled.", - &["_self", "min"], - ) - .register_documented( - "clone", - |_self: Ref| { - let output: Val = { - { - let output: Val = ::clone( - &_self, - ) - .into(); - output - } - }; - output - }, - "", - &["_self"], - ) - .register_documented( - "cmpeq", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::DVec4::cmpeq( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector mask containing the result of a `==` comparison for each element of\n `self` and `rhs`.\n In other words, this computes `[self.x == rhs.x, self.y == rhs.y, ..]` for all\n elements.", - &["_self", "rhs"], - ) - .register_documented( - "cmpge", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::DVec4::cmpge( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector mask containing the result of a `>=` comparison for each element of\n `self` and `rhs`.\n In other words this computes `[self.x >= rhs.x, self.y >= rhs.y, ..]` for all\n elements.", - &["_self", "rhs"], - ) - .register_documented( - "cmpgt", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::DVec4::cmpgt( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector mask containing the result of a `>` comparison for each element of\n `self` and `rhs`.\n In other words this computes `[self.x > rhs.x, self.y > rhs.y, ..]` for all\n elements.", - &["_self", "rhs"], - ) - .register_documented( - "cmple", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::DVec4::cmple( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector mask containing the result of a `<=` comparison for each element of\n `self` and `rhs`.\n In other words this computes `[self.x <= rhs.x, self.y <= rhs.y, ..]` for all\n elements.", - &["_self", "rhs"], - ) - .register_documented( - "cmplt", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::DVec4::cmplt( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector mask containing the result of a `<` comparison for each element of\n `self` and `rhs`.\n In other words this computes `[self.x < rhs.x, self.y < rhs.y, ..]` for all\n elements.", - &["_self", "rhs"], - ) - .register_documented( - "cmpne", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::DVec4::cmpne( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector mask containing the result of a `!=` comparison for each element of\n `self` and `rhs`.\n In other words this computes `[self.x != rhs.x, self.y != rhs.y, ..]` for all\n elements.", - &["_self", "rhs"], - ) - .register_documented( - "copysign", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::DVec4::copysign( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector with signs of `rhs` and the magnitudes of `self`.", - &["_self", "rhs"], - ) - .register_documented( - "distance", - |_self: Val, rhs: Val| { - let output: f64 = { - { - let output: f64 = bevy::math::DVec4::distance( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Computes the Euclidean distance between two points in space.", - &["_self", "rhs"], - ) - .register_documented( - "distance_squared", - |_self: Val, rhs: Val| { - let output: f64 = { - { - let output: f64 = bevy::math::DVec4::distance_squared( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Compute the squared euclidean distance between two points in space.", - &["_self", "rhs"], - ) - .register_documented( - "div", - |_self: Val, rhs: Ref| { - let output: Val = { - { - let output: Val = >::div(_self.into_inner(), &rhs) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "div", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = >::div(_self.into_inner(), rhs.into_inner()) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "div", - |_self: Val, rhs: f64| { - let output: Val = { - { - let output: Val = >::div(_self.into_inner(), rhs) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "div_euclid", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::DVec4::div_euclid( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns the element-wise quotient of [Euclidean division] of `self` by `rhs`.", - &["_self", "rhs"], - ) - .register_documented( - "dot", - |_self: Val, rhs: Val| { - let output: f64 = { - { - let output: f64 = bevy::math::DVec4::dot( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Computes the dot product of `self` and `rhs`.", - &["_self", "rhs"], - ) - .register_documented( - "dot_into_vec", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::DVec4::dot_into_vec( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector where every component is the dot product of `self` and `rhs`.", - &["_self", "rhs"], - ) - .register_documented( - "element_product", - |_self: Val| { - let output: f64 = { - { - let output: f64 = bevy::math::DVec4::element_product( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns the product of all elements of `self`.\n In other words, this computes `self.x * self.y * ..`.", - &["_self"], - ) - .register_documented( - "element_sum", - |_self: Val| { - let output: f64 = { - { - let output: f64 = bevy::math::DVec4::element_sum( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns the sum of all elements of `self`.\n In other words, this computes `self.x + self.y + ..`.", - &["_self"], - ) - .register_documented( - "eq", - |_self: Ref, other: Ref| { - let output: bool = { - { - let output: bool = >::eq(&_self, &other) - .into(); - output - } - }; - output - }, - "", - &["_self", "other"], - ) - .register_documented( - "exp", - |_self: Val| { - let output: Val = { - { - let output: Val = bevy::math::DVec4::exp( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector containing `e^self` (the exponential function) for each element of\n `self`.", - &["_self"], - ) - .register_documented( - "floor", - |_self: Val| { - let output: Val = { - { - let output: Val = bevy::math::DVec4::floor( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector containing the largest integer less than or equal to a number for each\n element of `self`.", - &["_self"], - ) - .register_documented( - "fract", - |_self: Val| { - let output: Val = { - { - let output: Val = bevy::math::DVec4::fract( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector containing the fractional part of the vector as `self - self.trunc()`.\n Note that this differs from the GLSL implementation of `fract` which returns\n `self - self.floor()`.\n Note that this is fast but not precise for large numbers.", - &["_self"], - ) - .register_documented( - "fract_gl", - |_self: Val| { - let output: Val = { - { - let output: Val = bevy::math::DVec4::fract_gl( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector containing the fractional part of the vector as `self - self.floor()`.\n Note that this differs from the Rust implementation of `fract` which returns\n `self - self.trunc()`.\n Note that this is fast but not precise for large numbers.", - &["_self"], - ) - .register_documented( - "from_array", - |a: [f64; 4]| { - let output: Val = { - { - let output: Val = bevy::math::DVec4::from_array( - a, - ) - .into(); - output - } - }; - output - }, - " Creates a new vector from an array.", - &["a"], - ) - .register_documented( - "is_finite", - |_self: Val| { - let output: bool = { - { - let output: bool = bevy::math::DVec4::is_finite( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns `true` if, and only if, all elements are finite. If any element is either\n `NaN`, positive or negative infinity, this will return `false`.", - &["_self"], - ) - .register_documented( - "is_finite_mask", - |_self: Val| { - let output: Val = { - { - let output: Val = bevy::math::DVec4::is_finite_mask( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Performs `is_finite` on each element of self, returning a vector mask of the results.\n In other words, this computes `[x.is_finite(), y.is_finite(), ...]`.", - &["_self"], - ) - .register_documented( - "is_nan", - |_self: Val| { - let output: bool = { - { - let output: bool = bevy::math::DVec4::is_nan( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns `true` if any elements are `NaN`.", - &["_self"], - ) - .register_documented( - "is_nan_mask", - |_self: Val| { - let output: Val = { - { - let output: Val = bevy::math::DVec4::is_nan_mask( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Performs `is_nan` on each element of self, returning a vector mask of the results.\n In other words, this computes `[x.is_nan(), y.is_nan(), ...]`.", - &["_self"], - ) - .register_documented( - "is_negative_bitmask", - |_self: Val| { - let output: u32 = { - { - let output: u32 = bevy::math::DVec4::is_negative_bitmask( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a bitmask with the lowest 4 bits set to the sign bits from the elements of `self`.\n A negative element results in a `1` bit and a positive element in a `0` bit. Element `x` goes\n into the first lowest bit, element `y` into the second, etc.", - &["_self"], - ) - .register_documented( - "is_normalized", - |_self: Val| { - let output: bool = { - { - let output: bool = bevy::math::DVec4::is_normalized( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns whether `self` is length `1.0` or not.\n Uses a precision threshold of approximately `1e-4`.", - &["_self"], - ) - .register_documented( - "length", - |_self: Val| { - let output: f64 = { - { - let output: f64 = bevy::math::DVec4::length( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Computes the length of `self`.", - &["_self"], - ) - .register_documented( - "length_recip", - |_self: Val| { - let output: f64 = { - { - let output: f64 = bevy::math::DVec4::length_recip( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Computes `1.0 / length()`.\n For valid results, `self` must _not_ be of length zero.", - &["_self"], - ) - .register_documented( - "length_squared", - |_self: Val| { - let output: f64 = { - { - let output: f64 = bevy::math::DVec4::length_squared( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Computes the squared length of `self`.\n This is faster than `length()` as it avoids a square root operation.", - &["_self"], - ) - .register_documented( - "lerp", - |_self: Val, rhs: Val, s: f64| { - let output: Val = { - { - let output: Val = bevy::math::DVec4::lerp( - _self.into_inner(), - rhs.into_inner(), - s, - ) - .into(); - output - } - }; - output - }, - " Performs a linear interpolation between `self` and `rhs` based on the value `s`.\n When `s` is `0.0`, the result will be equal to `self`. When `s` is `1.0`, the result\n will be equal to `rhs`. When `s` is outside of range `[0, 1]`, the result is linearly\n extrapolated.", - &["_self", "rhs", "s"], - ) - .register_documented( - "max", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::DVec4::max( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector containing the maximum values for each element of `self` and `rhs`.\n In other words this computes `[self.x.max(rhs.x), self.y.max(rhs.y), ..]`.", - &["_self", "rhs"], - ) - .register_documented( - "max_element", - |_self: Val| { - let output: f64 = { - { - let output: f64 = bevy::math::DVec4::max_element( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns the horizontal maximum of `self`.\n In other words this computes `max(x, y, ..)`.", - &["_self"], - ) - .register_documented( - "midpoint", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::DVec4::midpoint( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Calculates the midpoint between `self` and `rhs`.\n The midpoint is the average of, or halfway point between, two vectors.\n `a.midpoint(b)` should yield the same result as `a.lerp(b, 0.5)`\n while being slightly cheaper to compute.", - &["_self", "rhs"], - ) - .register_documented( - "min", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::DVec4::min( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector containing the minimum values for each element of `self` and `rhs`.\n In other words this computes `[self.x.min(rhs.x), self.y.min(rhs.y), ..]`.", - &["_self", "rhs"], - ) - .register_documented( - "min_element", - |_self: Val| { - let output: f64 = { - { - let output: f64 = bevy::math::DVec4::min_element( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns the horizontal minimum of `self`.\n In other words this computes `min(x, y, ..)`.", - &["_self"], - ) - .register_documented( - "move_towards", - |_self: Ref, rhs: Val, d: f64| { - let output: Val = { - { - let output: Val = bevy::math::DVec4::move_towards( - &_self, - rhs.into_inner(), - d, - ) - .into(); - output - } - }; - output - }, - " Moves towards `rhs` based on the value `d`.\n When `d` is `0.0`, the result will be equal to `self`. When `d` is equal to\n `self.distance(rhs)`, the result will be equal to `rhs`. Will not go past `rhs`.", - &["_self", "rhs", "d"], - ) - .register_documented( - "mul", - |_self: Val, rhs: Ref| { - let output: Val = { - { - let output: Val = >::mul(_self.into_inner(), &rhs) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "mul", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = >::mul(_self.into_inner(), rhs.into_inner()) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "mul", - |_self: Val, rhs: f64| { - let output: Val = { - { - let output: Val = >::mul(_self.into_inner(), rhs) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "mul_add", - | - _self: Val, - a: Val, - b: Val| - { - let output: Val = { - { - let output: Val = bevy::math::DVec4::mul_add( - _self.into_inner(), - a.into_inner(), - b.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Fused multiply-add. Computes `(self * a) + b` element-wise with only one rounding\n error, yielding a more accurate result than an unfused multiply-add.\n Using `mul_add` *may* be more performant than an unfused multiply-add if the target\n architecture has a dedicated fma CPU instruction. However, this is not always true,\n and will be heavily dependant on designing algorithms with specific target hardware in\n mind.", - &["_self", "a", "b"], - ) - .register_documented( - "neg", - |_self: Val| { - let output: Val = { - { - let output: Val = ::neg( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - "", - &["_self"], - ) - .register_documented( - "new", - |x: f64, y: f64, z: f64, w: f64| { - let output: Val = { - { - let output: Val = bevy::math::DVec4::new( - x, - y, - z, - w, - ) - .into(); - output - } - }; - output - }, - " Creates a new vector.", - &["x", "y", "z", "w"], - ) - .register_documented( - "normalize", - |_self: Val| { - let output: Val = { - { - let output: Val = bevy::math::DVec4::normalize( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns `self` normalized to length 1.0.\n For valid results, `self` must be finite and _not_ of length zero, nor very close to zero.\n See also [`Self::try_normalize()`] and [`Self::normalize_or_zero()`].\n Panics\n Will panic if the resulting normalized vector is not finite when `glam_assert` is enabled.", - &["_self"], - ) - .register_documented( - "normalize_or", - |_self: Val, fallback: Val| { - let output: Val = { - { - let output: Val = bevy::math::DVec4::normalize_or( - _self.into_inner(), - fallback.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns `self` normalized to length 1.0 if possible, else returns a\n fallback value.\n In particular, if the input is zero (or very close to zero), or non-finite,\n the result of this operation will be the fallback value.\n See also [`Self::try_normalize()`].", - &["_self", "fallback"], - ) - .register_documented( - "normalize_or_zero", - |_self: Val| { - let output: Val = { - { - let output: Val = bevy::math::DVec4::normalize_or_zero( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns `self` normalized to length 1.0 if possible, else returns zero.\n In particular, if the input is zero (or very close to zero), or non-finite,\n the result of this operation will be zero.\n See also [`Self::try_normalize()`].", - &["_self"], - ) - .register_documented( - "powf", - |_self: Val, n: f64| { - let output: Val = { - { - let output: Val = bevy::math::DVec4::powf( - _self.into_inner(), - n, - ) - .into(); - output - } - }; - output - }, - " Returns a vector containing each element of `self` raised to the power of `n`.", - &["_self", "n"], - ) - .register_documented( - "project_onto", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::DVec4::project_onto( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns the vector projection of `self` onto `rhs`.\n `rhs` must be of non-zero length.\n # Panics\n Will panic if `rhs` is zero length when `glam_assert` is enabled.", - &["_self", "rhs"], - ) - .register_documented( - "project_onto_normalized", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::DVec4::project_onto_normalized( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns the vector projection of `self` onto `rhs`.\n `rhs` must be normalized.\n # Panics\n Will panic if `rhs` is not normalized when `glam_assert` is enabled.", - &["_self", "rhs"], - ) - .register_documented( - "recip", - |_self: Val| { - let output: Val = { - { - let output: Val = bevy::math::DVec4::recip( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector containing the reciprocal `1.0/n` of each element of `self`.", - &["_self"], - ) - .register_documented( - "reflect", - |_self: Val, normal: Val| { - let output: Val = { - { - let output: Val = bevy::math::DVec4::reflect( - _self.into_inner(), - normal.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns the reflection vector for a given incident vector `self` and surface normal\n `normal`.\n `normal` must be normalized.\n # Panics\n Will panic if `normal` is not normalized when `glam_assert` is enabled.", - &["_self", "normal"], - ) - .register_documented( - "refract", - | - _self: Val, - normal: Val, - eta: f64| - { - let output: Val = { - { - let output: Val = bevy::math::DVec4::refract( - _self.into_inner(), - normal.into_inner(), - eta, - ) - .into(); - output - } - }; - output - }, - " Returns the refraction direction for a given incident vector `self`, surface normal\n `normal` and ratio of indices of refraction, `eta`. When total internal reflection occurs,\n a zero vector will be returned.\n `self` and `normal` must be normalized.\n # Panics\n Will panic if `self` or `normal` is not normalized when `glam_assert` is enabled.", - &["_self", "normal", "eta"], - ) - .register_documented( - "reject_from", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::DVec4::reject_from( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns the vector rejection of `self` from `rhs`.\n The vector rejection is the vector perpendicular to the projection of `self` onto\n `rhs`, in rhs words the result of `self - self.project_onto(rhs)`.\n `rhs` must be of non-zero length.\n # Panics\n Will panic if `rhs` has a length of zero when `glam_assert` is enabled.", - &["_self", "rhs"], - ) - .register_documented( - "reject_from_normalized", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::DVec4::reject_from_normalized( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns the vector rejection of `self` from `rhs`.\n The vector rejection is the vector perpendicular to the projection of `self` onto\n `rhs`, in rhs words the result of `self - self.project_onto(rhs)`.\n `rhs` must be normalized.\n # Panics\n Will panic if `rhs` is not normalized when `glam_assert` is enabled.", - &["_self", "rhs"], - ) - .register_documented( - "rem", - |_self: Val, rhs: Ref| { - let output: Val = { - { - let output: Val = >::rem(_self.into_inner(), &rhs) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "rem", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = >::rem(_self.into_inner(), rhs.into_inner()) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "rem", - |_self: Val, rhs: f64| { - let output: Val = { - { - let output: Val = >::rem(_self.into_inner(), rhs) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "rem_euclid", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::DVec4::rem_euclid( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns the element-wise remainder of [Euclidean division] of `self` by `rhs`.\n [Euclidean division]: f64::rem_euclid", - &["_self", "rhs"], - ) - .register_documented( - "round", - |_self: Val| { - let output: Val = { - { - let output: Val = bevy::math::DVec4::round( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector containing the nearest integer to a number for each element of `self`.\n Round half-way cases away from 0.0.", - &["_self"], - ) - .register_documented( - "select", - | - mask: Val, - if_true: Val, - if_false: Val| - { - let output: Val = { - { - let output: Val = bevy::math::DVec4::select( - mask.into_inner(), - if_true.into_inner(), - if_false.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Creates a vector from the elements in `if_true` and `if_false`, selecting which to use\n for each element of `self`.\n A true element in the mask uses the corresponding element from `if_true`, and false\n uses the element from `if_false`.", - &["mask", "if_true", "if_false"], - ) - .register_documented( - "signum", - |_self: Val| { - let output: Val = { - { - let output: Val = bevy::math::DVec4::signum( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector with elements representing the sign of `self`.\n - `1.0` if the number is positive, `+0.0` or `INFINITY`\n - `-1.0` if the number is negative, `-0.0` or `NEG_INFINITY`\n - `NAN` if the number is `NAN`", - &["_self"], - ) - .register_documented( - "splat", - |v: f64| { - let output: Val = { - { - let output: Val = bevy::math::DVec4::splat( - v, - ) - .into(); - output - } - }; - output - }, - " Creates a vector with all elements set to `v`.", - &["v"], - ) - .register_documented( - "sub", - |_self: Val, rhs: Ref| { - let output: Val = { - { - let output: Val = >::sub(_self.into_inner(), &rhs) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "sub", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = >::sub(_self.into_inner(), rhs.into_inner()) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "sub", - |_self: Val, rhs: f64| { - let output: Val = { - { - let output: Val = >::sub(_self.into_inner(), rhs) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "to_array", - |_self: Ref| { - let output: [f64; 4] = { - { - let output: [f64; 4] = bevy::math::DVec4::to_array(&_self) - .into(); - output - } - }; - output - }, - " `[x, y, z, w]`", - &["_self"], - ) - .register_documented( - "trunc", - |_self: Val| { - let output: Val = { - { - let output: Val = bevy::math::DVec4::trunc( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a vector containing the integer part each element of `self`. This means numbers are\n always truncated towards zero.", - &["_self"], - ) - .register_documented( - "truncate", - |_self: Val| { - let output: Val = { - { - let output: Val = bevy::math::DVec4::truncate( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Creates a 3D vector from the `x`, `y` and `z` elements of `self`, discarding `w`.\n Truncation to [`DVec3`] may also be performed by using [`self.xyz()`][crate::swizzles::Vec4Swizzles::xyz()].", - &["_self"], - ) - .register_documented( - "with_w", - |_self: Val, w: f64| { - let output: Val = { - { - let output: Val = bevy::math::DVec4::with_w( - _self.into_inner(), - w, - ) - .into(); - output - } - }; - output - }, - " Creates a 4D vector from `self` with the given value of `w`.", - &["_self", "w"], - ) - .register_documented( - "with_x", - |_self: Val, x: f64| { - let output: Val = { - { - let output: Val = bevy::math::DVec4::with_x( - _self.into_inner(), - x, - ) - .into(); - output - } - }; - output - }, - " Creates a 4D vector from `self` with the given value of `x`.", - &["_self", "x"], - ) - .register_documented( - "with_y", - |_self: Val, y: f64| { - let output: Val = { - { - let output: Val = bevy::math::DVec4::with_y( - _self.into_inner(), - y, - ) - .into(); - output - } - }; - output - }, - " Creates a 4D vector from `self` with the given value of `y`.", - &["_self", "y"], - ) - .register_documented( - "with_z", - |_self: Val, z: f64| { - let output: Val = { - { - let output: Val = bevy::math::DVec4::with_z( - _self.into_inner(), - z, - ) - .into(); - output - } - }; - output - }, - " Creates a 4D vector from `self` with the given value of `z`.", - &["_self", "z"], - ); - let registry = world - .get_resource_or_init::(); - let mut registry = registry.write(); - registry - .register_type_data::< - bevy::math::DVec4, - bevy_mod_scripting_core::bindings::MarkAsGenerated, - >(); - } - pub(crate) fn register_mat_2_functions(world: &mut bevy::ecs::world::World) { - bevy_mod_scripting_core::bindings::function::namespace::NamespaceBuilder::< - bevy::math::Mat2, - >::new(world) - .register_documented( - "abs", - |_self: Ref| { - let output: Val = { - { - let output: Val = bevy::math::Mat2::abs( - &_self, - ) - .into(); - output - } - }; - output - }, - " Takes the absolute value of each element in `self`", - &["_self"], - ) - .register_documented( - "abs_diff_eq", - | - _self: Ref, - rhs: Val, - max_abs_diff: f32| - { - let output: bool = { - { - let output: bool = bevy::math::Mat2::abs_diff_eq( - &_self, - rhs.into_inner(), - max_abs_diff, - ) - .into(); - output - } - }; - output - }, - " Returns true if the absolute difference of all elements between `self` and `rhs`\n is less than or equal to `max_abs_diff`.\n This can be used to compare if two matrices contain similar elements. It works best\n when comparing with a known value. The `max_abs_diff` that should be used used\n depends on the values being compared against.\n For more see\n [comparing floating point numbers](https://randomascii.wordpress.com/2012/02/25/comparing-floating-point-numbers-2012-edition/).", - &["_self", "rhs", "max_abs_diff"], - ) - .register_documented( - "add", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = >::add(_self.into_inner(), rhs.into_inner()) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "add_mat2", - |_self: Ref, rhs: Ref| { - let output: Val = { - { - let output: Val = bevy::math::Mat2::add_mat2( - &_self, - &rhs, - ) - .into(); - output - } - }; - output - }, - " Adds two 2x2 matrices.", - &["_self", "rhs"], - ) - .register_documented( - "as_dmat2", - |_self: Ref| { - let output: Val = { - { - let output: Val = bevy::math::Mat2::as_dmat2( - &_self, - ) - .into(); - output - } - }; - output - }, - "", - &["_self"], - ) - .register_documented( - "clone", - |_self: Ref| { - let output: Val = { - { - let output: Val = ::clone( - &_self, - ) - .into(); - output - } - }; - output - }, - "", - &["_self"], - ) - .register_documented( - "col", - |_self: Ref, index: usize| { - let output: Val = { - { - let output: Val = bevy::math::Mat2::col( - &_self, - index, - ) - .into(); - output - } - }; - output - }, - " Returns the matrix column for the given `index`.\n # Panics\n Panics if `index` is greater than 1.", - &["_self", "index"], - ) - .register_documented( - "determinant", - |_self: Ref| { - let output: f32 = { - { - let output: f32 = bevy::math::Mat2::determinant(&_self) - .into(); - output - } - }; - output - }, - " Returns the determinant of `self`.", - &["_self"], - ) - .register_documented( - "div", - |_self: Val, rhs: f32| { - let output: Val = { - { - let output: Val = >::div(_self.into_inner(), rhs) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "div_scalar", - |_self: Ref, rhs: f32| { - let output: Val = { - { - let output: Val = bevy::math::Mat2::div_scalar( - &_self, - rhs, - ) - .into(); - output - } - }; - output - }, - " Divides a 2x2 matrix by a scalar.", - &["_self", "rhs"], - ) - .register_documented( - "eq", - |_self: Ref, rhs: Ref| { - let output: bool = { - { - let output: bool = >::eq(&_self, &rhs) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "from_angle", - |angle: f32| { - let output: Val = { - { - let output: Val = bevy::math::Mat2::from_angle( - angle, - ) - .into(); - output - } - }; - output - }, - " Creates a 2x2 matrix containing a rotation of `angle` (in radians).", - &["angle"], - ) - .register_documented( - "from_cols", - |x_axis: Val, y_axis: Val| { - let output: Val = { - { - let output: Val = bevy::math::Mat2::from_cols( - x_axis.into_inner(), - y_axis.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Creates a 2x2 matrix from two column vectors.", - &["x_axis", "y_axis"], - ) - .register_documented( - "from_diagonal", - |diagonal: Val| { - let output: Val = { - { - let output: Val = bevy::math::Mat2::from_diagonal( - diagonal.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Creates a 2x2 matrix with its diagonal set to `diagonal` and all other entries set to 0.", - &["diagonal"], - ) - .register_documented( - "from_mat3", - |m: Val| { - let output: Val = { - { - let output: Val = bevy::math::Mat2::from_mat3( - m.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Creates a 2x2 matrix from a 3x3 matrix, discarding the 2nd row and column.", - &["m"], - ) - .register_documented( - "from_mat3_minor", - |m: Val, i: usize, j: usize| { - let output: Val = { - { - let output: Val = bevy::math::Mat2::from_mat3_minor( - m.into_inner(), - i, - j, - ) - .into(); - output - } - }; - output - }, - " Creates a 2x2 matrix from the minor of the given 3x3 matrix, discarding the `i`th column\n and `j`th row.\n # Panics\n Panics if `i` or `j` is greater than 2.", - &["m", "i", "j"], - ) - .register_documented( - "from_mat3a", - |m: Val| { - let output: Val = { - { - let output: Val = bevy::math::Mat2::from_mat3a( - m.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Creates a 2x2 matrix from a 3x3 matrix, discarding the 2nd row and column.", - &["m"], - ) - .register_documented( - "from_mat3a_minor", - |m: Val, i: usize, j: usize| { - let output: Val = { - { - let output: Val = bevy::math::Mat2::from_mat3a_minor( - m.into_inner(), - i, - j, - ) - .into(); - output - } - }; - output - }, - " Creates a 2x2 matrix from the minor of the given 3x3 matrix, discarding the `i`th column\n and `j`th row.\n # Panics\n Panics if `i` or `j` is greater than 2.", - &["m", "i", "j"], - ) - .register_documented( - "from_scale_angle", - |scale: Val, angle: f32| { - let output: Val = { - { - let output: Val = bevy::math::Mat2::from_scale_angle( - scale.into_inner(), - angle, - ) - .into(); - output - } - }; - output - }, - " Creates a 2x2 matrix containing the combining non-uniform `scale` and rotation of\n `angle` (in radians).", - &["scale", "angle"], - ) - .register_documented( - "inverse", - |_self: Ref| { - let output: Val = { - { - let output: Val = bevy::math::Mat2::inverse( - &_self, - ) - .into(); - output - } - }; - output - }, - " Returns the inverse of `self`.\n If the matrix is not invertible the returned matrix will be invalid.\n # Panics\n Will panic if the determinant of `self` is zero when `glam_assert` is enabled.", - &["_self"], - ) - .register_documented( - "is_finite", - |_self: Ref| { - let output: bool = { - { - let output: bool = bevy::math::Mat2::is_finite(&_self) - .into(); - output - } - }; - output - }, - " Returns `true` if, and only if, all elements are finite.\n If any element is either `NaN`, positive or negative infinity, this will return `false`.", - &["_self"], - ) - .register_documented( - "is_nan", - |_self: Ref| { - let output: bool = { - { - let output: bool = bevy::math::Mat2::is_nan(&_self).into(); - output - } - }; - output - }, - " Returns `true` if any elements are `NaN`.", - &["_self"], - ) - .register_documented( - "mul", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = >::mul(_self.into_inner(), rhs.into_inner()) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "mul", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = >::mul(_self.into_inner(), rhs.into_inner()) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "mul", - |_self: Val, rhs: f32| { - let output: Val = { - { - let output: Val = >::mul(_self.into_inner(), rhs) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "mul_mat2", - |_self: Ref, rhs: Ref| { - let output: Val = { - { - let output: Val = bevy::math::Mat2::mul_mat2( - &_self, - &rhs, - ) - .into(); - output - } - }; - output - }, - " Multiplies two 2x2 matrices.", - &["_self", "rhs"], - ) - .register_documented( - "mul_scalar", - |_self: Ref, rhs: f32| { - let output: Val = { - { - let output: Val = bevy::math::Mat2::mul_scalar( - &_self, - rhs, - ) - .into(); - output - } - }; - output - }, - " Multiplies a 2x2 matrix by a scalar.", - &["_self", "rhs"], - ) - .register_documented( - "mul_vec2", - |_self: Ref, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::Mat2::mul_vec2( - &_self, - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Transforms a 2D vector.", - &["_self", "rhs"], - ) - .register_documented( - "neg", - |_self: Val| { - let output: Val = { - { - let output: Val = ::neg( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - "", - &["_self"], - ) - .register_documented( - "row", - |_self: Ref, index: usize| { - let output: Val = { - { - let output: Val = bevy::math::Mat2::row( - &_self, - index, - ) - .into(); - output - } - }; - output - }, - " Returns the matrix row for the given `index`.\n # Panics\n Panics if `index` is greater than 1.", - &["_self", "index"], - ) - .register_documented( - "sub", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = >::sub(_self.into_inner(), rhs.into_inner()) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "sub_mat2", - |_self: Ref, rhs: Ref| { - let output: Val = { - { - let output: Val = bevy::math::Mat2::sub_mat2( - &_self, - &rhs, - ) - .into(); - output - } - }; - output - }, - " Subtracts two 2x2 matrices.", - &["_self", "rhs"], - ) - .register_documented( - "to_cols_array", - |_self: Ref| { - let output: [f32; 4] = { - { - let output: [f32; 4] = bevy::math::Mat2::to_cols_array( - &_self, - ) - .into(); - output - } - }; - output - }, - " Creates a `[f32; 4]` array storing data in column major order.\n If you require data in row major order `transpose` the matrix first.", - &["_self"], - ) - .register_documented( - "to_cols_array_2d", - |_self: Ref| { - let output: [[f32; 2]; 2] = { - { - let output: [[f32; 2]; 2] = bevy::math::Mat2::to_cols_array_2d( - &_self, - ) - .into(); - output - } - }; - output - }, - " Creates a `[[f32; 2]; 2]` 2D array storing data in column major order.\n If you require data in row major order `transpose` the matrix first.", - &["_self"], - ) - .register_documented( - "transpose", - |_self: Ref| { - let output: Val = { - { - let output: Val = bevy::math::Mat2::transpose( - &_self, - ) - .into(); - output - } - }; - output - }, - " Returns the transpose of `self`.", - &["_self"], - ); - let registry = world - .get_resource_or_init::(); - let mut registry = registry.write(); - registry - .register_type_data::< - bevy::math::Mat2, - bevy_mod_scripting_core::bindings::MarkAsGenerated, - >(); - } - pub(crate) fn register_mat_3_functions(world: &mut bevy::ecs::world::World) { - bevy_mod_scripting_core::bindings::function::namespace::NamespaceBuilder::< - bevy::math::Mat3, - >::new(world) - .register_documented( - "abs", - |_self: Ref| { - let output: Val = { - { - let output: Val = bevy::math::Mat3::abs( - &_self, - ) - .into(); - output - } - }; - output - }, - " Takes the absolute value of each element in `self`", - &["_self"], - ) - .register_documented( - "abs_diff_eq", - | - _self: Ref, - rhs: Val, - max_abs_diff: f32| - { - let output: bool = { - { - let output: bool = bevy::math::Mat3::abs_diff_eq( - &_self, - rhs.into_inner(), - max_abs_diff, - ) - .into(); - output - } - }; - output - }, - " Returns true if the absolute difference of all elements between `self` and `rhs`\n is less than or equal to `max_abs_diff`.\n This can be used to compare if two matrices contain similar elements. It works best\n when comparing with a known value. The `max_abs_diff` that should be used used\n depends on the values being compared against.\n For more see\n [comparing floating point numbers](https://randomascii.wordpress.com/2012/02/25/comparing-floating-point-numbers-2012-edition/).", - &["_self", "rhs", "max_abs_diff"], - ) - .register_documented( - "add", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = >::add(_self.into_inner(), rhs.into_inner()) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "add_mat3", - |_self: Ref, rhs: Ref| { - let output: Val = { - { - let output: Val = bevy::math::Mat3::add_mat3( - &_self, - &rhs, - ) - .into(); - output - } - }; - output - }, - " Adds two 3x3 matrices.", - &["_self", "rhs"], - ) - .register_documented( - "as_dmat3", - |_self: Ref| { - let output: Val = { - { - let output: Val = bevy::math::Mat3::as_dmat3( - &_self, - ) - .into(); - output - } - }; - output - }, - "", - &["_self"], - ) - .register_documented( - "clone", - |_self: Ref| { - let output: Val = { - { - let output: Val = ::clone( - &_self, - ) - .into(); - output - } - }; - output - }, - "", - &["_self"], - ) - .register_documented( - "col", - |_self: Ref, index: usize| { - let output: Val = { - { - let output: Val = bevy::math::Mat3::col( - &_self, - index, - ) - .into(); - output - } - }; - output - }, - " Returns the matrix column for the given `index`.\n # Panics\n Panics if `index` is greater than 2.", - &["_self", "index"], - ) - .register_documented( - "determinant", - |_self: Ref| { - let output: f32 = { - { - let output: f32 = bevy::math::Mat3::determinant(&_self) - .into(); - output - } - }; - output - }, - " Returns the determinant of `self`.", - &["_self"], - ) - .register_documented( - "div", - |_self: Val, rhs: f32| { - let output: Val = { - { - let output: Val = >::div(_self.into_inner(), rhs) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "div_scalar", - |_self: Ref, rhs: f32| { - let output: Val = { - { - let output: Val = bevy::math::Mat3::div_scalar( - &_self, - rhs, - ) - .into(); - output - } - }; - output - }, - " Divides a 3x3 matrix by a scalar.", - &["_self", "rhs"], - ) - .register_documented( - "eq", - |_self: Ref, rhs: Ref| { - let output: bool = { - { - let output: bool = >::eq(&_self, &rhs) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "from_angle", - |angle: f32| { - let output: Val = { - { - let output: Val = bevy::math::Mat3::from_angle( - angle, - ) - .into(); - output - } - }; - output - }, - " Creates an affine transformation matrix from the given 2D rotation `angle` (in\n radians).\n The resulting matrix can be used to transform 2D points and vectors. See\n [`Self::transform_point2()`] and [`Self::transform_vector2()`].", - &["angle"], - ) - .register_documented( - "from_axis_angle", - |axis: Val, angle: f32| { - let output: Val = { - { - let output: Val = bevy::math::Mat3::from_axis_angle( - axis.into_inner(), - angle, - ) - .into(); - output - } - }; - output - }, - " Creates a 3D rotation matrix from a normalized rotation `axis` and `angle` (in\n radians).\n # Panics\n Will panic if `axis` is not normalized when `glam_assert` is enabled.", - &["axis", "angle"], - ) - .register_documented( - "from_cols", - | - x_axis: Val, - y_axis: Val, - z_axis: Val| - { - let output: Val = { - { - let output: Val = bevy::math::Mat3::from_cols( - x_axis.into_inner(), - y_axis.into_inner(), - z_axis.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Creates a 3x3 matrix from three column vectors.", - &["x_axis", "y_axis", "z_axis"], - ) - .register_documented( - "from_diagonal", - |diagonal: Val| { - let output: Val = { - { - let output: Val = bevy::math::Mat3::from_diagonal( - diagonal.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Creates a 3x3 matrix with its diagonal set to `diagonal` and all other entries set to 0.", - &["diagonal"], - ) - .register_documented( - "from_euler", - |order: Val, a: f32, b: f32, c: f32| { - let output: Val = { - { - let output: Val = bevy::math::Mat3::from_euler( - order.into_inner(), - a, - b, - c, - ) - .into(); - output - } - }; - output - }, - " Creates a 3D rotation matrix from the given euler rotation sequence and the angles (in\n radians).", - &["order", "a", "b", "c"], - ) - .register_documented( - "from_mat2", - |m: Val| { - let output: Val = { - { - let output: Val = bevy::math::Mat3::from_mat2( - m.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Creates an affine transformation matrix from the given 2x2 matrix.\n The resulting matrix can be used to transform 2D points and vectors. See\n [`Self::transform_point2()`] and [`Self::transform_vector2()`].", - &["m"], - ) - .register_documented( - "from_mat4", - |m: Val| { - let output: Val = { - { - let output: Val = bevy::math::Mat3::from_mat4( - m.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Creates a 3x3 matrix from a 4x4 matrix, discarding the 4th row and column.", - &["m"], - ) - .register_documented( - "from_mat4_minor", - |m: Val, i: usize, j: usize| { - let output: Val = { - { - let output: Val = bevy::math::Mat3::from_mat4_minor( - m.into_inner(), - i, - j, - ) - .into(); - output - } - }; - output - }, - " Creates a 3x3 matrix from the minor of the given 4x4 matrix, discarding the `i`th column\n and `j`th row.\n # Panics\n Panics if `i` or `j` is greater than 3.", - &["m", "i", "j"], - ) - .register_documented( - "from_quat", - |rotation: Val| { - let output: Val = { - { - let output: Val = bevy::math::Mat3::from_quat( - rotation.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Creates a 3D rotation matrix from the given quaternion.\n # Panics\n Will panic if `rotation` is not normalized when `glam_assert` is enabled.", - &["rotation"], - ) - .register_documented( - "from_rotation_x", - |angle: f32| { - let output: Val = { - { - let output: Val = bevy::math::Mat3::from_rotation_x( - angle, - ) - .into(); - output - } - }; - output - }, - " Creates a 3D rotation matrix from `angle` (in radians) around the x axis.", - &["angle"], - ) - .register_documented( - "from_rotation_y", - |angle: f32| { - let output: Val = { - { - let output: Val = bevy::math::Mat3::from_rotation_y( - angle, - ) - .into(); - output - } - }; - output - }, - " Creates a 3D rotation matrix from `angle` (in radians) around the y axis.", - &["angle"], - ) - .register_documented( - "from_rotation_z", - |angle: f32| { - let output: Val = { - { - let output: Val = bevy::math::Mat3::from_rotation_z( - angle, - ) - .into(); - output - } - }; - output - }, - " Creates a 3D rotation matrix from `angle` (in radians) around the z axis.", - &["angle"], - ) - .register_documented( - "from_scale", - |scale: Val| { - let output: Val = { - { - let output: Val = bevy::math::Mat3::from_scale( - scale.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Creates an affine transformation matrix from the given non-uniform 2D `scale`.\n The resulting matrix can be used to transform 2D points and vectors. See\n [`Self::transform_point2()`] and [`Self::transform_vector2()`].\n # Panics\n Will panic if all elements of `scale` are zero when `glam_assert` is enabled.", - &["scale"], - ) - .register_documented( - "from_scale_angle_translation", - | - scale: Val, - angle: f32, - translation: Val| - { - let output: Val = { - { - let output: Val = bevy::math::Mat3::from_scale_angle_translation( - scale.into_inner(), - angle, - translation.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Creates an affine transformation matrix from the given 2D `scale`, rotation `angle` (in\n radians) and `translation`.\n The resulting matrix can be used to transform 2D points and vectors. See\n [`Self::transform_point2()`] and [`Self::transform_vector2()`].", - &["scale", "angle", "translation"], - ) - .register_documented( - "from_translation", - |translation: Val| { - let output: Val = { - { - let output: Val = bevy::math::Mat3::from_translation( - translation.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Creates an affine transformation matrix from the given 2D `translation`.\n The resulting matrix can be used to transform 2D points and vectors. See\n [`Self::transform_point2()`] and [`Self::transform_vector2()`].", - &["translation"], - ) - .register_documented( - "inverse", - |_self: Ref| { - let output: Val = { - { - let output: Val = bevy::math::Mat3::inverse( - &_self, - ) - .into(); - output - } - }; - output - }, - " Returns the inverse of `self`.\n If the matrix is not invertible the returned matrix will be invalid.\n # Panics\n Will panic if the determinant of `self` is zero when `glam_assert` is enabled.", - &["_self"], - ) - .register_documented( - "is_finite", - |_self: Ref| { - let output: bool = { - { - let output: bool = bevy::math::Mat3::is_finite(&_self) - .into(); - output - } - }; - output - }, - " Returns `true` if, and only if, all elements are finite.\n If any element is either `NaN`, positive or negative infinity, this will return `false`.", - &["_self"], - ) - .register_documented( - "is_nan", - |_self: Ref| { - let output: bool = { - { - let output: bool = bevy::math::Mat3::is_nan(&_self).into(); - output - } - }; - output - }, - " Returns `true` if any elements are `NaN`.", - &["_self"], - ) - .register_documented( - "mul", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = >::mul(_self.into_inner(), rhs.into_inner()) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "mul", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = >::mul(_self.into_inner(), rhs.into_inner()) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "mul", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = >::mul(_self.into_inner(), rhs.into_inner()) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "mul", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = >::mul(_self.into_inner(), rhs.into_inner()) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "mul", - |_self: Val, rhs: f32| { - let output: Val = { - { - let output: Val = >::mul(_self.into_inner(), rhs) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "mul_mat3", - |_self: Ref, rhs: Ref| { - let output: Val = { - { - let output: Val = bevy::math::Mat3::mul_mat3( - &_self, - &rhs, - ) - .into(); - output - } - }; - output - }, - " Multiplies two 3x3 matrices.", - &["_self", "rhs"], - ) - .register_documented( - "mul_scalar", - |_self: Ref, rhs: f32| { - let output: Val = { - { - let output: Val = bevy::math::Mat3::mul_scalar( - &_self, - rhs, - ) - .into(); - output - } - }; - output - }, - " Multiplies a 3x3 matrix by a scalar.", - &["_self", "rhs"], - ) - .register_documented( - "mul_vec3", - |_self: Ref, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::Mat3::mul_vec3( - &_self, - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Transforms a 3D vector.", - &["_self", "rhs"], - ) - .register_documented( - "mul_vec3a", - |_self: Ref, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::Mat3::mul_vec3a( - &_self, - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Transforms a [`Vec3A`].", - &["_self", "rhs"], - ) - .register_documented( - "neg", - |_self: Val| { - let output: Val = { - { - let output: Val = ::neg( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - "", - &["_self"], - ) - .register_documented( - "row", - |_self: Ref, index: usize| { - let output: Val = { - { - let output: Val = bevy::math::Mat3::row( - &_self, - index, - ) - .into(); - output - } - }; - output - }, - " Returns the matrix row for the given `index`.\n # Panics\n Panics if `index` is greater than 2.", - &["_self", "index"], - ) - .register_documented( - "sub", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = >::sub(_self.into_inner(), rhs.into_inner()) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "sub_mat3", - |_self: Ref, rhs: Ref| { - let output: Val = { - { - let output: Val = bevy::math::Mat3::sub_mat3( - &_self, - &rhs, - ) - .into(); - output - } - }; - output - }, - " Subtracts two 3x3 matrices.", - &["_self", "rhs"], - ) - .register_documented( - "to_cols_array", - |_self: Ref| { - let output: [f32; 9] = { - { - let output: [f32; 9] = bevy::math::Mat3::to_cols_array( - &_self, - ) - .into(); - output - } - }; - output - }, - " Creates a `[f32; 9]` array storing data in column major order.\n If you require data in row major order `transpose` the matrix first.", - &["_self"], - ) - .register_documented( - "to_cols_array_2d", - |_self: Ref| { - let output: [[f32; 3]; 3] = { - { - let output: [[f32; 3]; 3] = bevy::math::Mat3::to_cols_array_2d( - &_self, - ) - .into(); - output - } - }; - output - }, - " Creates a `[[f32; 3]; 3]` 3D array storing data in column major order.\n If you require data in row major order `transpose` the matrix first.", - &["_self"], - ) - .register_documented( - "to_euler", - |_self: Ref, order: Val| { - let output: (f32, f32, f32) = { - { - let output: (f32, f32, f32) = bevy::math::Mat3::to_euler( - &_self, - order.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Extract Euler angles with the given Euler rotation order.\n Note if the input matrix contains scales, shears, or other non-rotation transformations then\n the resulting Euler angles will be ill-defined.\n # Panics\n Will panic if any input matrix column is not normalized when `glam_assert` is enabled.", - &["_self", "order"], - ) - .register_documented( - "transform_point2", - |_self: Ref, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::Mat3::transform_point2( - &_self, - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Transforms the given 2D vector as a point.\n This is the equivalent of multiplying `rhs` as a 3D vector where `z` is `1`.\n This method assumes that `self` contains a valid affine transform.\n # Panics\n Will panic if the 2nd row of `self` is not `(0, 0, 1)` when `glam_assert` is enabled.", - &["_self", "rhs"], - ) - .register_documented( - "transform_vector2", - |_self: Ref, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::Mat3::transform_vector2( - &_self, - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Rotates the given 2D vector.\n This is the equivalent of multiplying `rhs` as a 3D vector where `z` is `0`.\n This method assumes that `self` contains a valid affine transform.\n # Panics\n Will panic if the 2nd row of `self` is not `(0, 0, 1)` when `glam_assert` is enabled.", - &["_self", "rhs"], - ) - .register_documented( - "transpose", - |_self: Ref| { - let output: Val = { - { - let output: Val = bevy::math::Mat3::transpose( - &_self, - ) - .into(); - output - } - }; - output - }, - " Returns the transpose of `self`.", - &["_self"], - ); - let registry = world - .get_resource_or_init::(); - let mut registry = registry.write(); - registry - .register_type_data::< - bevy::math::Mat3, - bevy_mod_scripting_core::bindings::MarkAsGenerated, - >(); - } - pub(crate) fn register_mat_3_a_functions(world: &mut bevy::ecs::world::World) { - bevy_mod_scripting_core::bindings::function::namespace::NamespaceBuilder::< - bevy::math::Mat3A, - >::new(world) - .register_documented( - "abs", - |_self: Ref| { - let output: Val = { - { - let output: Val = bevy::math::Mat3A::abs( - &_self, - ) - .into(); - output - } - }; - output - }, - " Takes the absolute value of each element in `self`", - &["_self"], - ) - .register_documented( - "abs_diff_eq", - | - _self: Ref, - rhs: Val, - max_abs_diff: f32| - { - let output: bool = { - { - let output: bool = bevy::math::Mat3A::abs_diff_eq( - &_self, - rhs.into_inner(), - max_abs_diff, - ) - .into(); - output - } - }; - output - }, - " Returns true if the absolute difference of all elements between `self` and `rhs`\n is less than or equal to `max_abs_diff`.\n This can be used to compare if two matrices contain similar elements. It works best\n when comparing with a known value. The `max_abs_diff` that should be used used\n depends on the values being compared against.\n For more see\n [comparing floating point numbers](https://randomascii.wordpress.com/2012/02/25/comparing-floating-point-numbers-2012-edition/).", - &["_self", "rhs", "max_abs_diff"], - ) - .register_documented( - "add", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = >::add(_self.into_inner(), rhs.into_inner()) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "add_mat3", - |_self: Ref, rhs: Ref| { - let output: Val = { - { - let output: Val = bevy::math::Mat3A::add_mat3( - &_self, - &rhs, - ) - .into(); - output - } - }; - output - }, - " Adds two 3x3 matrices.", - &["_self", "rhs"], - ) - .register_documented( - "as_dmat3", - |_self: Ref| { - let output: Val = { - { - let output: Val = bevy::math::Mat3A::as_dmat3( - &_self, - ) - .into(); - output - } - }; - output - }, - "", - &["_self"], - ) - .register_documented( - "clone", - |_self: Ref| { - let output: Val = { - { - let output: Val = ::clone( - &_self, - ) - .into(); - output - } - }; - output - }, - "", - &["_self"], - ) - .register_documented( - "col", - |_self: Ref, index: usize| { - let output: Val = { - { - let output: Val = bevy::math::Mat3A::col( - &_self, - index, - ) - .into(); - output - } - }; - output - }, - " Returns the matrix column for the given `index`.\n # Panics\n Panics if `index` is greater than 2.", - &["_self", "index"], - ) - .register_documented( - "determinant", - |_self: Ref| { - let output: f32 = { - { - let output: f32 = bevy::math::Mat3A::determinant(&_self) - .into(); - output - } - }; - output - }, - " Returns the determinant of `self`.", - &["_self"], - ) - .register_documented( - "div", - |_self: Val, rhs: f32| { - let output: Val = { - { - let output: Val = >::div(_self.into_inner(), rhs) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "div_scalar", - |_self: Ref, rhs: f32| { - let output: Val = { - { - let output: Val = bevy::math::Mat3A::div_scalar( - &_self, - rhs, - ) - .into(); - output - } - }; - output - }, - " Divides a 3x3 matrix by a scalar.", - &["_self", "rhs"], - ) - .register_documented( - "eq", - |_self: Ref, rhs: Ref| { - let output: bool = { - { - let output: bool = >::eq(&_self, &rhs) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "from_angle", - |angle: f32| { - let output: Val = { - { - let output: Val = bevy::math::Mat3A::from_angle( - angle, - ) - .into(); - output - } - }; - output - }, - " Creates an affine transformation matrix from the given 2D rotation `angle` (in\n radians).\n The resulting matrix can be used to transform 2D points and vectors. See\n [`Self::transform_point2()`] and [`Self::transform_vector2()`].", - &["angle"], - ) - .register_documented( - "from_axis_angle", - |axis: Val, angle: f32| { - let output: Val = { - { - let output: Val = bevy::math::Mat3A::from_axis_angle( - axis.into_inner(), - angle, - ) - .into(); - output - } - }; - output - }, - " Creates a 3D rotation matrix from a normalized rotation `axis` and `angle` (in\n radians).\n # Panics\n Will panic if `axis` is not normalized when `glam_assert` is enabled.", - &["axis", "angle"], - ) - .register_documented( - "from_cols", - | - x_axis: Val, - y_axis: Val, - z_axis: Val| - { - let output: Val = { - { - let output: Val = bevy::math::Mat3A::from_cols( - x_axis.into_inner(), - y_axis.into_inner(), - z_axis.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Creates a 3x3 matrix from three column vectors.", - &["x_axis", "y_axis", "z_axis"], - ) - .register_documented( - "from_diagonal", - |diagonal: Val| { - let output: Val = { - { - let output: Val = bevy::math::Mat3A::from_diagonal( - diagonal.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Creates a 3x3 matrix with its diagonal set to `diagonal` and all other entries set to 0.", - &["diagonal"], - ) - .register_documented( - "from_euler", - |order: Val, a: f32, b: f32, c: f32| { - let output: Val = { - { - let output: Val = bevy::math::Mat3A::from_euler( - order.into_inner(), - a, - b, - c, - ) - .into(); - output - } - }; - output - }, - " Creates a 3D rotation matrix from the given euler rotation sequence and the angles (in\n radians).", - &["order", "a", "b", "c"], - ) - .register_documented( - "from_mat2", - |m: Val| { - let output: Val = { - { - let output: Val = bevy::math::Mat3A::from_mat2( - m.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Creates an affine transformation matrix from the given 2x2 matrix.\n The resulting matrix can be used to transform 2D points and vectors. See\n [`Self::transform_point2()`] and [`Self::transform_vector2()`].", - &["m"], - ) - .register_documented( - "from_mat4", - |m: Val| { - let output: Val = { - { - let output: Val = bevy::math::Mat3A::from_mat4( - m.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Creates a 3x3 matrix from a 4x4 matrix, discarding the 4th row and column.", - &["m"], - ) - .register_documented( - "from_mat4_minor", - |m: Val, i: usize, j: usize| { - let output: Val = { - { - let output: Val = bevy::math::Mat3A::from_mat4_minor( - m.into_inner(), - i, - j, - ) - .into(); - output - } - }; - output - }, - " Creates a 3x3 matrix from the minor of the given 4x4 matrix, discarding the `i`th column\n and `j`th row.\n # Panics\n Panics if `i` or `j` is greater than 3.", - &["m", "i", "j"], - ) - .register_documented( - "from_quat", - |rotation: Val| { - let output: Val = { - { - let output: Val = bevy::math::Mat3A::from_quat( - rotation.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Creates a 3D rotation matrix from the given quaternion.\n # Panics\n Will panic if `rotation` is not normalized when `glam_assert` is enabled.", - &["rotation"], - ) - .register_documented( - "from_rotation_x", - |angle: f32| { - let output: Val = { - { - let output: Val = bevy::math::Mat3A::from_rotation_x( - angle, - ) - .into(); - output - } - }; - output - }, - " Creates a 3D rotation matrix from `angle` (in radians) around the x axis.", - &["angle"], - ) - .register_documented( - "from_rotation_y", - |angle: f32| { - let output: Val = { - { - let output: Val = bevy::math::Mat3A::from_rotation_y( - angle, - ) - .into(); - output - } - }; - output - }, - " Creates a 3D rotation matrix from `angle` (in radians) around the y axis.", - &["angle"], - ) - .register_documented( - "from_rotation_z", - |angle: f32| { - let output: Val = { - { - let output: Val = bevy::math::Mat3A::from_rotation_z( - angle, - ) - .into(); - output - } - }; - output - }, - " Creates a 3D rotation matrix from `angle` (in radians) around the z axis.", - &["angle"], - ) - .register_documented( - "from_scale", - |scale: Val| { - let output: Val = { - { - let output: Val = bevy::math::Mat3A::from_scale( - scale.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Creates an affine transformation matrix from the given non-uniform 2D `scale`.\n The resulting matrix can be used to transform 2D points and vectors. See\n [`Self::transform_point2()`] and [`Self::transform_vector2()`].\n # Panics\n Will panic if all elements of `scale` are zero when `glam_assert` is enabled.", - &["scale"], - ) - .register_documented( - "from_scale_angle_translation", - | - scale: Val, - angle: f32, - translation: Val| - { - let output: Val = { - { - let output: Val = bevy::math::Mat3A::from_scale_angle_translation( - scale.into_inner(), - angle, - translation.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Creates an affine transformation matrix from the given 2D `scale`, rotation `angle` (in\n radians) and `translation`.\n The resulting matrix can be used to transform 2D points and vectors. See\n [`Self::transform_point2()`] and [`Self::transform_vector2()`].", - &["scale", "angle", "translation"], - ) - .register_documented( - "from_translation", - |translation: Val| { - let output: Val = { - { - let output: Val = bevy::math::Mat3A::from_translation( - translation.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Creates an affine transformation matrix from the given 2D `translation`.\n The resulting matrix can be used to transform 2D points and vectors. See\n [`Self::transform_point2()`] and [`Self::transform_vector2()`].", - &["translation"], - ) - .register_documented( - "inverse", - |_self: Ref| { - let output: Val = { - { - let output: Val = bevy::math::Mat3A::inverse( - &_self, - ) - .into(); - output - } - }; - output - }, - " Returns the inverse of `self`.\n If the matrix is not invertible the returned matrix will be invalid.\n # Panics\n Will panic if the determinant of `self` is zero when `glam_assert` is enabled.", - &["_self"], - ) - .register_documented( - "is_finite", - |_self: Ref| { - let output: bool = { - { - let output: bool = bevy::math::Mat3A::is_finite(&_self) - .into(); - output - } - }; - output - }, - " Returns `true` if, and only if, all elements are finite.\n If any element is either `NaN`, positive or negative infinity, this will return `false`.", - &["_self"], - ) - .register_documented( - "is_nan", - |_self: Ref| { - let output: bool = { - { - let output: bool = bevy::math::Mat3A::is_nan(&_self).into(); - output - } - }; - output - }, - " Returns `true` if any elements are `NaN`.", - &["_self"], - ) - .register_documented( - "mul", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = >::mul(_self.into_inner(), rhs.into_inner()) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "mul", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = >::mul(_self.into_inner(), rhs.into_inner()) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "mul", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = >::mul(_self.into_inner(), rhs.into_inner()) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "mul", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = >::mul(_self.into_inner(), rhs.into_inner()) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "mul", - |_self: Val, rhs: f32| { - let output: Val = { - { - let output: Val = >::mul(_self.into_inner(), rhs) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "mul_mat3", - |_self: Ref, rhs: Ref| { - let output: Val = { - { - let output: Val = bevy::math::Mat3A::mul_mat3( - &_self, - &rhs, - ) - .into(); - output - } - }; - output - }, - " Multiplies two 3x3 matrices.", - &["_self", "rhs"], - ) - .register_documented( - "mul_scalar", - |_self: Ref, rhs: f32| { - let output: Val = { - { - let output: Val = bevy::math::Mat3A::mul_scalar( - &_self, - rhs, - ) - .into(); - output - } - }; - output - }, - " Multiplies a 3x3 matrix by a scalar.", - &["_self", "rhs"], - ) - .register_documented( - "mul_vec3", - |_self: Ref, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::Mat3A::mul_vec3( - &_self, - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Transforms a 3D vector.", - &["_self", "rhs"], - ) - .register_documented( - "mul_vec3a", - |_self: Ref, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::Mat3A::mul_vec3a( - &_self, - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Transforms a [`Vec3A`].", - &["_self", "rhs"], - ) - .register_documented( - "neg", - |_self: Val| { - let output: Val = { - { - let output: Val = ::neg( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - "", - &["_self"], - ) - .register_documented( - "row", - |_self: Ref, index: usize| { - let output: Val = { - { - let output: Val = bevy::math::Mat3A::row( - &_self, - index, - ) - .into(); - output - } - }; - output - }, - " Returns the matrix row for the given `index`.\n # Panics\n Panics if `index` is greater than 2.", - &["_self", "index"], - ) - .register_documented( - "sub", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = >::sub(_self.into_inner(), rhs.into_inner()) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "sub_mat3", - |_self: Ref, rhs: Ref| { - let output: Val = { - { - let output: Val = bevy::math::Mat3A::sub_mat3( - &_self, - &rhs, - ) - .into(); - output - } - }; - output - }, - " Subtracts two 3x3 matrices.", - &["_self", "rhs"], - ) - .register_documented( - "to_cols_array", - |_self: Ref| { - let output: [f32; 9] = { - { - let output: [f32; 9] = bevy::math::Mat3A::to_cols_array( - &_self, - ) - .into(); - output - } - }; - output - }, - " Creates a `[f32; 9]` array storing data in column major order.\n If you require data in row major order `transpose` the matrix first.", - &["_self"], - ) - .register_documented( - "to_cols_array_2d", - |_self: Ref| { - let output: [[f32; 3]; 3] = { - { - let output: [[f32; 3]; 3] = bevy::math::Mat3A::to_cols_array_2d( - &_self, - ) - .into(); - output - } - }; - output - }, - " Creates a `[[f32; 3]; 3]` 3D array storing data in column major order.\n If you require data in row major order `transpose` the matrix first.", - &["_self"], - ) - .register_documented( - "to_euler", - |_self: Ref, order: Val| { - let output: (f32, f32, f32) = { - { - let output: (f32, f32, f32) = bevy::math::Mat3A::to_euler( - &_self, - order.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Extract Euler angles with the given Euler rotation order.\n Note if the input matrix contains scales, shears, or other non-rotation transformations then\n the resulting Euler angles will be ill-defined.\n # Panics\n Will panic if any input matrix column is not normalized when `glam_assert` is enabled.", - &["_self", "order"], - ) - .register_documented( - "transform_point2", - |_self: Ref, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::Mat3A::transform_point2( - &_self, - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Transforms the given 2D vector as a point.\n This is the equivalent of multiplying `rhs` as a 3D vector where `z` is `1`.\n This method assumes that `self` contains a valid affine transform.\n # Panics\n Will panic if the 2nd row of `self` is not `(0, 0, 1)` when `glam_assert` is enabled.", - &["_self", "rhs"], - ) - .register_documented( - "transform_vector2", - |_self: Ref, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::Mat3A::transform_vector2( - &_self, - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Rotates the given 2D vector.\n This is the equivalent of multiplying `rhs` as a 3D vector where `z` is `0`.\n This method assumes that `self` contains a valid affine transform.\n # Panics\n Will panic if the 2nd row of `self` is not `(0, 0, 1)` when `glam_assert` is enabled.", - &["_self", "rhs"], - ) - .register_documented( - "transpose", - |_self: Ref| { - let output: Val = { - { - let output: Val = bevy::math::Mat3A::transpose( - &_self, - ) - .into(); - output - } - }; - output - }, - " Returns the transpose of `self`.", - &["_self"], - ); - let registry = world - .get_resource_or_init::(); - let mut registry = registry.write(); - registry - .register_type_data::< - bevy::math::Mat3A, - bevy_mod_scripting_core::bindings::MarkAsGenerated, - >(); - } - pub(crate) fn register_mat_4_functions(world: &mut bevy::ecs::world::World) { - bevy_mod_scripting_core::bindings::function::namespace::NamespaceBuilder::< - bevy::math::Mat4, - >::new(world) - .register_documented( - "abs", - |_self: Ref| { - let output: Val = { - { - let output: Val = bevy::math::Mat4::abs( - &_self, - ) - .into(); - output - } - }; - output - }, - " Takes the absolute value of each element in `self`", - &["_self"], - ) - .register_documented( - "abs_diff_eq", - | - _self: Ref, - rhs: Val, - max_abs_diff: f32| - { - let output: bool = { - { - let output: bool = bevy::math::Mat4::abs_diff_eq( - &_self, - rhs.into_inner(), - max_abs_diff, - ) - .into(); - output - } - }; - output - }, - " Returns true if the absolute difference of all elements between `self` and `rhs`\n is less than or equal to `max_abs_diff`.\n This can be used to compare if two matrices contain similar elements. It works best\n when comparing with a known value. The `max_abs_diff` that should be used used\n depends on the values being compared against.\n For more see\n [comparing floating point numbers](https://randomascii.wordpress.com/2012/02/25/comparing-floating-point-numbers-2012-edition/).", - &["_self", "rhs", "max_abs_diff"], - ) - .register_documented( - "add", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = >::add(_self.into_inner(), rhs.into_inner()) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "add_mat4", - |_self: Ref, rhs: Ref| { - let output: Val = { - { - let output: Val = bevy::math::Mat4::add_mat4( - &_self, - &rhs, - ) - .into(); - output - } - }; - output - }, - " Adds two 4x4 matrices.", - &["_self", "rhs"], - ) - .register_documented( - "as_dmat4", - |_self: Ref| { - let output: Val = { - { - let output: Val = bevy::math::Mat4::as_dmat4( - &_self, - ) - .into(); - output - } - }; - output - }, - "", - &["_self"], - ) - .register_documented( - "clone", - |_self: Ref| { - let output: Val = { - { - let output: Val = ::clone( - &_self, - ) - .into(); - output - } - }; - output - }, - "", - &["_self"], - ) - .register_documented( - "col", - |_self: Ref, index: usize| { - let output: Val = { - { - let output: Val = bevy::math::Mat4::col( - &_self, - index, - ) - .into(); - output - } - }; - output - }, - " Returns the matrix column for the given `index`.\n # Panics\n Panics if `index` is greater than 3.", - &["_self", "index"], - ) - .register_documented( - "determinant", - |_self: Ref| { - let output: f32 = { - { - let output: f32 = bevy::math::Mat4::determinant(&_self) - .into(); - output - } - }; - output - }, - " Returns the determinant of `self`.", - &["_self"], - ) - .register_documented( - "div", - |_self: Val, rhs: f32| { - let output: Val = { - { - let output: Val = >::div(_self.into_inner(), rhs) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "div_scalar", - |_self: Ref, rhs: f32| { - let output: Val = { - { - let output: Val = bevy::math::Mat4::div_scalar( - &_self, - rhs, - ) - .into(); - output - } - }; - output - }, - " Divides a 4x4 matrix by a scalar.", - &["_self", "rhs"], - ) - .register_documented( - "eq", - |_self: Ref, rhs: Ref| { - let output: bool = { - { - let output: bool = >::eq(&_self, &rhs) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "from_axis_angle", - |axis: Val, angle: f32| { - let output: Val = { - { - let output: Val = bevy::math::Mat4::from_axis_angle( - axis.into_inner(), - angle, - ) - .into(); - output - } - }; - output - }, - " Creates an affine transformation matrix containing a 3D rotation around a normalized\n rotation `axis` of `angle` (in radians).\n The resulting matrix can be used to transform 3D points and vectors. See\n [`Self::transform_point3()`] and [`Self::transform_vector3()`].\n # Panics\n Will panic if `axis` is not normalized when `glam_assert` is enabled.", - &["axis", "angle"], - ) - .register_documented( - "from_cols", - | - x_axis: Val, - y_axis: Val, - z_axis: Val, - w_axis: Val| - { - let output: Val = { - { - let output: Val = bevy::math::Mat4::from_cols( - x_axis.into_inner(), - y_axis.into_inner(), - z_axis.into_inner(), - w_axis.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Creates a 4x4 matrix from four column vectors.", - &["x_axis", "y_axis", "z_axis", "w_axis"], - ) - .register_documented( - "from_diagonal", - |diagonal: Val| { - let output: Val = { - { - let output: Val = bevy::math::Mat4::from_diagonal( - diagonal.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Creates a 4x4 matrix with its diagonal set to `diagonal` and all other entries set to 0.", - &["diagonal"], - ) - .register_documented( - "from_euler", - |order: Val, a: f32, b: f32, c: f32| { - let output: Val = { - { - let output: Val = bevy::math::Mat4::from_euler( - order.into_inner(), - a, - b, - c, - ) - .into(); - output - } - }; - output - }, - " Creates a affine transformation matrix containing a rotation from the given euler\n rotation sequence and angles (in radians).\n The resulting matrix can be used to transform 3D points and vectors. See\n [`Self::transform_point3()`] and [`Self::transform_vector3()`].", - &["order", "a", "b", "c"], - ) - .register_documented( - "from_mat3", - |m: Val| { - let output: Val = { - { - let output: Val = bevy::math::Mat4::from_mat3( - m.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Creates an affine transformation matrix from the given 3x3 linear transformation\n matrix.\n The resulting matrix can be used to transform 3D points and vectors. See\n [`Self::transform_point3()`] and [`Self::transform_vector3()`].", - &["m"], - ) - .register_documented( - "from_mat3a", - |m: Val| { - let output: Val = { - { - let output: Val = bevy::math::Mat4::from_mat3a( - m.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Creates an affine transformation matrix from the given 3x3 linear transformation\n matrix.\n The resulting matrix can be used to transform 3D points and vectors. See\n [`Self::transform_point3()`] and [`Self::transform_vector3()`].", - &["m"], - ) - .register_documented( - "from_quat", - |rotation: Val| { - let output: Val = { - { - let output: Val = bevy::math::Mat4::from_quat( - rotation.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Creates an affine transformation matrix from the given `rotation` quaternion.\n The resulting matrix can be used to transform 3D points and vectors. See\n [`Self::transform_point3()`] and [`Self::transform_vector3()`].\n # Panics\n Will panic if `rotation` is not normalized when `glam_assert` is enabled.", - &["rotation"], - ) - .register_documented( - "from_rotation_translation", - |rotation: Val, translation: Val| { - let output: Val = { - { - let output: Val = bevy::math::Mat4::from_rotation_translation( - rotation.into_inner(), - translation.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Creates an affine transformation matrix from the given 3D `translation`.\n The resulting matrix can be used to transform 3D points and vectors. See\n [`Self::transform_point3()`] and [`Self::transform_vector3()`].\n # Panics\n Will panic if `rotation` is not normalized when `glam_assert` is enabled.", - &["rotation", "translation"], - ) - .register_documented( - "from_rotation_x", - |angle: f32| { - let output: Val = { - { - let output: Val = bevy::math::Mat4::from_rotation_x( - angle, - ) - .into(); - output - } - }; - output - }, - " Creates an affine transformation matrix containing a 3D rotation around the x axis of\n `angle` (in radians).\n The resulting matrix can be used to transform 3D points and vectors. See\n [`Self::transform_point3()`] and [`Self::transform_vector3()`].", - &["angle"], - ) - .register_documented( - "from_rotation_y", - |angle: f32| { - let output: Val = { - { - let output: Val = bevy::math::Mat4::from_rotation_y( - angle, - ) - .into(); - output - } - }; - output - }, - " Creates an affine transformation matrix containing a 3D rotation around the y axis of\n `angle` (in radians).\n The resulting matrix can be used to transform 3D points and vectors. See\n [`Self::transform_point3()`] and [`Self::transform_vector3()`].", - &["angle"], - ) - .register_documented( - "from_rotation_z", - |angle: f32| { - let output: Val = { - { - let output: Val = bevy::math::Mat4::from_rotation_z( - angle, - ) - .into(); - output - } - }; - output - }, - " Creates an affine transformation matrix containing a 3D rotation around the z axis of\n `angle` (in radians).\n The resulting matrix can be used to transform 3D points and vectors. See\n [`Self::transform_point3()`] and [`Self::transform_vector3()`].", - &["angle"], - ) - .register_documented( - "from_scale", - |scale: Val| { - let output: Val = { - { - let output: Val = bevy::math::Mat4::from_scale( - scale.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Creates an affine transformation matrix containing the given 3D non-uniform `scale`.\n The resulting matrix can be used to transform 3D points and vectors. See\n [`Self::transform_point3()`] and [`Self::transform_vector3()`].\n # Panics\n Will panic if all elements of `scale` are zero when `glam_assert` is enabled.", - &["scale"], - ) - .register_documented( - "from_scale_rotation_translation", - | - scale: Val, - rotation: Val, - translation: Val| - { - let output: Val = { - { - let output: Val = bevy::math::Mat4::from_scale_rotation_translation( - scale.into_inner(), - rotation.into_inner(), - translation.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Creates an affine transformation matrix from the given 3D `scale`, `rotation` and\n `translation`.\n The resulting matrix can be used to transform 3D points and vectors. See\n [`Self::transform_point3()`] and [`Self::transform_vector3()`].\n # Panics\n Will panic if `rotation` is not normalized when `glam_assert` is enabled.", - &["scale", "rotation", "translation"], - ) - .register_documented( - "from_translation", - |translation: Val| { - let output: Val = { - { - let output: Val = bevy::math::Mat4::from_translation( - translation.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Creates an affine transformation matrix from the given 3D `translation`.\n The resulting matrix can be used to transform 3D points and vectors. See\n [`Self::transform_point3()`] and [`Self::transform_vector3()`].", - &["translation"], - ) - .register_documented( - "inverse", - |_self: Ref| { - let output: Val = { - { - let output: Val = bevy::math::Mat4::inverse( - &_self, - ) - .into(); - output - } - }; - output - }, - " Returns the inverse of `self`.\n If the matrix is not invertible the returned matrix will be invalid.\n # Panics\n Will panic if the determinant of `self` is zero when `glam_assert` is enabled.", - &["_self"], - ) - .register_documented( - "is_finite", - |_self: Ref| { - let output: bool = { - { - let output: bool = bevy::math::Mat4::is_finite(&_self) - .into(); - output - } - }; - output - }, - " Returns `true` if, and only if, all elements are finite.\n If any element is either `NaN`, positive or negative infinity, this will return `false`.", - &["_self"], - ) - .register_documented( - "is_nan", - |_self: Ref| { - let output: bool = { - { - let output: bool = bevy::math::Mat4::is_nan(&_self).into(); - output - } - }; - output - }, - " Returns `true` if any elements are `NaN`.", - &["_self"], - ) - .register_documented( - "look_at_lh", - | - eye: Val, - center: Val, - up: Val| - { - let output: Val = { - { - let output: Val = bevy::math::Mat4::look_at_lh( - eye.into_inner(), - center.into_inner(), - up.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Creates a left-handed view matrix using a camera position, an up direction, and a focal\n point.\n For a view coordinate system with `+X=right`, `+Y=up` and `+Z=forward`.\n # Panics\n Will panic if `up` is not normalized when `glam_assert` is enabled.", - &["eye", "center", "up"], - ) - .register_documented( - "look_at_rh", - | - eye: Val, - center: Val, - up: Val| - { - let output: Val = { - { - let output: Val = bevy::math::Mat4::look_at_rh( - eye.into_inner(), - center.into_inner(), - up.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Creates a right-handed view matrix using a camera position, an up direction, and a focal\n point.\n For a view coordinate system with `+X=right`, `+Y=up` and `+Z=back`.\n # Panics\n Will panic if `up` is not normalized when `glam_assert` is enabled.", - &["eye", "center", "up"], - ) - .register_documented( - "look_to_lh", - | - eye: Val, - dir: Val, - up: Val| - { - let output: Val = { - { - let output: Val = bevy::math::Mat4::look_to_lh( - eye.into_inner(), - dir.into_inner(), - up.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Creates a left-handed view matrix using a camera position, an up direction, and a facing\n direction.\n For a view coordinate system with `+X=right`, `+Y=up` and `+Z=forward`.", - &["eye", "dir", "up"], - ) - .register_documented( - "look_to_rh", - | - eye: Val, - dir: Val, - up: Val| - { - let output: Val = { - { - let output: Val = bevy::math::Mat4::look_to_rh( - eye.into_inner(), - dir.into_inner(), - up.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Creates a right-handed view matrix using a camera position, an up direction, and a facing\n direction.\n For a view coordinate system with `+X=right`, `+Y=up` and `+Z=back`.", - &["eye", "dir", "up"], - ) - .register_documented( - "mul", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = >::mul(_self.into_inner(), rhs.into_inner()) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "mul", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = >::mul(_self.into_inner(), rhs.into_inner()) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "mul", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = >::mul(_self.into_inner(), rhs.into_inner()) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "mul", - |_self: Val, rhs: f32| { - let output: Val = { - { - let output: Val = >::mul(_self.into_inner(), rhs) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "mul_mat4", - |_self: Ref, rhs: Ref| { - let output: Val = { - { - let output: Val = bevy::math::Mat4::mul_mat4( - &_self, - &rhs, - ) - .into(); - output - } - }; - output - }, - " Multiplies two 4x4 matrices.", - &["_self", "rhs"], - ) - .register_documented( - "mul_scalar", - |_self: Ref, rhs: f32| { - let output: Val = { - { - let output: Val = bevy::math::Mat4::mul_scalar( - &_self, - rhs, - ) - .into(); - output - } - }; - output - }, - " Multiplies a 4x4 matrix by a scalar.", - &["_self", "rhs"], - ) - .register_documented( - "mul_vec4", - |_self: Ref, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::Mat4::mul_vec4( - &_self, - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Transforms a 4D vector.", - &["_self", "rhs"], - ) - .register_documented( - "neg", - |_self: Val| { - let output: Val = { - { - let output: Val = ::neg( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - "", - &["_self"], - ) - .register_documented( - "orthographic_lh", - |left: f32, right: f32, bottom: f32, top: f32, near: f32, far: f32| { - let output: Val = { - { - let output: Val = bevy::math::Mat4::orthographic_lh( - left, - right, - bottom, - top, - near, - far, - ) - .into(); - output - } - }; - output - }, - " Creates a left-handed orthographic projection matrix with `[0,1]` depth range.\n Useful to map a left-handed coordinate system to the normalized device coordinates that WebGPU/Direct3D/Metal expect.", - &["left", "right", "bottom", "top", "near", "far"], - ) - .register_documented( - "orthographic_rh", - |left: f32, right: f32, bottom: f32, top: f32, near: f32, far: f32| { - let output: Val = { - { - let output: Val = bevy::math::Mat4::orthographic_rh( - left, - right, - bottom, - top, - near, - far, - ) - .into(); - output - } - }; - output - }, - " Creates a right-handed orthographic projection matrix with `[0,1]` depth range.\n Useful to map a right-handed coordinate system to the normalized device coordinates that WebGPU/Direct3D/Metal expect.", - &["left", "right", "bottom", "top", "near", "far"], - ) - .register_documented( - "orthographic_rh_gl", - |left: f32, right: f32, bottom: f32, top: f32, near: f32, far: f32| { - let output: Val = { - { - let output: Val = bevy::math::Mat4::orthographic_rh_gl( - left, - right, - bottom, - top, - near, - far, - ) - .into(); - output - } - }; - output - }, - " Creates a right-handed orthographic projection matrix with `[-1,1]` depth\n range. This is the same as the OpenGL `glOrtho` function in OpenGL.\n See\n \n Useful to map a right-handed coordinate system to the normalized device coordinates that OpenGL expects.", - &["left", "right", "bottom", "top", "near", "far"], - ) - .register_documented( - "perspective_infinite_lh", - |fov_y_radians: f32, aspect_ratio: f32, z_near: f32| { - let output: Val = { - { - let output: Val = bevy::math::Mat4::perspective_infinite_lh( - fov_y_radians, - aspect_ratio, - z_near, - ) - .into(); - output - } - }; - output - }, - " Creates an infinite left-handed perspective projection matrix with `[0,1]` depth range.\n Like `perspective_lh`, but with an infinite value for `z_far`.\n The result is that points near `z_near` are mapped to depth `0`, and as they move towards infinity the depth approaches `1`.\n # Panics\n Will panic if `z_near` or `z_far` are less than or equal to zero when `glam_assert` is\n enabled.", - &["fov_y_radians", "aspect_ratio", "z_near"], - ) - .register_documented( - "perspective_infinite_reverse_lh", - |fov_y_radians: f32, aspect_ratio: f32, z_near: f32| { - let output: Val = { - { - let output: Val = bevy::math::Mat4::perspective_infinite_reverse_lh( - fov_y_radians, - aspect_ratio, - z_near, - ) - .into(); - output - } - }; - output - }, - " Creates an infinite reverse left-handed perspective projection matrix with `[0,1]` depth range.\n Similar to `perspective_infinite_lh`, but maps `Z = z_near` to a depth of `1` and `Z = infinity` to a depth of `0`.\n # Panics\n Will panic if `z_near` is less than or equal to zero when `glam_assert` is enabled.", - &["fov_y_radians", "aspect_ratio", "z_near"], - ) - .register_documented( - "perspective_infinite_reverse_rh", - |fov_y_radians: f32, aspect_ratio: f32, z_near: f32| { - let output: Val = { - { - let output: Val = bevy::math::Mat4::perspective_infinite_reverse_rh( - fov_y_radians, - aspect_ratio, - z_near, - ) - .into(); - output - } - }; - output - }, - " Creates an infinite reverse right-handed perspective projection matrix with `[0,1]` depth range.\n Similar to `perspective_infinite_rh`, but maps `Z = z_near` to a depth of `1` and `Z = infinity` to a depth of `0`.\n # Panics\n Will panic if `z_near` is less than or equal to zero when `glam_assert` is enabled.", - &["fov_y_radians", "aspect_ratio", "z_near"], - ) - .register_documented( - "perspective_infinite_rh", - |fov_y_radians: f32, aspect_ratio: f32, z_near: f32| { - let output: Val = { - { - let output: Val = bevy::math::Mat4::perspective_infinite_rh( - fov_y_radians, - aspect_ratio, - z_near, - ) - .into(); - output - } - }; - output - }, - " Creates an infinite right-handed perspective projection matrix with `[0,1]` depth range.\n Like `perspective_rh`, but with an infinite value for `z_far`.\n The result is that points near `z_near` are mapped to depth `0`, and as they move towards infinity the depth approaches `1`.\n # Panics\n Will panic if `z_near` or `z_far` are less than or equal to zero when `glam_assert` is\n enabled.", - &["fov_y_radians", "aspect_ratio", "z_near"], - ) - .register_documented( - "perspective_lh", - |fov_y_radians: f32, aspect_ratio: f32, z_near: f32, z_far: f32| { - let output: Val = { - { - let output: Val = bevy::math::Mat4::perspective_lh( - fov_y_radians, - aspect_ratio, - z_near, - z_far, - ) - .into(); - output - } - }; - output - }, - " Creates a left-handed perspective projection matrix with `[0,1]` depth range.\n Useful to map the standard left-handed coordinate system into what WebGPU/Metal/Direct3D expect.\n # Panics\n Will panic if `z_near` or `z_far` are less than or equal to zero when `glam_assert` is\n enabled.", - &["fov_y_radians", "aspect_ratio", "z_near", "z_far"], - ) - .register_documented( - "perspective_rh", - |fov_y_radians: f32, aspect_ratio: f32, z_near: f32, z_far: f32| { - let output: Val = { - { - let output: Val = bevy::math::Mat4::perspective_rh( - fov_y_radians, - aspect_ratio, - z_near, - z_far, - ) - .into(); - output - } - }; - output - }, - " Creates a right-handed perspective projection matrix with `[0,1]` depth range.\n Useful to map the standard right-handed coordinate system into what WebGPU/Metal/Direct3D expect.\n # Panics\n Will panic if `z_near` or `z_far` are less than or equal to zero when `glam_assert` is\n enabled.", - &["fov_y_radians", "aspect_ratio", "z_near", "z_far"], - ) - .register_documented( - "perspective_rh_gl", - |fov_y_radians: f32, aspect_ratio: f32, z_near: f32, z_far: f32| { - let output: Val = { - { - let output: Val = bevy::math::Mat4::perspective_rh_gl( - fov_y_radians, - aspect_ratio, - z_near, - z_far, - ) - .into(); - output - } - }; - output - }, - " Creates a right-handed perspective projection matrix with `[-1,1]` depth range.\n Useful to map the standard right-handed coordinate system into what OpenGL expects.\n This is the same as the OpenGL `gluPerspective` function.\n See ", - &["fov_y_radians", "aspect_ratio", "z_near", "z_far"], - ) - .register_documented( - "project_point3", - |_self: Ref, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::Mat4::project_point3( - &_self, - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Transforms the given 3D vector as a point, applying perspective correction.\n This is the equivalent of multiplying the 3D vector as a 4D vector where `w` is `1.0`.\n The perspective divide is performed meaning the resulting 3D vector is divided by `w`.\n This method assumes that `self` contains a projective transform.", - &["_self", "rhs"], - ) - .register_documented( - "project_point3a", - |_self: Ref, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::Mat4::project_point3a( - &_self, - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Transforms the given [`Vec3A`] as a 3D point, applying perspective correction.\n This is the equivalent of multiplying the [`Vec3A`] as a 4D vector where `w` is `1.0`.\n The perspective divide is performed meaning the resulting 3D vector is divided by `w`.\n This method assumes that `self` contains a projective transform.", - &["_self", "rhs"], - ) - .register_documented( - "row", - |_self: Ref, index: usize| { - let output: Val = { - { - let output: Val = bevy::math::Mat4::row( - &_self, - index, - ) - .into(); - output - } - }; - output - }, - " Returns the matrix row for the given `index`.\n # Panics\n Panics if `index` is greater than 3.", - &["_self", "index"], - ) - .register_documented( - "sub", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = >::sub(_self.into_inner(), rhs.into_inner()) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "sub_mat4", - |_self: Ref, rhs: Ref| { - let output: Val = { - { - let output: Val = bevy::math::Mat4::sub_mat4( - &_self, - &rhs, - ) - .into(); - output - } - }; - output - }, - " Subtracts two 4x4 matrices.", - &["_self", "rhs"], - ) - .register_documented( - "to_cols_array", - |_self: Ref| { - let output: [f32; 16] = { - { - let output: [f32; 16] = bevy::math::Mat4::to_cols_array( - &_self, - ) - .into(); - output - } - }; - output - }, - " Creates a `[f32; 16]` array storing data in column major order.\n If you require data in row major order `transpose` the matrix first.", - &["_self"], - ) - .register_documented( - "to_cols_array_2d", - |_self: Ref| { - let output: [[f32; 4]; 4] = { - { - let output: [[f32; 4]; 4] = bevy::math::Mat4::to_cols_array_2d( - &_self, - ) - .into(); - output - } - }; - output - }, - " Creates a `[[f32; 4]; 4]` 4D array storing data in column major order.\n If you require data in row major order `transpose` the matrix first.", - &["_self"], - ) - .register_documented( - "to_euler", - |_self: Ref, order: Val| { - let output: (f32, f32, f32) = { - { - let output: (f32, f32, f32) = bevy::math::Mat4::to_euler( - &_self, - order.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Extract Euler angles with the given Euler rotation order.\n Note if the upper 3x3 matrix contain scales, shears, or other non-rotation transformations\n then the resulting Euler angles will be ill-defined.\n # Panics\n Will panic if any column of the upper 3x3 rotation matrix is not normalized when\n `glam_assert` is enabled.", - &["_self", "order"], - ) - .register_documented( - "transform_point3", - |_self: Ref, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::Mat4::transform_point3( - &_self, - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Transforms the given 3D vector as a point.\n This is the equivalent of multiplying the 3D vector as a 4D vector where `w` is\n `1.0`.\n This method assumes that `self` contains a valid affine transform. It does not perform\n a perspective divide, if `self` contains a perspective transform, or if you are unsure,\n the [`Self::project_point3()`] method should be used instead.\n # Panics\n Will panic if the 3rd row of `self` is not `(0, 0, 0, 1)` when `glam_assert` is enabled.", - &["_self", "rhs"], - ) - .register_documented( - "transform_point3a", - |_self: Ref, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::Mat4::transform_point3a( - &_self, - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Transforms the given [`Vec3A`] as 3D point.\n This is the equivalent of multiplying the [`Vec3A`] as a 4D vector where `w` is `1.0`.", - &["_self", "rhs"], - ) - .register_documented( - "transform_vector3", - |_self: Ref, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::Mat4::transform_vector3( - &_self, - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Transforms the give 3D vector as a direction.\n This is the equivalent of multiplying the 3D vector as a 4D vector where `w` is\n `0.0`.\n This method assumes that `self` contains a valid affine transform.\n # Panics\n Will panic if the 3rd row of `self` is not `(0, 0, 0, 1)` when `glam_assert` is enabled.", - &["_self", "rhs"], - ) - .register_documented( - "transform_vector3a", - |_self: Ref, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::Mat4::transform_vector3a( - &_self, - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Transforms the give [`Vec3A`] as 3D vector.\n This is the equivalent of multiplying the [`Vec3A`] as a 4D vector where `w` is `0.0`.", - &["_self", "rhs"], - ) - .register_documented( - "transpose", - |_self: Ref| { - let output: Val = { - { - let output: Val = bevy::math::Mat4::transpose( - &_self, - ) - .into(); - output - } - }; - output - }, - " Returns the transpose of `self`.", - &["_self"], - ); - let registry = world - .get_resource_or_init::(); - let mut registry = registry.write(); - registry - .register_type_data::< - bevy::math::Mat4, - bevy_mod_scripting_core::bindings::MarkAsGenerated, - >(); - } - pub(crate) fn register_d_mat_2_functions(world: &mut bevy::ecs::world::World) { - bevy_mod_scripting_core::bindings::function::namespace::NamespaceBuilder::< - bevy::math::DMat2, - >::new(world) - .register_documented( - "abs", - |_self: Ref| { - let output: Val = { - { - let output: Val = bevy::math::DMat2::abs( - &_self, - ) - .into(); - output - } - }; - output - }, - " Takes the absolute value of each element in `self`", - &["_self"], - ) - .register_documented( - "abs_diff_eq", - | - _self: Ref, - rhs: Val, - max_abs_diff: f64| - { - let output: bool = { - { - let output: bool = bevy::math::DMat2::abs_diff_eq( - &_self, - rhs.into_inner(), - max_abs_diff, - ) - .into(); - output - } - }; - output - }, - " Returns true if the absolute difference of all elements between `self` and `rhs`\n is less than or equal to `max_abs_diff`.\n This can be used to compare if two matrices contain similar elements. It works best\n when comparing with a known value. The `max_abs_diff` that should be used used\n depends on the values being compared against.\n For more see\n [comparing floating point numbers](https://randomascii.wordpress.com/2012/02/25/comparing-floating-point-numbers-2012-edition/).", - &["_self", "rhs", "max_abs_diff"], - ) - .register_documented( - "add", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = >::add(_self.into_inner(), rhs.into_inner()) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "add_mat2", - |_self: Ref, rhs: Ref| { - let output: Val = { - { - let output: Val = bevy::math::DMat2::add_mat2( - &_self, - &rhs, - ) - .into(); - output - } - }; - output - }, - " Adds two 2x2 matrices.", - &["_self", "rhs"], - ) - .register_documented( - "as_mat2", - |_self: Ref| { - let output: Val = { - { - let output: Val = bevy::math::DMat2::as_mat2( - &_self, - ) - .into(); - output - } - }; - output - }, - "", - &["_self"], - ) - .register_documented( - "clone", - |_self: Ref| { - let output: Val = { - { - let output: Val = ::clone( - &_self, - ) - .into(); - output - } - }; - output - }, - "", - &["_self"], - ) - .register_documented( - "col", - |_self: Ref, index: usize| { - let output: Val = { - { - let output: Val = bevy::math::DMat2::col( - &_self, - index, - ) - .into(); - output - } - }; - output - }, - " Returns the matrix column for the given `index`.\n # Panics\n Panics if `index` is greater than 1.", - &["_self", "index"], - ) - .register_documented( - "determinant", - |_self: Ref| { - let output: f64 = { - { - let output: f64 = bevy::math::DMat2::determinant(&_self) - .into(); - output - } - }; - output - }, - " Returns the determinant of `self`.", - &["_self"], - ) - .register_documented( - "div", - |_self: Val, rhs: f64| { - let output: Val = { - { - let output: Val = >::div(_self.into_inner(), rhs) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "div_scalar", - |_self: Ref, rhs: f64| { - let output: Val = { - { - let output: Val = bevy::math::DMat2::div_scalar( - &_self, - rhs, - ) - .into(); - output - } - }; - output - }, - " Divides a 2x2 matrix by a scalar.", - &["_self", "rhs"], - ) - .register_documented( - "eq", - |_self: Ref, rhs: Ref| { - let output: bool = { - { - let output: bool = >::eq(&_self, &rhs) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "from_angle", - |angle: f64| { - let output: Val = { - { - let output: Val = bevy::math::DMat2::from_angle( - angle, - ) - .into(); - output - } - }; - output - }, - " Creates a 2x2 matrix containing a rotation of `angle` (in radians).", - &["angle"], - ) - .register_documented( - "from_cols", - |x_axis: Val, y_axis: Val| { - let output: Val = { - { - let output: Val = bevy::math::DMat2::from_cols( - x_axis.into_inner(), - y_axis.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Creates a 2x2 matrix from two column vectors.", - &["x_axis", "y_axis"], - ) - .register_documented( - "from_diagonal", - |diagonal: Val| { - let output: Val = { - { - let output: Val = bevy::math::DMat2::from_diagonal( - diagonal.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Creates a 2x2 matrix with its diagonal set to `diagonal` and all other entries set to 0.", - &["diagonal"], - ) - .register_documented( - "from_mat3", - |m: Val| { - let output: Val = { - { - let output: Val = bevy::math::DMat2::from_mat3( - m.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Creates a 2x2 matrix from a 3x3 matrix, discarding the 2nd row and column.", - &["m"], - ) - .register_documented( - "from_mat3_minor", - |m: Val, i: usize, j: usize| { - let output: Val = { - { - let output: Val = bevy::math::DMat2::from_mat3_minor( - m.into_inner(), - i, - j, - ) - .into(); - output - } - }; - output - }, - " Creates a 2x2 matrix from the minor of the given 3x3 matrix, discarding the `i`th column\n and `j`th row.\n # Panics\n Panics if `i` or `j` is greater than 2.", - &["m", "i", "j"], - ) - .register_documented( - "from_scale_angle", - |scale: Val, angle: f64| { - let output: Val = { - { - let output: Val = bevy::math::DMat2::from_scale_angle( - scale.into_inner(), - angle, - ) - .into(); - output - } - }; - output - }, - " Creates a 2x2 matrix containing the combining non-uniform `scale` and rotation of\n `angle` (in radians).", - &["scale", "angle"], - ) - .register_documented( - "inverse", - |_self: Ref| { - let output: Val = { - { - let output: Val = bevy::math::DMat2::inverse( - &_self, - ) - .into(); - output - } - }; - output - }, - " Returns the inverse of `self`.\n If the matrix is not invertible the returned matrix will be invalid.\n # Panics\n Will panic if the determinant of `self` is zero when `glam_assert` is enabled.", - &["_self"], - ) - .register_documented( - "is_finite", - |_self: Ref| { - let output: bool = { - { - let output: bool = bevy::math::DMat2::is_finite(&_self) - .into(); - output - } - }; - output - }, - " Returns `true` if, and only if, all elements are finite.\n If any element is either `NaN`, positive or negative infinity, this will return `false`.", - &["_self"], - ) - .register_documented( - "is_nan", - |_self: Ref| { - let output: bool = { - { - let output: bool = bevy::math::DMat2::is_nan(&_self).into(); - output - } - }; - output - }, - " Returns `true` if any elements are `NaN`.", - &["_self"], - ) - .register_documented( - "mul", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = >::mul(_self.into_inner(), rhs.into_inner()) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "mul", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = >::mul(_self.into_inner(), rhs.into_inner()) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "mul", - |_self: Val, rhs: f64| { - let output: Val = { - { - let output: Val = >::mul(_self.into_inner(), rhs) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "mul_mat2", - |_self: Ref, rhs: Ref| { - let output: Val = { - { - let output: Val = bevy::math::DMat2::mul_mat2( - &_self, - &rhs, - ) - .into(); - output - } - }; - output - }, - " Multiplies two 2x2 matrices.", - &["_self", "rhs"], - ) - .register_documented( - "mul_scalar", - |_self: Ref, rhs: f64| { - let output: Val = { - { - let output: Val = bevy::math::DMat2::mul_scalar( - &_self, - rhs, - ) - .into(); - output - } - }; - output - }, - " Multiplies a 2x2 matrix by a scalar.", - &["_self", "rhs"], - ) - .register_documented( - "mul_vec2", - |_self: Ref, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::DMat2::mul_vec2( - &_self, - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Transforms a 2D vector.", - &["_self", "rhs"], - ) - .register_documented( - "neg", - |_self: Val| { - let output: Val = { - { - let output: Val = ::neg( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - "", - &["_self"], - ) - .register_documented( - "row", - |_self: Ref, index: usize| { - let output: Val = { - { - let output: Val = bevy::math::DMat2::row( - &_self, - index, - ) - .into(); - output - } - }; - output - }, - " Returns the matrix row for the given `index`.\n # Panics\n Panics if `index` is greater than 1.", - &["_self", "index"], - ) - .register_documented( - "sub", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = >::sub(_self.into_inner(), rhs.into_inner()) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "sub_mat2", - |_self: Ref, rhs: Ref| { - let output: Val = { - { - let output: Val = bevy::math::DMat2::sub_mat2( - &_self, - &rhs, - ) - .into(); - output - } - }; - output - }, - " Subtracts two 2x2 matrices.", - &["_self", "rhs"], - ) - .register_documented( - "to_cols_array", - |_self: Ref| { - let output: [f64; 4] = { - { - let output: [f64; 4] = bevy::math::DMat2::to_cols_array( - &_self, - ) - .into(); - output - } - }; - output - }, - " Creates a `[f64; 4]` array storing data in column major order.\n If you require data in row major order `transpose` the matrix first.", - &["_self"], - ) - .register_documented( - "to_cols_array_2d", - |_self: Ref| { - let output: [[f64; 2]; 2] = { - { - let output: [[f64; 2]; 2] = bevy::math::DMat2::to_cols_array_2d( - &_self, - ) - .into(); - output - } - }; - output - }, - " Creates a `[[f64; 2]; 2]` 2D array storing data in column major order.\n If you require data in row major order `transpose` the matrix first.", - &["_self"], - ) - .register_documented( - "transpose", - |_self: Ref| { - let output: Val = { - { - let output: Val = bevy::math::DMat2::transpose( - &_self, - ) - .into(); - output - } - }; - output - }, - " Returns the transpose of `self`.", - &["_self"], - ); - let registry = world - .get_resource_or_init::(); - let mut registry = registry.write(); - registry - .register_type_data::< - bevy::math::DMat2, - bevy_mod_scripting_core::bindings::MarkAsGenerated, - >(); - } - pub(crate) fn register_d_mat_3_functions(world: &mut bevy::ecs::world::World) { - bevy_mod_scripting_core::bindings::function::namespace::NamespaceBuilder::< - bevy::math::DMat3, - >::new(world) - .register_documented( - "abs", - |_self: Ref| { - let output: Val = { - { - let output: Val = bevy::math::DMat3::abs( - &_self, - ) - .into(); - output - } - }; - output - }, - " Takes the absolute value of each element in `self`", - &["_self"], - ) - .register_documented( - "abs_diff_eq", - | - _self: Ref, - rhs: Val, - max_abs_diff: f64| - { - let output: bool = { - { - let output: bool = bevy::math::DMat3::abs_diff_eq( - &_self, - rhs.into_inner(), - max_abs_diff, - ) - .into(); - output - } - }; - output - }, - " Returns true if the absolute difference of all elements between `self` and `rhs`\n is less than or equal to `max_abs_diff`.\n This can be used to compare if two matrices contain similar elements. It works best\n when comparing with a known value. The `max_abs_diff` that should be used used\n depends on the values being compared against.\n For more see\n [comparing floating point numbers](https://randomascii.wordpress.com/2012/02/25/comparing-floating-point-numbers-2012-edition/).", - &["_self", "rhs", "max_abs_diff"], - ) - .register_documented( - "add", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = >::add(_self.into_inner(), rhs.into_inner()) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "add_mat3", - |_self: Ref, rhs: Ref| { - let output: Val = { - { - let output: Val = bevy::math::DMat3::add_mat3( - &_self, - &rhs, - ) - .into(); - output - } - }; - output - }, - " Adds two 3x3 matrices.", - &["_self", "rhs"], - ) - .register_documented( - "as_mat3", - |_self: Ref| { - let output: Val = { - { - let output: Val = bevy::math::DMat3::as_mat3( - &_self, - ) - .into(); - output - } - }; - output - }, - "", - &["_self"], - ) - .register_documented( - "clone", - |_self: Ref| { - let output: Val = { - { - let output: Val = ::clone( - &_self, - ) - .into(); - output - } - }; - output - }, - "", - &["_self"], - ) - .register_documented( - "col", - |_self: Ref, index: usize| { - let output: Val = { - { - let output: Val = bevy::math::DMat3::col( - &_self, - index, - ) - .into(); - output - } - }; - output - }, - " Returns the matrix column for the given `index`.\n # Panics\n Panics if `index` is greater than 2.", - &["_self", "index"], - ) - .register_documented( - "determinant", - |_self: Ref| { - let output: f64 = { - { - let output: f64 = bevy::math::DMat3::determinant(&_self) - .into(); - output - } - }; - output - }, - " Returns the determinant of `self`.", - &["_self"], - ) - .register_documented( - "div", - |_self: Val, rhs: f64| { - let output: Val = { - { - let output: Val = >::div(_self.into_inner(), rhs) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "div_scalar", - |_self: Ref, rhs: f64| { - let output: Val = { - { - let output: Val = bevy::math::DMat3::div_scalar( - &_self, - rhs, - ) - .into(); - output - } - }; - output - }, - " Divides a 3x3 matrix by a scalar.", - &["_self", "rhs"], - ) - .register_documented( - "eq", - |_self: Ref, rhs: Ref| { - let output: bool = { - { - let output: bool = >::eq(&_self, &rhs) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "from_angle", - |angle: f64| { - let output: Val = { - { - let output: Val = bevy::math::DMat3::from_angle( - angle, - ) - .into(); - output - } - }; - output - }, - " Creates an affine transformation matrix from the given 2D rotation `angle` (in\n radians).\n The resulting matrix can be used to transform 2D points and vectors. See\n [`Self::transform_point2()`] and [`Self::transform_vector2()`].", - &["angle"], - ) - .register_documented( - "from_axis_angle", - |axis: Val, angle: f64| { - let output: Val = { - { - let output: Val = bevy::math::DMat3::from_axis_angle( - axis.into_inner(), - angle, - ) - .into(); - output - } - }; - output - }, - " Creates a 3D rotation matrix from a normalized rotation `axis` and `angle` (in\n radians).\n # Panics\n Will panic if `axis` is not normalized when `glam_assert` is enabled.", - &["axis", "angle"], - ) - .register_documented( - "from_cols", - | - x_axis: Val, - y_axis: Val, - z_axis: Val| - { - let output: Val = { - { - let output: Val = bevy::math::DMat3::from_cols( - x_axis.into_inner(), - y_axis.into_inner(), - z_axis.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Creates a 3x3 matrix from three column vectors.", - &["x_axis", "y_axis", "z_axis"], - ) - .register_documented( - "from_diagonal", - |diagonal: Val| { - let output: Val = { - { - let output: Val = bevy::math::DMat3::from_diagonal( - diagonal.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Creates a 3x3 matrix with its diagonal set to `diagonal` and all other entries set to 0.", - &["diagonal"], - ) - .register_documented( - "from_euler", - |order: Val, a: f64, b: f64, c: f64| { - let output: Val = { - { - let output: Val = bevy::math::DMat3::from_euler( - order.into_inner(), - a, - b, - c, - ) - .into(); - output - } - }; - output - }, - " Creates a 3D rotation matrix from the given euler rotation sequence and the angles (in\n radians).", - &["order", "a", "b", "c"], - ) - .register_documented( - "from_mat2", - |m: Val| { - let output: Val = { - { - let output: Val = bevy::math::DMat3::from_mat2( - m.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Creates an affine transformation matrix from the given 2x2 matrix.\n The resulting matrix can be used to transform 2D points and vectors. See\n [`Self::transform_point2()`] and [`Self::transform_vector2()`].", - &["m"], - ) - .register_documented( - "from_mat4", - |m: Val| { - let output: Val = { - { - let output: Val = bevy::math::DMat3::from_mat4( - m.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Creates a 3x3 matrix from a 4x4 matrix, discarding the 4th row and column.", - &["m"], - ) - .register_documented( - "from_mat4_minor", - |m: Val, i: usize, j: usize| { - let output: Val = { - { - let output: Val = bevy::math::DMat3::from_mat4_minor( - m.into_inner(), - i, - j, - ) - .into(); - output - } - }; - output - }, - " Creates a 3x3 matrix from the minor of the given 4x4 matrix, discarding the `i`th column\n and `j`th row.\n # Panics\n Panics if `i` or `j` is greater than 3.", - &["m", "i", "j"], - ) - .register_documented( - "from_quat", - |rotation: Val| { - let output: Val = { - { - let output: Val = bevy::math::DMat3::from_quat( - rotation.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Creates a 3D rotation matrix from the given quaternion.\n # Panics\n Will panic if `rotation` is not normalized when `glam_assert` is enabled.", - &["rotation"], - ) - .register_documented( - "from_rotation_x", - |angle: f64| { - let output: Val = { - { - let output: Val = bevy::math::DMat3::from_rotation_x( - angle, - ) - .into(); - output - } - }; - output - }, - " Creates a 3D rotation matrix from `angle` (in radians) around the x axis.", - &["angle"], - ) - .register_documented( - "from_rotation_y", - |angle: f64| { - let output: Val = { - { - let output: Val = bevy::math::DMat3::from_rotation_y( - angle, - ) - .into(); - output - } - }; - output - }, - " Creates a 3D rotation matrix from `angle` (in radians) around the y axis.", - &["angle"], - ) - .register_documented( - "from_rotation_z", - |angle: f64| { - let output: Val = { - { - let output: Val = bevy::math::DMat3::from_rotation_z( - angle, - ) - .into(); - output - } - }; - output - }, - " Creates a 3D rotation matrix from `angle` (in radians) around the z axis.", - &["angle"], - ) - .register_documented( - "from_scale", - |scale: Val| { - let output: Val = { - { - let output: Val = bevy::math::DMat3::from_scale( - scale.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Creates an affine transformation matrix from the given non-uniform 2D `scale`.\n The resulting matrix can be used to transform 2D points and vectors. See\n [`Self::transform_point2()`] and [`Self::transform_vector2()`].\n # Panics\n Will panic if all elements of `scale` are zero when `glam_assert` is enabled.", - &["scale"], - ) - .register_documented( - "from_scale_angle_translation", - | - scale: Val, - angle: f64, - translation: Val| - { - let output: Val = { - { - let output: Val = bevy::math::DMat3::from_scale_angle_translation( - scale.into_inner(), - angle, - translation.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Creates an affine transformation matrix from the given 2D `scale`, rotation `angle` (in\n radians) and `translation`.\n The resulting matrix can be used to transform 2D points and vectors. See\n [`Self::transform_point2()`] and [`Self::transform_vector2()`].", - &["scale", "angle", "translation"], - ) - .register_documented( - "from_translation", - |translation: Val| { - let output: Val = { - { - let output: Val = bevy::math::DMat3::from_translation( - translation.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Creates an affine transformation matrix from the given 2D `translation`.\n The resulting matrix can be used to transform 2D points and vectors. See\n [`Self::transform_point2()`] and [`Self::transform_vector2()`].", - &["translation"], - ) - .register_documented( - "inverse", - |_self: Ref| { - let output: Val = { - { - let output: Val = bevy::math::DMat3::inverse( - &_self, - ) - .into(); - output - } - }; - output - }, - " Returns the inverse of `self`.\n If the matrix is not invertible the returned matrix will be invalid.\n # Panics\n Will panic if the determinant of `self` is zero when `glam_assert` is enabled.", - &["_self"], - ) - .register_documented( - "is_finite", - |_self: Ref| { - let output: bool = { - { - let output: bool = bevy::math::DMat3::is_finite(&_self) - .into(); - output - } - }; - output - }, - " Returns `true` if, and only if, all elements are finite.\n If any element is either `NaN`, positive or negative infinity, this will return `false`.", - &["_self"], - ) - .register_documented( - "is_nan", - |_self: Ref| { - let output: bool = { - { - let output: bool = bevy::math::DMat3::is_nan(&_self).into(); - output - } - }; - output - }, - " Returns `true` if any elements are `NaN`.", - &["_self"], - ) - .register_documented( - "mul", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = >::mul(_self.into_inner(), rhs.into_inner()) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "mul", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = >::mul(_self.into_inner(), rhs.into_inner()) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "mul", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = >::mul(_self.into_inner(), rhs.into_inner()) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "mul", - |_self: Val, rhs: f64| { - let output: Val = { - { - let output: Val = >::mul(_self.into_inner(), rhs) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "mul_mat3", - |_self: Ref, rhs: Ref| { - let output: Val = { - { - let output: Val = bevy::math::DMat3::mul_mat3( - &_self, - &rhs, - ) - .into(); - output - } - }; - output - }, - " Multiplies two 3x3 matrices.", - &["_self", "rhs"], - ) - .register_documented( - "mul_scalar", - |_self: Ref, rhs: f64| { - let output: Val = { - { - let output: Val = bevy::math::DMat3::mul_scalar( - &_self, - rhs, - ) - .into(); - output - } - }; - output - }, - " Multiplies a 3x3 matrix by a scalar.", - &["_self", "rhs"], - ) - .register_documented( - "mul_vec3", - |_self: Ref, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::DMat3::mul_vec3( - &_self, - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Transforms a 3D vector.", - &["_self", "rhs"], - ) - .register_documented( - "neg", - |_self: Val| { - let output: Val = { - { - let output: Val = ::neg( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - "", - &["_self"], - ) - .register_documented( - "row", - |_self: Ref, index: usize| { - let output: Val = { - { - let output: Val = bevy::math::DMat3::row( - &_self, - index, - ) - .into(); - output - } - }; - output - }, - " Returns the matrix row for the given `index`.\n # Panics\n Panics if `index` is greater than 2.", - &["_self", "index"], - ) - .register_documented( - "sub", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = >::sub(_self.into_inner(), rhs.into_inner()) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "sub_mat3", - |_self: Ref, rhs: Ref| { - let output: Val = { - { - let output: Val = bevy::math::DMat3::sub_mat3( - &_self, - &rhs, - ) - .into(); - output - } - }; - output - }, - " Subtracts two 3x3 matrices.", - &["_self", "rhs"], - ) - .register_documented( - "to_cols_array", - |_self: Ref| { - let output: [f64; 9] = { - { - let output: [f64; 9] = bevy::math::DMat3::to_cols_array( - &_self, - ) - .into(); - output - } - }; - output - }, - " Creates a `[f64; 9]` array storing data in column major order.\n If you require data in row major order `transpose` the matrix first.", - &["_self"], - ) - .register_documented( - "to_cols_array_2d", - |_self: Ref| { - let output: [[f64; 3]; 3] = { - { - let output: [[f64; 3]; 3] = bevy::math::DMat3::to_cols_array_2d( - &_self, - ) - .into(); - output - } - }; - output - }, - " Creates a `[[f64; 3]; 3]` 3D array storing data in column major order.\n If you require data in row major order `transpose` the matrix first.", - &["_self"], - ) - .register_documented( - "to_euler", - |_self: Ref, order: Val| { - let output: (f64, f64, f64) = { - { - let output: (f64, f64, f64) = bevy::math::DMat3::to_euler( - &_self, - order.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Extract Euler angles with the given Euler rotation order.\n Note if the input matrix contains scales, shears, or other non-rotation transformations then\n the resulting Euler angles will be ill-defined.\n # Panics\n Will panic if any input matrix column is not normalized when `glam_assert` is enabled.", - &["_self", "order"], - ) - .register_documented( - "transform_point2", - |_self: Ref, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::DMat3::transform_point2( - &_self, - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Transforms the given 2D vector as a point.\n This is the equivalent of multiplying `rhs` as a 3D vector where `z` is `1`.\n This method assumes that `self` contains a valid affine transform.\n # Panics\n Will panic if the 2nd row of `self` is not `(0, 0, 1)` when `glam_assert` is enabled.", - &["_self", "rhs"], - ) - .register_documented( - "transform_vector2", - |_self: Ref, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::DMat3::transform_vector2( - &_self, - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Rotates the given 2D vector.\n This is the equivalent of multiplying `rhs` as a 3D vector where `z` is `0`.\n This method assumes that `self` contains a valid affine transform.\n # Panics\n Will panic if the 2nd row of `self` is not `(0, 0, 1)` when `glam_assert` is enabled.", - &["_self", "rhs"], - ) - .register_documented( - "transpose", - |_self: Ref| { - let output: Val = { - { - let output: Val = bevy::math::DMat3::transpose( - &_self, - ) - .into(); - output - } - }; - output - }, - " Returns the transpose of `self`.", - &["_self"], - ); - let registry = world - .get_resource_or_init::(); - let mut registry = registry.write(); - registry - .register_type_data::< - bevy::math::DMat3, - bevy_mod_scripting_core::bindings::MarkAsGenerated, - >(); - } - pub(crate) fn register_d_mat_4_functions(world: &mut bevy::ecs::world::World) { - bevy_mod_scripting_core::bindings::function::namespace::NamespaceBuilder::< - bevy::math::DMat4, - >::new(world) - .register_documented( - "abs", - |_self: Ref| { - let output: Val = { - { - let output: Val = bevy::math::DMat4::abs( - &_self, - ) - .into(); - output - } - }; - output - }, - " Takes the absolute value of each element in `self`", - &["_self"], - ) - .register_documented( - "abs_diff_eq", - | - _self: Ref, - rhs: Val, - max_abs_diff: f64| - { - let output: bool = { - { - let output: bool = bevy::math::DMat4::abs_diff_eq( - &_self, - rhs.into_inner(), - max_abs_diff, - ) - .into(); - output - } - }; - output - }, - " Returns true if the absolute difference of all elements between `self` and `rhs`\n is less than or equal to `max_abs_diff`.\n This can be used to compare if two matrices contain similar elements. It works best\n when comparing with a known value. The `max_abs_diff` that should be used used\n depends on the values being compared against.\n For more see\n [comparing floating point numbers](https://randomascii.wordpress.com/2012/02/25/comparing-floating-point-numbers-2012-edition/).", - &["_self", "rhs", "max_abs_diff"], - ) - .register_documented( - "add", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = >::add(_self.into_inner(), rhs.into_inner()) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "add_mat4", - |_self: Ref, rhs: Ref| { - let output: Val = { - { - let output: Val = bevy::math::DMat4::add_mat4( - &_self, - &rhs, - ) - .into(); - output - } - }; - output - }, - " Adds two 4x4 matrices.", - &["_self", "rhs"], - ) - .register_documented( - "as_mat4", - |_self: Ref| { - let output: Val = { - { - let output: Val = bevy::math::DMat4::as_mat4( - &_self, - ) - .into(); - output - } - }; - output - }, - "", - &["_self"], - ) - .register_documented( - "clone", - |_self: Ref| { - let output: Val = { - { - let output: Val = ::clone( - &_self, - ) - .into(); - output - } - }; - output - }, - "", - &["_self"], - ) - .register_documented( - "col", - |_self: Ref, index: usize| { - let output: Val = { - { - let output: Val = bevy::math::DMat4::col( - &_self, - index, - ) - .into(); - output - } - }; - output - }, - " Returns the matrix column for the given `index`.\n # Panics\n Panics if `index` is greater than 3.", - &["_self", "index"], - ) - .register_documented( - "determinant", - |_self: Ref| { - let output: f64 = { - { - let output: f64 = bevy::math::DMat4::determinant(&_self) - .into(); - output - } - }; - output - }, - " Returns the determinant of `self`.", - &["_self"], - ) - .register_documented( - "div", - |_self: Val, rhs: f64| { - let output: Val = { - { - let output: Val = >::div(_self.into_inner(), rhs) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "div_scalar", - |_self: Ref, rhs: f64| { - let output: Val = { - { - let output: Val = bevy::math::DMat4::div_scalar( - &_self, - rhs, - ) - .into(); - output - } - }; - output - }, - " Divides a 4x4 matrix by a scalar.", - &["_self", "rhs"], - ) - .register_documented( - "eq", - |_self: Ref, rhs: Ref| { - let output: bool = { - { - let output: bool = >::eq(&_self, &rhs) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "from_axis_angle", - |axis: Val, angle: f64| { - let output: Val = { - { - let output: Val = bevy::math::DMat4::from_axis_angle( - axis.into_inner(), - angle, - ) - .into(); - output - } - }; - output - }, - " Creates an affine transformation matrix containing a 3D rotation around a normalized\n rotation `axis` of `angle` (in radians).\n The resulting matrix can be used to transform 3D points and vectors. See\n [`Self::transform_point3()`] and [`Self::transform_vector3()`].\n # Panics\n Will panic if `axis` is not normalized when `glam_assert` is enabled.", - &["axis", "angle"], - ) - .register_documented( - "from_cols", - | - x_axis: Val, - y_axis: Val, - z_axis: Val, - w_axis: Val| - { - let output: Val = { - { - let output: Val = bevy::math::DMat4::from_cols( - x_axis.into_inner(), - y_axis.into_inner(), - z_axis.into_inner(), - w_axis.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Creates a 4x4 matrix from four column vectors.", - &["x_axis", "y_axis", "z_axis", "w_axis"], - ) - .register_documented( - "from_diagonal", - |diagonal: Val| { - let output: Val = { - { - let output: Val = bevy::math::DMat4::from_diagonal( - diagonal.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Creates a 4x4 matrix with its diagonal set to `diagonal` and all other entries set to 0.", - &["diagonal"], - ) - .register_documented( - "from_euler", - |order: Val, a: f64, b: f64, c: f64| { - let output: Val = { - { - let output: Val = bevy::math::DMat4::from_euler( - order.into_inner(), - a, - b, - c, - ) - .into(); - output - } - }; - output - }, - " Creates a affine transformation matrix containing a rotation from the given euler\n rotation sequence and angles (in radians).\n The resulting matrix can be used to transform 3D points and vectors. See\n [`Self::transform_point3()`] and [`Self::transform_vector3()`].", - &["order", "a", "b", "c"], - ) - .register_documented( - "from_mat3", - |m: Val| { - let output: Val = { - { - let output: Val = bevy::math::DMat4::from_mat3( - m.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Creates an affine transformation matrix from the given 3x3 linear transformation\n matrix.\n The resulting matrix can be used to transform 3D points and vectors. See\n [`Self::transform_point3()`] and [`Self::transform_vector3()`].", - &["m"], - ) - .register_documented( - "from_quat", - |rotation: Val| { - let output: Val = { - { - let output: Val = bevy::math::DMat4::from_quat( - rotation.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Creates an affine transformation matrix from the given `rotation` quaternion.\n The resulting matrix can be used to transform 3D points and vectors. See\n [`Self::transform_point3()`] and [`Self::transform_vector3()`].\n # Panics\n Will panic if `rotation` is not normalized when `glam_assert` is enabled.", - &["rotation"], - ) - .register_documented( - "from_rotation_translation", - |rotation: Val, translation: Val| { - let output: Val = { - { - let output: Val = bevy::math::DMat4::from_rotation_translation( - rotation.into_inner(), - translation.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Creates an affine transformation matrix from the given 3D `translation`.\n The resulting matrix can be used to transform 3D points and vectors. See\n [`Self::transform_point3()`] and [`Self::transform_vector3()`].\n # Panics\n Will panic if `rotation` is not normalized when `glam_assert` is enabled.", - &["rotation", "translation"], - ) - .register_documented( - "from_rotation_x", - |angle: f64| { - let output: Val = { - { - let output: Val = bevy::math::DMat4::from_rotation_x( - angle, - ) - .into(); - output - } - }; - output - }, - " Creates an affine transformation matrix containing a 3D rotation around the x axis of\n `angle` (in radians).\n The resulting matrix can be used to transform 3D points and vectors. See\n [`Self::transform_point3()`] and [`Self::transform_vector3()`].", - &["angle"], - ) - .register_documented( - "from_rotation_y", - |angle: f64| { - let output: Val = { - { - let output: Val = bevy::math::DMat4::from_rotation_y( - angle, - ) - .into(); - output - } - }; - output - }, - " Creates an affine transformation matrix containing a 3D rotation around the y axis of\n `angle` (in radians).\n The resulting matrix can be used to transform 3D points and vectors. See\n [`Self::transform_point3()`] and [`Self::transform_vector3()`].", - &["angle"], - ) - .register_documented( - "from_rotation_z", - |angle: f64| { - let output: Val = { - { - let output: Val = bevy::math::DMat4::from_rotation_z( - angle, - ) - .into(); - output - } - }; - output - }, - " Creates an affine transformation matrix containing a 3D rotation around the z axis of\n `angle` (in radians).\n The resulting matrix can be used to transform 3D points and vectors. See\n [`Self::transform_point3()`] and [`Self::transform_vector3()`].", - &["angle"], - ) - .register_documented( - "from_scale", - |scale: Val| { - let output: Val = { - { - let output: Val = bevy::math::DMat4::from_scale( - scale.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Creates an affine transformation matrix containing the given 3D non-uniform `scale`.\n The resulting matrix can be used to transform 3D points and vectors. See\n [`Self::transform_point3()`] and [`Self::transform_vector3()`].\n # Panics\n Will panic if all elements of `scale` are zero when `glam_assert` is enabled.", - &["scale"], - ) - .register_documented( - "from_scale_rotation_translation", - | - scale: Val, - rotation: Val, - translation: Val| - { - let output: Val = { - { - let output: Val = bevy::math::DMat4::from_scale_rotation_translation( - scale.into_inner(), - rotation.into_inner(), - translation.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Creates an affine transformation matrix from the given 3D `scale`, `rotation` and\n `translation`.\n The resulting matrix can be used to transform 3D points and vectors. See\n [`Self::transform_point3()`] and [`Self::transform_vector3()`].\n # Panics\n Will panic if `rotation` is not normalized when `glam_assert` is enabled.", - &["scale", "rotation", "translation"], - ) - .register_documented( - "from_translation", - |translation: Val| { - let output: Val = { - { - let output: Val = bevy::math::DMat4::from_translation( - translation.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Creates an affine transformation matrix from the given 3D `translation`.\n The resulting matrix can be used to transform 3D points and vectors. See\n [`Self::transform_point3()`] and [`Self::transform_vector3()`].", - &["translation"], - ) - .register_documented( - "inverse", - |_self: Ref| { - let output: Val = { - { - let output: Val = bevy::math::DMat4::inverse( - &_self, - ) - .into(); - output - } - }; - output - }, - " Returns the inverse of `self`.\n If the matrix is not invertible the returned matrix will be invalid.\n # Panics\n Will panic if the determinant of `self` is zero when `glam_assert` is enabled.", - &["_self"], - ) - .register_documented( - "is_finite", - |_self: Ref| { - let output: bool = { - { - let output: bool = bevy::math::DMat4::is_finite(&_self) - .into(); - output - } - }; - output - }, - " Returns `true` if, and only if, all elements are finite.\n If any element is either `NaN`, positive or negative infinity, this will return `false`.", - &["_self"], - ) - .register_documented( - "is_nan", - |_self: Ref| { - let output: bool = { - { - let output: bool = bevy::math::DMat4::is_nan(&_self).into(); - output - } - }; - output - }, - " Returns `true` if any elements are `NaN`.", - &["_self"], - ) - .register_documented( - "look_at_lh", - | - eye: Val, - center: Val, - up: Val| - { - let output: Val = { - { - let output: Val = bevy::math::DMat4::look_at_lh( - eye.into_inner(), - center.into_inner(), - up.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Creates a left-handed view matrix using a camera position, an up direction, and a focal\n point.\n For a view coordinate system with `+X=right`, `+Y=up` and `+Z=forward`.\n # Panics\n Will panic if `up` is not normalized when `glam_assert` is enabled.", - &["eye", "center", "up"], - ) - .register_documented( - "look_at_rh", - | - eye: Val, - center: Val, - up: Val| - { - let output: Val = { - { - let output: Val = bevy::math::DMat4::look_at_rh( - eye.into_inner(), - center.into_inner(), - up.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Creates a right-handed view matrix using a camera position, an up direction, and a focal\n point.\n For a view coordinate system with `+X=right`, `+Y=up` and `+Z=back`.\n # Panics\n Will panic if `up` is not normalized when `glam_assert` is enabled.", - &["eye", "center", "up"], - ) - .register_documented( - "look_to_lh", - | - eye: Val, - dir: Val, - up: Val| - { - let output: Val = { - { - let output: Val = bevy::math::DMat4::look_to_lh( - eye.into_inner(), - dir.into_inner(), - up.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Creates a left-handed view matrix using a camera position, an up direction, and a facing\n direction.\n For a view coordinate system with `+X=right`, `+Y=up` and `+Z=forward`.", - &["eye", "dir", "up"], - ) - .register_documented( - "look_to_rh", - | - eye: Val, - dir: Val, - up: Val| - { - let output: Val = { - { - let output: Val = bevy::math::DMat4::look_to_rh( - eye.into_inner(), - dir.into_inner(), - up.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Creates a right-handed view matrix using a camera position, an up direction, and a facing\n direction.\n For a view coordinate system with `+X=right`, `+Y=up` and `+Z=back`.", - &["eye", "dir", "up"], - ) - .register_documented( - "mul", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = >::mul(_self.into_inner(), rhs.into_inner()) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "mul", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = >::mul(_self.into_inner(), rhs.into_inner()) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "mul", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = >::mul(_self.into_inner(), rhs.into_inner()) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "mul", - |_self: Val, rhs: f64| { - let output: Val = { - { - let output: Val = >::mul(_self.into_inner(), rhs) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "mul_mat4", - |_self: Ref, rhs: Ref| { - let output: Val = { - { - let output: Val = bevy::math::DMat4::mul_mat4( - &_self, - &rhs, - ) - .into(); - output - } - }; - output - }, - " Multiplies two 4x4 matrices.", - &["_self", "rhs"], - ) - .register_documented( - "mul_scalar", - |_self: Ref, rhs: f64| { - let output: Val = { - { - let output: Val = bevy::math::DMat4::mul_scalar( - &_self, - rhs, - ) - .into(); - output - } - }; - output - }, - " Multiplies a 4x4 matrix by a scalar.", - &["_self", "rhs"], - ) - .register_documented( - "mul_vec4", - |_self: Ref, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::DMat4::mul_vec4( - &_self, - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Transforms a 4D vector.", - &["_self", "rhs"], - ) - .register_documented( - "neg", - |_self: Val| { - let output: Val = { - { - let output: Val = ::neg( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - "", - &["_self"], - ) - .register_documented( - "orthographic_lh", - |left: f64, right: f64, bottom: f64, top: f64, near: f64, far: f64| { - let output: Val = { - { - let output: Val = bevy::math::DMat4::orthographic_lh( - left, - right, - bottom, - top, - near, - far, - ) - .into(); - output - } - }; - output - }, - " Creates a left-handed orthographic projection matrix with `[0,1]` depth range.\n Useful to map a left-handed coordinate system to the normalized device coordinates that WebGPU/Direct3D/Metal expect.", - &["left", "right", "bottom", "top", "near", "far"], - ) - .register_documented( - "orthographic_rh", - |left: f64, right: f64, bottom: f64, top: f64, near: f64, far: f64| { - let output: Val = { - { - let output: Val = bevy::math::DMat4::orthographic_rh( - left, - right, - bottom, - top, - near, - far, - ) - .into(); - output - } - }; - output - }, - " Creates a right-handed orthographic projection matrix with `[0,1]` depth range.\n Useful to map a right-handed coordinate system to the normalized device coordinates that WebGPU/Direct3D/Metal expect.", - &["left", "right", "bottom", "top", "near", "far"], - ) - .register_documented( - "orthographic_rh_gl", - |left: f64, right: f64, bottom: f64, top: f64, near: f64, far: f64| { - let output: Val = { - { - let output: Val = bevy::math::DMat4::orthographic_rh_gl( - left, - right, - bottom, - top, - near, - far, - ) - .into(); - output - } - }; - output - }, - " Creates a right-handed orthographic projection matrix with `[-1,1]` depth\n range. This is the same as the OpenGL `glOrtho` function in OpenGL.\n See\n \n Useful to map a right-handed coordinate system to the normalized device coordinates that OpenGL expects.", - &["left", "right", "bottom", "top", "near", "far"], - ) - .register_documented( - "perspective_infinite_lh", - |fov_y_radians: f64, aspect_ratio: f64, z_near: f64| { - let output: Val = { - { - let output: Val = bevy::math::DMat4::perspective_infinite_lh( - fov_y_radians, - aspect_ratio, - z_near, - ) - .into(); - output - } - }; - output - }, - " Creates an infinite left-handed perspective projection matrix with `[0,1]` depth range.\n Like `perspective_lh`, but with an infinite value for `z_far`.\n The result is that points near `z_near` are mapped to depth `0`, and as they move towards infinity the depth approaches `1`.\n # Panics\n Will panic if `z_near` or `z_far` are less than or equal to zero when `glam_assert` is\n enabled.", - &["fov_y_radians", "aspect_ratio", "z_near"], - ) - .register_documented( - "perspective_infinite_reverse_lh", - |fov_y_radians: f64, aspect_ratio: f64, z_near: f64| { - let output: Val = { - { - let output: Val = bevy::math::DMat4::perspective_infinite_reverse_lh( - fov_y_radians, - aspect_ratio, - z_near, - ) - .into(); - output - } - }; - output - }, - " Creates an infinite reverse left-handed perspective projection matrix with `[0,1]` depth range.\n Similar to `perspective_infinite_lh`, but maps `Z = z_near` to a depth of `1` and `Z = infinity` to a depth of `0`.\n # Panics\n Will panic if `z_near` is less than or equal to zero when `glam_assert` is enabled.", - &["fov_y_radians", "aspect_ratio", "z_near"], - ) - .register_documented( - "perspective_infinite_reverse_rh", - |fov_y_radians: f64, aspect_ratio: f64, z_near: f64| { - let output: Val = { - { - let output: Val = bevy::math::DMat4::perspective_infinite_reverse_rh( - fov_y_radians, - aspect_ratio, - z_near, - ) - .into(); - output - } - }; - output - }, - " Creates an infinite reverse right-handed perspective projection matrix with `[0,1]` depth range.\n Similar to `perspective_infinite_rh`, but maps `Z = z_near` to a depth of `1` and `Z = infinity` to a depth of `0`.\n # Panics\n Will panic if `z_near` is less than or equal to zero when `glam_assert` is enabled.", - &["fov_y_radians", "aspect_ratio", "z_near"], - ) - .register_documented( - "perspective_infinite_rh", - |fov_y_radians: f64, aspect_ratio: f64, z_near: f64| { - let output: Val = { - { - let output: Val = bevy::math::DMat4::perspective_infinite_rh( - fov_y_radians, - aspect_ratio, - z_near, - ) - .into(); - output - } - }; - output - }, - " Creates an infinite right-handed perspective projection matrix with `[0,1]` depth range.\n Like `perspective_rh`, but with an infinite value for `z_far`.\n The result is that points near `z_near` are mapped to depth `0`, and as they move towards infinity the depth approaches `1`.\n # Panics\n Will panic if `z_near` or `z_far` are less than or equal to zero when `glam_assert` is\n enabled.", - &["fov_y_radians", "aspect_ratio", "z_near"], - ) - .register_documented( - "perspective_lh", - |fov_y_radians: f64, aspect_ratio: f64, z_near: f64, z_far: f64| { - let output: Val = { - { - let output: Val = bevy::math::DMat4::perspective_lh( - fov_y_radians, - aspect_ratio, - z_near, - z_far, - ) - .into(); - output - } - }; - output - }, - " Creates a left-handed perspective projection matrix with `[0,1]` depth range.\n Useful to map the standard left-handed coordinate system into what WebGPU/Metal/Direct3D expect.\n # Panics\n Will panic if `z_near` or `z_far` are less than or equal to zero when `glam_assert` is\n enabled.", - &["fov_y_radians", "aspect_ratio", "z_near", "z_far"], - ) - .register_documented( - "perspective_rh", - |fov_y_radians: f64, aspect_ratio: f64, z_near: f64, z_far: f64| { - let output: Val = { - { - let output: Val = bevy::math::DMat4::perspective_rh( - fov_y_radians, - aspect_ratio, - z_near, - z_far, - ) - .into(); - output - } - }; - output - }, - " Creates a right-handed perspective projection matrix with `[0,1]` depth range.\n Useful to map the standard right-handed coordinate system into what WebGPU/Metal/Direct3D expect.\n # Panics\n Will panic if `z_near` or `z_far` are less than or equal to zero when `glam_assert` is\n enabled.", - &["fov_y_radians", "aspect_ratio", "z_near", "z_far"], - ) - .register_documented( - "perspective_rh_gl", - |fov_y_radians: f64, aspect_ratio: f64, z_near: f64, z_far: f64| { - let output: Val = { - { - let output: Val = bevy::math::DMat4::perspective_rh_gl( - fov_y_radians, - aspect_ratio, - z_near, - z_far, - ) - .into(); - output - } - }; - output - }, - " Creates a right-handed perspective projection matrix with `[-1,1]` depth range.\n Useful to map the standard right-handed coordinate system into what OpenGL expects.\n This is the same as the OpenGL `gluPerspective` function.\n See ", - &["fov_y_radians", "aspect_ratio", "z_near", "z_far"], - ) - .register_documented( - "project_point3", - |_self: Ref, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::DMat4::project_point3( - &_self, - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Transforms the given 3D vector as a point, applying perspective correction.\n This is the equivalent of multiplying the 3D vector as a 4D vector where `w` is `1.0`.\n The perspective divide is performed meaning the resulting 3D vector is divided by `w`.\n This method assumes that `self` contains a projective transform.", - &["_self", "rhs"], - ) - .register_documented( - "row", - |_self: Ref, index: usize| { - let output: Val = { - { - let output: Val = bevy::math::DMat4::row( - &_self, - index, - ) - .into(); - output - } - }; - output - }, - " Returns the matrix row for the given `index`.\n # Panics\n Panics if `index` is greater than 3.", - &["_self", "index"], - ) - .register_documented( - "sub", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = >::sub(_self.into_inner(), rhs.into_inner()) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "sub_mat4", - |_self: Ref, rhs: Ref| { - let output: Val = { - { - let output: Val = bevy::math::DMat4::sub_mat4( - &_self, - &rhs, - ) - .into(); - output - } - }; - output - }, - " Subtracts two 4x4 matrices.", - &["_self", "rhs"], - ) - .register_documented( - "to_cols_array", - |_self: Ref| { - let output: [f64; 16] = { - { - let output: [f64; 16] = bevy::math::DMat4::to_cols_array( - &_self, - ) - .into(); - output - } - }; - output - }, - " Creates a `[f64; 16]` array storing data in column major order.\n If you require data in row major order `transpose` the matrix first.", - &["_self"], - ) - .register_documented( - "to_cols_array_2d", - |_self: Ref| { - let output: [[f64; 4]; 4] = { - { - let output: [[f64; 4]; 4] = bevy::math::DMat4::to_cols_array_2d( - &_self, - ) - .into(); - output - } - }; - output - }, - " Creates a `[[f64; 4]; 4]` 4D array storing data in column major order.\n If you require data in row major order `transpose` the matrix first.", - &["_self"], - ) - .register_documented( - "to_euler", - |_self: Ref, order: Val| { - let output: (f64, f64, f64) = { - { - let output: (f64, f64, f64) = bevy::math::DMat4::to_euler( - &_self, - order.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Extract Euler angles with the given Euler rotation order.\n Note if the upper 3x3 matrix contain scales, shears, or other non-rotation transformations\n then the resulting Euler angles will be ill-defined.\n # Panics\n Will panic if any column of the upper 3x3 rotation matrix is not normalized when\n `glam_assert` is enabled.", - &["_self", "order"], - ) - .register_documented( - "transform_point3", - |_self: Ref, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::DMat4::transform_point3( - &_self, - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Transforms the given 3D vector as a point.\n This is the equivalent of multiplying the 3D vector as a 4D vector where `w` is\n `1.0`.\n This method assumes that `self` contains a valid affine transform. It does not perform\n a perspective divide, if `self` contains a perspective transform, or if you are unsure,\n the [`Self::project_point3()`] method should be used instead.\n # Panics\n Will panic if the 3rd row of `self` is not `(0, 0, 0, 1)` when `glam_assert` is enabled.", - &["_self", "rhs"], - ) - .register_documented( - "transform_vector3", - |_self: Ref, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::DMat4::transform_vector3( - &_self, - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Transforms the give 3D vector as a direction.\n This is the equivalent of multiplying the 3D vector as a 4D vector where `w` is\n `0.0`.\n This method assumes that `self` contains a valid affine transform.\n # Panics\n Will panic if the 3rd row of `self` is not `(0, 0, 0, 1)` when `glam_assert` is enabled.", - &["_self", "rhs"], - ) - .register_documented( - "transpose", - |_self: Ref| { - let output: Val = { - { - let output: Val = bevy::math::DMat4::transpose( - &_self, - ) - .into(); - output - } - }; - output - }, - " Returns the transpose of `self`.", - &["_self"], - ); - let registry = world - .get_resource_or_init::(); - let mut registry = registry.write(); - registry - .register_type_data::< - bevy::math::DMat4, - bevy_mod_scripting_core::bindings::MarkAsGenerated, - >(); - } - pub(crate) fn register_affine_2_functions(world: &mut bevy::ecs::world::World) { - bevy_mod_scripting_core::bindings::function::namespace::NamespaceBuilder::< - bevy::math::Affine2, - >::new(world) - .register_documented( - "abs_diff_eq", - | - _self: Ref, - rhs: Val, - max_abs_diff: f32| - { - let output: bool = { - { - let output: bool = bevy::math::Affine2::abs_diff_eq( - &_self, - rhs.into_inner(), - max_abs_diff, - ) - .into(); - output - } - }; - output - }, - " Returns true if the absolute difference of all elements between `self` and `rhs`\n is less than or equal to `max_abs_diff`.\n This can be used to compare if two 3x4 matrices contain similar elements. It works\n best when comparing with a known value. The `max_abs_diff` that should be used used\n depends on the values being compared against.\n For more see\n [comparing floating point numbers](https://randomascii.wordpress.com/2012/02/25/comparing-floating-point-numbers-2012-edition/).", - &["_self", "rhs", "max_abs_diff"], - ) - .register_documented( - "clone", - |_self: Ref| { - let output: Val = { - { - let output: Val = ::clone( - &_self, - ) - .into(); - output - } - }; - output - }, - "", - &["_self"], - ) - .register_documented( - "eq", - |_self: Ref, rhs: Ref| { - let output: bool = { - { - let output: bool = >::eq(&_self, &rhs) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "from_angle", - |angle: f32| { - let output: Val = { - { - let output: Val = bevy::math::Affine2::from_angle( - angle, - ) - .into(); - output - } - }; - output - }, - " Creates an affine transform from the given rotation `angle`.", - &["angle"], - ) - .register_documented( - "from_angle_translation", - |angle: f32, translation: Val| { - let output: Val = { - { - let output: Val = bevy::math::Affine2::from_angle_translation( - angle, - translation.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Creates an affine transform from the given 2D rotation `angle` (in radians) and\n `translation`.\n Equivalent to `Affine2::from_translation(translation) * Affine2::from_angle(angle)`", - &["angle", "translation"], - ) - .register_documented( - "from_cols", - | - x_axis: Val, - y_axis: Val, - z_axis: Val| - { - let output: Val = { - { - let output: Val = bevy::math::Affine2::from_cols( - x_axis.into_inner(), - y_axis.into_inner(), - z_axis.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Creates an affine transform from three column vectors.", - &["x_axis", "y_axis", "z_axis"], - ) - .register_documented( - "from_mat2", - |matrix2: Val| { - let output: Val = { - { - let output: Val = bevy::math::Affine2::from_mat2( - matrix2.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Creates an affine transform from a 2x2 matrix (expressing scale, shear and rotation)", - &["matrix2"], - ) - .register_documented( - "from_mat2_translation", - |matrix2: Val, translation: Val| { - let output: Val = { - { - let output: Val = bevy::math::Affine2::from_mat2_translation( - matrix2.into_inner(), - translation.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Creates an affine transform from a 2x2 matrix (expressing scale, shear and rotation) and a\n translation vector.\n Equivalent to\n `Affine2::from_translation(translation) * Affine2::from_mat2(mat2)`", - &["matrix2", "translation"], - ) - .register_documented( - "from_mat3", - |m: Val| { - let output: Val = { - { - let output: Val = bevy::math::Affine2::from_mat3( - m.into_inner(), - ) - .into(); - output - } - }; - output - }, - " The given `Mat3` must be an affine transform,", - &["m"], - ) - .register_documented( - "from_mat3a", - |m: Val| { - let output: Val = { - { - let output: Val = bevy::math::Affine2::from_mat3a( - m.into_inner(), - ) - .into(); - output - } - }; - output - }, - " The given [`Mat3A`] must be an affine transform,", - &["m"], - ) - .register_documented( - "from_scale", - |scale: Val| { - let output: Val = { - { - let output: Val = bevy::math::Affine2::from_scale( - scale.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Creates an affine transform that changes scale.\n Note that if any scale is zero the transform will be non-invertible.", - &["scale"], - ) - .register_documented( - "from_scale_angle_translation", - | - scale: Val, - angle: f32, - translation: Val| - { - let output: Val = { - { - let output: Val = bevy::math::Affine2::from_scale_angle_translation( - scale.into_inner(), - angle, - translation.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Creates an affine transform from the given 2D `scale`, rotation `angle` (in radians) and\n `translation`.\n Equivalent to `Affine2::from_translation(translation) *\n Affine2::from_angle(angle) * Affine2::from_scale(scale)`", - &["scale", "angle", "translation"], - ) - .register_documented( - "from_translation", - |translation: Val| { - let output: Val = { - { - let output: Val = bevy::math::Affine2::from_translation( - translation.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Creates an affine transformation from the given 2D `translation`.", - &["translation"], - ) - .register_documented( - "inverse", - |_self: Ref| { - let output: Val = { - { - let output: Val = bevy::math::Affine2::inverse( - &_self, - ) - .into(); - output - } - }; - output - }, - " Return the inverse of this transform.\n Note that if the transform is not invertible the result will be invalid.", - &["_self"], - ) - .register_documented( - "is_finite", - |_self: Ref| { - let output: bool = { - { - let output: bool = bevy::math::Affine2::is_finite(&_self) - .into(); - output - } - }; - output - }, - " Returns `true` if, and only if, all elements are finite.\n If any element is either `NaN`, positive or negative infinity, this will return\n `false`.", - &["_self"], - ) - .register_documented( - "is_nan", - |_self: Ref| { - let output: bool = { - { - let output: bool = bevy::math::Affine2::is_nan(&_self) - .into(); - output - } - }; - output - }, - " Returns `true` if any elements are `NaN`.", - &["_self"], - ) - .register_documented( - "mul", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = >::mul(_self.into_inner(), rhs.into_inner()) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "mul", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = >::mul(_self.into_inner(), rhs.into_inner()) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "mul", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = >::mul(_self.into_inner(), rhs.into_inner()) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "to_cols_array", - |_self: Ref| { - let output: [f32; 6] = { - { - let output: [f32; 6] = bevy::math::Affine2::to_cols_array( - &_self, - ) - .into(); - output - } - }; - output - }, - " Creates a `[f32; 6]` array storing data in column major order.", - &["_self"], - ) - .register_documented( - "to_cols_array_2d", - |_self: Ref| { - let output: [[f32; 2]; 3] = { - { - let output: [[f32; 2]; 3] = bevy::math::Affine2::to_cols_array_2d( - &_self, - ) - .into(); - output - } - }; - output - }, - " Creates a `[[f32; 2]; 3]` 2D array storing data in\n column major order.\n If you require data in row major order `transpose` the matrix first.", - &["_self"], - ) - .register_documented( - "transform_point2", - |_self: Ref, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::Affine2::transform_point2( - &_self, - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Transforms the given 2D point, applying shear, scale, rotation and translation.", - &["_self", "rhs"], - ) - .register_documented( - "transform_vector2", - |_self: Ref, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::Affine2::transform_vector2( - &_self, - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Transforms the given 2D vector, applying shear, scale and rotation (but NOT\n translation).\n To also apply translation, use [`Self::transform_point2()`] instead.", - &["_self", "rhs"], - ); - let registry = world - .get_resource_or_init::(); - let mut registry = registry.write(); - registry - .register_type_data::< - bevy::math::Affine2, - bevy_mod_scripting_core::bindings::MarkAsGenerated, - >(); - } - pub(crate) fn register_affine_3_a_functions(world: &mut bevy::ecs::world::World) { - bevy_mod_scripting_core::bindings::function::namespace::NamespaceBuilder::< - bevy::math::Affine3A, - >::new(world) - .register_documented( - "abs_diff_eq", - | - _self: Ref, - rhs: Val, - max_abs_diff: f32| - { - let output: bool = { - { - let output: bool = bevy::math::Affine3A::abs_diff_eq( - &_self, - rhs.into_inner(), - max_abs_diff, - ) - .into(); - output - } - }; - output - }, - " Returns true if the absolute difference of all elements between `self` and `rhs`\n is less than or equal to `max_abs_diff`.\n This can be used to compare if two 3x4 matrices contain similar elements. It works\n best when comparing with a known value. The `max_abs_diff` that should be used used\n depends on the values being compared against.\n For more see\n [comparing floating point numbers](https://randomascii.wordpress.com/2012/02/25/comparing-floating-point-numbers-2012-edition/).", - &["_self", "rhs", "max_abs_diff"], - ) - .register_documented( - "clone", - |_self: Ref| { - let output: Val = { - { - let output: Val = ::clone( - &_self, - ) - .into(); - output - } - }; - output - }, - "", - &["_self"], - ) - .register_documented( - "eq", - |_self: Ref, rhs: Ref| { - let output: bool = { - { - let output: bool = >::eq(&_self, &rhs) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "from_axis_angle", - |axis: Val, angle: f32| { - let output: Val = { - { - let output: Val = bevy::math::Affine3A::from_axis_angle( - axis.into_inner(), - angle, - ) - .into(); - output - } - }; - output - }, - " Creates an affine transform containing a 3D rotation around a normalized\n rotation `axis` of `angle` (in radians).", - &["axis", "angle"], - ) - .register_documented( - "from_cols", - | - x_axis: Val, - y_axis: Val, - z_axis: Val, - w_axis: Val| - { - let output: Val = { - { - let output: Val = bevy::math::Affine3A::from_cols( - x_axis.into_inner(), - y_axis.into_inner(), - z_axis.into_inner(), - w_axis.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Creates an affine transform from three column vectors.", - &["x_axis", "y_axis", "z_axis", "w_axis"], - ) - .register_documented( - "from_mat3", - |mat3: Val| { - let output: Val = { - { - let output: Val = bevy::math::Affine3A::from_mat3( - mat3.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Creates an affine transform from a 3x3 matrix (expressing scale, shear and\n rotation)", - &["mat3"], - ) - .register_documented( - "from_mat3_translation", - |mat3: Val, translation: Val| { - let output: Val = { - { - let output: Val = bevy::math::Affine3A::from_mat3_translation( - mat3.into_inner(), - translation.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Creates an affine transform from a 3x3 matrix (expressing scale, shear and rotation)\n and a translation vector.\n Equivalent to `Affine3A::from_translation(translation) * Affine3A::from_mat3(mat3)`", - &["mat3", "translation"], - ) - .register_documented( - "from_mat4", - |m: Val| { - let output: Val = { - { - let output: Val = bevy::math::Affine3A::from_mat4( - m.into_inner(), - ) - .into(); - output - } - }; - output - }, - " The given `Mat4` must be an affine transform,\n i.e. contain no perspective transform.", - &["m"], - ) - .register_documented( - "from_quat", - |rotation: Val| { - let output: Val = { - { - let output: Val = bevy::math::Affine3A::from_quat( - rotation.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Creates an affine transform from the given `rotation` quaternion.", - &["rotation"], - ) - .register_documented( - "from_rotation_translation", - |rotation: Val, translation: Val| { - let output: Val = { - { - let output: Val = bevy::math::Affine3A::from_rotation_translation( - rotation.into_inner(), - translation.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Creates an affine transform from the given 3D `rotation` and `translation`.\n Equivalent to `Affine3A::from_translation(translation) * Affine3A::from_quat(rotation)`", - &["rotation", "translation"], - ) - .register_documented( - "from_rotation_x", - |angle: f32| { - let output: Val = { - { - let output: Val = bevy::math::Affine3A::from_rotation_x( - angle, - ) - .into(); - output - } - }; - output - }, - " Creates an affine transform containing a 3D rotation around the x axis of\n `angle` (in radians).", - &["angle"], - ) - .register_documented( - "from_rotation_y", - |angle: f32| { - let output: Val = { - { - let output: Val = bevy::math::Affine3A::from_rotation_y( - angle, - ) - .into(); - output - } - }; - output - }, - " Creates an affine transform containing a 3D rotation around the y axis of\n `angle` (in radians).", - &["angle"], - ) - .register_documented( - "from_rotation_z", - |angle: f32| { - let output: Val = { - { - let output: Val = bevy::math::Affine3A::from_rotation_z( - angle, - ) - .into(); - output - } - }; - output - }, - " Creates an affine transform containing a 3D rotation around the z axis of\n `angle` (in radians).", - &["angle"], - ) - .register_documented( - "from_scale", - |scale: Val| { - let output: Val = { - { - let output: Val = bevy::math::Affine3A::from_scale( - scale.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Creates an affine transform that changes scale.\n Note that if any scale is zero the transform will be non-invertible.", - &["scale"], - ) - .register_documented( - "from_scale_rotation_translation", - | - scale: Val, - rotation: Val, - translation: Val| - { - let output: Val = { - { - let output: Val = bevy::math::Affine3A::from_scale_rotation_translation( - scale.into_inner(), - rotation.into_inner(), - translation.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Creates an affine transform from the given 3D `scale`, `rotation` and\n `translation`.\n Equivalent to `Affine3A::from_translation(translation) *\n Affine3A::from_quat(rotation) * Affine3A::from_scale(scale)`", - &["scale", "rotation", "translation"], - ) - .register_documented( - "from_translation", - |translation: Val| { - let output: Val = { - { - let output: Val = bevy::math::Affine3A::from_translation( - translation.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Creates an affine transformation from the given 3D `translation`.", - &["translation"], - ) - .register_documented( - "inverse", - |_self: Ref| { - let output: Val = { - { - let output: Val = bevy::math::Affine3A::inverse( - &_self, - ) - .into(); - output - } - }; - output - }, - " Return the inverse of this transform.\n Note that if the transform is not invertible the result will be invalid.", - &["_self"], - ) - .register_documented( - "is_finite", - |_self: Ref| { - let output: bool = { - { - let output: bool = bevy::math::Affine3A::is_finite(&_self) - .into(); - output - } - }; - output - }, - " Returns `true` if, and only if, all elements are finite.\n If any element is either `NaN`, positive or negative infinity, this will return\n `false`.", - &["_self"], - ) - .register_documented( - "is_nan", - |_self: Ref| { - let output: bool = { - { - let output: bool = bevy::math::Affine3A::is_nan(&_self) - .into(); - output - } - }; - output - }, - " Returns `true` if any elements are `NaN`.", - &["_self"], - ) - .register_documented( - "look_at_lh", - | - eye: Val, - center: Val, - up: Val| - { - let output: Val = { - { - let output: Val = bevy::math::Affine3A::look_at_lh( - eye.into_inner(), - center.into_inner(), - up.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Creates a left-handed view transform using a camera position, an up direction, and a focal\n point.\n For a view coordinate system with `+X=right`, `+Y=up` and `+Z=forward`.\n # Panics\n Will panic if `up` is not normalized when `glam_assert` is enabled.", - &["eye", "center", "up"], - ) - .register_documented( - "look_at_rh", - | - eye: Val, - center: Val, - up: Val| - { - let output: Val = { - { - let output: Val = bevy::math::Affine3A::look_at_rh( - eye.into_inner(), - center.into_inner(), - up.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Creates a right-handed view transform using a camera position, an up direction, and a focal\n point.\n For a view coordinate system with `+X=right`, `+Y=up` and `+Z=back`.\n # Panics\n Will panic if `up` is not normalized when `glam_assert` is enabled.", - &["eye", "center", "up"], - ) - .register_documented( - "look_to_lh", - | - eye: Val, - dir: Val, - up: Val| - { - let output: Val = { - { - let output: Val = bevy::math::Affine3A::look_to_lh( - eye.into_inner(), - dir.into_inner(), - up.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Creates a left-handed view transform using a camera position, an up direction, and a facing\n direction.\n For a view coordinate system with `+X=right`, `+Y=up` and `+Z=forward`.", - &["eye", "dir", "up"], - ) - .register_documented( - "look_to_rh", - | - eye: Val, - dir: Val, - up: Val| - { - let output: Val = { - { - let output: Val = bevy::math::Affine3A::look_to_rh( - eye.into_inner(), - dir.into_inner(), - up.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Creates a right-handed view transform using a camera position, an up direction, and a facing\n direction.\n For a view coordinate system with `+X=right`, `+Y=up` and `+Z=back`.", - &["eye", "dir", "up"], - ) - .register_documented( - "mul", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = >::mul(_self.into_inner(), rhs.into_inner()) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "mul", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = >::mul(_self.into_inner(), rhs.into_inner()) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "to_cols_array", - |_self: Ref| { - let output: [f32; 12] = { - { - let output: [f32; 12] = bevy::math::Affine3A::to_cols_array( - &_self, - ) - .into(); - output - } - }; - output - }, - " Creates a `[f32; 12]` array storing data in column major order.", - &["_self"], - ) - .register_documented( - "to_cols_array_2d", - |_self: Ref| { - let output: [[f32; 3]; 4] = { - { - let output: [[f32; 3]; 4] = bevy::math::Affine3A::to_cols_array_2d( - &_self, - ) - .into(); - output - } - }; - output - }, - " Creates a `[[f32; 3]; 4]` 3D array storing data in\n column major order.\n If you require data in row major order `transpose` the matrix first.", - &["_self"], - ) - .register_documented( - "transform_point3", - |_self: Ref, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::Affine3A::transform_point3( - &_self, - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Transforms the given 3D points, applying shear, scale, rotation and translation.", - &["_self", "rhs"], - ) - .register_documented( - "transform_point3a", - |_self: Ref, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::Affine3A::transform_point3a( - &_self, - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Transforms the given [`Vec3A`], applying shear, scale, rotation and translation.", - &["_self", "rhs"], - ) - .register_documented( - "transform_vector3", - |_self: Ref, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::Affine3A::transform_vector3( - &_self, - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Transforms the given 3D vector, applying shear, scale and rotation (but NOT\n translation).\n To also apply translation, use [`Self::transform_point3()`] instead.", - &["_self", "rhs"], - ) - .register_documented( - "transform_vector3a", - |_self: Ref, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::Affine3A::transform_vector3a( - &_self, - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Transforms the given [`Vec3A`], applying shear, scale and rotation (but NOT\n translation).\n To also apply translation, use [`Self::transform_point3a()`] instead.", - &["_self", "rhs"], - ); - let registry = world - .get_resource_or_init::(); - let mut registry = registry.write(); - registry - .register_type_data::< - bevy::math::Affine3A, - bevy_mod_scripting_core::bindings::MarkAsGenerated, - >(); - } - pub(crate) fn register_d_affine_2_functions(world: &mut bevy::ecs::world::World) { - bevy_mod_scripting_core::bindings::function::namespace::NamespaceBuilder::< - bevy::math::DAffine2, - >::new(world) - .register_documented( - "abs_diff_eq", - | - _self: Ref, - rhs: Val, - max_abs_diff: f64| - { - let output: bool = { - { - let output: bool = bevy::math::DAffine2::abs_diff_eq( - &_self, - rhs.into_inner(), - max_abs_diff, - ) - .into(); - output - } - }; - output - }, - " Returns true if the absolute difference of all elements between `self` and `rhs`\n is less than or equal to `max_abs_diff`.\n This can be used to compare if two 3x4 matrices contain similar elements. It works\n best when comparing with a known value. The `max_abs_diff` that should be used used\n depends on the values being compared against.\n For more see\n [comparing floating point numbers](https://randomascii.wordpress.com/2012/02/25/comparing-floating-point-numbers-2012-edition/).", - &["_self", "rhs", "max_abs_diff"], - ) - .register_documented( - "clone", - |_self: Ref| { - let output: Val = { - { - let output: Val = ::clone( - &_self, - ) - .into(); - output - } - }; - output - }, - "", - &["_self"], - ) - .register_documented( - "eq", - |_self: Ref, rhs: Ref| { - let output: bool = { - { - let output: bool = >::eq(&_self, &rhs) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "from_angle", - |angle: f64| { - let output: Val = { - { - let output: Val = bevy::math::DAffine2::from_angle( - angle, - ) - .into(); - output - } - }; - output - }, - " Creates an affine transform from the given rotation `angle`.", - &["angle"], - ) - .register_documented( - "from_angle_translation", - |angle: f64, translation: Val| { - let output: Val = { - { - let output: Val = bevy::math::DAffine2::from_angle_translation( - angle, - translation.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Creates an affine transform from the given 2D rotation `angle` (in radians) and\n `translation`.\n Equivalent to `DAffine2::from_translation(translation) * DAffine2::from_angle(angle)`", - &["angle", "translation"], - ) - .register_documented( - "from_cols", - | - x_axis: Val, - y_axis: Val, - z_axis: Val| - { - let output: Val = { - { - let output: Val = bevy::math::DAffine2::from_cols( - x_axis.into_inner(), - y_axis.into_inner(), - z_axis.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Creates an affine transform from three column vectors.", - &["x_axis", "y_axis", "z_axis"], - ) - .register_documented( - "from_mat2", - |matrix2: Val| { - let output: Val = { - { - let output: Val = bevy::math::DAffine2::from_mat2( - matrix2.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Creates an affine transform from a 2x2 matrix (expressing scale, shear and rotation)", - &["matrix2"], - ) - .register_documented( - "from_mat2_translation", - |matrix2: Val, translation: Val| { - let output: Val = { - { - let output: Val = bevy::math::DAffine2::from_mat2_translation( - matrix2.into_inner(), - translation.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Creates an affine transform from a 2x2 matrix (expressing scale, shear and rotation) and a\n translation vector.\n Equivalent to\n `DAffine2::from_translation(translation) * DAffine2::from_mat2(mat2)`", - &["matrix2", "translation"], - ) - .register_documented( - "from_mat3", - |m: Val| { - let output: Val = { - { - let output: Val = bevy::math::DAffine2::from_mat3( - m.into_inner(), - ) - .into(); - output - } - }; - output - }, - " The given `DMat3` must be an affine transform,", - &["m"], - ) - .register_documented( - "from_scale", - |scale: Val| { - let output: Val = { - { - let output: Val = bevy::math::DAffine2::from_scale( - scale.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Creates an affine transform that changes scale.\n Note that if any scale is zero the transform will be non-invertible.", - &["scale"], - ) - .register_documented( - "from_scale_angle_translation", - | - scale: Val, - angle: f64, - translation: Val| - { - let output: Val = { - { - let output: Val = bevy::math::DAffine2::from_scale_angle_translation( - scale.into_inner(), - angle, - translation.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Creates an affine transform from the given 2D `scale`, rotation `angle` (in radians) and\n `translation`.\n Equivalent to `DAffine2::from_translation(translation) *\n DAffine2::from_angle(angle) * DAffine2::from_scale(scale)`", - &["scale", "angle", "translation"], - ) - .register_documented( - "from_translation", - |translation: Val| { - let output: Val = { - { - let output: Val = bevy::math::DAffine2::from_translation( - translation.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Creates an affine transformation from the given 2D `translation`.", - &["translation"], - ) - .register_documented( - "inverse", - |_self: Ref| { - let output: Val = { - { - let output: Val = bevy::math::DAffine2::inverse( - &_self, - ) - .into(); - output - } - }; - output - }, - " Return the inverse of this transform.\n Note that if the transform is not invertible the result will be invalid.", - &["_self"], - ) - .register_documented( - "is_finite", - |_self: Ref| { - let output: bool = { - { - let output: bool = bevy::math::DAffine2::is_finite(&_self) - .into(); - output - } - }; - output - }, - " Returns `true` if, and only if, all elements are finite.\n If any element is either `NaN`, positive or negative infinity, this will return\n `false`.", - &["_self"], - ) - .register_documented( - "is_nan", - |_self: Ref| { - let output: bool = { - { - let output: bool = bevy::math::DAffine2::is_nan(&_self) - .into(); - output - } - }; - output - }, - " Returns `true` if any elements are `NaN`.", - &["_self"], - ) - .register_documented( - "mul", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = >::mul(_self.into_inner(), rhs.into_inner()) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "mul", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = >::mul(_self.into_inner(), rhs.into_inner()) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "to_cols_array", - |_self: Ref| { - let output: [f64; 6] = { - { - let output: [f64; 6] = bevy::math::DAffine2::to_cols_array( - &_self, - ) - .into(); - output - } - }; - output - }, - " Creates a `[f64; 6]` array storing data in column major order.", - &["_self"], - ) - .register_documented( - "to_cols_array_2d", - |_self: Ref| { - let output: [[f64; 2]; 3] = { - { - let output: [[f64; 2]; 3] = bevy::math::DAffine2::to_cols_array_2d( - &_self, - ) - .into(); - output - } - }; - output - }, - " Creates a `[[f64; 2]; 3]` 2D array storing data in\n column major order.\n If you require data in row major order `transpose` the matrix first.", - &["_self"], - ) - .register_documented( - "transform_point2", - |_self: Ref, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::DAffine2::transform_point2( - &_self, - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Transforms the given 2D point, applying shear, scale, rotation and translation.", - &["_self", "rhs"], - ) - .register_documented( - "transform_vector2", - |_self: Ref, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::DAffine2::transform_vector2( - &_self, - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Transforms the given 2D vector, applying shear, scale and rotation (but NOT\n translation).\n To also apply translation, use [`Self::transform_point2()`] instead.", - &["_self", "rhs"], - ); - let registry = world - .get_resource_or_init::(); - let mut registry = registry.write(); - registry - .register_type_data::< - bevy::math::DAffine2, - bevy_mod_scripting_core::bindings::MarkAsGenerated, - >(); - } - pub(crate) fn register_d_affine_3_functions(world: &mut bevy::ecs::world::World) { - bevy_mod_scripting_core::bindings::function::namespace::NamespaceBuilder::< - bevy::math::DAffine3, - >::new(world) - .register_documented( - "abs_diff_eq", - | - _self: Ref, - rhs: Val, - max_abs_diff: f64| - { - let output: bool = { - { - let output: bool = bevy::math::DAffine3::abs_diff_eq( - &_self, - rhs.into_inner(), - max_abs_diff, - ) - .into(); - output - } - }; - output - }, - " Returns true if the absolute difference of all elements between `self` and `rhs`\n is less than or equal to `max_abs_diff`.\n This can be used to compare if two 3x4 matrices contain similar elements. It works\n best when comparing with a known value. The `max_abs_diff` that should be used used\n depends on the values being compared against.\n For more see\n [comparing floating point numbers](https://randomascii.wordpress.com/2012/02/25/comparing-floating-point-numbers-2012-edition/).", - &["_self", "rhs", "max_abs_diff"], - ) - .register_documented( - "clone", - |_self: Ref| { - let output: Val = { - { - let output: Val = ::clone( - &_self, - ) - .into(); - output - } - }; - output - }, - "", - &["_self"], - ) - .register_documented( - "eq", - |_self: Ref, rhs: Ref| { - let output: bool = { - { - let output: bool = >::eq(&_self, &rhs) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "from_axis_angle", - |axis: Val, angle: f64| { - let output: Val = { - { - let output: Val = bevy::math::DAffine3::from_axis_angle( - axis.into_inner(), - angle, - ) - .into(); - output - } - }; - output - }, - " Creates an affine transform containing a 3D rotation around a normalized\n rotation `axis` of `angle` (in radians).", - &["axis", "angle"], - ) - .register_documented( - "from_cols", - | - x_axis: Val, - y_axis: Val, - z_axis: Val, - w_axis: Val| - { - let output: Val = { - { - let output: Val = bevy::math::DAffine3::from_cols( - x_axis.into_inner(), - y_axis.into_inner(), - z_axis.into_inner(), - w_axis.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Creates an affine transform from three column vectors.", - &["x_axis", "y_axis", "z_axis", "w_axis"], - ) - .register_documented( - "from_mat3", - |mat3: Val| { - let output: Val = { - { - let output: Val = bevy::math::DAffine3::from_mat3( - mat3.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Creates an affine transform from a 3x3 matrix (expressing scale, shear and\n rotation)", - &["mat3"], - ) - .register_documented( - "from_mat3_translation", - |mat3: Val, translation: Val| { - let output: Val = { - { - let output: Val = bevy::math::DAffine3::from_mat3_translation( - mat3.into_inner(), - translation.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Creates an affine transform from a 3x3 matrix (expressing scale, shear and rotation)\n and a translation vector.\n Equivalent to `DAffine3::from_translation(translation) * DAffine3::from_mat3(mat3)`", - &["mat3", "translation"], - ) - .register_documented( - "from_mat4", - |m: Val| { - let output: Val = { - { - let output: Val = bevy::math::DAffine3::from_mat4( - m.into_inner(), - ) - .into(); - output - } - }; - output - }, - " The given `DMat4` must be an affine transform,\n i.e. contain no perspective transform.", - &["m"], - ) - .register_documented( - "from_quat", - |rotation: Val| { - let output: Val = { - { - let output: Val = bevy::math::DAffine3::from_quat( - rotation.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Creates an affine transform from the given `rotation` quaternion.", - &["rotation"], - ) - .register_documented( - "from_rotation_translation", - |rotation: Val, translation: Val| { - let output: Val = { - { - let output: Val = bevy::math::DAffine3::from_rotation_translation( - rotation.into_inner(), - translation.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Creates an affine transform from the given 3D `rotation` and `translation`.\n Equivalent to `DAffine3::from_translation(translation) * DAffine3::from_quat(rotation)`", - &["rotation", "translation"], - ) - .register_documented( - "from_rotation_x", - |angle: f64| { - let output: Val = { - { - let output: Val = bevy::math::DAffine3::from_rotation_x( - angle, - ) - .into(); - output - } - }; - output - }, - " Creates an affine transform containing a 3D rotation around the x axis of\n `angle` (in radians).", - &["angle"], - ) - .register_documented( - "from_rotation_y", - |angle: f64| { - let output: Val = { - { - let output: Val = bevy::math::DAffine3::from_rotation_y( - angle, - ) - .into(); - output - } - }; - output - }, - " Creates an affine transform containing a 3D rotation around the y axis of\n `angle` (in radians).", - &["angle"], - ) - .register_documented( - "from_rotation_z", - |angle: f64| { - let output: Val = { - { - let output: Val = bevy::math::DAffine3::from_rotation_z( - angle, - ) - .into(); - output - } - }; - output - }, - " Creates an affine transform containing a 3D rotation around the z axis of\n `angle` (in radians).", - &["angle"], - ) - .register_documented( - "from_scale", - |scale: Val| { - let output: Val = { - { - let output: Val = bevy::math::DAffine3::from_scale( - scale.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Creates an affine transform that changes scale.\n Note that if any scale is zero the transform will be non-invertible.", - &["scale"], - ) - .register_documented( - "from_scale_rotation_translation", - | - scale: Val, - rotation: Val, - translation: Val| - { - let output: Val = { - { - let output: Val = bevy::math::DAffine3::from_scale_rotation_translation( - scale.into_inner(), - rotation.into_inner(), - translation.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Creates an affine transform from the given 3D `scale`, `rotation` and\n `translation`.\n Equivalent to `DAffine3::from_translation(translation) *\n DAffine3::from_quat(rotation) * DAffine3::from_scale(scale)`", - &["scale", "rotation", "translation"], - ) - .register_documented( - "from_translation", - |translation: Val| { - let output: Val = { - { - let output: Val = bevy::math::DAffine3::from_translation( - translation.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Creates an affine transformation from the given 3D `translation`.", - &["translation"], - ) - .register_documented( - "inverse", - |_self: Ref| { - let output: Val = { - { - let output: Val = bevy::math::DAffine3::inverse( - &_self, - ) - .into(); - output - } - }; - output - }, - " Return the inverse of this transform.\n Note that if the transform is not invertible the result will be invalid.", - &["_self"], - ) - .register_documented( - "is_finite", - |_self: Ref| { - let output: bool = { - { - let output: bool = bevy::math::DAffine3::is_finite(&_self) - .into(); - output - } - }; - output - }, - " Returns `true` if, and only if, all elements are finite.\n If any element is either `NaN`, positive or negative infinity, this will return\n `false`.", - &["_self"], - ) - .register_documented( - "is_nan", - |_self: Ref| { - let output: bool = { - { - let output: bool = bevy::math::DAffine3::is_nan(&_self) - .into(); - output - } - }; - output - }, - " Returns `true` if any elements are `NaN`.", - &["_self"], - ) - .register_documented( - "look_at_lh", - | - eye: Val, - center: Val, - up: Val| - { - let output: Val = { - { - let output: Val = bevy::math::DAffine3::look_at_lh( - eye.into_inner(), - center.into_inner(), - up.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Creates a left-handed view transform using a camera position, an up direction, and a focal\n point.\n For a view coordinate system with `+X=right`, `+Y=up` and `+Z=forward`.\n # Panics\n Will panic if `up` is not normalized when `glam_assert` is enabled.", - &["eye", "center", "up"], - ) - .register_documented( - "look_at_rh", - | - eye: Val, - center: Val, - up: Val| - { - let output: Val = { - { - let output: Val = bevy::math::DAffine3::look_at_rh( - eye.into_inner(), - center.into_inner(), - up.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Creates a right-handed view transform using a camera position, an up direction, and a focal\n point.\n For a view coordinate system with `+X=right`, `+Y=up` and `+Z=back`.\n # Panics\n Will panic if `up` is not normalized when `glam_assert` is enabled.", - &["eye", "center", "up"], - ) - .register_documented( - "look_to_lh", - | - eye: Val, - dir: Val, - up: Val| - { - let output: Val = { - { - let output: Val = bevy::math::DAffine3::look_to_lh( - eye.into_inner(), - dir.into_inner(), - up.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Creates a left-handed view transform using a camera position, an up direction, and a facing\n direction.\n For a view coordinate system with `+X=right`, `+Y=up` and `+Z=forward`.", - &["eye", "dir", "up"], - ) - .register_documented( - "look_to_rh", - | - eye: Val, - dir: Val, - up: Val| - { - let output: Val = { - { - let output: Val = bevy::math::DAffine3::look_to_rh( - eye.into_inner(), - dir.into_inner(), - up.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Creates a right-handed view transform using a camera position, an up direction, and a facing\n direction.\n For a view coordinate system with `+X=right`, `+Y=up` and `+Z=back`.", - &["eye", "dir", "up"], - ) - .register_documented( - "mul", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = >::mul(_self.into_inner(), rhs.into_inner()) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "mul", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = >::mul(_self.into_inner(), rhs.into_inner()) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "to_cols_array", - |_self: Ref| { - let output: [f64; 12] = { - { - let output: [f64; 12] = bevy::math::DAffine3::to_cols_array( - &_self, - ) - .into(); - output - } - }; - output - }, - " Creates a `[f64; 12]` array storing data in column major order.", - &["_self"], - ) - .register_documented( - "to_cols_array_2d", - |_self: Ref| { - let output: [[f64; 3]; 4] = { - { - let output: [[f64; 3]; 4] = bevy::math::DAffine3::to_cols_array_2d( - &_self, - ) - .into(); - output - } - }; - output - }, - " Creates a `[[f64; 3]; 4]` 3D array storing data in\n column major order.\n If you require data in row major order `transpose` the matrix first.", - &["_self"], - ) - .register_documented( - "transform_point3", - |_self: Ref, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::DAffine3::transform_point3( - &_self, - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Transforms the given 3D points, applying shear, scale, rotation and translation.", - &["_self", "rhs"], - ) - .register_documented( - "transform_vector3", - |_self: Ref, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::DAffine3::transform_vector3( - &_self, - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Transforms the given 3D vector, applying shear, scale and rotation (but NOT\n translation).\n To also apply translation, use [`Self::transform_point3()`] instead.", - &["_self", "rhs"], - ); - let registry = world - .get_resource_or_init::(); - let mut registry = registry.write(); - registry - .register_type_data::< - bevy::math::DAffine3, - bevy_mod_scripting_core::bindings::MarkAsGenerated, - >(); - } - pub(crate) fn register_d_quat_functions(world: &mut bevy::ecs::world::World) { - bevy_mod_scripting_core::bindings::function::namespace::NamespaceBuilder::< - bevy::math::DQuat, - >::new(world) - .register_documented( - "abs_diff_eq", - | - _self: Val, - rhs: Val, - max_abs_diff: f64| - { - let output: bool = { - { - let output: bool = bevy::math::DQuat::abs_diff_eq( - _self.into_inner(), - rhs.into_inner(), - max_abs_diff, - ) - .into(); - output - } - }; - output - }, - " Returns true if the absolute difference of all elements between `self` and `rhs`\n is less than or equal to `max_abs_diff`.\n This can be used to compare if two quaternions contain similar elements. It works\n best when comparing with a known value. The `max_abs_diff` that should be used used\n depends on the values being compared against.\n For more see\n [comparing floating point numbers](https://randomascii.wordpress.com/2012/02/25/comparing-floating-point-numbers-2012-edition/).", - &["_self", "rhs", "max_abs_diff"], - ) - .register_documented( - "add", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = >::add(_self.into_inner(), rhs.into_inner()) - .into(); - output - } - }; - output - }, - " Adds two quaternions.\n The sum is not guaranteed to be normalized.\n Note that addition is not the same as combining the rotations represented by the\n two quaternions! That corresponds to multiplication.", - &["_self", "rhs"], - ) - .register_documented( - "angle_between", - |_self: Val, rhs: Val| { - let output: f64 = { - { - let output: f64 = bevy::math::DQuat::angle_between( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns the angle (in radians) for the minimal rotation\n for transforming this quaternion into another.\n Both quaternions must be normalized.\n # Panics\n Will panic if `self` or `rhs` are not normalized when `glam_assert` is enabled.", - &["_self", "rhs"], - ) - .register_documented( - "as_quat", - |_self: Val| { - let output: Val = { - { - let output: Val = bevy::math::DQuat::as_quat( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - "", - &["_self"], - ) - .register_documented( - "clone", - |_self: Ref| { - let output: Val = { - { - let output: Val = ::clone( - &_self, - ) - .into(); - output - } - }; - output - }, - "", - &["_self"], - ) - .register_documented( - "conjugate", - |_self: Val| { - let output: Val = { - { - let output: Val = bevy::math::DQuat::conjugate( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns the quaternion conjugate of `self`. For a unit quaternion the\n conjugate is also the inverse.", - &["_self"], - ) - .register_documented( - "div", - |_self: Val, rhs: f64| { - let output: Val = { - { - let output: Val = >::div(_self.into_inner(), rhs) - .into(); - output - } - }; - output - }, - " Divides a quaternion by a scalar value.\n The quotient is not guaranteed to be normalized.", - &["_self", "rhs"], - ) - .register_documented( - "dot", - |_self: Val, rhs: Val| { - let output: f64 = { - { - let output: f64 = bevy::math::DQuat::dot( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Computes the dot product of `self` and `rhs`. The dot product is\n equal to the cosine of the angle between two quaternion rotations.", - &["_self", "rhs"], - ) - .register_documented( - "eq", - |_self: Ref, rhs: Ref| { - let output: bool = { - { - let output: bool = >::eq(&_self, &rhs) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "from_affine3", - |a: Ref| { - let output: Val = { - { - let output: Val = bevy::math::DQuat::from_affine3( - &a, - ) - .into(); - output - } - }; - output - }, - " Creates a quaternion from a 3x3 rotation matrix inside a 3D affine transform.\n Note if the input affine matrix contain scales, shears, or other non-rotation\n transformations then the resulting quaternion will be ill-defined.\n # Panics\n Will panic if any input affine matrix column is not normalized when `glam_assert` is\n enabled.", - &["a"], - ) - .register_documented( - "from_array", - |a: [f64; 4]| { - let output: Val = { - { - let output: Val = bevy::math::DQuat::from_array( - a, - ) - .into(); - output - } - }; - output - }, - " Creates a rotation quaternion from an array.\n # Preconditions\n This function does not check if the input is normalized, it is up to the user to\n provide normalized input or to normalized the resulting quaternion.", - &["a"], - ) - .register_documented( - "from_axis_angle", - |axis: Val, angle: f64| { - let output: Val = { - { - let output: Val = bevy::math::DQuat::from_axis_angle( - axis.into_inner(), - angle, - ) - .into(); - output - } - }; - output - }, - " Create a quaternion for a normalized rotation `axis` and `angle` (in radians).\n The axis must be a unit vector.\n # Panics\n Will panic if `axis` is not normalized when `glam_assert` is enabled.", - &["axis", "angle"], - ) - .register_documented( - "from_euler", - |euler: Val, a: f64, b: f64, c: f64| { - let output: Val = { - { - let output: Val = bevy::math::DQuat::from_euler( - euler.into_inner(), - a, - b, - c, - ) - .into(); - output - } - }; - output - }, - " Creates a quaternion from the given Euler rotation sequence and the angles (in radians).", - &["euler", "a", "b", "c"], - ) - .register_documented( - "from_mat3", - |mat: Ref| { - let output: Val = { - { - let output: Val = bevy::math::DQuat::from_mat3( - &mat, - ) - .into(); - output - } - }; - output - }, - " Creates a quaternion from a 3x3 rotation matrix.\n Note if the input matrix contain scales, shears, or other non-rotation transformations then\n the resulting quaternion will be ill-defined.\n # Panics\n Will panic if any input matrix column is not normalized when `glam_assert` is enabled.", - &["mat"], - ) - .register_documented( - "from_mat4", - |mat: Ref| { - let output: Val = { - { - let output: Val = bevy::math::DQuat::from_mat4( - &mat, - ) - .into(); - output - } - }; - output - }, - " Creates a quaternion from the upper 3x3 rotation matrix inside a homogeneous 4x4 matrix.\n Note if the upper 3x3 matrix contain scales, shears, or other non-rotation transformations\n then the resulting quaternion will be ill-defined.\n # Panics\n Will panic if any column of the upper 3x3 rotation matrix is not normalized when\n `glam_assert` is enabled.", - &["mat"], - ) - .register_documented( - "from_rotation_arc", - |from: Val, to: Val| { - let output: Val = { - { - let output: Val = bevy::math::DQuat::from_rotation_arc( - from.into_inner(), - to.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Gets the minimal rotation for transforming `from` to `to`. The rotation is in the\n plane spanned by the two vectors. Will rotate at most 180 degrees.\n The inputs must be unit vectors.\n `from_rotation_arc(from, to) * from ≈ to`.\n For near-singular cases (from≈to and from≈-to) the current implementation\n is only accurate to about 0.001 (for `f32`).\n # Panics\n Will panic if `from` or `to` are not normalized when `glam_assert` is enabled.", - &["from", "to"], - ) - .register_documented( - "from_rotation_arc_2d", - |from: Val, to: Val| { - let output: Val = { - { - let output: Val = bevy::math::DQuat::from_rotation_arc_2d( - from.into_inner(), - to.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Gets the minimal rotation for transforming `from` to `to`. The resulting rotation is\n around the z axis. Will rotate at most 180 degrees.\n The inputs must be unit vectors.\n `from_rotation_arc_2d(from, to) * from ≈ to`.\n For near-singular cases (from≈to and from≈-to) the current implementation\n is only accurate to about 0.001 (for `f32`).\n # Panics\n Will panic if `from` or `to` are not normalized when `glam_assert` is enabled.", - &["from", "to"], - ) - .register_documented( - "from_rotation_arc_colinear", - |from: Val, to: Val| { - let output: Val = { - { - let output: Val = bevy::math::DQuat::from_rotation_arc_colinear( - from.into_inner(), - to.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Gets the minimal rotation for transforming `from` to either `to` or `-to`. This means\n that the resulting quaternion will rotate `from` so that it is colinear with `to`.\n The rotation is in the plane spanned by the two vectors. Will rotate at most 90\n degrees.\n The inputs must be unit vectors.\n `to.dot(from_rotation_arc_colinear(from, to) * from).abs() ≈ 1`.\n # Panics\n Will panic if `from` or `to` are not normalized when `glam_assert` is enabled.", - &["from", "to"], - ) - .register_documented( - "from_rotation_x", - |angle: f64| { - let output: Val = { - { - let output: Val = bevy::math::DQuat::from_rotation_x( - angle, - ) - .into(); - output - } - }; - output - }, - " Creates a quaternion from the `angle` (in radians) around the x axis.", - &["angle"], - ) - .register_documented( - "from_rotation_y", - |angle: f64| { - let output: Val = { - { - let output: Val = bevy::math::DQuat::from_rotation_y( - angle, - ) - .into(); - output - } - }; - output - }, - " Creates a quaternion from the `angle` (in radians) around the y axis.", - &["angle"], - ) - .register_documented( - "from_rotation_z", - |angle: f64| { - let output: Val = { - { - let output: Val = bevy::math::DQuat::from_rotation_z( - angle, - ) - .into(); - output - } - }; - output - }, - " Creates a quaternion from the `angle` (in radians) around the z axis.", - &["angle"], - ) - .register_documented( - "from_scaled_axis", - |v: Val| { - let output: Val = { - { - let output: Val = bevy::math::DQuat::from_scaled_axis( - v.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Create a quaternion that rotates `v.length()` radians around `v.normalize()`.\n `from_scaled_axis(Vec3::ZERO)` results in the identity quaternion.", - &["v"], - ) - .register_documented( - "from_vec4", - |v: Val| { - let output: Val = { - { - let output: Val = bevy::math::DQuat::from_vec4( - v.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Creates a new rotation quaternion from a 4D vector.\n # Preconditions\n This function does not check if the input is normalized, it is up to the user to\n provide normalized input or to normalized the resulting quaternion.", - &["v"], - ) - .register_documented( - "from_xyzw", - |x: f64, y: f64, z: f64, w: f64| { - let output: Val = { - { - let output: Val = bevy::math::DQuat::from_xyzw( - x, - y, - z, - w, - ) - .into(); - output - } - }; - output - }, - " Creates a new rotation quaternion.\n This should generally not be called manually unless you know what you are doing.\n Use one of the other constructors instead such as `identity` or `from_axis_angle`.\n `from_xyzw` is mostly used by unit tests and `serde` deserialization.\n # Preconditions\n This function does not check if the input is normalized, it is up to the user to\n provide normalized input or to normalized the resulting quaternion.", - &["x", "y", "z", "w"], - ) - .register_documented( - "inverse", - |_self: Val| { - let output: Val = { - { - let output: Val = bevy::math::DQuat::inverse( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns the inverse of a normalized quaternion.\n Typically quaternion inverse returns the conjugate of a normalized quaternion.\n Because `self` is assumed to already be unit length this method *does not* normalize\n before returning the conjugate.\n # Panics\n Will panic if `self` is not normalized when `glam_assert` is enabled.", - &["_self"], - ) - .register_documented( - "is_finite", - |_self: Val| { - let output: bool = { - { - let output: bool = bevy::math::DQuat::is_finite( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns `true` if, and only if, all elements are finite.\n If any element is either `NaN`, positive or negative infinity, this will return `false`.", - &["_self"], - ) - .register_documented( - "is_nan", - |_self: Val| { - let output: bool = { - { - let output: bool = bevy::math::DQuat::is_nan( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns `true` if any elements are `NAN`.", - &["_self"], - ) - .register_documented( - "is_near_identity", - |_self: Val| { - let output: bool = { - { - let output: bool = bevy::math::DQuat::is_near_identity( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - "", - &["_self"], - ) - .register_documented( - "is_normalized", - |_self: Val| { - let output: bool = { - { - let output: bool = bevy::math::DQuat::is_normalized( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns whether `self` of length `1.0` or not.\n Uses a precision threshold of `1e-6`.", - &["_self"], - ) - .register_documented( - "length", - |_self: Val| { - let output: f64 = { - { - let output: f64 = bevy::math::DQuat::length( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Computes the length of `self`.", - &["_self"], - ) - .register_documented( - "length_recip", - |_self: Val| { - let output: f64 = { - { - let output: f64 = bevy::math::DQuat::length_recip( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Computes `1.0 / length()`.\n For valid results, `self` must _not_ be of length zero.", - &["_self"], - ) - .register_documented( - "length_squared", - |_self: Val| { - let output: f64 = { - { - let output: f64 = bevy::math::DQuat::length_squared( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Computes the squared length of `self`.\n This is generally faster than `length()` as it avoids a square\n root operation.", - &["_self"], - ) - .register_documented( - "lerp", - |_self: Val, end: Val, s: f64| { - let output: Val = { - { - let output: Val = bevy::math::DQuat::lerp( - _self.into_inner(), - end.into_inner(), - s, - ) - .into(); - output - } - }; - output - }, - " Performs a linear interpolation between `self` and `rhs` based on\n the value `s`.\n When `s` is `0.0`, the result will be equal to `self`. When `s`\n is `1.0`, the result will be equal to `rhs`.\n # Panics\n Will panic if `self` or `end` are not normalized when `glam_assert` is enabled.", - &["_self", "end", "s"], - ) - .register_documented( - "mul", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = >::mul(_self.into_inner(), rhs.into_inner()) - .into(); - output - } - }; - output - }, - " Multiplies two quaternions. If they each represent a rotation, the result will\n represent the combined rotation.\n Note that due to floating point rounding the result may not be perfectly\n normalized.\n # Panics\n Will panic if `self` or `rhs` are not normalized when `glam_assert` is enabled.", - &["_self", "rhs"], - ) - .register_documented( - "mul", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = >::mul(_self.into_inner(), rhs.into_inner()) - .into(); - output - } - }; - output - }, - " Multiplies a quaternion and a 3D vector, returning the rotated vector.\n # Panics\n Will panic if `self` is not normalized when `glam_assert` is enabled.", - &["_self", "rhs"], - ) - .register_documented( - "mul", - |_self: Val, rhs: f64| { - let output: Val = { - { - let output: Val = >::mul(_self.into_inner(), rhs) - .into(); - output - } - }; - output - }, - " Multiplies a quaternion by a scalar value.\n The product is not guaranteed to be normalized.", - &["_self", "rhs"], - ) - .register_documented( - "mul_quat", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::DQuat::mul_quat( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Multiplies two quaternions. If they each represent a rotation, the result will\n represent the combined rotation.\n Note that due to floating point rounding the result may not be perfectly normalized.\n # Panics\n Will panic if `self` or `rhs` are not normalized when `glam_assert` is enabled.", - &["_self", "rhs"], - ) - .register_documented( - "mul_vec3", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = bevy::math::DQuat::mul_vec3( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Multiplies a quaternion and a 3D vector, returning the rotated vector.\n # Panics\n Will panic if `self` is not normalized when `glam_assert` is enabled.", - &["_self", "rhs"], - ) - .register_documented( - "neg", - |_self: Val| { - let output: Val = { - { - let output: Val = ::neg( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - "", - &["_self"], - ) - .register_documented( - "normalize", - |_self: Val| { - let output: Val = { - { - let output: Val = bevy::math::DQuat::normalize( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns `self` normalized to length 1.0.\n For valid results, `self` must _not_ be of length zero.\n Panics\n Will panic if `self` is zero length when `glam_assert` is enabled.", - &["_self"], - ) - .register_documented( - "rotate_towards", - | - _self: Ref, - rhs: Val, - max_angle: f64| - { - let output: Val = { - { - let output: Val = bevy::math::DQuat::rotate_towards( - &_self, - rhs.into_inner(), - max_angle, - ) - .into(); - output - } - }; - output - }, - " Rotates towards `rhs` up to `max_angle` (in radians).\n When `max_angle` is `0.0`, the result will be equal to `self`. When `max_angle` is equal to\n `self.angle_between(rhs)`, the result will be equal to `rhs`. If `max_angle` is negative,\n rotates towards the exact opposite of `rhs`. Will not go past the target.\n Both quaternions must be normalized.\n # Panics\n Will panic if `self` or `rhs` are not normalized when `glam_assert` is enabled.", - &["_self", "rhs", "max_angle"], - ) - .register_documented( - "slerp", - |_self: Val, end: Val, s: f64| { - let output: Val = { - { - let output: Val = bevy::math::DQuat::slerp( - _self.into_inner(), - end.into_inner(), - s, - ) - .into(); - output - } - }; - output - }, - " Performs a spherical linear interpolation between `self` and `end`\n based on the value `s`.\n When `s` is `0.0`, the result will be equal to `self`. When `s`\n is `1.0`, the result will be equal to `end`.\n # Panics\n Will panic if `self` or `end` are not normalized when `glam_assert` is enabled.", - &["_self", "end", "s"], - ) - .register_documented( - "sub", - |_self: Val, rhs: Val| { - let output: Val = { - { - let output: Val = >::sub(_self.into_inner(), rhs.into_inner()) - .into(); - output - } - }; - output - }, - " Subtracts the `rhs` quaternion from `self`.\n The difference is not guaranteed to be normalized.", - &["_self", "rhs"], - ) - .register_documented( - "to_array", - |_self: Ref| { - let output: [f64; 4] = { - { - let output: [f64; 4] = bevy::math::DQuat::to_array(&_self) - .into(); - output - } - }; - output - }, - " `[x, y, z, w]`", - &["_self"], - ) - .register_documented( - "to_euler", - |_self: Val, order: Val| { - let output: (f64, f64, f64) = { - { - let output: (f64, f64, f64) = bevy::math::DQuat::to_euler( - _self.into_inner(), - order.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns the rotation angles for the given euler rotation sequence.", - &["_self", "order"], - ) - .register_documented( - "to_scaled_axis", - |_self: Val| { - let output: Val = { - { - let output: Val = bevy::math::DQuat::to_scaled_axis( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns the rotation axis scaled by the rotation in radians.", - &["_self"], - ) - .register_documented( - "xyz", - |_self: Val| { - let output: Val = { - { - let output: Val = bevy::math::DQuat::xyz( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns the vector part of the quaternion.", - &["_self"], - ); - let registry = world - .get_resource_or_init::(); - let mut registry = registry.write(); - registry - .register_type_data::< - bevy::math::DQuat, - bevy_mod_scripting_core::bindings::MarkAsGenerated, - >(); - } - pub(crate) fn register_euler_rot_functions(world: &mut bevy::ecs::world::World) { - bevy_mod_scripting_core::bindings::function::namespace::NamespaceBuilder::< - bevy::math::EulerRot, - >::new(world) - .register_documented( - "assert_receiver_is_total_eq", - |_self: Ref| { - let output: () = { - { - let output: () = ::assert_receiver_is_total_eq( - &_self, - ) - .into(); - output - } - }; - output - }, - "", - &["_self"], - ) - .register_documented( - "clone", - |_self: Ref| { - let output: Val = { - { - let output: Val = ::clone( - &_self, - ) - .into(); - output - } - }; - output - }, - "", - &["_self"], - ) - .register_documented( - "eq", - |_self: Ref, other: Ref| { - let output: bool = { - { - let output: bool = >::eq(&_self, &other) - .into(); - output - } - }; - output - }, - "", - &["_self", "other"], - ); - let registry = world - .get_resource_or_init::(); - let mut registry = registry.write(); - registry - .register_type_data::< - bevy::math::EulerRot, - bevy_mod_scripting_core::bindings::MarkAsGenerated, - >(); - } - pub(crate) fn register_b_vec_3_a_functions(world: &mut bevy::ecs::world::World) { - bevy_mod_scripting_core::bindings::function::namespace::NamespaceBuilder::< - bevy::math::BVec3A, - >::new(world) - .register_documented( - "all", - |_self: Val| { - let output: bool = { - { - let output: bool = bevy::math::BVec3A::all( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns true if all the elements are true, false otherwise.", - &["_self"], - ) - .register_documented( - "any", - |_self: Val| { - let output: bool = { - { - let output: bool = bevy::math::BVec3A::any( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns true if any of the elements are true, false otherwise.", - &["_self"], - ) - .register_documented( - "bitmask", - |_self: Val| { - let output: u32 = { - { - let output: u32 = bevy::math::BVec3A::bitmask( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a bitmask with the lowest 3 bits set from the elements of `self`.\n A true element results in a `1` bit and a false element in a `0` bit. Element `x` goes\n into the first lowest bit, element `y` into the second, etc.", - &["_self"], - ) - .register_documented( - "clone", - |_self: Ref| { - let output: Val = { - { - let output: Val = ::clone( - &_self, - ) - .into(); - output - } - }; - output - }, - "", - &["_self"], - ) - .register_documented( - "eq", - |_self: Ref, rhs: Ref| { - let output: bool = { - { - let output: bool = >::eq(&_self, &rhs) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "from_array", - |a: [bool; 3]| { - let output: Val = { - { - let output: Val = bevy::math::BVec3A::from_array( - a, - ) - .into(); - output - } - }; - output - }, - " Creates a new vector mask from a bool array.", - &["a"], - ) - .register_documented( - "new", - |x: bool, y: bool, z: bool| { - let output: Val = { - { - let output: Val = bevy::math::BVec3A::new( - x, - y, - z, - ) - .into(); - output - } - }; - output - }, - " Creates a new vector mask.", - &["x", "y", "z"], - ) - .register_documented( - "set", - |mut _self: Mut, index: usize, value: bool| { - let output: () = { - { - let output: () = bevy::math::BVec3A::set( - &mut _self, - index, - value, - ) - .into(); - output - } - }; - output - }, - " Sets the element at `index`.\n Panics if `index` is greater than 2.", - &["_self", "index", "value"], - ) - .register_documented( - "splat", - |v: bool| { - let output: Val = { - { - let output: Val = bevy::math::BVec3A::splat( - v, - ) - .into(); - output - } - }; - output - }, - " Creates a vector mask with all elements set to `v`.", - &["v"], - ) - .register_documented( - "test", - |_self: Ref, index: usize| { - let output: bool = { - { - let output: bool = bevy::math::BVec3A::test(&_self, index) - .into(); - output - } - }; - output - }, - " Tests the value at `index`.\n Panics if `index` is greater than 2.", - &["_self", "index"], - ); - let registry = world - .get_resource_or_init::(); - let mut registry = registry.write(); - registry - .register_type_data::< - bevy::math::BVec3A, - bevy_mod_scripting_core::bindings::MarkAsGenerated, - >(); - } - pub(crate) fn register_b_vec_4_a_functions(world: &mut bevy::ecs::world::World) { - bevy_mod_scripting_core::bindings::function::namespace::NamespaceBuilder::< - bevy::math::BVec4A, - >::new(world) - .register_documented( - "all", - |_self: Val| { - let output: bool = { - { - let output: bool = bevy::math::BVec4A::all( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns true if all the elements are true, false otherwise.", - &["_self"], - ) - .register_documented( - "any", - |_self: Val| { - let output: bool = { - { - let output: bool = bevy::math::BVec4A::any( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns true if any of the elements are true, false otherwise.", - &["_self"], - ) - .register_documented( - "bitmask", - |_self: Val| { - let output: u32 = { - { - let output: u32 = bevy::math::BVec4A::bitmask( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns a bitmask with the lowest 4 bits set from the elements of `self`.\n A true element results in a `1` bit and a false element in a `0` bit. Element `x` goes\n into the first lowest bit, element `y` into the second, etc.", - &["_self"], - ) - .register_documented( - "clone", - |_self: Ref| { - let output: Val = { - { - let output: Val = ::clone( - &_self, - ) - .into(); - output - } - }; - output - }, - "", - &["_self"], - ) - .register_documented( - "eq", - |_self: Ref, rhs: Ref| { - let output: bool = { - { - let output: bool = >::eq(&_self, &rhs) - .into(); - output - } - }; - output - }, - "", - &["_self", "rhs"], - ) - .register_documented( - "from_array", - |a: [bool; 4]| { - let output: Val = { - { - let output: Val = bevy::math::BVec4A::from_array( - a, - ) - .into(); - output - } - }; - output - }, - " Creates a new vector mask from a bool array.", - &["a"], - ) - .register_documented( - "new", - |x: bool, y: bool, z: bool, w: bool| { - let output: Val = { - { - let output: Val = bevy::math::BVec4A::new( - x, - y, - z, - w, - ) - .into(); - output - } - }; - output - }, - " Creates a new vector mask.", - &["x", "y", "z", "w"], - ) - .register_documented( - "set", - |mut _self: Mut, index: usize, value: bool| { - let output: () = { - { - let output: () = bevy::math::BVec4A::set( - &mut _self, - index, - value, - ) - .into(); - output - } - }; - output - }, - " Sets the element at `index`.\n Panics if `index` is greater than 3.", - &["_self", "index", "value"], - ) - .register_documented( - "splat", - |v: bool| { - let output: Val = { - { - let output: Val = bevy::math::BVec4A::splat( - v, - ) - .into(); - output - } - }; - output - }, - " Creates a vector mask with all elements set to `v`.", - &["v"], - ) - .register_documented( - "test", - |_self: Ref, index: usize| { - let output: bool = { - { - let output: bool = bevy::math::BVec4A::test(&_self, index) - .into(); - output - } - }; - output - }, - " Tests the value at `index`.\n Panics if `index` is greater than 3.", - &["_self", "index"], - ); - let registry = world - .get_resource_or_init::(); - let mut registry = registry.write(); - registry - .register_type_data::< - bevy::math::BVec4A, - bevy_mod_scripting_core::bindings::MarkAsGenerated, - >(); - } - pub(crate) fn register_smol_str_functions(world: &mut bevy::ecs::world::World) { - bevy_mod_scripting_core::bindings::function::namespace::NamespaceBuilder::< - ::smol_str::SmolStr, - >::new(world) - .register_documented( - "clone", - |_self: Ref<::smol_str::SmolStr>| { - let output: 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 - } - }; - output - }, - "", - &["_self"], - ) - .register_documented( - "eq", - |_self: Ref<::smol_str::SmolStr>, other: Ref<::smol_str::SmolStr>| { - let output: bool = { - { - let output: bool = <::smol_str::SmolStr as ::core::cmp::PartialEq< - ::smol_str::SmolStr, - >>::eq(&_self, &other) - .into(); - output - } - }; - output - }, - "", - &["_self", "other"], - ) - .register_documented( - "is_empty", - |_self: Ref<::smol_str::SmolStr>| { - let output: bool = { - { - let output: bool = ::smol_str::SmolStr::is_empty(&_self) - .into(); - output - } - }; - output - }, - "", - &["_self"], - ) - .register_documented( - "is_heap_allocated", - |_self: Ref<::smol_str::SmolStr>| { - let output: bool = { - { - let output: bool = ::smol_str::SmolStr::is_heap_allocated( - &_self, - ) - .into(); - output - } - }; - output - }, - "", - &["_self"], - ) - .register_documented( - "len", - |_self: Ref<::smol_str::SmolStr>| { - let output: usize = { - { - let output: usize = ::smol_str::SmolStr::len(&_self).into(); - output - } - }; - output - }, - "", - &["_self"], - ) - .register_documented( - "to_string", - |_self: Ref<::smol_str::SmolStr>| { - let output: ::std::string::String = { - { - let output: ::std::string::String = ::smol_str::SmolStr::to_string( - &_self, - ) - .into(); - output - } - }; - output - }, - "", - &["_self"], - ); - let registry = world - .get_resource_or_init::(); - let mut registry = registry.write(); - registry - .register_type_data::< - ::smol_str::SmolStr, - bevy_mod_scripting_core::bindings::MarkAsGenerated, - >(); - } - pub(crate) fn register_uuid_functions(world: &mut bevy::ecs::world::World) { - bevy_mod_scripting_core::bindings::function::namespace::NamespaceBuilder::< - ::uuid::Uuid, - >::new(world) - .register_documented( - "as_u128", - |_self: Ref<::uuid::Uuid>| { - let output: u128 = { - { - let output: u128 = ::uuid::Uuid::as_u128(&_self).into(); - output - } - }; - output - }, - " Returns a 128bit value containing the value.\n The bytes in the UUID will be packed directly into a `u128`.\n # Examples\n ```\n # use uuid::Uuid;\n # fn main() -> Result<(), uuid::Error> {\n let uuid = Uuid::parse_str(\"a1a2a3a4-b1b2-c1c2-d1d2-d3d4d5d6d7d8\")?;\n assert_eq!(\n uuid.as_u128(),\n 0xa1a2a3a4b1b2c1c2d1d2d3d4d5d6d7d8,\n );\n # Ok(())\n # }\n ```", - &["_self"], - ) - .register_documented( - "as_u64_pair", - |_self: Ref<::uuid::Uuid>| { - let output: (u64, u64) = { - { - let output: (u64, u64) = ::uuid::Uuid::as_u64_pair(&_self) - .into(); - output - } - }; - output - }, - " Returns two 64bit values containing the value.\n The bytes in the UUID will be split into two `u64`.\n The first u64 represents the 64 most significant bits,\n the second one represents the 64 least significant.\n # Examples\n ```\n # use uuid::Uuid;\n # fn main() -> Result<(), uuid::Error> {\n let uuid = Uuid::parse_str(\"a1a2a3a4-b1b2-c1c2-d1d2-d3d4d5d6d7d8\")?;\n assert_eq!(\n uuid.as_u64_pair(),\n (0xa1a2a3a4b1b2c1c2, 0xd1d2d3d4d5d6d7d8),\n );\n # Ok(())\n # }\n ```", - &["_self"], - ) - .register_documented( - "assert_receiver_is_total_eq", - |_self: Ref<::uuid::Uuid>| { - let output: () = { - { - let output: () = <::uuid::Uuid as ::core::cmp::Eq>::assert_receiver_is_total_eq( - &_self, - ) - .into(); - output - } - }; - output - }, - "", - &["_self"], - ) - .register_documented( - "clone", - |_self: Ref<::uuid::Uuid>| { - let output: Val<::uuid::Uuid> = { - { - let output: Val<::uuid::Uuid> = <::uuid::Uuid as bevy::reflect::erased_serde::__private::serde::__private::Clone>::clone( - &_self, - ) - .into(); - output - } - }; - output - }, - "", - &["_self"], - ) - .register_documented( - "encode_buffer", - || { - let output: [u8; 45] = { - { - let output: [u8; 45] = ::uuid::Uuid::encode_buffer().into(); - output - } - }; - output - }, - " A buffer that can be used for `encode_...` calls, that is\n guaranteed to be long enough for any of the format adapters.\n # Examples\n ```\n # use uuid::Uuid;\n let uuid = Uuid::nil();\n assert_eq!(\n uuid.simple().encode_lower(&mut Uuid::encode_buffer()),\n \"00000000000000000000000000000000\"\n );\n assert_eq!(\n uuid.hyphenated()\n .encode_lower(&mut Uuid::encode_buffer()),\n \"00000000-0000-0000-0000-000000000000\"\n );\n assert_eq!(\n uuid.urn().encode_lower(&mut Uuid::encode_buffer()),\n \"urn:uuid:00000000-0000-0000-0000-000000000000\"\n );\n ```", - &[], - ) - .register_documented( - "eq", - |_self: Ref<::uuid::Uuid>, other: Ref<::uuid::Uuid>| { - let output: bool = { - { - let output: bool = <::uuid::Uuid as ::core::cmp::PartialEq< - ::uuid::Uuid, - >>::eq(&_self, &other) - .into(); - output - } - }; - output - }, - "", - &["_self", "other"], - ) - .register_documented( - "from_bytes", - |bytes: [u8; 16]| { - let output: Val<::uuid::Uuid> = { - { - let output: Val<::uuid::Uuid> = ::uuid::Uuid::from_bytes( - bytes, - ) - .into(); - output - } - }; - output - }, - " Creates a UUID using the supplied bytes.\n # Examples\n Basic usage:\n ```\n # fn main() -> Result<(), uuid::Error> {\n # use uuid::Uuid;\n let bytes = [\n 0xa1, 0xa2, 0xa3, 0xa4,\n 0xb1, 0xb2,\n 0xc1, 0xc2,\n 0xd1, 0xd2, 0xd3, 0xd4, 0xd5, 0xd6, 0xd7, 0xd8,\n ];\n let uuid = Uuid::from_bytes(bytes);\n assert_eq!(\n uuid.hyphenated().to_string(),\n \"a1a2a3a4-b1b2-c1c2-d1d2-d3d4d5d6d7d8\"\n );\n # Ok(())\n # }\n ```", - &["bytes"], - ) - .register_documented( - "from_bytes_le", - |b: [u8; 16]| { - let output: Val<::uuid::Uuid> = { - { - let output: Val<::uuid::Uuid> = ::uuid::Uuid::from_bytes_le( - b, - ) - .into(); - output - } - }; - output - }, - " Creates a UUID using the supplied bytes in little endian order.\n The individual fields encoded in the buffer will be flipped.\n # Examples\n Basic usage:\n ```\n # fn main() -> Result<(), uuid::Error> {\n # use uuid::Uuid;\n let bytes = [\n 0xa1, 0xa2, 0xa3, 0xa4,\n 0xb1, 0xb2,\n 0xc1, 0xc2,\n 0xd1, 0xd2, 0xd3, 0xd4, 0xd5, 0xd6, 0xd7, 0xd8,\n ];\n let uuid = Uuid::from_bytes_le(bytes);\n assert_eq!(\n \"a4a3a2a1-b2b1-c2c1-d1d2-d3d4d5d6d7d8\",\n uuid.hyphenated().to_string(),\n );\n # Ok(())\n # }\n ```", - &["b"], - ) - .register_documented( - "from_u128", - |v: u128| { - let output: Val<::uuid::Uuid> = { - { - let output: Val<::uuid::Uuid> = ::uuid::Uuid::from_u128(v) - .into(); - output - } - }; - output - }, - " Creates a UUID from a 128bit value.\n # Examples\n Basic usage:\n ```\n # use uuid::Uuid;\n let v = 0xa1a2a3a4b1b2c1c2d1d2d3d4d5d6d7d8u128;\n let uuid = Uuid::from_u128(v);\n assert_eq!(\n \"a1a2a3a4-b1b2-c1c2-d1d2-d3d4d5d6d7d8\",\n uuid.hyphenated().to_string(),\n );\n ```", - &["v"], - ) - .register_documented( - "from_u128_le", - |v: u128| { - let output: Val<::uuid::Uuid> = { - { - let output: Val<::uuid::Uuid> = ::uuid::Uuid::from_u128_le(v) - .into(); - output - } - }; - output - }, - " Creates a UUID from a 128bit value in little-endian order.\n The entire value will be flipped to convert into big-endian order.\n This is based on the endianness of the UUID, rather than the target\n environment so bytes will be flipped on both big and little endian\n machines.\n # Examples\n Basic usage:\n ```\n # use uuid::Uuid;\n let v = 0xa1a2a3a4b1b2c1c2d1d2d3d4d5d6d7d8u128;\n let uuid = Uuid::from_u128_le(v);\n assert_eq!(\n \"d8d7d6d5-d4d3-d2d1-c2c1-b2b1a4a3a2a1\",\n uuid.hyphenated().to_string(),\n );\n ```", - &["v"], - ) - .register_documented( - "from_u64_pair", - |high_bits: u64, low_bits: u64| { - let output: Val<::uuid::Uuid> = { - { - let output: Val<::uuid::Uuid> = ::uuid::Uuid::from_u64_pair( - high_bits, - low_bits, - ) - .into(); - output - } - }; - output - }, - " Creates a UUID from two 64bit values.\n # Examples\n Basic usage:\n ```\n # use uuid::Uuid;\n let hi = 0xa1a2a3a4b1b2c1c2u64;\n let lo = 0xd1d2d3d4d5d6d7d8u64;\n let uuid = Uuid::from_u64_pair(hi, lo);\n assert_eq!(\n \"a1a2a3a4-b1b2-c1c2-d1d2-d3d4d5d6d7d8\",\n uuid.hyphenated().to_string(),\n );\n ```", - &["high_bits", "low_bits"], - ) - .register_documented( - "get_node_id", - |_self: Ref<::uuid::Uuid>| { - let output: 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(); - output - } - }; - output - }, - " If the UUID is the correct version (v1, or v6) this will return the\n node value as a 6-byte array. For other versions this will return `None`.", - &["_self"], - ) - .register_documented( - "get_version_num", - |_self: Ref<::uuid::Uuid>| { - let output: usize = { - { - let output: usize = ::uuid::Uuid::get_version_num(&_self) - .into(); - output - } - }; - output - }, - " Returns the version number of the UUID.\n This represents the algorithm used to generate the value.\n This method is the future-proof alternative to [`Uuid::get_version`].\n # Examples\n Basic usage:\n ```\n # use uuid::Uuid;\n # fn main() -> Result<(), uuid::Error> {\n let my_uuid = Uuid::parse_str(\"02f09a3f-1624-3b1d-8409-44eff7708208\")?;\n assert_eq!(3, my_uuid.get_version_num());\n # Ok(())\n # }\n ```\n # References\n * [Version Field in RFC 9562](https://www.ietf.org/rfc/rfc9562.html#section-4.2)", - &["_self"], - ) - .register_documented( - "into_bytes", - |_self: Val<::uuid::Uuid>| { - let output: [u8; 16] = { - { - let output: [u8; 16] = ::uuid::Uuid::into_bytes( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Consumes self and returns the underlying byte value of the UUID.\n # Examples\n ```\n # use uuid::Uuid;\n let bytes = [\n 0xa1, 0xa2, 0xa3, 0xa4,\n 0xb1, 0xb2,\n 0xc1, 0xc2,\n 0xd1, 0xd2, 0xd3, 0xd4, 0xd5, 0xd6, 0xd7, 0xd8,\n ];\n let uuid = Uuid::from_bytes(bytes);\n assert_eq!(bytes, uuid.into_bytes());\n ```", - &["_self"], - ) - .register_documented( - "is_max", - |_self: Ref<::uuid::Uuid>| { - let output: bool = { - { - let output: bool = ::uuid::Uuid::is_max(&_self).into(); - output - } - }; - output - }, - " Tests if the UUID is max (all ones).", - &["_self"], - ) - .register_documented( - "is_nil", - |_self: Ref<::uuid::Uuid>| { - let output: bool = { - { - let output: bool = ::uuid::Uuid::is_nil(&_self).into(); - output - } - }; - output - }, - " Tests if the UUID is nil (all zeros).", - &["_self"], - ) - .register_documented( - "max", - || { - let output: Val<::uuid::Uuid> = { - { - let output: Val<::uuid::Uuid> = ::uuid::Uuid::max().into(); - output - } - }; - output - }, - " The 'max UUID' (all ones).\n The max UUID is a special form of UUID that is specified to have all\n 128 bits set to one.\n # References\n * [Max UUID in RFC 9562](https://www.ietf.org/rfc/rfc9562.html#section-5.10)\n # Examples\n Basic usage:\n ```\n # use uuid::Uuid;\n let uuid = Uuid::max();\n assert_eq!(\n \"ffffffff-ffff-ffff-ffff-ffffffffffff\",\n uuid.hyphenated().to_string(),\n );\n ```", - &[], - ) - .register_documented( - "new_v4", - || { - let output: Val<::uuid::Uuid> = { - { - let output: Val<::uuid::Uuid> = ::uuid::Uuid::new_v4() - .into(); - output - } - }; - output - }, - " Creates a random UUID.\n This uses the [`getrandom`] crate to utilise the operating system's RNG\n as the source of random numbers. If you'd like to use a custom\n generator, don't use this method: generate random bytes using your\n custom generator and pass them to the\n [`uuid::Builder::from_random_bytes`][from_random_bytes] function\n instead.\n Note that usage of this method requires the `v4` feature of this crate\n to be enabled.\n # Examples\n Basic usage:\n ```\n # use uuid::{Uuid, Version};\n let uuid = Uuid::new_v4();\n assert_eq!(Some(Version::Random), uuid.get_version());\n ```\n # References\n * [UUID Version 4 in RFC 9562](https://www.ietf.org/rfc/rfc9562.html#section-5.4)\n [`getrandom`]: https://crates.io/crates/getrandom\n [from_random_bytes]: struct.Builder.html#method.from_random_bytes", - &[], - ) - .register_documented( - "nil", - || { - let output: Val<::uuid::Uuid> = { - { - let output: Val<::uuid::Uuid> = ::uuid::Uuid::nil().into(); - output - } - }; - output - }, - " The 'nil UUID' (all zeros).\n The nil UUID is a special form of UUID that is specified to have all\n 128 bits set to zero.\n # References\n * [Nil UUID in RFC 9562](https://www.ietf.org/rfc/rfc9562.html#section-5.9)\n # Examples\n Basic usage:\n ```\n # use uuid::Uuid;\n let uuid = Uuid::nil();\n assert_eq!(\n \"00000000-0000-0000-0000-000000000000\",\n uuid.hyphenated().to_string(),\n );\n ```", - &[], - ) - .register_documented( - "to_bytes_le", - |_self: Ref<::uuid::Uuid>| { - let output: [u8; 16] = { - { - let output: [u8; 16] = ::uuid::Uuid::to_bytes_le(&_self) - .into(); - output - } - }; - output - }, - " Returns the bytes of the UUID in little-endian order.\n The bytes will be flipped to convert into little-endian order. This is\n based on the endianness of the UUID, rather than the target environment\n so bytes will be flipped on both big and little endian machines.\n # Examples\n ```\n use uuid::Uuid;\n # fn main() -> Result<(), uuid::Error> {\n let uuid = Uuid::parse_str(\"a1a2a3a4-b1b2-c1c2-d1d2-d3d4d5d6d7d8\")?;\n assert_eq!(\n uuid.to_bytes_le(),\n ([\n 0xa4, 0xa3, 0xa2, 0xa1, 0xb2, 0xb1, 0xc2, 0xc1, 0xd1, 0xd2,\n 0xd3, 0xd4, 0xd5, 0xd6, 0xd7, 0xd8\n ])\n );\n # Ok(())\n # }\n ```", - &["_self"], - ) - .register_documented( - "to_u128_le", - |_self: Ref<::uuid::Uuid>| { - let output: u128 = { - { - let output: u128 = ::uuid::Uuid::to_u128_le(&_self).into(); - output - } - }; - output - }, - " Returns a 128bit little-endian value containing the value.\n The bytes in the `u128` will be flipped to convert into big-endian\n order. This is based on the endianness of the UUID, rather than the\n target environment so bytes will be flipped on both big and little\n endian machines.\n Note that this will produce a different result than\n [`Uuid::to_fields_le`], because the entire UUID is reversed, rather\n than reversing the individual fields in-place.\n # Examples\n ```\n # use uuid::Uuid;\n # fn main() -> Result<(), uuid::Error> {\n let uuid = Uuid::parse_str(\"a1a2a3a4-b1b2-c1c2-d1d2-d3d4d5d6d7d8\")?;\n assert_eq!(\n uuid.to_u128_le(),\n 0xd8d7d6d5d4d3d2d1c2c1b2b1a4a3a2a1,\n );\n # Ok(())\n # }\n ```", - &["_self"], - ); - let registry = world - .get_resource_or_init::(); - let mut registry = registry.write(); - registry - .register_type_data::< - ::uuid::Uuid, - bevy_mod_scripting_core::bindings::MarkAsGenerated, - >(); - } - impl ::bevy::app::Plugin for BevyReflectScriptingPlugin { - fn build(&self, app: &mut ::bevy::prelude::App) { - let mut world = app.world_mut(); - register_atomic_bool_functions(&mut world); - register_atomic_i_16_functions(&mut world); - register_atomic_i_32_functions(&mut world); - register_atomic_i_64_functions(&mut world); - register_atomic_i_8_functions(&mut world); - register_atomic_isize_functions(&mut world); - register_atomic_u_16_functions(&mut world); - register_atomic_u_32_functions(&mut world); - register_atomic_u_64_functions(&mut world); - register_atomic_u_8_functions(&mut world); - register_atomic_usize_functions(&mut world); - 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); - register_vec_2_functions(&mut world); - register_vec_3_a_functions(&mut world); - register_vec_4_functions(&mut world); - register_b_vec_2_functions(&mut world); - register_b_vec_3_functions(&mut world); - register_b_vec_4_functions(&mut world); - register_d_vec_2_functions(&mut world); - register_d_vec_3_functions(&mut world); - register_d_vec_4_functions(&mut world); - register_mat_2_functions(&mut world); - register_mat_3_functions(&mut world); - register_mat_3_a_functions(&mut world); - register_mat_4_functions(&mut world); - register_d_mat_2_functions(&mut world); - register_d_mat_3_functions(&mut world); - register_d_mat_4_functions(&mut world); - register_affine_2_functions(&mut world); - register_affine_3_a_functions(&mut world); - register_d_affine_2_functions(&mut world); - register_d_affine_3_functions(&mut world); - register_d_quat_functions(&mut world); - register_euler_rot_functions(&mut world); - register_b_vec_3_a_functions(&mut world); - register_b_vec_4_a_functions(&mut world); - register_smol_str_functions(&mut world); - register_uuid_functions(&mut world); - } - } \ No newline at end of file + >>::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", + bms_core_path = "bevy_mod_scripting_core", + generated +)] +impl ::glam::IVec2 { + /// Returns a vector containing the absolute value of each element of `self`. + fn abs(_self: Val<::glam::IVec2>) -> Val<::glam::IVec2> { + let output: Val<::glam::IVec2> = ::glam::IVec2::abs(_self.into_inner()).into(); + output + } + fn add(_self: Val<::glam::IVec2>, rhs: Ref<::glam::IVec2>) -> Val<::glam::IVec2> { + let output: Val<::glam::IVec2> = <::glam::IVec2 as ::core::ops::Add< + &::glam::IVec2, + >>::add(_self.into_inner(), &rhs) + .into(); + output + } + fn add(_self: Val<::glam::IVec2>, rhs: Val<::glam::IVec2>) -> Val<::glam::IVec2> { + let output: Val<::glam::IVec2> = <::glam::IVec2 as ::core::ops::Add< + ::glam::IVec2, + >>::add(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + fn add(_self: Val<::glam::IVec2>, rhs: i32) -> Val<::glam::IVec2> { + let output: Val<::glam::IVec2> = <::glam::IVec2 as ::core::ops::Add< + i32, + >>::add(_self.into_inner(), rhs) + .into(); + output + } + /// Casts all elements of `self` to `f64`. + fn as_dvec2(_self: Ref<::glam::IVec2>) -> Val<::glam::DVec2> { + let output: Val<::glam::DVec2> = ::glam::IVec2::as_dvec2(&_self).into(); + output + } + /// Casts all elements of `self` to `i16`. + fn as_i16vec2(_self: Ref<::glam::IVec2>) -> Val<::glam::I16Vec2> { + let output: Val<::glam::I16Vec2> = ::glam::IVec2::as_i16vec2(&_self).into(); + output + } + /// Casts all elements of `self` to `i64`. + fn as_i64vec2(_self: Ref<::glam::IVec2>) -> Val<::glam::I64Vec2> { + let output: Val<::glam::I64Vec2> = ::glam::IVec2::as_i64vec2(&_self).into(); + output + } + /// Casts all elements of `self` to `i8`. + fn as_i8vec2(_self: Ref<::glam::IVec2>) -> Val<::glam::I8Vec2> { + let output: Val<::glam::I8Vec2> = ::glam::IVec2::as_i8vec2(&_self).into(); + output + } + /// Casts all elements of `self` to `u16`. + fn as_u16vec2(_self: Ref<::glam::IVec2>) -> Val<::glam::U16Vec2> { + let output: Val<::glam::U16Vec2> = ::glam::IVec2::as_u16vec2(&_self).into(); + output + } + /// Casts all elements of `self` to `u64`. + fn as_u64vec2(_self: Ref<::glam::IVec2>) -> Val<::glam::U64Vec2> { + let output: Val<::glam::U64Vec2> = ::glam::IVec2::as_u64vec2(&_self).into(); + output + } + /// Casts all elements of `self` to `u8`. + fn as_u8vec2(_self: Ref<::glam::IVec2>) -> Val<::glam::U8Vec2> { + let output: Val<::glam::U8Vec2> = ::glam::IVec2::as_u8vec2(&_self).into(); + output + } + /// Casts all elements of `self` to `u32`. + fn as_uvec2(_self: Ref<::glam::IVec2>) -> Val<::glam::UVec2> { + let output: Val<::glam::UVec2> = ::glam::IVec2::as_uvec2(&_self).into(); + output + } + /// Casts all elements of `self` to `f32`. + fn as_vec2(_self: Ref<::glam::IVec2>) -> Val<::glam::Vec2> { + let output: Val<::glam::Vec2> = ::glam::IVec2::as_vec2(&_self).into(); + output + } + fn assert_receiver_is_total_eq(_self: Ref<::glam::IVec2>) -> () { + let output: () = <::glam::IVec2 as ::core::cmp::Eq>::assert_receiver_is_total_eq( + &_self, + ) + .into(); + output + } + /// Component-wise clamping of values, similar to [`i32::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<::glam::IVec2>, + min: Val<::glam::IVec2>, + max: Val<::glam::IVec2>, + ) -> Val<::glam::IVec2> { + let output: Val<::glam::IVec2> = ::glam::IVec2::clamp( + _self.into_inner(), + min.into_inner(), + max.into_inner(), + ) + .into(); + output + } + fn clone(_self: Ref<::glam::IVec2>) -> Val<::glam::IVec2> { + let output: Val<::glam::IVec2> = <::glam::IVec2 as ::bevy_reflect::erased_serde::__private::serde::__private::Clone>::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<::glam::IVec2>, rhs: Val<::glam::IVec2>) -> Val<::glam::BVec2> { + let output: Val<::glam::BVec2> = ::glam::IVec2::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<::glam::IVec2>, rhs: Val<::glam::IVec2>) -> Val<::glam::BVec2> { + let output: Val<::glam::BVec2> = ::glam::IVec2::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<::glam::IVec2>, rhs: Val<::glam::IVec2>) -> Val<::glam::BVec2> { + let output: Val<::glam::BVec2> = ::glam::IVec2::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<::glam::IVec2>, rhs: Val<::glam::IVec2>) -> Val<::glam::BVec2> { + let output: Val<::glam::BVec2> = ::glam::IVec2::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<::glam::IVec2>, rhs: Val<::glam::IVec2>) -> Val<::glam::BVec2> { + let output: Val<::glam::BVec2> = ::glam::IVec2::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<::glam::IVec2>, rhs: Val<::glam::IVec2>) -> Val<::glam::BVec2> { + let output: Val<::glam::BVec2> = ::glam::IVec2::cmpne( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Compute the squared euclidean distance between two points in space. + fn distance_squared(_self: Val<::glam::IVec2>, rhs: Val<::glam::IVec2>) -> i32 { + let output: i32 = ::glam::IVec2::distance_squared( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + fn div(_self: Val<::glam::IVec2>, rhs: Ref<::glam::IVec2>) -> Val<::glam::IVec2> { + let output: Val<::glam::IVec2> = <::glam::IVec2 as ::core::ops::Div< + &::glam::IVec2, + >>::div(_self.into_inner(), &rhs) + .into(); + output + } + fn div(_self: Val<::glam::IVec2>, rhs: Val<::glam::IVec2>) -> Val<::glam::IVec2> { + let output: Val<::glam::IVec2> = <::glam::IVec2 as ::core::ops::Div< + ::glam::IVec2, + >>::div(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + fn div(_self: Val<::glam::IVec2>, rhs: i32) -> Val<::glam::IVec2> { + let output: Val<::glam::IVec2> = <::glam::IVec2 as ::core::ops::Div< + i32, + >>::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<::glam::IVec2>, + rhs: Val<::glam::IVec2>, + ) -> Val<::glam::IVec2> { + let output: Val<::glam::IVec2> = ::glam::IVec2::div_euclid( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Computes the dot product of `self` and `rhs`. + fn dot(_self: Val<::glam::IVec2>, rhs: Val<::glam::IVec2>) -> i32 { + let output: i32 = ::glam::IVec2::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<::glam::IVec2>, + rhs: Val<::glam::IVec2>, + ) -> Val<::glam::IVec2> { + let output: Val<::glam::IVec2> = ::glam::IVec2::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<::glam::IVec2>) -> i32 { + let output: i32 = ::glam::IVec2::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<::glam::IVec2>) -> i32 { + let output: i32 = ::glam::IVec2::element_sum(_self.into_inner()).into(); + output + } + fn eq(_self: Ref<::glam::IVec2>, other: Ref<::glam::IVec2>) -> bool { + let output: bool = <::glam::IVec2 as ::core::cmp::PartialEq< + ::glam::IVec2, + >>::eq(&_self, &other) + .into(); + output + } + /// Creates a 3D vector from `self` and the given `z` value. + fn extend(_self: Val<::glam::IVec2>, z: i32) -> Val<::glam::IVec3> { + let output: Val<::glam::IVec3> = ::glam::IVec2::extend(_self.into_inner(), z) + .into(); + output + } + /// Creates a new vector from an array. + fn from_array(a: [i32; 2]) -> Val<::glam::IVec2> { + let output: Val<::glam::IVec2> = ::glam::IVec2::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<::glam::IVec2>) -> u32 { + let output: u32 = ::glam::IVec2::is_negative_bitmask(_self.into_inner()).into(); + output + } + /// Computes the squared length of `self`. + fn length_squared(_self: Val<::glam::IVec2>) -> i32 { + let output: i32 = ::glam::IVec2::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<::glam::IVec2>, rhs: Val<::glam::IVec2>) -> Val<::glam::IVec2> { + let output: Val<::glam::IVec2> = ::glam::IVec2::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<::glam::IVec2>) -> i32 { + let output: i32 = ::glam::IVec2::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<::glam::IVec2>, rhs: Val<::glam::IVec2>) -> Val<::glam::IVec2> { + let output: Val<::glam::IVec2> = ::glam::IVec2::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<::glam::IVec2>) -> i32 { + let output: i32 = ::glam::IVec2::min_element(_self.into_inner()).into(); + output + } + fn mul(_self: Val<::glam::IVec2>, rhs: Ref<::glam::IVec2>) -> Val<::glam::IVec2> { + let output: Val<::glam::IVec2> = <::glam::IVec2 as ::core::ops::Mul< + &::glam::IVec2, + >>::mul(_self.into_inner(), &rhs) + .into(); + output + } + fn mul(_self: Val<::glam::IVec2>, rhs: Val<::glam::IVec2>) -> Val<::glam::IVec2> { + let output: Val<::glam::IVec2> = <::glam::IVec2 as ::core::ops::Mul< + ::glam::IVec2, + >>::mul(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + fn mul(_self: Val<::glam::IVec2>, rhs: i32) -> Val<::glam::IVec2> { + let output: Val<::glam::IVec2> = <::glam::IVec2 as ::core::ops::Mul< + i32, + >>::mul(_self.into_inner(), rhs) + .into(); + output + } + fn neg(_self: Val<::glam::IVec2>) -> Val<::glam::IVec2> { + let output: Val<::glam::IVec2> = <::glam::IVec2 as ::core::ops::Neg>::neg( + _self.into_inner(), + ) + .into(); + output + } + /// Creates a new vector. + fn new(x: i32, y: i32) -> Val<::glam::IVec2> { + let output: Val<::glam::IVec2> = ::glam::IVec2::new(x, y).into(); + output + } + /// Returns a vector that is equal to `self` rotated by 90 degrees. + fn perp(_self: Val<::glam::IVec2>) -> Val<::glam::IVec2> { + let output: Val<::glam::IVec2> = ::glam::IVec2::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<::glam::IVec2>, rhs: Val<::glam::IVec2>) -> i32 { + let output: i32 = ::glam::IVec2::perp_dot(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + fn rem(_self: Val<::glam::IVec2>, rhs: Ref<::glam::IVec2>) -> Val<::glam::IVec2> { + let output: Val<::glam::IVec2> = <::glam::IVec2 as ::core::ops::Rem< + &::glam::IVec2, + >>::rem(_self.into_inner(), &rhs) + .into(); + output + } + fn rem(_self: Val<::glam::IVec2>, rhs: Val<::glam::IVec2>) -> Val<::glam::IVec2> { + let output: Val<::glam::IVec2> = <::glam::IVec2 as ::core::ops::Rem< + ::glam::IVec2, + >>::rem(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + fn rem(_self: Val<::glam::IVec2>, rhs: i32) -> Val<::glam::IVec2> { + let output: Val<::glam::IVec2> = <::glam::IVec2 as ::core::ops::Rem< + i32, + >>::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]: i32::rem_euclid + fn rem_euclid( + _self: Val<::glam::IVec2>, + rhs: Val<::glam::IVec2>, + ) -> Val<::glam::IVec2> { + let output: Val<::glam::IVec2> = ::glam::IVec2::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<::glam::IVec2>, rhs: Val<::glam::IVec2>) -> Val<::glam::IVec2> { + let output: Val<::glam::IVec2> = ::glam::IVec2::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<::glam::IVec2>, + rhs: Val<::glam::IVec2>, + ) -> Val<::glam::IVec2> { + let output: Val<::glam::IVec2> = ::glam::IVec2::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<::glam::IVec2>, + rhs: Val<::glam::UVec2>, + ) -> Val<::glam::IVec2> { + let output: Val<::glam::IVec2> = ::glam::IVec2::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<::glam::IVec2>, + rhs: Val<::glam::IVec2>, + ) -> Val<::glam::IVec2> { + let output: Val<::glam::IVec2> = ::glam::IVec2::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<::glam::IVec2>, + rhs: Val<::glam::IVec2>, + ) -> Val<::glam::IVec2> { + let output: Val<::glam::IVec2> = ::glam::IVec2::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<::glam::IVec2>, + rhs: Val<::glam::IVec2>, + ) -> Val<::glam::IVec2> { + let output: Val<::glam::IVec2> = ::glam::IVec2::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<::glam::IVec2>, + rhs: Val<::glam::UVec2>, + ) -> Val<::glam::IVec2> { + let output: Val<::glam::IVec2> = ::glam::IVec2::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<::glam::BVec2>, + if_true: Val<::glam::IVec2>, + if_false: Val<::glam::IVec2>, + ) -> Val<::glam::IVec2> { + let output: Val<::glam::IVec2> = ::glam::IVec2::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<::glam::IVec2>) -> Val<::glam::IVec2> { + let output: Val<::glam::IVec2> = ::glam::IVec2::signum(_self.into_inner()) + .into(); + output + } + /// Creates a vector with all elements set to `v`. + fn splat(v: i32) -> Val<::glam::IVec2> { + let output: Val<::glam::IVec2> = ::glam::IVec2::splat(v).into(); + output + } + fn sub(_self: Val<::glam::IVec2>, rhs: Ref<::glam::IVec2>) -> Val<::glam::IVec2> { + let output: Val<::glam::IVec2> = <::glam::IVec2 as ::core::ops::Sub< + &::glam::IVec2, + >>::sub(_self.into_inner(), &rhs) + .into(); + output + } + fn sub(_self: Val<::glam::IVec2>, rhs: Val<::glam::IVec2>) -> Val<::glam::IVec2> { + let output: Val<::glam::IVec2> = <::glam::IVec2 as ::core::ops::Sub< + ::glam::IVec2, + >>::sub(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + fn sub(_self: Val<::glam::IVec2>, rhs: i32) -> Val<::glam::IVec2> { + let output: Val<::glam::IVec2> = <::glam::IVec2 as ::core::ops::Sub< + i32, + >>::sub(_self.into_inner(), rhs) + .into(); + output + } + /// `[x, y]` + fn to_array(_self: Ref<::glam::IVec2>) -> [i32; 2] { + let output: [i32; 2] = ::glam::IVec2::to_array(&_self).into(); + output + } + /// Creates a 2D vector from `self` with the given value of `x`. + fn with_x(_self: Val<::glam::IVec2>, x: i32) -> Val<::glam::IVec2> { + let output: Val<::glam::IVec2> = ::glam::IVec2::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<::glam::IVec2>, y: i32) -> Val<::glam::IVec2> { + let output: Val<::glam::IVec2> = ::glam::IVec2::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<::glam::IVec2>, + rhs: Val<::glam::IVec2>, + ) -> Val<::glam::IVec2> { + let output: Val<::glam::IVec2> = ::glam::IVec2::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<::glam::IVec2>, + rhs: Val<::glam::UVec2>, + ) -> Val<::glam::IVec2> { + let output: Val<::glam::IVec2> = ::glam::IVec2::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<::glam::IVec2>, + rhs: Val<::glam::IVec2>, + ) -> Val<::glam::IVec2> { + let output: Val<::glam::IVec2> = ::glam::IVec2::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<::glam::IVec2>, + rhs: Val<::glam::IVec2>, + ) -> Val<::glam::IVec2> { + let output: Val<::glam::IVec2> = ::glam::IVec2::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<::glam::IVec2>, + rhs: Val<::glam::IVec2>, + ) -> Val<::glam::IVec2> { + let output: Val<::glam::IVec2> = ::glam::IVec2::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<::glam::IVec2>, + rhs: Val<::glam::UVec2>, + ) -> Val<::glam::IVec2> { + let output: Val<::glam::IVec2> = ::glam::IVec2::wrapping_sub_unsigned( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } +} +#[script_bindings( + remote, + name = "i_vec_3_functions", + bms_core_path = "bevy_mod_scripting_core", + generated +)] +impl ::glam::IVec3 { + /// Returns a vector containing the absolute value of each element of `self`. + fn abs(_self: Val<::glam::IVec3>) -> Val<::glam::IVec3> { + let output: Val<::glam::IVec3> = ::glam::IVec3::abs(_self.into_inner()).into(); + output + } + fn add(_self: Val<::glam::IVec3>, rhs: Ref<::glam::IVec3>) -> Val<::glam::IVec3> { + let output: Val<::glam::IVec3> = <::glam::IVec3 as ::core::ops::Add< + &::glam::IVec3, + >>::add(_self.into_inner(), &rhs) + .into(); + output + } + fn add(_self: Val<::glam::IVec3>, rhs: Val<::glam::IVec3>) -> Val<::glam::IVec3> { + let output: Val<::glam::IVec3> = <::glam::IVec3 as ::core::ops::Add< + ::glam::IVec3, + >>::add(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + fn add(_self: Val<::glam::IVec3>, rhs: i32) -> Val<::glam::IVec3> { + let output: Val<::glam::IVec3> = <::glam::IVec3 as ::core::ops::Add< + i32, + >>::add(_self.into_inner(), rhs) + .into(); + output + } + /// Casts all elements of `self` to `f64`. + fn as_dvec3(_self: Ref<::glam::IVec3>) -> Val<::glam::DVec3> { + let output: Val<::glam::DVec3> = ::glam::IVec3::as_dvec3(&_self).into(); + output + } + /// Casts all elements of `self` to `i16`. + fn as_i16vec3(_self: Ref<::glam::IVec3>) -> Val<::glam::I16Vec3> { + let output: Val<::glam::I16Vec3> = ::glam::IVec3::as_i16vec3(&_self).into(); + output + } + /// Casts all elements of `self` to `i64`. + fn as_i64vec3(_self: Ref<::glam::IVec3>) -> Val<::glam::I64Vec3> { + let output: Val<::glam::I64Vec3> = ::glam::IVec3::as_i64vec3(&_self).into(); + output + } + /// Casts all elements of `self` to `i8`. + fn as_i8vec3(_self: Ref<::glam::IVec3>) -> Val<::glam::I8Vec3> { + let output: Val<::glam::I8Vec3> = ::glam::IVec3::as_i8vec3(&_self).into(); + output + } + /// Casts all elements of `self` to `u16`. + fn as_u16vec3(_self: Ref<::glam::IVec3>) -> Val<::glam::U16Vec3> { + let output: Val<::glam::U16Vec3> = ::glam::IVec3::as_u16vec3(&_self).into(); + output + } + /// Casts all elements of `self` to `u64`. + fn as_u64vec3(_self: Ref<::glam::IVec3>) -> Val<::glam::U64Vec3> { + let output: Val<::glam::U64Vec3> = ::glam::IVec3::as_u64vec3(&_self).into(); + output + } + /// Casts all elements of `self` to `u8`. + fn as_u8vec3(_self: Ref<::glam::IVec3>) -> Val<::glam::U8Vec3> { + let output: Val<::glam::U8Vec3> = ::glam::IVec3::as_u8vec3(&_self).into(); + output + } + /// Casts all elements of `self` to `u32`. + fn as_uvec3(_self: Ref<::glam::IVec3>) -> Val<::glam::UVec3> { + let output: Val<::glam::UVec3> = ::glam::IVec3::as_uvec3(&_self).into(); + output + } + /// Casts all elements of `self` to `f32`. + fn as_vec3(_self: Ref<::glam::IVec3>) -> Val<::glam::Vec3> { + let output: Val<::glam::Vec3> = ::glam::IVec3::as_vec3(&_self).into(); + output + } + /// Casts all elements of `self` to `f32`. + fn as_vec3a(_self: Ref<::glam::IVec3>) -> Val<::glam::Vec3A> { + let output: Val<::glam::Vec3A> = ::glam::IVec3::as_vec3a(&_self).into(); + output + } + fn assert_receiver_is_total_eq(_self: Ref<::glam::IVec3>) -> () { + let output: () = <::glam::IVec3 as ::core::cmp::Eq>::assert_receiver_is_total_eq( + &_self, + ) + .into(); + output + } + /// Component-wise clamping of values, similar to [`i32::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<::glam::IVec3>, + min: Val<::glam::IVec3>, + max: Val<::glam::IVec3>, + ) -> Val<::glam::IVec3> { + let output: Val<::glam::IVec3> = ::glam::IVec3::clamp( + _self.into_inner(), + min.into_inner(), + max.into_inner(), + ) + .into(); + output + } + fn clone(_self: Ref<::glam::IVec3>) -> Val<::glam::IVec3> { + let output: Val<::glam::IVec3> = <::glam::IVec3 as ::bevy_reflect::erased_serde::__private::serde::__private::Clone>::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<::glam::IVec3>, rhs: Val<::glam::IVec3>) -> Val<::glam::BVec3> { + let output: Val<::glam::BVec3> = ::glam::IVec3::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<::glam::IVec3>, rhs: Val<::glam::IVec3>) -> Val<::glam::BVec3> { + let output: Val<::glam::BVec3> = ::glam::IVec3::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<::glam::IVec3>, rhs: Val<::glam::IVec3>) -> Val<::glam::BVec3> { + let output: Val<::glam::BVec3> = ::glam::IVec3::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<::glam::IVec3>, rhs: Val<::glam::IVec3>) -> Val<::glam::BVec3> { + let output: Val<::glam::BVec3> = ::glam::IVec3::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<::glam::IVec3>, rhs: Val<::glam::IVec3>) -> Val<::glam::BVec3> { + let output: Val<::glam::BVec3> = ::glam::IVec3::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<::glam::IVec3>, rhs: Val<::glam::IVec3>) -> Val<::glam::BVec3> { + let output: Val<::glam::BVec3> = ::glam::IVec3::cmpne( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Computes the cross product of `self` and `rhs`. + fn cross(_self: Val<::glam::IVec3>, rhs: Val<::glam::IVec3>) -> Val<::glam::IVec3> { + let output: Val<::glam::IVec3> = ::glam::IVec3::cross( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Compute the squared euclidean distance between two points in space. + fn distance_squared(_self: Val<::glam::IVec3>, rhs: Val<::glam::IVec3>) -> i32 { + let output: i32 = ::glam::IVec3::distance_squared( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + fn div(_self: Val<::glam::IVec3>, rhs: Ref<::glam::IVec3>) -> Val<::glam::IVec3> { + let output: Val<::glam::IVec3> = <::glam::IVec3 as ::core::ops::Div< + &::glam::IVec3, + >>::div(_self.into_inner(), &rhs) + .into(); + output + } + fn div(_self: Val<::glam::IVec3>, rhs: Val<::glam::IVec3>) -> Val<::glam::IVec3> { + let output: Val<::glam::IVec3> = <::glam::IVec3 as ::core::ops::Div< + ::glam::IVec3, + >>::div(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + fn div(_self: Val<::glam::IVec3>, rhs: i32) -> Val<::glam::IVec3> { + let output: Val<::glam::IVec3> = <::glam::IVec3 as ::core::ops::Div< + i32, + >>::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<::glam::IVec3>, + rhs: Val<::glam::IVec3>, + ) -> Val<::glam::IVec3> { + let output: Val<::glam::IVec3> = ::glam::IVec3::div_euclid( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Computes the dot product of `self` and `rhs`. + fn dot(_self: Val<::glam::IVec3>, rhs: Val<::glam::IVec3>) -> i32 { + let output: i32 = ::glam::IVec3::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<::glam::IVec3>, + rhs: Val<::glam::IVec3>, + ) -> Val<::glam::IVec3> { + let output: Val<::glam::IVec3> = ::glam::IVec3::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<::glam::IVec3>) -> i32 { + let output: i32 = ::glam::IVec3::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<::glam::IVec3>) -> i32 { + let output: i32 = ::glam::IVec3::element_sum(_self.into_inner()).into(); + output + } + fn eq(_self: Ref<::glam::IVec3>, other: Ref<::glam::IVec3>) -> bool { + let output: bool = <::glam::IVec3 as ::core::cmp::PartialEq< + ::glam::IVec3, + >>::eq(&_self, &other) + .into(); + output + } + /// Creates a 4D vector from `self` and the given `w` value. + fn extend(_self: Val<::glam::IVec3>, w: i32) -> Val<::glam::IVec4> { + let output: Val<::glam::IVec4> = ::glam::IVec3::extend(_self.into_inner(), w) + .into(); + output + } + /// Creates a new vector from an array. + fn from_array(a: [i32; 3]) -> Val<::glam::IVec3> { + let output: Val<::glam::IVec3> = ::glam::IVec3::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<::glam::IVec3>) -> u32 { + let output: u32 = ::glam::IVec3::is_negative_bitmask(_self.into_inner()).into(); + output + } + /// Computes the squared length of `self`. + fn length_squared(_self: Val<::glam::IVec3>) -> i32 { + let output: i32 = ::glam::IVec3::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<::glam::IVec3>, rhs: Val<::glam::IVec3>) -> Val<::glam::IVec3> { + let output: Val<::glam::IVec3> = ::glam::IVec3::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<::glam::IVec3>) -> i32 { + let output: i32 = ::glam::IVec3::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<::glam::IVec3>, rhs: Val<::glam::IVec3>) -> Val<::glam::IVec3> { + let output: Val<::glam::IVec3> = ::glam::IVec3::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<::glam::IVec3>) -> i32 { + let output: i32 = ::glam::IVec3::min_element(_self.into_inner()).into(); + output + } + fn mul(_self: Val<::glam::IVec3>, rhs: Ref<::glam::IVec3>) -> Val<::glam::IVec3> { + let output: Val<::glam::IVec3> = <::glam::IVec3 as ::core::ops::Mul< + &::glam::IVec3, + >>::mul(_self.into_inner(), &rhs) + .into(); + output + } + fn mul(_self: Val<::glam::IVec3>, rhs: Val<::glam::IVec3>) -> Val<::glam::IVec3> { + let output: Val<::glam::IVec3> = <::glam::IVec3 as ::core::ops::Mul< + ::glam::IVec3, + >>::mul(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + fn mul(_self: Val<::glam::IVec3>, rhs: i32) -> Val<::glam::IVec3> { + let output: Val<::glam::IVec3> = <::glam::IVec3 as ::core::ops::Mul< + i32, + >>::mul(_self.into_inner(), rhs) + .into(); + output + } + fn neg(_self: Val<::glam::IVec3>) -> Val<::glam::IVec3> { + let output: Val<::glam::IVec3> = <::glam::IVec3 as ::core::ops::Neg>::neg( + _self.into_inner(), + ) + .into(); + output + } + /// Creates a new vector. + fn new(x: i32, y: i32, z: i32) -> Val<::glam::IVec3> { + let output: Val<::glam::IVec3> = ::glam::IVec3::new(x, y, z).into(); + output + } + fn rem(_self: Val<::glam::IVec3>, rhs: Ref<::glam::IVec3>) -> Val<::glam::IVec3> { + let output: Val<::glam::IVec3> = <::glam::IVec3 as ::core::ops::Rem< + &::glam::IVec3, + >>::rem(_self.into_inner(), &rhs) + .into(); + output + } + fn rem(_self: Val<::glam::IVec3>, rhs: Val<::glam::IVec3>) -> Val<::glam::IVec3> { + let output: Val<::glam::IVec3> = <::glam::IVec3 as ::core::ops::Rem< + ::glam::IVec3, + >>::rem(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + fn rem(_self: Val<::glam::IVec3>, rhs: i32) -> Val<::glam::IVec3> { + let output: Val<::glam::IVec3> = <::glam::IVec3 as ::core::ops::Rem< + i32, + >>::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]: i32::rem_euclid + fn rem_euclid( + _self: Val<::glam::IVec3>, + rhs: Val<::glam::IVec3>, + ) -> Val<::glam::IVec3> { + let output: Val<::glam::IVec3> = ::glam::IVec3::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<::glam::IVec3>, + rhs: Val<::glam::IVec3>, + ) -> Val<::glam::IVec3> { + let output: Val<::glam::IVec3> = ::glam::IVec3::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<::glam::IVec3>, + rhs: Val<::glam::UVec3>, + ) -> Val<::glam::IVec3> { + let output: Val<::glam::IVec3> = ::glam::IVec3::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<::glam::IVec3>, + rhs: Val<::glam::IVec3>, + ) -> Val<::glam::IVec3> { + let output: Val<::glam::IVec3> = ::glam::IVec3::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<::glam::IVec3>, + rhs: Val<::glam::IVec3>, + ) -> Val<::glam::IVec3> { + let output: Val<::glam::IVec3> = ::glam::IVec3::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<::glam::IVec3>, + rhs: Val<::glam::IVec3>, + ) -> Val<::glam::IVec3> { + let output: Val<::glam::IVec3> = ::glam::IVec3::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<::glam::IVec3>, + rhs: Val<::glam::UVec3>, + ) -> Val<::glam::IVec3> { + let output: Val<::glam::IVec3> = ::glam::IVec3::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<::glam::BVec3>, + if_true: Val<::glam::IVec3>, + if_false: Val<::glam::IVec3>, + ) -> Val<::glam::IVec3> { + let output: Val<::glam::IVec3> = ::glam::IVec3::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<::glam::IVec3>) -> Val<::glam::IVec3> { + let output: Val<::glam::IVec3> = ::glam::IVec3::signum(_self.into_inner()) + .into(); + output + } + /// Creates a vector with all elements set to `v`. + fn splat(v: i32) -> Val<::glam::IVec3> { + let output: Val<::glam::IVec3> = ::glam::IVec3::splat(v).into(); + output + } + fn sub(_self: Val<::glam::IVec3>, rhs: Ref<::glam::IVec3>) -> Val<::glam::IVec3> { + let output: Val<::glam::IVec3> = <::glam::IVec3 as ::core::ops::Sub< + &::glam::IVec3, + >>::sub(_self.into_inner(), &rhs) + .into(); + output + } + fn sub(_self: Val<::glam::IVec3>, rhs: Val<::glam::IVec3>) -> Val<::glam::IVec3> { + let output: Val<::glam::IVec3> = <::glam::IVec3 as ::core::ops::Sub< + ::glam::IVec3, + >>::sub(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + fn sub(_self: Val<::glam::IVec3>, rhs: i32) -> Val<::glam::IVec3> { + let output: Val<::glam::IVec3> = <::glam::IVec3 as ::core::ops::Sub< + i32, + >>::sub(_self.into_inner(), rhs) + .into(); + output + } + /// `[x, y, z]` + fn to_array(_self: Ref<::glam::IVec3>) -> [i32; 3] { + let output: [i32; 3] = ::glam::IVec3::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<::glam::IVec3>) -> Val<::glam::IVec2> { + let output: Val<::glam::IVec2> = ::glam::IVec3::truncate(_self.into_inner()) + .into(); + output + } + /// Creates a 3D vector from `self` with the given value of `x`. + fn with_x(_self: Val<::glam::IVec3>, x: i32) -> Val<::glam::IVec3> { + let output: Val<::glam::IVec3> = ::glam::IVec3::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<::glam::IVec3>, y: i32) -> Val<::glam::IVec3> { + let output: Val<::glam::IVec3> = ::glam::IVec3::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<::glam::IVec3>, z: i32) -> Val<::glam::IVec3> { + let output: Val<::glam::IVec3> = ::glam::IVec3::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<::glam::IVec3>, + rhs: Val<::glam::IVec3>, + ) -> Val<::glam::IVec3> { + let output: Val<::glam::IVec3> = ::glam::IVec3::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<::glam::IVec3>, + rhs: Val<::glam::UVec3>, + ) -> Val<::glam::IVec3> { + let output: Val<::glam::IVec3> = ::glam::IVec3::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<::glam::IVec3>, + rhs: Val<::glam::IVec3>, + ) -> Val<::glam::IVec3> { + let output: Val<::glam::IVec3> = ::glam::IVec3::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<::glam::IVec3>, + rhs: Val<::glam::IVec3>, + ) -> Val<::glam::IVec3> { + let output: Val<::glam::IVec3> = ::glam::IVec3::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<::glam::IVec3>, + rhs: Val<::glam::IVec3>, + ) -> Val<::glam::IVec3> { + let output: Val<::glam::IVec3> = ::glam::IVec3::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<::glam::IVec3>, + rhs: Val<::glam::UVec3>, + ) -> Val<::glam::IVec3> { + let output: Val<::glam::IVec3> = ::glam::IVec3::wrapping_sub_unsigned( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } +} +#[script_bindings( + remote, + name = "i_vec_4_functions", + bms_core_path = "bevy_mod_scripting_core", + generated +)] +impl ::glam::IVec4 { + /// Returns a vector containing the absolute value of each element of `self`. + fn abs(_self: Val<::glam::IVec4>) -> Val<::glam::IVec4> { + let output: Val<::glam::IVec4> = ::glam::IVec4::abs(_self.into_inner()).into(); + output + } + fn add(_self: Val<::glam::IVec4>, rhs: Ref<::glam::IVec4>) -> Val<::glam::IVec4> { + let output: Val<::glam::IVec4> = <::glam::IVec4 as ::core::ops::Add< + &::glam::IVec4, + >>::add(_self.into_inner(), &rhs) + .into(); + output + } + fn add(_self: Val<::glam::IVec4>, rhs: Val<::glam::IVec4>) -> Val<::glam::IVec4> { + let output: Val<::glam::IVec4> = <::glam::IVec4 as ::core::ops::Add< + ::glam::IVec4, + >>::add(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + fn add(_self: Val<::glam::IVec4>, rhs: i32) -> Val<::glam::IVec4> { + let output: Val<::glam::IVec4> = <::glam::IVec4 as ::core::ops::Add< + i32, + >>::add(_self.into_inner(), rhs) + .into(); + output + } + /// Casts all elements of `self` to `f64`. + fn as_dvec4(_self: Ref<::glam::IVec4>) -> Val<::glam::DVec4> { + let output: Val<::glam::DVec4> = ::glam::IVec4::as_dvec4(&_self).into(); + output + } + /// Casts all elements of `self` to `i16`. + fn as_i16vec4(_self: Ref<::glam::IVec4>) -> Val<::glam::I16Vec4> { + let output: Val<::glam::I16Vec4> = ::glam::IVec4::as_i16vec4(&_self).into(); + output + } + /// Casts all elements of `self` to `i64`. + fn as_i64vec4(_self: Ref<::glam::IVec4>) -> Val<::glam::I64Vec4> { + let output: Val<::glam::I64Vec4> = ::glam::IVec4::as_i64vec4(&_self).into(); + output + } + /// Casts all elements of `self` to `i8`. + fn as_i8vec4(_self: Ref<::glam::IVec4>) -> Val<::glam::I8Vec4> { + let output: Val<::glam::I8Vec4> = ::glam::IVec4::as_i8vec4(&_self).into(); + output + } + /// Casts all elements of `self` to `u16`. + fn as_u16vec4(_self: Ref<::glam::IVec4>) -> Val<::glam::U16Vec4> { + let output: Val<::glam::U16Vec4> = ::glam::IVec4::as_u16vec4(&_self).into(); + output + } + /// Casts all elements of `self` to `u64`. + fn as_u64vec4(_self: Ref<::glam::IVec4>) -> Val<::glam::U64Vec4> { + let output: Val<::glam::U64Vec4> = ::glam::IVec4::as_u64vec4(&_self).into(); + output + } + /// Casts all elements of `self` to `u8`. + fn as_u8vec4(_self: Ref<::glam::IVec4>) -> Val<::glam::U8Vec4> { + let output: Val<::glam::U8Vec4> = ::glam::IVec4::as_u8vec4(&_self).into(); + output + } + /// Casts all elements of `self` to `u32`. + fn as_uvec4(_self: Ref<::glam::IVec4>) -> Val<::glam::UVec4> { + let output: Val<::glam::UVec4> = ::glam::IVec4::as_uvec4(&_self).into(); + output + } + /// Casts all elements of `self` to `f32`. + fn as_vec4(_self: Ref<::glam::IVec4>) -> Val<::glam::Vec4> { + let output: Val<::glam::Vec4> = ::glam::IVec4::as_vec4(&_self).into(); + output + } + fn assert_receiver_is_total_eq(_self: Ref<::glam::IVec4>) -> () { + let output: () = <::glam::IVec4 as ::core::cmp::Eq>::assert_receiver_is_total_eq( + &_self, + ) + .into(); + output + } + /// Component-wise clamping of values, similar to [`i32::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<::glam::IVec4>, + min: Val<::glam::IVec4>, + max: Val<::glam::IVec4>, + ) -> Val<::glam::IVec4> { + let output: Val<::glam::IVec4> = ::glam::IVec4::clamp( + _self.into_inner(), + min.into_inner(), + max.into_inner(), + ) + .into(); + output + } + fn clone(_self: Ref<::glam::IVec4>) -> Val<::glam::IVec4> { + let output: Val<::glam::IVec4> = <::glam::IVec4 as ::bevy_reflect::erased_serde::__private::serde::__private::Clone>::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<::glam::IVec4>, rhs: Val<::glam::IVec4>) -> Val<::glam::BVec4> { + let output: Val<::glam::BVec4> = ::glam::IVec4::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<::glam::IVec4>, rhs: Val<::glam::IVec4>) -> Val<::glam::BVec4> { + let output: Val<::glam::BVec4> = ::glam::IVec4::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<::glam::IVec4>, rhs: Val<::glam::IVec4>) -> Val<::glam::BVec4> { + let output: Val<::glam::BVec4> = ::glam::IVec4::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<::glam::IVec4>, rhs: Val<::glam::IVec4>) -> Val<::glam::BVec4> { + let output: Val<::glam::BVec4> = ::glam::IVec4::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<::glam::IVec4>, rhs: Val<::glam::IVec4>) -> Val<::glam::BVec4> { + let output: Val<::glam::BVec4> = ::glam::IVec4::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<::glam::IVec4>, rhs: Val<::glam::IVec4>) -> Val<::glam::BVec4> { + let output: Val<::glam::BVec4> = ::glam::IVec4::cmpne( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Compute the squared euclidean distance between two points in space. + fn distance_squared(_self: Val<::glam::IVec4>, rhs: Val<::glam::IVec4>) -> i32 { + let output: i32 = ::glam::IVec4::distance_squared( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + fn div(_self: Val<::glam::IVec4>, rhs: Ref<::glam::IVec4>) -> Val<::glam::IVec4> { + let output: Val<::glam::IVec4> = <::glam::IVec4 as ::core::ops::Div< + &::glam::IVec4, + >>::div(_self.into_inner(), &rhs) + .into(); + output + } + fn div(_self: Val<::glam::IVec4>, rhs: Val<::glam::IVec4>) -> Val<::glam::IVec4> { + let output: Val<::glam::IVec4> = <::glam::IVec4 as ::core::ops::Div< + ::glam::IVec4, + >>::div(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + fn div(_self: Val<::glam::IVec4>, rhs: i32) -> Val<::glam::IVec4> { + let output: Val<::glam::IVec4> = <::glam::IVec4 as ::core::ops::Div< + i32, + >>::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<::glam::IVec4>, + rhs: Val<::glam::IVec4>, + ) -> Val<::glam::IVec4> { + let output: Val<::glam::IVec4> = ::glam::IVec4::div_euclid( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Computes the dot product of `self` and `rhs`. + fn dot(_self: Val<::glam::IVec4>, rhs: Val<::glam::IVec4>) -> i32 { + let output: i32 = ::glam::IVec4::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<::glam::IVec4>, + rhs: Val<::glam::IVec4>, + ) -> Val<::glam::IVec4> { + let output: Val<::glam::IVec4> = ::glam::IVec4::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<::glam::IVec4>) -> i32 { + let output: i32 = ::glam::IVec4::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<::glam::IVec4>) -> i32 { + let output: i32 = ::glam::IVec4::element_sum(_self.into_inner()).into(); + output + } + fn eq(_self: Ref<::glam::IVec4>, other: Ref<::glam::IVec4>) -> bool { + let output: bool = <::glam::IVec4 as ::core::cmp::PartialEq< + ::glam::IVec4, + >>::eq(&_self, &other) + .into(); + output + } + /// Creates a new vector from an array. + fn from_array(a: [i32; 4]) -> Val<::glam::IVec4> { + let output: Val<::glam::IVec4> = ::glam::IVec4::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<::glam::IVec4>) -> u32 { + let output: u32 = ::glam::IVec4::is_negative_bitmask(_self.into_inner()).into(); + output + } + /// Computes the squared length of `self`. + fn length_squared(_self: Val<::glam::IVec4>) -> i32 { + let output: i32 = ::glam::IVec4::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<::glam::IVec4>, rhs: Val<::glam::IVec4>) -> Val<::glam::IVec4> { + let output: Val<::glam::IVec4> = ::glam::IVec4::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<::glam::IVec4>) -> i32 { + let output: i32 = ::glam::IVec4::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<::glam::IVec4>, rhs: Val<::glam::IVec4>) -> Val<::glam::IVec4> { + let output: Val<::glam::IVec4> = ::glam::IVec4::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<::glam::IVec4>) -> i32 { + let output: i32 = ::glam::IVec4::min_element(_self.into_inner()).into(); + output + } + fn mul(_self: Val<::glam::IVec4>, rhs: Ref<::glam::IVec4>) -> Val<::glam::IVec4> { + let output: Val<::glam::IVec4> = <::glam::IVec4 as ::core::ops::Mul< + &::glam::IVec4, + >>::mul(_self.into_inner(), &rhs) + .into(); + output + } + fn mul(_self: Val<::glam::IVec4>, rhs: Val<::glam::IVec4>) -> Val<::glam::IVec4> { + let output: Val<::glam::IVec4> = <::glam::IVec4 as ::core::ops::Mul< + ::glam::IVec4, + >>::mul(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + fn mul(_self: Val<::glam::IVec4>, rhs: i32) -> Val<::glam::IVec4> { + let output: Val<::glam::IVec4> = <::glam::IVec4 as ::core::ops::Mul< + i32, + >>::mul(_self.into_inner(), rhs) + .into(); + output + } + fn neg(_self: Val<::glam::IVec4>) -> Val<::glam::IVec4> { + let output: Val<::glam::IVec4> = <::glam::IVec4 as ::core::ops::Neg>::neg( + _self.into_inner(), + ) + .into(); + output + } + /// Creates a new vector. + fn new(x: i32, y: i32, z: i32, w: i32) -> Val<::glam::IVec4> { + let output: Val<::glam::IVec4> = ::glam::IVec4::new(x, y, z, w).into(); + output + } + fn rem(_self: Val<::glam::IVec4>, rhs: Ref<::glam::IVec4>) -> Val<::glam::IVec4> { + let output: Val<::glam::IVec4> = <::glam::IVec4 as ::core::ops::Rem< + &::glam::IVec4, + >>::rem(_self.into_inner(), &rhs) + .into(); + output + } + fn rem(_self: Val<::glam::IVec4>, rhs: Val<::glam::IVec4>) -> Val<::glam::IVec4> { + let output: Val<::glam::IVec4> = <::glam::IVec4 as ::core::ops::Rem< + ::glam::IVec4, + >>::rem(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + fn rem(_self: Val<::glam::IVec4>, rhs: i32) -> Val<::glam::IVec4> { + let output: Val<::glam::IVec4> = <::glam::IVec4 as ::core::ops::Rem< + i32, + >>::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]: i32::rem_euclid + fn rem_euclid( + _self: Val<::glam::IVec4>, + rhs: Val<::glam::IVec4>, + ) -> Val<::glam::IVec4> { + let output: Val<::glam::IVec4> = ::glam::IVec4::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<::glam::IVec4>, + rhs: Val<::glam::IVec4>, + ) -> Val<::glam::IVec4> { + let output: Val<::glam::IVec4> = ::glam::IVec4::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<::glam::IVec4>, + rhs: Val<::glam::UVec4>, + ) -> Val<::glam::IVec4> { + let output: Val<::glam::IVec4> = ::glam::IVec4::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<::glam::IVec4>, + rhs: Val<::glam::IVec4>, + ) -> Val<::glam::IVec4> { + let output: Val<::glam::IVec4> = ::glam::IVec4::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<::glam::IVec4>, + rhs: Val<::glam::IVec4>, + ) -> Val<::glam::IVec4> { + let output: Val<::glam::IVec4> = ::glam::IVec4::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<::glam::IVec4>, + rhs: Val<::glam::IVec4>, + ) -> Val<::glam::IVec4> { + let output: Val<::glam::IVec4> = ::glam::IVec4::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<::glam::IVec4>, + rhs: Val<::glam::UVec4>, + ) -> Val<::glam::IVec4> { + let output: Val<::glam::IVec4> = ::glam::IVec4::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<::glam::BVec4>, + if_true: Val<::glam::IVec4>, + if_false: Val<::glam::IVec4>, + ) -> Val<::glam::IVec4> { + let output: Val<::glam::IVec4> = ::glam::IVec4::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<::glam::IVec4>) -> Val<::glam::IVec4> { + let output: Val<::glam::IVec4> = ::glam::IVec4::signum(_self.into_inner()) + .into(); + output + } + /// Creates a vector with all elements set to `v`. + fn splat(v: i32) -> Val<::glam::IVec4> { + let output: Val<::glam::IVec4> = ::glam::IVec4::splat(v).into(); + output + } + fn sub(_self: Val<::glam::IVec4>, rhs: Ref<::glam::IVec4>) -> Val<::glam::IVec4> { + let output: Val<::glam::IVec4> = <::glam::IVec4 as ::core::ops::Sub< + &::glam::IVec4, + >>::sub(_self.into_inner(), &rhs) + .into(); + output + } + fn sub(_self: Val<::glam::IVec4>, rhs: Val<::glam::IVec4>) -> Val<::glam::IVec4> { + let output: Val<::glam::IVec4> = <::glam::IVec4 as ::core::ops::Sub< + ::glam::IVec4, + >>::sub(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + fn sub(_self: Val<::glam::IVec4>, rhs: i32) -> Val<::glam::IVec4> { + let output: Val<::glam::IVec4> = <::glam::IVec4 as ::core::ops::Sub< + i32, + >>::sub(_self.into_inner(), rhs) + .into(); + output + } + /// `[x, y, z, w]` + fn to_array(_self: Ref<::glam::IVec4>) -> [i32; 4] { + let output: [i32; 4] = ::glam::IVec4::to_array(&_self).into(); + output + } + /// Creates a 3D vector from the `x`, `y` and `z` elements of `self`, discarding `w`. + /// Truncation to [`IVec3`] may also be performed by using [`self.xyz()`][crate::swizzles::Vec4Swizzles::xyz()]. + fn truncate(_self: Val<::glam::IVec4>) -> Val<::glam::IVec3> { + let output: Val<::glam::IVec3> = ::glam::IVec4::truncate(_self.into_inner()) + .into(); + output + } + /// Creates a 4D vector from `self` with the given value of `w`. + fn with_w(_self: Val<::glam::IVec4>, w: i32) -> Val<::glam::IVec4> { + let output: Val<::glam::IVec4> = ::glam::IVec4::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<::glam::IVec4>, x: i32) -> Val<::glam::IVec4> { + let output: Val<::glam::IVec4> = ::glam::IVec4::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<::glam::IVec4>, y: i32) -> Val<::glam::IVec4> { + let output: Val<::glam::IVec4> = ::glam::IVec4::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<::glam::IVec4>, z: i32) -> Val<::glam::IVec4> { + let output: Val<::glam::IVec4> = ::glam::IVec4::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<::glam::IVec4>, + rhs: Val<::glam::IVec4>, + ) -> Val<::glam::IVec4> { + let output: Val<::glam::IVec4> = ::glam::IVec4::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<::glam::IVec4>, + rhs: Val<::glam::UVec4>, + ) -> Val<::glam::IVec4> { + let output: Val<::glam::IVec4> = ::glam::IVec4::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<::glam::IVec4>, + rhs: Val<::glam::IVec4>, + ) -> Val<::glam::IVec4> { + let output: Val<::glam::IVec4> = ::glam::IVec4::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<::glam::IVec4>, + rhs: Val<::glam::IVec4>, + ) -> Val<::glam::IVec4> { + let output: Val<::glam::IVec4> = ::glam::IVec4::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<::glam::IVec4>, + rhs: Val<::glam::IVec4>, + ) -> Val<::glam::IVec4> { + let output: Val<::glam::IVec4> = ::glam::IVec4::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<::glam::IVec4>, + rhs: Val<::glam::UVec4>, + ) -> Val<::glam::IVec4> { + let output: Val<::glam::IVec4> = ::glam::IVec4::wrapping_sub_unsigned( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } +} +#[script_bindings( + remote, + name = "i_8_vec_2_functions", + bms_core_path = "bevy_mod_scripting_core", + generated +)] +impl ::glam::I8Vec2 { + /// Returns a vector containing the absolute value of each element of `self`. + fn abs(_self: Val<::glam::I8Vec2>) -> Val<::glam::I8Vec2> { + let output: Val<::glam::I8Vec2> = ::glam::I8Vec2::abs(_self.into_inner()).into(); + output + } + fn add(_self: Val<::glam::I8Vec2>, rhs: Ref<::glam::I8Vec2>) -> Val<::glam::I8Vec2> { + let output: Val<::glam::I8Vec2> = <::glam::I8Vec2 as ::core::ops::Add< + &::glam::I8Vec2, + >>::add(_self.into_inner(), &rhs) + .into(); + output + } + fn add(_self: Val<::glam::I8Vec2>, rhs: Val<::glam::I8Vec2>) -> Val<::glam::I8Vec2> { + let output: Val<::glam::I8Vec2> = <::glam::I8Vec2 as ::core::ops::Add< + ::glam::I8Vec2, + >>::add(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + fn add(_self: Val<::glam::I8Vec2>, rhs: i8) -> Val<::glam::I8Vec2> { + let output: Val<::glam::I8Vec2> = <::glam::I8Vec2 as ::core::ops::Add< + i8, + >>::add(_self.into_inner(), rhs) + .into(); + output + } + /// Casts all elements of `self` to `f64`. + fn as_dvec2(_self: Ref<::glam::I8Vec2>) -> Val<::glam::DVec2> { + let output: Val<::glam::DVec2> = ::glam::I8Vec2::as_dvec2(&_self).into(); + output + } + /// Casts all elements of `self` to `i16`. + fn as_i16vec2(_self: Ref<::glam::I8Vec2>) -> Val<::glam::I16Vec2> { + let output: Val<::glam::I16Vec2> = ::glam::I8Vec2::as_i16vec2(&_self).into(); + output + } + /// Casts all elements of `self` to `i64`. + fn as_i64vec2(_self: Ref<::glam::I8Vec2>) -> Val<::glam::I64Vec2> { + let output: Val<::glam::I64Vec2> = ::glam::I8Vec2::as_i64vec2(&_self).into(); + output + } + /// Casts all elements of `self` to `i32`. + fn as_ivec2(_self: Ref<::glam::I8Vec2>) -> Val<::glam::IVec2> { + let output: Val<::glam::IVec2> = ::glam::I8Vec2::as_ivec2(&_self).into(); + output + } + /// Casts all elements of `self` to `u16`. + fn as_u16vec2(_self: Ref<::glam::I8Vec2>) -> Val<::glam::U16Vec2> { + let output: Val<::glam::U16Vec2> = ::glam::I8Vec2::as_u16vec2(&_self).into(); + output + } + /// Casts all elements of `self` to `u64`. + fn as_u64vec2(_self: Ref<::glam::I8Vec2>) -> Val<::glam::U64Vec2> { + let output: Val<::glam::U64Vec2> = ::glam::I8Vec2::as_u64vec2(&_self).into(); + output + } + /// Casts all elements of `self` to `u8`. + fn as_u8vec2(_self: Ref<::glam::I8Vec2>) -> Val<::glam::U8Vec2> { + let output: Val<::glam::U8Vec2> = ::glam::I8Vec2::as_u8vec2(&_self).into(); + output + } + /// Casts all elements of `self` to `u32`. + fn as_uvec2(_self: Ref<::glam::I8Vec2>) -> Val<::glam::UVec2> { + let output: Val<::glam::UVec2> = ::glam::I8Vec2::as_uvec2(&_self).into(); + output + } + /// Casts all elements of `self` to `f32`. + fn as_vec2(_self: Ref<::glam::I8Vec2>) -> Val<::glam::Vec2> { + let output: Val<::glam::Vec2> = ::glam::I8Vec2::as_vec2(&_self).into(); + output + } + fn assert_receiver_is_total_eq(_self: Ref<::glam::I8Vec2>) -> () { + let output: () = <::glam::I8Vec2 as ::core::cmp::Eq>::assert_receiver_is_total_eq( + &_self, + ) + .into(); + output + } + /// 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<::glam::I8Vec2>, + min: Val<::glam::I8Vec2>, + max: Val<::glam::I8Vec2>, + ) -> Val<::glam::I8Vec2> { + let output: Val<::glam::I8Vec2> = ::glam::I8Vec2::clamp( + _self.into_inner(), + min.into_inner(), + max.into_inner(), + ) + .into(); + output + } + fn clone(_self: Ref<::glam::I8Vec2>) -> Val<::glam::I8Vec2> { + let output: Val<::glam::I8Vec2> = <::glam::I8Vec2 as ::bevy_reflect::erased_serde::__private::serde::__private::Clone>::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<::glam::I8Vec2>, + rhs: Val<::glam::I8Vec2>, + ) -> Val<::glam::BVec2> { + let output: Val<::glam::BVec2> = ::glam::I8Vec2::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<::glam::I8Vec2>, + rhs: Val<::glam::I8Vec2>, + ) -> Val<::glam::BVec2> { + let output: Val<::glam::BVec2> = ::glam::I8Vec2::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<::glam::I8Vec2>, + rhs: Val<::glam::I8Vec2>, + ) -> Val<::glam::BVec2> { + let output: Val<::glam::BVec2> = ::glam::I8Vec2::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<::glam::I8Vec2>, + rhs: Val<::glam::I8Vec2>, + ) -> Val<::glam::BVec2> { + let output: Val<::glam::BVec2> = ::glam::I8Vec2::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<::glam::I8Vec2>, + rhs: Val<::glam::I8Vec2>, + ) -> Val<::glam::BVec2> { + let output: Val<::glam::BVec2> = ::glam::I8Vec2::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<::glam::I8Vec2>, + rhs: Val<::glam::I8Vec2>, + ) -> Val<::glam::BVec2> { + let output: Val<::glam::BVec2> = ::glam::I8Vec2::cmpne( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Compute the squared euclidean distance between two points in space. + fn distance_squared(_self: Val<::glam::I8Vec2>, rhs: Val<::glam::I8Vec2>) -> i8 { + let output: i8 = ::glam::I8Vec2::distance_squared( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + fn div(_self: Val<::glam::I8Vec2>, rhs: Ref<::glam::I8Vec2>) -> Val<::glam::I8Vec2> { + let output: Val<::glam::I8Vec2> = <::glam::I8Vec2 as ::core::ops::Div< + &::glam::I8Vec2, + >>::div(_self.into_inner(), &rhs) + .into(); + output + } + fn div(_self: Val<::glam::I8Vec2>, rhs: Val<::glam::I8Vec2>) -> Val<::glam::I8Vec2> { + let output: Val<::glam::I8Vec2> = <::glam::I8Vec2 as ::core::ops::Div< + ::glam::I8Vec2, + >>::div(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + fn div(_self: Val<::glam::I8Vec2>, rhs: i8) -> Val<::glam::I8Vec2> { + let output: Val<::glam::I8Vec2> = <::glam::I8Vec2 as ::core::ops::Div< + i8, + >>::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<::glam::I8Vec2>, + rhs: Val<::glam::I8Vec2>, + ) -> Val<::glam::I8Vec2> { + let output: Val<::glam::I8Vec2> = ::glam::I8Vec2::div_euclid( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Computes the dot product of `self` and `rhs`. + fn dot(_self: Val<::glam::I8Vec2>, rhs: Val<::glam::I8Vec2>) -> i8 { + let output: i8 = ::glam::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<::glam::I8Vec2>, + rhs: Val<::glam::I8Vec2>, + ) -> Val<::glam::I8Vec2> { + let output: Val<::glam::I8Vec2> = ::glam::I8Vec2::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<::glam::I8Vec2>) -> i8 { + let output: i8 = ::glam::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<::glam::I8Vec2>) -> i8 { + let output: i8 = ::glam::I8Vec2::element_sum(_self.into_inner()).into(); + output + } + fn eq(_self: Ref<::glam::I8Vec2>, other: Ref<::glam::I8Vec2>) -> bool { + let output: bool = <::glam::I8Vec2 as ::core::cmp::PartialEq< + ::glam::I8Vec2, + >>::eq(&_self, &other) + .into(); + output + } + /// Creates a 3D vector from `self` and the given `z` value. + fn extend(_self: Val<::glam::I8Vec2>, z: i8) -> Val<::glam::I8Vec3> { + let output: Val<::glam::I8Vec3> = ::glam::I8Vec2::extend(_self.into_inner(), z) + .into(); + output + } + /// Creates a new vector from an array. + fn from_array(a: [i8; 2]) -> Val<::glam::I8Vec2> { + let output: Val<::glam::I8Vec2> = ::glam::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<::glam::I8Vec2>) -> u32 { + let output: u32 = ::glam::I8Vec2::is_negative_bitmask(_self.into_inner()).into(); + output + } + /// Computes the squared length of `self`. + fn length_squared(_self: Val<::glam::I8Vec2>) -> i8 { + let output: i8 = ::glam::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<::glam::I8Vec2>, rhs: Val<::glam::I8Vec2>) -> Val<::glam::I8Vec2> { + let output: Val<::glam::I8Vec2> = ::glam::I8Vec2::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<::glam::I8Vec2>) -> i8 { + let output: i8 = ::glam::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<::glam::I8Vec2>, rhs: Val<::glam::I8Vec2>) -> Val<::glam::I8Vec2> { + let output: Val<::glam::I8Vec2> = ::glam::I8Vec2::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<::glam::I8Vec2>) -> i8 { + let output: i8 = ::glam::I8Vec2::min_element(_self.into_inner()).into(); + output + } + fn mul(_self: Val<::glam::I8Vec2>, rhs: Ref<::glam::I8Vec2>) -> Val<::glam::I8Vec2> { + let output: Val<::glam::I8Vec2> = <::glam::I8Vec2 as ::core::ops::Mul< + &::glam::I8Vec2, + >>::mul(_self.into_inner(), &rhs) + .into(); + output + } + fn mul(_self: Val<::glam::I8Vec2>, rhs: Val<::glam::I8Vec2>) -> Val<::glam::I8Vec2> { + let output: Val<::glam::I8Vec2> = <::glam::I8Vec2 as ::core::ops::Mul< + ::glam::I8Vec2, + >>::mul(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + fn mul(_self: Val<::glam::I8Vec2>, rhs: i8) -> Val<::glam::I8Vec2> { + let output: Val<::glam::I8Vec2> = <::glam::I8Vec2 as ::core::ops::Mul< + i8, + >>::mul(_self.into_inner(), rhs) + .into(); + output + } + fn neg(_self: Val<::glam::I8Vec2>) -> Val<::glam::I8Vec2> { + let output: Val<::glam::I8Vec2> = <::glam::I8Vec2 as ::core::ops::Neg>::neg( + _self.into_inner(), + ) + .into(); + output + } + /// Creates a new vector. + fn new(x: i8, y: i8) -> Val<::glam::I8Vec2> { + let output: Val<::glam::I8Vec2> = ::glam::I8Vec2::new(x, y).into(); + output + } + /// Returns a vector that is equal to `self` rotated by 90 degrees. + fn perp(_self: Val<::glam::I8Vec2>) -> Val<::glam::I8Vec2> { + let output: Val<::glam::I8Vec2> = ::glam::I8Vec2::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<::glam::I8Vec2>, rhs: Val<::glam::I8Vec2>) -> i8 { + let output: i8 = ::glam::I8Vec2::perp_dot(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + fn rem(_self: Val<::glam::I8Vec2>, rhs: Ref<::glam::I8Vec2>) -> Val<::glam::I8Vec2> { + let output: Val<::glam::I8Vec2> = <::glam::I8Vec2 as ::core::ops::Rem< + &::glam::I8Vec2, + >>::rem(_self.into_inner(), &rhs) + .into(); + output + } + fn rem(_self: Val<::glam::I8Vec2>, rhs: Val<::glam::I8Vec2>) -> Val<::glam::I8Vec2> { + let output: Val<::glam::I8Vec2> = <::glam::I8Vec2 as ::core::ops::Rem< + ::glam::I8Vec2, + >>::rem(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + fn rem(_self: Val<::glam::I8Vec2>, rhs: i8) -> Val<::glam::I8Vec2> { + let output: Val<::glam::I8Vec2> = <::glam::I8Vec2 as ::core::ops::Rem< + i8, + >>::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]: i8::rem_euclid + fn rem_euclid( + _self: Val<::glam::I8Vec2>, + rhs: Val<::glam::I8Vec2>, + ) -> Val<::glam::I8Vec2> { + let output: Val<::glam::I8Vec2> = ::glam::I8Vec2::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<::glam::I8Vec2>, + rhs: Val<::glam::I8Vec2>, + ) -> Val<::glam::I8Vec2> { + let output: Val<::glam::I8Vec2> = ::glam::I8Vec2::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<::glam::I8Vec2>, + rhs: Val<::glam::I8Vec2>, + ) -> Val<::glam::I8Vec2> { + let output: Val<::glam::I8Vec2> = ::glam::I8Vec2::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<::glam::I8Vec2>, + rhs: Val<::glam::U8Vec2>, + ) -> Val<::glam::I8Vec2> { + let output: Val<::glam::I8Vec2> = ::glam::I8Vec2::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<::glam::I8Vec2>, + rhs: Val<::glam::I8Vec2>, + ) -> Val<::glam::I8Vec2> { + let output: Val<::glam::I8Vec2> = ::glam::I8Vec2::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<::glam::I8Vec2>, + rhs: Val<::glam::I8Vec2>, + ) -> Val<::glam::I8Vec2> { + let output: Val<::glam::I8Vec2> = ::glam::I8Vec2::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<::glam::I8Vec2>, + rhs: Val<::glam::I8Vec2>, + ) -> Val<::glam::I8Vec2> { + let output: Val<::glam::I8Vec2> = ::glam::I8Vec2::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<::glam::I8Vec2>, + rhs: Val<::glam::U8Vec2>, + ) -> Val<::glam::I8Vec2> { + let output: Val<::glam::I8Vec2> = ::glam::I8Vec2::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<::glam::BVec2>, + if_true: Val<::glam::I8Vec2>, + if_false: Val<::glam::I8Vec2>, + ) -> Val<::glam::I8Vec2> { + let output: Val<::glam::I8Vec2> = ::glam::I8Vec2::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<::glam::I8Vec2>) -> Val<::glam::I8Vec2> { + let output: Val<::glam::I8Vec2> = ::glam::I8Vec2::signum(_self.into_inner()) + .into(); + output + } + /// Creates a vector with all elements set to `v`. + fn splat(v: i8) -> Val<::glam::I8Vec2> { + let output: Val<::glam::I8Vec2> = ::glam::I8Vec2::splat(v).into(); + output + } + fn sub(_self: Val<::glam::I8Vec2>, rhs: Ref<::glam::I8Vec2>) -> Val<::glam::I8Vec2> { + let output: Val<::glam::I8Vec2> = <::glam::I8Vec2 as ::core::ops::Sub< + &::glam::I8Vec2, + >>::sub(_self.into_inner(), &rhs) + .into(); + output + } + fn sub(_self: Val<::glam::I8Vec2>, rhs: Val<::glam::I8Vec2>) -> Val<::glam::I8Vec2> { + let output: Val<::glam::I8Vec2> = <::glam::I8Vec2 as ::core::ops::Sub< + ::glam::I8Vec2, + >>::sub(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + fn sub(_self: Val<::glam::I8Vec2>, rhs: i8) -> Val<::glam::I8Vec2> { + let output: Val<::glam::I8Vec2> = <::glam::I8Vec2 as ::core::ops::Sub< + i8, + >>::sub(_self.into_inner(), rhs) + .into(); + output + } + /// `[x, y]` + fn to_array(_self: Ref<::glam::I8Vec2>) -> [i8; 2] { + let output: [i8; 2] = ::glam::I8Vec2::to_array(&_self).into(); + output + } + /// Creates a 2D vector from `self` with the given value of `x`. + fn with_x(_self: Val<::glam::I8Vec2>, x: i8) -> Val<::glam::I8Vec2> { + let output: Val<::glam::I8Vec2> = ::glam::I8Vec2::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<::glam::I8Vec2>, y: i8) -> Val<::glam::I8Vec2> { + let output: Val<::glam::I8Vec2> = ::glam::I8Vec2::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<::glam::I8Vec2>, + rhs: Val<::glam::I8Vec2>, + ) -> Val<::glam::I8Vec2> { + let output: Val<::glam::I8Vec2> = ::glam::I8Vec2::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<::glam::I8Vec2>, + rhs: Val<::glam::U8Vec2>, + ) -> Val<::glam::I8Vec2> { + let output: Val<::glam::I8Vec2> = ::glam::I8Vec2::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<::glam::I8Vec2>, + rhs: Val<::glam::I8Vec2>, + ) -> Val<::glam::I8Vec2> { + let output: Val<::glam::I8Vec2> = ::glam::I8Vec2::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<::glam::I8Vec2>, + rhs: Val<::glam::I8Vec2>, + ) -> Val<::glam::I8Vec2> { + let output: Val<::glam::I8Vec2> = ::glam::I8Vec2::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<::glam::I8Vec2>, + rhs: Val<::glam::I8Vec2>, + ) -> Val<::glam::I8Vec2> { + let output: Val<::glam::I8Vec2> = ::glam::I8Vec2::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<::glam::I8Vec2>, + rhs: Val<::glam::U8Vec2>, + ) -> Val<::glam::I8Vec2> { + let output: Val<::glam::I8Vec2> = ::glam::I8Vec2::wrapping_sub_unsigned( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } +} +#[script_bindings( + remote, + name = "i_8_vec_3_functions", + bms_core_path = "bevy_mod_scripting_core", + generated +)] +impl ::glam::I8Vec3 { + /// Returns a vector containing the absolute value of each element of `self`. + fn abs(_self: Val<::glam::I8Vec3>) -> Val<::glam::I8Vec3> { + let output: Val<::glam::I8Vec3> = ::glam::I8Vec3::abs(_self.into_inner()).into(); + output + } + fn add(_self: Val<::glam::I8Vec3>, rhs: Ref<::glam::I8Vec3>) -> Val<::glam::I8Vec3> { + let output: Val<::glam::I8Vec3> = <::glam::I8Vec3 as ::core::ops::Add< + &::glam::I8Vec3, + >>::add(_self.into_inner(), &rhs) + .into(); + output + } + fn add(_self: Val<::glam::I8Vec3>, rhs: Val<::glam::I8Vec3>) -> Val<::glam::I8Vec3> { + let output: Val<::glam::I8Vec3> = <::glam::I8Vec3 as ::core::ops::Add< + ::glam::I8Vec3, + >>::add(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + fn add(_self: Val<::glam::I8Vec3>, rhs: i8) -> Val<::glam::I8Vec3> { + let output: Val<::glam::I8Vec3> = <::glam::I8Vec3 as ::core::ops::Add< + i8, + >>::add(_self.into_inner(), rhs) + .into(); + output + } + /// Casts all elements of `self` to `f64`. + fn as_dvec3(_self: Ref<::glam::I8Vec3>) -> Val<::glam::DVec3> { + let output: Val<::glam::DVec3> = ::glam::I8Vec3::as_dvec3(&_self).into(); + output + } + /// Casts all elements of `self` to `i16`. + fn as_i16vec3(_self: Ref<::glam::I8Vec3>) -> Val<::glam::I16Vec3> { + let output: Val<::glam::I16Vec3> = ::glam::I8Vec3::as_i16vec3(&_self).into(); + output + } + /// Casts all elements of `self` to `i64`. + fn as_i64vec3(_self: Ref<::glam::I8Vec3>) -> Val<::glam::I64Vec3> { + let output: Val<::glam::I64Vec3> = ::glam::I8Vec3::as_i64vec3(&_self).into(); + output + } + /// Casts all elements of `self` to `i32`. + fn as_ivec3(_self: Ref<::glam::I8Vec3>) -> Val<::glam::IVec3> { + let output: Val<::glam::IVec3> = ::glam::I8Vec3::as_ivec3(&_self).into(); + output + } + /// Casts all elements of `self` to `u16`. + fn as_u16vec3(_self: Ref<::glam::I8Vec3>) -> Val<::glam::U16Vec3> { + let output: Val<::glam::U16Vec3> = ::glam::I8Vec3::as_u16vec3(&_self).into(); + output + } + /// Casts all elements of `self` to `u64`. + fn as_u64vec3(_self: Ref<::glam::I8Vec3>) -> Val<::glam::U64Vec3> { + let output: Val<::glam::U64Vec3> = ::glam::I8Vec3::as_u64vec3(&_self).into(); + output + } + /// Casts all elements of `self` to `u8`. + fn as_u8vec3(_self: Ref<::glam::I8Vec3>) -> Val<::glam::U8Vec3> { + let output: Val<::glam::U8Vec3> = ::glam::I8Vec3::as_u8vec3(&_self).into(); + output + } + /// Casts all elements of `self` to `u32`. + fn as_uvec3(_self: Ref<::glam::I8Vec3>) -> Val<::glam::UVec3> { + let output: Val<::glam::UVec3> = ::glam::I8Vec3::as_uvec3(&_self).into(); + output + } + /// Casts all elements of `self` to `f32`. + fn as_vec3(_self: Ref<::glam::I8Vec3>) -> Val<::glam::Vec3> { + let output: Val<::glam::Vec3> = ::glam::I8Vec3::as_vec3(&_self).into(); + output + } + /// Casts all elements of `self` to `f32`. + fn as_vec3a(_self: Ref<::glam::I8Vec3>) -> Val<::glam::Vec3A> { + let output: Val<::glam::Vec3A> = ::glam::I8Vec3::as_vec3a(&_self).into(); + output + } + fn assert_receiver_is_total_eq(_self: Ref<::glam::I8Vec3>) -> () { + let output: () = <::glam::I8Vec3 as ::core::cmp::Eq>::assert_receiver_is_total_eq( + &_self, + ) + .into(); + output + } + /// 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<::glam::I8Vec3>, + min: Val<::glam::I8Vec3>, + max: Val<::glam::I8Vec3>, + ) -> Val<::glam::I8Vec3> { + let output: Val<::glam::I8Vec3> = ::glam::I8Vec3::clamp( + _self.into_inner(), + min.into_inner(), + max.into_inner(), + ) + .into(); + output + } + fn clone(_self: Ref<::glam::I8Vec3>) -> Val<::glam::I8Vec3> { + let output: Val<::glam::I8Vec3> = <::glam::I8Vec3 as ::bevy_reflect::erased_serde::__private::serde::__private::Clone>::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<::glam::I8Vec3>, + rhs: Val<::glam::I8Vec3>, + ) -> Val<::glam::BVec3> { + let output: Val<::glam::BVec3> = ::glam::I8Vec3::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<::glam::I8Vec3>, + rhs: Val<::glam::I8Vec3>, + ) -> Val<::glam::BVec3> { + let output: Val<::glam::BVec3> = ::glam::I8Vec3::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<::glam::I8Vec3>, + rhs: Val<::glam::I8Vec3>, + ) -> Val<::glam::BVec3> { + let output: Val<::glam::BVec3> = ::glam::I8Vec3::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<::glam::I8Vec3>, + rhs: Val<::glam::I8Vec3>, + ) -> Val<::glam::BVec3> { + let output: Val<::glam::BVec3> = ::glam::I8Vec3::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<::glam::I8Vec3>, + rhs: Val<::glam::I8Vec3>, + ) -> Val<::glam::BVec3> { + let output: Val<::glam::BVec3> = ::glam::I8Vec3::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<::glam::I8Vec3>, + rhs: Val<::glam::I8Vec3>, + ) -> Val<::glam::BVec3> { + let output: Val<::glam::BVec3> = ::glam::I8Vec3::cmpne( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Computes the cross product of `self` and `rhs`. + fn cross( + _self: Val<::glam::I8Vec3>, + rhs: Val<::glam::I8Vec3>, + ) -> Val<::glam::I8Vec3> { + let output: Val<::glam::I8Vec3> = ::glam::I8Vec3::cross( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Compute the squared euclidean distance between two points in space. + fn distance_squared(_self: Val<::glam::I8Vec3>, rhs: Val<::glam::I8Vec3>) -> i8 { + let output: i8 = ::glam::I8Vec3::distance_squared( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + fn div(_self: Val<::glam::I8Vec3>, rhs: Ref<::glam::I8Vec3>) -> Val<::glam::I8Vec3> { + let output: Val<::glam::I8Vec3> = <::glam::I8Vec3 as ::core::ops::Div< + &::glam::I8Vec3, + >>::div(_self.into_inner(), &rhs) + .into(); + output + } + fn div(_self: Val<::glam::I8Vec3>, rhs: Val<::glam::I8Vec3>) -> Val<::glam::I8Vec3> { + let output: Val<::glam::I8Vec3> = <::glam::I8Vec3 as ::core::ops::Div< + ::glam::I8Vec3, + >>::div(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + fn div(_self: Val<::glam::I8Vec3>, rhs: i8) -> Val<::glam::I8Vec3> { + let output: Val<::glam::I8Vec3> = <::glam::I8Vec3 as ::core::ops::Div< + i8, + >>::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<::glam::I8Vec3>, + rhs: Val<::glam::I8Vec3>, + ) -> Val<::glam::I8Vec3> { + let output: Val<::glam::I8Vec3> = ::glam::I8Vec3::div_euclid( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Computes the dot product of `self` and `rhs`. + fn dot(_self: Val<::glam::I8Vec3>, rhs: Val<::glam::I8Vec3>) -> i8 { + let output: i8 = ::glam::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<::glam::I8Vec3>, + rhs: Val<::glam::I8Vec3>, + ) -> Val<::glam::I8Vec3> { + let output: Val<::glam::I8Vec3> = ::glam::I8Vec3::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<::glam::I8Vec3>) -> i8 { + let output: i8 = ::glam::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<::glam::I8Vec3>) -> i8 { + let output: i8 = ::glam::I8Vec3::element_sum(_self.into_inner()).into(); + output + } + fn eq(_self: Ref<::glam::I8Vec3>, other: Ref<::glam::I8Vec3>) -> bool { + let output: bool = <::glam::I8Vec3 as ::core::cmp::PartialEq< + ::glam::I8Vec3, + >>::eq(&_self, &other) + .into(); + output + } + /// Creates a 4D vector from `self` and the given `w` value. + fn extend(_self: Val<::glam::I8Vec3>, w: i8) -> Val<::glam::I8Vec4> { + let output: Val<::glam::I8Vec4> = ::glam::I8Vec3::extend(_self.into_inner(), w) + .into(); + output + } + /// Creates a new vector from an array. + fn from_array(a: [i8; 3]) -> Val<::glam::I8Vec3> { + let output: Val<::glam::I8Vec3> = ::glam::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<::glam::I8Vec3>) -> u32 { + let output: u32 = ::glam::I8Vec3::is_negative_bitmask(_self.into_inner()).into(); + output + } + /// Computes the squared length of `self`. + fn length_squared(_self: Val<::glam::I8Vec3>) -> i8 { + let output: i8 = ::glam::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<::glam::I8Vec3>, rhs: Val<::glam::I8Vec3>) -> Val<::glam::I8Vec3> { + let output: Val<::glam::I8Vec3> = ::glam::I8Vec3::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<::glam::I8Vec3>) -> i8 { + let output: i8 = ::glam::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<::glam::I8Vec3>, rhs: Val<::glam::I8Vec3>) -> Val<::glam::I8Vec3> { + let output: Val<::glam::I8Vec3> = ::glam::I8Vec3::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<::glam::I8Vec3>) -> i8 { + let output: i8 = ::glam::I8Vec3::min_element(_self.into_inner()).into(); + output + } + fn mul(_self: Val<::glam::I8Vec3>, rhs: Ref<::glam::I8Vec3>) -> Val<::glam::I8Vec3> { + let output: Val<::glam::I8Vec3> = <::glam::I8Vec3 as ::core::ops::Mul< + &::glam::I8Vec3, + >>::mul(_self.into_inner(), &rhs) + .into(); + output + } + fn mul(_self: Val<::glam::I8Vec3>, rhs: Val<::glam::I8Vec3>) -> Val<::glam::I8Vec3> { + let output: Val<::glam::I8Vec3> = <::glam::I8Vec3 as ::core::ops::Mul< + ::glam::I8Vec3, + >>::mul(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + fn mul(_self: Val<::glam::I8Vec3>, rhs: i8) -> Val<::glam::I8Vec3> { + let output: Val<::glam::I8Vec3> = <::glam::I8Vec3 as ::core::ops::Mul< + i8, + >>::mul(_self.into_inner(), rhs) + .into(); + output + } + fn neg(_self: Val<::glam::I8Vec3>) -> Val<::glam::I8Vec3> { + let output: Val<::glam::I8Vec3> = <::glam::I8Vec3 as ::core::ops::Neg>::neg( + _self.into_inner(), + ) + .into(); + output + } + /// Creates a new vector. + fn new(x: i8, y: i8, z: i8) -> Val<::glam::I8Vec3> { + let output: Val<::glam::I8Vec3> = ::glam::I8Vec3::new(x, y, z).into(); + output + } + fn rem(_self: Val<::glam::I8Vec3>, rhs: Ref<::glam::I8Vec3>) -> Val<::glam::I8Vec3> { + let output: Val<::glam::I8Vec3> = <::glam::I8Vec3 as ::core::ops::Rem< + &::glam::I8Vec3, + >>::rem(_self.into_inner(), &rhs) + .into(); + output + } + fn rem(_self: Val<::glam::I8Vec3>, rhs: Val<::glam::I8Vec3>) -> Val<::glam::I8Vec3> { + let output: Val<::glam::I8Vec3> = <::glam::I8Vec3 as ::core::ops::Rem< + ::glam::I8Vec3, + >>::rem(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + fn rem(_self: Val<::glam::I8Vec3>, rhs: i8) -> Val<::glam::I8Vec3> { + let output: Val<::glam::I8Vec3> = <::glam::I8Vec3 as ::core::ops::Rem< + i8, + >>::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]: i8::rem_euclid + fn rem_euclid( + _self: Val<::glam::I8Vec3>, + rhs: Val<::glam::I8Vec3>, + ) -> Val<::glam::I8Vec3> { + let output: Val<::glam::I8Vec3> = ::glam::I8Vec3::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<::glam::I8Vec3>, + rhs: Val<::glam::I8Vec3>, + ) -> Val<::glam::I8Vec3> { + let output: Val<::glam::I8Vec3> = ::glam::I8Vec3::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<::glam::I8Vec3>, + rhs: Val<::glam::U8Vec3>, + ) -> Val<::glam::I8Vec3> { + let output: Val<::glam::I8Vec3> = ::glam::I8Vec3::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<::glam::I8Vec3>, + rhs: Val<::glam::I8Vec3>, + ) -> Val<::glam::I8Vec3> { + let output: Val<::glam::I8Vec3> = ::glam::I8Vec3::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<::glam::I8Vec3>, + rhs: Val<::glam::I8Vec3>, + ) -> Val<::glam::I8Vec3> { + let output: Val<::glam::I8Vec3> = ::glam::I8Vec3::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<::glam::I8Vec3>, + rhs: Val<::glam::I8Vec3>, + ) -> Val<::glam::I8Vec3> { + let output: Val<::glam::I8Vec3> = ::glam::I8Vec3::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<::glam::I8Vec3>, + rhs: Val<::glam::U8Vec3>, + ) -> Val<::glam::I8Vec3> { + let output: Val<::glam::I8Vec3> = ::glam::I8Vec3::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<::glam::BVec3>, + if_true: Val<::glam::I8Vec3>, + if_false: Val<::glam::I8Vec3>, + ) -> Val<::glam::I8Vec3> { + let output: Val<::glam::I8Vec3> = ::glam::I8Vec3::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<::glam::I8Vec3>) -> Val<::glam::I8Vec3> { + let output: Val<::glam::I8Vec3> = ::glam::I8Vec3::signum(_self.into_inner()) + .into(); + output + } + /// Creates a vector with all elements set to `v`. + fn splat(v: i8) -> Val<::glam::I8Vec3> { + let output: Val<::glam::I8Vec3> = ::glam::I8Vec3::splat(v).into(); + output + } + fn sub(_self: Val<::glam::I8Vec3>, rhs: Ref<::glam::I8Vec3>) -> Val<::glam::I8Vec3> { + let output: Val<::glam::I8Vec3> = <::glam::I8Vec3 as ::core::ops::Sub< + &::glam::I8Vec3, + >>::sub(_self.into_inner(), &rhs) + .into(); + output + } + fn sub(_self: Val<::glam::I8Vec3>, rhs: Val<::glam::I8Vec3>) -> Val<::glam::I8Vec3> { + let output: Val<::glam::I8Vec3> = <::glam::I8Vec3 as ::core::ops::Sub< + ::glam::I8Vec3, + >>::sub(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + fn sub(_self: Val<::glam::I8Vec3>, rhs: i8) -> Val<::glam::I8Vec3> { + let output: Val<::glam::I8Vec3> = <::glam::I8Vec3 as ::core::ops::Sub< + i8, + >>::sub(_self.into_inner(), rhs) + .into(); + output + } + /// `[x, y, z]` + fn to_array(_self: Ref<::glam::I8Vec3>) -> [i8; 3] { + let output: [i8; 3] = ::glam::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<::glam::I8Vec3>) -> Val<::glam::I8Vec2> { + let output: Val<::glam::I8Vec2> = ::glam::I8Vec3::truncate(_self.into_inner()) + .into(); + output + } + /// Creates a 3D vector from `self` with the given value of `x`. + fn with_x(_self: Val<::glam::I8Vec3>, x: i8) -> Val<::glam::I8Vec3> { + let output: Val<::glam::I8Vec3> = ::glam::I8Vec3::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<::glam::I8Vec3>, y: i8) -> Val<::glam::I8Vec3> { + let output: Val<::glam::I8Vec3> = ::glam::I8Vec3::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<::glam::I8Vec3>, z: i8) -> Val<::glam::I8Vec3> { + let output: Val<::glam::I8Vec3> = ::glam::I8Vec3::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<::glam::I8Vec3>, + rhs: Val<::glam::I8Vec3>, + ) -> Val<::glam::I8Vec3> { + let output: Val<::glam::I8Vec3> = ::glam::I8Vec3::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<::glam::I8Vec3>, + rhs: Val<::glam::U8Vec3>, + ) -> Val<::glam::I8Vec3> { + let output: Val<::glam::I8Vec3> = ::glam::I8Vec3::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<::glam::I8Vec3>, + rhs: Val<::glam::I8Vec3>, + ) -> Val<::glam::I8Vec3> { + let output: Val<::glam::I8Vec3> = ::glam::I8Vec3::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<::glam::I8Vec3>, + rhs: Val<::glam::I8Vec3>, + ) -> Val<::glam::I8Vec3> { + let output: Val<::glam::I8Vec3> = ::glam::I8Vec3::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<::glam::I8Vec3>, + rhs: Val<::glam::I8Vec3>, + ) -> Val<::glam::I8Vec3> { + let output: Val<::glam::I8Vec3> = ::glam::I8Vec3::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<::glam::I8Vec3>, + rhs: Val<::glam::U8Vec3>, + ) -> Val<::glam::I8Vec3> { + let output: Val<::glam::I8Vec3> = ::glam::I8Vec3::wrapping_sub_unsigned( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } +} +#[script_bindings( + remote, + name = "i_8_vec_4_functions", + bms_core_path = "bevy_mod_scripting_core", + generated +)] +impl ::glam::I8Vec4 { + /// Returns a vector containing the absolute value of each element of `self`. + fn abs(_self: Val<::glam::I8Vec4>) -> Val<::glam::I8Vec4> { + let output: Val<::glam::I8Vec4> = ::glam::I8Vec4::abs(_self.into_inner()).into(); + output + } + fn add(_self: Val<::glam::I8Vec4>, rhs: Ref<::glam::I8Vec4>) -> Val<::glam::I8Vec4> { + let output: Val<::glam::I8Vec4> = <::glam::I8Vec4 as ::core::ops::Add< + &::glam::I8Vec4, + >>::add(_self.into_inner(), &rhs) + .into(); + output + } + fn add(_self: Val<::glam::I8Vec4>, rhs: Val<::glam::I8Vec4>) -> Val<::glam::I8Vec4> { + let output: Val<::glam::I8Vec4> = <::glam::I8Vec4 as ::core::ops::Add< + ::glam::I8Vec4, + >>::add(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + fn add(_self: Val<::glam::I8Vec4>, rhs: i8) -> Val<::glam::I8Vec4> { + let output: Val<::glam::I8Vec4> = <::glam::I8Vec4 as ::core::ops::Add< + i8, + >>::add(_self.into_inner(), rhs) + .into(); + output + } + /// Casts all elements of `self` to `f64`. + fn as_dvec4(_self: Ref<::glam::I8Vec4>) -> Val<::glam::DVec4> { + let output: Val<::glam::DVec4> = ::glam::I8Vec4::as_dvec4(&_self).into(); + output + } + /// Casts all elements of `self` to `i16`. + fn as_i16vec4(_self: Ref<::glam::I8Vec4>) -> Val<::glam::I16Vec4> { + let output: Val<::glam::I16Vec4> = ::glam::I8Vec4::as_i16vec4(&_self).into(); + output + } + /// Casts all elements of `self` to `i64`. + fn as_i64vec4(_self: Ref<::glam::I8Vec4>) -> Val<::glam::I64Vec4> { + let output: Val<::glam::I64Vec4> = ::glam::I8Vec4::as_i64vec4(&_self).into(); + output + } + /// Casts all elements of `self` to `i32`. + fn as_ivec4(_self: Ref<::glam::I8Vec4>) -> Val<::glam::IVec4> { + let output: Val<::glam::IVec4> = ::glam::I8Vec4::as_ivec4(&_self).into(); + output + } + /// Casts all elements of `self` to `u16`. + fn as_u16vec4(_self: Ref<::glam::I8Vec4>) -> Val<::glam::U16Vec4> { + let output: Val<::glam::U16Vec4> = ::glam::I8Vec4::as_u16vec4(&_self).into(); + output + } + /// Casts all elements of `self` to `u64`. + fn as_u64vec4(_self: Ref<::glam::I8Vec4>) -> Val<::glam::U64Vec4> { + let output: Val<::glam::U64Vec4> = ::glam::I8Vec4::as_u64vec4(&_self).into(); + output + } + /// Casts all elements of `self` to `u8`. + fn as_u8vec4(_self: Ref<::glam::I8Vec4>) -> Val<::glam::U8Vec4> { + let output: Val<::glam::U8Vec4> = ::glam::I8Vec4::as_u8vec4(&_self).into(); + output + } + /// Casts all elements of `self` to `u32`. + fn as_uvec4(_self: Ref<::glam::I8Vec4>) -> Val<::glam::UVec4> { + let output: Val<::glam::UVec4> = ::glam::I8Vec4::as_uvec4(&_self).into(); + output + } + /// Casts all elements of `self` to `f32`. + fn as_vec4(_self: Ref<::glam::I8Vec4>) -> Val<::glam::Vec4> { + let output: Val<::glam::Vec4> = ::glam::I8Vec4::as_vec4(&_self).into(); + output + } + fn assert_receiver_is_total_eq(_self: Ref<::glam::I8Vec4>) -> () { + let output: () = <::glam::I8Vec4 as ::core::cmp::Eq>::assert_receiver_is_total_eq( + &_self, + ) + .into(); + output + } + /// 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<::glam::I8Vec4>, + min: Val<::glam::I8Vec4>, + max: Val<::glam::I8Vec4>, + ) -> Val<::glam::I8Vec4> { + let output: Val<::glam::I8Vec4> = ::glam::I8Vec4::clamp( + _self.into_inner(), + min.into_inner(), + max.into_inner(), + ) + .into(); + output + } + fn clone(_self: Ref<::glam::I8Vec4>) -> Val<::glam::I8Vec4> { + let output: Val<::glam::I8Vec4> = <::glam::I8Vec4 as ::bevy_reflect::erased_serde::__private::serde::__private::Clone>::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<::glam::I8Vec4>, + rhs: Val<::glam::I8Vec4>, + ) -> Val<::glam::BVec4> { + let output: Val<::glam::BVec4> = ::glam::I8Vec4::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<::glam::I8Vec4>, + rhs: Val<::glam::I8Vec4>, + ) -> Val<::glam::BVec4> { + let output: Val<::glam::BVec4> = ::glam::I8Vec4::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<::glam::I8Vec4>, + rhs: Val<::glam::I8Vec4>, + ) -> Val<::glam::BVec4> { + let output: Val<::glam::BVec4> = ::glam::I8Vec4::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<::glam::I8Vec4>, + rhs: Val<::glam::I8Vec4>, + ) -> Val<::glam::BVec4> { + let output: Val<::glam::BVec4> = ::glam::I8Vec4::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<::glam::I8Vec4>, + rhs: Val<::glam::I8Vec4>, + ) -> Val<::glam::BVec4> { + let output: Val<::glam::BVec4> = ::glam::I8Vec4::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<::glam::I8Vec4>, + rhs: Val<::glam::I8Vec4>, + ) -> Val<::glam::BVec4> { + let output: Val<::glam::BVec4> = ::glam::I8Vec4::cmpne( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Compute the squared euclidean distance between two points in space. + fn distance_squared(_self: Val<::glam::I8Vec4>, rhs: Val<::glam::I8Vec4>) -> i8 { + let output: i8 = ::glam::I8Vec4::distance_squared( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + fn div(_self: Val<::glam::I8Vec4>, rhs: Ref<::glam::I8Vec4>) -> Val<::glam::I8Vec4> { + let output: Val<::glam::I8Vec4> = <::glam::I8Vec4 as ::core::ops::Div< + &::glam::I8Vec4, + >>::div(_self.into_inner(), &rhs) + .into(); + output + } + fn div(_self: Val<::glam::I8Vec4>, rhs: Val<::glam::I8Vec4>) -> Val<::glam::I8Vec4> { + let output: Val<::glam::I8Vec4> = <::glam::I8Vec4 as ::core::ops::Div< + ::glam::I8Vec4, + >>::div(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + fn div(_self: Val<::glam::I8Vec4>, rhs: i8) -> Val<::glam::I8Vec4> { + let output: Val<::glam::I8Vec4> = <::glam::I8Vec4 as ::core::ops::Div< + i8, + >>::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<::glam::I8Vec4>, + rhs: Val<::glam::I8Vec4>, + ) -> Val<::glam::I8Vec4> { + let output: Val<::glam::I8Vec4> = ::glam::I8Vec4::div_euclid( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Computes the dot product of `self` and `rhs`. + fn dot(_self: Val<::glam::I8Vec4>, rhs: Val<::glam::I8Vec4>) -> i8 { + let output: i8 = ::glam::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<::glam::I8Vec4>, + rhs: Val<::glam::I8Vec4>, + ) -> Val<::glam::I8Vec4> { + let output: Val<::glam::I8Vec4> = ::glam::I8Vec4::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<::glam::I8Vec4>) -> i8 { + let output: i8 = ::glam::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<::glam::I8Vec4>) -> i8 { + let output: i8 = ::glam::I8Vec4::element_sum(_self.into_inner()).into(); + output + } + fn eq(_self: Ref<::glam::I8Vec4>, other: Ref<::glam::I8Vec4>) -> bool { + let output: bool = <::glam::I8Vec4 as ::core::cmp::PartialEq< + ::glam::I8Vec4, + >>::eq(&_self, &other) + .into(); + output + } + /// Creates a new vector from an array. + fn from_array(a: [i8; 4]) -> Val<::glam::I8Vec4> { + let output: Val<::glam::I8Vec4> = ::glam::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<::glam::I8Vec4>) -> u32 { + let output: u32 = ::glam::I8Vec4::is_negative_bitmask(_self.into_inner()).into(); + output + } + /// Computes the squared length of `self`. + fn length_squared(_self: Val<::glam::I8Vec4>) -> i8 { + let output: i8 = ::glam::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<::glam::I8Vec4>, rhs: Val<::glam::I8Vec4>) -> Val<::glam::I8Vec4> { + let output: Val<::glam::I8Vec4> = ::glam::I8Vec4::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<::glam::I8Vec4>) -> i8 { + let output: i8 = ::glam::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<::glam::I8Vec4>, rhs: Val<::glam::I8Vec4>) -> Val<::glam::I8Vec4> { + let output: Val<::glam::I8Vec4> = ::glam::I8Vec4::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<::glam::I8Vec4>) -> i8 { + let output: i8 = ::glam::I8Vec4::min_element(_self.into_inner()).into(); + output + } + fn mul(_self: Val<::glam::I8Vec4>, rhs: Ref<::glam::I8Vec4>) -> Val<::glam::I8Vec4> { + let output: Val<::glam::I8Vec4> = <::glam::I8Vec4 as ::core::ops::Mul< + &::glam::I8Vec4, + >>::mul(_self.into_inner(), &rhs) + .into(); + output + } + fn mul(_self: Val<::glam::I8Vec4>, rhs: Val<::glam::I8Vec4>) -> Val<::glam::I8Vec4> { + let output: Val<::glam::I8Vec4> = <::glam::I8Vec4 as ::core::ops::Mul< + ::glam::I8Vec4, + >>::mul(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + fn mul(_self: Val<::glam::I8Vec4>, rhs: i8) -> Val<::glam::I8Vec4> { + let output: Val<::glam::I8Vec4> = <::glam::I8Vec4 as ::core::ops::Mul< + i8, + >>::mul(_self.into_inner(), rhs) + .into(); + output + } + fn neg(_self: Val<::glam::I8Vec4>) -> Val<::glam::I8Vec4> { + let output: Val<::glam::I8Vec4> = <::glam::I8Vec4 as ::core::ops::Neg>::neg( + _self.into_inner(), + ) + .into(); + output + } + /// Creates a new vector. + fn new(x: i8, y: i8, z: i8, w: i8) -> Val<::glam::I8Vec4> { + let output: Val<::glam::I8Vec4> = ::glam::I8Vec4::new(x, y, z, w).into(); + output + } + fn rem(_self: Val<::glam::I8Vec4>, rhs: Ref<::glam::I8Vec4>) -> Val<::glam::I8Vec4> { + let output: Val<::glam::I8Vec4> = <::glam::I8Vec4 as ::core::ops::Rem< + &::glam::I8Vec4, + >>::rem(_self.into_inner(), &rhs) + .into(); + output + } + fn rem(_self: Val<::glam::I8Vec4>, rhs: Val<::glam::I8Vec4>) -> Val<::glam::I8Vec4> { + let output: Val<::glam::I8Vec4> = <::glam::I8Vec4 as ::core::ops::Rem< + ::glam::I8Vec4, + >>::rem(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + fn rem(_self: Val<::glam::I8Vec4>, rhs: i8) -> Val<::glam::I8Vec4> { + let output: Val<::glam::I8Vec4> = <::glam::I8Vec4 as ::core::ops::Rem< + i8, + >>::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]: i8::rem_euclid + fn rem_euclid( + _self: Val<::glam::I8Vec4>, + rhs: Val<::glam::I8Vec4>, + ) -> Val<::glam::I8Vec4> { + let output: Val<::glam::I8Vec4> = ::glam::I8Vec4::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<::glam::I8Vec4>, + rhs: Val<::glam::I8Vec4>, + ) -> Val<::glam::I8Vec4> { + let output: Val<::glam::I8Vec4> = ::glam::I8Vec4::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<::glam::I8Vec4>, + rhs: Val<::glam::U8Vec4>, + ) -> Val<::glam::I8Vec4> { + let output: Val<::glam::I8Vec4> = ::glam::I8Vec4::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<::glam::I8Vec4>, + rhs: Val<::glam::I8Vec4>, + ) -> Val<::glam::I8Vec4> { + let output: Val<::glam::I8Vec4> = ::glam::I8Vec4::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<::glam::I8Vec4>, + rhs: Val<::glam::I8Vec4>, + ) -> Val<::glam::I8Vec4> { + let output: Val<::glam::I8Vec4> = ::glam::I8Vec4::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<::glam::I8Vec4>, + rhs: Val<::glam::I8Vec4>, + ) -> Val<::glam::I8Vec4> { + let output: Val<::glam::I8Vec4> = ::glam::I8Vec4::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<::glam::I8Vec4>, + rhs: Val<::glam::U8Vec4>, + ) -> Val<::glam::I8Vec4> { + let output: Val<::glam::I8Vec4> = ::glam::I8Vec4::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<::glam::BVec4>, + if_true: Val<::glam::I8Vec4>, + if_false: Val<::glam::I8Vec4>, + ) -> Val<::glam::I8Vec4> { + let output: Val<::glam::I8Vec4> = ::glam::I8Vec4::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<::glam::I8Vec4>) -> Val<::glam::I8Vec4> { + let output: Val<::glam::I8Vec4> = ::glam::I8Vec4::signum(_self.into_inner()) + .into(); + output + } + /// Creates a vector with all elements set to `v`. + fn splat(v: i8) -> Val<::glam::I8Vec4> { + let output: Val<::glam::I8Vec4> = ::glam::I8Vec4::splat(v).into(); + output + } + fn sub(_self: Val<::glam::I8Vec4>, rhs: Ref<::glam::I8Vec4>) -> Val<::glam::I8Vec4> { + let output: Val<::glam::I8Vec4> = <::glam::I8Vec4 as ::core::ops::Sub< + &::glam::I8Vec4, + >>::sub(_self.into_inner(), &rhs) + .into(); + output + } + fn sub(_self: Val<::glam::I8Vec4>, rhs: Val<::glam::I8Vec4>) -> Val<::glam::I8Vec4> { + let output: Val<::glam::I8Vec4> = <::glam::I8Vec4 as ::core::ops::Sub< + ::glam::I8Vec4, + >>::sub(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + fn sub(_self: Val<::glam::I8Vec4>, rhs: i8) -> Val<::glam::I8Vec4> { + let output: Val<::glam::I8Vec4> = <::glam::I8Vec4 as ::core::ops::Sub< + i8, + >>::sub(_self.into_inner(), rhs) + .into(); + output + } + /// `[x, y, z, w]` + fn to_array(_self: Ref<::glam::I8Vec4>) -> [i8; 4] { + let output: [i8; 4] = ::glam::I8Vec4::to_array(&_self).into(); + output + } + /// Creates a 3D vector from the `x`, `y` and `z` elements of `self`, discarding `w`. + /// Truncation to [`I8Vec3`] may also be performed by using [`self.xyz()`][crate::swizzles::Vec4Swizzles::xyz()]. + fn truncate(_self: Val<::glam::I8Vec4>) -> Val<::glam::I8Vec3> { + let output: Val<::glam::I8Vec3> = ::glam::I8Vec4::truncate(_self.into_inner()) + .into(); + output + } + /// Creates a 4D vector from `self` with the given value of `w`. + fn with_w(_self: Val<::glam::I8Vec4>, w: i8) -> Val<::glam::I8Vec4> { + let output: Val<::glam::I8Vec4> = ::glam::I8Vec4::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<::glam::I8Vec4>, x: i8) -> Val<::glam::I8Vec4> { + let output: Val<::glam::I8Vec4> = ::glam::I8Vec4::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<::glam::I8Vec4>, y: i8) -> Val<::glam::I8Vec4> { + let output: Val<::glam::I8Vec4> = ::glam::I8Vec4::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<::glam::I8Vec4>, z: i8) -> Val<::glam::I8Vec4> { + let output: Val<::glam::I8Vec4> = ::glam::I8Vec4::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<::glam::I8Vec4>, + rhs: Val<::glam::I8Vec4>, + ) -> Val<::glam::I8Vec4> { + let output: Val<::glam::I8Vec4> = ::glam::I8Vec4::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<::glam::I8Vec4>, + rhs: Val<::glam::U8Vec4>, + ) -> Val<::glam::I8Vec4> { + let output: Val<::glam::I8Vec4> = ::glam::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<::glam::I8Vec4>, + rhs: Val<::glam::I8Vec4>, + ) -> Val<::glam::I8Vec4> { + let output: Val<::glam::I8Vec4> = ::glam::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<::glam::I8Vec4>, + rhs: Val<::glam::I8Vec4>, + ) -> Val<::glam::I8Vec4> { + let output: Val<::glam::I8Vec4> = ::glam::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<::glam::I8Vec4>, + rhs: Val<::glam::I8Vec4>, + ) -> Val<::glam::I8Vec4> { + let output: Val<::glam::I8Vec4> = ::glam::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<::glam::I8Vec4>, + rhs: Val<::glam::U8Vec4>, + ) -> Val<::glam::I8Vec4> { + let output: Val<::glam::I8Vec4> = ::glam::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 ::glam::I16Vec2 { + /// Returns a vector containing the absolute value of each element of `self`. + fn abs(_self: Val<::glam::I16Vec2>) -> Val<::glam::I16Vec2> { + let output: Val<::glam::I16Vec2> = ::glam::I16Vec2::abs(_self.into_inner()) + .into(); + output + } + fn add( + _self: Val<::glam::I16Vec2>, + rhs: Ref<::glam::I16Vec2>, + ) -> Val<::glam::I16Vec2> { + let output: Val<::glam::I16Vec2> = <::glam::I16Vec2 as ::core::ops::Add< + &::glam::I16Vec2, + >>::add(_self.into_inner(), &rhs) + .into(); + output + } + fn add( + _self: Val<::glam::I16Vec2>, + rhs: Val<::glam::I16Vec2>, + ) -> Val<::glam::I16Vec2> { + let output: Val<::glam::I16Vec2> = <::glam::I16Vec2 as ::core::ops::Add< + ::glam::I16Vec2, + >>::add(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + fn add(_self: Val<::glam::I16Vec2>, rhs: i16) -> Val<::glam::I16Vec2> { + let output: Val<::glam::I16Vec2> = <::glam::I16Vec2 as ::core::ops::Add< + i16, + >>::add(_self.into_inner(), rhs) + .into(); + output + } + /// Casts all elements of `self` to `f64`. + fn as_dvec2(_self: Ref<::glam::I16Vec2>) -> Val<::glam::DVec2> { + let output: Val<::glam::DVec2> = ::glam::I16Vec2::as_dvec2(&_self).into(); + output + } + /// Casts all elements of `self` to `i64`. + fn as_i64vec2(_self: Ref<::glam::I16Vec2>) -> Val<::glam::I64Vec2> { + let output: Val<::glam::I64Vec2> = ::glam::I16Vec2::as_i64vec2(&_self).into(); + output + } + /// Casts all elements of `self` to `i8`. + fn as_i8vec2(_self: Ref<::glam::I16Vec2>) -> Val<::glam::I8Vec2> { + let output: Val<::glam::I8Vec2> = ::glam::I16Vec2::as_i8vec2(&_self).into(); + output + } + /// Casts all elements of `self` to `i32`. + fn as_ivec2(_self: Ref<::glam::I16Vec2>) -> Val<::glam::IVec2> { + let output: Val<::glam::IVec2> = ::glam::I16Vec2::as_ivec2(&_self).into(); + output + } + /// Casts all elements of `self` to `u16`. + fn as_u16vec2(_self: Ref<::glam::I16Vec2>) -> Val<::glam::U16Vec2> { + let output: Val<::glam::U16Vec2> = ::glam::I16Vec2::as_u16vec2(&_self).into(); + output + } + /// Casts all elements of `self` to `u64`. + fn as_u64vec2(_self: Ref<::glam::I16Vec2>) -> Val<::glam::U64Vec2> { + let output: Val<::glam::U64Vec2> = ::glam::I16Vec2::as_u64vec2(&_self).into(); + output + } + /// Casts all elements of `self` to `u8`. + fn as_u8vec2(_self: Ref<::glam::I16Vec2>) -> Val<::glam::U8Vec2> { + let output: Val<::glam::U8Vec2> = ::glam::I16Vec2::as_u8vec2(&_self).into(); + output + } + /// Casts all elements of `self` to `u32`. + fn as_uvec2(_self: Ref<::glam::I16Vec2>) -> Val<::glam::UVec2> { + let output: Val<::glam::UVec2> = ::glam::I16Vec2::as_uvec2(&_self).into(); + output + } + /// Casts all elements of `self` to `f32`. + fn as_vec2(_self: Ref<::glam::I16Vec2>) -> Val<::glam::Vec2> { + let output: Val<::glam::Vec2> = ::glam::I16Vec2::as_vec2(&_self).into(); + output + } + fn assert_receiver_is_total_eq(_self: Ref<::glam::I16Vec2>) -> () { + let output: () = <::glam::I16Vec2 as ::core::cmp::Eq>::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<::glam::I16Vec2>, + min: Val<::glam::I16Vec2>, + max: Val<::glam::I16Vec2>, + ) -> Val<::glam::I16Vec2> { + let output: Val<::glam::I16Vec2> = ::glam::I16Vec2::clamp( + _self.into_inner(), + min.into_inner(), + max.into_inner(), + ) + .into(); + output + } + fn clone(_self: Ref<::glam::I16Vec2>) -> Val<::glam::I16Vec2> { + let output: Val<::glam::I16Vec2> = <::glam::I16Vec2 as ::bevy_reflect::erased_serde::__private::serde::__private::Clone>::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<::glam::I16Vec2>, + rhs: Val<::glam::I16Vec2>, + ) -> Val<::glam::BVec2> { + let output: Val<::glam::BVec2> = ::glam::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<::glam::I16Vec2>, + rhs: Val<::glam::I16Vec2>, + ) -> Val<::glam::BVec2> { + let output: Val<::glam::BVec2> = ::glam::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<::glam::I16Vec2>, + rhs: Val<::glam::I16Vec2>, + ) -> Val<::glam::BVec2> { + let output: Val<::glam::BVec2> = ::glam::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<::glam::I16Vec2>, + rhs: Val<::glam::I16Vec2>, + ) -> Val<::glam::BVec2> { + let output: Val<::glam::BVec2> = ::glam::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<::glam::I16Vec2>, + rhs: Val<::glam::I16Vec2>, + ) -> Val<::glam::BVec2> { + let output: Val<::glam::BVec2> = ::glam::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<::glam::I16Vec2>, + rhs: Val<::glam::I16Vec2>, + ) -> Val<::glam::BVec2> { + let output: Val<::glam::BVec2> = ::glam::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<::glam::I16Vec2>, rhs: Val<::glam::I16Vec2>) -> i16 { + let output: i16 = ::glam::I16Vec2::distance_squared( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + fn div( + _self: Val<::glam::I16Vec2>, + rhs: Ref<::glam::I16Vec2>, + ) -> Val<::glam::I16Vec2> { + let output: Val<::glam::I16Vec2> = <::glam::I16Vec2 as ::core::ops::Div< + &::glam::I16Vec2, + >>::div(_self.into_inner(), &rhs) + .into(); + output + } + fn div( + _self: Val<::glam::I16Vec2>, + rhs: Val<::glam::I16Vec2>, + ) -> Val<::glam::I16Vec2> { + let output: Val<::glam::I16Vec2> = <::glam::I16Vec2 as ::core::ops::Div< + ::glam::I16Vec2, + >>::div(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + fn div(_self: Val<::glam::I16Vec2>, rhs: i16) -> Val<::glam::I16Vec2> { + let output: Val<::glam::I16Vec2> = <::glam::I16Vec2 as ::core::ops::Div< + i16, + >>::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<::glam::I16Vec2>, + rhs: Val<::glam::I16Vec2>, + ) -> Val<::glam::I16Vec2> { + let output: Val<::glam::I16Vec2> = ::glam::I16Vec2::div_euclid( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Computes the dot product of `self` and `rhs`. + fn dot(_self: Val<::glam::I16Vec2>, rhs: Val<::glam::I16Vec2>) -> i16 { + let output: i16 = ::glam::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<::glam::I16Vec2>, + rhs: Val<::glam::I16Vec2>, + ) -> Val<::glam::I16Vec2> { + let output: Val<::glam::I16Vec2> = ::glam::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<::glam::I16Vec2>) -> i16 { + let output: i16 = ::glam::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<::glam::I16Vec2>) -> i16 { + let output: i16 = ::glam::I16Vec2::element_sum(_self.into_inner()).into(); + output + } + fn eq(_self: Ref<::glam::I16Vec2>, other: Ref<::glam::I16Vec2>) -> bool { + let output: bool = <::glam::I16Vec2 as ::core::cmp::PartialEq< + ::glam::I16Vec2, + >>::eq(&_self, &other) + .into(); + output + } + /// Creates a 3D vector from `self` and the given `z` value. + fn extend(_self: Val<::glam::I16Vec2>, z: i16) -> Val<::glam::I16Vec3> { + let output: Val<::glam::I16Vec3> = ::glam::I16Vec2::extend(_self.into_inner(), z) + .into(); + output + } + /// Creates a new vector from an array. + fn from_array(a: [i16; 2]) -> Val<::glam::I16Vec2> { + let output: Val<::glam::I16Vec2> = ::glam::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<::glam::I16Vec2>) -> u32 { + let output: u32 = ::glam::I16Vec2::is_negative_bitmask(_self.into_inner()) + .into(); + output + } + /// Computes the squared length of `self`. + fn length_squared(_self: Val<::glam::I16Vec2>) -> i16 { + let output: i16 = ::glam::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<::glam::I16Vec2>, + rhs: Val<::glam::I16Vec2>, + ) -> Val<::glam::I16Vec2> { + let output: Val<::glam::I16Vec2> = ::glam::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<::glam::I16Vec2>) -> i16 { + let output: i16 = ::glam::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<::glam::I16Vec2>, + rhs: Val<::glam::I16Vec2>, + ) -> Val<::glam::I16Vec2> { + let output: Val<::glam::I16Vec2> = ::glam::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<::glam::I16Vec2>) -> i16 { + let output: i16 = ::glam::I16Vec2::min_element(_self.into_inner()).into(); + output + } + fn mul( + _self: Val<::glam::I16Vec2>, + rhs: Ref<::glam::I16Vec2>, + ) -> Val<::glam::I16Vec2> { + let output: Val<::glam::I16Vec2> = <::glam::I16Vec2 as ::core::ops::Mul< + &::glam::I16Vec2, + >>::mul(_self.into_inner(), &rhs) + .into(); + output + } + fn mul( + _self: Val<::glam::I16Vec2>, + rhs: Val<::glam::I16Vec2>, + ) -> Val<::glam::I16Vec2> { + let output: Val<::glam::I16Vec2> = <::glam::I16Vec2 as ::core::ops::Mul< + ::glam::I16Vec2, + >>::mul(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + fn mul(_self: Val<::glam::I16Vec2>, rhs: i16) -> Val<::glam::I16Vec2> { + let output: Val<::glam::I16Vec2> = <::glam::I16Vec2 as ::core::ops::Mul< + i16, + >>::mul(_self.into_inner(), rhs) + .into(); + output + } + fn neg(_self: Val<::glam::I16Vec2>) -> Val<::glam::I16Vec2> { + let output: Val<::glam::I16Vec2> = <::glam::I16Vec2 as ::core::ops::Neg>::neg( + _self.into_inner(), + ) + .into(); + output + } + /// Creates a new vector. + fn new(x: i16, y: i16) -> Val<::glam::I16Vec2> { + let output: Val<::glam::I16Vec2> = ::glam::I16Vec2::new(x, y).into(); + output + } + /// Returns a vector that is equal to `self` rotated by 90 degrees. + fn perp(_self: Val<::glam::I16Vec2>) -> Val<::glam::I16Vec2> { + let output: Val<::glam::I16Vec2> = ::glam::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<::glam::I16Vec2>, rhs: Val<::glam::I16Vec2>) -> i16 { + let output: i16 = ::glam::I16Vec2::perp_dot(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + fn rem( + _self: Val<::glam::I16Vec2>, + rhs: Ref<::glam::I16Vec2>, + ) -> Val<::glam::I16Vec2> { + let output: Val<::glam::I16Vec2> = <::glam::I16Vec2 as ::core::ops::Rem< + &::glam::I16Vec2, + >>::rem(_self.into_inner(), &rhs) + .into(); + output + } + fn rem( + _self: Val<::glam::I16Vec2>, + rhs: Val<::glam::I16Vec2>, + ) -> Val<::glam::I16Vec2> { + let output: Val<::glam::I16Vec2> = <::glam::I16Vec2 as ::core::ops::Rem< + ::glam::I16Vec2, + >>::rem(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + fn rem(_self: Val<::glam::I16Vec2>, rhs: i16) -> Val<::glam::I16Vec2> { + let output: Val<::glam::I16Vec2> = <::glam::I16Vec2 as ::core::ops::Rem< + i16, + >>::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<::glam::I16Vec2>, + rhs: Val<::glam::I16Vec2>, + ) -> Val<::glam::I16Vec2> { + let output: Val<::glam::I16Vec2> = ::glam::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<::glam::I16Vec2>, + rhs: Val<::glam::I16Vec2>, + ) -> Val<::glam::I16Vec2> { + let output: Val<::glam::I16Vec2> = ::glam::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<::glam::I16Vec2>, + rhs: Val<::glam::I16Vec2>, + ) -> Val<::glam::I16Vec2> { + let output: Val<::glam::I16Vec2> = ::glam::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<::glam::I16Vec2>, + rhs: Val<::glam::U16Vec2>, + ) -> Val<::glam::I16Vec2> { + let output: Val<::glam::I16Vec2> = ::glam::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<::glam::I16Vec2>, + rhs: Val<::glam::I16Vec2>, + ) -> Val<::glam::I16Vec2> { + let output: Val<::glam::I16Vec2> = ::glam::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<::glam::I16Vec2>, + rhs: Val<::glam::I16Vec2>, + ) -> Val<::glam::I16Vec2> { + let output: Val<::glam::I16Vec2> = ::glam::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<::glam::I16Vec2>, + rhs: Val<::glam::I16Vec2>, + ) -> Val<::glam::I16Vec2> { + let output: Val<::glam::I16Vec2> = ::glam::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<::glam::I16Vec2>, + rhs: Val<::glam::U16Vec2>, + ) -> Val<::glam::I16Vec2> { + let output: Val<::glam::I16Vec2> = ::glam::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<::glam::BVec2>, + if_true: Val<::glam::I16Vec2>, + if_false: Val<::glam::I16Vec2>, + ) -> Val<::glam::I16Vec2> { + let output: Val<::glam::I16Vec2> = ::glam::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<::glam::I16Vec2>) -> Val<::glam::I16Vec2> { + let output: Val<::glam::I16Vec2> = ::glam::I16Vec2::signum(_self.into_inner()) + .into(); + output + } + /// Creates a vector with all elements set to `v`. + fn splat(v: i16) -> Val<::glam::I16Vec2> { + let output: Val<::glam::I16Vec2> = ::glam::I16Vec2::splat(v).into(); + output + } + fn sub( + _self: Val<::glam::I16Vec2>, + rhs: Ref<::glam::I16Vec2>, + ) -> Val<::glam::I16Vec2> { + let output: Val<::glam::I16Vec2> = <::glam::I16Vec2 as ::core::ops::Sub< + &::glam::I16Vec2, + >>::sub(_self.into_inner(), &rhs) + .into(); + output + } + fn sub( + _self: Val<::glam::I16Vec2>, + rhs: Val<::glam::I16Vec2>, + ) -> Val<::glam::I16Vec2> { + let output: Val<::glam::I16Vec2> = <::glam::I16Vec2 as ::core::ops::Sub< + ::glam::I16Vec2, + >>::sub(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + fn sub(_self: Val<::glam::I16Vec2>, rhs: i16) -> Val<::glam::I16Vec2> { + let output: Val<::glam::I16Vec2> = <::glam::I16Vec2 as ::core::ops::Sub< + i16, + >>::sub(_self.into_inner(), rhs) + .into(); + output + } + /// `[x, y]` + fn to_array(_self: Ref<::glam::I16Vec2>) -> [i16; 2] { + let output: [i16; 2] = ::glam::I16Vec2::to_array(&_self).into(); + output + } + /// Creates a 2D vector from `self` with the given value of `x`. + fn with_x(_self: Val<::glam::I16Vec2>, x: i16) -> Val<::glam::I16Vec2> { + let output: Val<::glam::I16Vec2> = ::glam::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<::glam::I16Vec2>, y: i16) -> Val<::glam::I16Vec2> { + let output: Val<::glam::I16Vec2> = ::glam::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<::glam::I16Vec2>, + rhs: Val<::glam::I16Vec2>, + ) -> Val<::glam::I16Vec2> { + let output: Val<::glam::I16Vec2> = ::glam::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<::glam::I16Vec2>, + rhs: Val<::glam::U16Vec2>, + ) -> Val<::glam::I16Vec2> { + let output: Val<::glam::I16Vec2> = ::glam::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<::glam::I16Vec2>, + rhs: Val<::glam::I16Vec2>, + ) -> Val<::glam::I16Vec2> { + let output: Val<::glam::I16Vec2> = ::glam::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<::glam::I16Vec2>, + rhs: Val<::glam::I16Vec2>, + ) -> Val<::glam::I16Vec2> { + let output: Val<::glam::I16Vec2> = ::glam::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<::glam::I16Vec2>, + rhs: Val<::glam::I16Vec2>, + ) -> Val<::glam::I16Vec2> { + let output: Val<::glam::I16Vec2> = ::glam::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<::glam::I16Vec2>, + rhs: Val<::glam::U16Vec2>, + ) -> Val<::glam::I16Vec2> { + let output: Val<::glam::I16Vec2> = ::glam::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 ::glam::I16Vec3 { + /// Returns a vector containing the absolute value of each element of `self`. + fn abs(_self: Val<::glam::I16Vec3>) -> Val<::glam::I16Vec3> { + let output: Val<::glam::I16Vec3> = ::glam::I16Vec3::abs(_self.into_inner()) + .into(); + output + } + fn add( + _self: Val<::glam::I16Vec3>, + rhs: Ref<::glam::I16Vec3>, + ) -> Val<::glam::I16Vec3> { + let output: Val<::glam::I16Vec3> = <::glam::I16Vec3 as ::core::ops::Add< + &::glam::I16Vec3, + >>::add(_self.into_inner(), &rhs) + .into(); + output + } + fn add( + _self: Val<::glam::I16Vec3>, + rhs: Val<::glam::I16Vec3>, + ) -> Val<::glam::I16Vec3> { + let output: Val<::glam::I16Vec3> = <::glam::I16Vec3 as ::core::ops::Add< + ::glam::I16Vec3, + >>::add(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + fn add(_self: Val<::glam::I16Vec3>, rhs: i16) -> Val<::glam::I16Vec3> { + let output: Val<::glam::I16Vec3> = <::glam::I16Vec3 as ::core::ops::Add< + i16, + >>::add(_self.into_inner(), rhs) + .into(); + output + } + /// Casts all elements of `self` to `f64`. + fn as_dvec3(_self: Ref<::glam::I16Vec3>) -> Val<::glam::DVec3> { + let output: Val<::glam::DVec3> = ::glam::I16Vec3::as_dvec3(&_self).into(); + output + } + /// Casts all elements of `self` to `i64`. + fn as_i64vec3(_self: Ref<::glam::I16Vec3>) -> Val<::glam::I64Vec3> { + let output: Val<::glam::I64Vec3> = ::glam::I16Vec3::as_i64vec3(&_self).into(); + output + } + /// Casts all elements of `self` to `i8`. + fn as_i8vec3(_self: Ref<::glam::I16Vec3>) -> Val<::glam::I8Vec3> { + let output: Val<::glam::I8Vec3> = ::glam::I16Vec3::as_i8vec3(&_self).into(); + output + } + /// Casts all elements of `self` to `i32`. + fn as_ivec3(_self: Ref<::glam::I16Vec3>) -> Val<::glam::IVec3> { + let output: Val<::glam::IVec3> = ::glam::I16Vec3::as_ivec3(&_self).into(); + output + } + /// Casts all elements of `self` to `u16`. + fn as_u16vec3(_self: Ref<::glam::I16Vec3>) -> Val<::glam::U16Vec3> { + let output: Val<::glam::U16Vec3> = ::glam::I16Vec3::as_u16vec3(&_self).into(); + output + } + /// Casts all elements of `self` to `u64`. + fn as_u64vec3(_self: Ref<::glam::I16Vec3>) -> Val<::glam::U64Vec3> { + let output: Val<::glam::U64Vec3> = ::glam::I16Vec3::as_u64vec3(&_self).into(); + output + } + /// Casts all elements of `self` to `u8`. + fn as_u8vec3(_self: Ref<::glam::I16Vec3>) -> Val<::glam::U8Vec3> { + let output: Val<::glam::U8Vec3> = ::glam::I16Vec3::as_u8vec3(&_self).into(); + output + } + /// Casts all elements of `self` to `u32`. + fn as_uvec3(_self: Ref<::glam::I16Vec3>) -> Val<::glam::UVec3> { + let output: Val<::glam::UVec3> = ::glam::I16Vec3::as_uvec3(&_self).into(); + output + } + /// Casts all elements of `self` to `f32`. + fn as_vec3(_self: Ref<::glam::I16Vec3>) -> Val<::glam::Vec3> { + let output: Val<::glam::Vec3> = ::glam::I16Vec3::as_vec3(&_self).into(); + output + } + /// Casts all elements of `self` to `f32`. + fn as_vec3a(_self: Ref<::glam::I16Vec3>) -> Val<::glam::Vec3A> { + let output: Val<::glam::Vec3A> = ::glam::I16Vec3::as_vec3a(&_self).into(); + output + } + fn assert_receiver_is_total_eq(_self: Ref<::glam::I16Vec3>) -> () { + let output: () = <::glam::I16Vec3 as ::core::cmp::Eq>::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<::glam::I16Vec3>, + min: Val<::glam::I16Vec3>, + max: Val<::glam::I16Vec3>, + ) -> Val<::glam::I16Vec3> { + let output: Val<::glam::I16Vec3> = ::glam::I16Vec3::clamp( + _self.into_inner(), + min.into_inner(), + max.into_inner(), + ) + .into(); + output + } + fn clone(_self: Ref<::glam::I16Vec3>) -> Val<::glam::I16Vec3> { + let output: Val<::glam::I16Vec3> = <::glam::I16Vec3 as ::bevy_reflect::erased_serde::__private::serde::__private::Clone>::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<::glam::I16Vec3>, + rhs: Val<::glam::I16Vec3>, + ) -> Val<::glam::BVec3> { + let output: Val<::glam::BVec3> = ::glam::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<::glam::I16Vec3>, + rhs: Val<::glam::I16Vec3>, + ) -> Val<::glam::BVec3> { + let output: Val<::glam::BVec3> = ::glam::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<::glam::I16Vec3>, + rhs: Val<::glam::I16Vec3>, + ) -> Val<::glam::BVec3> { + let output: Val<::glam::BVec3> = ::glam::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<::glam::I16Vec3>, + rhs: Val<::glam::I16Vec3>, + ) -> Val<::glam::BVec3> { + let output: Val<::glam::BVec3> = ::glam::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<::glam::I16Vec3>, + rhs: Val<::glam::I16Vec3>, + ) -> Val<::glam::BVec3> { + let output: Val<::glam::BVec3> = ::glam::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<::glam::I16Vec3>, + rhs: Val<::glam::I16Vec3>, + ) -> Val<::glam::BVec3> { + let output: Val<::glam::BVec3> = ::glam::I16Vec3::cmpne( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Computes the cross product of `self` and `rhs`. + fn cross( + _self: Val<::glam::I16Vec3>, + rhs: Val<::glam::I16Vec3>, + ) -> Val<::glam::I16Vec3> { + let output: Val<::glam::I16Vec3> = ::glam::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<::glam::I16Vec3>, rhs: Val<::glam::I16Vec3>) -> i16 { + let output: i16 = ::glam::I16Vec3::distance_squared( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + fn div( + _self: Val<::glam::I16Vec3>, + rhs: Ref<::glam::I16Vec3>, + ) -> Val<::glam::I16Vec3> { + let output: Val<::glam::I16Vec3> = <::glam::I16Vec3 as ::core::ops::Div< + &::glam::I16Vec3, + >>::div(_self.into_inner(), &rhs) + .into(); + output + } + fn div( + _self: Val<::glam::I16Vec3>, + rhs: Val<::glam::I16Vec3>, + ) -> Val<::glam::I16Vec3> { + let output: Val<::glam::I16Vec3> = <::glam::I16Vec3 as ::core::ops::Div< + ::glam::I16Vec3, + >>::div(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + fn div(_self: Val<::glam::I16Vec3>, rhs: i16) -> Val<::glam::I16Vec3> { + let output: Val<::glam::I16Vec3> = <::glam::I16Vec3 as ::core::ops::Div< + i16, + >>::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<::glam::I16Vec3>, + rhs: Val<::glam::I16Vec3>, + ) -> Val<::glam::I16Vec3> { + let output: Val<::glam::I16Vec3> = ::glam::I16Vec3::div_euclid( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Computes the dot product of `self` and `rhs`. + fn dot(_self: Val<::glam::I16Vec3>, rhs: Val<::glam::I16Vec3>) -> i16 { + let output: i16 = ::glam::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<::glam::I16Vec3>, + rhs: Val<::glam::I16Vec3>, + ) -> Val<::glam::I16Vec3> { + let output: Val<::glam::I16Vec3> = ::glam::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<::glam::I16Vec3>) -> i16 { + let output: i16 = ::glam::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<::glam::I16Vec3>) -> i16 { + let output: i16 = ::glam::I16Vec3::element_sum(_self.into_inner()).into(); + output + } + fn eq(_self: Ref<::glam::I16Vec3>, other: Ref<::glam::I16Vec3>) -> bool { + let output: bool = <::glam::I16Vec3 as ::core::cmp::PartialEq< + ::glam::I16Vec3, + >>::eq(&_self, &other) + .into(); + output + } + /// Creates a 4D vector from `self` and the given `w` value. + fn extend(_self: Val<::glam::I16Vec3>, w: i16) -> Val<::glam::I16Vec4> { + let output: Val<::glam::I16Vec4> = ::glam::I16Vec3::extend(_self.into_inner(), w) + .into(); + output + } + /// Creates a new vector from an array. + fn from_array(a: [i16; 3]) -> Val<::glam::I16Vec3> { + let output: Val<::glam::I16Vec3> = ::glam::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<::glam::I16Vec3>) -> u32 { + let output: u32 = ::glam::I16Vec3::is_negative_bitmask(_self.into_inner()) + .into(); + output + } + /// Computes the squared length of `self`. + fn length_squared(_self: Val<::glam::I16Vec3>) -> i16 { + let output: i16 = ::glam::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<::glam::I16Vec3>, + rhs: Val<::glam::I16Vec3>, + ) -> Val<::glam::I16Vec3> { + let output: Val<::glam::I16Vec3> = ::glam::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<::glam::I16Vec3>) -> i16 { + let output: i16 = ::glam::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<::glam::I16Vec3>, + rhs: Val<::glam::I16Vec3>, + ) -> Val<::glam::I16Vec3> { + let output: Val<::glam::I16Vec3> = ::glam::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<::glam::I16Vec3>) -> i16 { + let output: i16 = ::glam::I16Vec3::min_element(_self.into_inner()).into(); + output + } + fn mul( + _self: Val<::glam::I16Vec3>, + rhs: Ref<::glam::I16Vec3>, + ) -> Val<::glam::I16Vec3> { + let output: Val<::glam::I16Vec3> = <::glam::I16Vec3 as ::core::ops::Mul< + &::glam::I16Vec3, + >>::mul(_self.into_inner(), &rhs) + .into(); + output + } + fn mul( + _self: Val<::glam::I16Vec3>, + rhs: Val<::glam::I16Vec3>, + ) -> Val<::glam::I16Vec3> { + let output: Val<::glam::I16Vec3> = <::glam::I16Vec3 as ::core::ops::Mul< + ::glam::I16Vec3, + >>::mul(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + fn mul(_self: Val<::glam::I16Vec3>, rhs: i16) -> Val<::glam::I16Vec3> { + let output: Val<::glam::I16Vec3> = <::glam::I16Vec3 as ::core::ops::Mul< + i16, + >>::mul(_self.into_inner(), rhs) + .into(); + output + } + fn neg(_self: Val<::glam::I16Vec3>) -> Val<::glam::I16Vec3> { + let output: Val<::glam::I16Vec3> = <::glam::I16Vec3 as ::core::ops::Neg>::neg( + _self.into_inner(), + ) + .into(); + output + } + /// Creates a new vector. + fn new(x: i16, y: i16, z: i16) -> Val<::glam::I16Vec3> { + let output: Val<::glam::I16Vec3> = ::glam::I16Vec3::new(x, y, z).into(); + output + } + fn rem( + _self: Val<::glam::I16Vec3>, + rhs: Ref<::glam::I16Vec3>, + ) -> Val<::glam::I16Vec3> { + let output: Val<::glam::I16Vec3> = <::glam::I16Vec3 as ::core::ops::Rem< + &::glam::I16Vec3, + >>::rem(_self.into_inner(), &rhs) + .into(); + output + } + fn rem( + _self: Val<::glam::I16Vec3>, + rhs: Val<::glam::I16Vec3>, + ) -> Val<::glam::I16Vec3> { + let output: Val<::glam::I16Vec3> = <::glam::I16Vec3 as ::core::ops::Rem< + ::glam::I16Vec3, + >>::rem(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + fn rem(_self: Val<::glam::I16Vec3>, rhs: i16) -> Val<::glam::I16Vec3> { + let output: Val<::glam::I16Vec3> = <::glam::I16Vec3 as ::core::ops::Rem< + i16, + >>::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<::glam::I16Vec3>, + rhs: Val<::glam::I16Vec3>, + ) -> Val<::glam::I16Vec3> { + let output: Val<::glam::I16Vec3> = ::glam::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<::glam::I16Vec3>, + rhs: Val<::glam::I16Vec3>, + ) -> Val<::glam::I16Vec3> { + let output: Val<::glam::I16Vec3> = ::glam::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<::glam::I16Vec3>, + rhs: Val<::glam::U16Vec3>, + ) -> Val<::glam::I16Vec3> { + let output: Val<::glam::I16Vec3> = ::glam::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<::glam::I16Vec3>, + rhs: Val<::glam::I16Vec3>, + ) -> Val<::glam::I16Vec3> { + let output: Val<::glam::I16Vec3> = ::glam::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<::glam::I16Vec3>, + rhs: Val<::glam::I16Vec3>, + ) -> Val<::glam::I16Vec3> { + let output: Val<::glam::I16Vec3> = ::glam::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<::glam::I16Vec3>, + rhs: Val<::glam::I16Vec3>, + ) -> Val<::glam::I16Vec3> { + let output: Val<::glam::I16Vec3> = ::glam::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<::glam::I16Vec3>, + rhs: Val<::glam::U16Vec3>, + ) -> Val<::glam::I16Vec3> { + let output: Val<::glam::I16Vec3> = ::glam::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<::glam::BVec3>, + if_true: Val<::glam::I16Vec3>, + if_false: Val<::glam::I16Vec3>, + ) -> Val<::glam::I16Vec3> { + let output: Val<::glam::I16Vec3> = ::glam::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<::glam::I16Vec3>) -> Val<::glam::I16Vec3> { + let output: Val<::glam::I16Vec3> = ::glam::I16Vec3::signum(_self.into_inner()) + .into(); + output + } + /// Creates a vector with all elements set to `v`. + fn splat(v: i16) -> Val<::glam::I16Vec3> { + let output: Val<::glam::I16Vec3> = ::glam::I16Vec3::splat(v).into(); + output + } + fn sub( + _self: Val<::glam::I16Vec3>, + rhs: Ref<::glam::I16Vec3>, + ) -> Val<::glam::I16Vec3> { + let output: Val<::glam::I16Vec3> = <::glam::I16Vec3 as ::core::ops::Sub< + &::glam::I16Vec3, + >>::sub(_self.into_inner(), &rhs) + .into(); + output + } + fn sub( + _self: Val<::glam::I16Vec3>, + rhs: Val<::glam::I16Vec3>, + ) -> Val<::glam::I16Vec3> { + let output: Val<::glam::I16Vec3> = <::glam::I16Vec3 as ::core::ops::Sub< + ::glam::I16Vec3, + >>::sub(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + fn sub(_self: Val<::glam::I16Vec3>, rhs: i16) -> Val<::glam::I16Vec3> { + let output: Val<::glam::I16Vec3> = <::glam::I16Vec3 as ::core::ops::Sub< + i16, + >>::sub(_self.into_inner(), rhs) + .into(); + output + } + /// `[x, y, z]` + fn to_array(_self: Ref<::glam::I16Vec3>) -> [i16; 3] { + let output: [i16; 3] = ::glam::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<::glam::I16Vec3>) -> Val<::glam::I16Vec2> { + let output: Val<::glam::I16Vec2> = ::glam::I16Vec3::truncate(_self.into_inner()) + .into(); + output + } + /// Creates a 3D vector from `self` with the given value of `x`. + fn with_x(_self: Val<::glam::I16Vec3>, x: i16) -> Val<::glam::I16Vec3> { + let output: Val<::glam::I16Vec3> = ::glam::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<::glam::I16Vec3>, y: i16) -> Val<::glam::I16Vec3> { + let output: Val<::glam::I16Vec3> = ::glam::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<::glam::I16Vec3>, z: i16) -> Val<::glam::I16Vec3> { + let output: Val<::glam::I16Vec3> = ::glam::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<::glam::I16Vec3>, + rhs: Val<::glam::I16Vec3>, + ) -> Val<::glam::I16Vec3> { + let output: Val<::glam::I16Vec3> = ::glam::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<::glam::I16Vec3>, + rhs: Val<::glam::U16Vec3>, + ) -> Val<::glam::I16Vec3> { + let output: Val<::glam::I16Vec3> = ::glam::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<::glam::I16Vec3>, + rhs: Val<::glam::I16Vec3>, + ) -> Val<::glam::I16Vec3> { + let output: Val<::glam::I16Vec3> = ::glam::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<::glam::I16Vec3>, + rhs: Val<::glam::I16Vec3>, + ) -> Val<::glam::I16Vec3> { + let output: Val<::glam::I16Vec3> = ::glam::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<::glam::I16Vec3>, + rhs: Val<::glam::I16Vec3>, + ) -> Val<::glam::I16Vec3> { + let output: Val<::glam::I16Vec3> = ::glam::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<::glam::I16Vec3>, + rhs: Val<::glam::U16Vec3>, + ) -> Val<::glam::I16Vec3> { + let output: Val<::glam::I16Vec3> = ::glam::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 ::glam::I16Vec4 { + /// Returns a vector containing the absolute value of each element of `self`. + fn abs(_self: Val<::glam::I16Vec4>) -> Val<::glam::I16Vec4> { + let output: Val<::glam::I16Vec4> = ::glam::I16Vec4::abs(_self.into_inner()) + .into(); + output + } + fn add( + _self: Val<::glam::I16Vec4>, + rhs: Ref<::glam::I16Vec4>, + ) -> Val<::glam::I16Vec4> { + let output: Val<::glam::I16Vec4> = <::glam::I16Vec4 as ::core::ops::Add< + &::glam::I16Vec4, + >>::add(_self.into_inner(), &rhs) + .into(); + output + } + fn add( + _self: Val<::glam::I16Vec4>, + rhs: Val<::glam::I16Vec4>, + ) -> Val<::glam::I16Vec4> { + let output: Val<::glam::I16Vec4> = <::glam::I16Vec4 as ::core::ops::Add< + ::glam::I16Vec4, + >>::add(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + fn add(_self: Val<::glam::I16Vec4>, rhs: i16) -> Val<::glam::I16Vec4> { + let output: Val<::glam::I16Vec4> = <::glam::I16Vec4 as ::core::ops::Add< + i16, + >>::add(_self.into_inner(), rhs) + .into(); + output + } + /// Casts all elements of `self` to `f64`. + fn as_dvec4(_self: Ref<::glam::I16Vec4>) -> Val<::glam::DVec4> { + let output: Val<::glam::DVec4> = ::glam::I16Vec4::as_dvec4(&_self).into(); + output + } + /// Casts all elements of `self` to `i64`. + fn as_i64vec4(_self: Ref<::glam::I16Vec4>) -> Val<::glam::I64Vec4> { + let output: Val<::glam::I64Vec4> = ::glam::I16Vec4::as_i64vec4(&_self).into(); + output + } + /// Casts all elements of `self` to `i8`. + fn as_i8vec4(_self: Ref<::glam::I16Vec4>) -> Val<::glam::I8Vec4> { + let output: Val<::glam::I8Vec4> = ::glam::I16Vec4::as_i8vec4(&_self).into(); + output + } + /// Casts all elements of `self` to `i32`. + fn as_ivec4(_self: Ref<::glam::I16Vec4>) -> Val<::glam::IVec4> { + let output: Val<::glam::IVec4> = ::glam::I16Vec4::as_ivec4(&_self).into(); + output + } + /// Casts all elements of `self` to `u16`. + fn as_u16vec4(_self: Ref<::glam::I16Vec4>) -> Val<::glam::U16Vec4> { + let output: Val<::glam::U16Vec4> = ::glam::I16Vec4::as_u16vec4(&_self).into(); + output + } + /// Casts all elements of `self` to `u64`. + fn as_u64vec4(_self: Ref<::glam::I16Vec4>) -> Val<::glam::U64Vec4> { + let output: Val<::glam::U64Vec4> = ::glam::I16Vec4::as_u64vec4(&_self).into(); + output + } + /// Casts all elements of `self` to `u8`. + fn as_u8vec4(_self: Ref<::glam::I16Vec4>) -> Val<::glam::U8Vec4> { + let output: Val<::glam::U8Vec4> = ::glam::I16Vec4::as_u8vec4(&_self).into(); + output + } + /// Casts all elements of `self` to `u32`. + fn as_uvec4(_self: Ref<::glam::I16Vec4>) -> Val<::glam::UVec4> { + let output: Val<::glam::UVec4> = ::glam::I16Vec4::as_uvec4(&_self).into(); + output + } + /// Casts all elements of `self` to `f32`. + fn as_vec4(_self: Ref<::glam::I16Vec4>) -> Val<::glam::Vec4> { + let output: Val<::glam::Vec4> = ::glam::I16Vec4::as_vec4(&_self).into(); + output + } + fn assert_receiver_is_total_eq(_self: Ref<::glam::I16Vec4>) -> () { + let output: () = <::glam::I16Vec4 as ::core::cmp::Eq>::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<::glam::I16Vec4>, + min: Val<::glam::I16Vec4>, + max: Val<::glam::I16Vec4>, + ) -> Val<::glam::I16Vec4> { + let output: Val<::glam::I16Vec4> = ::glam::I16Vec4::clamp( + _self.into_inner(), + min.into_inner(), + max.into_inner(), + ) + .into(); + output + } + fn clone(_self: Ref<::glam::I16Vec4>) -> Val<::glam::I16Vec4> { + let output: Val<::glam::I16Vec4> = <::glam::I16Vec4 as ::bevy_reflect::erased_serde::__private::serde::__private::Clone>::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<::glam::I16Vec4>, + rhs: Val<::glam::I16Vec4>, + ) -> Val<::glam::BVec4> { + let output: Val<::glam::BVec4> = ::glam::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<::glam::I16Vec4>, + rhs: Val<::glam::I16Vec4>, + ) -> Val<::glam::BVec4> { + let output: Val<::glam::BVec4> = ::glam::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<::glam::I16Vec4>, + rhs: Val<::glam::I16Vec4>, + ) -> Val<::glam::BVec4> { + let output: Val<::glam::BVec4> = ::glam::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<::glam::I16Vec4>, + rhs: Val<::glam::I16Vec4>, + ) -> Val<::glam::BVec4> { + let output: Val<::glam::BVec4> = ::glam::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<::glam::I16Vec4>, + rhs: Val<::glam::I16Vec4>, + ) -> Val<::glam::BVec4> { + let output: Val<::glam::BVec4> = ::glam::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<::glam::I16Vec4>, + rhs: Val<::glam::I16Vec4>, + ) -> Val<::glam::BVec4> { + let output: Val<::glam::BVec4> = ::glam::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<::glam::I16Vec4>, rhs: Val<::glam::I16Vec4>) -> i16 { + let output: i16 = ::glam::I16Vec4::distance_squared( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + fn div( + _self: Val<::glam::I16Vec4>, + rhs: Ref<::glam::I16Vec4>, + ) -> Val<::glam::I16Vec4> { + let output: Val<::glam::I16Vec4> = <::glam::I16Vec4 as ::core::ops::Div< + &::glam::I16Vec4, + >>::div(_self.into_inner(), &rhs) + .into(); + output + } + fn div( + _self: Val<::glam::I16Vec4>, + rhs: Val<::glam::I16Vec4>, + ) -> Val<::glam::I16Vec4> { + let output: Val<::glam::I16Vec4> = <::glam::I16Vec4 as ::core::ops::Div< + ::glam::I16Vec4, + >>::div(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + fn div(_self: Val<::glam::I16Vec4>, rhs: i16) -> Val<::glam::I16Vec4> { + let output: Val<::glam::I16Vec4> = <::glam::I16Vec4 as ::core::ops::Div< + i16, + >>::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<::glam::I16Vec4>, + rhs: Val<::glam::I16Vec4>, + ) -> Val<::glam::I16Vec4> { + let output: Val<::glam::I16Vec4> = ::glam::I16Vec4::div_euclid( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Computes the dot product of `self` and `rhs`. + fn dot(_self: Val<::glam::I16Vec4>, rhs: Val<::glam::I16Vec4>) -> i16 { + let output: i16 = ::glam::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<::glam::I16Vec4>, + rhs: Val<::glam::I16Vec4>, + ) -> Val<::glam::I16Vec4> { + let output: Val<::glam::I16Vec4> = ::glam::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<::glam::I16Vec4>) -> i16 { + let output: i16 = ::glam::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<::glam::I16Vec4>) -> i16 { + let output: i16 = ::glam::I16Vec4::element_sum(_self.into_inner()).into(); + output + } + fn eq(_self: Ref<::glam::I16Vec4>, other: Ref<::glam::I16Vec4>) -> bool { + let output: bool = <::glam::I16Vec4 as ::core::cmp::PartialEq< + ::glam::I16Vec4, + >>::eq(&_self, &other) + .into(); + output + } + /// Creates a new vector from an array. + fn from_array(a: [i16; 4]) -> Val<::glam::I16Vec4> { + let output: Val<::glam::I16Vec4> = ::glam::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<::glam::I16Vec4>) -> u32 { + let output: u32 = ::glam::I16Vec4::is_negative_bitmask(_self.into_inner()) + .into(); + output + } + /// Computes the squared length of `self`. + fn length_squared(_self: Val<::glam::I16Vec4>) -> i16 { + let output: i16 = ::glam::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<::glam::I16Vec4>, + rhs: Val<::glam::I16Vec4>, + ) -> Val<::glam::I16Vec4> { + let output: Val<::glam::I16Vec4> = ::glam::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<::glam::I16Vec4>) -> i16 { + let output: i16 = ::glam::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<::glam::I16Vec4>, + rhs: Val<::glam::I16Vec4>, + ) -> Val<::glam::I16Vec4> { + let output: Val<::glam::I16Vec4> = ::glam::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<::glam::I16Vec4>) -> i16 { + let output: i16 = ::glam::I16Vec4::min_element(_self.into_inner()).into(); + output + } + fn mul( + _self: Val<::glam::I16Vec4>, + rhs: Ref<::glam::I16Vec4>, + ) -> Val<::glam::I16Vec4> { + let output: Val<::glam::I16Vec4> = <::glam::I16Vec4 as ::core::ops::Mul< + &::glam::I16Vec4, + >>::mul(_self.into_inner(), &rhs) + .into(); + output + } + fn mul( + _self: Val<::glam::I16Vec4>, + rhs: Val<::glam::I16Vec4>, + ) -> Val<::glam::I16Vec4> { + let output: Val<::glam::I16Vec4> = <::glam::I16Vec4 as ::core::ops::Mul< + ::glam::I16Vec4, + >>::mul(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + fn mul(_self: Val<::glam::I16Vec4>, rhs: i16) -> Val<::glam::I16Vec4> { + let output: Val<::glam::I16Vec4> = <::glam::I16Vec4 as ::core::ops::Mul< + i16, + >>::mul(_self.into_inner(), rhs) + .into(); + output + } + fn neg(_self: Val<::glam::I16Vec4>) -> Val<::glam::I16Vec4> { + let output: Val<::glam::I16Vec4> = <::glam::I16Vec4 as ::core::ops::Neg>::neg( + _self.into_inner(), + ) + .into(); + output + } + /// Creates a new vector. + fn new(x: i16, y: i16, z: i16, w: i16) -> Val<::glam::I16Vec4> { + let output: Val<::glam::I16Vec4> = ::glam::I16Vec4::new(x, y, z, w).into(); + output + } + fn rem( + _self: Val<::glam::I16Vec4>, + rhs: Ref<::glam::I16Vec4>, + ) -> Val<::glam::I16Vec4> { + let output: Val<::glam::I16Vec4> = <::glam::I16Vec4 as ::core::ops::Rem< + &::glam::I16Vec4, + >>::rem(_self.into_inner(), &rhs) + .into(); + output + } + fn rem( + _self: Val<::glam::I16Vec4>, + rhs: Val<::glam::I16Vec4>, + ) -> Val<::glam::I16Vec4> { + let output: Val<::glam::I16Vec4> = <::glam::I16Vec4 as ::core::ops::Rem< + ::glam::I16Vec4, + >>::rem(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + fn rem(_self: Val<::glam::I16Vec4>, rhs: i16) -> Val<::glam::I16Vec4> { + let output: Val<::glam::I16Vec4> = <::glam::I16Vec4 as ::core::ops::Rem< + i16, + >>::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<::glam::I16Vec4>, + rhs: Val<::glam::I16Vec4>, + ) -> Val<::glam::I16Vec4> { + let output: Val<::glam::I16Vec4> = ::glam::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<::glam::I16Vec4>, + rhs: Val<::glam::I16Vec4>, + ) -> Val<::glam::I16Vec4> { + let output: Val<::glam::I16Vec4> = ::glam::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<::glam::I16Vec4>, + rhs: Val<::glam::U16Vec4>, + ) -> Val<::glam::I16Vec4> { + let output: Val<::glam::I16Vec4> = ::glam::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<::glam::I16Vec4>, + rhs: Val<::glam::I16Vec4>, + ) -> Val<::glam::I16Vec4> { + let output: Val<::glam::I16Vec4> = ::glam::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<::glam::I16Vec4>, + rhs: Val<::glam::I16Vec4>, + ) -> Val<::glam::I16Vec4> { + let output: Val<::glam::I16Vec4> = ::glam::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<::glam::I16Vec4>, + rhs: Val<::glam::I16Vec4>, + ) -> Val<::glam::I16Vec4> { + let output: Val<::glam::I16Vec4> = ::glam::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<::glam::I16Vec4>, + rhs: Val<::glam::U16Vec4>, + ) -> Val<::glam::I16Vec4> { + let output: Val<::glam::I16Vec4> = ::glam::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<::glam::BVec4>, + if_true: Val<::glam::I16Vec4>, + if_false: Val<::glam::I16Vec4>, + ) -> Val<::glam::I16Vec4> { + let output: Val<::glam::I16Vec4> = ::glam::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<::glam::I16Vec4>) -> Val<::glam::I16Vec4> { + let output: Val<::glam::I16Vec4> = ::glam::I16Vec4::signum(_self.into_inner()) + .into(); + output + } + /// Creates a vector with all elements set to `v`. + fn splat(v: i16) -> Val<::glam::I16Vec4> { + let output: Val<::glam::I16Vec4> = ::glam::I16Vec4::splat(v).into(); + output + } + fn sub( + _self: Val<::glam::I16Vec4>, + rhs: Ref<::glam::I16Vec4>, + ) -> Val<::glam::I16Vec4> { + let output: Val<::glam::I16Vec4> = <::glam::I16Vec4 as ::core::ops::Sub< + &::glam::I16Vec4, + >>::sub(_self.into_inner(), &rhs) + .into(); + output + } + fn sub( + _self: Val<::glam::I16Vec4>, + rhs: Val<::glam::I16Vec4>, + ) -> Val<::glam::I16Vec4> { + let output: Val<::glam::I16Vec4> = <::glam::I16Vec4 as ::core::ops::Sub< + ::glam::I16Vec4, + >>::sub(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + fn sub(_self: Val<::glam::I16Vec4>, rhs: i16) -> Val<::glam::I16Vec4> { + let output: Val<::glam::I16Vec4> = <::glam::I16Vec4 as ::core::ops::Sub< + i16, + >>::sub(_self.into_inner(), rhs) + .into(); + output + } + /// `[x, y, z, w]` + fn to_array(_self: Ref<::glam::I16Vec4>) -> [i16; 4] { + let output: [i16; 4] = ::glam::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<::glam::I16Vec4>) -> Val<::glam::I16Vec3> { + let output: Val<::glam::I16Vec3> = ::glam::I16Vec4::truncate(_self.into_inner()) + .into(); + output + } + /// Creates a 4D vector from `self` with the given value of `w`. + fn with_w(_self: Val<::glam::I16Vec4>, w: i16) -> Val<::glam::I16Vec4> { + let output: Val<::glam::I16Vec4> = ::glam::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<::glam::I16Vec4>, x: i16) -> Val<::glam::I16Vec4> { + let output: Val<::glam::I16Vec4> = ::glam::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<::glam::I16Vec4>, y: i16) -> Val<::glam::I16Vec4> { + let output: Val<::glam::I16Vec4> = ::glam::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<::glam::I16Vec4>, z: i16) -> Val<::glam::I16Vec4> { + let output: Val<::glam::I16Vec4> = ::glam::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<::glam::I16Vec4>, + rhs: Val<::glam::I16Vec4>, + ) -> Val<::glam::I16Vec4> { + let output: Val<::glam::I16Vec4> = ::glam::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<::glam::I16Vec4>, + rhs: Val<::glam::U16Vec4>, + ) -> Val<::glam::I16Vec4> { + let output: Val<::glam::I16Vec4> = ::glam::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<::glam::I16Vec4>, + rhs: Val<::glam::I16Vec4>, + ) -> Val<::glam::I16Vec4> { + let output: Val<::glam::I16Vec4> = ::glam::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<::glam::I16Vec4>, + rhs: Val<::glam::I16Vec4>, + ) -> Val<::glam::I16Vec4> { + let output: Val<::glam::I16Vec4> = ::glam::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<::glam::I16Vec4>, + rhs: Val<::glam::I16Vec4>, + ) -> Val<::glam::I16Vec4> { + let output: Val<::glam::I16Vec4> = ::glam::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<::glam::I16Vec4>, + rhs: Val<::glam::U16Vec4>, + ) -> Val<::glam::I16Vec4> { + let output: Val<::glam::I16Vec4> = ::glam::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 ::glam::I64Vec2 { + /// Returns a vector containing the absolute value of each element of `self`. + fn abs(_self: Val<::glam::I64Vec2>) -> Val<::glam::I64Vec2> { + let output: Val<::glam::I64Vec2> = ::glam::I64Vec2::abs(_self.into_inner()) + .into(); + output + } + fn add( + _self: Val<::glam::I64Vec2>, + rhs: Ref<::glam::I64Vec2>, + ) -> Val<::glam::I64Vec2> { + let output: Val<::glam::I64Vec2> = <::glam::I64Vec2 as ::core::ops::Add< + &::glam::I64Vec2, + >>::add(_self.into_inner(), &rhs) + .into(); + output + } + fn add( + _self: Val<::glam::I64Vec2>, + rhs: Val<::glam::I64Vec2>, + ) -> Val<::glam::I64Vec2> { + let output: Val<::glam::I64Vec2> = <::glam::I64Vec2 as ::core::ops::Add< + ::glam::I64Vec2, + >>::add(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + fn add(_self: Val<::glam::I64Vec2>, rhs: i64) -> Val<::glam::I64Vec2> { + let output: Val<::glam::I64Vec2> = <::glam::I64Vec2 as ::core::ops::Add< + i64, + >>::add(_self.into_inner(), rhs) + .into(); + output + } + /// Casts all elements of `self` to `f64`. + fn as_dvec2(_self: Ref<::glam::I64Vec2>) -> Val<::glam::DVec2> { + let output: Val<::glam::DVec2> = ::glam::I64Vec2::as_dvec2(&_self).into(); + output + } + /// Casts all elements of `self` to `i16`. + fn as_i16vec2(_self: Ref<::glam::I64Vec2>) -> Val<::glam::I16Vec2> { + let output: Val<::glam::I16Vec2> = ::glam::I64Vec2::as_i16vec2(&_self).into(); + output + } + /// Casts all elements of `self` to `i8`. + fn as_i8vec2(_self: Ref<::glam::I64Vec2>) -> Val<::glam::I8Vec2> { + let output: Val<::glam::I8Vec2> = ::glam::I64Vec2::as_i8vec2(&_self).into(); + output + } + /// Casts all elements of `self` to `i32`. + fn as_ivec2(_self: Ref<::glam::I64Vec2>) -> Val<::glam::IVec2> { + let output: Val<::glam::IVec2> = ::glam::I64Vec2::as_ivec2(&_self).into(); + output + } + /// Casts all elements of `self` to `u16`. + fn as_u16vec2(_self: Ref<::glam::I64Vec2>) -> Val<::glam::U16Vec2> { + let output: Val<::glam::U16Vec2> = ::glam::I64Vec2::as_u16vec2(&_self).into(); + output + } + /// Casts all elements of `self` to `u64`. + fn as_u64vec2(_self: Ref<::glam::I64Vec2>) -> Val<::glam::U64Vec2> { + let output: Val<::glam::U64Vec2> = ::glam::I64Vec2::as_u64vec2(&_self).into(); + output + } + /// Casts all elements of `self` to `u8`. + fn as_u8vec2(_self: Ref<::glam::I64Vec2>) -> Val<::glam::U8Vec2> { + let output: Val<::glam::U8Vec2> = ::glam::I64Vec2::as_u8vec2(&_self).into(); + output + } + /// Casts all elements of `self` to `u32`. + fn as_uvec2(_self: Ref<::glam::I64Vec2>) -> Val<::glam::UVec2> { + let output: Val<::glam::UVec2> = ::glam::I64Vec2::as_uvec2(&_self).into(); + output + } + /// Casts all elements of `self` to `f32`. + fn as_vec2(_self: Ref<::glam::I64Vec2>) -> Val<::glam::Vec2> { + let output: Val<::glam::Vec2> = ::glam::I64Vec2::as_vec2(&_self).into(); + output + } + fn assert_receiver_is_total_eq(_self: Ref<::glam::I64Vec2>) -> () { + let output: () = <::glam::I64Vec2 as ::core::cmp::Eq>::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<::glam::I64Vec2>, + min: Val<::glam::I64Vec2>, + max: Val<::glam::I64Vec2>, + ) -> Val<::glam::I64Vec2> { + let output: Val<::glam::I64Vec2> = ::glam::I64Vec2::clamp( + _self.into_inner(), + min.into_inner(), + max.into_inner(), + ) + .into(); + output + } + fn clone(_self: Ref<::glam::I64Vec2>) -> Val<::glam::I64Vec2> { + let output: Val<::glam::I64Vec2> = <::glam::I64Vec2 as ::bevy_reflect::erased_serde::__private::serde::__private::Clone>::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<::glam::I64Vec2>, + rhs: Val<::glam::I64Vec2>, + ) -> Val<::glam::BVec2> { + let output: Val<::glam::BVec2> = ::glam::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<::glam::I64Vec2>, + rhs: Val<::glam::I64Vec2>, + ) -> Val<::glam::BVec2> { + let output: Val<::glam::BVec2> = ::glam::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<::glam::I64Vec2>, + rhs: Val<::glam::I64Vec2>, + ) -> Val<::glam::BVec2> { + let output: Val<::glam::BVec2> = ::glam::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<::glam::I64Vec2>, + rhs: Val<::glam::I64Vec2>, + ) -> Val<::glam::BVec2> { + let output: Val<::glam::BVec2> = ::glam::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<::glam::I64Vec2>, + rhs: Val<::glam::I64Vec2>, + ) -> Val<::glam::BVec2> { + let output: Val<::glam::BVec2> = ::glam::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<::glam::I64Vec2>, + rhs: Val<::glam::I64Vec2>, + ) -> Val<::glam::BVec2> { + let output: Val<::glam::BVec2> = ::glam::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<::glam::I64Vec2>, rhs: Val<::glam::I64Vec2>) -> i64 { + let output: i64 = ::glam::I64Vec2::distance_squared( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + fn div( + _self: Val<::glam::I64Vec2>, + rhs: Ref<::glam::I64Vec2>, + ) -> Val<::glam::I64Vec2> { + let output: Val<::glam::I64Vec2> = <::glam::I64Vec2 as ::core::ops::Div< + &::glam::I64Vec2, + >>::div(_self.into_inner(), &rhs) + .into(); + output + } + fn div( + _self: Val<::glam::I64Vec2>, + rhs: Val<::glam::I64Vec2>, + ) -> Val<::glam::I64Vec2> { + let output: Val<::glam::I64Vec2> = <::glam::I64Vec2 as ::core::ops::Div< + ::glam::I64Vec2, + >>::div(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + fn div(_self: Val<::glam::I64Vec2>, rhs: i64) -> Val<::glam::I64Vec2> { + let output: Val<::glam::I64Vec2> = <::glam::I64Vec2 as ::core::ops::Div< + i64, + >>::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<::glam::I64Vec2>, + rhs: Val<::glam::I64Vec2>, + ) -> Val<::glam::I64Vec2> { + let output: Val<::glam::I64Vec2> = ::glam::I64Vec2::div_euclid( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Computes the dot product of `self` and `rhs`. + fn dot(_self: Val<::glam::I64Vec2>, rhs: Val<::glam::I64Vec2>) -> i64 { + let output: i64 = ::glam::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<::glam::I64Vec2>, + rhs: Val<::glam::I64Vec2>, + ) -> Val<::glam::I64Vec2> { + let output: Val<::glam::I64Vec2> = ::glam::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<::glam::I64Vec2>) -> i64 { + let output: i64 = ::glam::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<::glam::I64Vec2>) -> i64 { + let output: i64 = ::glam::I64Vec2::element_sum(_self.into_inner()).into(); + output + } + fn eq(_self: Ref<::glam::I64Vec2>, other: Ref<::glam::I64Vec2>) -> bool { + let output: bool = <::glam::I64Vec2 as ::core::cmp::PartialEq< + ::glam::I64Vec2, + >>::eq(&_self, &other) + .into(); + output + } + /// Creates a 3D vector from `self` and the given `z` value. + fn extend(_self: Val<::glam::I64Vec2>, z: i64) -> Val<::glam::I64Vec3> { + let output: Val<::glam::I64Vec3> = ::glam::I64Vec2::extend(_self.into_inner(), z) + .into(); + output + } + /// Creates a new vector from an array. + fn from_array(a: [i64; 2]) -> Val<::glam::I64Vec2> { + let output: Val<::glam::I64Vec2> = ::glam::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<::glam::I64Vec2>) -> u32 { + let output: u32 = ::glam::I64Vec2::is_negative_bitmask(_self.into_inner()) + .into(); + output + } + /// Computes the squared length of `self`. + fn length_squared(_self: Val<::glam::I64Vec2>) -> i64 { + let output: i64 = ::glam::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<::glam::I64Vec2>, + rhs: Val<::glam::I64Vec2>, + ) -> Val<::glam::I64Vec2> { + let output: Val<::glam::I64Vec2> = ::glam::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<::glam::I64Vec2>) -> i64 { + let output: i64 = ::glam::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<::glam::I64Vec2>, + rhs: Val<::glam::I64Vec2>, + ) -> Val<::glam::I64Vec2> { + let output: Val<::glam::I64Vec2> = ::glam::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<::glam::I64Vec2>) -> i64 { + let output: i64 = ::glam::I64Vec2::min_element(_self.into_inner()).into(); + output + } + fn mul( + _self: Val<::glam::I64Vec2>, + rhs: Ref<::glam::I64Vec2>, + ) -> Val<::glam::I64Vec2> { + let output: Val<::glam::I64Vec2> = <::glam::I64Vec2 as ::core::ops::Mul< + &::glam::I64Vec2, + >>::mul(_self.into_inner(), &rhs) + .into(); + output + } + fn mul( + _self: Val<::glam::I64Vec2>, + rhs: Val<::glam::I64Vec2>, + ) -> Val<::glam::I64Vec2> { + let output: Val<::glam::I64Vec2> = <::glam::I64Vec2 as ::core::ops::Mul< + ::glam::I64Vec2, + >>::mul(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + fn mul(_self: Val<::glam::I64Vec2>, rhs: i64) -> Val<::glam::I64Vec2> { + let output: Val<::glam::I64Vec2> = <::glam::I64Vec2 as ::core::ops::Mul< + i64, + >>::mul(_self.into_inner(), rhs) + .into(); + output + } + fn neg(_self: Val<::glam::I64Vec2>) -> Val<::glam::I64Vec2> { + let output: Val<::glam::I64Vec2> = <::glam::I64Vec2 as ::core::ops::Neg>::neg( + _self.into_inner(), + ) + .into(); + output + } + /// Creates a new vector. + fn new(x: i64, y: i64) -> Val<::glam::I64Vec2> { + let output: Val<::glam::I64Vec2> = ::glam::I64Vec2::new(x, y).into(); + output + } + /// Returns a vector that is equal to `self` rotated by 90 degrees. + fn perp(_self: Val<::glam::I64Vec2>) -> Val<::glam::I64Vec2> { + let output: Val<::glam::I64Vec2> = ::glam::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<::glam::I64Vec2>, rhs: Val<::glam::I64Vec2>) -> i64 { + let output: i64 = ::glam::I64Vec2::perp_dot(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + fn rem( + _self: Val<::glam::I64Vec2>, + rhs: Ref<::glam::I64Vec2>, + ) -> Val<::glam::I64Vec2> { + let output: Val<::glam::I64Vec2> = <::glam::I64Vec2 as ::core::ops::Rem< + &::glam::I64Vec2, + >>::rem(_self.into_inner(), &rhs) + .into(); + output + } + fn rem( + _self: Val<::glam::I64Vec2>, + rhs: Val<::glam::I64Vec2>, + ) -> Val<::glam::I64Vec2> { + let output: Val<::glam::I64Vec2> = <::glam::I64Vec2 as ::core::ops::Rem< + ::glam::I64Vec2, + >>::rem(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + fn rem(_self: Val<::glam::I64Vec2>, rhs: i64) -> Val<::glam::I64Vec2> { + let output: Val<::glam::I64Vec2> = <::glam::I64Vec2 as ::core::ops::Rem< + i64, + >>::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<::glam::I64Vec2>, + rhs: Val<::glam::I64Vec2>, + ) -> Val<::glam::I64Vec2> { + let output: Val<::glam::I64Vec2> = ::glam::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<::glam::I64Vec2>, + rhs: Val<::glam::I64Vec2>, + ) -> Val<::glam::I64Vec2> { + let output: Val<::glam::I64Vec2> = ::glam::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<::glam::I64Vec2>, + rhs: Val<::glam::I64Vec2>, + ) -> Val<::glam::I64Vec2> { + let output: Val<::glam::I64Vec2> = ::glam::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<::glam::I64Vec2>, + rhs: Val<::glam::U64Vec2>, + ) -> Val<::glam::I64Vec2> { + let output: Val<::glam::I64Vec2> = ::glam::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<::glam::I64Vec2>, + rhs: Val<::glam::I64Vec2>, + ) -> Val<::glam::I64Vec2> { + let output: Val<::glam::I64Vec2> = ::glam::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<::glam::I64Vec2>, + rhs: Val<::glam::I64Vec2>, + ) -> Val<::glam::I64Vec2> { + let output: Val<::glam::I64Vec2> = ::glam::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<::glam::I64Vec2>, + rhs: Val<::glam::I64Vec2>, + ) -> Val<::glam::I64Vec2> { + let output: Val<::glam::I64Vec2> = ::glam::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<::glam::I64Vec2>, + rhs: Val<::glam::U64Vec2>, + ) -> Val<::glam::I64Vec2> { + let output: Val<::glam::I64Vec2> = ::glam::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<::glam::BVec2>, + if_true: Val<::glam::I64Vec2>, + if_false: Val<::glam::I64Vec2>, + ) -> Val<::glam::I64Vec2> { + let output: Val<::glam::I64Vec2> = ::glam::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<::glam::I64Vec2>) -> Val<::glam::I64Vec2> { + let output: Val<::glam::I64Vec2> = ::glam::I64Vec2::signum(_self.into_inner()) + .into(); + output + } + /// Creates a vector with all elements set to `v`. + fn splat(v: i64) -> Val<::glam::I64Vec2> { + let output: Val<::glam::I64Vec2> = ::glam::I64Vec2::splat(v).into(); + output + } + fn sub( + _self: Val<::glam::I64Vec2>, + rhs: Ref<::glam::I64Vec2>, + ) -> Val<::glam::I64Vec2> { + let output: Val<::glam::I64Vec2> = <::glam::I64Vec2 as ::core::ops::Sub< + &::glam::I64Vec2, + >>::sub(_self.into_inner(), &rhs) + .into(); + output + } + fn sub( + _self: Val<::glam::I64Vec2>, + rhs: Val<::glam::I64Vec2>, + ) -> Val<::glam::I64Vec2> { + let output: Val<::glam::I64Vec2> = <::glam::I64Vec2 as ::core::ops::Sub< + ::glam::I64Vec2, + >>::sub(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + fn sub(_self: Val<::glam::I64Vec2>, rhs: i64) -> Val<::glam::I64Vec2> { + let output: Val<::glam::I64Vec2> = <::glam::I64Vec2 as ::core::ops::Sub< + i64, + >>::sub(_self.into_inner(), rhs) + .into(); + output + } + /// `[x, y]` + fn to_array(_self: Ref<::glam::I64Vec2>) -> [i64; 2] { + let output: [i64; 2] = ::glam::I64Vec2::to_array(&_self).into(); + output + } + /// Creates a 2D vector from `self` with the given value of `x`. + fn with_x(_self: Val<::glam::I64Vec2>, x: i64) -> Val<::glam::I64Vec2> { + let output: Val<::glam::I64Vec2> = ::glam::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<::glam::I64Vec2>, y: i64) -> Val<::glam::I64Vec2> { + let output: Val<::glam::I64Vec2> = ::glam::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<::glam::I64Vec2>, + rhs: Val<::glam::I64Vec2>, + ) -> Val<::glam::I64Vec2> { + let output: Val<::glam::I64Vec2> = ::glam::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<::glam::I64Vec2>, + rhs: Val<::glam::U64Vec2>, + ) -> Val<::glam::I64Vec2> { + let output: Val<::glam::I64Vec2> = ::glam::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<::glam::I64Vec2>, + rhs: Val<::glam::I64Vec2>, + ) -> Val<::glam::I64Vec2> { + let output: Val<::glam::I64Vec2> = ::glam::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<::glam::I64Vec2>, + rhs: Val<::glam::I64Vec2>, + ) -> Val<::glam::I64Vec2> { + let output: Val<::glam::I64Vec2> = ::glam::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<::glam::I64Vec2>, + rhs: Val<::glam::I64Vec2>, + ) -> Val<::glam::I64Vec2> { + let output: Val<::glam::I64Vec2> = ::glam::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<::glam::I64Vec2>, + rhs: Val<::glam::U64Vec2>, + ) -> Val<::glam::I64Vec2> { + let output: Val<::glam::I64Vec2> = ::glam::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 ::glam::I64Vec3 { + /// Returns a vector containing the absolute value of each element of `self`. + fn abs(_self: Val<::glam::I64Vec3>) -> Val<::glam::I64Vec3> { + let output: Val<::glam::I64Vec3> = ::glam::I64Vec3::abs(_self.into_inner()) + .into(); + output + } + fn add( + _self: Val<::glam::I64Vec3>, + rhs: Ref<::glam::I64Vec3>, + ) -> Val<::glam::I64Vec3> { + let output: Val<::glam::I64Vec3> = <::glam::I64Vec3 as ::core::ops::Add< + &::glam::I64Vec3, + >>::add(_self.into_inner(), &rhs) + .into(); + output + } + fn add( + _self: Val<::glam::I64Vec3>, + rhs: Val<::glam::I64Vec3>, + ) -> Val<::glam::I64Vec3> { + let output: Val<::glam::I64Vec3> = <::glam::I64Vec3 as ::core::ops::Add< + ::glam::I64Vec3, + >>::add(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + fn add(_self: Val<::glam::I64Vec3>, rhs: i64) -> Val<::glam::I64Vec3> { + let output: Val<::glam::I64Vec3> = <::glam::I64Vec3 as ::core::ops::Add< + i64, + >>::add(_self.into_inner(), rhs) + .into(); + output + } + /// Casts all elements of `self` to `f64`. + fn as_dvec3(_self: Ref<::glam::I64Vec3>) -> Val<::glam::DVec3> { + let output: Val<::glam::DVec3> = ::glam::I64Vec3::as_dvec3(&_self).into(); + output + } + /// Casts all elements of `self` to `i16`. + fn as_i16vec3(_self: Ref<::glam::I64Vec3>) -> Val<::glam::I16Vec3> { + let output: Val<::glam::I16Vec3> = ::glam::I64Vec3::as_i16vec3(&_self).into(); + output + } + /// Casts all elements of `self` to `i8`. + fn as_i8vec3(_self: Ref<::glam::I64Vec3>) -> Val<::glam::I8Vec3> { + let output: Val<::glam::I8Vec3> = ::glam::I64Vec3::as_i8vec3(&_self).into(); + output + } + /// Casts all elements of `self` to `i32`. + fn as_ivec3(_self: Ref<::glam::I64Vec3>) -> Val<::glam::IVec3> { + let output: Val<::glam::IVec3> = ::glam::I64Vec3::as_ivec3(&_self).into(); + output + } + /// Casts all elements of `self` to `u16`. + fn as_u16vec3(_self: Ref<::glam::I64Vec3>) -> Val<::glam::U16Vec3> { + let output: Val<::glam::U16Vec3> = ::glam::I64Vec3::as_u16vec3(&_self).into(); + output + } + /// Casts all elements of `self` to `u64`. + fn as_u64vec3(_self: Ref<::glam::I64Vec3>) -> Val<::glam::U64Vec3> { + let output: Val<::glam::U64Vec3> = ::glam::I64Vec3::as_u64vec3(&_self).into(); + output + } + /// Casts all elements of `self` to `u8`. + fn as_u8vec3(_self: Ref<::glam::I64Vec3>) -> Val<::glam::U8Vec3> { + let output: Val<::glam::U8Vec3> = ::glam::I64Vec3::as_u8vec3(&_self).into(); + output + } + /// Casts all elements of `self` to `u32`. + fn as_uvec3(_self: Ref<::glam::I64Vec3>) -> Val<::glam::UVec3> { + let output: Val<::glam::UVec3> = ::glam::I64Vec3::as_uvec3(&_self).into(); + output + } + /// Casts all elements of `self` to `f32`. + fn as_vec3(_self: Ref<::glam::I64Vec3>) -> Val<::glam::Vec3> { + let output: Val<::glam::Vec3> = ::glam::I64Vec3::as_vec3(&_self).into(); + output + } + /// Casts all elements of `self` to `f32`. + fn as_vec3a(_self: Ref<::glam::I64Vec3>) -> Val<::glam::Vec3A> { + let output: Val<::glam::Vec3A> = ::glam::I64Vec3::as_vec3a(&_self).into(); + output + } + fn assert_receiver_is_total_eq(_self: Ref<::glam::I64Vec3>) -> () { + let output: () = <::glam::I64Vec3 as ::core::cmp::Eq>::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<::glam::I64Vec3>, + min: Val<::glam::I64Vec3>, + max: Val<::glam::I64Vec3>, + ) -> Val<::glam::I64Vec3> { + let output: Val<::glam::I64Vec3> = ::glam::I64Vec3::clamp( + _self.into_inner(), + min.into_inner(), + max.into_inner(), + ) + .into(); + output + } + fn clone(_self: Ref<::glam::I64Vec3>) -> Val<::glam::I64Vec3> { + let output: Val<::glam::I64Vec3> = <::glam::I64Vec3 as ::bevy_reflect::erased_serde::__private::serde::__private::Clone>::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<::glam::I64Vec3>, + rhs: Val<::glam::I64Vec3>, + ) -> Val<::glam::BVec3> { + let output: Val<::glam::BVec3> = ::glam::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<::glam::I64Vec3>, + rhs: Val<::glam::I64Vec3>, + ) -> Val<::glam::BVec3> { + let output: Val<::glam::BVec3> = ::glam::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<::glam::I64Vec3>, + rhs: Val<::glam::I64Vec3>, + ) -> Val<::glam::BVec3> { + let output: Val<::glam::BVec3> = ::glam::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<::glam::I64Vec3>, + rhs: Val<::glam::I64Vec3>, + ) -> Val<::glam::BVec3> { + let output: Val<::glam::BVec3> = ::glam::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<::glam::I64Vec3>, + rhs: Val<::glam::I64Vec3>, + ) -> Val<::glam::BVec3> { + let output: Val<::glam::BVec3> = ::glam::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<::glam::I64Vec3>, + rhs: Val<::glam::I64Vec3>, + ) -> Val<::glam::BVec3> { + let output: Val<::glam::BVec3> = ::glam::I64Vec3::cmpne( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Computes the cross product of `self` and `rhs`. + fn cross( + _self: Val<::glam::I64Vec3>, + rhs: Val<::glam::I64Vec3>, + ) -> Val<::glam::I64Vec3> { + let output: Val<::glam::I64Vec3> = ::glam::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<::glam::I64Vec3>, rhs: Val<::glam::I64Vec3>) -> i64 { + let output: i64 = ::glam::I64Vec3::distance_squared( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + fn div( + _self: Val<::glam::I64Vec3>, + rhs: Ref<::glam::I64Vec3>, + ) -> Val<::glam::I64Vec3> { + let output: Val<::glam::I64Vec3> = <::glam::I64Vec3 as ::core::ops::Div< + &::glam::I64Vec3, + >>::div(_self.into_inner(), &rhs) + .into(); + output + } + fn div( + _self: Val<::glam::I64Vec3>, + rhs: Val<::glam::I64Vec3>, + ) -> Val<::glam::I64Vec3> { + let output: Val<::glam::I64Vec3> = <::glam::I64Vec3 as ::core::ops::Div< + ::glam::I64Vec3, + >>::div(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + fn div(_self: Val<::glam::I64Vec3>, rhs: i64) -> Val<::glam::I64Vec3> { + let output: Val<::glam::I64Vec3> = <::glam::I64Vec3 as ::core::ops::Div< + i64, + >>::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<::glam::I64Vec3>, + rhs: Val<::glam::I64Vec3>, + ) -> Val<::glam::I64Vec3> { + let output: Val<::glam::I64Vec3> = ::glam::I64Vec3::div_euclid( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Computes the dot product of `self` and `rhs`. + fn dot(_self: Val<::glam::I64Vec3>, rhs: Val<::glam::I64Vec3>) -> i64 { + let output: i64 = ::glam::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<::glam::I64Vec3>, + rhs: Val<::glam::I64Vec3>, + ) -> Val<::glam::I64Vec3> { + let output: Val<::glam::I64Vec3> = ::glam::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<::glam::I64Vec3>) -> i64 { + let output: i64 = ::glam::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<::glam::I64Vec3>) -> i64 { + let output: i64 = ::glam::I64Vec3::element_sum(_self.into_inner()).into(); + output + } + fn eq(_self: Ref<::glam::I64Vec3>, other: Ref<::glam::I64Vec3>) -> bool { + let output: bool = <::glam::I64Vec3 as ::core::cmp::PartialEq< + ::glam::I64Vec3, + >>::eq(&_self, &other) + .into(); + output + } + /// Creates a 4D vector from `self` and the given `w` value. + fn extend(_self: Val<::glam::I64Vec3>, w: i64) -> Val<::glam::I64Vec4> { + let output: Val<::glam::I64Vec4> = ::glam::I64Vec3::extend(_self.into_inner(), w) + .into(); + output + } + /// Creates a new vector from an array. + fn from_array(a: [i64; 3]) -> Val<::glam::I64Vec3> { + let output: Val<::glam::I64Vec3> = ::glam::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<::glam::I64Vec3>) -> u32 { + let output: u32 = ::glam::I64Vec3::is_negative_bitmask(_self.into_inner()) + .into(); + output + } + /// Computes the squared length of `self`. + fn length_squared(_self: Val<::glam::I64Vec3>) -> i64 { + let output: i64 = ::glam::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<::glam::I64Vec3>, + rhs: Val<::glam::I64Vec3>, + ) -> Val<::glam::I64Vec3> { + let output: Val<::glam::I64Vec3> = ::glam::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<::glam::I64Vec3>) -> i64 { + let output: i64 = ::glam::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<::glam::I64Vec3>, + rhs: Val<::glam::I64Vec3>, + ) -> Val<::glam::I64Vec3> { + let output: Val<::glam::I64Vec3> = ::glam::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<::glam::I64Vec3>) -> i64 { + let output: i64 = ::glam::I64Vec3::min_element(_self.into_inner()).into(); + output + } + fn mul( + _self: Val<::glam::I64Vec3>, + rhs: Ref<::glam::I64Vec3>, + ) -> Val<::glam::I64Vec3> { + let output: Val<::glam::I64Vec3> = <::glam::I64Vec3 as ::core::ops::Mul< + &::glam::I64Vec3, + >>::mul(_self.into_inner(), &rhs) + .into(); + output + } + fn mul( + _self: Val<::glam::I64Vec3>, + rhs: Val<::glam::I64Vec3>, + ) -> Val<::glam::I64Vec3> { + let output: Val<::glam::I64Vec3> = <::glam::I64Vec3 as ::core::ops::Mul< + ::glam::I64Vec3, + >>::mul(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + fn mul(_self: Val<::glam::I64Vec3>, rhs: i64) -> Val<::glam::I64Vec3> { + let output: Val<::glam::I64Vec3> = <::glam::I64Vec3 as ::core::ops::Mul< + i64, + >>::mul(_self.into_inner(), rhs) + .into(); + output + } + fn neg(_self: Val<::glam::I64Vec3>) -> Val<::glam::I64Vec3> { + let output: Val<::glam::I64Vec3> = <::glam::I64Vec3 as ::core::ops::Neg>::neg( + _self.into_inner(), + ) + .into(); + output + } + /// Creates a new vector. + fn new(x: i64, y: i64, z: i64) -> Val<::glam::I64Vec3> { + let output: Val<::glam::I64Vec3> = ::glam::I64Vec3::new(x, y, z).into(); + output + } + fn rem( + _self: Val<::glam::I64Vec3>, + rhs: Ref<::glam::I64Vec3>, + ) -> Val<::glam::I64Vec3> { + let output: Val<::glam::I64Vec3> = <::glam::I64Vec3 as ::core::ops::Rem< + &::glam::I64Vec3, + >>::rem(_self.into_inner(), &rhs) + .into(); + output + } + fn rem( + _self: Val<::glam::I64Vec3>, + rhs: Val<::glam::I64Vec3>, + ) -> Val<::glam::I64Vec3> { + let output: Val<::glam::I64Vec3> = <::glam::I64Vec3 as ::core::ops::Rem< + ::glam::I64Vec3, + >>::rem(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + fn rem(_self: Val<::glam::I64Vec3>, rhs: i64) -> Val<::glam::I64Vec3> { + let output: Val<::glam::I64Vec3> = <::glam::I64Vec3 as ::core::ops::Rem< + i64, + >>::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<::glam::I64Vec3>, + rhs: Val<::glam::I64Vec3>, + ) -> Val<::glam::I64Vec3> { + let output: Val<::glam::I64Vec3> = ::glam::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<::glam::I64Vec3>, + rhs: Val<::glam::I64Vec3>, + ) -> Val<::glam::I64Vec3> { + let output: Val<::glam::I64Vec3> = ::glam::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<::glam::I64Vec3>, + rhs: Val<::glam::U64Vec3>, + ) -> Val<::glam::I64Vec3> { + let output: Val<::glam::I64Vec3> = ::glam::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<::glam::I64Vec3>, + rhs: Val<::glam::I64Vec3>, + ) -> Val<::glam::I64Vec3> { + let output: Val<::glam::I64Vec3> = ::glam::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<::glam::I64Vec3>, + rhs: Val<::glam::I64Vec3>, + ) -> Val<::glam::I64Vec3> { + let output: Val<::glam::I64Vec3> = ::glam::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<::glam::I64Vec3>, + rhs: Val<::glam::I64Vec3>, + ) -> Val<::glam::I64Vec3> { + let output: Val<::glam::I64Vec3> = ::glam::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<::glam::I64Vec3>, + rhs: Val<::glam::U64Vec3>, + ) -> Val<::glam::I64Vec3> { + let output: Val<::glam::I64Vec3> = ::glam::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<::glam::BVec3>, + if_true: Val<::glam::I64Vec3>, + if_false: Val<::glam::I64Vec3>, + ) -> Val<::glam::I64Vec3> { + let output: Val<::glam::I64Vec3> = ::glam::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<::glam::I64Vec3>) -> Val<::glam::I64Vec3> { + let output: Val<::glam::I64Vec3> = ::glam::I64Vec3::signum(_self.into_inner()) + .into(); + output + } + /// Creates a vector with all elements set to `v`. + fn splat(v: i64) -> Val<::glam::I64Vec3> { + let output: Val<::glam::I64Vec3> = ::glam::I64Vec3::splat(v).into(); + output + } + fn sub( + _self: Val<::glam::I64Vec3>, + rhs: Ref<::glam::I64Vec3>, + ) -> Val<::glam::I64Vec3> { + let output: Val<::glam::I64Vec3> = <::glam::I64Vec3 as ::core::ops::Sub< + &::glam::I64Vec3, + >>::sub(_self.into_inner(), &rhs) + .into(); + output + } + fn sub( + _self: Val<::glam::I64Vec3>, + rhs: Val<::glam::I64Vec3>, + ) -> Val<::glam::I64Vec3> { + let output: Val<::glam::I64Vec3> = <::glam::I64Vec3 as ::core::ops::Sub< + ::glam::I64Vec3, + >>::sub(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + fn sub(_self: Val<::glam::I64Vec3>, rhs: i64) -> Val<::glam::I64Vec3> { + let output: Val<::glam::I64Vec3> = <::glam::I64Vec3 as ::core::ops::Sub< + i64, + >>::sub(_self.into_inner(), rhs) + .into(); + output + } + /// `[x, y, z]` + fn to_array(_self: Ref<::glam::I64Vec3>) -> [i64; 3] { + let output: [i64; 3] = ::glam::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<::glam::I64Vec3>) -> Val<::glam::I64Vec2> { + let output: Val<::glam::I64Vec2> = ::glam::I64Vec3::truncate(_self.into_inner()) + .into(); + output + } + /// Creates a 3D vector from `self` with the given value of `x`. + fn with_x(_self: Val<::glam::I64Vec3>, x: i64) -> Val<::glam::I64Vec3> { + let output: Val<::glam::I64Vec3> = ::glam::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<::glam::I64Vec3>, y: i64) -> Val<::glam::I64Vec3> { + let output: Val<::glam::I64Vec3> = ::glam::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<::glam::I64Vec3>, z: i64) -> Val<::glam::I64Vec3> { + let output: Val<::glam::I64Vec3> = ::glam::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<::glam::I64Vec3>, + rhs: Val<::glam::I64Vec3>, + ) -> Val<::glam::I64Vec3> { + let output: Val<::glam::I64Vec3> = ::glam::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<::glam::I64Vec3>, + rhs: Val<::glam::U64Vec3>, + ) -> Val<::glam::I64Vec3> { + let output: Val<::glam::I64Vec3> = ::glam::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<::glam::I64Vec3>, + rhs: Val<::glam::I64Vec3>, + ) -> Val<::glam::I64Vec3> { + let output: Val<::glam::I64Vec3> = ::glam::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<::glam::I64Vec3>, + rhs: Val<::glam::I64Vec3>, + ) -> Val<::glam::I64Vec3> { + let output: Val<::glam::I64Vec3> = ::glam::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<::glam::I64Vec3>, + rhs: Val<::glam::I64Vec3>, + ) -> Val<::glam::I64Vec3> { + let output: Val<::glam::I64Vec3> = ::glam::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<::glam::I64Vec3>, + rhs: Val<::glam::U64Vec3>, + ) -> Val<::glam::I64Vec3> { + let output: Val<::glam::I64Vec3> = ::glam::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 ::glam::I64Vec4 { + /// Returns a vector containing the absolute value of each element of `self`. + fn abs(_self: Val<::glam::I64Vec4>) -> Val<::glam::I64Vec4> { + let output: Val<::glam::I64Vec4> = ::glam::I64Vec4::abs(_self.into_inner()) + .into(); + output + } + fn add( + _self: Val<::glam::I64Vec4>, + rhs: Ref<::glam::I64Vec4>, + ) -> Val<::glam::I64Vec4> { + let output: Val<::glam::I64Vec4> = <::glam::I64Vec4 as ::core::ops::Add< + &::glam::I64Vec4, + >>::add(_self.into_inner(), &rhs) + .into(); + output + } + fn add( + _self: Val<::glam::I64Vec4>, + rhs: Val<::glam::I64Vec4>, + ) -> Val<::glam::I64Vec4> { + let output: Val<::glam::I64Vec4> = <::glam::I64Vec4 as ::core::ops::Add< + ::glam::I64Vec4, + >>::add(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + fn add(_self: Val<::glam::I64Vec4>, rhs: i64) -> Val<::glam::I64Vec4> { + let output: Val<::glam::I64Vec4> = <::glam::I64Vec4 as ::core::ops::Add< + i64, + >>::add(_self.into_inner(), rhs) + .into(); + output + } + /// Casts all elements of `self` to `f64`. + fn as_dvec4(_self: Ref<::glam::I64Vec4>) -> Val<::glam::DVec4> { + let output: Val<::glam::DVec4> = ::glam::I64Vec4::as_dvec4(&_self).into(); + output + } + /// Casts all elements of `self` to `i16`. + fn as_i16vec4(_self: Ref<::glam::I64Vec4>) -> Val<::glam::I16Vec4> { + let output: Val<::glam::I16Vec4> = ::glam::I64Vec4::as_i16vec4(&_self).into(); + output + } + /// Casts all elements of `self` to `i8`. + fn as_i8vec4(_self: Ref<::glam::I64Vec4>) -> Val<::glam::I8Vec4> { + let output: Val<::glam::I8Vec4> = ::glam::I64Vec4::as_i8vec4(&_self).into(); + output + } + /// Casts all elements of `self` to `i32`. + fn as_ivec4(_self: Ref<::glam::I64Vec4>) -> Val<::glam::IVec4> { + let output: Val<::glam::IVec4> = ::glam::I64Vec4::as_ivec4(&_self).into(); + output + } + /// Casts all elements of `self` to `u16`. + fn as_u16vec4(_self: Ref<::glam::I64Vec4>) -> Val<::glam::U16Vec4> { + let output: Val<::glam::U16Vec4> = ::glam::I64Vec4::as_u16vec4(&_self).into(); + output + } + /// Casts all elements of `self` to `u64`. + fn as_u64vec4(_self: Ref<::glam::I64Vec4>) -> Val<::glam::U64Vec4> { + let output: Val<::glam::U64Vec4> = ::glam::I64Vec4::as_u64vec4(&_self).into(); + output + } + /// Casts all elements of `self` to `u8`. + fn as_u8vec4(_self: Ref<::glam::I64Vec4>) -> Val<::glam::U8Vec4> { + let output: Val<::glam::U8Vec4> = ::glam::I64Vec4::as_u8vec4(&_self).into(); + output + } + /// Casts all elements of `self` to `u32`. + fn as_uvec4(_self: Ref<::glam::I64Vec4>) -> Val<::glam::UVec4> { + let output: Val<::glam::UVec4> = ::glam::I64Vec4::as_uvec4(&_self).into(); + output + } + /// Casts all elements of `self` to `f32`. + fn as_vec4(_self: Ref<::glam::I64Vec4>) -> Val<::glam::Vec4> { + let output: Val<::glam::Vec4> = ::glam::I64Vec4::as_vec4(&_self).into(); + output + } + fn assert_receiver_is_total_eq(_self: Ref<::glam::I64Vec4>) -> () { + let output: () = <::glam::I64Vec4 as ::core::cmp::Eq>::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<::glam::I64Vec4>, + min: Val<::glam::I64Vec4>, + max: Val<::glam::I64Vec4>, + ) -> Val<::glam::I64Vec4> { + let output: Val<::glam::I64Vec4> = ::glam::I64Vec4::clamp( + _self.into_inner(), + min.into_inner(), + max.into_inner(), + ) + .into(); + output + } + fn clone(_self: Ref<::glam::I64Vec4>) -> Val<::glam::I64Vec4> { + let output: Val<::glam::I64Vec4> = <::glam::I64Vec4 as ::bevy_reflect::erased_serde::__private::serde::__private::Clone>::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<::glam::I64Vec4>, + rhs: Val<::glam::I64Vec4>, + ) -> Val<::glam::BVec4> { + let output: Val<::glam::BVec4> = ::glam::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<::glam::I64Vec4>, + rhs: Val<::glam::I64Vec4>, + ) -> Val<::glam::BVec4> { + let output: Val<::glam::BVec4> = ::glam::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<::glam::I64Vec4>, + rhs: Val<::glam::I64Vec4>, + ) -> Val<::glam::BVec4> { + let output: Val<::glam::BVec4> = ::glam::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<::glam::I64Vec4>, + rhs: Val<::glam::I64Vec4>, + ) -> Val<::glam::BVec4> { + let output: Val<::glam::BVec4> = ::glam::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<::glam::I64Vec4>, + rhs: Val<::glam::I64Vec4>, + ) -> Val<::glam::BVec4> { + let output: Val<::glam::BVec4> = ::glam::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<::glam::I64Vec4>, + rhs: Val<::glam::I64Vec4>, + ) -> Val<::glam::BVec4> { + let output: Val<::glam::BVec4> = ::glam::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<::glam::I64Vec4>, rhs: Val<::glam::I64Vec4>) -> i64 { + let output: i64 = ::glam::I64Vec4::distance_squared( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + fn div( + _self: Val<::glam::I64Vec4>, + rhs: Ref<::glam::I64Vec4>, + ) -> Val<::glam::I64Vec4> { + let output: Val<::glam::I64Vec4> = <::glam::I64Vec4 as ::core::ops::Div< + &::glam::I64Vec4, + >>::div(_self.into_inner(), &rhs) + .into(); + output + } + fn div( + _self: Val<::glam::I64Vec4>, + rhs: Val<::glam::I64Vec4>, + ) -> Val<::glam::I64Vec4> { + let output: Val<::glam::I64Vec4> = <::glam::I64Vec4 as ::core::ops::Div< + ::glam::I64Vec4, + >>::div(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + fn div(_self: Val<::glam::I64Vec4>, rhs: i64) -> Val<::glam::I64Vec4> { + let output: Val<::glam::I64Vec4> = <::glam::I64Vec4 as ::core::ops::Div< + i64, + >>::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<::glam::I64Vec4>, + rhs: Val<::glam::I64Vec4>, + ) -> Val<::glam::I64Vec4> { + let output: Val<::glam::I64Vec4> = ::glam::I64Vec4::div_euclid( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Computes the dot product of `self` and `rhs`. + fn dot(_self: Val<::glam::I64Vec4>, rhs: Val<::glam::I64Vec4>) -> i64 { + let output: i64 = ::glam::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<::glam::I64Vec4>, + rhs: Val<::glam::I64Vec4>, + ) -> Val<::glam::I64Vec4> { + let output: Val<::glam::I64Vec4> = ::glam::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<::glam::I64Vec4>) -> i64 { + let output: i64 = ::glam::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<::glam::I64Vec4>) -> i64 { + let output: i64 = ::glam::I64Vec4::element_sum(_self.into_inner()).into(); + output + } + fn eq(_self: Ref<::glam::I64Vec4>, other: Ref<::glam::I64Vec4>) -> bool { + let output: bool = <::glam::I64Vec4 as ::core::cmp::PartialEq< + ::glam::I64Vec4, + >>::eq(&_self, &other) + .into(); + output + } + /// Creates a new vector from an array. + fn from_array(a: [i64; 4]) -> Val<::glam::I64Vec4> { + let output: Val<::glam::I64Vec4> = ::glam::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<::glam::I64Vec4>) -> u32 { + let output: u32 = ::glam::I64Vec4::is_negative_bitmask(_self.into_inner()) + .into(); + output + } + /// Computes the squared length of `self`. + fn length_squared(_self: Val<::glam::I64Vec4>) -> i64 { + let output: i64 = ::glam::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<::glam::I64Vec4>, + rhs: Val<::glam::I64Vec4>, + ) -> Val<::glam::I64Vec4> { + let output: Val<::glam::I64Vec4> = ::glam::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<::glam::I64Vec4>) -> i64 { + let output: i64 = ::glam::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<::glam::I64Vec4>, + rhs: Val<::glam::I64Vec4>, + ) -> Val<::glam::I64Vec4> { + let output: Val<::glam::I64Vec4> = ::glam::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<::glam::I64Vec4>) -> i64 { + let output: i64 = ::glam::I64Vec4::min_element(_self.into_inner()).into(); + output + } + fn mul( + _self: Val<::glam::I64Vec4>, + rhs: Ref<::glam::I64Vec4>, + ) -> Val<::glam::I64Vec4> { + let output: Val<::glam::I64Vec4> = <::glam::I64Vec4 as ::core::ops::Mul< + &::glam::I64Vec4, + >>::mul(_self.into_inner(), &rhs) + .into(); + output + } + fn mul( + _self: Val<::glam::I64Vec4>, + rhs: Val<::glam::I64Vec4>, + ) -> Val<::glam::I64Vec4> { + let output: Val<::glam::I64Vec4> = <::glam::I64Vec4 as ::core::ops::Mul< + ::glam::I64Vec4, + >>::mul(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + fn mul(_self: Val<::glam::I64Vec4>, rhs: i64) -> Val<::glam::I64Vec4> { + let output: Val<::glam::I64Vec4> = <::glam::I64Vec4 as ::core::ops::Mul< + i64, + >>::mul(_self.into_inner(), rhs) + .into(); + output + } + fn neg(_self: Val<::glam::I64Vec4>) -> Val<::glam::I64Vec4> { + let output: Val<::glam::I64Vec4> = <::glam::I64Vec4 as ::core::ops::Neg>::neg( + _self.into_inner(), + ) + .into(); + output + } + /// Creates a new vector. + fn new(x: i64, y: i64, z: i64, w: i64) -> Val<::glam::I64Vec4> { + let output: Val<::glam::I64Vec4> = ::glam::I64Vec4::new(x, y, z, w).into(); + output + } + fn rem( + _self: Val<::glam::I64Vec4>, + rhs: Ref<::glam::I64Vec4>, + ) -> Val<::glam::I64Vec4> { + let output: Val<::glam::I64Vec4> = <::glam::I64Vec4 as ::core::ops::Rem< + &::glam::I64Vec4, + >>::rem(_self.into_inner(), &rhs) + .into(); + output + } + fn rem( + _self: Val<::glam::I64Vec4>, + rhs: Val<::glam::I64Vec4>, + ) -> Val<::glam::I64Vec4> { + let output: Val<::glam::I64Vec4> = <::glam::I64Vec4 as ::core::ops::Rem< + ::glam::I64Vec4, + >>::rem(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + fn rem(_self: Val<::glam::I64Vec4>, rhs: i64) -> Val<::glam::I64Vec4> { + let output: Val<::glam::I64Vec4> = <::glam::I64Vec4 as ::core::ops::Rem< + i64, + >>::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<::glam::I64Vec4>, + rhs: Val<::glam::I64Vec4>, + ) -> Val<::glam::I64Vec4> { + let output: Val<::glam::I64Vec4> = ::glam::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<::glam::I64Vec4>, + rhs: Val<::glam::I64Vec4>, + ) -> Val<::glam::I64Vec4> { + let output: Val<::glam::I64Vec4> = ::glam::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<::glam::I64Vec4>, + rhs: Val<::glam::U64Vec4>, + ) -> Val<::glam::I64Vec4> { + let output: Val<::glam::I64Vec4> = ::glam::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<::glam::I64Vec4>, + rhs: Val<::glam::I64Vec4>, + ) -> Val<::glam::I64Vec4> { + let output: Val<::glam::I64Vec4> = ::glam::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<::glam::I64Vec4>, + rhs: Val<::glam::I64Vec4>, + ) -> Val<::glam::I64Vec4> { + let output: Val<::glam::I64Vec4> = ::glam::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<::glam::I64Vec4>, + rhs: Val<::glam::I64Vec4>, + ) -> Val<::glam::I64Vec4> { + let output: Val<::glam::I64Vec4> = ::glam::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<::glam::I64Vec4>, + rhs: Val<::glam::U64Vec4>, + ) -> Val<::glam::I64Vec4> { + let output: Val<::glam::I64Vec4> = ::glam::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<::glam::BVec4>, + if_true: Val<::glam::I64Vec4>, + if_false: Val<::glam::I64Vec4>, + ) -> Val<::glam::I64Vec4> { + let output: Val<::glam::I64Vec4> = ::glam::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<::glam::I64Vec4>) -> Val<::glam::I64Vec4> { + let output: Val<::glam::I64Vec4> = ::glam::I64Vec4::signum(_self.into_inner()) + .into(); + output + } + /// Creates a vector with all elements set to `v`. + fn splat(v: i64) -> Val<::glam::I64Vec4> { + let output: Val<::glam::I64Vec4> = ::glam::I64Vec4::splat(v).into(); + output + } + fn sub( + _self: Val<::glam::I64Vec4>, + rhs: Ref<::glam::I64Vec4>, + ) -> Val<::glam::I64Vec4> { + let output: Val<::glam::I64Vec4> = <::glam::I64Vec4 as ::core::ops::Sub< + &::glam::I64Vec4, + >>::sub(_self.into_inner(), &rhs) + .into(); + output + } + fn sub( + _self: Val<::glam::I64Vec4>, + rhs: Val<::glam::I64Vec4>, + ) -> Val<::glam::I64Vec4> { + let output: Val<::glam::I64Vec4> = <::glam::I64Vec4 as ::core::ops::Sub< + ::glam::I64Vec4, + >>::sub(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + fn sub(_self: Val<::glam::I64Vec4>, rhs: i64) -> Val<::glam::I64Vec4> { + let output: Val<::glam::I64Vec4> = <::glam::I64Vec4 as ::core::ops::Sub< + i64, + >>::sub(_self.into_inner(), rhs) + .into(); + output + } + /// `[x, y, z, w]` + fn to_array(_self: Ref<::glam::I64Vec4>) -> [i64; 4] { + let output: [i64; 4] = ::glam::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<::glam::I64Vec4>) -> Val<::glam::I64Vec3> { + let output: Val<::glam::I64Vec3> = ::glam::I64Vec4::truncate(_self.into_inner()) + .into(); + output + } + /// Creates a 4D vector from `self` with the given value of `w`. + fn with_w(_self: Val<::glam::I64Vec4>, w: i64) -> Val<::glam::I64Vec4> { + let output: Val<::glam::I64Vec4> = ::glam::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<::glam::I64Vec4>, x: i64) -> Val<::glam::I64Vec4> { + let output: Val<::glam::I64Vec4> = ::glam::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<::glam::I64Vec4>, y: i64) -> Val<::glam::I64Vec4> { + let output: Val<::glam::I64Vec4> = ::glam::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<::glam::I64Vec4>, z: i64) -> Val<::glam::I64Vec4> { + let output: Val<::glam::I64Vec4> = ::glam::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<::glam::I64Vec4>, + rhs: Val<::glam::I64Vec4>, + ) -> Val<::glam::I64Vec4> { + let output: Val<::glam::I64Vec4> = ::glam::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<::glam::I64Vec4>, + rhs: Val<::glam::U64Vec4>, + ) -> Val<::glam::I64Vec4> { + let output: Val<::glam::I64Vec4> = ::glam::I64Vec4::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<::glam::I64Vec4>, + rhs: Val<::glam::I64Vec4>, + ) -> Val<::glam::I64Vec4> { + let output: Val<::glam::I64Vec4> = ::glam::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<::glam::I64Vec4>, + rhs: Val<::glam::I64Vec4>, + ) -> Val<::glam::I64Vec4> { + let output: Val<::glam::I64Vec4> = ::glam::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<::glam::I64Vec4>, + rhs: Val<::glam::I64Vec4>, + ) -> Val<::glam::I64Vec4> { + let output: Val<::glam::I64Vec4> = ::glam::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<::glam::I64Vec4>, + rhs: Val<::glam::U64Vec4>, + ) -> Val<::glam::I64Vec4> { + let output: Val<::glam::I64Vec4> = ::glam::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 ::glam::UVec2 { + fn add(_self: Val<::glam::UVec2>, rhs: Ref<::glam::UVec2>) -> Val<::glam::UVec2> { + let output: Val<::glam::UVec2> = <::glam::UVec2 as ::core::ops::Add< + &::glam::UVec2, + >>::add(_self.into_inner(), &rhs) + .into(); + output + } + fn add(_self: Val<::glam::UVec2>, rhs: Val<::glam::UVec2>) -> Val<::glam::UVec2> { + let output: Val<::glam::UVec2> = <::glam::UVec2 as ::core::ops::Add< + ::glam::UVec2, + >>::add(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + fn add(_self: Val<::glam::UVec2>, rhs: u32) -> Val<::glam::UVec2> { + let output: Val<::glam::UVec2> = <::glam::UVec2 as ::core::ops::Add< + u32, + >>::add(_self.into_inner(), rhs) + .into(); + output + } + /// Casts all elements of `self` to `f64`. + fn as_dvec2(_self: Ref<::glam::UVec2>) -> Val<::glam::DVec2> { + let output: Val<::glam::DVec2> = ::glam::UVec2::as_dvec2(&_self).into(); + output + } + /// Casts all elements of `self` to `i16`. + fn as_i16vec2(_self: Ref<::glam::UVec2>) -> Val<::glam::I16Vec2> { + let output: Val<::glam::I16Vec2> = ::glam::UVec2::as_i16vec2(&_self).into(); + output + } + /// Casts all elements of `self` to `i64`. + fn as_i64vec2(_self: Ref<::glam::UVec2>) -> Val<::glam::I64Vec2> { + let output: Val<::glam::I64Vec2> = ::glam::UVec2::as_i64vec2(&_self).into(); + output + } + /// Casts all elements of `self` to `i8`. + fn as_i8vec2(_self: Ref<::glam::UVec2>) -> Val<::glam::I8Vec2> { + let output: Val<::glam::I8Vec2> = ::glam::UVec2::as_i8vec2(&_self).into(); + output + } + /// Casts all elements of `self` to `i32`. + fn as_ivec2(_self: Ref<::glam::UVec2>) -> Val<::glam::IVec2> { + let output: Val<::glam::IVec2> = ::glam::UVec2::as_ivec2(&_self).into(); + output + } + /// Casts all elements of `self` to `u16`. + fn as_u16vec2(_self: Ref<::glam::UVec2>) -> Val<::glam::U16Vec2> { + let output: Val<::glam::U16Vec2> = ::glam::UVec2::as_u16vec2(&_self).into(); + output + } + /// Casts all elements of `self` to `u64`. + fn as_u64vec2(_self: Ref<::glam::UVec2>) -> Val<::glam::U64Vec2> { + let output: Val<::glam::U64Vec2> = ::glam::UVec2::as_u64vec2(&_self).into(); + output + } + /// Casts all elements of `self` to `u8`. + fn as_u8vec2(_self: Ref<::glam::UVec2>) -> Val<::glam::U8Vec2> { + let output: Val<::glam::U8Vec2> = ::glam::UVec2::as_u8vec2(&_self).into(); + output + } + /// Casts all elements of `self` to `f32`. + fn as_vec2(_self: Ref<::glam::UVec2>) -> Val<::glam::Vec2> { + let output: Val<::glam::Vec2> = ::glam::UVec2::as_vec2(&_self).into(); + output + } + fn assert_receiver_is_total_eq(_self: Ref<::glam::UVec2>) -> () { + let output: () = <::glam::UVec2 as ::core::cmp::Eq>::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<::glam::UVec2>, + min: Val<::glam::UVec2>, + max: Val<::glam::UVec2>, + ) -> Val<::glam::UVec2> { + let output: Val<::glam::UVec2> = ::glam::UVec2::clamp( + _self.into_inner(), + min.into_inner(), + max.into_inner(), + ) + .into(); + output + } + fn clone(_self: Ref<::glam::UVec2>) -> Val<::glam::UVec2> { + let output: Val<::glam::UVec2> = <::glam::UVec2 as ::bevy_reflect::erased_serde::__private::serde::__private::Clone>::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<::glam::UVec2>, rhs: Val<::glam::UVec2>) -> Val<::glam::BVec2> { + let output: Val<::glam::BVec2> = ::glam::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<::glam::UVec2>, rhs: Val<::glam::UVec2>) -> Val<::glam::BVec2> { + let output: Val<::glam::BVec2> = ::glam::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<::glam::UVec2>, rhs: Val<::glam::UVec2>) -> Val<::glam::BVec2> { + let output: Val<::glam::BVec2> = ::glam::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<::glam::UVec2>, rhs: Val<::glam::UVec2>) -> Val<::glam::BVec2> { + let output: Val<::glam::BVec2> = ::glam::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<::glam::UVec2>, rhs: Val<::glam::UVec2>) -> Val<::glam::BVec2> { + let output: Val<::glam::BVec2> = ::glam::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<::glam::UVec2>, rhs: Val<::glam::UVec2>) -> Val<::glam::BVec2> { + let output: Val<::glam::BVec2> = ::glam::UVec2::cmpne( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + fn div(_self: Val<::glam::UVec2>, rhs: Ref<::glam::UVec2>) -> Val<::glam::UVec2> { + let output: Val<::glam::UVec2> = <::glam::UVec2 as ::core::ops::Div< + &::glam::UVec2, + >>::div(_self.into_inner(), &rhs) + .into(); + output + } + fn div(_self: Val<::glam::UVec2>, rhs: Val<::glam::UVec2>) -> Val<::glam::UVec2> { + let output: Val<::glam::UVec2> = <::glam::UVec2 as ::core::ops::Div< + ::glam::UVec2, + >>::div(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + fn div(_self: Val<::glam::UVec2>, rhs: u32) -> Val<::glam::UVec2> { + let output: Val<::glam::UVec2> = <::glam::UVec2 as ::core::ops::Div< + u32, + >>::div(_self.into_inner(), rhs) + .into(); + output + } + /// Computes the dot product of `self` and `rhs`. + fn dot(_self: Val<::glam::UVec2>, rhs: Val<::glam::UVec2>) -> u32 { + let output: u32 = ::glam::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<::glam::UVec2>, + rhs: Val<::glam::UVec2>, + ) -> Val<::glam::UVec2> { + let output: Val<::glam::UVec2> = ::glam::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<::glam::UVec2>) -> u32 { + let output: u32 = ::glam::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<::glam::UVec2>) -> u32 { + let output: u32 = ::glam::UVec2::element_sum(_self.into_inner()).into(); + output + } + fn eq(_self: Ref<::glam::UVec2>, other: Ref<::glam::UVec2>) -> bool { + let output: bool = <::glam::UVec2 as ::core::cmp::PartialEq< + ::glam::UVec2, + >>::eq(&_self, &other) + .into(); + output + } + /// Creates a 3D vector from `self` and the given `z` value. + fn extend(_self: Val<::glam::UVec2>, z: u32) -> Val<::glam::UVec3> { + let output: Val<::glam::UVec3> = ::glam::UVec2::extend(_self.into_inner(), z) + .into(); + output + } + /// Creates a new vector from an array. + fn from_array(a: [u32; 2]) -> Val<::glam::UVec2> { + let output: Val<::glam::UVec2> = ::glam::UVec2::from_array(a).into(); + output + } + /// Computes the squared length of `self`. + fn length_squared(_self: Val<::glam::UVec2>) -> u32 { + let output: u32 = ::glam::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<::glam::UVec2>, rhs: Val<::glam::UVec2>) -> Val<::glam::UVec2> { + let output: Val<::glam::UVec2> = ::glam::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<::glam::UVec2>) -> u32 { + let output: u32 = ::glam::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<::glam::UVec2>, rhs: Val<::glam::UVec2>) -> Val<::glam::UVec2> { + let output: Val<::glam::UVec2> = ::glam::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<::glam::UVec2>) -> u32 { + let output: u32 = ::glam::UVec2::min_element(_self.into_inner()).into(); + output + } + fn mul(_self: Val<::glam::UVec2>, rhs: Ref<::glam::UVec2>) -> Val<::glam::UVec2> { + let output: Val<::glam::UVec2> = <::glam::UVec2 as ::core::ops::Mul< + &::glam::UVec2, + >>::mul(_self.into_inner(), &rhs) + .into(); + output + } + fn mul(_self: Val<::glam::UVec2>, rhs: Val<::glam::UVec2>) -> Val<::glam::UVec2> { + let output: Val<::glam::UVec2> = <::glam::UVec2 as ::core::ops::Mul< + ::glam::UVec2, + >>::mul(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + fn mul(_self: Val<::glam::UVec2>, rhs: u32) -> Val<::glam::UVec2> { + let output: Val<::glam::UVec2> = <::glam::UVec2 as ::core::ops::Mul< + u32, + >>::mul(_self.into_inner(), rhs) + .into(); + output + } + /// Creates a new vector. + fn new(x: u32, y: u32) -> Val<::glam::UVec2> { + let output: Val<::glam::UVec2> = ::glam::UVec2::new(x, y).into(); + output + } + fn rem(_self: Val<::glam::UVec2>, rhs: Ref<::glam::UVec2>) -> Val<::glam::UVec2> { + let output: Val<::glam::UVec2> = <::glam::UVec2 as ::core::ops::Rem< + &::glam::UVec2, + >>::rem(_self.into_inner(), &rhs) + .into(); + output + } + fn rem(_self: Val<::glam::UVec2>, rhs: Val<::glam::UVec2>) -> Val<::glam::UVec2> { + let output: Val<::glam::UVec2> = <::glam::UVec2 as ::core::ops::Rem< + ::glam::UVec2, + >>::rem(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + fn rem(_self: Val<::glam::UVec2>, rhs: u32) -> Val<::glam::UVec2> { + let output: Val<::glam::UVec2> = <::glam::UVec2 as ::core::ops::Rem< + u32, + >>::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<::glam::UVec2>, + rhs: Val<::glam::UVec2>, + ) -> Val<::glam::UVec2> { + let output: Val<::glam::UVec2> = ::glam::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<::glam::UVec2>, + rhs: Val<::glam::IVec2>, + ) -> Val<::glam::UVec2> { + let output: Val<::glam::UVec2> = ::glam::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<::glam::UVec2>, + rhs: Val<::glam::UVec2>, + ) -> Val<::glam::UVec2> { + let output: Val<::glam::UVec2> = ::glam::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<::glam::UVec2>, + rhs: Val<::glam::UVec2>, + ) -> Val<::glam::UVec2> { + let output: Val<::glam::UVec2> = ::glam::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<::glam::UVec2>, + rhs: Val<::glam::UVec2>, + ) -> Val<::glam::UVec2> { + let output: Val<::glam::UVec2> = ::glam::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<::glam::BVec2>, + if_true: Val<::glam::UVec2>, + if_false: Val<::glam::UVec2>, + ) -> Val<::glam::UVec2> { + let output: Val<::glam::UVec2> = ::glam::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<::glam::UVec2> { + let output: Val<::glam::UVec2> = ::glam::UVec2::splat(v).into(); + output + } + fn sub(_self: Val<::glam::UVec2>, rhs: Ref<::glam::UVec2>) -> Val<::glam::UVec2> { + let output: Val<::glam::UVec2> = <::glam::UVec2 as ::core::ops::Sub< + &::glam::UVec2, + >>::sub(_self.into_inner(), &rhs) + .into(); + output + } + fn sub(_self: Val<::glam::UVec2>, rhs: Val<::glam::UVec2>) -> Val<::glam::UVec2> { + let output: Val<::glam::UVec2> = <::glam::UVec2 as ::core::ops::Sub< + ::glam::UVec2, + >>::sub(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + fn sub(_self: Val<::glam::UVec2>, rhs: u32) -> Val<::glam::UVec2> { + let output: Val<::glam::UVec2> = <::glam::UVec2 as ::core::ops::Sub< + u32, + >>::sub(_self.into_inner(), rhs) + .into(); + output + } + /// `[x, y]` + fn to_array(_self: Ref<::glam::UVec2>) -> [u32; 2] { + let output: [u32; 2] = ::glam::UVec2::to_array(&_self).into(); + output + } + /// Creates a 2D vector from `self` with the given value of `x`. + fn with_x(_self: Val<::glam::UVec2>, x: u32) -> Val<::glam::UVec2> { + let output: Val<::glam::UVec2> = ::glam::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<::glam::UVec2>, y: u32) -> Val<::glam::UVec2> { + let output: Val<::glam::UVec2> = ::glam::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<::glam::UVec2>, + rhs: Val<::glam::UVec2>, + ) -> Val<::glam::UVec2> { + let output: Val<::glam::UVec2> = ::glam::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<::glam::UVec2>, + rhs: Val<::glam::IVec2>, + ) -> Val<::glam::UVec2> { + let output: Val<::glam::UVec2> = ::glam::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<::glam::UVec2>, + rhs: Val<::glam::UVec2>, + ) -> Val<::glam::UVec2> { + let output: Val<::glam::UVec2> = ::glam::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<::glam::UVec2>, + rhs: Val<::glam::UVec2>, + ) -> Val<::glam::UVec2> { + let output: Val<::glam::UVec2> = ::glam::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<::glam::UVec2>, + rhs: Val<::glam::UVec2>, + ) -> Val<::glam::UVec2> { + let output: Val<::glam::UVec2> = ::glam::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 ::glam::UVec3 { + fn add(_self: Val<::glam::UVec3>, rhs: Ref<::glam::UVec3>) -> Val<::glam::UVec3> { + let output: Val<::glam::UVec3> = <::glam::UVec3 as ::core::ops::Add< + &::glam::UVec3, + >>::add(_self.into_inner(), &rhs) + .into(); + output + } + fn add(_self: Val<::glam::UVec3>, rhs: Val<::glam::UVec3>) -> Val<::glam::UVec3> { + let output: Val<::glam::UVec3> = <::glam::UVec3 as ::core::ops::Add< + ::glam::UVec3, + >>::add(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + fn add(_self: Val<::glam::UVec3>, rhs: u32) -> Val<::glam::UVec3> { + let output: Val<::glam::UVec3> = <::glam::UVec3 as ::core::ops::Add< + u32, + >>::add(_self.into_inner(), rhs) + .into(); + output + } + /// Casts all elements of `self` to `f64`. + fn as_dvec3(_self: Ref<::glam::UVec3>) -> Val<::glam::DVec3> { + let output: Val<::glam::DVec3> = ::glam::UVec3::as_dvec3(&_self).into(); + output + } + /// Casts all elements of `self` to `i16`. + fn as_i16vec3(_self: Ref<::glam::UVec3>) -> Val<::glam::I16Vec3> { + let output: Val<::glam::I16Vec3> = ::glam::UVec3::as_i16vec3(&_self).into(); + output + } + /// Casts all elements of `self` to `i64`. + fn as_i64vec3(_self: Ref<::glam::UVec3>) -> Val<::glam::I64Vec3> { + let output: Val<::glam::I64Vec3> = ::glam::UVec3::as_i64vec3(&_self).into(); + output + } + /// Casts all elements of `self` to `i8`. + fn as_i8vec3(_self: Ref<::glam::UVec3>) -> Val<::glam::I8Vec3> { + let output: Val<::glam::I8Vec3> = ::glam::UVec3::as_i8vec3(&_self).into(); + output + } + /// Casts all elements of `self` to `i32`. + fn as_ivec3(_self: Ref<::glam::UVec3>) -> Val<::glam::IVec3> { + let output: Val<::glam::IVec3> = ::glam::UVec3::as_ivec3(&_self).into(); + output + } + /// Casts all elements of `self` to `u16`. + fn as_u16vec3(_self: Ref<::glam::UVec3>) -> Val<::glam::U16Vec3> { + let output: Val<::glam::U16Vec3> = ::glam::UVec3::as_u16vec3(&_self).into(); + output + } + /// Casts all elements of `self` to `u64`. + fn as_u64vec3(_self: Ref<::glam::UVec3>) -> Val<::glam::U64Vec3> { + let output: Val<::glam::U64Vec3> = ::glam::UVec3::as_u64vec3(&_self).into(); + output + } + /// Casts all elements of `self` to `u8`. + fn as_u8vec3(_self: Ref<::glam::UVec3>) -> Val<::glam::U8Vec3> { + let output: Val<::glam::U8Vec3> = ::glam::UVec3::as_u8vec3(&_self).into(); + output + } + /// Casts all elements of `self` to `f32`. + fn as_vec3(_self: Ref<::glam::UVec3>) -> Val<::glam::Vec3> { + let output: Val<::glam::Vec3> = ::glam::UVec3::as_vec3(&_self).into(); + output + } + /// Casts all elements of `self` to `f32`. + fn as_vec3a(_self: Ref<::glam::UVec3>) -> Val<::glam::Vec3A> { + let output: Val<::glam::Vec3A> = ::glam::UVec3::as_vec3a(&_self).into(); + output + } + fn assert_receiver_is_total_eq(_self: Ref<::glam::UVec3>) -> () { + let output: () = <::glam::UVec3 as ::core::cmp::Eq>::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<::glam::UVec3>, + min: Val<::glam::UVec3>, + max: Val<::glam::UVec3>, + ) -> Val<::glam::UVec3> { + let output: Val<::glam::UVec3> = ::glam::UVec3::clamp( + _self.into_inner(), + min.into_inner(), + max.into_inner(), + ) + .into(); + output + } + fn clone(_self: Ref<::glam::UVec3>) -> Val<::glam::UVec3> { + let output: Val<::glam::UVec3> = <::glam::UVec3 as ::bevy_reflect::erased_serde::__private::serde::__private::Clone>::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<::glam::UVec3>, rhs: Val<::glam::UVec3>) -> Val<::glam::BVec3> { + let output: Val<::glam::BVec3> = ::glam::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<::glam::UVec3>, rhs: Val<::glam::UVec3>) -> Val<::glam::BVec3> { + let output: Val<::glam::BVec3> = ::glam::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<::glam::UVec3>, rhs: Val<::glam::UVec3>) -> Val<::glam::BVec3> { + let output: Val<::glam::BVec3> = ::glam::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<::glam::UVec3>, rhs: Val<::glam::UVec3>) -> Val<::glam::BVec3> { + let output: Val<::glam::BVec3> = ::glam::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<::glam::UVec3>, rhs: Val<::glam::UVec3>) -> Val<::glam::BVec3> { + let output: Val<::glam::BVec3> = ::glam::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<::glam::UVec3>, rhs: Val<::glam::UVec3>) -> Val<::glam::BVec3> { + let output: Val<::glam::BVec3> = ::glam::UVec3::cmpne( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Computes the cross product of `self` and `rhs`. + fn cross(_self: Val<::glam::UVec3>, rhs: Val<::glam::UVec3>) -> Val<::glam::UVec3> { + let output: Val<::glam::UVec3> = ::glam::UVec3::cross( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + fn div(_self: Val<::glam::UVec3>, rhs: Ref<::glam::UVec3>) -> Val<::glam::UVec3> { + let output: Val<::glam::UVec3> = <::glam::UVec3 as ::core::ops::Div< + &::glam::UVec3, + >>::div(_self.into_inner(), &rhs) + .into(); + output + } + fn div(_self: Val<::glam::UVec3>, rhs: Val<::glam::UVec3>) -> Val<::glam::UVec3> { + let output: Val<::glam::UVec3> = <::glam::UVec3 as ::core::ops::Div< + ::glam::UVec3, + >>::div(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + fn div(_self: Val<::glam::UVec3>, rhs: u32) -> Val<::glam::UVec3> { + let output: Val<::glam::UVec3> = <::glam::UVec3 as ::core::ops::Div< + u32, + >>::div(_self.into_inner(), rhs) + .into(); + output + } + /// Computes the dot product of `self` and `rhs`. + fn dot(_self: Val<::glam::UVec3>, rhs: Val<::glam::UVec3>) -> u32 { + let output: u32 = ::glam::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<::glam::UVec3>, + rhs: Val<::glam::UVec3>, + ) -> Val<::glam::UVec3> { + let output: Val<::glam::UVec3> = ::glam::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<::glam::UVec3>) -> u32 { + let output: u32 = ::glam::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<::glam::UVec3>) -> u32 { + let output: u32 = ::glam::UVec3::element_sum(_self.into_inner()).into(); + output + } + fn eq(_self: Ref<::glam::UVec3>, other: Ref<::glam::UVec3>) -> bool { + let output: bool = <::glam::UVec3 as ::core::cmp::PartialEq< + ::glam::UVec3, + >>::eq(&_self, &other) + .into(); + output + } + /// Creates a 4D vector from `self` and the given `w` value. + fn extend(_self: Val<::glam::UVec3>, w: u32) -> Val<::glam::UVec4> { + let output: Val<::glam::UVec4> = ::glam::UVec3::extend(_self.into_inner(), w) + .into(); + output + } + /// Creates a new vector from an array. + fn from_array(a: [u32; 3]) -> Val<::glam::UVec3> { + let output: Val<::glam::UVec3> = ::glam::UVec3::from_array(a).into(); + output + } + /// Computes the squared length of `self`. + fn length_squared(_self: Val<::glam::UVec3>) -> u32 { + let output: u32 = ::glam::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<::glam::UVec3>, rhs: Val<::glam::UVec3>) -> Val<::glam::UVec3> { + let output: Val<::glam::UVec3> = ::glam::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<::glam::UVec3>) -> u32 { + let output: u32 = ::glam::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<::glam::UVec3>, rhs: Val<::glam::UVec3>) -> Val<::glam::UVec3> { + let output: Val<::glam::UVec3> = ::glam::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<::glam::UVec3>) -> u32 { + let output: u32 = ::glam::UVec3::min_element(_self.into_inner()).into(); + output + } + fn mul(_self: Val<::glam::UVec3>, rhs: Ref<::glam::UVec3>) -> Val<::glam::UVec3> { + let output: Val<::glam::UVec3> = <::glam::UVec3 as ::core::ops::Mul< + &::glam::UVec3, + >>::mul(_self.into_inner(), &rhs) + .into(); + output + } + fn mul(_self: Val<::glam::UVec3>, rhs: Val<::glam::UVec3>) -> Val<::glam::UVec3> { + let output: Val<::glam::UVec3> = <::glam::UVec3 as ::core::ops::Mul< + ::glam::UVec3, + >>::mul(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + fn mul(_self: Val<::glam::UVec3>, rhs: u32) -> Val<::glam::UVec3> { + let output: Val<::glam::UVec3> = <::glam::UVec3 as ::core::ops::Mul< + u32, + >>::mul(_self.into_inner(), rhs) + .into(); + output + } + /// Creates a new vector. + fn new(x: u32, y: u32, z: u32) -> Val<::glam::UVec3> { + let output: Val<::glam::UVec3> = ::glam::UVec3::new(x, y, z).into(); + output + } + fn rem(_self: Val<::glam::UVec3>, rhs: Ref<::glam::UVec3>) -> Val<::glam::UVec3> { + let output: Val<::glam::UVec3> = <::glam::UVec3 as ::core::ops::Rem< + &::glam::UVec3, + >>::rem(_self.into_inner(), &rhs) + .into(); + output + } + fn rem(_self: Val<::glam::UVec3>, rhs: Val<::glam::UVec3>) -> Val<::glam::UVec3> { + let output: Val<::glam::UVec3> = <::glam::UVec3 as ::core::ops::Rem< + ::glam::UVec3, + >>::rem(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + fn rem(_self: Val<::glam::UVec3>, rhs: u32) -> Val<::glam::UVec3> { + let output: Val<::glam::UVec3> = <::glam::UVec3 as ::core::ops::Rem< + u32, + >>::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<::glam::UVec3>, + rhs: Val<::glam::UVec3>, + ) -> Val<::glam::UVec3> { + let output: Val<::glam::UVec3> = ::glam::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<::glam::UVec3>, + rhs: Val<::glam::IVec3>, + ) -> Val<::glam::UVec3> { + let output: Val<::glam::UVec3> = ::glam::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<::glam::UVec3>, + rhs: Val<::glam::UVec3>, + ) -> Val<::glam::UVec3> { + let output: Val<::glam::UVec3> = ::glam::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<::glam::UVec3>, + rhs: Val<::glam::UVec3>, + ) -> Val<::glam::UVec3> { + let output: Val<::glam::UVec3> = ::glam::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<::glam::UVec3>, + rhs: Val<::glam::UVec3>, + ) -> Val<::glam::UVec3> { + let output: Val<::glam::UVec3> = ::glam::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<::glam::BVec3>, + if_true: Val<::glam::UVec3>, + if_false: Val<::glam::UVec3>, + ) -> Val<::glam::UVec3> { + let output: Val<::glam::UVec3> = ::glam::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<::glam::UVec3> { + let output: Val<::glam::UVec3> = ::glam::UVec3::splat(v).into(); + output + } + fn sub(_self: Val<::glam::UVec3>, rhs: Ref<::glam::UVec3>) -> Val<::glam::UVec3> { + let output: Val<::glam::UVec3> = <::glam::UVec3 as ::core::ops::Sub< + &::glam::UVec3, + >>::sub(_self.into_inner(), &rhs) + .into(); + output + } + fn sub(_self: Val<::glam::UVec3>, rhs: Val<::glam::UVec3>) -> Val<::glam::UVec3> { + let output: Val<::glam::UVec3> = <::glam::UVec3 as ::core::ops::Sub< + ::glam::UVec3, + >>::sub(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + fn sub(_self: Val<::glam::UVec3>, rhs: u32) -> Val<::glam::UVec3> { + let output: Val<::glam::UVec3> = <::glam::UVec3 as ::core::ops::Sub< + u32, + >>::sub(_self.into_inner(), rhs) + .into(); + output + } + /// `[x, y, z]` + fn to_array(_self: Ref<::glam::UVec3>) -> [u32; 3] { + let output: [u32; 3] = ::glam::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<::glam::UVec3>) -> Val<::glam::UVec2> { + let output: Val<::glam::UVec2> = ::glam::UVec3::truncate(_self.into_inner()) + .into(); + output + } + /// Creates a 3D vector from `self` with the given value of `x`. + fn with_x(_self: Val<::glam::UVec3>, x: u32) -> Val<::glam::UVec3> { + let output: Val<::glam::UVec3> = ::glam::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<::glam::UVec3>, y: u32) -> Val<::glam::UVec3> { + let output: Val<::glam::UVec3> = ::glam::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<::glam::UVec3>, z: u32) -> Val<::glam::UVec3> { + let output: Val<::glam::UVec3> = ::glam::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<::glam::UVec3>, + rhs: Val<::glam::UVec3>, + ) -> Val<::glam::UVec3> { + let output: Val<::glam::UVec3> = ::glam::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<::glam::UVec3>, + rhs: Val<::glam::IVec3>, + ) -> Val<::glam::UVec3> { + let output: Val<::glam::UVec3> = ::glam::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<::glam::UVec3>, + rhs: Val<::glam::UVec3>, + ) -> Val<::glam::UVec3> { + let output: Val<::glam::UVec3> = ::glam::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<::glam::UVec3>, + rhs: Val<::glam::UVec3>, + ) -> Val<::glam::UVec3> { + let output: Val<::glam::UVec3> = ::glam::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<::glam::UVec3>, + rhs: Val<::glam::UVec3>, + ) -> Val<::glam::UVec3> { + let output: Val<::glam::UVec3> = ::glam::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 ::glam::UVec4 { + fn add(_self: Val<::glam::UVec4>, rhs: Ref<::glam::UVec4>) -> Val<::glam::UVec4> { + let output: Val<::glam::UVec4> = <::glam::UVec4 as ::core::ops::Add< + &::glam::UVec4, + >>::add(_self.into_inner(), &rhs) + .into(); + output + } + fn add(_self: Val<::glam::UVec4>, rhs: Val<::glam::UVec4>) -> Val<::glam::UVec4> { + let output: Val<::glam::UVec4> = <::glam::UVec4 as ::core::ops::Add< + ::glam::UVec4, + >>::add(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + fn add(_self: Val<::glam::UVec4>, rhs: u32) -> Val<::glam::UVec4> { + let output: Val<::glam::UVec4> = <::glam::UVec4 as ::core::ops::Add< + u32, + >>::add(_self.into_inner(), rhs) + .into(); + output + } + /// Casts all elements of `self` to `f64`. + fn as_dvec4(_self: Ref<::glam::UVec4>) -> Val<::glam::DVec4> { + let output: Val<::glam::DVec4> = ::glam::UVec4::as_dvec4(&_self).into(); + output + } + /// Casts all elements of `self` to `i16`. + fn as_i16vec4(_self: Ref<::glam::UVec4>) -> Val<::glam::I16Vec4> { + let output: Val<::glam::I16Vec4> = ::glam::UVec4::as_i16vec4(&_self).into(); + output + } + /// Casts all elements of `self` to `i64`. + fn as_i64vec4(_self: Ref<::glam::UVec4>) -> Val<::glam::I64Vec4> { + let output: Val<::glam::I64Vec4> = ::glam::UVec4::as_i64vec4(&_self).into(); + output + } + /// Casts all elements of `self` to `i8`. + fn as_i8vec4(_self: Ref<::glam::UVec4>) -> Val<::glam::I8Vec4> { + let output: Val<::glam::I8Vec4> = ::glam::UVec4::as_i8vec4(&_self).into(); + output + } + /// Casts all elements of `self` to `i32`. + fn as_ivec4(_self: Ref<::glam::UVec4>) -> Val<::glam::IVec4> { + let output: Val<::glam::IVec4> = ::glam::UVec4::as_ivec4(&_self).into(); + output + } + /// Casts all elements of `self` to `u16`. + fn as_u16vec4(_self: Ref<::glam::UVec4>) -> Val<::glam::U16Vec4> { + let output: Val<::glam::U16Vec4> = ::glam::UVec4::as_u16vec4(&_self).into(); + output + } + /// Casts all elements of `self` to `u64`. + fn as_u64vec4(_self: Ref<::glam::UVec4>) -> Val<::glam::U64Vec4> { + let output: Val<::glam::U64Vec4> = ::glam::UVec4::as_u64vec4(&_self).into(); + output + } + /// Casts all elements of `self` to `u8`. + fn as_u8vec4(_self: Ref<::glam::UVec4>) -> Val<::glam::U8Vec4> { + let output: Val<::glam::U8Vec4> = ::glam::UVec4::as_u8vec4(&_self).into(); + output + } + /// Casts all elements of `self` to `f32`. + fn as_vec4(_self: Ref<::glam::UVec4>) -> Val<::glam::Vec4> { + let output: Val<::glam::Vec4> = ::glam::UVec4::as_vec4(&_self).into(); + output + } + fn assert_receiver_is_total_eq(_self: Ref<::glam::UVec4>) -> () { + let output: () = <::glam::UVec4 as ::core::cmp::Eq>::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<::glam::UVec4>, + min: Val<::glam::UVec4>, + max: Val<::glam::UVec4>, + ) -> Val<::glam::UVec4> { + let output: Val<::glam::UVec4> = ::glam::UVec4::clamp( + _self.into_inner(), + min.into_inner(), + max.into_inner(), + ) + .into(); + output + } + fn clone(_self: Ref<::glam::UVec4>) -> Val<::glam::UVec4> { + let output: Val<::glam::UVec4> = <::glam::UVec4 as ::bevy_reflect::erased_serde::__private::serde::__private::Clone>::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<::glam::UVec4>, rhs: Val<::glam::UVec4>) -> Val<::glam::BVec4> { + let output: Val<::glam::BVec4> = ::glam::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<::glam::UVec4>, rhs: Val<::glam::UVec4>) -> Val<::glam::BVec4> { + let output: Val<::glam::BVec4> = ::glam::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<::glam::UVec4>, rhs: Val<::glam::UVec4>) -> Val<::glam::BVec4> { + let output: Val<::glam::BVec4> = ::glam::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<::glam::UVec4>, rhs: Val<::glam::UVec4>) -> Val<::glam::BVec4> { + let output: Val<::glam::BVec4> = ::glam::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<::glam::UVec4>, rhs: Val<::glam::UVec4>) -> Val<::glam::BVec4> { + let output: Val<::glam::BVec4> = ::glam::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<::glam::UVec4>, rhs: Val<::glam::UVec4>) -> Val<::glam::BVec4> { + let output: Val<::glam::BVec4> = ::glam::UVec4::cmpne( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + fn div(_self: Val<::glam::UVec4>, rhs: Ref<::glam::UVec4>) -> Val<::glam::UVec4> { + let output: Val<::glam::UVec4> = <::glam::UVec4 as ::core::ops::Div< + &::glam::UVec4, + >>::div(_self.into_inner(), &rhs) + .into(); + output + } + fn div(_self: Val<::glam::UVec4>, rhs: Val<::glam::UVec4>) -> Val<::glam::UVec4> { + let output: Val<::glam::UVec4> = <::glam::UVec4 as ::core::ops::Div< + ::glam::UVec4, + >>::div(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + fn div(_self: Val<::glam::UVec4>, rhs: u32) -> Val<::glam::UVec4> { + let output: Val<::glam::UVec4> = <::glam::UVec4 as ::core::ops::Div< + u32, + >>::div(_self.into_inner(), rhs) + .into(); + output + } + /// Computes the dot product of `self` and `rhs`. + fn dot(_self: Val<::glam::UVec4>, rhs: Val<::glam::UVec4>) -> u32 { + let output: u32 = ::glam::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<::glam::UVec4>, + rhs: Val<::glam::UVec4>, + ) -> Val<::glam::UVec4> { + let output: Val<::glam::UVec4> = ::glam::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<::glam::UVec4>) -> u32 { + let output: u32 = ::glam::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<::glam::UVec4>) -> u32 { + let output: u32 = ::glam::UVec4::element_sum(_self.into_inner()).into(); + output + } + fn eq(_self: Ref<::glam::UVec4>, other: Ref<::glam::UVec4>) -> bool { + let output: bool = <::glam::UVec4 as ::core::cmp::PartialEq< + ::glam::UVec4, + >>::eq(&_self, &other) + .into(); + output + } + /// Creates a new vector from an array. + fn from_array(a: [u32; 4]) -> Val<::glam::UVec4> { + let output: Val<::glam::UVec4> = ::glam::UVec4::from_array(a).into(); + output + } + /// Computes the squared length of `self`. + fn length_squared(_self: Val<::glam::UVec4>) -> u32 { + let output: u32 = ::glam::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<::glam::UVec4>, rhs: Val<::glam::UVec4>) -> Val<::glam::UVec4> { + let output: Val<::glam::UVec4> = ::glam::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<::glam::UVec4>) -> u32 { + let output: u32 = ::glam::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<::glam::UVec4>, rhs: Val<::glam::UVec4>) -> Val<::glam::UVec4> { + let output: Val<::glam::UVec4> = ::glam::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<::glam::UVec4>) -> u32 { + let output: u32 = ::glam::UVec4::min_element(_self.into_inner()).into(); + output + } + fn mul(_self: Val<::glam::UVec4>, rhs: Ref<::glam::UVec4>) -> Val<::glam::UVec4> { + let output: Val<::glam::UVec4> = <::glam::UVec4 as ::core::ops::Mul< + &::glam::UVec4, + >>::mul(_self.into_inner(), &rhs) + .into(); + output + } + fn mul(_self: Val<::glam::UVec4>, rhs: Val<::glam::UVec4>) -> Val<::glam::UVec4> { + let output: Val<::glam::UVec4> = <::glam::UVec4 as ::core::ops::Mul< + ::glam::UVec4, + >>::mul(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + fn mul(_self: Val<::glam::UVec4>, rhs: u32) -> Val<::glam::UVec4> { + let output: Val<::glam::UVec4> = <::glam::UVec4 as ::core::ops::Mul< + u32, + >>::mul(_self.into_inner(), rhs) + .into(); + output + } + /// Creates a new vector. + fn new(x: u32, y: u32, z: u32, w: u32) -> Val<::glam::UVec4> { + let output: Val<::glam::UVec4> = ::glam::UVec4::new(x, y, z, w).into(); + output + } + fn rem(_self: Val<::glam::UVec4>, rhs: Ref<::glam::UVec4>) -> Val<::glam::UVec4> { + let output: Val<::glam::UVec4> = <::glam::UVec4 as ::core::ops::Rem< + &::glam::UVec4, + >>::rem(_self.into_inner(), &rhs) + .into(); + output + } + fn rem(_self: Val<::glam::UVec4>, rhs: Val<::glam::UVec4>) -> Val<::glam::UVec4> { + let output: Val<::glam::UVec4> = <::glam::UVec4 as ::core::ops::Rem< + ::glam::UVec4, + >>::rem(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + fn rem(_self: Val<::glam::UVec4>, rhs: u32) -> Val<::glam::UVec4> { + let output: Val<::glam::UVec4> = <::glam::UVec4 as ::core::ops::Rem< + u32, + >>::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<::glam::UVec4>, + rhs: Val<::glam::UVec4>, + ) -> Val<::glam::UVec4> { + let output: Val<::glam::UVec4> = ::glam::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<::glam::UVec4>, + rhs: Val<::glam::IVec4>, + ) -> Val<::glam::UVec4> { + let output: Val<::glam::UVec4> = ::glam::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<::glam::UVec4>, + rhs: Val<::glam::UVec4>, + ) -> Val<::glam::UVec4> { + let output: Val<::glam::UVec4> = ::glam::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<::glam::UVec4>, + rhs: Val<::glam::UVec4>, + ) -> Val<::glam::UVec4> { + let output: Val<::glam::UVec4> = ::glam::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<::glam::UVec4>, + rhs: Val<::glam::UVec4>, + ) -> Val<::glam::UVec4> { + let output: Val<::glam::UVec4> = ::glam::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<::glam::BVec4>, + if_true: Val<::glam::UVec4>, + if_false: Val<::glam::UVec4>, + ) -> Val<::glam::UVec4> { + let output: Val<::glam::UVec4> = ::glam::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<::glam::UVec4> { + let output: Val<::glam::UVec4> = ::glam::UVec4::splat(v).into(); + output + } + fn sub(_self: Val<::glam::UVec4>, rhs: Ref<::glam::UVec4>) -> Val<::glam::UVec4> { + let output: Val<::glam::UVec4> = <::glam::UVec4 as ::core::ops::Sub< + &::glam::UVec4, + >>::sub(_self.into_inner(), &rhs) + .into(); + output + } + fn sub(_self: Val<::glam::UVec4>, rhs: Val<::glam::UVec4>) -> Val<::glam::UVec4> { + let output: Val<::glam::UVec4> = <::glam::UVec4 as ::core::ops::Sub< + ::glam::UVec4, + >>::sub(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + fn sub(_self: Val<::glam::UVec4>, rhs: u32) -> Val<::glam::UVec4> { + let output: Val<::glam::UVec4> = <::glam::UVec4 as ::core::ops::Sub< + u32, + >>::sub(_self.into_inner(), rhs) + .into(); + output + } + /// `[x, y, z, w]` + fn to_array(_self: Ref<::glam::UVec4>) -> [u32; 4] { + let output: [u32; 4] = ::glam::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<::glam::UVec4>) -> Val<::glam::UVec3> { + let output: Val<::glam::UVec3> = ::glam::UVec4::truncate(_self.into_inner()) + .into(); + output + } + /// Creates a 4D vector from `self` with the given value of `w`. + fn with_w(_self: Val<::glam::UVec4>, w: u32) -> Val<::glam::UVec4> { + let output: Val<::glam::UVec4> = ::glam::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<::glam::UVec4>, x: u32) -> Val<::glam::UVec4> { + let output: Val<::glam::UVec4> = ::glam::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<::glam::UVec4>, y: u32) -> Val<::glam::UVec4> { + let output: Val<::glam::UVec4> = ::glam::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<::glam::UVec4>, z: u32) -> Val<::glam::UVec4> { + let output: Val<::glam::UVec4> = ::glam::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<::glam::UVec4>, + rhs: Val<::glam::UVec4>, + ) -> Val<::glam::UVec4> { + let output: Val<::glam::UVec4> = ::glam::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<::glam::UVec4>, + rhs: Val<::glam::IVec4>, + ) -> Val<::glam::UVec4> { + let output: Val<::glam::UVec4> = ::glam::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<::glam::UVec4>, + rhs: Val<::glam::UVec4>, + ) -> Val<::glam::UVec4> { + let output: Val<::glam::UVec4> = ::glam::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<::glam::UVec4>, + rhs: Val<::glam::UVec4>, + ) -> Val<::glam::UVec4> { + let output: Val<::glam::UVec4> = ::glam::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<::glam::UVec4>, + rhs: Val<::glam::UVec4>, + ) -> Val<::glam::UVec4> { + let output: Val<::glam::UVec4> = ::glam::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 ::glam::U8Vec2 { + fn add(_self: Val<::glam::U8Vec2>, rhs: Ref<::glam::U8Vec2>) -> Val<::glam::U8Vec2> { + let output: Val<::glam::U8Vec2> = <::glam::U8Vec2 as ::core::ops::Add< + &::glam::U8Vec2, + >>::add(_self.into_inner(), &rhs) + .into(); + output + } + fn add(_self: Val<::glam::U8Vec2>, rhs: Val<::glam::U8Vec2>) -> Val<::glam::U8Vec2> { + let output: Val<::glam::U8Vec2> = <::glam::U8Vec2 as ::core::ops::Add< + ::glam::U8Vec2, + >>::add(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + fn add(_self: Val<::glam::U8Vec2>, rhs: u8) -> Val<::glam::U8Vec2> { + let output: Val<::glam::U8Vec2> = <::glam::U8Vec2 as ::core::ops::Add< + u8, + >>::add(_self.into_inner(), rhs) + .into(); + output + } + /// Casts all elements of `self` to `f64`. + fn as_dvec2(_self: Ref<::glam::U8Vec2>) -> Val<::glam::DVec2> { + let output: Val<::glam::DVec2> = ::glam::U8Vec2::as_dvec2(&_self).into(); + output + } + /// Casts all elements of `self` to `i16`. + fn as_i16vec2(_self: Ref<::glam::U8Vec2>) -> Val<::glam::I16Vec2> { + let output: Val<::glam::I16Vec2> = ::glam::U8Vec2::as_i16vec2(&_self).into(); + output + } + /// Casts all elements of `self` to `i64`. + fn as_i64vec2(_self: Ref<::glam::U8Vec2>) -> Val<::glam::I64Vec2> { + let output: Val<::glam::I64Vec2> = ::glam::U8Vec2::as_i64vec2(&_self).into(); + output + } + /// Casts all elements of `self` to `i8`. + fn as_i8vec2(_self: Ref<::glam::U8Vec2>) -> Val<::glam::I8Vec2> { + let output: Val<::glam::I8Vec2> = ::glam::U8Vec2::as_i8vec2(&_self).into(); + output + } + /// Casts all elements of `self` to `i32`. + fn as_ivec2(_self: Ref<::glam::U8Vec2>) -> Val<::glam::IVec2> { + let output: Val<::glam::IVec2> = ::glam::U8Vec2::as_ivec2(&_self).into(); + output + } + /// Casts all elements of `self` to `u16`. + fn as_u16vec2(_self: Ref<::glam::U8Vec2>) -> Val<::glam::U16Vec2> { + let output: Val<::glam::U16Vec2> = ::glam::U8Vec2::as_u16vec2(&_self).into(); + output + } + /// Casts all elements of `self` to `u64`. + fn as_u64vec2(_self: Ref<::glam::U8Vec2>) -> Val<::glam::U64Vec2> { + let output: Val<::glam::U64Vec2> = ::glam::U8Vec2::as_u64vec2(&_self).into(); + output + } + /// Casts all elements of `self` to `u32`. + fn as_uvec2(_self: Ref<::glam::U8Vec2>) -> Val<::glam::UVec2> { + let output: Val<::glam::UVec2> = ::glam::U8Vec2::as_uvec2(&_self).into(); + output + } + /// Casts all elements of `self` to `f32`. + fn as_vec2(_self: Ref<::glam::U8Vec2>) -> Val<::glam::Vec2> { + let output: Val<::glam::Vec2> = ::glam::U8Vec2::as_vec2(&_self).into(); + output + } + fn assert_receiver_is_total_eq(_self: Ref<::glam::U8Vec2>) -> () { + let output: () = <::glam::U8Vec2 as ::core::cmp::Eq>::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<::glam::U8Vec2>, + min: Val<::glam::U8Vec2>, + max: Val<::glam::U8Vec2>, + ) -> Val<::glam::U8Vec2> { + let output: Val<::glam::U8Vec2> = ::glam::U8Vec2::clamp( + _self.into_inner(), + min.into_inner(), + max.into_inner(), + ) + .into(); + output + } + fn clone(_self: Ref<::glam::U8Vec2>) -> Val<::glam::U8Vec2> { + let output: Val<::glam::U8Vec2> = <::glam::U8Vec2 as ::bevy_reflect::erased_serde::__private::serde::__private::Clone>::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<::glam::U8Vec2>, + rhs: Val<::glam::U8Vec2>, + ) -> Val<::glam::BVec2> { + let output: Val<::glam::BVec2> = ::glam::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<::glam::U8Vec2>, + rhs: Val<::glam::U8Vec2>, + ) -> Val<::glam::BVec2> { + let output: Val<::glam::BVec2> = ::glam::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<::glam::U8Vec2>, + rhs: Val<::glam::U8Vec2>, + ) -> Val<::glam::BVec2> { + let output: Val<::glam::BVec2> = ::glam::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<::glam::U8Vec2>, + rhs: Val<::glam::U8Vec2>, + ) -> Val<::glam::BVec2> { + let output: Val<::glam::BVec2> = ::glam::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<::glam::U8Vec2>, + rhs: Val<::glam::U8Vec2>, + ) -> Val<::glam::BVec2> { + let output: Val<::glam::BVec2> = ::glam::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<::glam::U8Vec2>, + rhs: Val<::glam::U8Vec2>, + ) -> Val<::glam::BVec2> { + let output: Val<::glam::BVec2> = ::glam::U8Vec2::cmpne( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + fn div(_self: Val<::glam::U8Vec2>, rhs: Ref<::glam::U8Vec2>) -> Val<::glam::U8Vec2> { + let output: Val<::glam::U8Vec2> = <::glam::U8Vec2 as ::core::ops::Div< + &::glam::U8Vec2, + >>::div(_self.into_inner(), &rhs) + .into(); + output + } + fn div(_self: Val<::glam::U8Vec2>, rhs: Val<::glam::U8Vec2>) -> Val<::glam::U8Vec2> { + let output: Val<::glam::U8Vec2> = <::glam::U8Vec2 as ::core::ops::Div< + ::glam::U8Vec2, + >>::div(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + fn div(_self: Val<::glam::U8Vec2>, rhs: u8) -> Val<::glam::U8Vec2> { + let output: Val<::glam::U8Vec2> = <::glam::U8Vec2 as ::core::ops::Div< + u8, + >>::div(_self.into_inner(), rhs) + .into(); + output + } + /// Computes the dot product of `self` and `rhs`. + fn dot(_self: Val<::glam::U8Vec2>, rhs: Val<::glam::U8Vec2>) -> u8 { + let output: u8 = ::glam::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<::glam::U8Vec2>, + rhs: Val<::glam::U8Vec2>, + ) -> Val<::glam::U8Vec2> { + let output: Val<::glam::U8Vec2> = ::glam::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<::glam::U8Vec2>) -> u8 { + let output: u8 = ::glam::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<::glam::U8Vec2>) -> u8 { + let output: u8 = ::glam::U8Vec2::element_sum(_self.into_inner()).into(); + output + } + fn eq(_self: Ref<::glam::U8Vec2>, other: Ref<::glam::U8Vec2>) -> bool { + let output: bool = <::glam::U8Vec2 as ::core::cmp::PartialEq< + ::glam::U8Vec2, + >>::eq(&_self, &other) + .into(); + output + } + /// Creates a 3D vector from `self` and the given `z` value. + fn extend(_self: Val<::glam::U8Vec2>, z: u8) -> Val<::glam::U8Vec3> { + let output: Val<::glam::U8Vec3> = ::glam::U8Vec2::extend(_self.into_inner(), z) + .into(); + output + } + /// Creates a new vector from an array. + fn from_array(a: [u8; 2]) -> Val<::glam::U8Vec2> { + let output: Val<::glam::U8Vec2> = ::glam::U8Vec2::from_array(a).into(); + output + } + /// Computes the squared length of `self`. + fn length_squared(_self: Val<::glam::U8Vec2>) -> u8 { + let output: u8 = ::glam::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<::glam::U8Vec2>, rhs: Val<::glam::U8Vec2>) -> Val<::glam::U8Vec2> { + let output: Val<::glam::U8Vec2> = ::glam::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<::glam::U8Vec2>) -> u8 { + let output: u8 = ::glam::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<::glam::U8Vec2>, rhs: Val<::glam::U8Vec2>) -> Val<::glam::U8Vec2> { + let output: Val<::glam::U8Vec2> = ::glam::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<::glam::U8Vec2>) -> u8 { + let output: u8 = ::glam::U8Vec2::min_element(_self.into_inner()).into(); + output + } + fn mul(_self: Val<::glam::U8Vec2>, rhs: Ref<::glam::U8Vec2>) -> Val<::glam::U8Vec2> { + let output: Val<::glam::U8Vec2> = <::glam::U8Vec2 as ::core::ops::Mul< + &::glam::U8Vec2, + >>::mul(_self.into_inner(), &rhs) + .into(); + output + } + fn mul(_self: Val<::glam::U8Vec2>, rhs: Val<::glam::U8Vec2>) -> Val<::glam::U8Vec2> { + let output: Val<::glam::U8Vec2> = <::glam::U8Vec2 as ::core::ops::Mul< + ::glam::U8Vec2, + >>::mul(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + fn mul(_self: Val<::glam::U8Vec2>, rhs: u8) -> Val<::glam::U8Vec2> { + let output: Val<::glam::U8Vec2> = <::glam::U8Vec2 as ::core::ops::Mul< + u8, + >>::mul(_self.into_inner(), rhs) + .into(); + output + } + /// Creates a new vector. + fn new(x: u8, y: u8) -> Val<::glam::U8Vec2> { + let output: Val<::glam::U8Vec2> = ::glam::U8Vec2::new(x, y).into(); + output + } + fn rem(_self: Val<::glam::U8Vec2>, rhs: Ref<::glam::U8Vec2>) -> Val<::glam::U8Vec2> { + let output: Val<::glam::U8Vec2> = <::glam::U8Vec2 as ::core::ops::Rem< + &::glam::U8Vec2, + >>::rem(_self.into_inner(), &rhs) + .into(); + output + } + fn rem(_self: Val<::glam::U8Vec2>, rhs: Val<::glam::U8Vec2>) -> Val<::glam::U8Vec2> { + let output: Val<::glam::U8Vec2> = <::glam::U8Vec2 as ::core::ops::Rem< + ::glam::U8Vec2, + >>::rem(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + fn rem(_self: Val<::glam::U8Vec2>, rhs: u8) -> Val<::glam::U8Vec2> { + let output: Val<::glam::U8Vec2> = <::glam::U8Vec2 as ::core::ops::Rem< + u8, + >>::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<::glam::U8Vec2>, + rhs: Val<::glam::U8Vec2>, + ) -> Val<::glam::U8Vec2> { + let output: Val<::glam::U8Vec2> = ::glam::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<::glam::U8Vec2>, + rhs: Val<::glam::I8Vec2>, + ) -> Val<::glam::U8Vec2> { + let output: Val<::glam::U8Vec2> = ::glam::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<::glam::U8Vec2>, + rhs: Val<::glam::U8Vec2>, + ) -> Val<::glam::U8Vec2> { + let output: Val<::glam::U8Vec2> = ::glam::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<::glam::U8Vec2>, + rhs: Val<::glam::U8Vec2>, + ) -> Val<::glam::U8Vec2> { + let output: Val<::glam::U8Vec2> = ::glam::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<::glam::U8Vec2>, + rhs: Val<::glam::U8Vec2>, + ) -> Val<::glam::U8Vec2> { + let output: Val<::glam::U8Vec2> = ::glam::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<::glam::BVec2>, + if_true: Val<::glam::U8Vec2>, + if_false: Val<::glam::U8Vec2>, + ) -> Val<::glam::U8Vec2> { + let output: Val<::glam::U8Vec2> = ::glam::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<::glam::U8Vec2> { + let output: Val<::glam::U8Vec2> = ::glam::U8Vec2::splat(v).into(); + output + } + fn sub(_self: Val<::glam::U8Vec2>, rhs: Ref<::glam::U8Vec2>) -> Val<::glam::U8Vec2> { + let output: Val<::glam::U8Vec2> = <::glam::U8Vec2 as ::core::ops::Sub< + &::glam::U8Vec2, + >>::sub(_self.into_inner(), &rhs) + .into(); + output + } + fn sub(_self: Val<::glam::U8Vec2>, rhs: Val<::glam::U8Vec2>) -> Val<::glam::U8Vec2> { + let output: Val<::glam::U8Vec2> = <::glam::U8Vec2 as ::core::ops::Sub< + ::glam::U8Vec2, + >>::sub(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + fn sub(_self: Val<::glam::U8Vec2>, rhs: u8) -> Val<::glam::U8Vec2> { + let output: Val<::glam::U8Vec2> = <::glam::U8Vec2 as ::core::ops::Sub< + u8, + >>::sub(_self.into_inner(), rhs) + .into(); + output + } + /// `[x, y]` + fn to_array(_self: Ref<::glam::U8Vec2>) -> [u8; 2] { + let output: [u8; 2] = ::glam::U8Vec2::to_array(&_self).into(); + output + } + /// Creates a 2D vector from `self` with the given value of `x`. + fn with_x(_self: Val<::glam::U8Vec2>, x: u8) -> Val<::glam::U8Vec2> { + let output: Val<::glam::U8Vec2> = ::glam::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<::glam::U8Vec2>, y: u8) -> Val<::glam::U8Vec2> { + let output: Val<::glam::U8Vec2> = ::glam::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<::glam::U8Vec2>, + rhs: Val<::glam::U8Vec2>, + ) -> Val<::glam::U8Vec2> { + let output: Val<::glam::U8Vec2> = ::glam::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<::glam::U8Vec2>, + rhs: Val<::glam::I8Vec2>, + ) -> Val<::glam::U8Vec2> { + let output: Val<::glam::U8Vec2> = ::glam::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<::glam::U8Vec2>, + rhs: Val<::glam::U8Vec2>, + ) -> Val<::glam::U8Vec2> { + let output: Val<::glam::U8Vec2> = ::glam::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<::glam::U8Vec2>, + rhs: Val<::glam::U8Vec2>, + ) -> Val<::glam::U8Vec2> { + let output: Val<::glam::U8Vec2> = ::glam::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<::glam::U8Vec2>, + rhs: Val<::glam::U8Vec2>, + ) -> Val<::glam::U8Vec2> { + let output: Val<::glam::U8Vec2> = ::glam::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 ::glam::U8Vec3 { + fn add(_self: Val<::glam::U8Vec3>, rhs: Ref<::glam::U8Vec3>) -> Val<::glam::U8Vec3> { + let output: Val<::glam::U8Vec3> = <::glam::U8Vec3 as ::core::ops::Add< + &::glam::U8Vec3, + >>::add(_self.into_inner(), &rhs) + .into(); + output + } + fn add(_self: Val<::glam::U8Vec3>, rhs: Val<::glam::U8Vec3>) -> Val<::glam::U8Vec3> { + let output: Val<::glam::U8Vec3> = <::glam::U8Vec3 as ::core::ops::Add< + ::glam::U8Vec3, + >>::add(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + fn add(_self: Val<::glam::U8Vec3>, rhs: u8) -> Val<::glam::U8Vec3> { + let output: Val<::glam::U8Vec3> = <::glam::U8Vec3 as ::core::ops::Add< + u8, + >>::add(_self.into_inner(), rhs) + .into(); + output + } + /// Casts all elements of `self` to `f64`. + fn as_dvec3(_self: Ref<::glam::U8Vec3>) -> Val<::glam::DVec3> { + let output: Val<::glam::DVec3> = ::glam::U8Vec3::as_dvec3(&_self).into(); + output + } + /// Casts all elements of `self` to `i16`. + fn as_i16vec3(_self: Ref<::glam::U8Vec3>) -> Val<::glam::I16Vec3> { + let output: Val<::glam::I16Vec3> = ::glam::U8Vec3::as_i16vec3(&_self).into(); + output + } + /// Casts all elements of `self` to `i64`. + fn as_i64vec3(_self: Ref<::glam::U8Vec3>) -> Val<::glam::I64Vec3> { + let output: Val<::glam::I64Vec3> = ::glam::U8Vec3::as_i64vec3(&_self).into(); + output + } + /// Casts all elements of `self` to `i8`. + fn as_i8vec3(_self: Ref<::glam::U8Vec3>) -> Val<::glam::I8Vec3> { + let output: Val<::glam::I8Vec3> = ::glam::U8Vec3::as_i8vec3(&_self).into(); + output + } + /// Casts all elements of `self` to `i32`. + fn as_ivec3(_self: Ref<::glam::U8Vec3>) -> Val<::glam::IVec3> { + let output: Val<::glam::IVec3> = ::glam::U8Vec3::as_ivec3(&_self).into(); + output + } + /// Casts all elements of `self` to `u16`. + fn as_u16vec3(_self: Ref<::glam::U8Vec3>) -> Val<::glam::U16Vec3> { + let output: Val<::glam::U16Vec3> = ::glam::U8Vec3::as_u16vec3(&_self).into(); + output + } + /// Casts all elements of `self` to `u64`. + fn as_u64vec3(_self: Ref<::glam::U8Vec3>) -> Val<::glam::U64Vec3> { + let output: Val<::glam::U64Vec3> = ::glam::U8Vec3::as_u64vec3(&_self).into(); + output + } + /// Casts all elements of `self` to `u32`. + fn as_uvec3(_self: Ref<::glam::U8Vec3>) -> Val<::glam::UVec3> { + let output: Val<::glam::UVec3> = ::glam::U8Vec3::as_uvec3(&_self).into(); + output + } + /// Casts all elements of `self` to `f32`. + fn as_vec3(_self: Ref<::glam::U8Vec3>) -> Val<::glam::Vec3> { + let output: Val<::glam::Vec3> = ::glam::U8Vec3::as_vec3(&_self).into(); + output + } + /// Casts all elements of `self` to `f32`. + fn as_vec3a(_self: Ref<::glam::U8Vec3>) -> Val<::glam::Vec3A> { + let output: Val<::glam::Vec3A> = ::glam::U8Vec3::as_vec3a(&_self).into(); + output + } + fn assert_receiver_is_total_eq(_self: Ref<::glam::U8Vec3>) -> () { + let output: () = <::glam::U8Vec3 as ::core::cmp::Eq>::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<::glam::U8Vec3>, + min: Val<::glam::U8Vec3>, + max: Val<::glam::U8Vec3>, + ) -> Val<::glam::U8Vec3> { + let output: Val<::glam::U8Vec3> = ::glam::U8Vec3::clamp( + _self.into_inner(), + min.into_inner(), + max.into_inner(), + ) + .into(); + output + } + fn clone(_self: Ref<::glam::U8Vec3>) -> Val<::glam::U8Vec3> { + let output: Val<::glam::U8Vec3> = <::glam::U8Vec3 as ::bevy_reflect::erased_serde::__private::serde::__private::Clone>::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<::glam::U8Vec3>, + rhs: Val<::glam::U8Vec3>, + ) -> Val<::glam::BVec3> { + let output: Val<::glam::BVec3> = ::glam::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<::glam::U8Vec3>, + rhs: Val<::glam::U8Vec3>, + ) -> Val<::glam::BVec3> { + let output: Val<::glam::BVec3> = ::glam::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<::glam::U8Vec3>, + rhs: Val<::glam::U8Vec3>, + ) -> Val<::glam::BVec3> { + let output: Val<::glam::BVec3> = ::glam::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<::glam::U8Vec3>, + rhs: Val<::glam::U8Vec3>, + ) -> Val<::glam::BVec3> { + let output: Val<::glam::BVec3> = ::glam::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<::glam::U8Vec3>, + rhs: Val<::glam::U8Vec3>, + ) -> Val<::glam::BVec3> { + let output: Val<::glam::BVec3> = ::glam::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<::glam::U8Vec3>, + rhs: Val<::glam::U8Vec3>, + ) -> Val<::glam::BVec3> { + let output: Val<::glam::BVec3> = ::glam::U8Vec3::cmpne( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Computes the cross product of `self` and `rhs`. + fn cross( + _self: Val<::glam::U8Vec3>, + rhs: Val<::glam::U8Vec3>, + ) -> Val<::glam::U8Vec3> { + let output: Val<::glam::U8Vec3> = ::glam::U8Vec3::cross( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + fn div(_self: Val<::glam::U8Vec3>, rhs: Ref<::glam::U8Vec3>) -> Val<::glam::U8Vec3> { + let output: Val<::glam::U8Vec3> = <::glam::U8Vec3 as ::core::ops::Div< + &::glam::U8Vec3, + >>::div(_self.into_inner(), &rhs) + .into(); + output + } + fn div(_self: Val<::glam::U8Vec3>, rhs: Val<::glam::U8Vec3>) -> Val<::glam::U8Vec3> { + let output: Val<::glam::U8Vec3> = <::glam::U8Vec3 as ::core::ops::Div< + ::glam::U8Vec3, + >>::div(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + fn div(_self: Val<::glam::U8Vec3>, rhs: u8) -> Val<::glam::U8Vec3> { + let output: Val<::glam::U8Vec3> = <::glam::U8Vec3 as ::core::ops::Div< + u8, + >>::div(_self.into_inner(), rhs) + .into(); + output + } + /// Computes the dot product of `self` and `rhs`. + fn dot(_self: Val<::glam::U8Vec3>, rhs: Val<::glam::U8Vec3>) -> u8 { + let output: u8 = ::glam::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<::glam::U8Vec3>, + rhs: Val<::glam::U8Vec3>, + ) -> Val<::glam::U8Vec3> { + let output: Val<::glam::U8Vec3> = ::glam::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<::glam::U8Vec3>) -> u8 { + let output: u8 = ::glam::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<::glam::U8Vec3>) -> u8 { + let output: u8 = ::glam::U8Vec3::element_sum(_self.into_inner()).into(); + output + } + fn eq(_self: Ref<::glam::U8Vec3>, other: Ref<::glam::U8Vec3>) -> bool { + let output: bool = <::glam::U8Vec3 as ::core::cmp::PartialEq< + ::glam::U8Vec3, + >>::eq(&_self, &other) + .into(); + output + } + /// Creates a 4D vector from `self` and the given `w` value. + fn extend(_self: Val<::glam::U8Vec3>, w: u8) -> Val<::glam::U8Vec4> { + let output: Val<::glam::U8Vec4> = ::glam::U8Vec3::extend(_self.into_inner(), w) + .into(); + output + } + /// Creates a new vector from an array. + fn from_array(a: [u8; 3]) -> Val<::glam::U8Vec3> { + let output: Val<::glam::U8Vec3> = ::glam::U8Vec3::from_array(a).into(); + output + } + /// Computes the squared length of `self`. + fn length_squared(_self: Val<::glam::U8Vec3>) -> u8 { + let output: u8 = ::glam::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<::glam::U8Vec3>, rhs: Val<::glam::U8Vec3>) -> Val<::glam::U8Vec3> { + let output: Val<::glam::U8Vec3> = ::glam::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<::glam::U8Vec3>) -> u8 { + let output: u8 = ::glam::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<::glam::U8Vec3>, rhs: Val<::glam::U8Vec3>) -> Val<::glam::U8Vec3> { + let output: Val<::glam::U8Vec3> = ::glam::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<::glam::U8Vec3>) -> u8 { + let output: u8 = ::glam::U8Vec3::min_element(_self.into_inner()).into(); + output + } + fn mul(_self: Val<::glam::U8Vec3>, rhs: Ref<::glam::U8Vec3>) -> Val<::glam::U8Vec3> { + let output: Val<::glam::U8Vec3> = <::glam::U8Vec3 as ::core::ops::Mul< + &::glam::U8Vec3, + >>::mul(_self.into_inner(), &rhs) + .into(); + output + } + fn mul(_self: Val<::glam::U8Vec3>, rhs: Val<::glam::U8Vec3>) -> Val<::glam::U8Vec3> { + let output: Val<::glam::U8Vec3> = <::glam::U8Vec3 as ::core::ops::Mul< + ::glam::U8Vec3, + >>::mul(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + fn mul(_self: Val<::glam::U8Vec3>, rhs: u8) -> Val<::glam::U8Vec3> { + let output: Val<::glam::U8Vec3> = <::glam::U8Vec3 as ::core::ops::Mul< + u8, + >>::mul(_self.into_inner(), rhs) + .into(); + output + } + /// Creates a new vector. + fn new(x: u8, y: u8, z: u8) -> Val<::glam::U8Vec3> { + let output: Val<::glam::U8Vec3> = ::glam::U8Vec3::new(x, y, z).into(); + output + } + fn rem(_self: Val<::glam::U8Vec3>, rhs: Ref<::glam::U8Vec3>) -> Val<::glam::U8Vec3> { + let output: Val<::glam::U8Vec3> = <::glam::U8Vec3 as ::core::ops::Rem< + &::glam::U8Vec3, + >>::rem(_self.into_inner(), &rhs) + .into(); + output + } + fn rem(_self: Val<::glam::U8Vec3>, rhs: Val<::glam::U8Vec3>) -> Val<::glam::U8Vec3> { + let output: Val<::glam::U8Vec3> = <::glam::U8Vec3 as ::core::ops::Rem< + ::glam::U8Vec3, + >>::rem(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + fn rem(_self: Val<::glam::U8Vec3>, rhs: u8) -> Val<::glam::U8Vec3> { + let output: Val<::glam::U8Vec3> = <::glam::U8Vec3 as ::core::ops::Rem< + u8, + >>::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<::glam::U8Vec3>, + rhs: Val<::glam::U8Vec3>, + ) -> Val<::glam::U8Vec3> { + let output: Val<::glam::U8Vec3> = ::glam::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<::glam::U8Vec3>, + rhs: Val<::glam::I8Vec3>, + ) -> Val<::glam::U8Vec3> { + let output: Val<::glam::U8Vec3> = ::glam::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<::glam::U8Vec3>, + rhs: Val<::glam::U8Vec3>, + ) -> Val<::glam::U8Vec3> { + let output: Val<::glam::U8Vec3> = ::glam::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<::glam::U8Vec3>, + rhs: Val<::glam::U8Vec3>, + ) -> Val<::glam::U8Vec3> { + let output: Val<::glam::U8Vec3> = ::glam::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<::glam::U8Vec3>, + rhs: Val<::glam::U8Vec3>, + ) -> Val<::glam::U8Vec3> { + let output: Val<::glam::U8Vec3> = ::glam::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<::glam::BVec3>, + if_true: Val<::glam::U8Vec3>, + if_false: Val<::glam::U8Vec3>, + ) -> Val<::glam::U8Vec3> { + let output: Val<::glam::U8Vec3> = ::glam::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<::glam::U8Vec3> { + let output: Val<::glam::U8Vec3> = ::glam::U8Vec3::splat(v).into(); + output + } + fn sub(_self: Val<::glam::U8Vec3>, rhs: Ref<::glam::U8Vec3>) -> Val<::glam::U8Vec3> { + let output: Val<::glam::U8Vec3> = <::glam::U8Vec3 as ::core::ops::Sub< + &::glam::U8Vec3, + >>::sub(_self.into_inner(), &rhs) + .into(); + output + } + fn sub(_self: Val<::glam::U8Vec3>, rhs: Val<::glam::U8Vec3>) -> Val<::glam::U8Vec3> { + let output: Val<::glam::U8Vec3> = <::glam::U8Vec3 as ::core::ops::Sub< + ::glam::U8Vec3, + >>::sub(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + fn sub(_self: Val<::glam::U8Vec3>, rhs: u8) -> Val<::glam::U8Vec3> { + let output: Val<::glam::U8Vec3> = <::glam::U8Vec3 as ::core::ops::Sub< + u8, + >>::sub(_self.into_inner(), rhs) + .into(); + output + } + /// `[x, y, z]` + fn to_array(_self: Ref<::glam::U8Vec3>) -> [u8; 3] { + let output: [u8; 3] = ::glam::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<::glam::U8Vec3>) -> Val<::glam::U8Vec2> { + let output: Val<::glam::U8Vec2> = ::glam::U8Vec3::truncate(_self.into_inner()) + .into(); + output + } + /// Creates a 3D vector from `self` with the given value of `x`. + fn with_x(_self: Val<::glam::U8Vec3>, x: u8) -> Val<::glam::U8Vec3> { + let output: Val<::glam::U8Vec3> = ::glam::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<::glam::U8Vec3>, y: u8) -> Val<::glam::U8Vec3> { + let output: Val<::glam::U8Vec3> = ::glam::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<::glam::U8Vec3>, z: u8) -> Val<::glam::U8Vec3> { + let output: Val<::glam::U8Vec3> = ::glam::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<::glam::U8Vec3>, + rhs: Val<::glam::U8Vec3>, + ) -> Val<::glam::U8Vec3> { + let output: Val<::glam::U8Vec3> = ::glam::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<::glam::U8Vec3>, + rhs: Val<::glam::I8Vec3>, + ) -> Val<::glam::U8Vec3> { + let output: Val<::glam::U8Vec3> = ::glam::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<::glam::U8Vec3>, + rhs: Val<::glam::U8Vec3>, + ) -> Val<::glam::U8Vec3> { + let output: Val<::glam::U8Vec3> = ::glam::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<::glam::U8Vec3>, + rhs: Val<::glam::U8Vec3>, + ) -> Val<::glam::U8Vec3> { + let output: Val<::glam::U8Vec3> = ::glam::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<::glam::U8Vec3>, + rhs: Val<::glam::U8Vec3>, + ) -> Val<::glam::U8Vec3> { + let output: Val<::glam::U8Vec3> = ::glam::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 ::glam::U8Vec4 { + fn add(_self: Val<::glam::U8Vec4>, rhs: Ref<::glam::U8Vec4>) -> Val<::glam::U8Vec4> { + let output: Val<::glam::U8Vec4> = <::glam::U8Vec4 as ::core::ops::Add< + &::glam::U8Vec4, + >>::add(_self.into_inner(), &rhs) + .into(); + output + } + fn add(_self: Val<::glam::U8Vec4>, rhs: Val<::glam::U8Vec4>) -> Val<::glam::U8Vec4> { + let output: Val<::glam::U8Vec4> = <::glam::U8Vec4 as ::core::ops::Add< + ::glam::U8Vec4, + >>::add(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + fn add(_self: Val<::glam::U8Vec4>, rhs: u8) -> Val<::glam::U8Vec4> { + let output: Val<::glam::U8Vec4> = <::glam::U8Vec4 as ::core::ops::Add< + u8, + >>::add(_self.into_inner(), rhs) + .into(); + output + } + /// Casts all elements of `self` to `f64`. + fn as_dvec4(_self: Ref<::glam::U8Vec4>) -> Val<::glam::DVec4> { + let output: Val<::glam::DVec4> = ::glam::U8Vec4::as_dvec4(&_self).into(); + output + } + /// Casts all elements of `self` to `i16`. + fn as_i16vec4(_self: Ref<::glam::U8Vec4>) -> Val<::glam::I16Vec4> { + let output: Val<::glam::I16Vec4> = ::glam::U8Vec4::as_i16vec4(&_self).into(); + output + } + /// Casts all elements of `self` to `i64`. + fn as_i64vec4(_self: Ref<::glam::U8Vec4>) -> Val<::glam::I64Vec4> { + let output: Val<::glam::I64Vec4> = ::glam::U8Vec4::as_i64vec4(&_self).into(); + output + } + /// Casts all elements of `self` to `i8`. + fn as_i8vec4(_self: Ref<::glam::U8Vec4>) -> Val<::glam::I8Vec4> { + let output: Val<::glam::I8Vec4> = ::glam::U8Vec4::as_i8vec4(&_self).into(); + output + } + /// Casts all elements of `self` to `i32`. + fn as_ivec4(_self: Ref<::glam::U8Vec4>) -> Val<::glam::IVec4> { + let output: Val<::glam::IVec4> = ::glam::U8Vec4::as_ivec4(&_self).into(); + output + } + /// Casts all elements of `self` to `u16`. + fn as_u16vec4(_self: Ref<::glam::U8Vec4>) -> Val<::glam::U16Vec4> { + let output: Val<::glam::U16Vec4> = ::glam::U8Vec4::as_u16vec4(&_self).into(); + output + } + /// Casts all elements of `self` to `u64`. + fn as_u64vec4(_self: Ref<::glam::U8Vec4>) -> Val<::glam::U64Vec4> { + let output: Val<::glam::U64Vec4> = ::glam::U8Vec4::as_u64vec4(&_self).into(); + output + } + /// Casts all elements of `self` to `u32`. + fn as_uvec4(_self: Ref<::glam::U8Vec4>) -> Val<::glam::UVec4> { + let output: Val<::glam::UVec4> = ::glam::U8Vec4::as_uvec4(&_self).into(); + output + } + /// Casts all elements of `self` to `f32`. + fn as_vec4(_self: Ref<::glam::U8Vec4>) -> Val<::glam::Vec4> { + let output: Val<::glam::Vec4> = ::glam::U8Vec4::as_vec4(&_self).into(); + output + } + fn assert_receiver_is_total_eq(_self: Ref<::glam::U8Vec4>) -> () { + let output: () = <::glam::U8Vec4 as ::core::cmp::Eq>::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<::glam::U8Vec4>, + min: Val<::glam::U8Vec4>, + max: Val<::glam::U8Vec4>, + ) -> Val<::glam::U8Vec4> { + let output: Val<::glam::U8Vec4> = ::glam::U8Vec4::clamp( + _self.into_inner(), + min.into_inner(), + max.into_inner(), + ) + .into(); + output + } + fn clone(_self: Ref<::glam::U8Vec4>) -> Val<::glam::U8Vec4> { + let output: Val<::glam::U8Vec4> = <::glam::U8Vec4 as ::bevy_reflect::erased_serde::__private::serde::__private::Clone>::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<::glam::U8Vec4>, + rhs: Val<::glam::U8Vec4>, + ) -> Val<::glam::BVec4> { + let output: Val<::glam::BVec4> = ::glam::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<::glam::U8Vec4>, + rhs: Val<::glam::U8Vec4>, + ) -> Val<::glam::BVec4> { + let output: Val<::glam::BVec4> = ::glam::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<::glam::U8Vec4>, + rhs: Val<::glam::U8Vec4>, + ) -> Val<::glam::BVec4> { + let output: Val<::glam::BVec4> = ::glam::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<::glam::U8Vec4>, + rhs: Val<::glam::U8Vec4>, + ) -> Val<::glam::BVec4> { + let output: Val<::glam::BVec4> = ::glam::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<::glam::U8Vec4>, + rhs: Val<::glam::U8Vec4>, + ) -> Val<::glam::BVec4> { + let output: Val<::glam::BVec4> = ::glam::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<::glam::U8Vec4>, + rhs: Val<::glam::U8Vec4>, + ) -> Val<::glam::BVec4> { + let output: Val<::glam::BVec4> = ::glam::U8Vec4::cmpne( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + fn div(_self: Val<::glam::U8Vec4>, rhs: Ref<::glam::U8Vec4>) -> Val<::glam::U8Vec4> { + let output: Val<::glam::U8Vec4> = <::glam::U8Vec4 as ::core::ops::Div< + &::glam::U8Vec4, + >>::div(_self.into_inner(), &rhs) + .into(); + output + } + fn div(_self: Val<::glam::U8Vec4>, rhs: Val<::glam::U8Vec4>) -> Val<::glam::U8Vec4> { + let output: Val<::glam::U8Vec4> = <::glam::U8Vec4 as ::core::ops::Div< + ::glam::U8Vec4, + >>::div(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + fn div(_self: Val<::glam::U8Vec4>, rhs: u8) -> Val<::glam::U8Vec4> { + let output: Val<::glam::U8Vec4> = <::glam::U8Vec4 as ::core::ops::Div< + u8, + >>::div(_self.into_inner(), rhs) + .into(); + output + } + /// Computes the dot product of `self` and `rhs`. + fn dot(_self: Val<::glam::U8Vec4>, rhs: Val<::glam::U8Vec4>) -> u8 { + let output: u8 = ::glam::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<::glam::U8Vec4>, + rhs: Val<::glam::U8Vec4>, + ) -> Val<::glam::U8Vec4> { + let output: Val<::glam::U8Vec4> = ::glam::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<::glam::U8Vec4>) -> u8 { + let output: u8 = ::glam::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<::glam::U8Vec4>) -> u8 { + let output: u8 = ::glam::U8Vec4::element_sum(_self.into_inner()).into(); + output + } + fn eq(_self: Ref<::glam::U8Vec4>, other: Ref<::glam::U8Vec4>) -> bool { + let output: bool = <::glam::U8Vec4 as ::core::cmp::PartialEq< + ::glam::U8Vec4, + >>::eq(&_self, &other) + .into(); + output + } + /// Creates a new vector from an array. + fn from_array(a: [u8; 4]) -> Val<::glam::U8Vec4> { + let output: Val<::glam::U8Vec4> = ::glam::U8Vec4::from_array(a).into(); + output + } + /// Computes the squared length of `self`. + fn length_squared(_self: Val<::glam::U8Vec4>) -> u8 { + let output: u8 = ::glam::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<::glam::U8Vec4>, rhs: Val<::glam::U8Vec4>) -> Val<::glam::U8Vec4> { + let output: Val<::glam::U8Vec4> = ::glam::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<::glam::U8Vec4>) -> u8 { + let output: u8 = ::glam::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<::glam::U8Vec4>, rhs: Val<::glam::U8Vec4>) -> Val<::glam::U8Vec4> { + let output: Val<::glam::U8Vec4> = ::glam::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<::glam::U8Vec4>) -> u8 { + let output: u8 = ::glam::U8Vec4::min_element(_self.into_inner()).into(); + output + } + fn mul(_self: Val<::glam::U8Vec4>, rhs: Ref<::glam::U8Vec4>) -> Val<::glam::U8Vec4> { + let output: Val<::glam::U8Vec4> = <::glam::U8Vec4 as ::core::ops::Mul< + &::glam::U8Vec4, + >>::mul(_self.into_inner(), &rhs) + .into(); + output + } + fn mul(_self: Val<::glam::U8Vec4>, rhs: Val<::glam::U8Vec4>) -> Val<::glam::U8Vec4> { + let output: Val<::glam::U8Vec4> = <::glam::U8Vec4 as ::core::ops::Mul< + ::glam::U8Vec4, + >>::mul(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + fn mul(_self: Val<::glam::U8Vec4>, rhs: u8) -> Val<::glam::U8Vec4> { + let output: Val<::glam::U8Vec4> = <::glam::U8Vec4 as ::core::ops::Mul< + u8, + >>::mul(_self.into_inner(), rhs) + .into(); + output + } + /// Creates a new vector. + fn new(x: u8, y: u8, z: u8, w: u8) -> Val<::glam::U8Vec4> { + let output: Val<::glam::U8Vec4> = ::glam::U8Vec4::new(x, y, z, w).into(); + output + } + fn rem(_self: Val<::glam::U8Vec4>, rhs: Ref<::glam::U8Vec4>) -> Val<::glam::U8Vec4> { + let output: Val<::glam::U8Vec4> = <::glam::U8Vec4 as ::core::ops::Rem< + &::glam::U8Vec4, + >>::rem(_self.into_inner(), &rhs) + .into(); + output + } + fn rem(_self: Val<::glam::U8Vec4>, rhs: Val<::glam::U8Vec4>) -> Val<::glam::U8Vec4> { + let output: Val<::glam::U8Vec4> = <::glam::U8Vec4 as ::core::ops::Rem< + ::glam::U8Vec4, + >>::rem(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + fn rem(_self: Val<::glam::U8Vec4>, rhs: u8) -> Val<::glam::U8Vec4> { + let output: Val<::glam::U8Vec4> = <::glam::U8Vec4 as ::core::ops::Rem< + u8, + >>::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<::glam::U8Vec4>, + rhs: Val<::glam::U8Vec4>, + ) -> Val<::glam::U8Vec4> { + let output: Val<::glam::U8Vec4> = ::glam::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<::glam::U8Vec4>, + rhs: Val<::glam::I8Vec4>, + ) -> Val<::glam::U8Vec4> { + let output: Val<::glam::U8Vec4> = ::glam::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<::glam::U8Vec4>, + rhs: Val<::glam::U8Vec4>, + ) -> Val<::glam::U8Vec4> { + let output: Val<::glam::U8Vec4> = ::glam::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<::glam::U8Vec4>, + rhs: Val<::glam::U8Vec4>, + ) -> Val<::glam::U8Vec4> { + let output: Val<::glam::U8Vec4> = ::glam::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<::glam::U8Vec4>, + rhs: Val<::glam::U8Vec4>, + ) -> Val<::glam::U8Vec4> { + let output: Val<::glam::U8Vec4> = ::glam::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<::glam::BVec4>, + if_true: Val<::glam::U8Vec4>, + if_false: Val<::glam::U8Vec4>, + ) -> Val<::glam::U8Vec4> { + let output: Val<::glam::U8Vec4> = ::glam::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<::glam::U8Vec4> { + let output: Val<::glam::U8Vec4> = ::glam::U8Vec4::splat(v).into(); + output + } + fn sub(_self: Val<::glam::U8Vec4>, rhs: Ref<::glam::U8Vec4>) -> Val<::glam::U8Vec4> { + let output: Val<::glam::U8Vec4> = <::glam::U8Vec4 as ::core::ops::Sub< + &::glam::U8Vec4, + >>::sub(_self.into_inner(), &rhs) + .into(); + output + } + fn sub(_self: Val<::glam::U8Vec4>, rhs: Val<::glam::U8Vec4>) -> Val<::glam::U8Vec4> { + let output: Val<::glam::U8Vec4> = <::glam::U8Vec4 as ::core::ops::Sub< + ::glam::U8Vec4, + >>::sub(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + fn sub(_self: Val<::glam::U8Vec4>, rhs: u8) -> Val<::glam::U8Vec4> { + let output: Val<::glam::U8Vec4> = <::glam::U8Vec4 as ::core::ops::Sub< + u8, + >>::sub(_self.into_inner(), rhs) + .into(); + output + } + /// `[x, y, z, w]` + fn to_array(_self: Ref<::glam::U8Vec4>) -> [u8; 4] { + let output: [u8; 4] = ::glam::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<::glam::U8Vec4>) -> Val<::glam::U8Vec3> { + let output: Val<::glam::U8Vec3> = ::glam::U8Vec4::truncate(_self.into_inner()) + .into(); + output + } + /// Creates a 4D vector from `self` with the given value of `w`. + fn with_w(_self: Val<::glam::U8Vec4>, w: u8) -> Val<::glam::U8Vec4> { + let output: Val<::glam::U8Vec4> = ::glam::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<::glam::U8Vec4>, x: u8) -> Val<::glam::U8Vec4> { + let output: Val<::glam::U8Vec4> = ::glam::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<::glam::U8Vec4>, y: u8) -> Val<::glam::U8Vec4> { + let output: Val<::glam::U8Vec4> = ::glam::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<::glam::U8Vec4>, z: u8) -> Val<::glam::U8Vec4> { + let output: Val<::glam::U8Vec4> = ::glam::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<::glam::U8Vec4>, + rhs: Val<::glam::U8Vec4>, + ) -> Val<::glam::U8Vec4> { + let output: Val<::glam::U8Vec4> = ::glam::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<::glam::U8Vec4>, + rhs: Val<::glam::I8Vec4>, + ) -> Val<::glam::U8Vec4> { + let output: Val<::glam::U8Vec4> = ::glam::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<::glam::U8Vec4>, + rhs: Val<::glam::U8Vec4>, + ) -> Val<::glam::U8Vec4> { + let output: Val<::glam::U8Vec4> = ::glam::U8Vec4::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<::glam::U8Vec4>, + rhs: Val<::glam::U8Vec4>, + ) -> Val<::glam::U8Vec4> { + let output: Val<::glam::U8Vec4> = ::glam::U8Vec4::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<::glam::U8Vec4>, + rhs: Val<::glam::U8Vec4>, + ) -> Val<::glam::U8Vec4> { + let output: Val<::glam::U8Vec4> = ::glam::U8Vec4::wrapping_sub( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } +} +#[script_bindings( + remote, + name = "u_16_vec_2_functions", + bms_core_path = "bevy_mod_scripting_core", + generated +)] +impl ::glam::U16Vec2 { + fn add( + _self: Val<::glam::U16Vec2>, + rhs: Ref<::glam::U16Vec2>, + ) -> Val<::glam::U16Vec2> { + let output: Val<::glam::U16Vec2> = <::glam::U16Vec2 as ::core::ops::Add< + &::glam::U16Vec2, + >>::add(_self.into_inner(), &rhs) + .into(); + output + } + fn add( + _self: Val<::glam::U16Vec2>, + rhs: Val<::glam::U16Vec2>, + ) -> Val<::glam::U16Vec2> { + let output: Val<::glam::U16Vec2> = <::glam::U16Vec2 as ::core::ops::Add< + ::glam::U16Vec2, + >>::add(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + fn add(_self: Val<::glam::U16Vec2>, rhs: u16) -> Val<::glam::U16Vec2> { + let output: Val<::glam::U16Vec2> = <::glam::U16Vec2 as ::core::ops::Add< + u16, + >>::add(_self.into_inner(), rhs) + .into(); + output + } + /// Casts all elements of `self` to `f64`. + fn as_dvec2(_self: Ref<::glam::U16Vec2>) -> Val<::glam::DVec2> { + let output: Val<::glam::DVec2> = ::glam::U16Vec2::as_dvec2(&_self).into(); + output + } + /// Casts all elements of `self` to `i16`. + fn as_i16vec2(_self: Ref<::glam::U16Vec2>) -> Val<::glam::I16Vec2> { + let output: Val<::glam::I16Vec2> = ::glam::U16Vec2::as_i16vec2(&_self).into(); + output + } + /// Casts all elements of `self` to `i64`. + fn as_i64vec2(_self: Ref<::glam::U16Vec2>) -> Val<::glam::I64Vec2> { + let output: Val<::glam::I64Vec2> = ::glam::U16Vec2::as_i64vec2(&_self).into(); + output + } + /// Casts all elements of `self` to `i8`. + fn as_i8vec2(_self: Ref<::glam::U16Vec2>) -> Val<::glam::I8Vec2> { + let output: Val<::glam::I8Vec2> = ::glam::U16Vec2::as_i8vec2(&_self).into(); + output + } + /// Casts all elements of `self` to `i32`. + fn as_ivec2(_self: Ref<::glam::U16Vec2>) -> Val<::glam::IVec2> { + let output: Val<::glam::IVec2> = ::glam::U16Vec2::as_ivec2(&_self).into(); + output + } + /// Casts all elements of `self` to `u64`. + fn as_u64vec2(_self: Ref<::glam::U16Vec2>) -> Val<::glam::U64Vec2> { + let output: Val<::glam::U64Vec2> = ::glam::U16Vec2::as_u64vec2(&_self).into(); + output + } + /// Casts all elements of `self` to `u8`. + fn as_u8vec2(_self: Ref<::glam::U16Vec2>) -> Val<::glam::U8Vec2> { + let output: Val<::glam::U8Vec2> = ::glam::U16Vec2::as_u8vec2(&_self).into(); + output + } + /// Casts all elements of `self` to `u32`. + fn as_uvec2(_self: Ref<::glam::U16Vec2>) -> Val<::glam::UVec2> { + let output: Val<::glam::UVec2> = ::glam::U16Vec2::as_uvec2(&_self).into(); + output + } + /// Casts all elements of `self` to `f32`. + fn as_vec2(_self: Ref<::glam::U16Vec2>) -> Val<::glam::Vec2> { + let output: Val<::glam::Vec2> = ::glam::U16Vec2::as_vec2(&_self).into(); + output + } + fn assert_receiver_is_total_eq(_self: Ref<::glam::U16Vec2>) -> () { + let output: () = <::glam::U16Vec2 as ::core::cmp::Eq>::assert_receiver_is_total_eq( + &_self, + ) + .into(); + output + } + /// 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<::glam::U16Vec2>, + min: Val<::glam::U16Vec2>, + max: Val<::glam::U16Vec2>, + ) -> Val<::glam::U16Vec2> { + let output: Val<::glam::U16Vec2> = ::glam::U16Vec2::clamp( + _self.into_inner(), + min.into_inner(), + max.into_inner(), + ) + .into(); + output + } + fn clone(_self: Ref<::glam::U16Vec2>) -> Val<::glam::U16Vec2> { + let output: Val<::glam::U16Vec2> = <::glam::U16Vec2 as ::bevy_reflect::erased_serde::__private::serde::__private::Clone>::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<::glam::U16Vec2>, + rhs: Val<::glam::U16Vec2>, + ) -> Val<::glam::BVec2> { + let output: Val<::glam::BVec2> = ::glam::U16Vec2::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<::glam::U16Vec2>, + rhs: Val<::glam::U16Vec2>, + ) -> Val<::glam::BVec2> { + let output: Val<::glam::BVec2> = ::glam::U16Vec2::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<::glam::U16Vec2>, + rhs: Val<::glam::U16Vec2>, + ) -> Val<::glam::BVec2> { + let output: Val<::glam::BVec2> = ::glam::U16Vec2::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<::glam::U16Vec2>, + rhs: Val<::glam::U16Vec2>, + ) -> Val<::glam::BVec2> { + let output: Val<::glam::BVec2> = ::glam::U16Vec2::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<::glam::U16Vec2>, + rhs: Val<::glam::U16Vec2>, + ) -> Val<::glam::BVec2> { + let output: Val<::glam::BVec2> = ::glam::U16Vec2::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<::glam::U16Vec2>, + rhs: Val<::glam::U16Vec2>, + ) -> Val<::glam::BVec2> { + let output: Val<::glam::BVec2> = ::glam::U16Vec2::cmpne( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + fn div( + _self: Val<::glam::U16Vec2>, + rhs: Ref<::glam::U16Vec2>, + ) -> Val<::glam::U16Vec2> { + let output: Val<::glam::U16Vec2> = <::glam::U16Vec2 as ::core::ops::Div< + &::glam::U16Vec2, + >>::div(_self.into_inner(), &rhs) + .into(); + output + } + fn div( + _self: Val<::glam::U16Vec2>, + rhs: Val<::glam::U16Vec2>, + ) -> Val<::glam::U16Vec2> { + let output: Val<::glam::U16Vec2> = <::glam::U16Vec2 as ::core::ops::Div< + ::glam::U16Vec2, + >>::div(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + fn div(_self: Val<::glam::U16Vec2>, rhs: u16) -> Val<::glam::U16Vec2> { + let output: Val<::glam::U16Vec2> = <::glam::U16Vec2 as ::core::ops::Div< + u16, + >>::div(_self.into_inner(), rhs) + .into(); + output + } + /// Computes the dot product of `self` and `rhs`. + fn dot(_self: Val<::glam::U16Vec2>, rhs: Val<::glam::U16Vec2>) -> u16 { + let output: u16 = ::glam::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<::glam::U16Vec2>, + rhs: Val<::glam::U16Vec2>, + ) -> Val<::glam::U16Vec2> { + let output: Val<::glam::U16Vec2> = ::glam::U16Vec2::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<::glam::U16Vec2>) -> u16 { + let output: u16 = ::glam::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<::glam::U16Vec2>) -> u16 { + let output: u16 = ::glam::U16Vec2::element_sum(_self.into_inner()).into(); + output + } + fn eq(_self: Ref<::glam::U16Vec2>, other: Ref<::glam::U16Vec2>) -> bool { + let output: bool = <::glam::U16Vec2 as ::core::cmp::PartialEq< + ::glam::U16Vec2, + >>::eq(&_self, &other) + .into(); + output + } + /// Creates a 3D vector from `self` and the given `z` value. + fn extend(_self: Val<::glam::U16Vec2>, z: u16) -> Val<::glam::U16Vec3> { + let output: Val<::glam::U16Vec3> = ::glam::U16Vec2::extend(_self.into_inner(), z) + .into(); + output + } + /// Creates a new vector from an array. + fn from_array(a: [u16; 2]) -> Val<::glam::U16Vec2> { + let output: Val<::glam::U16Vec2> = ::glam::U16Vec2::from_array(a).into(); + output + } + /// Computes the squared length of `self`. + fn length_squared(_self: Val<::glam::U16Vec2>) -> u16 { + let output: u16 = ::glam::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<::glam::U16Vec2>, + rhs: Val<::glam::U16Vec2>, + ) -> Val<::glam::U16Vec2> { + let output: Val<::glam::U16Vec2> = ::glam::U16Vec2::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<::glam::U16Vec2>) -> u16 { + let output: u16 = ::glam::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<::glam::U16Vec2>, + rhs: Val<::glam::U16Vec2>, + ) -> Val<::glam::U16Vec2> { + let output: Val<::glam::U16Vec2> = ::glam::U16Vec2::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<::glam::U16Vec2>) -> u16 { + let output: u16 = ::glam::U16Vec2::min_element(_self.into_inner()).into(); + output + } + fn mul( + _self: Val<::glam::U16Vec2>, + rhs: Ref<::glam::U16Vec2>, + ) -> Val<::glam::U16Vec2> { + let output: Val<::glam::U16Vec2> = <::glam::U16Vec2 as ::core::ops::Mul< + &::glam::U16Vec2, + >>::mul(_self.into_inner(), &rhs) + .into(); + output + } + fn mul( + _self: Val<::glam::U16Vec2>, + rhs: Val<::glam::U16Vec2>, + ) -> Val<::glam::U16Vec2> { + let output: Val<::glam::U16Vec2> = <::glam::U16Vec2 as ::core::ops::Mul< + ::glam::U16Vec2, + >>::mul(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + fn mul(_self: Val<::glam::U16Vec2>, rhs: u16) -> Val<::glam::U16Vec2> { + let output: Val<::glam::U16Vec2> = <::glam::U16Vec2 as ::core::ops::Mul< + u16, + >>::mul(_self.into_inner(), rhs) + .into(); + output + } + /// Creates a new vector. + fn new(x: u16, y: u16) -> Val<::glam::U16Vec2> { + let output: Val<::glam::U16Vec2> = ::glam::U16Vec2::new(x, y).into(); + output + } + fn rem( + _self: Val<::glam::U16Vec2>, + rhs: Ref<::glam::U16Vec2>, + ) -> Val<::glam::U16Vec2> { + let output: Val<::glam::U16Vec2> = <::glam::U16Vec2 as ::core::ops::Rem< + &::glam::U16Vec2, + >>::rem(_self.into_inner(), &rhs) + .into(); + output + } + fn rem( + _self: Val<::glam::U16Vec2>, + rhs: Val<::glam::U16Vec2>, + ) -> Val<::glam::U16Vec2> { + let output: Val<::glam::U16Vec2> = <::glam::U16Vec2 as ::core::ops::Rem< + ::glam::U16Vec2, + >>::rem(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + fn rem(_self: Val<::glam::U16Vec2>, rhs: u16) -> Val<::glam::U16Vec2> { + let output: Val<::glam::U16Vec2> = <::glam::U16Vec2 as ::core::ops::Rem< + u16, + >>::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<::glam::U16Vec2>, + rhs: Val<::glam::U16Vec2>, + ) -> Val<::glam::U16Vec2> { + let output: Val<::glam::U16Vec2> = ::glam::U16Vec2::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<::glam::U16Vec2>, + rhs: Val<::glam::I16Vec2>, + ) -> Val<::glam::U16Vec2> { + let output: Val<::glam::U16Vec2> = ::glam::U16Vec2::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<::glam::U16Vec2>, + rhs: Val<::glam::U16Vec2>, + ) -> Val<::glam::U16Vec2> { + let output: Val<::glam::U16Vec2> = ::glam::U16Vec2::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<::glam::U16Vec2>, + rhs: Val<::glam::U16Vec2>, + ) -> Val<::glam::U16Vec2> { + let output: Val<::glam::U16Vec2> = ::glam::U16Vec2::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<::glam::U16Vec2>, + rhs: Val<::glam::U16Vec2>, + ) -> Val<::glam::U16Vec2> { + let output: Val<::glam::U16Vec2> = ::glam::U16Vec2::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<::glam::BVec2>, + if_true: Val<::glam::U16Vec2>, + if_false: Val<::glam::U16Vec2>, + ) -> Val<::glam::U16Vec2> { + let output: Val<::glam::U16Vec2> = ::glam::U16Vec2::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: u16) -> Val<::glam::U16Vec2> { + let output: Val<::glam::U16Vec2> = ::glam::U16Vec2::splat(v).into(); + output + } + fn sub( + _self: Val<::glam::U16Vec2>, + rhs: Ref<::glam::U16Vec2>, + ) -> Val<::glam::U16Vec2> { + let output: Val<::glam::U16Vec2> = <::glam::U16Vec2 as ::core::ops::Sub< + &::glam::U16Vec2, + >>::sub(_self.into_inner(), &rhs) + .into(); + output + } + fn sub( + _self: Val<::glam::U16Vec2>, + rhs: Val<::glam::U16Vec2>, + ) -> Val<::glam::U16Vec2> { + let output: Val<::glam::U16Vec2> = <::glam::U16Vec2 as ::core::ops::Sub< + ::glam::U16Vec2, + >>::sub(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + fn sub(_self: Val<::glam::U16Vec2>, rhs: u16) -> Val<::glam::U16Vec2> { + let output: Val<::glam::U16Vec2> = <::glam::U16Vec2 as ::core::ops::Sub< + u16, + >>::sub(_self.into_inner(), rhs) + .into(); + output + } + /// `[x, y]` + fn to_array(_self: Ref<::glam::U16Vec2>) -> [u16; 2] { + let output: [u16; 2] = ::glam::U16Vec2::to_array(&_self).into(); + output + } + /// Creates a 2D vector from `self` with the given value of `x`. + fn with_x(_self: Val<::glam::U16Vec2>, x: u16) -> Val<::glam::U16Vec2> { + let output: Val<::glam::U16Vec2> = ::glam::U16Vec2::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<::glam::U16Vec2>, y: u16) -> Val<::glam::U16Vec2> { + let output: Val<::glam::U16Vec2> = ::glam::U16Vec2::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<::glam::U16Vec2>, + rhs: Val<::glam::U16Vec2>, + ) -> Val<::glam::U16Vec2> { + let output: Val<::glam::U16Vec2> = ::glam::U16Vec2::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<::glam::U16Vec2>, + rhs: Val<::glam::I16Vec2>, + ) -> Val<::glam::U16Vec2> { + let output: Val<::glam::U16Vec2> = ::glam::U16Vec2::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<::glam::U16Vec2>, + rhs: Val<::glam::U16Vec2>, + ) -> Val<::glam::U16Vec2> { + let output: Val<::glam::U16Vec2> = ::glam::U16Vec2::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<::glam::U16Vec2>, + rhs: Val<::glam::U16Vec2>, + ) -> Val<::glam::U16Vec2> { + let output: Val<::glam::U16Vec2> = ::glam::U16Vec2::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<::glam::U16Vec2>, + rhs: Val<::glam::U16Vec2>, + ) -> Val<::glam::U16Vec2> { + let output: Val<::glam::U16Vec2> = ::glam::U16Vec2::wrapping_sub( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } +} +#[script_bindings( + remote, + name = "u_16_vec_3_functions", + bms_core_path = "bevy_mod_scripting_core", + generated +)] +impl ::glam::U16Vec3 { + fn add( + _self: Val<::glam::U16Vec3>, + rhs: Ref<::glam::U16Vec3>, + ) -> Val<::glam::U16Vec3> { + let output: Val<::glam::U16Vec3> = <::glam::U16Vec3 as ::core::ops::Add< + &::glam::U16Vec3, + >>::add(_self.into_inner(), &rhs) + .into(); + output + } + fn add( + _self: Val<::glam::U16Vec3>, + rhs: Val<::glam::U16Vec3>, + ) -> Val<::glam::U16Vec3> { + let output: Val<::glam::U16Vec3> = <::glam::U16Vec3 as ::core::ops::Add< + ::glam::U16Vec3, + >>::add(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + fn add(_self: Val<::glam::U16Vec3>, rhs: u16) -> Val<::glam::U16Vec3> { + let output: Val<::glam::U16Vec3> = <::glam::U16Vec3 as ::core::ops::Add< + u16, + >>::add(_self.into_inner(), rhs) + .into(); + output + } + /// Casts all elements of `self` to `f64`. + fn as_dvec3(_self: Ref<::glam::U16Vec3>) -> Val<::glam::DVec3> { + let output: Val<::glam::DVec3> = ::glam::U16Vec3::as_dvec3(&_self).into(); + output + } + /// Casts all elements of `self` to `i16`. + fn as_i16vec3(_self: Ref<::glam::U16Vec3>) -> Val<::glam::I16Vec3> { + let output: Val<::glam::I16Vec3> = ::glam::U16Vec3::as_i16vec3(&_self).into(); + output + } + /// Casts all elements of `self` to `i64`. + fn as_i64vec3(_self: Ref<::glam::U16Vec3>) -> Val<::glam::I64Vec3> { + let output: Val<::glam::I64Vec3> = ::glam::U16Vec3::as_i64vec3(&_self).into(); + output + } + /// Casts all elements of `self` to `i8`. + fn as_i8vec3(_self: Ref<::glam::U16Vec3>) -> Val<::glam::I8Vec3> { + let output: Val<::glam::I8Vec3> = ::glam::U16Vec3::as_i8vec3(&_self).into(); + output + } + /// Casts all elements of `self` to `i32`. + fn as_ivec3(_self: Ref<::glam::U16Vec3>) -> Val<::glam::IVec3> { + let output: Val<::glam::IVec3> = ::glam::U16Vec3::as_ivec3(&_self).into(); + output + } + /// Casts all elements of `self` to `u64`. + fn as_u64vec3(_self: Ref<::glam::U16Vec3>) -> Val<::glam::U64Vec3> { + let output: Val<::glam::U64Vec3> = ::glam::U16Vec3::as_u64vec3(&_self).into(); + output + } + /// Casts all elements of `self` to `u8`. + fn as_u8vec3(_self: Ref<::glam::U16Vec3>) -> Val<::glam::U8Vec3> { + let output: Val<::glam::U8Vec3> = ::glam::U16Vec3::as_u8vec3(&_self).into(); + output + } + /// Casts all elements of `self` to `u32`. + fn as_uvec3(_self: Ref<::glam::U16Vec3>) -> Val<::glam::UVec3> { + let output: Val<::glam::UVec3> = ::glam::U16Vec3::as_uvec3(&_self).into(); + output + } + /// Casts all elements of `self` to `f32`. + fn as_vec3(_self: Ref<::glam::U16Vec3>) -> Val<::glam::Vec3> { + let output: Val<::glam::Vec3> = ::glam::U16Vec3::as_vec3(&_self).into(); + output + } + /// Casts all elements of `self` to `f32`. + fn as_vec3a(_self: Ref<::glam::U16Vec3>) -> Val<::glam::Vec3A> { + let output: Val<::glam::Vec3A> = ::glam::U16Vec3::as_vec3a(&_self).into(); + output + } + fn assert_receiver_is_total_eq(_self: Ref<::glam::U16Vec3>) -> () { + let output: () = <::glam::U16Vec3 as ::core::cmp::Eq>::assert_receiver_is_total_eq( + &_self, + ) + .into(); + output + } + /// 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<::glam::U16Vec3>, + min: Val<::glam::U16Vec3>, + max: Val<::glam::U16Vec3>, + ) -> Val<::glam::U16Vec3> { + let output: Val<::glam::U16Vec3> = ::glam::U16Vec3::clamp( + _self.into_inner(), + min.into_inner(), + max.into_inner(), + ) + .into(); + output + } + fn clone(_self: Ref<::glam::U16Vec3>) -> Val<::glam::U16Vec3> { + let output: Val<::glam::U16Vec3> = <::glam::U16Vec3 as ::bevy_reflect::erased_serde::__private::serde::__private::Clone>::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<::glam::U16Vec3>, + rhs: Val<::glam::U16Vec3>, + ) -> Val<::glam::BVec3> { + let output: Val<::glam::BVec3> = ::glam::U16Vec3::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<::glam::U16Vec3>, + rhs: Val<::glam::U16Vec3>, + ) -> Val<::glam::BVec3> { + let output: Val<::glam::BVec3> = ::glam::U16Vec3::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<::glam::U16Vec3>, + rhs: Val<::glam::U16Vec3>, + ) -> Val<::glam::BVec3> { + let output: Val<::glam::BVec3> = ::glam::U16Vec3::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<::glam::U16Vec3>, + rhs: Val<::glam::U16Vec3>, + ) -> Val<::glam::BVec3> { + let output: Val<::glam::BVec3> = ::glam::U16Vec3::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<::glam::U16Vec3>, + rhs: Val<::glam::U16Vec3>, + ) -> Val<::glam::BVec3> { + let output: Val<::glam::BVec3> = ::glam::U16Vec3::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<::glam::U16Vec3>, + rhs: Val<::glam::U16Vec3>, + ) -> Val<::glam::BVec3> { + let output: Val<::glam::BVec3> = ::glam::U16Vec3::cmpne( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Computes the cross product of `self` and `rhs`. + fn cross( + _self: Val<::glam::U16Vec3>, + rhs: Val<::glam::U16Vec3>, + ) -> Val<::glam::U16Vec3> { + let output: Val<::glam::U16Vec3> = ::glam::U16Vec3::cross( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + fn div( + _self: Val<::glam::U16Vec3>, + rhs: Ref<::glam::U16Vec3>, + ) -> Val<::glam::U16Vec3> { + let output: Val<::glam::U16Vec3> = <::glam::U16Vec3 as ::core::ops::Div< + &::glam::U16Vec3, + >>::div(_self.into_inner(), &rhs) + .into(); + output + } + fn div( + _self: Val<::glam::U16Vec3>, + rhs: Val<::glam::U16Vec3>, + ) -> Val<::glam::U16Vec3> { + let output: Val<::glam::U16Vec3> = <::glam::U16Vec3 as ::core::ops::Div< + ::glam::U16Vec3, + >>::div(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + fn div(_self: Val<::glam::U16Vec3>, rhs: u16) -> Val<::glam::U16Vec3> { + let output: Val<::glam::U16Vec3> = <::glam::U16Vec3 as ::core::ops::Div< + u16, + >>::div(_self.into_inner(), rhs) + .into(); + output + } + /// Computes the dot product of `self` and `rhs`. + fn dot(_self: Val<::glam::U16Vec3>, rhs: Val<::glam::U16Vec3>) -> u16 { + let output: u16 = ::glam::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<::glam::U16Vec3>, + rhs: Val<::glam::U16Vec3>, + ) -> Val<::glam::U16Vec3> { + let output: Val<::glam::U16Vec3> = ::glam::U16Vec3::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<::glam::U16Vec3>) -> u16 { + let output: u16 = ::glam::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<::glam::U16Vec3>) -> u16 { + let output: u16 = ::glam::U16Vec3::element_sum(_self.into_inner()).into(); + output + } + fn eq(_self: Ref<::glam::U16Vec3>, other: Ref<::glam::U16Vec3>) -> bool { + let output: bool = <::glam::U16Vec3 as ::core::cmp::PartialEq< + ::glam::U16Vec3, + >>::eq(&_self, &other) + .into(); + output + } + /// Creates a 4D vector from `self` and the given `w` value. + fn extend(_self: Val<::glam::U16Vec3>, w: u16) -> Val<::glam::U16Vec4> { + let output: Val<::glam::U16Vec4> = ::glam::U16Vec3::extend(_self.into_inner(), w) + .into(); + output + } + /// Creates a new vector from an array. + fn from_array(a: [u16; 3]) -> Val<::glam::U16Vec3> { + let output: Val<::glam::U16Vec3> = ::glam::U16Vec3::from_array(a).into(); + output + } + /// Computes the squared length of `self`. + fn length_squared(_self: Val<::glam::U16Vec3>) -> u16 { + let output: u16 = ::glam::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<::glam::U16Vec3>, + rhs: Val<::glam::U16Vec3>, + ) -> Val<::glam::U16Vec3> { + let output: Val<::glam::U16Vec3> = ::glam::U16Vec3::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<::glam::U16Vec3>) -> u16 { + let output: u16 = ::glam::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<::glam::U16Vec3>, + rhs: Val<::glam::U16Vec3>, + ) -> Val<::glam::U16Vec3> { + let output: Val<::glam::U16Vec3> = ::glam::U16Vec3::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<::glam::U16Vec3>) -> u16 { + let output: u16 = ::glam::U16Vec3::min_element(_self.into_inner()).into(); + output + } + fn mul( + _self: Val<::glam::U16Vec3>, + rhs: Ref<::glam::U16Vec3>, + ) -> Val<::glam::U16Vec3> { + let output: Val<::glam::U16Vec3> = <::glam::U16Vec3 as ::core::ops::Mul< + &::glam::U16Vec3, + >>::mul(_self.into_inner(), &rhs) + .into(); + output + } + fn mul( + _self: Val<::glam::U16Vec3>, + rhs: Val<::glam::U16Vec3>, + ) -> Val<::glam::U16Vec3> { + let output: Val<::glam::U16Vec3> = <::glam::U16Vec3 as ::core::ops::Mul< + ::glam::U16Vec3, + >>::mul(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + fn mul(_self: Val<::glam::U16Vec3>, rhs: u16) -> Val<::glam::U16Vec3> { + let output: Val<::glam::U16Vec3> = <::glam::U16Vec3 as ::core::ops::Mul< + u16, + >>::mul(_self.into_inner(), rhs) + .into(); + output + } + /// Creates a new vector. + fn new(x: u16, y: u16, z: u16) -> Val<::glam::U16Vec3> { + let output: Val<::glam::U16Vec3> = ::glam::U16Vec3::new(x, y, z).into(); + output + } + fn rem( + _self: Val<::glam::U16Vec3>, + rhs: Ref<::glam::U16Vec3>, + ) -> Val<::glam::U16Vec3> { + let output: Val<::glam::U16Vec3> = <::glam::U16Vec3 as ::core::ops::Rem< + &::glam::U16Vec3, + >>::rem(_self.into_inner(), &rhs) + .into(); + output + } + fn rem( + _self: Val<::glam::U16Vec3>, + rhs: Val<::glam::U16Vec3>, + ) -> Val<::glam::U16Vec3> { + let output: Val<::glam::U16Vec3> = <::glam::U16Vec3 as ::core::ops::Rem< + ::glam::U16Vec3, + >>::rem(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + fn rem(_self: Val<::glam::U16Vec3>, rhs: u16) -> Val<::glam::U16Vec3> { + let output: Val<::glam::U16Vec3> = <::glam::U16Vec3 as ::core::ops::Rem< + u16, + >>::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<::glam::U16Vec3>, + rhs: Val<::glam::U16Vec3>, + ) -> Val<::glam::U16Vec3> { + let output: Val<::glam::U16Vec3> = ::glam::U16Vec3::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<::glam::U16Vec3>, + rhs: Val<::glam::I16Vec3>, + ) -> Val<::glam::U16Vec3> { + let output: Val<::glam::U16Vec3> = ::glam::U16Vec3::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<::glam::U16Vec3>, + rhs: Val<::glam::U16Vec3>, + ) -> Val<::glam::U16Vec3> { + let output: Val<::glam::U16Vec3> = ::glam::U16Vec3::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<::glam::U16Vec3>, + rhs: Val<::glam::U16Vec3>, + ) -> Val<::glam::U16Vec3> { + let output: Val<::glam::U16Vec3> = ::glam::U16Vec3::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<::glam::U16Vec3>, + rhs: Val<::glam::U16Vec3>, + ) -> Val<::glam::U16Vec3> { + let output: Val<::glam::U16Vec3> = ::glam::U16Vec3::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<::glam::BVec3>, + if_true: Val<::glam::U16Vec3>, + if_false: Val<::glam::U16Vec3>, + ) -> Val<::glam::U16Vec3> { + let output: Val<::glam::U16Vec3> = ::glam::U16Vec3::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: u16) -> Val<::glam::U16Vec3> { + let output: Val<::glam::U16Vec3> = ::glam::U16Vec3::splat(v).into(); + output + } + fn sub( + _self: Val<::glam::U16Vec3>, + rhs: Ref<::glam::U16Vec3>, + ) -> Val<::glam::U16Vec3> { + let output: Val<::glam::U16Vec3> = <::glam::U16Vec3 as ::core::ops::Sub< + &::glam::U16Vec3, + >>::sub(_self.into_inner(), &rhs) + .into(); + output + } + fn sub( + _self: Val<::glam::U16Vec3>, + rhs: Val<::glam::U16Vec3>, + ) -> Val<::glam::U16Vec3> { + let output: Val<::glam::U16Vec3> = <::glam::U16Vec3 as ::core::ops::Sub< + ::glam::U16Vec3, + >>::sub(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + fn sub(_self: Val<::glam::U16Vec3>, rhs: u16) -> Val<::glam::U16Vec3> { + let output: Val<::glam::U16Vec3> = <::glam::U16Vec3 as ::core::ops::Sub< + u16, + >>::sub(_self.into_inner(), rhs) + .into(); + output + } + /// `[x, y, z]` + fn to_array(_self: Ref<::glam::U16Vec3>) -> [u16; 3] { + let output: [u16; 3] = ::glam::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<::glam::U16Vec3>) -> Val<::glam::U16Vec2> { + let output: Val<::glam::U16Vec2> = ::glam::U16Vec3::truncate(_self.into_inner()) + .into(); + output + } + /// Creates a 3D vector from `self` with the given value of `x`. + fn with_x(_self: Val<::glam::U16Vec3>, x: u16) -> Val<::glam::U16Vec3> { + let output: Val<::glam::U16Vec3> = ::glam::U16Vec3::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<::glam::U16Vec3>, y: u16) -> Val<::glam::U16Vec3> { + let output: Val<::glam::U16Vec3> = ::glam::U16Vec3::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<::glam::U16Vec3>, z: u16) -> Val<::glam::U16Vec3> { + let output: Val<::glam::U16Vec3> = ::glam::U16Vec3::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<::glam::U16Vec3>, + rhs: Val<::glam::U16Vec3>, + ) -> Val<::glam::U16Vec3> { + let output: Val<::glam::U16Vec3> = ::glam::U16Vec3::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<::glam::U16Vec3>, + rhs: Val<::glam::I16Vec3>, + ) -> Val<::glam::U16Vec3> { + let output: Val<::glam::U16Vec3> = ::glam::U16Vec3::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<::glam::U16Vec3>, + rhs: Val<::glam::U16Vec3>, + ) -> Val<::glam::U16Vec3> { + let output: Val<::glam::U16Vec3> = ::glam::U16Vec3::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<::glam::U16Vec3>, + rhs: Val<::glam::U16Vec3>, + ) -> Val<::glam::U16Vec3> { + let output: Val<::glam::U16Vec3> = ::glam::U16Vec3::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<::glam::U16Vec3>, + rhs: Val<::glam::U16Vec3>, + ) -> Val<::glam::U16Vec3> { + let output: Val<::glam::U16Vec3> = ::glam::U16Vec3::wrapping_sub( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } +} +#[script_bindings( + remote, + name = "u_16_vec_4_functions", + bms_core_path = "bevy_mod_scripting_core", + generated +)] +impl ::glam::U16Vec4 { + fn add( + _self: Val<::glam::U16Vec4>, + rhs: Ref<::glam::U16Vec4>, + ) -> Val<::glam::U16Vec4> { + let output: Val<::glam::U16Vec4> = <::glam::U16Vec4 as ::core::ops::Add< + &::glam::U16Vec4, + >>::add(_self.into_inner(), &rhs) + .into(); + output + } + fn add( + _self: Val<::glam::U16Vec4>, + rhs: Val<::glam::U16Vec4>, + ) -> Val<::glam::U16Vec4> { + let output: Val<::glam::U16Vec4> = <::glam::U16Vec4 as ::core::ops::Add< + ::glam::U16Vec4, + >>::add(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + fn add(_self: Val<::glam::U16Vec4>, rhs: u16) -> Val<::glam::U16Vec4> { + let output: Val<::glam::U16Vec4> = <::glam::U16Vec4 as ::core::ops::Add< + u16, + >>::add(_self.into_inner(), rhs) + .into(); + output + } + /// Casts all elements of `self` to `f64`. + fn as_dvec4(_self: Ref<::glam::U16Vec4>) -> Val<::glam::DVec4> { + let output: Val<::glam::DVec4> = ::glam::U16Vec4::as_dvec4(&_self).into(); + output + } + /// Casts all elements of `self` to `i16`. + fn as_i16vec4(_self: Ref<::glam::U16Vec4>) -> Val<::glam::I16Vec4> { + let output: Val<::glam::I16Vec4> = ::glam::U16Vec4::as_i16vec4(&_self).into(); + output + } + /// Casts all elements of `self` to `i64`. + fn as_i64vec4(_self: Ref<::glam::U16Vec4>) -> Val<::glam::I64Vec4> { + let output: Val<::glam::I64Vec4> = ::glam::U16Vec4::as_i64vec4(&_self).into(); + output + } + /// Casts all elements of `self` to `i8`. + fn as_i8vec4(_self: Ref<::glam::U16Vec4>) -> Val<::glam::I8Vec4> { + let output: Val<::glam::I8Vec4> = ::glam::U16Vec4::as_i8vec4(&_self).into(); + output + } + /// Casts all elements of `self` to `i32`. + fn as_ivec4(_self: Ref<::glam::U16Vec4>) -> Val<::glam::IVec4> { + let output: Val<::glam::IVec4> = ::glam::U16Vec4::as_ivec4(&_self).into(); + output + } + /// Casts all elements of `self` to `u64`. + fn as_u64vec4(_self: Ref<::glam::U16Vec4>) -> Val<::glam::U64Vec4> { + let output: Val<::glam::U64Vec4> = ::glam::U16Vec4::as_u64vec4(&_self).into(); + output + } + /// Casts all elements of `self` to `u8`. + fn as_u8vec4(_self: Ref<::glam::U16Vec4>) -> Val<::glam::U8Vec4> { + let output: Val<::glam::U8Vec4> = ::glam::U16Vec4::as_u8vec4(&_self).into(); + output + } + /// Casts all elements of `self` to `u32`. + fn as_uvec4(_self: Ref<::glam::U16Vec4>) -> Val<::glam::UVec4> { + let output: Val<::glam::UVec4> = ::glam::U16Vec4::as_uvec4(&_self).into(); + output + } + /// Casts all elements of `self` to `f32`. + fn as_vec4(_self: Ref<::glam::U16Vec4>) -> Val<::glam::Vec4> { + let output: Val<::glam::Vec4> = ::glam::U16Vec4::as_vec4(&_self).into(); + output + } + fn assert_receiver_is_total_eq(_self: Ref<::glam::U16Vec4>) -> () { + let output: () = <::glam::U16Vec4 as ::core::cmp::Eq>::assert_receiver_is_total_eq( + &_self, + ) + .into(); + output + } + /// 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<::glam::U16Vec4>, + min: Val<::glam::U16Vec4>, + max: Val<::glam::U16Vec4>, + ) -> Val<::glam::U16Vec4> { + let output: Val<::glam::U16Vec4> = ::glam::U16Vec4::clamp( + _self.into_inner(), + min.into_inner(), + max.into_inner(), + ) + .into(); + output + } + fn clone(_self: Ref<::glam::U16Vec4>) -> Val<::glam::U16Vec4> { + let output: Val<::glam::U16Vec4> = <::glam::U16Vec4 as ::bevy_reflect::erased_serde::__private::serde::__private::Clone>::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<::glam::U16Vec4>, + rhs: Val<::glam::U16Vec4>, + ) -> Val<::glam::BVec4> { + let output: Val<::glam::BVec4> = ::glam::U16Vec4::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<::glam::U16Vec4>, + rhs: Val<::glam::U16Vec4>, + ) -> Val<::glam::BVec4> { + let output: Val<::glam::BVec4> = ::glam::U16Vec4::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<::glam::U16Vec4>, + rhs: Val<::glam::U16Vec4>, + ) -> Val<::glam::BVec4> { + let output: Val<::glam::BVec4> = ::glam::U16Vec4::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<::glam::U16Vec4>, + rhs: Val<::glam::U16Vec4>, + ) -> Val<::glam::BVec4> { + let output: Val<::glam::BVec4> = ::glam::U16Vec4::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<::glam::U16Vec4>, + rhs: Val<::glam::U16Vec4>, + ) -> Val<::glam::BVec4> { + let output: Val<::glam::BVec4> = ::glam::U16Vec4::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<::glam::U16Vec4>, + rhs: Val<::glam::U16Vec4>, + ) -> Val<::glam::BVec4> { + let output: Val<::glam::BVec4> = ::glam::U16Vec4::cmpne( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + fn div( + _self: Val<::glam::U16Vec4>, + rhs: Ref<::glam::U16Vec4>, + ) -> Val<::glam::U16Vec4> { + let output: Val<::glam::U16Vec4> = <::glam::U16Vec4 as ::core::ops::Div< + &::glam::U16Vec4, + >>::div(_self.into_inner(), &rhs) + .into(); + output + } + fn div( + _self: Val<::glam::U16Vec4>, + rhs: Val<::glam::U16Vec4>, + ) -> Val<::glam::U16Vec4> { + let output: Val<::glam::U16Vec4> = <::glam::U16Vec4 as ::core::ops::Div< + ::glam::U16Vec4, + >>::div(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + fn div(_self: Val<::glam::U16Vec4>, rhs: u16) -> Val<::glam::U16Vec4> { + let output: Val<::glam::U16Vec4> = <::glam::U16Vec4 as ::core::ops::Div< + u16, + >>::div(_self.into_inner(), rhs) + .into(); + output + } + /// Computes the dot product of `self` and `rhs`. + fn dot(_self: Val<::glam::U16Vec4>, rhs: Val<::glam::U16Vec4>) -> u16 { + let output: u16 = ::glam::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<::glam::U16Vec4>, + rhs: Val<::glam::U16Vec4>, + ) -> Val<::glam::U16Vec4> { + let output: Val<::glam::U16Vec4> = ::glam::U16Vec4::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<::glam::U16Vec4>) -> u16 { + let output: u16 = ::glam::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<::glam::U16Vec4>) -> u16 { + let output: u16 = ::glam::U16Vec4::element_sum(_self.into_inner()).into(); + output + } + fn eq(_self: Ref<::glam::U16Vec4>, other: Ref<::glam::U16Vec4>) -> bool { + let output: bool = <::glam::U16Vec4 as ::core::cmp::PartialEq< + ::glam::U16Vec4, + >>::eq(&_self, &other) + .into(); + output + } + /// Creates a new vector from an array. + fn from_array(a: [u16; 4]) -> Val<::glam::U16Vec4> { + let output: Val<::glam::U16Vec4> = ::glam::U16Vec4::from_array(a).into(); + output + } + /// Computes the squared length of `self`. + fn length_squared(_self: Val<::glam::U16Vec4>) -> u16 { + let output: u16 = ::glam::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<::glam::U16Vec4>, + rhs: Val<::glam::U16Vec4>, + ) -> Val<::glam::U16Vec4> { + let output: Val<::glam::U16Vec4> = ::glam::U16Vec4::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<::glam::U16Vec4>) -> u16 { + let output: u16 = ::glam::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<::glam::U16Vec4>, + rhs: Val<::glam::U16Vec4>, + ) -> Val<::glam::U16Vec4> { + let output: Val<::glam::U16Vec4> = ::glam::U16Vec4::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<::glam::U16Vec4>) -> u16 { + let output: u16 = ::glam::U16Vec4::min_element(_self.into_inner()).into(); + output + } + fn mul( + _self: Val<::glam::U16Vec4>, + rhs: Ref<::glam::U16Vec4>, + ) -> Val<::glam::U16Vec4> { + let output: Val<::glam::U16Vec4> = <::glam::U16Vec4 as ::core::ops::Mul< + &::glam::U16Vec4, + >>::mul(_self.into_inner(), &rhs) + .into(); + output + } + fn mul( + _self: Val<::glam::U16Vec4>, + rhs: Val<::glam::U16Vec4>, + ) -> Val<::glam::U16Vec4> { + let output: Val<::glam::U16Vec4> = <::glam::U16Vec4 as ::core::ops::Mul< + ::glam::U16Vec4, + >>::mul(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + fn mul(_self: Val<::glam::U16Vec4>, rhs: u16) -> Val<::glam::U16Vec4> { + let output: Val<::glam::U16Vec4> = <::glam::U16Vec4 as ::core::ops::Mul< + u16, + >>::mul(_self.into_inner(), rhs) + .into(); + output + } + /// Creates a new vector. + fn new(x: u16, y: u16, z: u16, w: u16) -> Val<::glam::U16Vec4> { + let output: Val<::glam::U16Vec4> = ::glam::U16Vec4::new(x, y, z, w).into(); + output + } + fn rem( + _self: Val<::glam::U16Vec4>, + rhs: Ref<::glam::U16Vec4>, + ) -> Val<::glam::U16Vec4> { + let output: Val<::glam::U16Vec4> = <::glam::U16Vec4 as ::core::ops::Rem< + &::glam::U16Vec4, + >>::rem(_self.into_inner(), &rhs) + .into(); + output + } + fn rem( + _self: Val<::glam::U16Vec4>, + rhs: Val<::glam::U16Vec4>, + ) -> Val<::glam::U16Vec4> { + let output: Val<::glam::U16Vec4> = <::glam::U16Vec4 as ::core::ops::Rem< + ::glam::U16Vec4, + >>::rem(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + fn rem(_self: Val<::glam::U16Vec4>, rhs: u16) -> Val<::glam::U16Vec4> { + let output: Val<::glam::U16Vec4> = <::glam::U16Vec4 as ::core::ops::Rem< + u16, + >>::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<::glam::U16Vec4>, + rhs: Val<::glam::U16Vec4>, + ) -> Val<::glam::U16Vec4> { + let output: Val<::glam::U16Vec4> = ::glam::U16Vec4::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<::glam::U16Vec4>, + rhs: Val<::glam::I16Vec4>, + ) -> Val<::glam::U16Vec4> { + let output: Val<::glam::U16Vec4> = ::glam::U16Vec4::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<::glam::U16Vec4>, + rhs: Val<::glam::U16Vec4>, + ) -> Val<::glam::U16Vec4> { + let output: Val<::glam::U16Vec4> = ::glam::U16Vec4::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<::glam::U16Vec4>, + rhs: Val<::glam::U16Vec4>, + ) -> Val<::glam::U16Vec4> { + let output: Val<::glam::U16Vec4> = ::glam::U16Vec4::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<::glam::U16Vec4>, + rhs: Val<::glam::U16Vec4>, + ) -> Val<::glam::U16Vec4> { + let output: Val<::glam::U16Vec4> = ::glam::U16Vec4::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<::glam::BVec4>, + if_true: Val<::glam::U16Vec4>, + if_false: Val<::glam::U16Vec4>, + ) -> Val<::glam::U16Vec4> { + let output: Val<::glam::U16Vec4> = ::glam::U16Vec4::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: u16) -> Val<::glam::U16Vec4> { + let output: Val<::glam::U16Vec4> = ::glam::U16Vec4::splat(v).into(); + output + } + fn sub( + _self: Val<::glam::U16Vec4>, + rhs: Ref<::glam::U16Vec4>, + ) -> Val<::glam::U16Vec4> { + let output: Val<::glam::U16Vec4> = <::glam::U16Vec4 as ::core::ops::Sub< + &::glam::U16Vec4, + >>::sub(_self.into_inner(), &rhs) + .into(); + output + } + fn sub( + _self: Val<::glam::U16Vec4>, + rhs: Val<::glam::U16Vec4>, + ) -> Val<::glam::U16Vec4> { + let output: Val<::glam::U16Vec4> = <::glam::U16Vec4 as ::core::ops::Sub< + ::glam::U16Vec4, + >>::sub(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + fn sub(_self: Val<::glam::U16Vec4>, rhs: u16) -> Val<::glam::U16Vec4> { + let output: Val<::glam::U16Vec4> = <::glam::U16Vec4 as ::core::ops::Sub< + u16, + >>::sub(_self.into_inner(), rhs) + .into(); + output + } + /// `[x, y, z, w]` + fn to_array(_self: Ref<::glam::U16Vec4>) -> [u16; 4] { + let output: [u16; 4] = ::glam::U16Vec4::to_array(&_self).into(); + output + } + /// Creates a 3D vector from the `x`, `y` and `z` elements of `self`, discarding `w`. + /// Truncation to [`U16Vec3`] may also be performed by using [`self.xyz()`][crate::swizzles::Vec4Swizzles::xyz()]. + fn truncate(_self: Val<::glam::U16Vec4>) -> Val<::glam::U16Vec3> { + let output: Val<::glam::U16Vec3> = ::glam::U16Vec4::truncate(_self.into_inner()) + .into(); + output + } + /// Creates a 4D vector from `self` with the given value of `w`. + fn with_w(_self: Val<::glam::U16Vec4>, w: u16) -> Val<::glam::U16Vec4> { + let output: Val<::glam::U16Vec4> = ::glam::U16Vec4::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<::glam::U16Vec4>, x: u16) -> Val<::glam::U16Vec4> { + let output: Val<::glam::U16Vec4> = ::glam::U16Vec4::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<::glam::U16Vec4>, y: u16) -> Val<::glam::U16Vec4> { + let output: Val<::glam::U16Vec4> = ::glam::U16Vec4::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<::glam::U16Vec4>, z: u16) -> Val<::glam::U16Vec4> { + let output: Val<::glam::U16Vec4> = ::glam::U16Vec4::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<::glam::U16Vec4>, + rhs: Val<::glam::U16Vec4>, + ) -> Val<::glam::U16Vec4> { + let output: Val<::glam::U16Vec4> = ::glam::U16Vec4::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<::glam::U16Vec4>, + rhs: Val<::glam::I16Vec4>, + ) -> Val<::glam::U16Vec4> { + let output: Val<::glam::U16Vec4> = ::glam::U16Vec4::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<::glam::U16Vec4>, + rhs: Val<::glam::U16Vec4>, + ) -> Val<::glam::U16Vec4> { + let output: Val<::glam::U16Vec4> = ::glam::U16Vec4::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<::glam::U16Vec4>, + rhs: Val<::glam::U16Vec4>, + ) -> Val<::glam::U16Vec4> { + let output: Val<::glam::U16Vec4> = ::glam::U16Vec4::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<::glam::U16Vec4>, + rhs: Val<::glam::U16Vec4>, + ) -> Val<::glam::U16Vec4> { + let output: Val<::glam::U16Vec4> = ::glam::U16Vec4::wrapping_sub( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } +} +#[script_bindings( + remote, + name = "u_64_vec_2_functions", + bms_core_path = "bevy_mod_scripting_core", + generated +)] +impl ::glam::U64Vec2 { + fn add( + _self: Val<::glam::U64Vec2>, + rhs: Ref<::glam::U64Vec2>, + ) -> Val<::glam::U64Vec2> { + let output: Val<::glam::U64Vec2> = <::glam::U64Vec2 as ::core::ops::Add< + &::glam::U64Vec2, + >>::add(_self.into_inner(), &rhs) + .into(); + output + } + fn add( + _self: Val<::glam::U64Vec2>, + rhs: Val<::glam::U64Vec2>, + ) -> Val<::glam::U64Vec2> { + let output: Val<::glam::U64Vec2> = <::glam::U64Vec2 as ::core::ops::Add< + ::glam::U64Vec2, + >>::add(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + fn add(_self: Val<::glam::U64Vec2>, rhs: u64) -> Val<::glam::U64Vec2> { + let output: Val<::glam::U64Vec2> = <::glam::U64Vec2 as ::core::ops::Add< + u64, + >>::add(_self.into_inner(), rhs) + .into(); + output + } + /// Casts all elements of `self` to `f64`. + fn as_dvec2(_self: Ref<::glam::U64Vec2>) -> Val<::glam::DVec2> { + let output: Val<::glam::DVec2> = ::glam::U64Vec2::as_dvec2(&_self).into(); + output + } + /// Casts all elements of `self` to `i16`. + fn as_i16vec2(_self: Ref<::glam::U64Vec2>) -> Val<::glam::I16Vec2> { + let output: Val<::glam::I16Vec2> = ::glam::U64Vec2::as_i16vec2(&_self).into(); + output + } + /// Casts all elements of `self` to `i64`. + fn as_i64vec2(_self: Ref<::glam::U64Vec2>) -> Val<::glam::I64Vec2> { + let output: Val<::glam::I64Vec2> = ::glam::U64Vec2::as_i64vec2(&_self).into(); + output + } + /// Casts all elements of `self` to `i8`. + fn as_i8vec2(_self: Ref<::glam::U64Vec2>) -> Val<::glam::I8Vec2> { + let output: Val<::glam::I8Vec2> = ::glam::U64Vec2::as_i8vec2(&_self).into(); + output + } + /// Casts all elements of `self` to `i32`. + fn as_ivec2(_self: Ref<::glam::U64Vec2>) -> Val<::glam::IVec2> { + let output: Val<::glam::IVec2> = ::glam::U64Vec2::as_ivec2(&_self).into(); + output + } + /// Casts all elements of `self` to `u16`. + fn as_u16vec2(_self: Ref<::glam::U64Vec2>) -> Val<::glam::U16Vec2> { + let output: Val<::glam::U16Vec2> = ::glam::U64Vec2::as_u16vec2(&_self).into(); + output + } + /// Casts all elements of `self` to `u8`. + fn as_u8vec2(_self: Ref<::glam::U64Vec2>) -> Val<::glam::U8Vec2> { + let output: Val<::glam::U8Vec2> = ::glam::U64Vec2::as_u8vec2(&_self).into(); + output + } + /// Casts all elements of `self` to `u32`. + fn as_uvec2(_self: Ref<::glam::U64Vec2>) -> Val<::glam::UVec2> { + let output: Val<::glam::UVec2> = ::glam::U64Vec2::as_uvec2(&_self).into(); + output + } + /// Casts all elements of `self` to `f32`. + fn as_vec2(_self: Ref<::glam::U64Vec2>) -> Val<::glam::Vec2> { + let output: Val<::glam::Vec2> = ::glam::U64Vec2::as_vec2(&_self).into(); + output + } + fn assert_receiver_is_total_eq(_self: Ref<::glam::U64Vec2>) -> () { + let output: () = <::glam::U64Vec2 as ::core::cmp::Eq>::assert_receiver_is_total_eq( + &_self, + ) + .into(); + output + } + /// Component-wise clamping of values, similar to [`u64::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<::glam::U64Vec2>, + min: Val<::glam::U64Vec2>, + max: Val<::glam::U64Vec2>, + ) -> Val<::glam::U64Vec2> { + let output: Val<::glam::U64Vec2> = ::glam::U64Vec2::clamp( + _self.into_inner(), + min.into_inner(), + max.into_inner(), + ) + .into(); + output + } + fn clone(_self: Ref<::glam::U64Vec2>) -> Val<::glam::U64Vec2> { + let output: Val<::glam::U64Vec2> = <::glam::U64Vec2 as ::bevy_reflect::erased_serde::__private::serde::__private::Clone>::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<::glam::U64Vec2>, + rhs: Val<::glam::U64Vec2>, + ) -> Val<::glam::BVec2> { + let output: Val<::glam::BVec2> = ::glam::U64Vec2::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<::glam::U64Vec2>, + rhs: Val<::glam::U64Vec2>, + ) -> Val<::glam::BVec2> { + let output: Val<::glam::BVec2> = ::glam::U64Vec2::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<::glam::U64Vec2>, + rhs: Val<::glam::U64Vec2>, + ) -> Val<::glam::BVec2> { + let output: Val<::glam::BVec2> = ::glam::U64Vec2::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<::glam::U64Vec2>, + rhs: Val<::glam::U64Vec2>, + ) -> Val<::glam::BVec2> { + let output: Val<::glam::BVec2> = ::glam::U64Vec2::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<::glam::U64Vec2>, + rhs: Val<::glam::U64Vec2>, + ) -> Val<::glam::BVec2> { + let output: Val<::glam::BVec2> = ::glam::U64Vec2::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<::glam::U64Vec2>, + rhs: Val<::glam::U64Vec2>, + ) -> Val<::glam::BVec2> { + let output: Val<::glam::BVec2> = ::glam::U64Vec2::cmpne( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + fn div( + _self: Val<::glam::U64Vec2>, + rhs: Ref<::glam::U64Vec2>, + ) -> Val<::glam::U64Vec2> { + let output: Val<::glam::U64Vec2> = <::glam::U64Vec2 as ::core::ops::Div< + &::glam::U64Vec2, + >>::div(_self.into_inner(), &rhs) + .into(); + output + } + fn div( + _self: Val<::glam::U64Vec2>, + rhs: Val<::glam::U64Vec2>, + ) -> Val<::glam::U64Vec2> { + let output: Val<::glam::U64Vec2> = <::glam::U64Vec2 as ::core::ops::Div< + ::glam::U64Vec2, + >>::div(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + fn div(_self: Val<::glam::U64Vec2>, rhs: u64) -> Val<::glam::U64Vec2> { + let output: Val<::glam::U64Vec2> = <::glam::U64Vec2 as ::core::ops::Div< + u64, + >>::div(_self.into_inner(), rhs) + .into(); + output + } + /// Computes the dot product of `self` and `rhs`. + fn dot(_self: Val<::glam::U64Vec2>, rhs: Val<::glam::U64Vec2>) -> u64 { + let output: u64 = ::glam::U64Vec2::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<::glam::U64Vec2>, + rhs: Val<::glam::U64Vec2>, + ) -> Val<::glam::U64Vec2> { + let output: Val<::glam::U64Vec2> = ::glam::U64Vec2::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<::glam::U64Vec2>) -> u64 { + let output: u64 = ::glam::U64Vec2::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<::glam::U64Vec2>) -> u64 { + let output: u64 = ::glam::U64Vec2::element_sum(_self.into_inner()).into(); + output + } + fn eq(_self: Ref<::glam::U64Vec2>, other: Ref<::glam::U64Vec2>) -> bool { + let output: bool = <::glam::U64Vec2 as ::core::cmp::PartialEq< + ::glam::U64Vec2, + >>::eq(&_self, &other) + .into(); + output + } + /// Creates a 3D vector from `self` and the given `z` value. + fn extend(_self: Val<::glam::U64Vec2>, z: u64) -> Val<::glam::U64Vec3> { + let output: Val<::glam::U64Vec3> = ::glam::U64Vec2::extend(_self.into_inner(), z) + .into(); + output + } + /// Creates a new vector from an array. + fn from_array(a: [u64; 2]) -> Val<::glam::U64Vec2> { + let output: Val<::glam::U64Vec2> = ::glam::U64Vec2::from_array(a).into(); + output + } + /// Computes the squared length of `self`. + fn length_squared(_self: Val<::glam::U64Vec2>) -> u64 { + let output: u64 = ::glam::U64Vec2::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<::glam::U64Vec2>, + rhs: Val<::glam::U64Vec2>, + ) -> Val<::glam::U64Vec2> { + let output: Val<::glam::U64Vec2> = ::glam::U64Vec2::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<::glam::U64Vec2>) -> u64 { + let output: u64 = ::glam::U64Vec2::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<::glam::U64Vec2>, + rhs: Val<::glam::U64Vec2>, + ) -> Val<::glam::U64Vec2> { + let output: Val<::glam::U64Vec2> = ::glam::U64Vec2::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<::glam::U64Vec2>) -> u64 { + let output: u64 = ::glam::U64Vec2::min_element(_self.into_inner()).into(); + output + } + fn mul( + _self: Val<::glam::U64Vec2>, + rhs: Ref<::glam::U64Vec2>, + ) -> Val<::glam::U64Vec2> { + let output: Val<::glam::U64Vec2> = <::glam::U64Vec2 as ::core::ops::Mul< + &::glam::U64Vec2, + >>::mul(_self.into_inner(), &rhs) + .into(); + output + } + fn mul( + _self: Val<::glam::U64Vec2>, + rhs: Val<::glam::U64Vec2>, + ) -> Val<::glam::U64Vec2> { + let output: Val<::glam::U64Vec2> = <::glam::U64Vec2 as ::core::ops::Mul< + ::glam::U64Vec2, + >>::mul(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + fn mul(_self: Val<::glam::U64Vec2>, rhs: u64) -> Val<::glam::U64Vec2> { + let output: Val<::glam::U64Vec2> = <::glam::U64Vec2 as ::core::ops::Mul< + u64, + >>::mul(_self.into_inner(), rhs) + .into(); + output + } + /// Creates a new vector. + fn new(x: u64, y: u64) -> Val<::glam::U64Vec2> { + let output: Val<::glam::U64Vec2> = ::glam::U64Vec2::new(x, y).into(); + output + } + fn rem( + _self: Val<::glam::U64Vec2>, + rhs: Ref<::glam::U64Vec2>, + ) -> Val<::glam::U64Vec2> { + let output: Val<::glam::U64Vec2> = <::glam::U64Vec2 as ::core::ops::Rem< + &::glam::U64Vec2, + >>::rem(_self.into_inner(), &rhs) + .into(); + output + } + fn rem( + _self: Val<::glam::U64Vec2>, + rhs: Val<::glam::U64Vec2>, + ) -> Val<::glam::U64Vec2> { + let output: Val<::glam::U64Vec2> = <::glam::U64Vec2 as ::core::ops::Rem< + ::glam::U64Vec2, + >>::rem(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + fn rem(_self: Val<::glam::U64Vec2>, rhs: u64) -> Val<::glam::U64Vec2> { + let output: Val<::glam::U64Vec2> = <::glam::U64Vec2 as ::core::ops::Rem< + u64, + >>::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<::glam::U64Vec2>, + rhs: Val<::glam::U64Vec2>, + ) -> Val<::glam::U64Vec2> { + let output: Val<::glam::U64Vec2> = ::glam::U64Vec2::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<::glam::U64Vec2>, + rhs: Val<::glam::I64Vec2>, + ) -> Val<::glam::U64Vec2> { + let output: Val<::glam::U64Vec2> = ::glam::U64Vec2::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<::glam::U64Vec2>, + rhs: Val<::glam::U64Vec2>, + ) -> Val<::glam::U64Vec2> { + let output: Val<::glam::U64Vec2> = ::glam::U64Vec2::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<::glam::U64Vec2>, + rhs: Val<::glam::U64Vec2>, + ) -> Val<::glam::U64Vec2> { + let output: Val<::glam::U64Vec2> = ::glam::U64Vec2::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<::glam::U64Vec2>, + rhs: Val<::glam::U64Vec2>, + ) -> Val<::glam::U64Vec2> { + let output: Val<::glam::U64Vec2> = ::glam::U64Vec2::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<::glam::BVec2>, + if_true: Val<::glam::U64Vec2>, + if_false: Val<::glam::U64Vec2>, + ) -> Val<::glam::U64Vec2> { + let output: Val<::glam::U64Vec2> = ::glam::U64Vec2::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: u64) -> Val<::glam::U64Vec2> { + let output: Val<::glam::U64Vec2> = ::glam::U64Vec2::splat(v).into(); + output + } + fn sub( + _self: Val<::glam::U64Vec2>, + rhs: Ref<::glam::U64Vec2>, + ) -> Val<::glam::U64Vec2> { + let output: Val<::glam::U64Vec2> = <::glam::U64Vec2 as ::core::ops::Sub< + &::glam::U64Vec2, + >>::sub(_self.into_inner(), &rhs) + .into(); + output + } + fn sub( + _self: Val<::glam::U64Vec2>, + rhs: Val<::glam::U64Vec2>, + ) -> Val<::glam::U64Vec2> { + let output: Val<::glam::U64Vec2> = <::glam::U64Vec2 as ::core::ops::Sub< + ::glam::U64Vec2, + >>::sub(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + fn sub(_self: Val<::glam::U64Vec2>, rhs: u64) -> Val<::glam::U64Vec2> { + let output: Val<::glam::U64Vec2> = <::glam::U64Vec2 as ::core::ops::Sub< + u64, + >>::sub(_self.into_inner(), rhs) + .into(); + output + } + /// `[x, y]` + fn to_array(_self: Ref<::glam::U64Vec2>) -> [u64; 2] { + let output: [u64; 2] = ::glam::U64Vec2::to_array(&_self).into(); + output + } + /// Creates a 2D vector from `self` with the given value of `x`. + fn with_x(_self: Val<::glam::U64Vec2>, x: u64) -> Val<::glam::U64Vec2> { + let output: Val<::glam::U64Vec2> = ::glam::U64Vec2::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<::glam::U64Vec2>, y: u64) -> Val<::glam::U64Vec2> { + let output: Val<::glam::U64Vec2> = ::glam::U64Vec2::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<::glam::U64Vec2>, + rhs: Val<::glam::U64Vec2>, + ) -> Val<::glam::U64Vec2> { + let output: Val<::glam::U64Vec2> = ::glam::U64Vec2::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<::glam::U64Vec2>, + rhs: Val<::glam::I64Vec2>, + ) -> Val<::glam::U64Vec2> { + let output: Val<::glam::U64Vec2> = ::glam::U64Vec2::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<::glam::U64Vec2>, + rhs: Val<::glam::U64Vec2>, + ) -> Val<::glam::U64Vec2> { + let output: Val<::glam::U64Vec2> = ::glam::U64Vec2::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<::glam::U64Vec2>, + rhs: Val<::glam::U64Vec2>, + ) -> Val<::glam::U64Vec2> { + let output: Val<::glam::U64Vec2> = ::glam::U64Vec2::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<::glam::U64Vec2>, + rhs: Val<::glam::U64Vec2>, + ) -> Val<::glam::U64Vec2> { + let output: Val<::glam::U64Vec2> = ::glam::U64Vec2::wrapping_sub( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } +} +#[script_bindings( + remote, + name = "u_64_vec_3_functions", + bms_core_path = "bevy_mod_scripting_core", + generated +)] +impl ::glam::U64Vec3 { + fn add( + _self: Val<::glam::U64Vec3>, + rhs: Ref<::glam::U64Vec3>, + ) -> Val<::glam::U64Vec3> { + let output: Val<::glam::U64Vec3> = <::glam::U64Vec3 as ::core::ops::Add< + &::glam::U64Vec3, + >>::add(_self.into_inner(), &rhs) + .into(); + output + } + fn add( + _self: Val<::glam::U64Vec3>, + rhs: Val<::glam::U64Vec3>, + ) -> Val<::glam::U64Vec3> { + let output: Val<::glam::U64Vec3> = <::glam::U64Vec3 as ::core::ops::Add< + ::glam::U64Vec3, + >>::add(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + fn add(_self: Val<::glam::U64Vec3>, rhs: u64) -> Val<::glam::U64Vec3> { + let output: Val<::glam::U64Vec3> = <::glam::U64Vec3 as ::core::ops::Add< + u64, + >>::add(_self.into_inner(), rhs) + .into(); + output + } + /// Casts all elements of `self` to `f64`. + fn as_dvec3(_self: Ref<::glam::U64Vec3>) -> Val<::glam::DVec3> { + let output: Val<::glam::DVec3> = ::glam::U64Vec3::as_dvec3(&_self).into(); + output + } + /// Casts all elements of `self` to `i16`. + fn as_i16vec3(_self: Ref<::glam::U64Vec3>) -> Val<::glam::I16Vec3> { + let output: Val<::glam::I16Vec3> = ::glam::U64Vec3::as_i16vec3(&_self).into(); + output + } + /// Casts all elements of `self` to `i64`. + fn as_i64vec3(_self: Ref<::glam::U64Vec3>) -> Val<::glam::I64Vec3> { + let output: Val<::glam::I64Vec3> = ::glam::U64Vec3::as_i64vec3(&_self).into(); + output + } + /// Casts all elements of `self` to `i8`. + fn as_i8vec3(_self: Ref<::glam::U64Vec3>) -> Val<::glam::I8Vec3> { + let output: Val<::glam::I8Vec3> = ::glam::U64Vec3::as_i8vec3(&_self).into(); + output + } + /// Casts all elements of `self` to `i32`. + fn as_ivec3(_self: Ref<::glam::U64Vec3>) -> Val<::glam::IVec3> { + let output: Val<::glam::IVec3> = ::glam::U64Vec3::as_ivec3(&_self).into(); + output + } + /// Casts all elements of `self` to `u16`. + fn as_u16vec3(_self: Ref<::glam::U64Vec3>) -> Val<::glam::U16Vec3> { + let output: Val<::glam::U16Vec3> = ::glam::U64Vec3::as_u16vec3(&_self).into(); + output + } + /// Casts all elements of `self` to `u8`. + fn as_u8vec3(_self: Ref<::glam::U64Vec3>) -> Val<::glam::U8Vec3> { + let output: Val<::glam::U8Vec3> = ::glam::U64Vec3::as_u8vec3(&_self).into(); + output + } + /// Casts all elements of `self` to `u32`. + fn as_uvec3(_self: Ref<::glam::U64Vec3>) -> Val<::glam::UVec3> { + let output: Val<::glam::UVec3> = ::glam::U64Vec3::as_uvec3(&_self).into(); + output + } + /// Casts all elements of `self` to `f32`. + fn as_vec3(_self: Ref<::glam::U64Vec3>) -> Val<::glam::Vec3> { + let output: Val<::glam::Vec3> = ::glam::U64Vec3::as_vec3(&_self).into(); + output + } + /// Casts all elements of `self` to `f32`. + fn as_vec3a(_self: Ref<::glam::U64Vec3>) -> Val<::glam::Vec3A> { + let output: Val<::glam::Vec3A> = ::glam::U64Vec3::as_vec3a(&_self).into(); + output + } + fn assert_receiver_is_total_eq(_self: Ref<::glam::U64Vec3>) -> () { + let output: () = <::glam::U64Vec3 as ::core::cmp::Eq>::assert_receiver_is_total_eq( + &_self, + ) + .into(); + output + } + /// Component-wise clamping of values, similar to [`u64::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<::glam::U64Vec3>, + min: Val<::glam::U64Vec3>, + max: Val<::glam::U64Vec3>, + ) -> Val<::glam::U64Vec3> { + let output: Val<::glam::U64Vec3> = ::glam::U64Vec3::clamp( + _self.into_inner(), + min.into_inner(), + max.into_inner(), + ) + .into(); + output + } + fn clone(_self: Ref<::glam::U64Vec3>) -> Val<::glam::U64Vec3> { + let output: Val<::glam::U64Vec3> = <::glam::U64Vec3 as ::bevy_reflect::erased_serde::__private::serde::__private::Clone>::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<::glam::U64Vec3>, + rhs: Val<::glam::U64Vec3>, + ) -> Val<::glam::BVec3> { + let output: Val<::glam::BVec3> = ::glam::U64Vec3::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<::glam::U64Vec3>, + rhs: Val<::glam::U64Vec3>, + ) -> Val<::glam::BVec3> { + let output: Val<::glam::BVec3> = ::glam::U64Vec3::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<::glam::U64Vec3>, + rhs: Val<::glam::U64Vec3>, + ) -> Val<::glam::BVec3> { + let output: Val<::glam::BVec3> = ::glam::U64Vec3::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<::glam::U64Vec3>, + rhs: Val<::glam::U64Vec3>, + ) -> Val<::glam::BVec3> { + let output: Val<::glam::BVec3> = ::glam::U64Vec3::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<::glam::U64Vec3>, + rhs: Val<::glam::U64Vec3>, + ) -> Val<::glam::BVec3> { + let output: Val<::glam::BVec3> = ::glam::U64Vec3::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<::glam::U64Vec3>, + rhs: Val<::glam::U64Vec3>, + ) -> Val<::glam::BVec3> { + let output: Val<::glam::BVec3> = ::glam::U64Vec3::cmpne( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Computes the cross product of `self` and `rhs`. + fn cross( + _self: Val<::glam::U64Vec3>, + rhs: Val<::glam::U64Vec3>, + ) -> Val<::glam::U64Vec3> { + let output: Val<::glam::U64Vec3> = ::glam::U64Vec3::cross( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + fn div( + _self: Val<::glam::U64Vec3>, + rhs: Ref<::glam::U64Vec3>, + ) -> Val<::glam::U64Vec3> { + let output: Val<::glam::U64Vec3> = <::glam::U64Vec3 as ::core::ops::Div< + &::glam::U64Vec3, + >>::div(_self.into_inner(), &rhs) + .into(); + output + } + fn div( + _self: Val<::glam::U64Vec3>, + rhs: Val<::glam::U64Vec3>, + ) -> Val<::glam::U64Vec3> { + let output: Val<::glam::U64Vec3> = <::glam::U64Vec3 as ::core::ops::Div< + ::glam::U64Vec3, + >>::div(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + fn div(_self: Val<::glam::U64Vec3>, rhs: u64) -> Val<::glam::U64Vec3> { + let output: Val<::glam::U64Vec3> = <::glam::U64Vec3 as ::core::ops::Div< + u64, + >>::div(_self.into_inner(), rhs) + .into(); + output + } + /// Computes the dot product of `self` and `rhs`. + fn dot(_self: Val<::glam::U64Vec3>, rhs: Val<::glam::U64Vec3>) -> u64 { + let output: u64 = ::glam::U64Vec3::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<::glam::U64Vec3>, + rhs: Val<::glam::U64Vec3>, + ) -> Val<::glam::U64Vec3> { + let output: Val<::glam::U64Vec3> = ::glam::U64Vec3::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<::glam::U64Vec3>) -> u64 { + let output: u64 = ::glam::U64Vec3::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<::glam::U64Vec3>) -> u64 { + let output: u64 = ::glam::U64Vec3::element_sum(_self.into_inner()).into(); + output + } + fn eq(_self: Ref<::glam::U64Vec3>, other: Ref<::glam::U64Vec3>) -> bool { + let output: bool = <::glam::U64Vec3 as ::core::cmp::PartialEq< + ::glam::U64Vec3, + >>::eq(&_self, &other) + .into(); + output + } + /// Creates a 4D vector from `self` and the given `w` value. + fn extend(_self: Val<::glam::U64Vec3>, w: u64) -> Val<::glam::U64Vec4> { + let output: Val<::glam::U64Vec4> = ::glam::U64Vec3::extend(_self.into_inner(), w) + .into(); + output + } + /// Creates a new vector from an array. + fn from_array(a: [u64; 3]) -> Val<::glam::U64Vec3> { + let output: Val<::glam::U64Vec3> = ::glam::U64Vec3::from_array(a).into(); + output + } + /// Computes the squared length of `self`. + fn length_squared(_self: Val<::glam::U64Vec3>) -> u64 { + let output: u64 = ::glam::U64Vec3::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<::glam::U64Vec3>, + rhs: Val<::glam::U64Vec3>, + ) -> Val<::glam::U64Vec3> { + let output: Val<::glam::U64Vec3> = ::glam::U64Vec3::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<::glam::U64Vec3>) -> u64 { + let output: u64 = ::glam::U64Vec3::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<::glam::U64Vec3>, + rhs: Val<::glam::U64Vec3>, + ) -> Val<::glam::U64Vec3> { + let output: Val<::glam::U64Vec3> = ::glam::U64Vec3::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<::glam::U64Vec3>) -> u64 { + let output: u64 = ::glam::U64Vec3::min_element(_self.into_inner()).into(); + output + } + fn mul( + _self: Val<::glam::U64Vec3>, + rhs: Ref<::glam::U64Vec3>, + ) -> Val<::glam::U64Vec3> { + let output: Val<::glam::U64Vec3> = <::glam::U64Vec3 as ::core::ops::Mul< + &::glam::U64Vec3, + >>::mul(_self.into_inner(), &rhs) + .into(); + output + } + fn mul( + _self: Val<::glam::U64Vec3>, + rhs: Val<::glam::U64Vec3>, + ) -> Val<::glam::U64Vec3> { + let output: Val<::glam::U64Vec3> = <::glam::U64Vec3 as ::core::ops::Mul< + ::glam::U64Vec3, + >>::mul(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + fn mul(_self: Val<::glam::U64Vec3>, rhs: u64) -> Val<::glam::U64Vec3> { + let output: Val<::glam::U64Vec3> = <::glam::U64Vec3 as ::core::ops::Mul< + u64, + >>::mul(_self.into_inner(), rhs) + .into(); + output + } + /// Creates a new vector. + fn new(x: u64, y: u64, z: u64) -> Val<::glam::U64Vec3> { + let output: Val<::glam::U64Vec3> = ::glam::U64Vec3::new(x, y, z).into(); + output + } + fn rem( + _self: Val<::glam::U64Vec3>, + rhs: Ref<::glam::U64Vec3>, + ) -> Val<::glam::U64Vec3> { + let output: Val<::glam::U64Vec3> = <::glam::U64Vec3 as ::core::ops::Rem< + &::glam::U64Vec3, + >>::rem(_self.into_inner(), &rhs) + .into(); + output + } + fn rem( + _self: Val<::glam::U64Vec3>, + rhs: Val<::glam::U64Vec3>, + ) -> Val<::glam::U64Vec3> { + let output: Val<::glam::U64Vec3> = <::glam::U64Vec3 as ::core::ops::Rem< + ::glam::U64Vec3, + >>::rem(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + fn rem(_self: Val<::glam::U64Vec3>, rhs: u64) -> Val<::glam::U64Vec3> { + let output: Val<::glam::U64Vec3> = <::glam::U64Vec3 as ::core::ops::Rem< + u64, + >>::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<::glam::U64Vec3>, + rhs: Val<::glam::U64Vec3>, + ) -> Val<::glam::U64Vec3> { + let output: Val<::glam::U64Vec3> = ::glam::U64Vec3::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<::glam::U64Vec3>, + rhs: Val<::glam::I64Vec3>, + ) -> Val<::glam::U64Vec3> { + let output: Val<::glam::U64Vec3> = ::glam::U64Vec3::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<::glam::U64Vec3>, + rhs: Val<::glam::U64Vec3>, + ) -> Val<::glam::U64Vec3> { + let output: Val<::glam::U64Vec3> = ::glam::U64Vec3::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<::glam::U64Vec3>, + rhs: Val<::glam::U64Vec3>, + ) -> Val<::glam::U64Vec3> { + let output: Val<::glam::U64Vec3> = ::glam::U64Vec3::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<::glam::U64Vec3>, + rhs: Val<::glam::U64Vec3>, + ) -> Val<::glam::U64Vec3> { + let output: Val<::glam::U64Vec3> = ::glam::U64Vec3::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<::glam::BVec3>, + if_true: Val<::glam::U64Vec3>, + if_false: Val<::glam::U64Vec3>, + ) -> Val<::glam::U64Vec3> { + let output: Val<::glam::U64Vec3> = ::glam::U64Vec3::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: u64) -> Val<::glam::U64Vec3> { + let output: Val<::glam::U64Vec3> = ::glam::U64Vec3::splat(v).into(); + output + } + fn sub( + _self: Val<::glam::U64Vec3>, + rhs: Ref<::glam::U64Vec3>, + ) -> Val<::glam::U64Vec3> { + let output: Val<::glam::U64Vec3> = <::glam::U64Vec3 as ::core::ops::Sub< + &::glam::U64Vec3, + >>::sub(_self.into_inner(), &rhs) + .into(); + output + } + fn sub( + _self: Val<::glam::U64Vec3>, + rhs: Val<::glam::U64Vec3>, + ) -> Val<::glam::U64Vec3> { + let output: Val<::glam::U64Vec3> = <::glam::U64Vec3 as ::core::ops::Sub< + ::glam::U64Vec3, + >>::sub(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + fn sub(_self: Val<::glam::U64Vec3>, rhs: u64) -> Val<::glam::U64Vec3> { + let output: Val<::glam::U64Vec3> = <::glam::U64Vec3 as ::core::ops::Sub< + u64, + >>::sub(_self.into_inner(), rhs) + .into(); + output + } + /// `[x, y, z]` + fn to_array(_self: Ref<::glam::U64Vec3>) -> [u64; 3] { + let output: [u64; 3] = ::glam::U64Vec3::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<::glam::U64Vec3>) -> Val<::glam::U64Vec2> { + let output: Val<::glam::U64Vec2> = ::glam::U64Vec3::truncate(_self.into_inner()) + .into(); + output + } + /// Creates a 3D vector from `self` with the given value of `x`. + fn with_x(_self: Val<::glam::U64Vec3>, x: u64) -> Val<::glam::U64Vec3> { + let output: Val<::glam::U64Vec3> = ::glam::U64Vec3::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<::glam::U64Vec3>, y: u64) -> Val<::glam::U64Vec3> { + let output: Val<::glam::U64Vec3> = ::glam::U64Vec3::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<::glam::U64Vec3>, z: u64) -> Val<::glam::U64Vec3> { + let output: Val<::glam::U64Vec3> = ::glam::U64Vec3::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<::glam::U64Vec3>, + rhs: Val<::glam::U64Vec3>, + ) -> Val<::glam::U64Vec3> { + let output: Val<::glam::U64Vec3> = ::glam::U64Vec3::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<::glam::U64Vec3>, + rhs: Val<::glam::I64Vec3>, + ) -> Val<::glam::U64Vec3> { + let output: Val<::glam::U64Vec3> = ::glam::U64Vec3::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<::glam::U64Vec3>, + rhs: Val<::glam::U64Vec3>, + ) -> Val<::glam::U64Vec3> { + let output: Val<::glam::U64Vec3> = ::glam::U64Vec3::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<::glam::U64Vec3>, + rhs: Val<::glam::U64Vec3>, + ) -> Val<::glam::U64Vec3> { + let output: Val<::glam::U64Vec3> = ::glam::U64Vec3::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<::glam::U64Vec3>, + rhs: Val<::glam::U64Vec3>, + ) -> Val<::glam::U64Vec3> { + let output: Val<::glam::U64Vec3> = ::glam::U64Vec3::wrapping_sub( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } +} +#[script_bindings( + remote, + name = "u_64_vec_4_functions", + bms_core_path = "bevy_mod_scripting_core", + generated +)] +impl ::glam::U64Vec4 { + fn add( + _self: Val<::glam::U64Vec4>, + rhs: Ref<::glam::U64Vec4>, + ) -> Val<::glam::U64Vec4> { + let output: Val<::glam::U64Vec4> = <::glam::U64Vec4 as ::core::ops::Add< + &::glam::U64Vec4, + >>::add(_self.into_inner(), &rhs) + .into(); + output + } + fn add( + _self: Val<::glam::U64Vec4>, + rhs: Val<::glam::U64Vec4>, + ) -> Val<::glam::U64Vec4> { + let output: Val<::glam::U64Vec4> = <::glam::U64Vec4 as ::core::ops::Add< + ::glam::U64Vec4, + >>::add(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + fn add(_self: Val<::glam::U64Vec4>, rhs: u64) -> Val<::glam::U64Vec4> { + let output: Val<::glam::U64Vec4> = <::glam::U64Vec4 as ::core::ops::Add< + u64, + >>::add(_self.into_inner(), rhs) + .into(); + output + } + /// Casts all elements of `self` to `f64`. + fn as_dvec4(_self: Ref<::glam::U64Vec4>) -> Val<::glam::DVec4> { + let output: Val<::glam::DVec4> = ::glam::U64Vec4::as_dvec4(&_self).into(); + output + } + /// Casts all elements of `self` to `i16`. + fn as_i16vec4(_self: Ref<::glam::U64Vec4>) -> Val<::glam::I16Vec4> { + let output: Val<::glam::I16Vec4> = ::glam::U64Vec4::as_i16vec4(&_self).into(); + output + } + /// Casts all elements of `self` to `i64`. + fn as_i64vec4(_self: Ref<::glam::U64Vec4>) -> Val<::glam::I64Vec4> { + let output: Val<::glam::I64Vec4> = ::glam::U64Vec4::as_i64vec4(&_self).into(); + output + } + /// Casts all elements of `self` to `i8`. + fn as_i8vec4(_self: Ref<::glam::U64Vec4>) -> Val<::glam::I8Vec4> { + let output: Val<::glam::I8Vec4> = ::glam::U64Vec4::as_i8vec4(&_self).into(); + output + } + /// Casts all elements of `self` to `i32`. + fn as_ivec4(_self: Ref<::glam::U64Vec4>) -> Val<::glam::IVec4> { + let output: Val<::glam::IVec4> = ::glam::U64Vec4::as_ivec4(&_self).into(); + output + } + /// Casts all elements of `self` to `u16`. + fn as_u16vec4(_self: Ref<::glam::U64Vec4>) -> Val<::glam::U16Vec4> { + let output: Val<::glam::U16Vec4> = ::glam::U64Vec4::as_u16vec4(&_self).into(); + output + } + /// Casts all elements of `self` to `u8`. + fn as_u8vec4(_self: Ref<::glam::U64Vec4>) -> Val<::glam::U8Vec4> { + let output: Val<::glam::U8Vec4> = ::glam::U64Vec4::as_u8vec4(&_self).into(); + output + } + /// Casts all elements of `self` to `u32`. + fn as_uvec4(_self: Ref<::glam::U64Vec4>) -> Val<::glam::UVec4> { + let output: Val<::glam::UVec4> = ::glam::U64Vec4::as_uvec4(&_self).into(); + output + } + /// Casts all elements of `self` to `f32`. + fn as_vec4(_self: Ref<::glam::U64Vec4>) -> Val<::glam::Vec4> { + let output: Val<::glam::Vec4> = ::glam::U64Vec4::as_vec4(&_self).into(); + output + } + fn assert_receiver_is_total_eq(_self: Ref<::glam::U64Vec4>) -> () { + let output: () = <::glam::U64Vec4 as ::core::cmp::Eq>::assert_receiver_is_total_eq( + &_self, + ) + .into(); + output + } + /// Component-wise clamping of values, similar to [`u64::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<::glam::U64Vec4>, + min: Val<::glam::U64Vec4>, + max: Val<::glam::U64Vec4>, + ) -> Val<::glam::U64Vec4> { + let output: Val<::glam::U64Vec4> = ::glam::U64Vec4::clamp( + _self.into_inner(), + min.into_inner(), + max.into_inner(), + ) + .into(); + output + } + fn clone(_self: Ref<::glam::U64Vec4>) -> Val<::glam::U64Vec4> { + let output: Val<::glam::U64Vec4> = <::glam::U64Vec4 as ::bevy_reflect::erased_serde::__private::serde::__private::Clone>::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<::glam::U64Vec4>, + rhs: Val<::glam::U64Vec4>, + ) -> Val<::glam::BVec4> { + let output: Val<::glam::BVec4> = ::glam::U64Vec4::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<::glam::U64Vec4>, + rhs: Val<::glam::U64Vec4>, + ) -> Val<::glam::BVec4> { + let output: Val<::glam::BVec4> = ::glam::U64Vec4::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<::glam::U64Vec4>, + rhs: Val<::glam::U64Vec4>, + ) -> Val<::glam::BVec4> { + let output: Val<::glam::BVec4> = ::glam::U64Vec4::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<::glam::U64Vec4>, + rhs: Val<::glam::U64Vec4>, + ) -> Val<::glam::BVec4> { + let output: Val<::glam::BVec4> = ::glam::U64Vec4::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<::glam::U64Vec4>, + rhs: Val<::glam::U64Vec4>, + ) -> Val<::glam::BVec4> { + let output: Val<::glam::BVec4> = ::glam::U64Vec4::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<::glam::U64Vec4>, + rhs: Val<::glam::U64Vec4>, + ) -> Val<::glam::BVec4> { + let output: Val<::glam::BVec4> = ::glam::U64Vec4::cmpne( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + fn div( + _self: Val<::glam::U64Vec4>, + rhs: Ref<::glam::U64Vec4>, + ) -> Val<::glam::U64Vec4> { + let output: Val<::glam::U64Vec4> = <::glam::U64Vec4 as ::core::ops::Div< + &::glam::U64Vec4, + >>::div(_self.into_inner(), &rhs) + .into(); + output + } + fn div( + _self: Val<::glam::U64Vec4>, + rhs: Val<::glam::U64Vec4>, + ) -> Val<::glam::U64Vec4> { + let output: Val<::glam::U64Vec4> = <::glam::U64Vec4 as ::core::ops::Div< + ::glam::U64Vec4, + >>::div(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + fn div(_self: Val<::glam::U64Vec4>, rhs: u64) -> Val<::glam::U64Vec4> { + let output: Val<::glam::U64Vec4> = <::glam::U64Vec4 as ::core::ops::Div< + u64, + >>::div(_self.into_inner(), rhs) + .into(); + output + } + /// Computes the dot product of `self` and `rhs`. + fn dot(_self: Val<::glam::U64Vec4>, rhs: Val<::glam::U64Vec4>) -> u64 { + let output: u64 = ::glam::U64Vec4::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<::glam::U64Vec4>, + rhs: Val<::glam::U64Vec4>, + ) -> Val<::glam::U64Vec4> { + let output: Val<::glam::U64Vec4> = ::glam::U64Vec4::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<::glam::U64Vec4>) -> u64 { + let output: u64 = ::glam::U64Vec4::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<::glam::U64Vec4>) -> u64 { + let output: u64 = ::glam::U64Vec4::element_sum(_self.into_inner()).into(); + output + } + fn eq(_self: Ref<::glam::U64Vec4>, other: Ref<::glam::U64Vec4>) -> bool { + let output: bool = <::glam::U64Vec4 as ::core::cmp::PartialEq< + ::glam::U64Vec4, + >>::eq(&_self, &other) + .into(); + output + } + /// Creates a new vector from an array. + fn from_array(a: [u64; 4]) -> Val<::glam::U64Vec4> { + let output: Val<::glam::U64Vec4> = ::glam::U64Vec4::from_array(a).into(); + output + } + /// Computes the squared length of `self`. + fn length_squared(_self: Val<::glam::U64Vec4>) -> u64 { + let output: u64 = ::glam::U64Vec4::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<::glam::U64Vec4>, + rhs: Val<::glam::U64Vec4>, + ) -> Val<::glam::U64Vec4> { + let output: Val<::glam::U64Vec4> = ::glam::U64Vec4::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<::glam::U64Vec4>) -> u64 { + let output: u64 = ::glam::U64Vec4::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<::glam::U64Vec4>, + rhs: Val<::glam::U64Vec4>, + ) -> Val<::glam::U64Vec4> { + let output: Val<::glam::U64Vec4> = ::glam::U64Vec4::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<::glam::U64Vec4>) -> u64 { + let output: u64 = ::glam::U64Vec4::min_element(_self.into_inner()).into(); + output + } + fn mul( + _self: Val<::glam::U64Vec4>, + rhs: Ref<::glam::U64Vec4>, + ) -> Val<::glam::U64Vec4> { + let output: Val<::glam::U64Vec4> = <::glam::U64Vec4 as ::core::ops::Mul< + &::glam::U64Vec4, + >>::mul(_self.into_inner(), &rhs) + .into(); + output + } + fn mul( + _self: Val<::glam::U64Vec4>, + rhs: Val<::glam::U64Vec4>, + ) -> Val<::glam::U64Vec4> { + let output: Val<::glam::U64Vec4> = <::glam::U64Vec4 as ::core::ops::Mul< + ::glam::U64Vec4, + >>::mul(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + fn mul(_self: Val<::glam::U64Vec4>, rhs: u64) -> Val<::glam::U64Vec4> { + let output: Val<::glam::U64Vec4> = <::glam::U64Vec4 as ::core::ops::Mul< + u64, + >>::mul(_self.into_inner(), rhs) + .into(); + output + } + /// Creates a new vector. + fn new(x: u64, y: u64, z: u64, w: u64) -> Val<::glam::U64Vec4> { + let output: Val<::glam::U64Vec4> = ::glam::U64Vec4::new(x, y, z, w).into(); + output + } + fn rem( + _self: Val<::glam::U64Vec4>, + rhs: Ref<::glam::U64Vec4>, + ) -> Val<::glam::U64Vec4> { + let output: Val<::glam::U64Vec4> = <::glam::U64Vec4 as ::core::ops::Rem< + &::glam::U64Vec4, + >>::rem(_self.into_inner(), &rhs) + .into(); + output + } + fn rem( + _self: Val<::glam::U64Vec4>, + rhs: Val<::glam::U64Vec4>, + ) -> Val<::glam::U64Vec4> { + let output: Val<::glam::U64Vec4> = <::glam::U64Vec4 as ::core::ops::Rem< + ::glam::U64Vec4, + >>::rem(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + fn rem(_self: Val<::glam::U64Vec4>, rhs: u64) -> Val<::glam::U64Vec4> { + let output: Val<::glam::U64Vec4> = <::glam::U64Vec4 as ::core::ops::Rem< + u64, + >>::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<::glam::U64Vec4>, + rhs: Val<::glam::U64Vec4>, + ) -> Val<::glam::U64Vec4> { + let output: Val<::glam::U64Vec4> = ::glam::U64Vec4::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<::glam::U64Vec4>, + rhs: Val<::glam::I64Vec4>, + ) -> Val<::glam::U64Vec4> { + let output: Val<::glam::U64Vec4> = ::glam::U64Vec4::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<::glam::U64Vec4>, + rhs: Val<::glam::U64Vec4>, + ) -> Val<::glam::U64Vec4> { + let output: Val<::glam::U64Vec4> = ::glam::U64Vec4::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<::glam::U64Vec4>, + rhs: Val<::glam::U64Vec4>, + ) -> Val<::glam::U64Vec4> { + let output: Val<::glam::U64Vec4> = ::glam::U64Vec4::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<::glam::U64Vec4>, + rhs: Val<::glam::U64Vec4>, + ) -> Val<::glam::U64Vec4> { + let output: Val<::glam::U64Vec4> = ::glam::U64Vec4::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<::glam::BVec4>, + if_true: Val<::glam::U64Vec4>, + if_false: Val<::glam::U64Vec4>, + ) -> Val<::glam::U64Vec4> { + let output: Val<::glam::U64Vec4> = ::glam::U64Vec4::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: u64) -> Val<::glam::U64Vec4> { + let output: Val<::glam::U64Vec4> = ::glam::U64Vec4::splat(v).into(); + output + } + fn sub( + _self: Val<::glam::U64Vec4>, + rhs: Ref<::glam::U64Vec4>, + ) -> Val<::glam::U64Vec4> { + let output: Val<::glam::U64Vec4> = <::glam::U64Vec4 as ::core::ops::Sub< + &::glam::U64Vec4, + >>::sub(_self.into_inner(), &rhs) + .into(); + output + } + fn sub( + _self: Val<::glam::U64Vec4>, + rhs: Val<::glam::U64Vec4>, + ) -> Val<::glam::U64Vec4> { + let output: Val<::glam::U64Vec4> = <::glam::U64Vec4 as ::core::ops::Sub< + ::glam::U64Vec4, + >>::sub(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + fn sub(_self: Val<::glam::U64Vec4>, rhs: u64) -> Val<::glam::U64Vec4> { + let output: Val<::glam::U64Vec4> = <::glam::U64Vec4 as ::core::ops::Sub< + u64, + >>::sub(_self.into_inner(), rhs) + .into(); + output + } + /// `[x, y, z, w]` + fn to_array(_self: Ref<::glam::U64Vec4>) -> [u64; 4] { + let output: [u64; 4] = ::glam::U64Vec4::to_array(&_self).into(); + output + } + /// Creates a 3D vector from the `x`, `y` and `z` elements of `self`, discarding `w`. + /// Truncation to [`U64Vec3`] may also be performed by using [`self.xyz()`][crate::swizzles::Vec4Swizzles::xyz()]. + fn truncate(_self: Val<::glam::U64Vec4>) -> Val<::glam::U64Vec3> { + let output: Val<::glam::U64Vec3> = ::glam::U64Vec4::truncate(_self.into_inner()) + .into(); + output + } + /// Creates a 4D vector from `self` with the given value of `w`. + fn with_w(_self: Val<::glam::U64Vec4>, w: u64) -> Val<::glam::U64Vec4> { + let output: Val<::glam::U64Vec4> = ::glam::U64Vec4::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<::glam::U64Vec4>, x: u64) -> Val<::glam::U64Vec4> { + let output: Val<::glam::U64Vec4> = ::glam::U64Vec4::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<::glam::U64Vec4>, y: u64) -> Val<::glam::U64Vec4> { + let output: Val<::glam::U64Vec4> = ::glam::U64Vec4::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<::glam::U64Vec4>, z: u64) -> Val<::glam::U64Vec4> { + let output: Val<::glam::U64Vec4> = ::glam::U64Vec4::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<::glam::U64Vec4>, + rhs: Val<::glam::U64Vec4>, + ) -> Val<::glam::U64Vec4> { + let output: Val<::glam::U64Vec4> = ::glam::U64Vec4::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<::glam::U64Vec4>, + rhs: Val<::glam::I64Vec4>, + ) -> Val<::glam::U64Vec4> { + let output: Val<::glam::U64Vec4> = ::glam::U64Vec4::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<::glam::U64Vec4>, + rhs: Val<::glam::U64Vec4>, + ) -> Val<::glam::U64Vec4> { + let output: Val<::glam::U64Vec4> = ::glam::U64Vec4::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<::glam::U64Vec4>, + rhs: Val<::glam::U64Vec4>, + ) -> Val<::glam::U64Vec4> { + let output: Val<::glam::U64Vec4> = ::glam::U64Vec4::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<::glam::U64Vec4>, + rhs: Val<::glam::U64Vec4>, + ) -> Val<::glam::U64Vec4> { + let output: Val<::glam::U64Vec4> = ::glam::U64Vec4::wrapping_sub( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } +} +#[script_bindings( + remote, + name = "vec_2_functions", + bms_core_path = "bevy_mod_scripting_core", + generated +)] +impl ::glam::Vec2 { + /// Returns a vector containing the absolute value of each element of `self`. + fn abs(_self: Val<::glam::Vec2>) -> Val<::glam::Vec2> { + let output: Val<::glam::Vec2> = ::glam::Vec2::abs(_self.into_inner()).into(); + output + } + /// Returns true if the absolute difference of all elements between `self` and `rhs` is + /// less than or equal to `max_abs_diff`. + /// This can be used to compare if two vectors contain similar elements. It works best when + /// comparing with a known value. The `max_abs_diff` that should be used used depends on + /// the values being compared against. + /// For more see + /// [comparing floating point numbers](https://randomascii.wordpress.com/2012/02/25/comparing-floating-point-numbers-2012-edition/). + fn abs_diff_eq( + _self: Val<::glam::Vec2>, + rhs: Val<::glam::Vec2>, + max_abs_diff: f32, + ) -> bool { + let output: bool = ::glam::Vec2::abs_diff_eq( + _self.into_inner(), + rhs.into_inner(), + max_abs_diff, + ) + .into(); + output + } + fn add(_self: Val<::glam::Vec2>, rhs: Ref<::glam::Vec2>) -> Val<::glam::Vec2> { + let output: Val<::glam::Vec2> = <::glam::Vec2 as ::core::ops::Add< + &::glam::Vec2, + >>::add(_self.into_inner(), &rhs) + .into(); + output + } + fn add(_self: Val<::glam::Vec2>, rhs: Val<::glam::Vec2>) -> Val<::glam::Vec2> { + let output: Val<::glam::Vec2> = <::glam::Vec2 as ::core::ops::Add< + ::glam::Vec2, + >>::add(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + fn add(_self: Val<::glam::Vec2>, rhs: f32) -> Val<::glam::Vec2> { + let output: Val<::glam::Vec2> = <::glam::Vec2 as ::core::ops::Add< + f32, + >>::add(_self.into_inner(), rhs) + .into(); + output + } + fn angle_between(_self: Val<::glam::Vec2>, rhs: Val<::glam::Vec2>) -> f32 { + let output: f32 = ::glam::Vec2::angle_between( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Returns the angle of rotation (in radians) from `self` to `rhs` in the range `[-π, +π]`. + /// The inputs do not need to be unit vectors however they must be non-zero. + fn angle_to(_self: Val<::glam::Vec2>, rhs: Val<::glam::Vec2>) -> f32 { + let output: f32 = ::glam::Vec2::angle_to(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + /// Casts all elements of `self` to `f64`. + fn as_dvec2(_self: Ref<::glam::Vec2>) -> Val<::glam::DVec2> { + let output: Val<::glam::DVec2> = ::glam::Vec2::as_dvec2(&_self).into(); + output + } + /// Casts all elements of `self` to `i16`. + fn as_i16vec2(_self: Ref<::glam::Vec2>) -> Val<::glam::I16Vec2> { + let output: Val<::glam::I16Vec2> = ::glam::Vec2::as_i16vec2(&_self).into(); + output + } + /// Casts all elements of `self` to `i64`. + fn as_i64vec2(_self: Ref<::glam::Vec2>) -> Val<::glam::I64Vec2> { + let output: Val<::glam::I64Vec2> = ::glam::Vec2::as_i64vec2(&_self).into(); + output + } + /// Casts all elements of `self` to `i8`. + fn as_i8vec2(_self: Ref<::glam::Vec2>) -> Val<::glam::I8Vec2> { + let output: Val<::glam::I8Vec2> = ::glam::Vec2::as_i8vec2(&_self).into(); + output + } + /// Casts all elements of `self` to `i32`. + fn as_ivec2(_self: Ref<::glam::Vec2>) -> Val<::glam::IVec2> { + let output: Val<::glam::IVec2> = ::glam::Vec2::as_ivec2(&_self).into(); + output + } + /// Casts all elements of `self` to `u16`. + fn as_u16vec2(_self: Ref<::glam::Vec2>) -> Val<::glam::U16Vec2> { + let output: Val<::glam::U16Vec2> = ::glam::Vec2::as_u16vec2(&_self).into(); + output + } + /// Casts all elements of `self` to `u64`. + fn as_u64vec2(_self: Ref<::glam::Vec2>) -> Val<::glam::U64Vec2> { + let output: Val<::glam::U64Vec2> = ::glam::Vec2::as_u64vec2(&_self).into(); + output + } + /// Casts all elements of `self` to `u8`. + fn as_u8vec2(_self: Ref<::glam::Vec2>) -> Val<::glam::U8Vec2> { + let output: Val<::glam::U8Vec2> = ::glam::Vec2::as_u8vec2(&_self).into(); + output + } + /// Casts all elements of `self` to `u32`. + fn as_uvec2(_self: Ref<::glam::Vec2>) -> Val<::glam::UVec2> { + let output: Val<::glam::UVec2> = ::glam::Vec2::as_uvec2(&_self).into(); + output + } + /// Returns a vector containing the smallest integer greater than or equal to a number for + /// each element of `self`. + fn ceil(_self: Val<::glam::Vec2>) -> Val<::glam::Vec2> { + let output: Val<::glam::Vec2> = ::glam::Vec2::ceil(_self.into_inner()).into(); + output + } + /// Component-wise clamping of values, similar to [`f32::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<::glam::Vec2>, + min: Val<::glam::Vec2>, + max: Val<::glam::Vec2>, + ) -> Val<::glam::Vec2> { + let output: Val<::glam::Vec2> = ::glam::Vec2::clamp( + _self.into_inner(), + min.into_inner(), + max.into_inner(), + ) + .into(); + output + } + /// Returns a vector with a length no less than `min` and no more than `max`. + /// # Panics + /// Will panic if `min` is greater than `max`, or if either `min` or `max` is negative, when `glam_assert` is enabled. + fn clamp_length(_self: Val<::glam::Vec2>, min: f32, max: f32) -> Val<::glam::Vec2> { + let output: Val<::glam::Vec2> = ::glam::Vec2::clamp_length( + _self.into_inner(), + min, + max, + ) + .into(); + output + } + /// Returns a vector with a length no more than `max`. + /// # Panics + /// Will panic if `max` is negative when `glam_assert` is enabled. + fn clamp_length_max(_self: Val<::glam::Vec2>, max: f32) -> Val<::glam::Vec2> { + let output: Val<::glam::Vec2> = ::glam::Vec2::clamp_length_max( + _self.into_inner(), + max, + ) + .into(); + output + } + /// Returns a vector with a length no less than `min`. + /// # Panics + /// Will panic if `min` is negative when `glam_assert` is enabled. + fn clamp_length_min(_self: Val<::glam::Vec2>, min: f32) -> Val<::glam::Vec2> { + let output: Val<::glam::Vec2> = ::glam::Vec2::clamp_length_min( + _self.into_inner(), + min, + ) + .into(); + output + } + fn clone(_self: Ref<::glam::Vec2>) -> Val<::glam::Vec2> { + let output: Val<::glam::Vec2> = <::glam::Vec2 as ::bevy_reflect::erased_serde::__private::serde::__private::Clone>::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<::glam::Vec2>, rhs: Val<::glam::Vec2>) -> Val<::glam::BVec2> { + let output: Val<::glam::BVec2> = ::glam::Vec2::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<::glam::Vec2>, rhs: Val<::glam::Vec2>) -> Val<::glam::BVec2> { + let output: Val<::glam::BVec2> = ::glam::Vec2::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<::glam::Vec2>, rhs: Val<::glam::Vec2>) -> Val<::glam::BVec2> { + let output: Val<::glam::BVec2> = ::glam::Vec2::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<::glam::Vec2>, rhs: Val<::glam::Vec2>) -> Val<::glam::BVec2> { + let output: Val<::glam::BVec2> = ::glam::Vec2::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<::glam::Vec2>, rhs: Val<::glam::Vec2>) -> Val<::glam::BVec2> { + let output: Val<::glam::BVec2> = ::glam::Vec2::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<::glam::Vec2>, rhs: Val<::glam::Vec2>) -> Val<::glam::BVec2> { + let output: Val<::glam::BVec2> = ::glam::Vec2::cmpne( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Returns a vector with signs of `rhs` and the magnitudes of `self`. + fn copysign(_self: Val<::glam::Vec2>, rhs: Val<::glam::Vec2>) -> Val<::glam::Vec2> { + let output: Val<::glam::Vec2> = ::glam::Vec2::copysign( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Computes the Euclidean distance between two points in space. + fn distance(_self: Val<::glam::Vec2>, rhs: Val<::glam::Vec2>) -> f32 { + let output: f32 = ::glam::Vec2::distance(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + /// Compute the squared euclidean distance between two points in space. + fn distance_squared(_self: Val<::glam::Vec2>, rhs: Val<::glam::Vec2>) -> f32 { + let output: f32 = ::glam::Vec2::distance_squared( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + fn div(_self: Val<::glam::Vec2>, rhs: Ref<::glam::Vec2>) -> Val<::glam::Vec2> { + let output: Val<::glam::Vec2> = <::glam::Vec2 as ::core::ops::Div< + &::glam::Vec2, + >>::div(_self.into_inner(), &rhs) + .into(); + output + } + fn div(_self: Val<::glam::Vec2>, rhs: Val<::glam::Vec2>) -> Val<::glam::Vec2> { + let output: Val<::glam::Vec2> = <::glam::Vec2 as ::core::ops::Div< + ::glam::Vec2, + >>::div(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + fn div(_self: Val<::glam::Vec2>, rhs: f32) -> Val<::glam::Vec2> { + let output: Val<::glam::Vec2> = <::glam::Vec2 as ::core::ops::Div< + f32, + >>::div(_self.into_inner(), rhs) + .into(); + output + } + /// Returns the element-wise quotient of [Euclidean division] of `self` by `rhs`. + fn div_euclid( + _self: Val<::glam::Vec2>, + rhs: Val<::glam::Vec2>, + ) -> Val<::glam::Vec2> { + let output: Val<::glam::Vec2> = ::glam::Vec2::div_euclid( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Computes the dot product of `self` and `rhs`. + fn dot(_self: Val<::glam::Vec2>, rhs: Val<::glam::Vec2>) -> f32 { + let output: f32 = ::glam::Vec2::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<::glam::Vec2>, + rhs: Val<::glam::Vec2>, + ) -> Val<::glam::Vec2> { + let output: Val<::glam::Vec2> = ::glam::Vec2::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<::glam::Vec2>) -> f32 { + let output: f32 = ::glam::Vec2::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<::glam::Vec2>) -> f32 { + let output: f32 = ::glam::Vec2::element_sum(_self.into_inner()).into(); + output + } + fn eq(_self: Ref<::glam::Vec2>, other: Ref<::glam::Vec2>) -> bool { + let output: bool = <::glam::Vec2 as ::core::cmp::PartialEq< + ::glam::Vec2, + >>::eq(&_self, &other) + .into(); + output + } + /// Returns a vector containing `e^self` (the exponential function) for each element of + /// `self`. + fn exp(_self: Val<::glam::Vec2>) -> Val<::glam::Vec2> { + let output: Val<::glam::Vec2> = ::glam::Vec2::exp(_self.into_inner()).into(); + output + } + /// Creates a 3D vector from `self` and the given `z` value. + fn extend(_self: Val<::glam::Vec2>, z: f32) -> Val<::glam::Vec3> { + let output: Val<::glam::Vec3> = ::glam::Vec2::extend(_self.into_inner(), z) + .into(); + output + } + /// Returns a vector containing the largest integer less than or equal to a number for each + /// element of `self`. + fn floor(_self: Val<::glam::Vec2>) -> Val<::glam::Vec2> { + let output: Val<::glam::Vec2> = ::glam::Vec2::floor(_self.into_inner()).into(); + output + } + /// Returns a vector containing the fractional part of the vector as `self - self.trunc()`. + /// Note that this differs from the GLSL implementation of `fract` which returns + /// `self - self.floor()`. + /// Note that this is fast but not precise for large numbers. + fn fract(_self: Val<::glam::Vec2>) -> Val<::glam::Vec2> { + let output: Val<::glam::Vec2> = ::glam::Vec2::fract(_self.into_inner()).into(); + output + } + /// Returns a vector containing the fractional part of the vector as `self - self.floor()`. + /// Note that this differs from the Rust implementation of `fract` which returns + /// `self - self.trunc()`. + /// Note that this is fast but not precise for large numbers. + fn fract_gl(_self: Val<::glam::Vec2>) -> Val<::glam::Vec2> { + let output: Val<::glam::Vec2> = ::glam::Vec2::fract_gl(_self.into_inner()) + .into(); + output + } + /// Creates a 2D vector containing `[angle.cos(), angle.sin()]`. This can be used in + /// conjunction with the [`rotate()`][Self::rotate()] method, e.g. + /// `Vec2::from_angle(PI).rotate(Vec2::Y)` will create the vector `[-1, 0]` + /// and rotate [`Vec2::Y`] around it returning `-Vec2::Y`. + fn from_angle(angle: f32) -> Val<::glam::Vec2> { + let output: Val<::glam::Vec2> = ::glam::Vec2::from_angle(angle).into(); + output + } + /// Creates a new vector from an array. + fn from_array(a: [f32; 2]) -> Val<::glam::Vec2> { + let output: Val<::glam::Vec2> = ::glam::Vec2::from_array(a).into(); + output + } + /// Returns `true` if, and only if, all elements are finite. If any element is either + /// `NaN`, positive or negative infinity, this will return `false`. + fn is_finite(_self: Val<::glam::Vec2>) -> bool { + let output: bool = ::glam::Vec2::is_finite(_self.into_inner()).into(); + output + } + /// Performs `is_finite` on each element of self, returning a vector mask of the results. + /// In other words, this computes `[x.is_finite(), y.is_finite(), ...]`. + fn is_finite_mask(_self: Val<::glam::Vec2>) -> Val<::glam::BVec2> { + let output: Val<::glam::BVec2> = ::glam::Vec2::is_finite_mask(_self.into_inner()) + .into(); + output + } + /// Returns `true` if any elements are `NaN`. + fn is_nan(_self: Val<::glam::Vec2>) -> bool { + let output: bool = ::glam::Vec2::is_nan(_self.into_inner()).into(); + output + } + /// Performs `is_nan` on each element of self, returning a vector mask of the results. + /// In other words, this computes `[x.is_nan(), y.is_nan(), ...]`. + fn is_nan_mask(_self: Val<::glam::Vec2>) -> Val<::glam::BVec2> { + let output: Val<::glam::BVec2> = ::glam::Vec2::is_nan_mask(_self.into_inner()) + .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<::glam::Vec2>) -> u32 { + let output: u32 = ::glam::Vec2::is_negative_bitmask(_self.into_inner()).into(); + output + } + /// Returns whether `self` is length `1.0` or not. + /// Uses a precision threshold of approximately `1e-4`. + fn is_normalized(_self: Val<::glam::Vec2>) -> bool { + let output: bool = ::glam::Vec2::is_normalized(_self.into_inner()).into(); + output + } + /// Computes the length of `self`. + fn length(_self: Val<::glam::Vec2>) -> f32 { + let output: f32 = ::glam::Vec2::length(_self.into_inner()).into(); + output + } + /// Computes `1.0 / length()`. + /// For valid results, `self` must _not_ be of length zero. + fn length_recip(_self: Val<::glam::Vec2>) -> f32 { + let output: f32 = ::glam::Vec2::length_recip(_self.into_inner()).into(); + output + } + /// Computes the squared length of `self`. + /// This is faster than `length()` as it avoids a square root operation. + fn length_squared(_self: Val<::glam::Vec2>) -> f32 { + let output: f32 = ::glam::Vec2::length_squared(_self.into_inner()).into(); + output + } + /// Performs a linear interpolation between `self` and `rhs` based on the value `s`. + /// When `s` is `0.0`, the result will be equal to `self`. When `s` is `1.0`, the result + /// will be equal to `rhs`. When `s` is outside of range `[0, 1]`, the result is linearly + /// extrapolated. + fn lerp( + _self: Val<::glam::Vec2>, + rhs: Val<::glam::Vec2>, + s: f32, + ) -> Val<::glam::Vec2> { + let output: Val<::glam::Vec2> = ::glam::Vec2::lerp( + _self.into_inner(), + rhs.into_inner(), + s, + ) + .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<::glam::Vec2>, rhs: Val<::glam::Vec2>) -> Val<::glam::Vec2> { + let output: Val<::glam::Vec2> = ::glam::Vec2::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<::glam::Vec2>) -> f32 { + let output: f32 = ::glam::Vec2::max_element(_self.into_inner()).into(); + output + } + /// Calculates the midpoint between `self` and `rhs`. + /// The midpoint is the average of, or halfway point between, two vectors. + /// `a.midpoint(b)` should yield the same result as `a.lerp(b, 0.5)` + /// while being slightly cheaper to compute. + fn midpoint(_self: Val<::glam::Vec2>, rhs: Val<::glam::Vec2>) -> Val<::glam::Vec2> { + let output: Val<::glam::Vec2> = ::glam::Vec2::midpoint( + _self.into_inner(), + rhs.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<::glam::Vec2>, rhs: Val<::glam::Vec2>) -> Val<::glam::Vec2> { + let output: Val<::glam::Vec2> = ::glam::Vec2::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<::glam::Vec2>) -> f32 { + let output: f32 = ::glam::Vec2::min_element(_self.into_inner()).into(); + output + } + /// Moves towards `rhs` based on the value `d`. + /// When `d` is `0.0`, the result will be equal to `self`. When `d` is equal to + /// `self.distance(rhs)`, the result will be equal to `rhs`. Will not go past `rhs`. + fn move_towards( + _self: Ref<::glam::Vec2>, + rhs: Val<::glam::Vec2>, + d: f32, + ) -> Val<::glam::Vec2> { + let output: Val<::glam::Vec2> = ::glam::Vec2::move_towards( + &_self, + rhs.into_inner(), + d, + ) + .into(); + output + } + fn mul(_self: Val<::glam::Vec2>, rhs: Ref<::glam::Vec2>) -> Val<::glam::Vec2> { + let output: Val<::glam::Vec2> = <::glam::Vec2 as ::core::ops::Mul< + &::glam::Vec2, + >>::mul(_self.into_inner(), &rhs) + .into(); + output + } + fn mul(_self: Val<::glam::Vec2>, rhs: Val<::glam::Vec2>) -> Val<::glam::Vec2> { + let output: Val<::glam::Vec2> = <::glam::Vec2 as ::core::ops::Mul< + ::glam::Vec2, + >>::mul(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + fn mul(_self: Val<::glam::Vec2>, rhs: f32) -> Val<::glam::Vec2> { + let output: Val<::glam::Vec2> = <::glam::Vec2 as ::core::ops::Mul< + f32, + >>::mul(_self.into_inner(), rhs) + .into(); + output + } + /// Fused multiply-add. Computes `(self * a) + b` element-wise with only one rounding + /// error, yielding a more accurate result than an unfused multiply-add. + /// Using `mul_add` *may* be more performant than an unfused multiply-add if the target + /// architecture has a dedicated fma CPU instruction. However, this is not always true, + /// and will be heavily dependant on designing algorithms with specific target hardware in + /// mind. + fn mul_add( + _self: Val<::glam::Vec2>, + a: Val<::glam::Vec2>, + b: Val<::glam::Vec2>, + ) -> Val<::glam::Vec2> { + let output: Val<::glam::Vec2> = ::glam::Vec2::mul_add( + _self.into_inner(), + a.into_inner(), + b.into_inner(), + ) + .into(); + output + } + fn neg(_self: Val<::glam::Vec2>) -> Val<::glam::Vec2> { + let output: Val<::glam::Vec2> = <::glam::Vec2 as ::core::ops::Neg>::neg( + _self.into_inner(), + ) + .into(); + output + } + /// Creates a new vector. + fn new(x: f32, y: f32) -> Val<::glam::Vec2> { + let output: Val<::glam::Vec2> = ::glam::Vec2::new(x, y).into(); + output + } + /// Returns `self` normalized to length 1.0. + /// For valid results, `self` must be finite and _not_ of length zero, nor very close to zero. + /// See also [`Self::try_normalize()`] and [`Self::normalize_or_zero()`]. + /// Panics + /// Will panic if the resulting normalized vector is not finite when `glam_assert` is enabled. + fn normalize(_self: Val<::glam::Vec2>) -> Val<::glam::Vec2> { + let output: Val<::glam::Vec2> = ::glam::Vec2::normalize(_self.into_inner()) + .into(); + output + } + /// Returns `self` normalized to length 1.0 if possible, else returns a + /// fallback value. + /// In particular, if the input is zero (or very close to zero), or non-finite, + /// the result of this operation will be the fallback value. + /// See also [`Self::try_normalize()`]. + fn normalize_or( + _self: Val<::glam::Vec2>, + fallback: Val<::glam::Vec2>, + ) -> Val<::glam::Vec2> { + let output: Val<::glam::Vec2> = ::glam::Vec2::normalize_or( + _self.into_inner(), + fallback.into_inner(), + ) + .into(); + output + } + /// Returns `self` normalized to length 1.0 if possible, else returns zero. + /// In particular, if the input is zero (or very close to zero), or non-finite, + /// the result of this operation will be zero. + /// See also [`Self::try_normalize()`]. + fn normalize_or_zero(_self: Val<::glam::Vec2>) -> Val<::glam::Vec2> { + let output: Val<::glam::Vec2> = ::glam::Vec2::normalize_or_zero( + _self.into_inner(), + ) + .into(); + output + } + /// Returns a vector that is equal to `self` rotated by 90 degrees. + fn perp(_self: Val<::glam::Vec2>) -> Val<::glam::Vec2> { + let output: Val<::glam::Vec2> = ::glam::Vec2::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<::glam::Vec2>, rhs: Val<::glam::Vec2>) -> f32 { + let output: f32 = ::glam::Vec2::perp_dot(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + /// Returns a vector containing each element of `self` raised to the power of `n`. + fn powf(_self: Val<::glam::Vec2>, n: f32) -> Val<::glam::Vec2> { + let output: Val<::glam::Vec2> = ::glam::Vec2::powf(_self.into_inner(), n).into(); + output + } + /// Returns the vector projection of `self` onto `rhs`. + /// `rhs` must be of non-zero length. + /// # Panics + /// Will panic if `rhs` is zero length when `glam_assert` is enabled. + fn project_onto( + _self: Val<::glam::Vec2>, + rhs: Val<::glam::Vec2>, + ) -> Val<::glam::Vec2> { + let output: Val<::glam::Vec2> = ::glam::Vec2::project_onto( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Returns the vector projection of `self` onto `rhs`. + /// `rhs` must be normalized. + /// # Panics + /// Will panic if `rhs` is not normalized when `glam_assert` is enabled. + fn project_onto_normalized( + _self: Val<::glam::Vec2>, + rhs: Val<::glam::Vec2>, + ) -> Val<::glam::Vec2> { + let output: Val<::glam::Vec2> = ::glam::Vec2::project_onto_normalized( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Returns a vector containing the reciprocal `1.0/n` of each element of `self`. + fn recip(_self: Val<::glam::Vec2>) -> Val<::glam::Vec2> { + let output: Val<::glam::Vec2> = ::glam::Vec2::recip(_self.into_inner()).into(); + output + } + /// Returns the reflection vector for a given incident vector `self` and surface normal + /// `normal`. + /// `normal` must be normalized. + /// # Panics + /// Will panic if `normal` is not normalized when `glam_assert` is enabled. + fn reflect( + _self: Val<::glam::Vec2>, + normal: Val<::glam::Vec2>, + ) -> Val<::glam::Vec2> { + let output: Val<::glam::Vec2> = ::glam::Vec2::reflect( + _self.into_inner(), + normal.into_inner(), + ) + .into(); + output + } + /// Returns the refraction direction for a given incident vector `self`, surface normal + /// `normal` and ratio of indices of refraction, `eta`. When total internal reflection occurs, + /// a zero vector will be returned. + /// `self` and `normal` must be normalized. + /// # Panics + /// Will panic if `self` or `normal` is not normalized when `glam_assert` is enabled. + fn refract( + _self: Val<::glam::Vec2>, + normal: Val<::glam::Vec2>, + eta: f32, + ) -> Val<::glam::Vec2> { + let output: Val<::glam::Vec2> = ::glam::Vec2::refract( + _self.into_inner(), + normal.into_inner(), + eta, + ) + .into(); + output + } + /// Returns the vector rejection of `self` from `rhs`. + /// The vector rejection is the vector perpendicular to the projection of `self` onto + /// `rhs`, in rhs words the result of `self - self.project_onto(rhs)`. + /// `rhs` must be of non-zero length. + /// # Panics + /// Will panic if `rhs` has a length of zero when `glam_assert` is enabled. + fn reject_from( + _self: Val<::glam::Vec2>, + rhs: Val<::glam::Vec2>, + ) -> Val<::glam::Vec2> { + let output: Val<::glam::Vec2> = ::glam::Vec2::reject_from( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Returns the vector rejection of `self` from `rhs`. + /// The vector rejection is the vector perpendicular to the projection of `self` onto + /// `rhs`, in rhs words the result of `self - self.project_onto(rhs)`. + /// `rhs` must be normalized. + /// # Panics + /// Will panic if `rhs` is not normalized when `glam_assert` is enabled. + fn reject_from_normalized( + _self: Val<::glam::Vec2>, + rhs: Val<::glam::Vec2>, + ) -> Val<::glam::Vec2> { + let output: Val<::glam::Vec2> = ::glam::Vec2::reject_from_normalized( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + fn rem(_self: Val<::glam::Vec2>, rhs: Ref<::glam::Vec2>) -> Val<::glam::Vec2> { + let output: Val<::glam::Vec2> = <::glam::Vec2 as ::core::ops::Rem< + &::glam::Vec2, + >>::rem(_self.into_inner(), &rhs) + .into(); + output + } + fn rem(_self: Val<::glam::Vec2>, rhs: Val<::glam::Vec2>) -> Val<::glam::Vec2> { + let output: Val<::glam::Vec2> = <::glam::Vec2 as ::core::ops::Rem< + ::glam::Vec2, + >>::rem(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + fn rem(_self: Val<::glam::Vec2>, rhs: f32) -> Val<::glam::Vec2> { + let output: Val<::glam::Vec2> = <::glam::Vec2 as ::core::ops::Rem< + f32, + >>::rem(_self.into_inner(), rhs) + .into(); + output + } + /// Returns the element-wise remainder of [Euclidean division] of `self` by `rhs`. + /// [Euclidean division]: f32::rem_euclid + fn rem_euclid( + _self: Val<::glam::Vec2>, + rhs: Val<::glam::Vec2>, + ) -> Val<::glam::Vec2> { + let output: Val<::glam::Vec2> = ::glam::Vec2::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<::glam::Vec2>, rhs: Val<::glam::Vec2>) -> Val<::glam::Vec2> { + let output: Val<::glam::Vec2> = ::glam::Vec2::rotate( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Rotates towards `rhs` up to `max_angle` (in radians). + /// When `max_angle` is `0.0`, the result will be equal to `self`. When `max_angle` is equal to + /// `self.angle_between(rhs)`, the result will be equal to `rhs`. If `max_angle` is negative, + /// rotates towards the exact opposite of `rhs`. Will not go past the target. + fn rotate_towards( + _self: Ref<::glam::Vec2>, + rhs: Val<::glam::Vec2>, + max_angle: f32, + ) -> Val<::glam::Vec2> { + let output: Val<::glam::Vec2> = ::glam::Vec2::rotate_towards( + &_self, + rhs.into_inner(), + max_angle, + ) + .into(); + output + } + /// Returns a vector containing the nearest integer to a number for each element of `self`. + /// Round half-way cases away from 0.0. + fn round(_self: Val<::glam::Vec2>) -> Val<::glam::Vec2> { + let output: Val<::glam::Vec2> = ::glam::Vec2::round(_self.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<::glam::BVec2>, + if_true: Val<::glam::Vec2>, + if_false: Val<::glam::Vec2>, + ) -> Val<::glam::Vec2> { + let output: Val<::glam::Vec2> = ::glam::Vec2::select( + mask.into_inner(), + if_true.into_inner(), + if_false.into_inner(), + ) + .into(); + output + } + /// Returns a vector with elements representing the sign of `self`. + /// - `1.0` if the number is positive, `+0.0` or `INFINITY` + /// - `-1.0` if the number is negative, `-0.0` or `NEG_INFINITY` + /// - `NAN` if the number is `NAN` + fn signum(_self: Val<::glam::Vec2>) -> Val<::glam::Vec2> { + let output: Val<::glam::Vec2> = ::glam::Vec2::signum(_self.into_inner()).into(); + output + } + /// Creates a vector with all elements set to `v`. + fn splat(v: f32) -> Val<::glam::Vec2> { + let output: Val<::glam::Vec2> = ::glam::Vec2::splat(v).into(); + output + } + fn sub(_self: Val<::glam::Vec2>, rhs: Ref<::glam::Vec2>) -> Val<::glam::Vec2> { + let output: Val<::glam::Vec2> = <::glam::Vec2 as ::core::ops::Sub< + &::glam::Vec2, + >>::sub(_self.into_inner(), &rhs) + .into(); + output + } + fn sub(_self: Val<::glam::Vec2>, rhs: Val<::glam::Vec2>) -> Val<::glam::Vec2> { + let output: Val<::glam::Vec2> = <::glam::Vec2 as ::core::ops::Sub< + ::glam::Vec2, + >>::sub(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + fn sub(_self: Val<::glam::Vec2>, rhs: f32) -> Val<::glam::Vec2> { + let output: Val<::glam::Vec2> = <::glam::Vec2 as ::core::ops::Sub< + f32, + >>::sub(_self.into_inner(), rhs) + .into(); + output + } + /// Returns the angle (in radians) of this vector in the range `[-π, +π]`. + /// The input does not need to be a unit vector however it must be non-zero. + fn to_angle(_self: Val<::glam::Vec2>) -> f32 { + let output: f32 = ::glam::Vec2::to_angle(_self.into_inner()).into(); + output + } + /// `[x, y]` + fn to_array(_self: Ref<::glam::Vec2>) -> [f32; 2] { + let output: [f32; 2] = ::glam::Vec2::to_array(&_self).into(); + output + } + /// Returns a vector containing the integer part each element of `self`. This means numbers are + /// always truncated towards zero. + fn trunc(_self: Val<::glam::Vec2>) -> Val<::glam::Vec2> { + let output: Val<::glam::Vec2> = ::glam::Vec2::trunc(_self.into_inner()).into(); + output + } + /// Creates a 2D vector from `self` with the given value of `x`. + fn with_x(_self: Val<::glam::Vec2>, x: f32) -> Val<::glam::Vec2> { + let output: Val<::glam::Vec2> = ::glam::Vec2::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<::glam::Vec2>, y: f32) -> Val<::glam::Vec2> { + let output: Val<::glam::Vec2> = ::glam::Vec2::with_y(_self.into_inner(), y) + .into(); + output + } +} +#[script_bindings( + remote, + name = "vec_3_a_functions", + bms_core_path = "bevy_mod_scripting_core", + generated +)] +impl ::glam::Vec3A { + /// Returns a vector containing the absolute value of each element of `self`. + fn abs(_self: Val<::glam::Vec3A>) -> Val<::glam::Vec3A> { + let output: Val<::glam::Vec3A> = ::glam::Vec3A::abs(_self.into_inner()).into(); + output + } + /// Returns true if the absolute difference of all elements between `self` and `rhs` is + /// less than or equal to `max_abs_diff`. + /// This can be used to compare if two vectors contain similar elements. It works best when + /// comparing with a known value. The `max_abs_diff` that should be used used depends on + /// the values being compared against. + /// For more see + /// [comparing floating point numbers](https://randomascii.wordpress.com/2012/02/25/comparing-floating-point-numbers-2012-edition/). + fn abs_diff_eq( + _self: Val<::glam::Vec3A>, + rhs: Val<::glam::Vec3A>, + max_abs_diff: f32, + ) -> bool { + let output: bool = ::glam::Vec3A::abs_diff_eq( + _self.into_inner(), + rhs.into_inner(), + max_abs_diff, + ) + .into(); + output + } + fn add(_self: Val<::glam::Vec3A>, rhs: Ref<::glam::Vec3A>) -> Val<::glam::Vec3A> { + let output: Val<::glam::Vec3A> = <::glam::Vec3A as ::core::ops::Add< + &::glam::Vec3A, + >>::add(_self.into_inner(), &rhs) + .into(); + output + } + fn add(_self: Val<::glam::Vec3A>, rhs: Val<::glam::Vec3A>) -> Val<::glam::Vec3A> { + let output: Val<::glam::Vec3A> = <::glam::Vec3A as ::core::ops::Add< + ::glam::Vec3A, + >>::add(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + fn add(_self: Val<::glam::Vec3A>, rhs: f32) -> Val<::glam::Vec3A> { + let output: Val<::glam::Vec3A> = <::glam::Vec3A as ::core::ops::Add< + f32, + >>::add(_self.into_inner(), rhs) + .into(); + output + } + /// Returns the angle (in radians) between two vectors in the range `[0, +π]`. + /// The inputs do not need to be unit vectors however they must be non-zero. + fn angle_between(_self: Val<::glam::Vec3A>, rhs: Val<::glam::Vec3A>) -> f32 { + let output: f32 = ::glam::Vec3A::angle_between( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Returns some vector that is orthogonal to the given one. + /// The input vector must be finite and non-zero. + /// The output vector is not necessarily unit length. For that use + /// [`Self::any_orthonormal_vector()`] instead. + fn any_orthogonal_vector(_self: Ref<::glam::Vec3A>) -> Val<::glam::Vec3A> { + let output: Val<::glam::Vec3A> = ::glam::Vec3A::any_orthogonal_vector(&_self) + .into(); + output + } + /// Returns any unit vector that is orthogonal to the given one. + /// The input vector must be unit length. + /// # Panics + /// Will panic if `self` is not normalized when `glam_assert` is enabled. + fn any_orthonormal_vector(_self: Ref<::glam::Vec3A>) -> Val<::glam::Vec3A> { + let output: Val<::glam::Vec3A> = ::glam::Vec3A::any_orthonormal_vector(&_self) + .into(); + output + } + /// Casts all elements of `self` to `f64`. + fn as_dvec3(_self: Ref<::glam::Vec3A>) -> Val<::glam::DVec3> { + let output: Val<::glam::DVec3> = ::glam::Vec3A::as_dvec3(&_self).into(); + output + } + /// Casts all elements of `self` to `i16`. + fn as_i16vec3(_self: Ref<::glam::Vec3A>) -> Val<::glam::I16Vec3> { + let output: Val<::glam::I16Vec3> = ::glam::Vec3A::as_i16vec3(&_self).into(); + output + } + /// Casts all elements of `self` to `i64`. + fn as_i64vec3(_self: Ref<::glam::Vec3A>) -> Val<::glam::I64Vec3> { + let output: Val<::glam::I64Vec3> = ::glam::Vec3A::as_i64vec3(&_self).into(); + output + } + /// Casts all elements of `self` to `i8`. + fn as_i8vec3(_self: Ref<::glam::Vec3A>) -> Val<::glam::I8Vec3> { + let output: Val<::glam::I8Vec3> = ::glam::Vec3A::as_i8vec3(&_self).into(); + output + } + /// Casts all elements of `self` to `i32`. + fn as_ivec3(_self: Ref<::glam::Vec3A>) -> Val<::glam::IVec3> { + let output: Val<::glam::IVec3> = ::glam::Vec3A::as_ivec3(&_self).into(); + output + } + /// Casts all elements of `self` to `u16`. + fn as_u16vec3(_self: Ref<::glam::Vec3A>) -> Val<::glam::U16Vec3> { + let output: Val<::glam::U16Vec3> = ::glam::Vec3A::as_u16vec3(&_self).into(); + output + } + /// Casts all elements of `self` to `u64`. + fn as_u64vec3(_self: Ref<::glam::Vec3A>) -> Val<::glam::U64Vec3> { + let output: Val<::glam::U64Vec3> = ::glam::Vec3A::as_u64vec3(&_self).into(); + output + } + /// Casts all elements of `self` to `u8`. + fn as_u8vec3(_self: Ref<::glam::Vec3A>) -> Val<::glam::U8Vec3> { + let output: Val<::glam::U8Vec3> = ::glam::Vec3A::as_u8vec3(&_self).into(); + output + } + /// Casts all elements of `self` to `u32`. + fn as_uvec3(_self: Ref<::glam::Vec3A>) -> Val<::glam::UVec3> { + let output: Val<::glam::UVec3> = ::glam::Vec3A::as_uvec3(&_self).into(); + output + } + /// Returns a vector containing the smallest integer greater than or equal to a number for + /// each element of `self`. + fn ceil(_self: Val<::glam::Vec3A>) -> Val<::glam::Vec3A> { + let output: Val<::glam::Vec3A> = ::glam::Vec3A::ceil(_self.into_inner()).into(); + output + } + /// Component-wise clamping of values, similar to [`f32::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<::glam::Vec3A>, + min: Val<::glam::Vec3A>, + max: Val<::glam::Vec3A>, + ) -> Val<::glam::Vec3A> { + let output: Val<::glam::Vec3A> = ::glam::Vec3A::clamp( + _self.into_inner(), + min.into_inner(), + max.into_inner(), + ) + .into(); + output + } + /// Returns a vector with a length no less than `min` and no more than `max`. + /// # Panics + /// Will panic if `min` is greater than `max`, or if either `min` or `max` is negative, when `glam_assert` is enabled. + fn clamp_length( + _self: Val<::glam::Vec3A>, + min: f32, + max: f32, + ) -> Val<::glam::Vec3A> { + let output: Val<::glam::Vec3A> = ::glam::Vec3A::clamp_length( + _self.into_inner(), + min, + max, + ) + .into(); + output + } + /// Returns a vector with a length no more than `max`. + /// # Panics + /// Will panic if `max` is negative when `glam_assert` is enabled. + fn clamp_length_max(_self: Val<::glam::Vec3A>, max: f32) -> Val<::glam::Vec3A> { + let output: Val<::glam::Vec3A> = ::glam::Vec3A::clamp_length_max( + _self.into_inner(), + max, + ) + .into(); + output + } + /// Returns a vector with a length no less than `min`. + /// # Panics + /// Will panic if `min` is negative when `glam_assert` is enabled. + fn clamp_length_min(_self: Val<::glam::Vec3A>, min: f32) -> Val<::glam::Vec3A> { + let output: Val<::glam::Vec3A> = ::glam::Vec3A::clamp_length_min( + _self.into_inner(), + min, + ) + .into(); + output + } + fn clone(_self: Ref<::glam::Vec3A>) -> Val<::glam::Vec3A> { + let output: Val<::glam::Vec3A> = <::glam::Vec3A as ::bevy_reflect::erased_serde::__private::serde::__private::Clone>::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<::glam::Vec3A>, rhs: Val<::glam::Vec3A>) -> Val<::glam::BVec3A> { + let output: Val<::glam::BVec3A> = ::glam::Vec3A::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<::glam::Vec3A>, rhs: Val<::glam::Vec3A>) -> Val<::glam::BVec3A> { + let output: Val<::glam::BVec3A> = ::glam::Vec3A::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<::glam::Vec3A>, rhs: Val<::glam::Vec3A>) -> Val<::glam::BVec3A> { + let output: Val<::glam::BVec3A> = ::glam::Vec3A::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<::glam::Vec3A>, rhs: Val<::glam::Vec3A>) -> Val<::glam::BVec3A> { + let output: Val<::glam::BVec3A> = ::glam::Vec3A::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<::glam::Vec3A>, rhs: Val<::glam::Vec3A>) -> Val<::glam::BVec3A> { + let output: Val<::glam::BVec3A> = ::glam::Vec3A::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<::glam::Vec3A>, rhs: Val<::glam::Vec3A>) -> Val<::glam::BVec3A> { + let output: Val<::glam::BVec3A> = ::glam::Vec3A::cmpne( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Returns a vector with signs of `rhs` and the magnitudes of `self`. + fn copysign( + _self: Val<::glam::Vec3A>, + rhs: Val<::glam::Vec3A>, + ) -> Val<::glam::Vec3A> { + let output: Val<::glam::Vec3A> = ::glam::Vec3A::copysign( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Computes the cross product of `self` and `rhs`. + fn cross(_self: Val<::glam::Vec3A>, rhs: Val<::glam::Vec3A>) -> Val<::glam::Vec3A> { + let output: Val<::glam::Vec3A> = ::glam::Vec3A::cross( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Computes the Euclidean distance between two points in space. + fn distance(_self: Val<::glam::Vec3A>, rhs: Val<::glam::Vec3A>) -> f32 { + let output: f32 = ::glam::Vec3A::distance(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + /// Compute the squared euclidean distance between two points in space. + fn distance_squared(_self: Val<::glam::Vec3A>, rhs: Val<::glam::Vec3A>) -> f32 { + let output: f32 = ::glam::Vec3A::distance_squared( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + fn div(_self: Val<::glam::Vec3A>, rhs: Ref<::glam::Vec3A>) -> Val<::glam::Vec3A> { + let output: Val<::glam::Vec3A> = <::glam::Vec3A as ::core::ops::Div< + &::glam::Vec3A, + >>::div(_self.into_inner(), &rhs) + .into(); + output + } + fn div(_self: Val<::glam::Vec3A>, rhs: Val<::glam::Vec3A>) -> Val<::glam::Vec3A> { + let output: Val<::glam::Vec3A> = <::glam::Vec3A as ::core::ops::Div< + ::glam::Vec3A, + >>::div(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + fn div(_self: Val<::glam::Vec3A>, rhs: f32) -> Val<::glam::Vec3A> { + let output: Val<::glam::Vec3A> = <::glam::Vec3A as ::core::ops::Div< + f32, + >>::div(_self.into_inner(), rhs) + .into(); + output + } + /// Returns the element-wise quotient of [Euclidean division] of `self` by `rhs`. + fn div_euclid( + _self: Val<::glam::Vec3A>, + rhs: Val<::glam::Vec3A>, + ) -> Val<::glam::Vec3A> { + let output: Val<::glam::Vec3A> = ::glam::Vec3A::div_euclid( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Computes the dot product of `self` and `rhs`. + fn dot(_self: Val<::glam::Vec3A>, rhs: Val<::glam::Vec3A>) -> f32 { + let output: f32 = ::glam::Vec3A::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<::glam::Vec3A>, + rhs: Val<::glam::Vec3A>, + ) -> Val<::glam::Vec3A> { + let output: Val<::glam::Vec3A> = ::glam::Vec3A::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<::glam::Vec3A>) -> f32 { + let output: f32 = ::glam::Vec3A::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<::glam::Vec3A>) -> f32 { + let output: f32 = ::glam::Vec3A::element_sum(_self.into_inner()).into(); + output + } + fn eq(_self: Ref<::glam::Vec3A>, rhs: Ref<::glam::Vec3A>) -> bool { + let output: bool = <::glam::Vec3A as ::core::cmp::PartialEq< + ::glam::Vec3A, + >>::eq(&_self, &rhs) + .into(); + output + } + /// Returns a vector containing `e^self` (the exponential function) for each element of + /// `self`. + fn exp(_self: Val<::glam::Vec3A>) -> Val<::glam::Vec3A> { + let output: Val<::glam::Vec3A> = ::glam::Vec3A::exp(_self.into_inner()).into(); + output + } + /// Creates a 4D vector from `self` and the given `w` value. + fn extend(_self: Val<::glam::Vec3A>, w: f32) -> Val<::glam::Vec4> { + let output: Val<::glam::Vec4> = ::glam::Vec3A::extend(_self.into_inner(), w) + .into(); + output + } + /// Returns a vector containing the largest integer less than or equal to a number for each + /// element of `self`. + fn floor(_self: Val<::glam::Vec3A>) -> Val<::glam::Vec3A> { + let output: Val<::glam::Vec3A> = ::glam::Vec3A::floor(_self.into_inner()).into(); + output + } + /// Returns a vector containing the fractional part of the vector as `self - self.trunc()`. + /// Note that this differs from the GLSL implementation of `fract` which returns + /// `self - self.floor()`. + /// Note that this is fast but not precise for large numbers. + fn fract(_self: Val<::glam::Vec3A>) -> Val<::glam::Vec3A> { + let output: Val<::glam::Vec3A> = ::glam::Vec3A::fract(_self.into_inner()).into(); + output + } + /// Returns a vector containing the fractional part of the vector as `self - self.floor()`. + /// Note that this differs from the Rust implementation of `fract` which returns + /// `self - self.trunc()`. + /// Note that this is fast but not precise for large numbers. + fn fract_gl(_self: Val<::glam::Vec3A>) -> Val<::glam::Vec3A> { + let output: Val<::glam::Vec3A> = ::glam::Vec3A::fract_gl(_self.into_inner()) + .into(); + output + } + /// Creates a new vector from an array. + fn from_array(a: [f32; 3]) -> Val<::glam::Vec3A> { + let output: Val<::glam::Vec3A> = ::glam::Vec3A::from_array(a).into(); + output + } + /// Creates a [`Vec3A`] from the `x`, `y` and `z` elements of `self` discarding `w`. + /// On architectures where SIMD is supported such as SSE2 on `x86_64` this conversion is a noop. + fn from_vec4(v: Val<::glam::Vec4>) -> Val<::glam::Vec3A> { + let output: Val<::glam::Vec3A> = ::glam::Vec3A::from_vec4(v.into_inner()).into(); + output + } + /// Returns `true` if, and only if, all elements are finite. If any element is either + /// `NaN`, positive or negative infinity, this will return `false`. + fn is_finite(_self: Val<::glam::Vec3A>) -> bool { + let output: bool = ::glam::Vec3A::is_finite(_self.into_inner()).into(); + output + } + /// Performs `is_finite` on each element of self, returning a vector mask of the results. + /// In other words, this computes `[x.is_finite(), y.is_finite(), ...]`. + fn is_finite_mask(_self: Val<::glam::Vec3A>) -> Val<::glam::BVec3A> { + let output: Val<::glam::BVec3A> = ::glam::Vec3A::is_finite_mask( + _self.into_inner(), + ) + .into(); + output + } + /// Returns `true` if any elements are `NaN`. + fn is_nan(_self: Val<::glam::Vec3A>) -> bool { + let output: bool = ::glam::Vec3A::is_nan(_self.into_inner()).into(); + output + } + /// Performs `is_nan` on each element of self, returning a vector mask of the results. + /// In other words, this computes `[x.is_nan(), y.is_nan(), ...]`. + fn is_nan_mask(_self: Val<::glam::Vec3A>) -> Val<::glam::BVec3A> { + let output: Val<::glam::BVec3A> = ::glam::Vec3A::is_nan_mask(_self.into_inner()) + .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<::glam::Vec3A>) -> u32 { + let output: u32 = ::glam::Vec3A::is_negative_bitmask(_self.into_inner()).into(); + output + } + /// Returns whether `self` is length `1.0` or not. + /// Uses a precision threshold of approximately `1e-4`. + fn is_normalized(_self: Val<::glam::Vec3A>) -> bool { + let output: bool = ::glam::Vec3A::is_normalized(_self.into_inner()).into(); + output + } + /// Computes the length of `self`. + fn length(_self: Val<::glam::Vec3A>) -> f32 { + let output: f32 = ::glam::Vec3A::length(_self.into_inner()).into(); + output + } + /// Computes `1.0 / length()`. + /// For valid results, `self` must _not_ be of length zero. + fn length_recip(_self: Val<::glam::Vec3A>) -> f32 { + let output: f32 = ::glam::Vec3A::length_recip(_self.into_inner()).into(); + output + } + /// Computes the squared length of `self`. + /// This is faster than `length()` as it avoids a square root operation. + fn length_squared(_self: Val<::glam::Vec3A>) -> f32 { + let output: f32 = ::glam::Vec3A::length_squared(_self.into_inner()).into(); + output + } + /// Performs a linear interpolation between `self` and `rhs` based on the value `s`. + /// When `s` is `0.0`, the result will be equal to `self`. When `s` is `1.0`, the result + /// will be equal to `rhs`. When `s` is outside of range `[0, 1]`, the result is linearly + /// extrapolated. + fn lerp( + _self: Val<::glam::Vec3A>, + rhs: Val<::glam::Vec3A>, + s: f32, + ) -> Val<::glam::Vec3A> { + let output: Val<::glam::Vec3A> = ::glam::Vec3A::lerp( + _self.into_inner(), + rhs.into_inner(), + s, + ) + .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<::glam::Vec3A>, rhs: Val<::glam::Vec3A>) -> Val<::glam::Vec3A> { + let output: Val<::glam::Vec3A> = ::glam::Vec3A::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<::glam::Vec3A>) -> f32 { + let output: f32 = ::glam::Vec3A::max_element(_self.into_inner()).into(); + output + } + /// Calculates the midpoint between `self` and `rhs`. + /// The midpoint is the average of, or halfway point between, two vectors. + /// `a.midpoint(b)` should yield the same result as `a.lerp(b, 0.5)` + /// while being slightly cheaper to compute. + fn midpoint( + _self: Val<::glam::Vec3A>, + rhs: Val<::glam::Vec3A>, + ) -> Val<::glam::Vec3A> { + let output: Val<::glam::Vec3A> = ::glam::Vec3A::midpoint( + _self.into_inner(), + rhs.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<::glam::Vec3A>, rhs: Val<::glam::Vec3A>) -> Val<::glam::Vec3A> { + let output: Val<::glam::Vec3A> = ::glam::Vec3A::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<::glam::Vec3A>) -> f32 { + let output: f32 = ::glam::Vec3A::min_element(_self.into_inner()).into(); + output + } + /// Moves towards `rhs` based on the value `d`. + /// When `d` is `0.0`, the result will be equal to `self`. When `d` is equal to + /// `self.distance(rhs)`, the result will be equal to `rhs`. Will not go past `rhs`. + fn move_towards( + _self: Ref<::glam::Vec3A>, + rhs: Val<::glam::Vec3A>, + d: f32, + ) -> Val<::glam::Vec3A> { + let output: Val<::glam::Vec3A> = ::glam::Vec3A::move_towards( + &_self, + rhs.into_inner(), + d, + ) + .into(); + output + } + fn mul(_self: Val<::glam::Vec3A>, rhs: Ref<::glam::Vec3A>) -> Val<::glam::Vec3A> { + let output: Val<::glam::Vec3A> = <::glam::Vec3A as ::core::ops::Mul< + &::glam::Vec3A, + >>::mul(_self.into_inner(), &rhs) + .into(); + output + } + fn mul(_self: Val<::glam::Vec3A>, rhs: Val<::glam::Vec3A>) -> Val<::glam::Vec3A> { + let output: Val<::glam::Vec3A> = <::glam::Vec3A as ::core::ops::Mul< + ::glam::Vec3A, + >>::mul(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + fn mul(_self: Val<::glam::Vec3A>, rhs: f32) -> Val<::glam::Vec3A> { + let output: Val<::glam::Vec3A> = <::glam::Vec3A as ::core::ops::Mul< + f32, + >>::mul(_self.into_inner(), rhs) + .into(); + output + } + /// Fused multiply-add. Computes `(self * a) + b` element-wise with only one rounding + /// error, yielding a more accurate result than an unfused multiply-add. + /// Using `mul_add` *may* be more performant than an unfused multiply-add if the target + /// architecture has a dedicated fma CPU instruction. However, this is not always true, + /// and will be heavily dependant on designing algorithms with specific target hardware in + /// mind. + fn mul_add( + _self: Val<::glam::Vec3A>, + a: Val<::glam::Vec3A>, + b: Val<::glam::Vec3A>, + ) -> Val<::glam::Vec3A> { + let output: Val<::glam::Vec3A> = ::glam::Vec3A::mul_add( + _self.into_inner(), + a.into_inner(), + b.into_inner(), + ) + .into(); + output + } + fn neg(_self: Val<::glam::Vec3A>) -> Val<::glam::Vec3A> { + let output: Val<::glam::Vec3A> = <::glam::Vec3A as ::core::ops::Neg>::neg( + _self.into_inner(), + ) + .into(); + output + } + /// Creates a new vector. + fn new(x: f32, y: f32, z: f32) -> Val<::glam::Vec3A> { + let output: Val<::glam::Vec3A> = ::glam::Vec3A::new(x, y, z).into(); + output + } + /// Returns `self` normalized to length 1.0. + /// For valid results, `self` must be finite and _not_ of length zero, nor very close to zero. + /// See also [`Self::try_normalize()`] and [`Self::normalize_or_zero()`]. + /// Panics + /// Will panic if the resulting normalized vector is not finite when `glam_assert` is enabled. + fn normalize(_self: Val<::glam::Vec3A>) -> Val<::glam::Vec3A> { + let output: Val<::glam::Vec3A> = ::glam::Vec3A::normalize(_self.into_inner()) + .into(); + output + } + /// Returns `self` normalized to length 1.0 if possible, else returns a + /// fallback value. + /// In particular, if the input is zero (or very close to zero), or non-finite, + /// the result of this operation will be the fallback value. + /// See also [`Self::try_normalize()`]. + fn normalize_or( + _self: Val<::glam::Vec3A>, + fallback: Val<::glam::Vec3A>, + ) -> Val<::glam::Vec3A> { + let output: Val<::glam::Vec3A> = ::glam::Vec3A::normalize_or( + _self.into_inner(), + fallback.into_inner(), + ) + .into(); + output + } + /// Returns `self` normalized to length 1.0 if possible, else returns zero. + /// In particular, if the input is zero (or very close to zero), or non-finite, + /// the result of this operation will be zero. + /// See also [`Self::try_normalize()`]. + fn normalize_or_zero(_self: Val<::glam::Vec3A>) -> Val<::glam::Vec3A> { + let output: Val<::glam::Vec3A> = ::glam::Vec3A::normalize_or_zero( + _self.into_inner(), + ) + .into(); + output + } + /// Returns a vector containing each element of `self` raised to the power of `n`. + fn powf(_self: Val<::glam::Vec3A>, n: f32) -> Val<::glam::Vec3A> { + let output: Val<::glam::Vec3A> = ::glam::Vec3A::powf(_self.into_inner(), n) + .into(); + output + } + /// Returns the vector projection of `self` onto `rhs`. + /// `rhs` must be of non-zero length. + /// # Panics + /// Will panic if `rhs` is zero length when `glam_assert` is enabled. + fn project_onto( + _self: Val<::glam::Vec3A>, + rhs: Val<::glam::Vec3A>, + ) -> Val<::glam::Vec3A> { + let output: Val<::glam::Vec3A> = ::glam::Vec3A::project_onto( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Returns the vector projection of `self` onto `rhs`. + /// `rhs` must be normalized. + /// # Panics + /// Will panic if `rhs` is not normalized when `glam_assert` is enabled. + fn project_onto_normalized( + _self: Val<::glam::Vec3A>, + rhs: Val<::glam::Vec3A>, + ) -> Val<::glam::Vec3A> { + let output: Val<::glam::Vec3A> = ::glam::Vec3A::project_onto_normalized( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Returns a vector containing the reciprocal `1.0/n` of each element of `self`. + fn recip(_self: Val<::glam::Vec3A>) -> Val<::glam::Vec3A> { + let output: Val<::glam::Vec3A> = ::glam::Vec3A::recip(_self.into_inner()).into(); + output + } + /// Returns the reflection vector for a given incident vector `self` and surface normal + /// `normal`. + /// `normal` must be normalized. + /// # Panics + /// Will panic if `normal` is not normalized when `glam_assert` is enabled. + fn reflect( + _self: Val<::glam::Vec3A>, + normal: Val<::glam::Vec3A>, + ) -> Val<::glam::Vec3A> { + let output: Val<::glam::Vec3A> = ::glam::Vec3A::reflect( + _self.into_inner(), + normal.into_inner(), + ) + .into(); + output + } + /// Returns the refraction direction for a given incident vector `self`, surface normal + /// `normal` and ratio of indices of refraction, `eta`. When total internal reflection occurs, + /// a zero vector will be returned. + /// `self` and `normal` must be normalized. + /// # Panics + /// Will panic if `self` or `normal` is not normalized when `glam_assert` is enabled. + fn refract( + _self: Val<::glam::Vec3A>, + normal: Val<::glam::Vec3A>, + eta: f32, + ) -> Val<::glam::Vec3A> { + let output: Val<::glam::Vec3A> = ::glam::Vec3A::refract( + _self.into_inner(), + normal.into_inner(), + eta, + ) + .into(); + output + } + /// Returns the vector rejection of `self` from `rhs`. + /// The vector rejection is the vector perpendicular to the projection of `self` onto + /// `rhs`, in rhs words the result of `self - self.project_onto(rhs)`. + /// `rhs` must be of non-zero length. + /// # Panics + /// Will panic if `rhs` has a length of zero when `glam_assert` is enabled. + fn reject_from( + _self: Val<::glam::Vec3A>, + rhs: Val<::glam::Vec3A>, + ) -> Val<::glam::Vec3A> { + let output: Val<::glam::Vec3A> = ::glam::Vec3A::reject_from( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Returns the vector rejection of `self` from `rhs`. + /// The vector rejection is the vector perpendicular to the projection of `self` onto + /// `rhs`, in rhs words the result of `self - self.project_onto(rhs)`. + /// `rhs` must be normalized. + /// # Panics + /// Will panic if `rhs` is not normalized when `glam_assert` is enabled. + fn reject_from_normalized( + _self: Val<::glam::Vec3A>, + rhs: Val<::glam::Vec3A>, + ) -> Val<::glam::Vec3A> { + let output: Val<::glam::Vec3A> = ::glam::Vec3A::reject_from_normalized( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + fn rem(_self: Val<::glam::Vec3A>, rhs: Ref<::glam::Vec3A>) -> Val<::glam::Vec3A> { + let output: Val<::glam::Vec3A> = <::glam::Vec3A as ::core::ops::Rem< + &::glam::Vec3A, + >>::rem(_self.into_inner(), &rhs) + .into(); + output + } + fn rem(_self: Val<::glam::Vec3A>, rhs: Val<::glam::Vec3A>) -> Val<::glam::Vec3A> { + let output: Val<::glam::Vec3A> = <::glam::Vec3A as ::core::ops::Rem< + ::glam::Vec3A, + >>::rem(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + fn rem(_self: Val<::glam::Vec3A>, rhs: f32) -> Val<::glam::Vec3A> { + let output: Val<::glam::Vec3A> = <::glam::Vec3A as ::core::ops::Rem< + f32, + >>::rem(_self.into_inner(), rhs) + .into(); + output + } + /// Returns the element-wise remainder of [Euclidean division] of `self` by `rhs`. + /// [Euclidean division]: f32::rem_euclid + fn rem_euclid( + _self: Val<::glam::Vec3A>, + rhs: Val<::glam::Vec3A>, + ) -> Val<::glam::Vec3A> { + let output: Val<::glam::Vec3A> = ::glam::Vec3A::rem_euclid( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Returns a vector containing the nearest integer to a number for each element of `self`. + /// Round half-way cases away from 0.0. + fn round(_self: Val<::glam::Vec3A>) -> Val<::glam::Vec3A> { + let output: Val<::glam::Vec3A> = ::glam::Vec3A::round(_self.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<::glam::BVec3A>, + if_true: Val<::glam::Vec3A>, + if_false: Val<::glam::Vec3A>, + ) -> Val<::glam::Vec3A> { + let output: Val<::glam::Vec3A> = ::glam::Vec3A::select( + mask.into_inner(), + if_true.into_inner(), + if_false.into_inner(), + ) + .into(); + output + } + /// Returns a vector with elements representing the sign of `self`. + /// - `1.0` if the number is positive, `+0.0` or `INFINITY` + /// - `-1.0` if the number is negative, `-0.0` or `NEG_INFINITY` + /// - `NAN` if the number is `NAN` + fn signum(_self: Val<::glam::Vec3A>) -> Val<::glam::Vec3A> { + let output: Val<::glam::Vec3A> = ::glam::Vec3A::signum(_self.into_inner()) + .into(); + output + } + /// Creates a vector with all elements set to `v`. + fn splat(v: f32) -> Val<::glam::Vec3A> { + let output: Val<::glam::Vec3A> = ::glam::Vec3A::splat(v).into(); + output + } + fn sub(_self: Val<::glam::Vec3A>, rhs: Ref<::glam::Vec3A>) -> Val<::glam::Vec3A> { + let output: Val<::glam::Vec3A> = <::glam::Vec3A as ::core::ops::Sub< + &::glam::Vec3A, + >>::sub(_self.into_inner(), &rhs) + .into(); + output + } + fn sub(_self: Val<::glam::Vec3A>, rhs: Val<::glam::Vec3A>) -> Val<::glam::Vec3A> { + let output: Val<::glam::Vec3A> = <::glam::Vec3A as ::core::ops::Sub< + ::glam::Vec3A, + >>::sub(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + fn sub(_self: Val<::glam::Vec3A>, rhs: f32) -> Val<::glam::Vec3A> { + let output: Val<::glam::Vec3A> = <::glam::Vec3A as ::core::ops::Sub< + f32, + >>::sub(_self.into_inner(), rhs) + .into(); + output + } + /// `[x, y, z]` + fn to_array(_self: Ref<::glam::Vec3A>) -> [f32; 3] { + let output: [f32; 3] = ::glam::Vec3A::to_array(&_self).into(); + output + } + /// Returns a vector containing the integer part each element of `self`. This means numbers are + /// always truncated towards zero. + fn trunc(_self: Val<::glam::Vec3A>) -> Val<::glam::Vec3A> { + let output: Val<::glam::Vec3A> = ::glam::Vec3A::trunc(_self.into_inner()).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<::glam::Vec3A>) -> Val<::glam::Vec2> { + let output: Val<::glam::Vec2> = ::glam::Vec3A::truncate(_self.into_inner()) + .into(); + output + } + /// Creates a 3D vector from `self` with the given value of `x`. + fn with_x(_self: Val<::glam::Vec3A>, x: f32) -> Val<::glam::Vec3A> { + let output: Val<::glam::Vec3A> = ::glam::Vec3A::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<::glam::Vec3A>, y: f32) -> Val<::glam::Vec3A> { + let output: Val<::glam::Vec3A> = ::glam::Vec3A::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<::glam::Vec3A>, z: f32) -> Val<::glam::Vec3A> { + let output: Val<::glam::Vec3A> = ::glam::Vec3A::with_z(_self.into_inner(), z) + .into(); + output + } +} +#[script_bindings( + remote, + name = "vec_4_functions", + bms_core_path = "bevy_mod_scripting_core", + generated +)] +impl ::glam::Vec4 { + /// Returns a vector containing the absolute value of each element of `self`. + fn abs(_self: Val<::glam::Vec4>) -> Val<::glam::Vec4> { + let output: Val<::glam::Vec4> = ::glam::Vec4::abs(_self.into_inner()).into(); + output + } + /// Returns true if the absolute difference of all elements between `self` and `rhs` is + /// less than or equal to `max_abs_diff`. + /// This can be used to compare if two vectors contain similar elements. It works best when + /// comparing with a known value. The `max_abs_diff` that should be used used depends on + /// the values being compared against. + /// For more see + /// [comparing floating point numbers](https://randomascii.wordpress.com/2012/02/25/comparing-floating-point-numbers-2012-edition/). + fn abs_diff_eq( + _self: Val<::glam::Vec4>, + rhs: Val<::glam::Vec4>, + max_abs_diff: f32, + ) -> bool { + let output: bool = ::glam::Vec4::abs_diff_eq( + _self.into_inner(), + rhs.into_inner(), + max_abs_diff, + ) + .into(); + output + } + fn add(_self: Val<::glam::Vec4>, rhs: Ref<::glam::Vec4>) -> Val<::glam::Vec4> { + let output: Val<::glam::Vec4> = <::glam::Vec4 as ::core::ops::Add< + &::glam::Vec4, + >>::add(_self.into_inner(), &rhs) + .into(); + output + } + fn add(_self: Val<::glam::Vec4>, rhs: Val<::glam::Vec4>) -> Val<::glam::Vec4> { + let output: Val<::glam::Vec4> = <::glam::Vec4 as ::core::ops::Add< + ::glam::Vec4, + >>::add(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + fn add(_self: Val<::glam::Vec4>, rhs: f32) -> Val<::glam::Vec4> { + let output: Val<::glam::Vec4> = <::glam::Vec4 as ::core::ops::Add< + f32, + >>::add(_self.into_inner(), rhs) + .into(); + output + } + /// Casts all elements of `self` to `f64`. + fn as_dvec4(_self: Ref<::glam::Vec4>) -> Val<::glam::DVec4> { + let output: Val<::glam::DVec4> = ::glam::Vec4::as_dvec4(&_self).into(); + output + } + /// Casts all elements of `self` to `i16`. + fn as_i16vec4(_self: Ref<::glam::Vec4>) -> Val<::glam::I16Vec4> { + let output: Val<::glam::I16Vec4> = ::glam::Vec4::as_i16vec4(&_self).into(); + output + } + /// Casts all elements of `self` to `i64`. + fn as_i64vec4(_self: Ref<::glam::Vec4>) -> Val<::glam::I64Vec4> { + let output: Val<::glam::I64Vec4> = ::glam::Vec4::as_i64vec4(&_self).into(); + output + } + /// Casts all elements of `self` to `i8`. + fn as_i8vec4(_self: Ref<::glam::Vec4>) -> Val<::glam::I8Vec4> { + let output: Val<::glam::I8Vec4> = ::glam::Vec4::as_i8vec4(&_self).into(); + output + } + /// Casts all elements of `self` to `i32`. + fn as_ivec4(_self: Ref<::glam::Vec4>) -> Val<::glam::IVec4> { + let output: Val<::glam::IVec4> = ::glam::Vec4::as_ivec4(&_self).into(); + output + } + /// Casts all elements of `self` to `u16`. + fn as_u16vec4(_self: Ref<::glam::Vec4>) -> Val<::glam::U16Vec4> { + let output: Val<::glam::U16Vec4> = ::glam::Vec4::as_u16vec4(&_self).into(); + output + } + /// Casts all elements of `self` to `u64`. + fn as_u64vec4(_self: Ref<::glam::Vec4>) -> Val<::glam::U64Vec4> { + let output: Val<::glam::U64Vec4> = ::glam::Vec4::as_u64vec4(&_self).into(); + output + } + /// Casts all elements of `self` to `u8`. + fn as_u8vec4(_self: Ref<::glam::Vec4>) -> Val<::glam::U8Vec4> { + let output: Val<::glam::U8Vec4> = ::glam::Vec4::as_u8vec4(&_self).into(); + output + } + /// Casts all elements of `self` to `u32`. + fn as_uvec4(_self: Ref<::glam::Vec4>) -> Val<::glam::UVec4> { + let output: Val<::glam::UVec4> = ::glam::Vec4::as_uvec4(&_self).into(); + output + } + /// Returns a vector containing the smallest integer greater than or equal to a number for + /// each element of `self`. + fn ceil(_self: Val<::glam::Vec4>) -> Val<::glam::Vec4> { + let output: Val<::glam::Vec4> = ::glam::Vec4::ceil(_self.into_inner()).into(); + output + } + /// Component-wise clamping of values, similar to [`f32::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<::glam::Vec4>, + min: Val<::glam::Vec4>, + max: Val<::glam::Vec4>, + ) -> Val<::glam::Vec4> { + let output: Val<::glam::Vec4> = ::glam::Vec4::clamp( + _self.into_inner(), + min.into_inner(), + max.into_inner(), + ) + .into(); + output + } + /// Returns a vector with a length no less than `min` and no more than `max`. + /// # Panics + /// Will panic if `min` is greater than `max`, or if either `min` or `max` is negative, when `glam_assert` is enabled. + fn clamp_length(_self: Val<::glam::Vec4>, min: f32, max: f32) -> Val<::glam::Vec4> { + let output: Val<::glam::Vec4> = ::glam::Vec4::clamp_length( + _self.into_inner(), + min, + max, + ) + .into(); + output + } + /// Returns a vector with a length no more than `max`. + /// # Panics + /// Will panic if `max` is negative when `glam_assert` is enabled. + fn clamp_length_max(_self: Val<::glam::Vec4>, max: f32) -> Val<::glam::Vec4> { + let output: Val<::glam::Vec4> = ::glam::Vec4::clamp_length_max( + _self.into_inner(), + max, + ) + .into(); + output + } + /// Returns a vector with a length no less than `min`. + /// # Panics + /// Will panic if `min` is negative when `glam_assert` is enabled. + fn clamp_length_min(_self: Val<::glam::Vec4>, min: f32) -> Val<::glam::Vec4> { + let output: Val<::glam::Vec4> = ::glam::Vec4::clamp_length_min( + _self.into_inner(), + min, + ) + .into(); + output + } + fn clone(_self: Ref<::glam::Vec4>) -> Val<::glam::Vec4> { + let output: Val<::glam::Vec4> = <::glam::Vec4 as ::bevy_reflect::erased_serde::__private::serde::__private::Clone>::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<::glam::Vec4>, rhs: Val<::glam::Vec4>) -> Val<::glam::BVec4A> { + let output: Val<::glam::BVec4A> = ::glam::Vec4::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<::glam::Vec4>, rhs: Val<::glam::Vec4>) -> Val<::glam::BVec4A> { + let output: Val<::glam::BVec4A> = ::glam::Vec4::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<::glam::Vec4>, rhs: Val<::glam::Vec4>) -> Val<::glam::BVec4A> { + let output: Val<::glam::BVec4A> = ::glam::Vec4::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<::glam::Vec4>, rhs: Val<::glam::Vec4>) -> Val<::glam::BVec4A> { + let output: Val<::glam::BVec4A> = ::glam::Vec4::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<::glam::Vec4>, rhs: Val<::glam::Vec4>) -> Val<::glam::BVec4A> { + let output: Val<::glam::BVec4A> = ::glam::Vec4::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<::glam::Vec4>, rhs: Val<::glam::Vec4>) -> Val<::glam::BVec4A> { + let output: Val<::glam::BVec4A> = ::glam::Vec4::cmpne( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Returns a vector with signs of `rhs` and the magnitudes of `self`. + fn copysign(_self: Val<::glam::Vec4>, rhs: Val<::glam::Vec4>) -> Val<::glam::Vec4> { + let output: Val<::glam::Vec4> = ::glam::Vec4::copysign( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Computes the Euclidean distance between two points in space. + fn distance(_self: Val<::glam::Vec4>, rhs: Val<::glam::Vec4>) -> f32 { + let output: f32 = ::glam::Vec4::distance(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + /// Compute the squared euclidean distance between two points in space. + fn distance_squared(_self: Val<::glam::Vec4>, rhs: Val<::glam::Vec4>) -> f32 { + let output: f32 = ::glam::Vec4::distance_squared( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + fn div(_self: Val<::glam::Vec4>, rhs: Ref<::glam::Vec4>) -> Val<::glam::Vec4> { + let output: Val<::glam::Vec4> = <::glam::Vec4 as ::core::ops::Div< + &::glam::Vec4, + >>::div(_self.into_inner(), &rhs) + .into(); + output + } + fn div(_self: Val<::glam::Vec4>, rhs: Val<::glam::Vec4>) -> Val<::glam::Vec4> { + let output: Val<::glam::Vec4> = <::glam::Vec4 as ::core::ops::Div< + ::glam::Vec4, + >>::div(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + fn div(_self: Val<::glam::Vec4>, rhs: f32) -> Val<::glam::Vec4> { + let output: Val<::glam::Vec4> = <::glam::Vec4 as ::core::ops::Div< + f32, + >>::div(_self.into_inner(), rhs) + .into(); + output + } + /// Returns the element-wise quotient of [Euclidean division] of `self` by `rhs`. + fn div_euclid( + _self: Val<::glam::Vec4>, + rhs: Val<::glam::Vec4>, + ) -> Val<::glam::Vec4> { + let output: Val<::glam::Vec4> = ::glam::Vec4::div_euclid( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Computes the dot product of `self` and `rhs`. + fn dot(_self: Val<::glam::Vec4>, rhs: Val<::glam::Vec4>) -> f32 { + let output: f32 = ::glam::Vec4::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<::glam::Vec4>, + rhs: Val<::glam::Vec4>, + ) -> Val<::glam::Vec4> { + let output: Val<::glam::Vec4> = ::glam::Vec4::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<::glam::Vec4>) -> f32 { + let output: f32 = ::glam::Vec4::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<::glam::Vec4>) -> f32 { + let output: f32 = ::glam::Vec4::element_sum(_self.into_inner()).into(); + output + } + fn eq(_self: Ref<::glam::Vec4>, rhs: Ref<::glam::Vec4>) -> bool { + let output: bool = <::glam::Vec4 as ::core::cmp::PartialEq< + ::glam::Vec4, + >>::eq(&_self, &rhs) + .into(); + output + } + /// Returns a vector containing `e^self` (the exponential function) for each element of + /// `self`. + fn exp(_self: Val<::glam::Vec4>) -> Val<::glam::Vec4> { + let output: Val<::glam::Vec4> = ::glam::Vec4::exp(_self.into_inner()).into(); + output + } + /// Returns a vector containing the largest integer less than or equal to a number for each + /// element of `self`. + fn floor(_self: Val<::glam::Vec4>) -> Val<::glam::Vec4> { + let output: Val<::glam::Vec4> = ::glam::Vec4::floor(_self.into_inner()).into(); + output + } + /// Returns a vector containing the fractional part of the vector as `self - self.trunc()`. + /// Note that this differs from the GLSL implementation of `fract` which returns + /// `self - self.floor()`. + /// Note that this is fast but not precise for large numbers. + fn fract(_self: Val<::glam::Vec4>) -> Val<::glam::Vec4> { + let output: Val<::glam::Vec4> = ::glam::Vec4::fract(_self.into_inner()).into(); + output + } + /// Returns a vector containing the fractional part of the vector as `self - self.floor()`. + /// Note that this differs from the Rust implementation of `fract` which returns + /// `self - self.trunc()`. + /// Note that this is fast but not precise for large numbers. + fn fract_gl(_self: Val<::glam::Vec4>) -> Val<::glam::Vec4> { + let output: Val<::glam::Vec4> = ::glam::Vec4::fract_gl(_self.into_inner()) + .into(); + output + } + /// Creates a new vector from an array. + fn from_array(a: [f32; 4]) -> Val<::glam::Vec4> { + let output: Val<::glam::Vec4> = ::glam::Vec4::from_array(a).into(); + output + } + /// Returns `true` if, and only if, all elements are finite. If any element is either + /// `NaN`, positive or negative infinity, this will return `false`. + fn is_finite(_self: Val<::glam::Vec4>) -> bool { + let output: bool = ::glam::Vec4::is_finite(_self.into_inner()).into(); + output + } + /// Performs `is_finite` on each element of self, returning a vector mask of the results. + /// In other words, this computes `[x.is_finite(), y.is_finite(), ...]`. + fn is_finite_mask(_self: Val<::glam::Vec4>) -> Val<::glam::BVec4A> { + let output: Val<::glam::BVec4A> = ::glam::Vec4::is_finite_mask( + _self.into_inner(), + ) + .into(); + output + } + /// Returns `true` if any elements are `NaN`. + fn is_nan(_self: Val<::glam::Vec4>) -> bool { + let output: bool = ::glam::Vec4::is_nan(_self.into_inner()).into(); + output + } + /// Performs `is_nan` on each element of self, returning a vector mask of the results. + /// In other words, this computes `[x.is_nan(), y.is_nan(), ...]`. + fn is_nan_mask(_self: Val<::glam::Vec4>) -> Val<::glam::BVec4A> { + let output: Val<::glam::BVec4A> = ::glam::Vec4::is_nan_mask(_self.into_inner()) + .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<::glam::Vec4>) -> u32 { + let output: u32 = ::glam::Vec4::is_negative_bitmask(_self.into_inner()).into(); + output + } + /// Returns whether `self` is length `1.0` or not. + /// Uses a precision threshold of approximately `1e-4`. + fn is_normalized(_self: Val<::glam::Vec4>) -> bool { + let output: bool = ::glam::Vec4::is_normalized(_self.into_inner()).into(); + output + } + /// Computes the length of `self`. + fn length(_self: Val<::glam::Vec4>) -> f32 { + let output: f32 = ::glam::Vec4::length(_self.into_inner()).into(); + output + } + /// Computes `1.0 / length()`. + /// For valid results, `self` must _not_ be of length zero. + fn length_recip(_self: Val<::glam::Vec4>) -> f32 { + let output: f32 = ::glam::Vec4::length_recip(_self.into_inner()).into(); + output + } + /// Computes the squared length of `self`. + /// This is faster than `length()` as it avoids a square root operation. + fn length_squared(_self: Val<::glam::Vec4>) -> f32 { + let output: f32 = ::glam::Vec4::length_squared(_self.into_inner()).into(); + output + } + /// Performs a linear interpolation between `self` and `rhs` based on the value `s`. + /// When `s` is `0.0`, the result will be equal to `self`. When `s` is `1.0`, the result + /// will be equal to `rhs`. When `s` is outside of range `[0, 1]`, the result is linearly + /// extrapolated. + fn lerp( + _self: Val<::glam::Vec4>, + rhs: Val<::glam::Vec4>, + s: f32, + ) -> Val<::glam::Vec4> { + let output: Val<::glam::Vec4> = ::glam::Vec4::lerp( + _self.into_inner(), + rhs.into_inner(), + s, + ) + .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<::glam::Vec4>, rhs: Val<::glam::Vec4>) -> Val<::glam::Vec4> { + let output: Val<::glam::Vec4> = ::glam::Vec4::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<::glam::Vec4>) -> f32 { + let output: f32 = ::glam::Vec4::max_element(_self.into_inner()).into(); + output + } + /// Calculates the midpoint between `self` and `rhs`. + /// The midpoint is the average of, or halfway point between, two vectors. + /// `a.midpoint(b)` should yield the same result as `a.lerp(b, 0.5)` + /// while being slightly cheaper to compute. + fn midpoint(_self: Val<::glam::Vec4>, rhs: Val<::glam::Vec4>) -> Val<::glam::Vec4> { + let output: Val<::glam::Vec4> = ::glam::Vec4::midpoint( + _self.into_inner(), + rhs.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<::glam::Vec4>, rhs: Val<::glam::Vec4>) -> Val<::glam::Vec4> { + let output: Val<::glam::Vec4> = ::glam::Vec4::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<::glam::Vec4>) -> f32 { + let output: f32 = ::glam::Vec4::min_element(_self.into_inner()).into(); + output + } + /// Moves towards `rhs` based on the value `d`. + /// When `d` is `0.0`, the result will be equal to `self`. When `d` is equal to + /// `self.distance(rhs)`, the result will be equal to `rhs`. Will not go past `rhs`. + fn move_towards( + _self: Ref<::glam::Vec4>, + rhs: Val<::glam::Vec4>, + d: f32, + ) -> Val<::glam::Vec4> { + let output: Val<::glam::Vec4> = ::glam::Vec4::move_towards( + &_self, + rhs.into_inner(), + d, + ) + .into(); + output + } + fn mul(_self: Val<::glam::Vec4>, rhs: Ref<::glam::Vec4>) -> Val<::glam::Vec4> { + let output: Val<::glam::Vec4> = <::glam::Vec4 as ::core::ops::Mul< + &::glam::Vec4, + >>::mul(_self.into_inner(), &rhs) + .into(); + output + } + fn mul(_self: Val<::glam::Vec4>, rhs: Val<::glam::Vec4>) -> Val<::glam::Vec4> { + let output: Val<::glam::Vec4> = <::glam::Vec4 as ::core::ops::Mul< + ::glam::Vec4, + >>::mul(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + fn mul(_self: Val<::glam::Vec4>, rhs: f32) -> Val<::glam::Vec4> { + let output: Val<::glam::Vec4> = <::glam::Vec4 as ::core::ops::Mul< + f32, + >>::mul(_self.into_inner(), rhs) + .into(); + output + } + /// Fused multiply-add. Computes `(self * a) + b` element-wise with only one rounding + /// error, yielding a more accurate result than an unfused multiply-add. + /// Using `mul_add` *may* be more performant than an unfused multiply-add if the target + /// architecture has a dedicated fma CPU instruction. However, this is not always true, + /// and will be heavily dependant on designing algorithms with specific target hardware in + /// mind. + fn mul_add( + _self: Val<::glam::Vec4>, + a: Val<::glam::Vec4>, + b: Val<::glam::Vec4>, + ) -> Val<::glam::Vec4> { + let output: Val<::glam::Vec4> = ::glam::Vec4::mul_add( + _self.into_inner(), + a.into_inner(), + b.into_inner(), + ) + .into(); + output + } + fn neg(_self: Val<::glam::Vec4>) -> Val<::glam::Vec4> { + let output: Val<::glam::Vec4> = <::glam::Vec4 as ::core::ops::Neg>::neg( + _self.into_inner(), + ) + .into(); + output + } + /// Creates a new vector. + fn new(x: f32, y: f32, z: f32, w: f32) -> Val<::glam::Vec4> { + let output: Val<::glam::Vec4> = ::glam::Vec4::new(x, y, z, w).into(); + output + } + /// Returns `self` normalized to length 1.0. + /// For valid results, `self` must be finite and _not_ of length zero, nor very close to zero. + /// See also [`Self::try_normalize()`] and [`Self::normalize_or_zero()`]. + /// Panics + /// Will panic if the resulting normalized vector is not finite when `glam_assert` is enabled. + fn normalize(_self: Val<::glam::Vec4>) -> Val<::glam::Vec4> { + let output: Val<::glam::Vec4> = ::glam::Vec4::normalize(_self.into_inner()) + .into(); + output + } + /// Returns `self` normalized to length 1.0 if possible, else returns a + /// fallback value. + /// In particular, if the input is zero (or very close to zero), or non-finite, + /// the result of this operation will be the fallback value. + /// See also [`Self::try_normalize()`]. + fn normalize_or( + _self: Val<::glam::Vec4>, + fallback: Val<::glam::Vec4>, + ) -> Val<::glam::Vec4> { + let output: Val<::glam::Vec4> = ::glam::Vec4::normalize_or( + _self.into_inner(), + fallback.into_inner(), + ) + .into(); + output + } + /// Returns `self` normalized to length 1.0 if possible, else returns zero. + /// In particular, if the input is zero (or very close to zero), or non-finite, + /// the result of this operation will be zero. + /// See also [`Self::try_normalize()`]. + fn normalize_or_zero(_self: Val<::glam::Vec4>) -> Val<::glam::Vec4> { + let output: Val<::glam::Vec4> = ::glam::Vec4::normalize_or_zero( + _self.into_inner(), + ) + .into(); + output + } + /// Returns a vector containing each element of `self` raised to the power of `n`. + fn powf(_self: Val<::glam::Vec4>, n: f32) -> Val<::glam::Vec4> { + let output: Val<::glam::Vec4> = ::glam::Vec4::powf(_self.into_inner(), n).into(); + output + } + /// Returns the vector projection of `self` onto `rhs`. + /// `rhs` must be of non-zero length. + /// # Panics + /// Will panic if `rhs` is zero length when `glam_assert` is enabled. + fn project_onto( + _self: Val<::glam::Vec4>, + rhs: Val<::glam::Vec4>, + ) -> Val<::glam::Vec4> { + let output: Val<::glam::Vec4> = ::glam::Vec4::project_onto( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Returns the vector projection of `self` onto `rhs`. + /// `rhs` must be normalized. + /// # Panics + /// Will panic if `rhs` is not normalized when `glam_assert` is enabled. + fn project_onto_normalized( + _self: Val<::glam::Vec4>, + rhs: Val<::glam::Vec4>, + ) -> Val<::glam::Vec4> { + let output: Val<::glam::Vec4> = ::glam::Vec4::project_onto_normalized( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Returns a vector containing the reciprocal `1.0/n` of each element of `self`. + fn recip(_self: Val<::glam::Vec4>) -> Val<::glam::Vec4> { + let output: Val<::glam::Vec4> = ::glam::Vec4::recip(_self.into_inner()).into(); + output + } + /// Returns the reflection vector for a given incident vector `self` and surface normal + /// `normal`. + /// `normal` must be normalized. + /// # Panics + /// Will panic if `normal` is not normalized when `glam_assert` is enabled. + fn reflect( + _self: Val<::glam::Vec4>, + normal: Val<::glam::Vec4>, + ) -> Val<::glam::Vec4> { + let output: Val<::glam::Vec4> = ::glam::Vec4::reflect( + _self.into_inner(), + normal.into_inner(), + ) + .into(); + output + } + /// Returns the refraction direction for a given incident vector `self`, surface normal + /// `normal` and ratio of indices of refraction, `eta`. When total internal reflection occurs, + /// a zero vector will be returned. + /// `self` and `normal` must be normalized. + /// # Panics + /// Will panic if `self` or `normal` is not normalized when `glam_assert` is enabled. + fn refract( + _self: Val<::glam::Vec4>, + normal: Val<::glam::Vec4>, + eta: f32, + ) -> Val<::glam::Vec4> { + let output: Val<::glam::Vec4> = ::glam::Vec4::refract( + _self.into_inner(), + normal.into_inner(), + eta, + ) + .into(); + output + } + /// Returns the vector rejection of `self` from `rhs`. + /// The vector rejection is the vector perpendicular to the projection of `self` onto + /// `rhs`, in rhs words the result of `self - self.project_onto(rhs)`. + /// `rhs` must be of non-zero length. + /// # Panics + /// Will panic if `rhs` has a length of zero when `glam_assert` is enabled. + fn reject_from( + _self: Val<::glam::Vec4>, + rhs: Val<::glam::Vec4>, + ) -> Val<::glam::Vec4> { + let output: Val<::glam::Vec4> = ::glam::Vec4::reject_from( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Returns the vector rejection of `self` from `rhs`. + /// The vector rejection is the vector perpendicular to the projection of `self` onto + /// `rhs`, in rhs words the result of `self - self.project_onto(rhs)`. + /// `rhs` must be normalized. + /// # Panics + /// Will panic if `rhs` is not normalized when `glam_assert` is enabled. + fn reject_from_normalized( + _self: Val<::glam::Vec4>, + rhs: Val<::glam::Vec4>, + ) -> Val<::glam::Vec4> { + let output: Val<::glam::Vec4> = ::glam::Vec4::reject_from_normalized( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + fn rem(_self: Val<::glam::Vec4>, rhs: Ref<::glam::Vec4>) -> Val<::glam::Vec4> { + let output: Val<::glam::Vec4> = <::glam::Vec4 as ::core::ops::Rem< + &::glam::Vec4, + >>::rem(_self.into_inner(), &rhs) + .into(); + output + } + fn rem(_self: Val<::glam::Vec4>, rhs: Val<::glam::Vec4>) -> Val<::glam::Vec4> { + let output: Val<::glam::Vec4> = <::glam::Vec4 as ::core::ops::Rem< + ::glam::Vec4, + >>::rem(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + fn rem(_self: Val<::glam::Vec4>, rhs: f32) -> Val<::glam::Vec4> { + let output: Val<::glam::Vec4> = <::glam::Vec4 as ::core::ops::Rem< + f32, + >>::rem(_self.into_inner(), rhs) + .into(); + output + } + /// Returns the element-wise remainder of [Euclidean division] of `self` by `rhs`. + /// [Euclidean division]: f32::rem_euclid + fn rem_euclid( + _self: Val<::glam::Vec4>, + rhs: Val<::glam::Vec4>, + ) -> Val<::glam::Vec4> { + let output: Val<::glam::Vec4> = ::glam::Vec4::rem_euclid( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Returns a vector containing the nearest integer to a number for each element of `self`. + /// Round half-way cases away from 0.0. + fn round(_self: Val<::glam::Vec4>) -> Val<::glam::Vec4> { + let output: Val<::glam::Vec4> = ::glam::Vec4::round(_self.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<::glam::BVec4A>, + if_true: Val<::glam::Vec4>, + if_false: Val<::glam::Vec4>, + ) -> Val<::glam::Vec4> { + let output: Val<::glam::Vec4> = ::glam::Vec4::select( + mask.into_inner(), + if_true.into_inner(), + if_false.into_inner(), + ) + .into(); + output + } + /// Returns a vector with elements representing the sign of `self`. + /// - `1.0` if the number is positive, `+0.0` or `INFINITY` + /// - `-1.0` if the number is negative, `-0.0` or `NEG_INFINITY` + /// - `NAN` if the number is `NAN` + fn signum(_self: Val<::glam::Vec4>) -> Val<::glam::Vec4> { + let output: Val<::glam::Vec4> = ::glam::Vec4::signum(_self.into_inner()).into(); + output + } + /// Creates a vector with all elements set to `v`. + fn splat(v: f32) -> Val<::glam::Vec4> { + let output: Val<::glam::Vec4> = ::glam::Vec4::splat(v).into(); + output + } + fn sub(_self: Val<::glam::Vec4>, rhs: Ref<::glam::Vec4>) -> Val<::glam::Vec4> { + let output: Val<::glam::Vec4> = <::glam::Vec4 as ::core::ops::Sub< + &::glam::Vec4, + >>::sub(_self.into_inner(), &rhs) + .into(); + output + } + fn sub(_self: Val<::glam::Vec4>, rhs: Val<::glam::Vec4>) -> Val<::glam::Vec4> { + let output: Val<::glam::Vec4> = <::glam::Vec4 as ::core::ops::Sub< + ::glam::Vec4, + >>::sub(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + fn sub(_self: Val<::glam::Vec4>, rhs: f32) -> Val<::glam::Vec4> { + let output: Val<::glam::Vec4> = <::glam::Vec4 as ::core::ops::Sub< + f32, + >>::sub(_self.into_inner(), rhs) + .into(); + output + } + /// `[x, y, z, w]` + fn to_array(_self: Ref<::glam::Vec4>) -> [f32; 4] { + let output: [f32; 4] = ::glam::Vec4::to_array(&_self).into(); + output + } + /// Returns a vector containing the integer part each element of `self`. This means numbers are + /// always truncated towards zero. + fn trunc(_self: Val<::glam::Vec4>) -> Val<::glam::Vec4> { + let output: Val<::glam::Vec4> = ::glam::Vec4::trunc(_self.into_inner()).into(); + output + } + /// Creates a 3D vector from the `x`, `y` and `z` elements of `self`, discarding `w`. + /// Truncation to [`Vec3`] may also be performed by using [`self.xyz()`][crate::swizzles::Vec4Swizzles::xyz()]. + /// To truncate to [`Vec3A`] use [`Vec3A::from()`]. + fn truncate(_self: Val<::glam::Vec4>) -> Val<::glam::Vec3> { + let output: Val<::glam::Vec3> = ::glam::Vec4::truncate(_self.into_inner()) + .into(); + output + } + /// Creates a 4D vector from `self` with the given value of `w`. + fn with_w(_self: Val<::glam::Vec4>, w: f32) -> Val<::glam::Vec4> { + let output: Val<::glam::Vec4> = ::glam::Vec4::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<::glam::Vec4>, x: f32) -> Val<::glam::Vec4> { + let output: Val<::glam::Vec4> = ::glam::Vec4::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<::glam::Vec4>, y: f32) -> Val<::glam::Vec4> { + let output: Val<::glam::Vec4> = ::glam::Vec4::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<::glam::Vec4>, z: f32) -> Val<::glam::Vec4> { + let output: Val<::glam::Vec4> = ::glam::Vec4::with_z(_self.into_inner(), z) + .into(); + output + } +} +#[script_bindings( + remote, + name = "b_vec_2_functions", + bms_core_path = "bevy_mod_scripting_core", + generated +)] +impl ::glam::BVec2 { + /// Returns true if all the elements are true, false otherwise. + fn all(_self: Val<::glam::BVec2>) -> bool { + let output: bool = ::glam::BVec2::all(_self.into_inner()).into(); + output + } + /// Returns true if any of the elements are true, false otherwise. + fn any(_self: Val<::glam::BVec2>) -> bool { + let output: bool = ::glam::BVec2::any(_self.into_inner()).into(); + output + } + fn assert_receiver_is_total_eq(_self: Ref<::glam::BVec2>) -> () { + let output: () = <::glam::BVec2 as ::core::cmp::Eq>::assert_receiver_is_total_eq( + &_self, + ) + .into(); + output + } + /// Returns a bitmask with the lowest 2 bits set from the elements of `self`. + /// A true element results in a `1` bit and a false element in a `0` bit. Element `x` goes + /// into the first lowest bit, element `y` into the second, etc. + fn bitmask(_self: Val<::glam::BVec2>) -> u32 { + let output: u32 = ::glam::BVec2::bitmask(_self.into_inner()).into(); + output + } + fn clone(_self: Ref<::glam::BVec2>) -> Val<::glam::BVec2> { + let output: Val<::glam::BVec2> = <::glam::BVec2 as ::bevy_reflect::erased_serde::__private::serde::__private::Clone>::clone( + &_self, + ) + .into(); + output + } + fn eq(_self: Ref<::glam::BVec2>, other: Ref<::glam::BVec2>) -> bool { + let output: bool = <::glam::BVec2 as ::core::cmp::PartialEq< + ::glam::BVec2, + >>::eq(&_self, &other) + .into(); + output + } + /// Creates a new vector mask from a bool array. + fn from_array(a: [bool; 2]) -> Val<::glam::BVec2> { + let output: Val<::glam::BVec2> = ::glam::BVec2::from_array(a).into(); + output + } + /// Creates a new vector mask. + fn new(x: bool, y: bool) -> Val<::glam::BVec2> { + let output: Val<::glam::BVec2> = ::glam::BVec2::new(x, y).into(); + output + } + /// Sets the element at `index`. + /// Panics if `index` is greater than 1. + fn set(mut _self: Mut<::glam::BVec2>, index: usize, value: bool) -> () { + let output: () = ::glam::BVec2::set(&mut _self, index, value).into(); + output + } + /// Creates a vector mask with all elements set to `v`. + fn splat(v: bool) -> Val<::glam::BVec2> { + let output: Val<::glam::BVec2> = ::glam::BVec2::splat(v).into(); + output + } + /// Tests the value at `index`. + /// Panics if `index` is greater than 1. + fn test(_self: Ref<::glam::BVec2>, index: usize) -> bool { + let output: bool = ::glam::BVec2::test(&_self, index).into(); + output + } +} +#[script_bindings( + remote, + name = "b_vec_3_functions", + bms_core_path = "bevy_mod_scripting_core", + generated +)] +impl ::glam::BVec3 { + /// Returns true if all the elements are true, false otherwise. + fn all(_self: Val<::glam::BVec3>) -> bool { + let output: bool = ::glam::BVec3::all(_self.into_inner()).into(); + output + } + /// Returns true if any of the elements are true, false otherwise. + fn any(_self: Val<::glam::BVec3>) -> bool { + let output: bool = ::glam::BVec3::any(_self.into_inner()).into(); + output + } + fn assert_receiver_is_total_eq(_self: Ref<::glam::BVec3>) -> () { + let output: () = <::glam::BVec3 as ::core::cmp::Eq>::assert_receiver_is_total_eq( + &_self, + ) + .into(); + output + } + /// Returns a bitmask with the lowest 3 bits set from the elements of `self`. + /// A true element results in a `1` bit and a false element in a `0` bit. Element `x` goes + /// into the first lowest bit, element `y` into the second, etc. + fn bitmask(_self: Val<::glam::BVec3>) -> u32 { + let output: u32 = ::glam::BVec3::bitmask(_self.into_inner()).into(); + output + } + fn clone(_self: Ref<::glam::BVec3>) -> Val<::glam::BVec3> { + let output: Val<::glam::BVec3> = <::glam::BVec3 as ::bevy_reflect::erased_serde::__private::serde::__private::Clone>::clone( + &_self, + ) + .into(); + output + } + fn eq(_self: Ref<::glam::BVec3>, other: Ref<::glam::BVec3>) -> bool { + let output: bool = <::glam::BVec3 as ::core::cmp::PartialEq< + ::glam::BVec3, + >>::eq(&_self, &other) + .into(); + output + } + /// Creates a new vector mask from a bool array. + fn from_array(a: [bool; 3]) -> Val<::glam::BVec3> { + let output: Val<::glam::BVec3> = ::glam::BVec3::from_array(a).into(); + output + } + /// Creates a new vector mask. + fn new(x: bool, y: bool, z: bool) -> Val<::glam::BVec3> { + let output: Val<::glam::BVec3> = ::glam::BVec3::new(x, y, z).into(); + output + } + /// Sets the element at `index`. + /// Panics if `index` is greater than 2. + fn set(mut _self: Mut<::glam::BVec3>, index: usize, value: bool) -> () { + let output: () = ::glam::BVec3::set(&mut _self, index, value).into(); + output + } + /// Creates a vector mask with all elements set to `v`. + fn splat(v: bool) -> Val<::glam::BVec3> { + let output: Val<::glam::BVec3> = ::glam::BVec3::splat(v).into(); + output + } + /// Tests the value at `index`. + /// Panics if `index` is greater than 2. + fn test(_self: Ref<::glam::BVec3>, index: usize) -> bool { + let output: bool = ::glam::BVec3::test(&_self, index).into(); + output + } +} +#[script_bindings( + remote, + name = "b_vec_4_functions", + bms_core_path = "bevy_mod_scripting_core", + generated +)] +impl ::glam::BVec4 { + /// Returns true if all the elements are true, false otherwise. + fn all(_self: Val<::glam::BVec4>) -> bool { + let output: bool = ::glam::BVec4::all(_self.into_inner()).into(); + output + } + /// Returns true if any of the elements are true, false otherwise. + fn any(_self: Val<::glam::BVec4>) -> bool { + let output: bool = ::glam::BVec4::any(_self.into_inner()).into(); + output + } + fn assert_receiver_is_total_eq(_self: Ref<::glam::BVec4>) -> () { + let output: () = <::glam::BVec4 as ::core::cmp::Eq>::assert_receiver_is_total_eq( + &_self, + ) + .into(); + output + } + /// Returns a bitmask with the lowest 4 bits set from the elements of `self`. + /// A true element results in a `1` bit and a false element in a `0` bit. Element `x` goes + /// into the first lowest bit, element `y` into the second, etc. + fn bitmask(_self: Val<::glam::BVec4>) -> u32 { + let output: u32 = ::glam::BVec4::bitmask(_self.into_inner()).into(); + output + } + fn clone(_self: Ref<::glam::BVec4>) -> Val<::glam::BVec4> { + let output: Val<::glam::BVec4> = <::glam::BVec4 as ::bevy_reflect::erased_serde::__private::serde::__private::Clone>::clone( + &_self, + ) + .into(); + output + } + fn eq(_self: Ref<::glam::BVec4>, other: Ref<::glam::BVec4>) -> bool { + let output: bool = <::glam::BVec4 as ::core::cmp::PartialEq< + ::glam::BVec4, + >>::eq(&_self, &other) + .into(); + output + } + /// Creates a new vector mask from a bool array. + fn from_array(a: [bool; 4]) -> Val<::glam::BVec4> { + let output: Val<::glam::BVec4> = ::glam::BVec4::from_array(a).into(); + output + } + /// Creates a new vector mask. + fn new(x: bool, y: bool, z: bool, w: bool) -> Val<::glam::BVec4> { + let output: Val<::glam::BVec4> = ::glam::BVec4::new(x, y, z, w).into(); + output + } + /// Sets the element at `index`. + /// Panics if `index` is greater than 3. + fn set(mut _self: Mut<::glam::BVec4>, index: usize, value: bool) -> () { + let output: () = ::glam::BVec4::set(&mut _self, index, value).into(); + output + } + /// Creates a vector mask with all elements set to `v`. + fn splat(v: bool) -> Val<::glam::BVec4> { + let output: Val<::glam::BVec4> = ::glam::BVec4::splat(v).into(); + output + } + /// Tests the value at `index`. + /// Panics if `index` is greater than 3. + fn test(_self: Ref<::glam::BVec4>, index: usize) -> bool { + let output: bool = ::glam::BVec4::test(&_self, index).into(); + output + } +} +#[script_bindings( + remote, + name = "d_vec_2_functions", + bms_core_path = "bevy_mod_scripting_core", + generated +)] +impl ::glam::DVec2 { + /// Returns a vector containing the absolute value of each element of `self`. + fn abs(_self: Val<::glam::DVec2>) -> Val<::glam::DVec2> { + let output: Val<::glam::DVec2> = ::glam::DVec2::abs(_self.into_inner()).into(); + output + } + /// Returns true if the absolute difference of all elements between `self` and `rhs` is + /// less than or equal to `max_abs_diff`. + /// This can be used to compare if two vectors contain similar elements. It works best when + /// comparing with a known value. The `max_abs_diff` that should be used used depends on + /// the values being compared against. + /// For more see + /// [comparing floating point numbers](https://randomascii.wordpress.com/2012/02/25/comparing-floating-point-numbers-2012-edition/). + fn abs_diff_eq( + _self: Val<::glam::DVec2>, + rhs: Val<::glam::DVec2>, + max_abs_diff: f64, + ) -> bool { + let output: bool = ::glam::DVec2::abs_diff_eq( + _self.into_inner(), + rhs.into_inner(), + max_abs_diff, + ) + .into(); + output + } + fn add(_self: Val<::glam::DVec2>, rhs: Ref<::glam::DVec2>) -> Val<::glam::DVec2> { + let output: Val<::glam::DVec2> = <::glam::DVec2 as ::core::ops::Add< + &::glam::DVec2, + >>::add(_self.into_inner(), &rhs) + .into(); + output + } + fn add(_self: Val<::glam::DVec2>, rhs: Val<::glam::DVec2>) -> Val<::glam::DVec2> { + let output: Val<::glam::DVec2> = <::glam::DVec2 as ::core::ops::Add< + ::glam::DVec2, + >>::add(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + fn add(_self: Val<::glam::DVec2>, rhs: f64) -> Val<::glam::DVec2> { + let output: Val<::glam::DVec2> = <::glam::DVec2 as ::core::ops::Add< + f64, + >>::add(_self.into_inner(), rhs) + .into(); + output + } + fn angle_between(_self: Val<::glam::DVec2>, rhs: Val<::glam::DVec2>) -> f64 { + let output: f64 = ::glam::DVec2::angle_between( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Returns the angle of rotation (in radians) from `self` to `rhs` in the range `[-π, +π]`. + /// The inputs do not need to be unit vectors however they must be non-zero. + fn angle_to(_self: Val<::glam::DVec2>, rhs: Val<::glam::DVec2>) -> f64 { + let output: f64 = ::glam::DVec2::angle_to(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + /// Casts all elements of `self` to `i16`. + fn as_i16vec2(_self: Ref<::glam::DVec2>) -> Val<::glam::I16Vec2> { + let output: Val<::glam::I16Vec2> = ::glam::DVec2::as_i16vec2(&_self).into(); + output + } + /// Casts all elements of `self` to `i64`. + fn as_i64vec2(_self: Ref<::glam::DVec2>) -> Val<::glam::I64Vec2> { + let output: Val<::glam::I64Vec2> = ::glam::DVec2::as_i64vec2(&_self).into(); + output + } + /// Casts all elements of `self` to `i8`. + fn as_i8vec2(_self: Ref<::glam::DVec2>) -> Val<::glam::I8Vec2> { + let output: Val<::glam::I8Vec2> = ::glam::DVec2::as_i8vec2(&_self).into(); + output + } + /// Casts all elements of `self` to `i32`. + fn as_ivec2(_self: Ref<::glam::DVec2>) -> Val<::glam::IVec2> { + let output: Val<::glam::IVec2> = ::glam::DVec2::as_ivec2(&_self).into(); + output + } + /// Casts all elements of `self` to `u16`. + fn as_u16vec2(_self: Ref<::glam::DVec2>) -> Val<::glam::U16Vec2> { + let output: Val<::glam::U16Vec2> = ::glam::DVec2::as_u16vec2(&_self).into(); + output + } + /// Casts all elements of `self` to `u64`. + fn as_u64vec2(_self: Ref<::glam::DVec2>) -> Val<::glam::U64Vec2> { + let output: Val<::glam::U64Vec2> = ::glam::DVec2::as_u64vec2(&_self).into(); + output + } + /// Casts all elements of `self` to `u8`. + fn as_u8vec2(_self: Ref<::glam::DVec2>) -> Val<::glam::U8Vec2> { + let output: Val<::glam::U8Vec2> = ::glam::DVec2::as_u8vec2(&_self).into(); + output + } + /// Casts all elements of `self` to `u32`. + fn as_uvec2(_self: Ref<::glam::DVec2>) -> Val<::glam::UVec2> { + let output: Val<::glam::UVec2> = ::glam::DVec2::as_uvec2(&_self).into(); + output + } + /// Casts all elements of `self` to `f32`. + fn as_vec2(_self: Ref<::glam::DVec2>) -> Val<::glam::Vec2> { + let output: Val<::glam::Vec2> = ::glam::DVec2::as_vec2(&_self).into(); + output + } + /// Returns a vector containing the smallest integer greater than or equal to a number for + /// each element of `self`. + fn ceil(_self: Val<::glam::DVec2>) -> Val<::glam::DVec2> { + let output: Val<::glam::DVec2> = ::glam::DVec2::ceil(_self.into_inner()).into(); + output + } + /// Component-wise clamping of values, similar to [`f64::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<::glam::DVec2>, + min: Val<::glam::DVec2>, + max: Val<::glam::DVec2>, + ) -> Val<::glam::DVec2> { + let output: Val<::glam::DVec2> = ::glam::DVec2::clamp( + _self.into_inner(), + min.into_inner(), + max.into_inner(), + ) + .into(); + output + } + /// Returns a vector with a length no less than `min` and no more than `max`. + /// # Panics + /// Will panic if `min` is greater than `max`, or if either `min` or `max` is negative, when `glam_assert` is enabled. + fn clamp_length( + _self: Val<::glam::DVec2>, + min: f64, + max: f64, + ) -> Val<::glam::DVec2> { + let output: Val<::glam::DVec2> = ::glam::DVec2::clamp_length( + _self.into_inner(), + min, + max, + ) + .into(); + output + } + /// Returns a vector with a length no more than `max`. + /// # Panics + /// Will panic if `max` is negative when `glam_assert` is enabled. + fn clamp_length_max(_self: Val<::glam::DVec2>, max: f64) -> Val<::glam::DVec2> { + let output: Val<::glam::DVec2> = ::glam::DVec2::clamp_length_max( + _self.into_inner(), + max, + ) + .into(); + output + } + /// Returns a vector with a length no less than `min`. + /// # Panics + /// Will panic if `min` is negative when `glam_assert` is enabled. + fn clamp_length_min(_self: Val<::glam::DVec2>, min: f64) -> Val<::glam::DVec2> { + let output: Val<::glam::DVec2> = ::glam::DVec2::clamp_length_min( + _self.into_inner(), + min, + ) + .into(); + output + } + fn clone(_self: Ref<::glam::DVec2>) -> Val<::glam::DVec2> { + let output: Val<::glam::DVec2> = <::glam::DVec2 as ::bevy_reflect::erased_serde::__private::serde::__private::Clone>::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<::glam::DVec2>, rhs: Val<::glam::DVec2>) -> Val<::glam::BVec2> { + let output: Val<::glam::BVec2> = ::glam::DVec2::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<::glam::DVec2>, rhs: Val<::glam::DVec2>) -> Val<::glam::BVec2> { + let output: Val<::glam::BVec2> = ::glam::DVec2::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<::glam::DVec2>, rhs: Val<::glam::DVec2>) -> Val<::glam::BVec2> { + let output: Val<::glam::BVec2> = ::glam::DVec2::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<::glam::DVec2>, rhs: Val<::glam::DVec2>) -> Val<::glam::BVec2> { + let output: Val<::glam::BVec2> = ::glam::DVec2::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<::glam::DVec2>, rhs: Val<::glam::DVec2>) -> Val<::glam::BVec2> { + let output: Val<::glam::BVec2> = ::glam::DVec2::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<::glam::DVec2>, rhs: Val<::glam::DVec2>) -> Val<::glam::BVec2> { + let output: Val<::glam::BVec2> = ::glam::DVec2::cmpne( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Returns a vector with signs of `rhs` and the magnitudes of `self`. + fn copysign( + _self: Val<::glam::DVec2>, + rhs: Val<::glam::DVec2>, + ) -> Val<::glam::DVec2> { + let output: Val<::glam::DVec2> = ::glam::DVec2::copysign( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Computes the Euclidean distance between two points in space. + fn distance(_self: Val<::glam::DVec2>, rhs: Val<::glam::DVec2>) -> f64 { + let output: f64 = ::glam::DVec2::distance(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + /// Compute the squared euclidean distance between two points in space. + fn distance_squared(_self: Val<::glam::DVec2>, rhs: Val<::glam::DVec2>) -> f64 { + let output: f64 = ::glam::DVec2::distance_squared( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + fn div(_self: Val<::glam::DVec2>, rhs: Ref<::glam::DVec2>) -> Val<::glam::DVec2> { + let output: Val<::glam::DVec2> = <::glam::DVec2 as ::core::ops::Div< + &::glam::DVec2, + >>::div(_self.into_inner(), &rhs) + .into(); + output + } + fn div(_self: Val<::glam::DVec2>, rhs: Val<::glam::DVec2>) -> Val<::glam::DVec2> { + let output: Val<::glam::DVec2> = <::glam::DVec2 as ::core::ops::Div< + ::glam::DVec2, + >>::div(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + fn div(_self: Val<::glam::DVec2>, rhs: f64) -> Val<::glam::DVec2> { + let output: Val<::glam::DVec2> = <::glam::DVec2 as ::core::ops::Div< + f64, + >>::div(_self.into_inner(), rhs) + .into(); + output + } + /// Returns the element-wise quotient of [Euclidean division] of `self` by `rhs`. + fn div_euclid( + _self: Val<::glam::DVec2>, + rhs: Val<::glam::DVec2>, + ) -> Val<::glam::DVec2> { + let output: Val<::glam::DVec2> = ::glam::DVec2::div_euclid( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Computes the dot product of `self` and `rhs`. + fn dot(_self: Val<::glam::DVec2>, rhs: Val<::glam::DVec2>) -> f64 { + let output: f64 = ::glam::DVec2::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<::glam::DVec2>, + rhs: Val<::glam::DVec2>, + ) -> Val<::glam::DVec2> { + let output: Val<::glam::DVec2> = ::glam::DVec2::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<::glam::DVec2>) -> f64 { + let output: f64 = ::glam::DVec2::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<::glam::DVec2>) -> f64 { + let output: f64 = ::glam::DVec2::element_sum(_self.into_inner()).into(); + output + } + fn eq(_self: Ref<::glam::DVec2>, other: Ref<::glam::DVec2>) -> bool { + let output: bool = <::glam::DVec2 as ::core::cmp::PartialEq< + ::glam::DVec2, + >>::eq(&_self, &other) + .into(); + output + } + /// Returns a vector containing `e^self` (the exponential function) for each element of + /// `self`. + fn exp(_self: Val<::glam::DVec2>) -> Val<::glam::DVec2> { + let output: Val<::glam::DVec2> = ::glam::DVec2::exp(_self.into_inner()).into(); + output + } + /// Creates a 3D vector from `self` and the given `z` value. + fn extend(_self: Val<::glam::DVec2>, z: f64) -> Val<::glam::DVec3> { + let output: Val<::glam::DVec3> = ::glam::DVec2::extend(_self.into_inner(), z) + .into(); + output + } + /// Returns a vector containing the largest integer less than or equal to a number for each + /// element of `self`. + fn floor(_self: Val<::glam::DVec2>) -> Val<::glam::DVec2> { + let output: Val<::glam::DVec2> = ::glam::DVec2::floor(_self.into_inner()).into(); + output + } + /// Returns a vector containing the fractional part of the vector as `self - self.trunc()`. + /// Note that this differs from the GLSL implementation of `fract` which returns + /// `self - self.floor()`. + /// Note that this is fast but not precise for large numbers. + fn fract(_self: Val<::glam::DVec2>) -> Val<::glam::DVec2> { + let output: Val<::glam::DVec2> = ::glam::DVec2::fract(_self.into_inner()).into(); + output + } + /// Returns a vector containing the fractional part of the vector as `self - self.floor()`. + /// Note that this differs from the Rust implementation of `fract` which returns + /// `self - self.trunc()`. + /// Note that this is fast but not precise for large numbers. + fn fract_gl(_self: Val<::glam::DVec2>) -> Val<::glam::DVec2> { + let output: Val<::glam::DVec2> = ::glam::DVec2::fract_gl(_self.into_inner()) + .into(); + output + } + /// Creates a 2D vector containing `[angle.cos(), angle.sin()]`. This can be used in + /// conjunction with the [`rotate()`][Self::rotate()] method, e.g. + /// `DVec2::from_angle(PI).rotate(DVec2::Y)` will create the vector `[-1, 0]` + /// and rotate [`DVec2::Y`] around it returning `-DVec2::Y`. + fn from_angle(angle: f64) -> Val<::glam::DVec2> { + let output: Val<::glam::DVec2> = ::glam::DVec2::from_angle(angle).into(); + output + } + /// Creates a new vector from an array. + fn from_array(a: [f64; 2]) -> Val<::glam::DVec2> { + let output: Val<::glam::DVec2> = ::glam::DVec2::from_array(a).into(); + output + } + /// Returns `true` if, and only if, all elements are finite. If any element is either + /// `NaN`, positive or negative infinity, this will return `false`. + fn is_finite(_self: Val<::glam::DVec2>) -> bool { + let output: bool = ::glam::DVec2::is_finite(_self.into_inner()).into(); + output + } + /// Performs `is_finite` on each element of self, returning a vector mask of the results. + /// In other words, this computes `[x.is_finite(), y.is_finite(), ...]`. + fn is_finite_mask(_self: Val<::glam::DVec2>) -> Val<::glam::BVec2> { + let output: Val<::glam::BVec2> = ::glam::DVec2::is_finite_mask( + _self.into_inner(), + ) + .into(); + output + } + /// Returns `true` if any elements are `NaN`. + fn is_nan(_self: Val<::glam::DVec2>) -> bool { + let output: bool = ::glam::DVec2::is_nan(_self.into_inner()).into(); + output + } + /// Performs `is_nan` on each element of self, returning a vector mask of the results. + /// In other words, this computes `[x.is_nan(), y.is_nan(), ...]`. + fn is_nan_mask(_self: Val<::glam::DVec2>) -> Val<::glam::BVec2> { + let output: Val<::glam::BVec2> = ::glam::DVec2::is_nan_mask(_self.into_inner()) + .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<::glam::DVec2>) -> u32 { + let output: u32 = ::glam::DVec2::is_negative_bitmask(_self.into_inner()).into(); + output + } + /// Returns whether `self` is length `1.0` or not. + /// Uses a precision threshold of approximately `1e-4`. + fn is_normalized(_self: Val<::glam::DVec2>) -> bool { + let output: bool = ::glam::DVec2::is_normalized(_self.into_inner()).into(); + output + } + /// Computes the length of `self`. + fn length(_self: Val<::glam::DVec2>) -> f64 { + let output: f64 = ::glam::DVec2::length(_self.into_inner()).into(); + output + } + /// Computes `1.0 / length()`. + /// For valid results, `self` must _not_ be of length zero. + fn length_recip(_self: Val<::glam::DVec2>) -> f64 { + let output: f64 = ::glam::DVec2::length_recip(_self.into_inner()).into(); + output + } + /// Computes the squared length of `self`. + /// This is faster than `length()` as it avoids a square root operation. + fn length_squared(_self: Val<::glam::DVec2>) -> f64 { + let output: f64 = ::glam::DVec2::length_squared(_self.into_inner()).into(); + output + } + /// Performs a linear interpolation between `self` and `rhs` based on the value `s`. + /// When `s` is `0.0`, the result will be equal to `self`. When `s` is `1.0`, the result + /// will be equal to `rhs`. When `s` is outside of range `[0, 1]`, the result is linearly + /// extrapolated. + fn lerp( + _self: Val<::glam::DVec2>, + rhs: Val<::glam::DVec2>, + s: f64, + ) -> Val<::glam::DVec2> { + let output: Val<::glam::DVec2> = ::glam::DVec2::lerp( + _self.into_inner(), + rhs.into_inner(), + s, + ) + .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<::glam::DVec2>, rhs: Val<::glam::DVec2>) -> Val<::glam::DVec2> { + let output: Val<::glam::DVec2> = ::glam::DVec2::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<::glam::DVec2>) -> f64 { + let output: f64 = ::glam::DVec2::max_element(_self.into_inner()).into(); + output + } + /// Calculates the midpoint between `self` and `rhs`. + /// The midpoint is the average of, or halfway point between, two vectors. + /// `a.midpoint(b)` should yield the same result as `a.lerp(b, 0.5)` + /// while being slightly cheaper to compute. + fn midpoint( + _self: Val<::glam::DVec2>, + rhs: Val<::glam::DVec2>, + ) -> Val<::glam::DVec2> { + let output: Val<::glam::DVec2> = ::glam::DVec2::midpoint( + _self.into_inner(), + rhs.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<::glam::DVec2>, rhs: Val<::glam::DVec2>) -> Val<::glam::DVec2> { + let output: Val<::glam::DVec2> = ::glam::DVec2::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<::glam::DVec2>) -> f64 { + let output: f64 = ::glam::DVec2::min_element(_self.into_inner()).into(); + output + } + /// Moves towards `rhs` based on the value `d`. + /// When `d` is `0.0`, the result will be equal to `self`. When `d` is equal to + /// `self.distance(rhs)`, the result will be equal to `rhs`. Will not go past `rhs`. + fn move_towards( + _self: Ref<::glam::DVec2>, + rhs: Val<::glam::DVec2>, + d: f64, + ) -> Val<::glam::DVec2> { + let output: Val<::glam::DVec2> = ::glam::DVec2::move_towards( + &_self, + rhs.into_inner(), + d, + ) + .into(); + output + } + fn mul(_self: Val<::glam::DVec2>, rhs: Ref<::glam::DVec2>) -> Val<::glam::DVec2> { + let output: Val<::glam::DVec2> = <::glam::DVec2 as ::core::ops::Mul< + &::glam::DVec2, + >>::mul(_self.into_inner(), &rhs) + .into(); + output + } + fn mul(_self: Val<::glam::DVec2>, rhs: Val<::glam::DVec2>) -> Val<::glam::DVec2> { + let output: Val<::glam::DVec2> = <::glam::DVec2 as ::core::ops::Mul< + ::glam::DVec2, + >>::mul(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + fn mul(_self: Val<::glam::DVec2>, rhs: f64) -> Val<::glam::DVec2> { + let output: Val<::glam::DVec2> = <::glam::DVec2 as ::core::ops::Mul< + f64, + >>::mul(_self.into_inner(), rhs) + .into(); + output + } + /// Fused multiply-add. Computes `(self * a) + b` element-wise with only one rounding + /// error, yielding a more accurate result than an unfused multiply-add. + /// Using `mul_add` *may* be more performant than an unfused multiply-add if the target + /// architecture has a dedicated fma CPU instruction. However, this is not always true, + /// and will be heavily dependant on designing algorithms with specific target hardware in + /// mind. + fn mul_add( + _self: Val<::glam::DVec2>, + a: Val<::glam::DVec2>, + b: Val<::glam::DVec2>, + ) -> Val<::glam::DVec2> { + let output: Val<::glam::DVec2> = ::glam::DVec2::mul_add( + _self.into_inner(), + a.into_inner(), + b.into_inner(), + ) + .into(); + output + } + fn neg(_self: Val<::glam::DVec2>) -> Val<::glam::DVec2> { + let output: Val<::glam::DVec2> = <::glam::DVec2 as ::core::ops::Neg>::neg( + _self.into_inner(), + ) + .into(); + output + } + /// Creates a new vector. + fn new(x: f64, y: f64) -> Val<::glam::DVec2> { + let output: Val<::glam::DVec2> = ::glam::DVec2::new(x, y).into(); + output + } + /// Returns `self` normalized to length 1.0. + /// For valid results, `self` must be finite and _not_ of length zero, nor very close to zero. + /// See also [`Self::try_normalize()`] and [`Self::normalize_or_zero()`]. + /// Panics + /// Will panic if the resulting normalized vector is not finite when `glam_assert` is enabled. + fn normalize(_self: Val<::glam::DVec2>) -> Val<::glam::DVec2> { + let output: Val<::glam::DVec2> = ::glam::DVec2::normalize(_self.into_inner()) + .into(); + output + } + /// Returns `self` normalized to length 1.0 if possible, else returns a + /// fallback value. + /// In particular, if the input is zero (or very close to zero), or non-finite, + /// the result of this operation will be the fallback value. + /// See also [`Self::try_normalize()`]. + fn normalize_or( + _self: Val<::glam::DVec2>, + fallback: Val<::glam::DVec2>, + ) -> Val<::glam::DVec2> { + let output: Val<::glam::DVec2> = ::glam::DVec2::normalize_or( + _self.into_inner(), + fallback.into_inner(), + ) + .into(); + output + } + /// Returns `self` normalized to length 1.0 if possible, else returns zero. + /// In particular, if the input is zero (or very close to zero), or non-finite, + /// the result of this operation will be zero. + /// See also [`Self::try_normalize()`]. + fn normalize_or_zero(_self: Val<::glam::DVec2>) -> Val<::glam::DVec2> { + let output: Val<::glam::DVec2> = ::glam::DVec2::normalize_or_zero( + _self.into_inner(), + ) + .into(); + output + } + /// Returns a vector that is equal to `self` rotated by 90 degrees. + fn perp(_self: Val<::glam::DVec2>) -> Val<::glam::DVec2> { + let output: Val<::glam::DVec2> = ::glam::DVec2::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<::glam::DVec2>, rhs: Val<::glam::DVec2>) -> f64 { + let output: f64 = ::glam::DVec2::perp_dot(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + /// Returns a vector containing each element of `self` raised to the power of `n`. + fn powf(_self: Val<::glam::DVec2>, n: f64) -> Val<::glam::DVec2> { + let output: Val<::glam::DVec2> = ::glam::DVec2::powf(_self.into_inner(), n) + .into(); + output + } + /// Returns the vector projection of `self` onto `rhs`. + /// `rhs` must be of non-zero length. + /// # Panics + /// Will panic if `rhs` is zero length when `glam_assert` is enabled. + fn project_onto( + _self: Val<::glam::DVec2>, + rhs: Val<::glam::DVec2>, + ) -> Val<::glam::DVec2> { + let output: Val<::glam::DVec2> = ::glam::DVec2::project_onto( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Returns the vector projection of `self` onto `rhs`. + /// `rhs` must be normalized. + /// # Panics + /// Will panic if `rhs` is not normalized when `glam_assert` is enabled. + fn project_onto_normalized( + _self: Val<::glam::DVec2>, + rhs: Val<::glam::DVec2>, + ) -> Val<::glam::DVec2> { + let output: Val<::glam::DVec2> = ::glam::DVec2::project_onto_normalized( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Returns a vector containing the reciprocal `1.0/n` of each element of `self`. + fn recip(_self: Val<::glam::DVec2>) -> Val<::glam::DVec2> { + let output: Val<::glam::DVec2> = ::glam::DVec2::recip(_self.into_inner()).into(); + output + } + /// Returns the reflection vector for a given incident vector `self` and surface normal + /// `normal`. + /// `normal` must be normalized. + /// # Panics + /// Will panic if `normal` is not normalized when `glam_assert` is enabled. + fn reflect( + _self: Val<::glam::DVec2>, + normal: Val<::glam::DVec2>, + ) -> Val<::glam::DVec2> { + let output: Val<::glam::DVec2> = ::glam::DVec2::reflect( + _self.into_inner(), + normal.into_inner(), + ) + .into(); + output + } + /// Returns the refraction direction for a given incident vector `self`, surface normal + /// `normal` and ratio of indices of refraction, `eta`. When total internal reflection occurs, + /// a zero vector will be returned. + /// `self` and `normal` must be normalized. + /// # Panics + /// Will panic if `self` or `normal` is not normalized when `glam_assert` is enabled. + fn refract( + _self: Val<::glam::DVec2>, + normal: Val<::glam::DVec2>, + eta: f64, + ) -> Val<::glam::DVec2> { + let output: Val<::glam::DVec2> = ::glam::DVec2::refract( + _self.into_inner(), + normal.into_inner(), + eta, + ) + .into(); + output + } + /// Returns the vector rejection of `self` from `rhs`. + /// The vector rejection is the vector perpendicular to the projection of `self` onto + /// `rhs`, in rhs words the result of `self - self.project_onto(rhs)`. + /// `rhs` must be of non-zero length. + /// # Panics + /// Will panic if `rhs` has a length of zero when `glam_assert` is enabled. + fn reject_from( + _self: Val<::glam::DVec2>, + rhs: Val<::glam::DVec2>, + ) -> Val<::glam::DVec2> { + let output: Val<::glam::DVec2> = ::glam::DVec2::reject_from( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Returns the vector rejection of `self` from `rhs`. + /// The vector rejection is the vector perpendicular to the projection of `self` onto + /// `rhs`, in rhs words the result of `self - self.project_onto(rhs)`. + /// `rhs` must be normalized. + /// # Panics + /// Will panic if `rhs` is not normalized when `glam_assert` is enabled. + fn reject_from_normalized( + _self: Val<::glam::DVec2>, + rhs: Val<::glam::DVec2>, + ) -> Val<::glam::DVec2> { + let output: Val<::glam::DVec2> = ::glam::DVec2::reject_from_normalized( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + fn rem(_self: Val<::glam::DVec2>, rhs: Ref<::glam::DVec2>) -> Val<::glam::DVec2> { + let output: Val<::glam::DVec2> = <::glam::DVec2 as ::core::ops::Rem< + &::glam::DVec2, + >>::rem(_self.into_inner(), &rhs) + .into(); + output + } + fn rem(_self: Val<::glam::DVec2>, rhs: Val<::glam::DVec2>) -> Val<::glam::DVec2> { + let output: Val<::glam::DVec2> = <::glam::DVec2 as ::core::ops::Rem< + ::glam::DVec2, + >>::rem(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + fn rem(_self: Val<::glam::DVec2>, rhs: f64) -> Val<::glam::DVec2> { + let output: Val<::glam::DVec2> = <::glam::DVec2 as ::core::ops::Rem< + f64, + >>::rem(_self.into_inner(), rhs) + .into(); + output + } + /// Returns the element-wise remainder of [Euclidean division] of `self` by `rhs`. + /// [Euclidean division]: f64::rem_euclid + fn rem_euclid( + _self: Val<::glam::DVec2>, + rhs: Val<::glam::DVec2>, + ) -> Val<::glam::DVec2> { + let output: Val<::glam::DVec2> = ::glam::DVec2::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<::glam::DVec2>, rhs: Val<::glam::DVec2>) -> Val<::glam::DVec2> { + let output: Val<::glam::DVec2> = ::glam::DVec2::rotate( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Rotates towards `rhs` up to `max_angle` (in radians). + /// When `max_angle` is `0.0`, the result will be equal to `self`. When `max_angle` is equal to + /// `self.angle_between(rhs)`, the result will be equal to `rhs`. If `max_angle` is negative, + /// rotates towards the exact opposite of `rhs`. Will not go past the target. + fn rotate_towards( + _self: Ref<::glam::DVec2>, + rhs: Val<::glam::DVec2>, + max_angle: f64, + ) -> Val<::glam::DVec2> { + let output: Val<::glam::DVec2> = ::glam::DVec2::rotate_towards( + &_self, + rhs.into_inner(), + max_angle, + ) + .into(); + output + } + /// Returns a vector containing the nearest integer to a number for each element of `self`. + /// Round half-way cases away from 0.0. + fn round(_self: Val<::glam::DVec2>) -> Val<::glam::DVec2> { + let output: Val<::glam::DVec2> = ::glam::DVec2::round(_self.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<::glam::BVec2>, + if_true: Val<::glam::DVec2>, + if_false: Val<::glam::DVec2>, + ) -> Val<::glam::DVec2> { + let output: Val<::glam::DVec2> = ::glam::DVec2::select( + mask.into_inner(), + if_true.into_inner(), + if_false.into_inner(), + ) + .into(); + output + } + /// Returns a vector with elements representing the sign of `self`. + /// - `1.0` if the number is positive, `+0.0` or `INFINITY` + /// - `-1.0` if the number is negative, `-0.0` or `NEG_INFINITY` + /// - `NAN` if the number is `NAN` + fn signum(_self: Val<::glam::DVec2>) -> Val<::glam::DVec2> { + let output: Val<::glam::DVec2> = ::glam::DVec2::signum(_self.into_inner()) + .into(); + output + } + /// Creates a vector with all elements set to `v`. + fn splat(v: f64) -> Val<::glam::DVec2> { + let output: Val<::glam::DVec2> = ::glam::DVec2::splat(v).into(); + output + } + fn sub(_self: Val<::glam::DVec2>, rhs: Ref<::glam::DVec2>) -> Val<::glam::DVec2> { + let output: Val<::glam::DVec2> = <::glam::DVec2 as ::core::ops::Sub< + &::glam::DVec2, + >>::sub(_self.into_inner(), &rhs) + .into(); + output + } + fn sub(_self: Val<::glam::DVec2>, rhs: Val<::glam::DVec2>) -> Val<::glam::DVec2> { + let output: Val<::glam::DVec2> = <::glam::DVec2 as ::core::ops::Sub< + ::glam::DVec2, + >>::sub(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + fn sub(_self: Val<::glam::DVec2>, rhs: f64) -> Val<::glam::DVec2> { + let output: Val<::glam::DVec2> = <::glam::DVec2 as ::core::ops::Sub< + f64, + >>::sub(_self.into_inner(), rhs) + .into(); + output + } + /// Returns the angle (in radians) of this vector in the range `[-π, +π]`. + /// The input does not need to be a unit vector however it must be non-zero. + fn to_angle(_self: Val<::glam::DVec2>) -> f64 { + let output: f64 = ::glam::DVec2::to_angle(_self.into_inner()).into(); + output + } + /// `[x, y]` + fn to_array(_self: Ref<::glam::DVec2>) -> [f64; 2] { + let output: [f64; 2] = ::glam::DVec2::to_array(&_self).into(); + output + } + /// Returns a vector containing the integer part each element of `self`. This means numbers are + /// always truncated towards zero. + fn trunc(_self: Val<::glam::DVec2>) -> Val<::glam::DVec2> { + let output: Val<::glam::DVec2> = ::glam::DVec2::trunc(_self.into_inner()).into(); + output + } + /// Creates a 2D vector from `self` with the given value of `x`. + fn with_x(_self: Val<::glam::DVec2>, x: f64) -> Val<::glam::DVec2> { + let output: Val<::glam::DVec2> = ::glam::DVec2::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<::glam::DVec2>, y: f64) -> Val<::glam::DVec2> { + let output: Val<::glam::DVec2> = ::glam::DVec2::with_y(_self.into_inner(), y) + .into(); + output + } +} +#[script_bindings( + remote, + name = "d_vec_3_functions", + bms_core_path = "bevy_mod_scripting_core", + generated +)] +impl ::glam::DVec3 { + /// Returns a vector containing the absolute value of each element of `self`. + fn abs(_self: Val<::glam::DVec3>) -> Val<::glam::DVec3> { + let output: Val<::glam::DVec3> = ::glam::DVec3::abs(_self.into_inner()).into(); + output + } + /// Returns true if the absolute difference of all elements between `self` and `rhs` is + /// less than or equal to `max_abs_diff`. + /// This can be used to compare if two vectors contain similar elements. It works best when + /// comparing with a known value. The `max_abs_diff` that should be used used depends on + /// the values being compared against. + /// For more see + /// [comparing floating point numbers](https://randomascii.wordpress.com/2012/02/25/comparing-floating-point-numbers-2012-edition/). + fn abs_diff_eq( + _self: Val<::glam::DVec3>, + rhs: Val<::glam::DVec3>, + max_abs_diff: f64, + ) -> bool { + let output: bool = ::glam::DVec3::abs_diff_eq( + _self.into_inner(), + rhs.into_inner(), + max_abs_diff, + ) + .into(); + output + } + fn add(_self: Val<::glam::DVec3>, rhs: Ref<::glam::DVec3>) -> Val<::glam::DVec3> { + let output: Val<::glam::DVec3> = <::glam::DVec3 as ::core::ops::Add< + &::glam::DVec3, + >>::add(_self.into_inner(), &rhs) + .into(); + output + } + fn add(_self: Val<::glam::DVec3>, rhs: Val<::glam::DVec3>) -> Val<::glam::DVec3> { + let output: Val<::glam::DVec3> = <::glam::DVec3 as ::core::ops::Add< + ::glam::DVec3, + >>::add(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + fn add(_self: Val<::glam::DVec3>, rhs: f64) -> Val<::glam::DVec3> { + let output: Val<::glam::DVec3> = <::glam::DVec3 as ::core::ops::Add< + f64, + >>::add(_self.into_inner(), rhs) + .into(); + output + } + /// Returns the angle (in radians) between two vectors in the range `[0, +π]`. + /// The inputs do not need to be unit vectors however they must be non-zero. + fn angle_between(_self: Val<::glam::DVec3>, rhs: Val<::glam::DVec3>) -> f64 { + let output: f64 = ::glam::DVec3::angle_between( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Returns some vector that is orthogonal to the given one. + /// The input vector must be finite and non-zero. + /// The output vector is not necessarily unit length. For that use + /// [`Self::any_orthonormal_vector()`] instead. + fn any_orthogonal_vector(_self: Ref<::glam::DVec3>) -> Val<::glam::DVec3> { + let output: Val<::glam::DVec3> = ::glam::DVec3::any_orthogonal_vector(&_self) + .into(); + output + } + /// Returns any unit vector that is orthogonal to the given one. + /// The input vector must be unit length. + /// # Panics + /// Will panic if `self` is not normalized when `glam_assert` is enabled. + fn any_orthonormal_vector(_self: Ref<::glam::DVec3>) -> Val<::glam::DVec3> { + let output: Val<::glam::DVec3> = ::glam::DVec3::any_orthonormal_vector(&_self) + .into(); + output + } + /// Casts all elements of `self` to `i16`. + fn as_i16vec3(_self: Ref<::glam::DVec3>) -> Val<::glam::I16Vec3> { + let output: Val<::glam::I16Vec3> = ::glam::DVec3::as_i16vec3(&_self).into(); + output + } + /// Casts all elements of `self` to `i64`. + fn as_i64vec3(_self: Ref<::glam::DVec3>) -> Val<::glam::I64Vec3> { + let output: Val<::glam::I64Vec3> = ::glam::DVec3::as_i64vec3(&_self).into(); + output + } + /// Casts all elements of `self` to `i8`. + fn as_i8vec3(_self: Ref<::glam::DVec3>) -> Val<::glam::I8Vec3> { + let output: Val<::glam::I8Vec3> = ::glam::DVec3::as_i8vec3(&_self).into(); + output + } + /// Casts all elements of `self` to `i32`. + fn as_ivec3(_self: Ref<::glam::DVec3>) -> Val<::glam::IVec3> { + let output: Val<::glam::IVec3> = ::glam::DVec3::as_ivec3(&_self).into(); + output + } + /// Casts all elements of `self` to `u16`. + fn as_u16vec3(_self: Ref<::glam::DVec3>) -> Val<::glam::U16Vec3> { + let output: Val<::glam::U16Vec3> = ::glam::DVec3::as_u16vec3(&_self).into(); + output + } + /// Casts all elements of `self` to `u64`. + fn as_u64vec3(_self: Ref<::glam::DVec3>) -> Val<::glam::U64Vec3> { + let output: Val<::glam::U64Vec3> = ::glam::DVec3::as_u64vec3(&_self).into(); + output + } + /// Casts all elements of `self` to `u8`. + fn as_u8vec3(_self: Ref<::glam::DVec3>) -> Val<::glam::U8Vec3> { + let output: Val<::glam::U8Vec3> = ::glam::DVec3::as_u8vec3(&_self).into(); + output + } + /// Casts all elements of `self` to `u32`. + fn as_uvec3(_self: Ref<::glam::DVec3>) -> Val<::glam::UVec3> { + let output: Val<::glam::UVec3> = ::glam::DVec3::as_uvec3(&_self).into(); + output + } + /// Casts all elements of `self` to `f32`. + fn as_vec3(_self: Ref<::glam::DVec3>) -> Val<::glam::Vec3> { + let output: Val<::glam::Vec3> = ::glam::DVec3::as_vec3(&_self).into(); + output + } + /// Casts all elements of `self` to `f32`. + fn as_vec3a(_self: Ref<::glam::DVec3>) -> Val<::glam::Vec3A> { + let output: Val<::glam::Vec3A> = ::glam::DVec3::as_vec3a(&_self).into(); + output + } + /// Returns a vector containing the smallest integer greater than or equal to a number for + /// each element of `self`. + fn ceil(_self: Val<::glam::DVec3>) -> Val<::glam::DVec3> { + let output: Val<::glam::DVec3> = ::glam::DVec3::ceil(_self.into_inner()).into(); + output + } + /// Component-wise clamping of values, similar to [`f64::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<::glam::DVec3>, + min: Val<::glam::DVec3>, + max: Val<::glam::DVec3>, + ) -> Val<::glam::DVec3> { + let output: Val<::glam::DVec3> = ::glam::DVec3::clamp( + _self.into_inner(), + min.into_inner(), + max.into_inner(), + ) + .into(); + output + } + /// Returns a vector with a length no less than `min` and no more than `max`. + /// # Panics + /// Will panic if `min` is greater than `max`, or if either `min` or `max` is negative, when `glam_assert` is enabled. + fn clamp_length( + _self: Val<::glam::DVec3>, + min: f64, + max: f64, + ) -> Val<::glam::DVec3> { + let output: Val<::glam::DVec3> = ::glam::DVec3::clamp_length( + _self.into_inner(), + min, + max, + ) + .into(); + output + } + /// Returns a vector with a length no more than `max`. + /// # Panics + /// Will panic if `max` is negative when `glam_assert` is enabled. + fn clamp_length_max(_self: Val<::glam::DVec3>, max: f64) -> Val<::glam::DVec3> { + let output: Val<::glam::DVec3> = ::glam::DVec3::clamp_length_max( + _self.into_inner(), + max, + ) + .into(); + output + } + /// Returns a vector with a length no less than `min`. + /// # Panics + /// Will panic if `min` is negative when `glam_assert` is enabled. + fn clamp_length_min(_self: Val<::glam::DVec3>, min: f64) -> Val<::glam::DVec3> { + let output: Val<::glam::DVec3> = ::glam::DVec3::clamp_length_min( + _self.into_inner(), + min, + ) + .into(); + output + } + fn clone(_self: Ref<::glam::DVec3>) -> Val<::glam::DVec3> { + let output: Val<::glam::DVec3> = <::glam::DVec3 as ::bevy_reflect::erased_serde::__private::serde::__private::Clone>::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<::glam::DVec3>, rhs: Val<::glam::DVec3>) -> Val<::glam::BVec3> { + let output: Val<::glam::BVec3> = ::glam::DVec3::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<::glam::DVec3>, rhs: Val<::glam::DVec3>) -> Val<::glam::BVec3> { + let output: Val<::glam::BVec3> = ::glam::DVec3::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<::glam::DVec3>, rhs: Val<::glam::DVec3>) -> Val<::glam::BVec3> { + let output: Val<::glam::BVec3> = ::glam::DVec3::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<::glam::DVec3>, rhs: Val<::glam::DVec3>) -> Val<::glam::BVec3> { + let output: Val<::glam::BVec3> = ::glam::DVec3::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<::glam::DVec3>, rhs: Val<::glam::DVec3>) -> Val<::glam::BVec3> { + let output: Val<::glam::BVec3> = ::glam::DVec3::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<::glam::DVec3>, rhs: Val<::glam::DVec3>) -> Val<::glam::BVec3> { + let output: Val<::glam::BVec3> = ::glam::DVec3::cmpne( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Returns a vector with signs of `rhs` and the magnitudes of `self`. + fn copysign( + _self: Val<::glam::DVec3>, + rhs: Val<::glam::DVec3>, + ) -> Val<::glam::DVec3> { + let output: Val<::glam::DVec3> = ::glam::DVec3::copysign( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Computes the cross product of `self` and `rhs`. + fn cross(_self: Val<::glam::DVec3>, rhs: Val<::glam::DVec3>) -> Val<::glam::DVec3> { + let output: Val<::glam::DVec3> = ::glam::DVec3::cross( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Computes the Euclidean distance between two points in space. + fn distance(_self: Val<::glam::DVec3>, rhs: Val<::glam::DVec3>) -> f64 { + let output: f64 = ::glam::DVec3::distance(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + /// Compute the squared euclidean distance between two points in space. + fn distance_squared(_self: Val<::glam::DVec3>, rhs: Val<::glam::DVec3>) -> f64 { + let output: f64 = ::glam::DVec3::distance_squared( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + fn div(_self: Val<::glam::DVec3>, rhs: Ref<::glam::DVec3>) -> Val<::glam::DVec3> { + let output: Val<::glam::DVec3> = <::glam::DVec3 as ::core::ops::Div< + &::glam::DVec3, + >>::div(_self.into_inner(), &rhs) + .into(); + output + } + fn div(_self: Val<::glam::DVec3>, rhs: Val<::glam::DVec3>) -> Val<::glam::DVec3> { + let output: Val<::glam::DVec3> = <::glam::DVec3 as ::core::ops::Div< + ::glam::DVec3, + >>::div(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + fn div(_self: Val<::glam::DVec3>, rhs: f64) -> Val<::glam::DVec3> { + let output: Val<::glam::DVec3> = <::glam::DVec3 as ::core::ops::Div< + f64, + >>::div(_self.into_inner(), rhs) + .into(); + output + } + /// Returns the element-wise quotient of [Euclidean division] of `self` by `rhs`. + fn div_euclid( + _self: Val<::glam::DVec3>, + rhs: Val<::glam::DVec3>, + ) -> Val<::glam::DVec3> { + let output: Val<::glam::DVec3> = ::glam::DVec3::div_euclid( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Computes the dot product of `self` and `rhs`. + fn dot(_self: Val<::glam::DVec3>, rhs: Val<::glam::DVec3>) -> f64 { + let output: f64 = ::glam::DVec3::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<::glam::DVec3>, + rhs: Val<::glam::DVec3>, + ) -> Val<::glam::DVec3> { + let output: Val<::glam::DVec3> = ::glam::DVec3::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<::glam::DVec3>) -> f64 { + let output: f64 = ::glam::DVec3::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<::glam::DVec3>) -> f64 { + let output: f64 = ::glam::DVec3::element_sum(_self.into_inner()).into(); + output + } + fn eq(_self: Ref<::glam::DVec3>, other: Ref<::glam::DVec3>) -> bool { + let output: bool = <::glam::DVec3 as ::core::cmp::PartialEq< + ::glam::DVec3, + >>::eq(&_self, &other) + .into(); + output + } + /// Returns a vector containing `e^self` (the exponential function) for each element of + /// `self`. + fn exp(_self: Val<::glam::DVec3>) -> Val<::glam::DVec3> { + let output: Val<::glam::DVec3> = ::glam::DVec3::exp(_self.into_inner()).into(); + output + } + /// Creates a 4D vector from `self` and the given `w` value. + fn extend(_self: Val<::glam::DVec3>, w: f64) -> Val<::glam::DVec4> { + let output: Val<::glam::DVec4> = ::glam::DVec3::extend(_self.into_inner(), w) + .into(); + output + } + /// Returns a vector containing the largest integer less than or equal to a number for each + /// element of `self`. + fn floor(_self: Val<::glam::DVec3>) -> Val<::glam::DVec3> { + let output: Val<::glam::DVec3> = ::glam::DVec3::floor(_self.into_inner()).into(); + output + } + /// Returns a vector containing the fractional part of the vector as `self - self.trunc()`. + /// Note that this differs from the GLSL implementation of `fract` which returns + /// `self - self.floor()`. + /// Note that this is fast but not precise for large numbers. + fn fract(_self: Val<::glam::DVec3>) -> Val<::glam::DVec3> { + let output: Val<::glam::DVec3> = ::glam::DVec3::fract(_self.into_inner()).into(); + output + } + /// Returns a vector containing the fractional part of the vector as `self - self.floor()`. + /// Note that this differs from the Rust implementation of `fract` which returns + /// `self - self.trunc()`. + /// Note that this is fast but not precise for large numbers. + fn fract_gl(_self: Val<::glam::DVec3>) -> Val<::glam::DVec3> { + let output: Val<::glam::DVec3> = ::glam::DVec3::fract_gl(_self.into_inner()) + .into(); + output + } + /// Creates a new vector from an array. + fn from_array(a: [f64; 3]) -> Val<::glam::DVec3> { + let output: Val<::glam::DVec3> = ::glam::DVec3::from_array(a).into(); + output + } + /// Returns `true` if, and only if, all elements are finite. If any element is either + /// `NaN`, positive or negative infinity, this will return `false`. + fn is_finite(_self: Val<::glam::DVec3>) -> bool { + let output: bool = ::glam::DVec3::is_finite(_self.into_inner()).into(); + output + } + /// Performs `is_finite` on each element of self, returning a vector mask of the results. + /// In other words, this computes `[x.is_finite(), y.is_finite(), ...]`. + fn is_finite_mask(_self: Val<::glam::DVec3>) -> Val<::glam::BVec3> { + let output: Val<::glam::BVec3> = ::glam::DVec3::is_finite_mask( + _self.into_inner(), + ) + .into(); + output + } + /// Returns `true` if any elements are `NaN`. + fn is_nan(_self: Val<::glam::DVec3>) -> bool { + let output: bool = ::glam::DVec3::is_nan(_self.into_inner()).into(); + output + } + /// Performs `is_nan` on each element of self, returning a vector mask of the results. + /// In other words, this computes `[x.is_nan(), y.is_nan(), ...]`. + fn is_nan_mask(_self: Val<::glam::DVec3>) -> Val<::glam::BVec3> { + let output: Val<::glam::BVec3> = ::glam::DVec3::is_nan_mask(_self.into_inner()) + .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<::glam::DVec3>) -> u32 { + let output: u32 = ::glam::DVec3::is_negative_bitmask(_self.into_inner()).into(); + output + } + /// Returns whether `self` is length `1.0` or not. + /// Uses a precision threshold of approximately `1e-4`. + fn is_normalized(_self: Val<::glam::DVec3>) -> bool { + let output: bool = ::glam::DVec3::is_normalized(_self.into_inner()).into(); + output + } + /// Computes the length of `self`. + fn length(_self: Val<::glam::DVec3>) -> f64 { + let output: f64 = ::glam::DVec3::length(_self.into_inner()).into(); + output + } + /// Computes `1.0 / length()`. + /// For valid results, `self` must _not_ be of length zero. + fn length_recip(_self: Val<::glam::DVec3>) -> f64 { + let output: f64 = ::glam::DVec3::length_recip(_self.into_inner()).into(); + output + } + /// Computes the squared length of `self`. + /// This is faster than `length()` as it avoids a square root operation. + fn length_squared(_self: Val<::glam::DVec3>) -> f64 { + let output: f64 = ::glam::DVec3::length_squared(_self.into_inner()).into(); + output + } + /// Performs a linear interpolation between `self` and `rhs` based on the value `s`. + /// When `s` is `0.0`, the result will be equal to `self`. When `s` is `1.0`, the result + /// will be equal to `rhs`. When `s` is outside of range `[0, 1]`, the result is linearly + /// extrapolated. + fn lerp( + _self: Val<::glam::DVec3>, + rhs: Val<::glam::DVec3>, + s: f64, + ) -> Val<::glam::DVec3> { + let output: Val<::glam::DVec3> = ::glam::DVec3::lerp( + _self.into_inner(), + rhs.into_inner(), + s, + ) + .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<::glam::DVec3>, rhs: Val<::glam::DVec3>) -> Val<::glam::DVec3> { + let output: Val<::glam::DVec3> = ::glam::DVec3::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<::glam::DVec3>) -> f64 { + let output: f64 = ::glam::DVec3::max_element(_self.into_inner()).into(); + output + } + /// Calculates the midpoint between `self` and `rhs`. + /// The midpoint is the average of, or halfway point between, two vectors. + /// `a.midpoint(b)` should yield the same result as `a.lerp(b, 0.5)` + /// while being slightly cheaper to compute. + fn midpoint( + _self: Val<::glam::DVec3>, + rhs: Val<::glam::DVec3>, + ) -> Val<::glam::DVec3> { + let output: Val<::glam::DVec3> = ::glam::DVec3::midpoint( + _self.into_inner(), + rhs.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<::glam::DVec3>, rhs: Val<::glam::DVec3>) -> Val<::glam::DVec3> { + let output: Val<::glam::DVec3> = ::glam::DVec3::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<::glam::DVec3>) -> f64 { + let output: f64 = ::glam::DVec3::min_element(_self.into_inner()).into(); + output + } + /// Moves towards `rhs` based on the value `d`. + /// When `d` is `0.0`, the result will be equal to `self`. When `d` is equal to + /// `self.distance(rhs)`, the result will be equal to `rhs`. Will not go past `rhs`. + fn move_towards( + _self: Ref<::glam::DVec3>, + rhs: Val<::glam::DVec3>, + d: f64, + ) -> Val<::glam::DVec3> { + let output: Val<::glam::DVec3> = ::glam::DVec3::move_towards( + &_self, + rhs.into_inner(), + d, + ) + .into(); + output + } + fn mul(_self: Val<::glam::DVec3>, rhs: Ref<::glam::DVec3>) -> Val<::glam::DVec3> { + let output: Val<::glam::DVec3> = <::glam::DVec3 as ::core::ops::Mul< + &::glam::DVec3, + >>::mul(_self.into_inner(), &rhs) + .into(); + output + } + fn mul(_self: Val<::glam::DVec3>, rhs: Val<::glam::DVec3>) -> Val<::glam::DVec3> { + let output: Val<::glam::DVec3> = <::glam::DVec3 as ::core::ops::Mul< + ::glam::DVec3, + >>::mul(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + fn mul(_self: Val<::glam::DVec3>, rhs: f64) -> Val<::glam::DVec3> { + let output: Val<::glam::DVec3> = <::glam::DVec3 as ::core::ops::Mul< + f64, + >>::mul(_self.into_inner(), rhs) + .into(); + output + } + /// Fused multiply-add. Computes `(self * a) + b` element-wise with only one rounding + /// error, yielding a more accurate result than an unfused multiply-add. + /// Using `mul_add` *may* be more performant than an unfused multiply-add if the target + /// architecture has a dedicated fma CPU instruction. However, this is not always true, + /// and will be heavily dependant on designing algorithms with specific target hardware in + /// mind. + fn mul_add( + _self: Val<::glam::DVec3>, + a: Val<::glam::DVec3>, + b: Val<::glam::DVec3>, + ) -> Val<::glam::DVec3> { + let output: Val<::glam::DVec3> = ::glam::DVec3::mul_add( + _self.into_inner(), + a.into_inner(), + b.into_inner(), + ) + .into(); + output + } + fn neg(_self: Val<::glam::DVec3>) -> Val<::glam::DVec3> { + let output: Val<::glam::DVec3> = <::glam::DVec3 as ::core::ops::Neg>::neg( + _self.into_inner(), + ) + .into(); + output + } + /// Creates a new vector. + fn new(x: f64, y: f64, z: f64) -> Val<::glam::DVec3> { + let output: Val<::glam::DVec3> = ::glam::DVec3::new(x, y, z).into(); + output + } + /// Returns `self` normalized to length 1.0. + /// For valid results, `self` must be finite and _not_ of length zero, nor very close to zero. + /// See also [`Self::try_normalize()`] and [`Self::normalize_or_zero()`]. + /// Panics + /// Will panic if the resulting normalized vector is not finite when `glam_assert` is enabled. + fn normalize(_self: Val<::glam::DVec3>) -> Val<::glam::DVec3> { + let output: Val<::glam::DVec3> = ::glam::DVec3::normalize(_self.into_inner()) + .into(); + output + } + /// Returns `self` normalized to length 1.0 if possible, else returns a + /// fallback value. + /// In particular, if the input is zero (or very close to zero), or non-finite, + /// the result of this operation will be the fallback value. + /// See also [`Self::try_normalize()`]. + fn normalize_or( + _self: Val<::glam::DVec3>, + fallback: Val<::glam::DVec3>, + ) -> Val<::glam::DVec3> { + let output: Val<::glam::DVec3> = ::glam::DVec3::normalize_or( + _self.into_inner(), + fallback.into_inner(), + ) + .into(); + output + } + /// Returns `self` normalized to length 1.0 if possible, else returns zero. + /// In particular, if the input is zero (or very close to zero), or non-finite, + /// the result of this operation will be zero. + /// See also [`Self::try_normalize()`]. + fn normalize_or_zero(_self: Val<::glam::DVec3>) -> Val<::glam::DVec3> { + let output: Val<::glam::DVec3> = ::glam::DVec3::normalize_or_zero( + _self.into_inner(), + ) + .into(); + output + } + /// Returns a vector containing each element of `self` raised to the power of `n`. + fn powf(_self: Val<::glam::DVec3>, n: f64) -> Val<::glam::DVec3> { + let output: Val<::glam::DVec3> = ::glam::DVec3::powf(_self.into_inner(), n) + .into(); + output + } + /// Returns the vector projection of `self` onto `rhs`. + /// `rhs` must be of non-zero length. + /// # Panics + /// Will panic if `rhs` is zero length when `glam_assert` is enabled. + fn project_onto( + _self: Val<::glam::DVec3>, + rhs: Val<::glam::DVec3>, + ) -> Val<::glam::DVec3> { + let output: Val<::glam::DVec3> = ::glam::DVec3::project_onto( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Returns the vector projection of `self` onto `rhs`. + /// `rhs` must be normalized. + /// # Panics + /// Will panic if `rhs` is not normalized when `glam_assert` is enabled. + fn project_onto_normalized( + _self: Val<::glam::DVec3>, + rhs: Val<::glam::DVec3>, + ) -> Val<::glam::DVec3> { + let output: Val<::glam::DVec3> = ::glam::DVec3::project_onto_normalized( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Returns a vector containing the reciprocal `1.0/n` of each element of `self`. + fn recip(_self: Val<::glam::DVec3>) -> Val<::glam::DVec3> { + let output: Val<::glam::DVec3> = ::glam::DVec3::recip(_self.into_inner()).into(); + output + } + /// Returns the reflection vector for a given incident vector `self` and surface normal + /// `normal`. + /// `normal` must be normalized. + /// # Panics + /// Will panic if `normal` is not normalized when `glam_assert` is enabled. + fn reflect( + _self: Val<::glam::DVec3>, + normal: Val<::glam::DVec3>, + ) -> Val<::glam::DVec3> { + let output: Val<::glam::DVec3> = ::glam::DVec3::reflect( + _self.into_inner(), + normal.into_inner(), + ) + .into(); + output + } + /// Returns the refraction direction for a given incident vector `self`, surface normal + /// `normal` and ratio of indices of refraction, `eta`. When total internal reflection occurs, + /// a zero vector will be returned. + /// `self` and `normal` must be normalized. + /// # Panics + /// Will panic if `self` or `normal` is not normalized when `glam_assert` is enabled. + fn refract( + _self: Val<::glam::DVec3>, + normal: Val<::glam::DVec3>, + eta: f64, + ) -> Val<::glam::DVec3> { + let output: Val<::glam::DVec3> = ::glam::DVec3::refract( + _self.into_inner(), + normal.into_inner(), + eta, + ) + .into(); + output + } + /// Returns the vector rejection of `self` from `rhs`. + /// The vector rejection is the vector perpendicular to the projection of `self` onto + /// `rhs`, in rhs words the result of `self - self.project_onto(rhs)`. + /// `rhs` must be of non-zero length. + /// # Panics + /// Will panic if `rhs` has a length of zero when `glam_assert` is enabled. + fn reject_from( + _self: Val<::glam::DVec3>, + rhs: Val<::glam::DVec3>, + ) -> Val<::glam::DVec3> { + let output: Val<::glam::DVec3> = ::glam::DVec3::reject_from( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Returns the vector rejection of `self` from `rhs`. + /// The vector rejection is the vector perpendicular to the projection of `self` onto + /// `rhs`, in rhs words the result of `self - self.project_onto(rhs)`. + /// `rhs` must be normalized. + /// # Panics + /// Will panic if `rhs` is not normalized when `glam_assert` is enabled. + fn reject_from_normalized( + _self: Val<::glam::DVec3>, + rhs: Val<::glam::DVec3>, + ) -> Val<::glam::DVec3> { + let output: Val<::glam::DVec3> = ::glam::DVec3::reject_from_normalized( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + fn rem(_self: Val<::glam::DVec3>, rhs: Ref<::glam::DVec3>) -> Val<::glam::DVec3> { + let output: Val<::glam::DVec3> = <::glam::DVec3 as ::core::ops::Rem< + &::glam::DVec3, + >>::rem(_self.into_inner(), &rhs) + .into(); + output + } + fn rem(_self: Val<::glam::DVec3>, rhs: Val<::glam::DVec3>) -> Val<::glam::DVec3> { + let output: Val<::glam::DVec3> = <::glam::DVec3 as ::core::ops::Rem< + ::glam::DVec3, + >>::rem(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + fn rem(_self: Val<::glam::DVec3>, rhs: f64) -> Val<::glam::DVec3> { + let output: Val<::glam::DVec3> = <::glam::DVec3 as ::core::ops::Rem< + f64, + >>::rem(_self.into_inner(), rhs) + .into(); + output + } + /// Returns the element-wise remainder of [Euclidean division] of `self` by `rhs`. + /// [Euclidean division]: f64::rem_euclid + fn rem_euclid( + _self: Val<::glam::DVec3>, + rhs: Val<::glam::DVec3>, + ) -> Val<::glam::DVec3> { + let output: Val<::glam::DVec3> = ::glam::DVec3::rem_euclid( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Returns a vector containing the nearest integer to a number for each element of `self`. + /// Round half-way cases away from 0.0. + fn round(_self: Val<::glam::DVec3>) -> Val<::glam::DVec3> { + let output: Val<::glam::DVec3> = ::glam::DVec3::round(_self.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<::glam::BVec3>, + if_true: Val<::glam::DVec3>, + if_false: Val<::glam::DVec3>, + ) -> Val<::glam::DVec3> { + let output: Val<::glam::DVec3> = ::glam::DVec3::select( + mask.into_inner(), + if_true.into_inner(), + if_false.into_inner(), + ) + .into(); + output + } + /// Returns a vector with elements representing the sign of `self`. + /// - `1.0` if the number is positive, `+0.0` or `INFINITY` + /// - `-1.0` if the number is negative, `-0.0` or `NEG_INFINITY` + /// - `NAN` if the number is `NAN` + fn signum(_self: Val<::glam::DVec3>) -> Val<::glam::DVec3> { + let output: Val<::glam::DVec3> = ::glam::DVec3::signum(_self.into_inner()) + .into(); + output + } + /// Creates a vector with all elements set to `v`. + fn splat(v: f64) -> Val<::glam::DVec3> { + let output: Val<::glam::DVec3> = ::glam::DVec3::splat(v).into(); + output + } + fn sub(_self: Val<::glam::DVec3>, rhs: Ref<::glam::DVec3>) -> Val<::glam::DVec3> { + let output: Val<::glam::DVec3> = <::glam::DVec3 as ::core::ops::Sub< + &::glam::DVec3, + >>::sub(_self.into_inner(), &rhs) + .into(); + output + } + fn sub(_self: Val<::glam::DVec3>, rhs: Val<::glam::DVec3>) -> Val<::glam::DVec3> { + let output: Val<::glam::DVec3> = <::glam::DVec3 as ::core::ops::Sub< + ::glam::DVec3, + >>::sub(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + fn sub(_self: Val<::glam::DVec3>, rhs: f64) -> Val<::glam::DVec3> { + let output: Val<::glam::DVec3> = <::glam::DVec3 as ::core::ops::Sub< + f64, + >>::sub(_self.into_inner(), rhs) + .into(); + output + } + /// `[x, y, z]` + fn to_array(_self: Ref<::glam::DVec3>) -> [f64; 3] { + let output: [f64; 3] = ::glam::DVec3::to_array(&_self).into(); + output + } + /// Returns a vector containing the integer part each element of `self`. This means numbers are + /// always truncated towards zero. + fn trunc(_self: Val<::glam::DVec3>) -> Val<::glam::DVec3> { + let output: Val<::glam::DVec3> = ::glam::DVec3::trunc(_self.into_inner()).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<::glam::DVec3>) -> Val<::glam::DVec2> { + let output: Val<::glam::DVec2> = ::glam::DVec3::truncate(_self.into_inner()) + .into(); + output + } + /// Creates a 3D vector from `self` with the given value of `x`. + fn with_x(_self: Val<::glam::DVec3>, x: f64) -> Val<::glam::DVec3> { + let output: Val<::glam::DVec3> = ::glam::DVec3::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<::glam::DVec3>, y: f64) -> Val<::glam::DVec3> { + let output: Val<::glam::DVec3> = ::glam::DVec3::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<::glam::DVec3>, z: f64) -> Val<::glam::DVec3> { + let output: Val<::glam::DVec3> = ::glam::DVec3::with_z(_self.into_inner(), z) + .into(); + output + } +} +#[script_bindings( + remote, + name = "d_vec_4_functions", + bms_core_path = "bevy_mod_scripting_core", + generated +)] +impl ::glam::DVec4 { + /// Returns a vector containing the absolute value of each element of `self`. + fn abs(_self: Val<::glam::DVec4>) -> Val<::glam::DVec4> { + let output: Val<::glam::DVec4> = ::glam::DVec4::abs(_self.into_inner()).into(); + output + } + /// Returns true if the absolute difference of all elements between `self` and `rhs` is + /// less than or equal to `max_abs_diff`. + /// This can be used to compare if two vectors contain similar elements. It works best when + /// comparing with a known value. The `max_abs_diff` that should be used used depends on + /// the values being compared against. + /// For more see + /// [comparing floating point numbers](https://randomascii.wordpress.com/2012/02/25/comparing-floating-point-numbers-2012-edition/). + fn abs_diff_eq( + _self: Val<::glam::DVec4>, + rhs: Val<::glam::DVec4>, + max_abs_diff: f64, + ) -> bool { + let output: bool = ::glam::DVec4::abs_diff_eq( + _self.into_inner(), + rhs.into_inner(), + max_abs_diff, + ) + .into(); + output + } + fn add(_self: Val<::glam::DVec4>, rhs: Ref<::glam::DVec4>) -> Val<::glam::DVec4> { + let output: Val<::glam::DVec4> = <::glam::DVec4 as ::core::ops::Add< + &::glam::DVec4, + >>::add(_self.into_inner(), &rhs) + .into(); + output + } + fn add(_self: Val<::glam::DVec4>, rhs: Val<::glam::DVec4>) -> Val<::glam::DVec4> { + let output: Val<::glam::DVec4> = <::glam::DVec4 as ::core::ops::Add< + ::glam::DVec4, + >>::add(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + fn add(_self: Val<::glam::DVec4>, rhs: f64) -> Val<::glam::DVec4> { + let output: Val<::glam::DVec4> = <::glam::DVec4 as ::core::ops::Add< + f64, + >>::add(_self.into_inner(), rhs) + .into(); + output + } + /// Casts all elements of `self` to `i16`. + fn as_i16vec4(_self: Ref<::glam::DVec4>) -> Val<::glam::I16Vec4> { + let output: Val<::glam::I16Vec4> = ::glam::DVec4::as_i16vec4(&_self).into(); + output + } + /// Casts all elements of `self` to `i64`. + fn as_i64vec4(_self: Ref<::glam::DVec4>) -> Val<::glam::I64Vec4> { + let output: Val<::glam::I64Vec4> = ::glam::DVec4::as_i64vec4(&_self).into(); + output + } + /// Casts all elements of `self` to `i8`. + fn as_i8vec4(_self: Ref<::glam::DVec4>) -> Val<::glam::I8Vec4> { + let output: Val<::glam::I8Vec4> = ::glam::DVec4::as_i8vec4(&_self).into(); + output + } + /// Casts all elements of `self` to `i32`. + fn as_ivec4(_self: Ref<::glam::DVec4>) -> Val<::glam::IVec4> { + let output: Val<::glam::IVec4> = ::glam::DVec4::as_ivec4(&_self).into(); + output + } + /// Casts all elements of `self` to `u16`. + fn as_u16vec4(_self: Ref<::glam::DVec4>) -> Val<::glam::U16Vec4> { + let output: Val<::glam::U16Vec4> = ::glam::DVec4::as_u16vec4(&_self).into(); + output + } + /// Casts all elements of `self` to `u64`. + fn as_u64vec4(_self: Ref<::glam::DVec4>) -> Val<::glam::U64Vec4> { + let output: Val<::glam::U64Vec4> = ::glam::DVec4::as_u64vec4(&_self).into(); + output + } + /// Casts all elements of `self` to `u8`. + fn as_u8vec4(_self: Ref<::glam::DVec4>) -> Val<::glam::U8Vec4> { + let output: Val<::glam::U8Vec4> = ::glam::DVec4::as_u8vec4(&_self).into(); + output + } + /// Casts all elements of `self` to `u32`. + fn as_uvec4(_self: Ref<::glam::DVec4>) -> Val<::glam::UVec4> { + let output: Val<::glam::UVec4> = ::glam::DVec4::as_uvec4(&_self).into(); + output + } + /// Casts all elements of `self` to `f32`. + fn as_vec4(_self: Ref<::glam::DVec4>) -> Val<::glam::Vec4> { + let output: Val<::glam::Vec4> = ::glam::DVec4::as_vec4(&_self).into(); + output + } + /// Returns a vector containing the smallest integer greater than or equal to a number for + /// each element of `self`. + fn ceil(_self: Val<::glam::DVec4>) -> Val<::glam::DVec4> { + let output: Val<::glam::DVec4> = ::glam::DVec4::ceil(_self.into_inner()).into(); + output + } + /// Component-wise clamping of values, similar to [`f64::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<::glam::DVec4>, + min: Val<::glam::DVec4>, + max: Val<::glam::DVec4>, + ) -> Val<::glam::DVec4> { + let output: Val<::glam::DVec4> = ::glam::DVec4::clamp( + _self.into_inner(), + min.into_inner(), + max.into_inner(), + ) + .into(); + output + } + /// Returns a vector with a length no less than `min` and no more than `max`. + /// # Panics + /// Will panic if `min` is greater than `max`, or if either `min` or `max` is negative, when `glam_assert` is enabled. + fn clamp_length( + _self: Val<::glam::DVec4>, + min: f64, + max: f64, + ) -> Val<::glam::DVec4> { + let output: Val<::glam::DVec4> = ::glam::DVec4::clamp_length( + _self.into_inner(), + min, + max, + ) + .into(); + output + } + /// Returns a vector with a length no more than `max`. + /// # Panics + /// Will panic if `max` is negative when `glam_assert` is enabled. + fn clamp_length_max(_self: Val<::glam::DVec4>, max: f64) -> Val<::glam::DVec4> { + let output: Val<::glam::DVec4> = ::glam::DVec4::clamp_length_max( + _self.into_inner(), + max, + ) + .into(); + output + } + /// Returns a vector with a length no less than `min`. + /// # Panics + /// Will panic if `min` is negative when `glam_assert` is enabled. + fn clamp_length_min(_self: Val<::glam::DVec4>, min: f64) -> Val<::glam::DVec4> { + let output: Val<::glam::DVec4> = ::glam::DVec4::clamp_length_min( + _self.into_inner(), + min, + ) + .into(); + output + } + fn clone(_self: Ref<::glam::DVec4>) -> Val<::glam::DVec4> { + let output: Val<::glam::DVec4> = <::glam::DVec4 as ::bevy_reflect::erased_serde::__private::serde::__private::Clone>::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<::glam::DVec4>, rhs: Val<::glam::DVec4>) -> Val<::glam::BVec4> { + let output: Val<::glam::BVec4> = ::glam::DVec4::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<::glam::DVec4>, rhs: Val<::glam::DVec4>) -> Val<::glam::BVec4> { + let output: Val<::glam::BVec4> = ::glam::DVec4::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<::glam::DVec4>, rhs: Val<::glam::DVec4>) -> Val<::glam::BVec4> { + let output: Val<::glam::BVec4> = ::glam::DVec4::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<::glam::DVec4>, rhs: Val<::glam::DVec4>) -> Val<::glam::BVec4> { + let output: Val<::glam::BVec4> = ::glam::DVec4::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<::glam::DVec4>, rhs: Val<::glam::DVec4>) -> Val<::glam::BVec4> { + let output: Val<::glam::BVec4> = ::glam::DVec4::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<::glam::DVec4>, rhs: Val<::glam::DVec4>) -> Val<::glam::BVec4> { + let output: Val<::glam::BVec4> = ::glam::DVec4::cmpne( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Returns a vector with signs of `rhs` and the magnitudes of `self`. + fn copysign( + _self: Val<::glam::DVec4>, + rhs: Val<::glam::DVec4>, + ) -> Val<::glam::DVec4> { + let output: Val<::glam::DVec4> = ::glam::DVec4::copysign( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Computes the Euclidean distance between two points in space. + fn distance(_self: Val<::glam::DVec4>, rhs: Val<::glam::DVec4>) -> f64 { + let output: f64 = ::glam::DVec4::distance(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + /// Compute the squared euclidean distance between two points in space. + fn distance_squared(_self: Val<::glam::DVec4>, rhs: Val<::glam::DVec4>) -> f64 { + let output: f64 = ::glam::DVec4::distance_squared( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + fn div(_self: Val<::glam::DVec4>, rhs: Ref<::glam::DVec4>) -> Val<::glam::DVec4> { + let output: Val<::glam::DVec4> = <::glam::DVec4 as ::core::ops::Div< + &::glam::DVec4, + >>::div(_self.into_inner(), &rhs) + .into(); + output + } + fn div(_self: Val<::glam::DVec4>, rhs: Val<::glam::DVec4>) -> Val<::glam::DVec4> { + let output: Val<::glam::DVec4> = <::glam::DVec4 as ::core::ops::Div< + ::glam::DVec4, + >>::div(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + fn div(_self: Val<::glam::DVec4>, rhs: f64) -> Val<::glam::DVec4> { + let output: Val<::glam::DVec4> = <::glam::DVec4 as ::core::ops::Div< + f64, + >>::div(_self.into_inner(), rhs) + .into(); + output + } + /// Returns the element-wise quotient of [Euclidean division] of `self` by `rhs`. + fn div_euclid( + _self: Val<::glam::DVec4>, + rhs: Val<::glam::DVec4>, + ) -> Val<::glam::DVec4> { + let output: Val<::glam::DVec4> = ::glam::DVec4::div_euclid( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Computes the dot product of `self` and `rhs`. + fn dot(_self: Val<::glam::DVec4>, rhs: Val<::glam::DVec4>) -> f64 { + let output: f64 = ::glam::DVec4::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<::glam::DVec4>, + rhs: Val<::glam::DVec4>, + ) -> Val<::glam::DVec4> { + let output: Val<::glam::DVec4> = ::glam::DVec4::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<::glam::DVec4>) -> f64 { + let output: f64 = ::glam::DVec4::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<::glam::DVec4>) -> f64 { + let output: f64 = ::glam::DVec4::element_sum(_self.into_inner()).into(); + output + } + fn eq(_self: Ref<::glam::DVec4>, other: Ref<::glam::DVec4>) -> bool { + let output: bool = <::glam::DVec4 as ::core::cmp::PartialEq< + ::glam::DVec4, + >>::eq(&_self, &other) + .into(); + output + } + /// Returns a vector containing `e^self` (the exponential function) for each element of + /// `self`. + fn exp(_self: Val<::glam::DVec4>) -> Val<::glam::DVec4> { + let output: Val<::glam::DVec4> = ::glam::DVec4::exp(_self.into_inner()).into(); + output + } + /// Returns a vector containing the largest integer less than or equal to a number for each + /// element of `self`. + fn floor(_self: Val<::glam::DVec4>) -> Val<::glam::DVec4> { + let output: Val<::glam::DVec4> = ::glam::DVec4::floor(_self.into_inner()).into(); + output + } + /// Returns a vector containing the fractional part of the vector as `self - self.trunc()`. + /// Note that this differs from the GLSL implementation of `fract` which returns + /// `self - self.floor()`. + /// Note that this is fast but not precise for large numbers. + fn fract(_self: Val<::glam::DVec4>) -> Val<::glam::DVec4> { + let output: Val<::glam::DVec4> = ::glam::DVec4::fract(_self.into_inner()).into(); + output + } + /// Returns a vector containing the fractional part of the vector as `self - self.floor()`. + /// Note that this differs from the Rust implementation of `fract` which returns + /// `self - self.trunc()`. + /// Note that this is fast but not precise for large numbers. + fn fract_gl(_self: Val<::glam::DVec4>) -> Val<::glam::DVec4> { + let output: Val<::glam::DVec4> = ::glam::DVec4::fract_gl(_self.into_inner()) + .into(); + output + } + /// Creates a new vector from an array. + fn from_array(a: [f64; 4]) -> Val<::glam::DVec4> { + let output: Val<::glam::DVec4> = ::glam::DVec4::from_array(a).into(); + output + } + /// Returns `true` if, and only if, all elements are finite. If any element is either + /// `NaN`, positive or negative infinity, this will return `false`. + fn is_finite(_self: Val<::glam::DVec4>) -> bool { + let output: bool = ::glam::DVec4::is_finite(_self.into_inner()).into(); + output + } + /// Performs `is_finite` on each element of self, returning a vector mask of the results. + /// In other words, this computes `[x.is_finite(), y.is_finite(), ...]`. + fn is_finite_mask(_self: Val<::glam::DVec4>) -> Val<::glam::BVec4> { + let output: Val<::glam::BVec4> = ::glam::DVec4::is_finite_mask( + _self.into_inner(), + ) + .into(); + output + } + /// Returns `true` if any elements are `NaN`. + fn is_nan(_self: Val<::glam::DVec4>) -> bool { + let output: bool = ::glam::DVec4::is_nan(_self.into_inner()).into(); + output + } + /// Performs `is_nan` on each element of self, returning a vector mask of the results. + /// In other words, this computes `[x.is_nan(), y.is_nan(), ...]`. + fn is_nan_mask(_self: Val<::glam::DVec4>) -> Val<::glam::BVec4> { + let output: Val<::glam::BVec4> = ::glam::DVec4::is_nan_mask(_self.into_inner()) + .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<::glam::DVec4>) -> u32 { + let output: u32 = ::glam::DVec4::is_negative_bitmask(_self.into_inner()).into(); + output + } + /// Returns whether `self` is length `1.0` or not. + /// Uses a precision threshold of approximately `1e-4`. + fn is_normalized(_self: Val<::glam::DVec4>) -> bool { + let output: bool = ::glam::DVec4::is_normalized(_self.into_inner()).into(); + output + } + /// Computes the length of `self`. + fn length(_self: Val<::glam::DVec4>) -> f64 { + let output: f64 = ::glam::DVec4::length(_self.into_inner()).into(); + output + } + /// Computes `1.0 / length()`. + /// For valid results, `self` must _not_ be of length zero. + fn length_recip(_self: Val<::glam::DVec4>) -> f64 { + let output: f64 = ::glam::DVec4::length_recip(_self.into_inner()).into(); + output + } + /// Computes the squared length of `self`. + /// This is faster than `length()` as it avoids a square root operation. + fn length_squared(_self: Val<::glam::DVec4>) -> f64 { + let output: f64 = ::glam::DVec4::length_squared(_self.into_inner()).into(); + output + } + /// Performs a linear interpolation between `self` and `rhs` based on the value `s`. + /// When `s` is `0.0`, the result will be equal to `self`. When `s` is `1.0`, the result + /// will be equal to `rhs`. When `s` is outside of range `[0, 1]`, the result is linearly + /// extrapolated. + fn lerp( + _self: Val<::glam::DVec4>, + rhs: Val<::glam::DVec4>, + s: f64, + ) -> Val<::glam::DVec4> { + let output: Val<::glam::DVec4> = ::glam::DVec4::lerp( + _self.into_inner(), + rhs.into_inner(), + s, + ) + .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<::glam::DVec4>, rhs: Val<::glam::DVec4>) -> Val<::glam::DVec4> { + let output: Val<::glam::DVec4> = ::glam::DVec4::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<::glam::DVec4>) -> f64 { + let output: f64 = ::glam::DVec4::max_element(_self.into_inner()).into(); + output + } + /// Calculates the midpoint between `self` and `rhs`. + /// The midpoint is the average of, or halfway point between, two vectors. + /// `a.midpoint(b)` should yield the same result as `a.lerp(b, 0.5)` + /// while being slightly cheaper to compute. + fn midpoint( + _self: Val<::glam::DVec4>, + rhs: Val<::glam::DVec4>, + ) -> Val<::glam::DVec4> { + let output: Val<::glam::DVec4> = ::glam::DVec4::midpoint( + _self.into_inner(), + rhs.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<::glam::DVec4>, rhs: Val<::glam::DVec4>) -> Val<::glam::DVec4> { + let output: Val<::glam::DVec4> = ::glam::DVec4::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<::glam::DVec4>) -> f64 { + let output: f64 = ::glam::DVec4::min_element(_self.into_inner()).into(); + output + } + /// Moves towards `rhs` based on the value `d`. + /// When `d` is `0.0`, the result will be equal to `self`. When `d` is equal to + /// `self.distance(rhs)`, the result will be equal to `rhs`. Will not go past `rhs`. + fn move_towards( + _self: Ref<::glam::DVec4>, + rhs: Val<::glam::DVec4>, + d: f64, + ) -> Val<::glam::DVec4> { + let output: Val<::glam::DVec4> = ::glam::DVec4::move_towards( + &_self, + rhs.into_inner(), + d, + ) + .into(); + output + } + fn mul(_self: Val<::glam::DVec4>, rhs: Ref<::glam::DVec4>) -> Val<::glam::DVec4> { + let output: Val<::glam::DVec4> = <::glam::DVec4 as ::core::ops::Mul< + &::glam::DVec4, + >>::mul(_self.into_inner(), &rhs) + .into(); + output + } + fn mul(_self: Val<::glam::DVec4>, rhs: Val<::glam::DVec4>) -> Val<::glam::DVec4> { + let output: Val<::glam::DVec4> = <::glam::DVec4 as ::core::ops::Mul< + ::glam::DVec4, + >>::mul(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + fn mul(_self: Val<::glam::DVec4>, rhs: f64) -> Val<::glam::DVec4> { + let output: Val<::glam::DVec4> = <::glam::DVec4 as ::core::ops::Mul< + f64, + >>::mul(_self.into_inner(), rhs) + .into(); + output + } + /// Fused multiply-add. Computes `(self * a) + b` element-wise with only one rounding + /// error, yielding a more accurate result than an unfused multiply-add. + /// Using `mul_add` *may* be more performant than an unfused multiply-add if the target + /// architecture has a dedicated fma CPU instruction. However, this is not always true, + /// and will be heavily dependant on designing algorithms with specific target hardware in + /// mind. + fn mul_add( + _self: Val<::glam::DVec4>, + a: Val<::glam::DVec4>, + b: Val<::glam::DVec4>, + ) -> Val<::glam::DVec4> { + let output: Val<::glam::DVec4> = ::glam::DVec4::mul_add( + _self.into_inner(), + a.into_inner(), + b.into_inner(), + ) + .into(); + output + } + fn neg(_self: Val<::glam::DVec4>) -> Val<::glam::DVec4> { + let output: Val<::glam::DVec4> = <::glam::DVec4 as ::core::ops::Neg>::neg( + _self.into_inner(), + ) + .into(); + output + } + /// Creates a new vector. + fn new(x: f64, y: f64, z: f64, w: f64) -> Val<::glam::DVec4> { + let output: Val<::glam::DVec4> = ::glam::DVec4::new(x, y, z, w).into(); + output + } + /// Returns `self` normalized to length 1.0. + /// For valid results, `self` must be finite and _not_ of length zero, nor very close to zero. + /// See also [`Self::try_normalize()`] and [`Self::normalize_or_zero()`]. + /// Panics + /// Will panic if the resulting normalized vector is not finite when `glam_assert` is enabled. + fn normalize(_self: Val<::glam::DVec4>) -> Val<::glam::DVec4> { + let output: Val<::glam::DVec4> = ::glam::DVec4::normalize(_self.into_inner()) + .into(); + output + } + /// Returns `self` normalized to length 1.0 if possible, else returns a + /// fallback value. + /// In particular, if the input is zero (or very close to zero), or non-finite, + /// the result of this operation will be the fallback value. + /// See also [`Self::try_normalize()`]. + fn normalize_or( + _self: Val<::glam::DVec4>, + fallback: Val<::glam::DVec4>, + ) -> Val<::glam::DVec4> { + let output: Val<::glam::DVec4> = ::glam::DVec4::normalize_or( + _self.into_inner(), + fallback.into_inner(), + ) + .into(); + output + } + /// Returns `self` normalized to length 1.0 if possible, else returns zero. + /// In particular, if the input is zero (or very close to zero), or non-finite, + /// the result of this operation will be zero. + /// See also [`Self::try_normalize()`]. + fn normalize_or_zero(_self: Val<::glam::DVec4>) -> Val<::glam::DVec4> { + let output: Val<::glam::DVec4> = ::glam::DVec4::normalize_or_zero( + _self.into_inner(), + ) + .into(); + output + } + /// Returns a vector containing each element of `self` raised to the power of `n`. + fn powf(_self: Val<::glam::DVec4>, n: f64) -> Val<::glam::DVec4> { + let output: Val<::glam::DVec4> = ::glam::DVec4::powf(_self.into_inner(), n) + .into(); + output + } + /// Returns the vector projection of `self` onto `rhs`. + /// `rhs` must be of non-zero length. + /// # Panics + /// Will panic if `rhs` is zero length when `glam_assert` is enabled. + fn project_onto( + _self: Val<::glam::DVec4>, + rhs: Val<::glam::DVec4>, + ) -> Val<::glam::DVec4> { + let output: Val<::glam::DVec4> = ::glam::DVec4::project_onto( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Returns the vector projection of `self` onto `rhs`. + /// `rhs` must be normalized. + /// # Panics + /// Will panic if `rhs` is not normalized when `glam_assert` is enabled. + fn project_onto_normalized( + _self: Val<::glam::DVec4>, + rhs: Val<::glam::DVec4>, + ) -> Val<::glam::DVec4> { + let output: Val<::glam::DVec4> = ::glam::DVec4::project_onto_normalized( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Returns a vector containing the reciprocal `1.0/n` of each element of `self`. + fn recip(_self: Val<::glam::DVec4>) -> Val<::glam::DVec4> { + let output: Val<::glam::DVec4> = ::glam::DVec4::recip(_self.into_inner()).into(); + output + } + /// Returns the reflection vector for a given incident vector `self` and surface normal + /// `normal`. + /// `normal` must be normalized. + /// # Panics + /// Will panic if `normal` is not normalized when `glam_assert` is enabled. + fn reflect( + _self: Val<::glam::DVec4>, + normal: Val<::glam::DVec4>, + ) -> Val<::glam::DVec4> { + let output: Val<::glam::DVec4> = ::glam::DVec4::reflect( + _self.into_inner(), + normal.into_inner(), + ) + .into(); + output + } + /// Returns the refraction direction for a given incident vector `self`, surface normal + /// `normal` and ratio of indices of refraction, `eta`. When total internal reflection occurs, + /// a zero vector will be returned. + /// `self` and `normal` must be normalized. + /// # Panics + /// Will panic if `self` or `normal` is not normalized when `glam_assert` is enabled. + fn refract( + _self: Val<::glam::DVec4>, + normal: Val<::glam::DVec4>, + eta: f64, + ) -> Val<::glam::DVec4> { + let output: Val<::glam::DVec4> = ::glam::DVec4::refract( + _self.into_inner(), + normal.into_inner(), + eta, + ) + .into(); + output + } + /// Returns the vector rejection of `self` from `rhs`. + /// The vector rejection is the vector perpendicular to the projection of `self` onto + /// `rhs`, in rhs words the result of `self - self.project_onto(rhs)`. + /// `rhs` must be of non-zero length. + /// # Panics + /// Will panic if `rhs` has a length of zero when `glam_assert` is enabled. + fn reject_from( + _self: Val<::glam::DVec4>, + rhs: Val<::glam::DVec4>, + ) -> Val<::glam::DVec4> { + let output: Val<::glam::DVec4> = ::glam::DVec4::reject_from( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Returns the vector rejection of `self` from `rhs`. + /// The vector rejection is the vector perpendicular to the projection of `self` onto + /// `rhs`, in rhs words the result of `self - self.project_onto(rhs)`. + /// `rhs` must be normalized. + /// # Panics + /// Will panic if `rhs` is not normalized when `glam_assert` is enabled. + fn reject_from_normalized( + _self: Val<::glam::DVec4>, + rhs: Val<::glam::DVec4>, + ) -> Val<::glam::DVec4> { + let output: Val<::glam::DVec4> = ::glam::DVec4::reject_from_normalized( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + fn rem(_self: Val<::glam::DVec4>, rhs: Ref<::glam::DVec4>) -> Val<::glam::DVec4> { + let output: Val<::glam::DVec4> = <::glam::DVec4 as ::core::ops::Rem< + &::glam::DVec4, + >>::rem(_self.into_inner(), &rhs) + .into(); + output + } + fn rem(_self: Val<::glam::DVec4>, rhs: Val<::glam::DVec4>) -> Val<::glam::DVec4> { + let output: Val<::glam::DVec4> = <::glam::DVec4 as ::core::ops::Rem< + ::glam::DVec4, + >>::rem(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + fn rem(_self: Val<::glam::DVec4>, rhs: f64) -> Val<::glam::DVec4> { + let output: Val<::glam::DVec4> = <::glam::DVec4 as ::core::ops::Rem< + f64, + >>::rem(_self.into_inner(), rhs) + .into(); + output + } + /// Returns the element-wise remainder of [Euclidean division] of `self` by `rhs`. + /// [Euclidean division]: f64::rem_euclid + fn rem_euclid( + _self: Val<::glam::DVec4>, + rhs: Val<::glam::DVec4>, + ) -> Val<::glam::DVec4> { + let output: Val<::glam::DVec4> = ::glam::DVec4::rem_euclid( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Returns a vector containing the nearest integer to a number for each element of `self`. + /// Round half-way cases away from 0.0. + fn round(_self: Val<::glam::DVec4>) -> Val<::glam::DVec4> { + let output: Val<::glam::DVec4> = ::glam::DVec4::round(_self.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<::glam::BVec4>, + if_true: Val<::glam::DVec4>, + if_false: Val<::glam::DVec4>, + ) -> Val<::glam::DVec4> { + let output: Val<::glam::DVec4> = ::glam::DVec4::select( + mask.into_inner(), + if_true.into_inner(), + if_false.into_inner(), + ) + .into(); + output + } + /// Returns a vector with elements representing the sign of `self`. + /// - `1.0` if the number is positive, `+0.0` or `INFINITY` + /// - `-1.0` if the number is negative, `-0.0` or `NEG_INFINITY` + /// - `NAN` if the number is `NAN` + fn signum(_self: Val<::glam::DVec4>) -> Val<::glam::DVec4> { + let output: Val<::glam::DVec4> = ::glam::DVec4::signum(_self.into_inner()) + .into(); + output + } + /// Creates a vector with all elements set to `v`. + fn splat(v: f64) -> Val<::glam::DVec4> { + let output: Val<::glam::DVec4> = ::glam::DVec4::splat(v).into(); + output + } + fn sub(_self: Val<::glam::DVec4>, rhs: Ref<::glam::DVec4>) -> Val<::glam::DVec4> { + let output: Val<::glam::DVec4> = <::glam::DVec4 as ::core::ops::Sub< + &::glam::DVec4, + >>::sub(_self.into_inner(), &rhs) + .into(); + output + } + fn sub(_self: Val<::glam::DVec4>, rhs: Val<::glam::DVec4>) -> Val<::glam::DVec4> { + let output: Val<::glam::DVec4> = <::glam::DVec4 as ::core::ops::Sub< + ::glam::DVec4, + >>::sub(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + fn sub(_self: Val<::glam::DVec4>, rhs: f64) -> Val<::glam::DVec4> { + let output: Val<::glam::DVec4> = <::glam::DVec4 as ::core::ops::Sub< + f64, + >>::sub(_self.into_inner(), rhs) + .into(); + output + } + /// `[x, y, z, w]` + fn to_array(_self: Ref<::glam::DVec4>) -> [f64; 4] { + let output: [f64; 4] = ::glam::DVec4::to_array(&_self).into(); + output + } + /// Returns a vector containing the integer part each element of `self`. This means numbers are + /// always truncated towards zero. + fn trunc(_self: Val<::glam::DVec4>) -> Val<::glam::DVec4> { + let output: Val<::glam::DVec4> = ::glam::DVec4::trunc(_self.into_inner()).into(); + output + } + /// Creates a 3D vector from the `x`, `y` and `z` elements of `self`, discarding `w`. + /// Truncation to [`DVec3`] may also be performed by using [`self.xyz()`][crate::swizzles::Vec4Swizzles::xyz()]. + fn truncate(_self: Val<::glam::DVec4>) -> Val<::glam::DVec3> { + let output: Val<::glam::DVec3> = ::glam::DVec4::truncate(_self.into_inner()) + .into(); + output + } + /// Creates a 4D vector from `self` with the given value of `w`. + fn with_w(_self: Val<::glam::DVec4>, w: f64) -> Val<::glam::DVec4> { + let output: Val<::glam::DVec4> = ::glam::DVec4::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<::glam::DVec4>, x: f64) -> Val<::glam::DVec4> { + let output: Val<::glam::DVec4> = ::glam::DVec4::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<::glam::DVec4>, y: f64) -> Val<::glam::DVec4> { + let output: Val<::glam::DVec4> = ::glam::DVec4::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<::glam::DVec4>, z: f64) -> Val<::glam::DVec4> { + let output: Val<::glam::DVec4> = ::glam::DVec4::with_z(_self.into_inner(), z) + .into(); + output + } +} +#[script_bindings( + remote, + name = "mat_2_functions", + bms_core_path = "bevy_mod_scripting_core", + generated +)] +impl ::glam::Mat2 { + /// Takes the absolute value of each element in `self` + fn abs(_self: Ref<::glam::Mat2>) -> Val<::glam::Mat2> { + let output: Val<::glam::Mat2> = ::glam::Mat2::abs(&_self).into(); + output + } + /// Returns true if the absolute difference of all elements between `self` and `rhs` + /// is less than or equal to `max_abs_diff`. + /// This can be used to compare if two matrices contain similar elements. It works best + /// when comparing with a known value. The `max_abs_diff` that should be used used + /// depends on the values being compared against. + /// For more see + /// [comparing floating point numbers](https://randomascii.wordpress.com/2012/02/25/comparing-floating-point-numbers-2012-edition/). + fn abs_diff_eq( + _self: Ref<::glam::Mat2>, + rhs: Val<::glam::Mat2>, + max_abs_diff: f32, + ) -> bool { + let output: bool = ::glam::Mat2::abs_diff_eq( + &_self, + rhs.into_inner(), + max_abs_diff, + ) + .into(); + output + } + fn add(_self: Val<::glam::Mat2>, rhs: Val<::glam::Mat2>) -> Val<::glam::Mat2> { + let output: Val<::glam::Mat2> = <::glam::Mat2 as ::core::ops::Add< + ::glam::Mat2, + >>::add(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + /// Adds two 2x2 matrices. + fn add_mat2(_self: Ref<::glam::Mat2>, rhs: Ref<::glam::Mat2>) -> Val<::glam::Mat2> { + let output: Val<::glam::Mat2> = ::glam::Mat2::add_mat2(&_self, &rhs).into(); + output + } + fn as_dmat2(_self: Ref<::glam::Mat2>) -> Val<::glam::DMat2> { + let output: Val<::glam::DMat2> = ::glam::Mat2::as_dmat2(&_self).into(); + output + } + fn clone(_self: Ref<::glam::Mat2>) -> Val<::glam::Mat2> { + let output: Val<::glam::Mat2> = <::glam::Mat2 as ::bevy_reflect::erased_serde::__private::serde::__private::Clone>::clone( + &_self, + ) + .into(); + output + } + /// Returns the matrix column for the given `index`. + /// # Panics + /// Panics if `index` is greater than 1. + fn col(_self: Ref<::glam::Mat2>, index: usize) -> Val<::glam::Vec2> { + let output: Val<::glam::Vec2> = ::glam::Mat2::col(&_self, index).into(); + output + } + /// Returns the determinant of `self`. + fn determinant(_self: Ref<::glam::Mat2>) -> f32 { + let output: f32 = ::glam::Mat2::determinant(&_self).into(); + output + } + fn div(_self: Val<::glam::Mat2>, rhs: f32) -> Val<::glam::Mat2> { + let output: Val<::glam::Mat2> = <::glam::Mat2 as ::core::ops::Div< + f32, + >>::div(_self.into_inner(), rhs) + .into(); + output + } + /// Divides a 2x2 matrix by a scalar. + fn div_scalar(_self: Ref<::glam::Mat2>, rhs: f32) -> Val<::glam::Mat2> { + let output: Val<::glam::Mat2> = ::glam::Mat2::div_scalar(&_self, rhs).into(); + output + } + fn eq(_self: Ref<::glam::Mat2>, rhs: Ref<::glam::Mat2>) -> bool { + let output: bool = <::glam::Mat2 as ::core::cmp::PartialEq< + ::glam::Mat2, + >>::eq(&_self, &rhs) + .into(); + output + } + /// Creates a 2x2 matrix containing a rotation of `angle` (in radians). + fn from_angle(angle: f32) -> Val<::glam::Mat2> { + let output: Val<::glam::Mat2> = ::glam::Mat2::from_angle(angle).into(); + output + } + /// Creates a 2x2 matrix from two column vectors. + fn from_cols( + x_axis: Val<::glam::Vec2>, + y_axis: Val<::glam::Vec2>, + ) -> Val<::glam::Mat2> { + let output: Val<::glam::Mat2> = ::glam::Mat2::from_cols( + x_axis.into_inner(), + y_axis.into_inner(), + ) + .into(); + output + } + /// Creates a 2x2 matrix with its diagonal set to `diagonal` and all other entries set to 0. + fn from_diagonal(diagonal: Val<::glam::Vec2>) -> Val<::glam::Mat2> { + let output: Val<::glam::Mat2> = ::glam::Mat2::from_diagonal( + diagonal.into_inner(), + ) + .into(); + output + } + /// Creates a 2x2 matrix from a 3x3 matrix, discarding the 2nd row and column. + fn from_mat3(m: Val<::glam::Mat3>) -> Val<::glam::Mat2> { + let output: Val<::glam::Mat2> = ::glam::Mat2::from_mat3(m.into_inner()).into(); + output + } + /// Creates a 2x2 matrix from the minor of the given 3x3 matrix, discarding the `i`th column + /// and `j`th row. + /// # Panics + /// Panics if `i` or `j` is greater than 2. + fn from_mat3_minor(m: Val<::glam::Mat3>, i: usize, j: usize) -> Val<::glam::Mat2> { + let output: Val<::glam::Mat2> = ::glam::Mat2::from_mat3_minor( + m.into_inner(), + i, + j, + ) + .into(); + output + } + /// Creates a 2x2 matrix from a 3x3 matrix, discarding the 2nd row and column. + fn from_mat3a(m: Val<::glam::Mat3A>) -> Val<::glam::Mat2> { + let output: Val<::glam::Mat2> = ::glam::Mat2::from_mat3a(m.into_inner()).into(); + output + } + /// Creates a 2x2 matrix from the minor of the given 3x3 matrix, discarding the `i`th column + /// and `j`th row. + /// # Panics + /// Panics if `i` or `j` is greater than 2. + fn from_mat3a_minor(m: Val<::glam::Mat3A>, i: usize, j: usize) -> Val<::glam::Mat2> { + let output: Val<::glam::Mat2> = ::glam::Mat2::from_mat3a_minor( + m.into_inner(), + i, + j, + ) + .into(); + output + } + /// Creates a 2x2 matrix containing the combining non-uniform `scale` and rotation of + /// `angle` (in radians). + fn from_scale_angle(scale: Val<::glam::Vec2>, angle: f32) -> Val<::glam::Mat2> { + let output: Val<::glam::Mat2> = ::glam::Mat2::from_scale_angle( + scale.into_inner(), + angle, + ) + .into(); + output + } + /// Returns the inverse of `self`. + /// If the matrix is not invertible the returned matrix will be invalid. + /// # Panics + /// Will panic if the determinant of `self` is zero when `glam_assert` is enabled. + fn inverse(_self: Ref<::glam::Mat2>) -> Val<::glam::Mat2> { + let output: Val<::glam::Mat2> = ::glam::Mat2::inverse(&_self).into(); + output + } + /// Returns `true` if, and only if, all elements are finite. + /// If any element is either `NaN`, positive or negative infinity, this will return `false`. + fn is_finite(_self: Ref<::glam::Mat2>) -> bool { + let output: bool = ::glam::Mat2::is_finite(&_self).into(); + output + } + /// Returns `true` if any elements are `NaN`. + fn is_nan(_self: Ref<::glam::Mat2>) -> bool { + let output: bool = ::glam::Mat2::is_nan(&_self).into(); + output + } + fn mul(_self: Val<::glam::Mat2>, rhs: Val<::glam::Mat2>) -> Val<::glam::Mat2> { + let output: Val<::glam::Mat2> = <::glam::Mat2 as ::core::ops::Mul< + ::glam::Mat2, + >>::mul(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + fn mul(_self: Val<::glam::Mat2>, rhs: Val<::glam::Vec2>) -> Val<::glam::Vec2> { + let output: Val<::glam::Vec2> = <::glam::Mat2 as ::core::ops::Mul< + ::glam::Vec2, + >>::mul(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + fn mul(_self: Val<::glam::Mat2>, rhs: f32) -> Val<::glam::Mat2> { + let output: Val<::glam::Mat2> = <::glam::Mat2 as ::core::ops::Mul< + f32, + >>::mul(_self.into_inner(), rhs) + .into(); + output + } + /// Multiplies two 2x2 matrices. + fn mul_mat2(_self: Ref<::glam::Mat2>, rhs: Ref<::glam::Mat2>) -> Val<::glam::Mat2> { + let output: Val<::glam::Mat2> = ::glam::Mat2::mul_mat2(&_self, &rhs).into(); + output + } + /// Multiplies a 2x2 matrix by a scalar. + fn mul_scalar(_self: Ref<::glam::Mat2>, rhs: f32) -> Val<::glam::Mat2> { + let output: Val<::glam::Mat2> = ::glam::Mat2::mul_scalar(&_self, rhs).into(); + output + } + /// Transforms a 2D vector. + fn mul_vec2(_self: Ref<::glam::Mat2>, rhs: Val<::glam::Vec2>) -> Val<::glam::Vec2> { + let output: Val<::glam::Vec2> = ::glam::Mat2::mul_vec2(&_self, rhs.into_inner()) + .into(); + output + } + fn neg(_self: Val<::glam::Mat2>) -> Val<::glam::Mat2> { + let output: Val<::glam::Mat2> = <::glam::Mat2 as ::core::ops::Neg>::neg( + _self.into_inner(), + ) + .into(); + output + } + /// Returns the matrix row for the given `index`. + /// # Panics + /// Panics if `index` is greater than 1. + fn row(_self: Ref<::glam::Mat2>, index: usize) -> Val<::glam::Vec2> { + let output: Val<::glam::Vec2> = ::glam::Mat2::row(&_self, index).into(); + output + } + fn sub(_self: Val<::glam::Mat2>, rhs: Val<::glam::Mat2>) -> Val<::glam::Mat2> { + let output: Val<::glam::Mat2> = <::glam::Mat2 as ::core::ops::Sub< + ::glam::Mat2, + >>::sub(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + /// Subtracts two 2x2 matrices. + fn sub_mat2(_self: Ref<::glam::Mat2>, rhs: Ref<::glam::Mat2>) -> Val<::glam::Mat2> { + let output: Val<::glam::Mat2> = ::glam::Mat2::sub_mat2(&_self, &rhs).into(); + output + } + /// Creates a `[f32; 4]` array storing data in column major order. + /// If you require data in row major order `transpose` the matrix first. + fn to_cols_array(_self: Ref<::glam::Mat2>) -> [f32; 4] { + let output: [f32; 4] = ::glam::Mat2::to_cols_array(&_self).into(); + output + } + /// Creates a `[[f32; 2]; 2]` 2D array storing data in column major order. + /// If you require data in row major order `transpose` the matrix first. + fn to_cols_array_2d(_self: Ref<::glam::Mat2>) -> [[f32; 2]; 2] { + let output: [[f32; 2]; 2] = ::glam::Mat2::to_cols_array_2d(&_self).into(); + output + } + /// Returns the transpose of `self`. + fn transpose(_self: Ref<::glam::Mat2>) -> Val<::glam::Mat2> { + let output: Val<::glam::Mat2> = ::glam::Mat2::transpose(&_self).into(); + output + } +} +#[script_bindings( + remote, + name = "mat_3_functions", + bms_core_path = "bevy_mod_scripting_core", + generated +)] +impl ::glam::Mat3 { + /// Takes the absolute value of each element in `self` + fn abs(_self: Ref<::glam::Mat3>) -> Val<::glam::Mat3> { + let output: Val<::glam::Mat3> = ::glam::Mat3::abs(&_self).into(); + output + } + /// Returns true if the absolute difference of all elements between `self` and `rhs` + /// is less than or equal to `max_abs_diff`. + /// This can be used to compare if two matrices contain similar elements. It works best + /// when comparing with a known value. The `max_abs_diff` that should be used used + /// depends on the values being compared against. + /// For more see + /// [comparing floating point numbers](https://randomascii.wordpress.com/2012/02/25/comparing-floating-point-numbers-2012-edition/). + fn abs_diff_eq( + _self: Ref<::glam::Mat3>, + rhs: Val<::glam::Mat3>, + max_abs_diff: f32, + ) -> bool { + let output: bool = ::glam::Mat3::abs_diff_eq( + &_self, + rhs.into_inner(), + max_abs_diff, + ) + .into(); + output + } + fn add(_self: Val<::glam::Mat3>, rhs: Val<::glam::Mat3>) -> Val<::glam::Mat3> { + let output: Val<::glam::Mat3> = <::glam::Mat3 as ::core::ops::Add< + ::glam::Mat3, + >>::add(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + /// Adds two 3x3 matrices. + fn add_mat3(_self: Ref<::glam::Mat3>, rhs: Ref<::glam::Mat3>) -> Val<::glam::Mat3> { + let output: Val<::glam::Mat3> = ::glam::Mat3::add_mat3(&_self, &rhs).into(); + output + } + fn as_dmat3(_self: Ref<::glam::Mat3>) -> Val<::glam::DMat3> { + let output: Val<::glam::DMat3> = ::glam::Mat3::as_dmat3(&_self).into(); + output + } + fn clone(_self: Ref<::glam::Mat3>) -> Val<::glam::Mat3> { + let output: Val<::glam::Mat3> = <::glam::Mat3 as ::bevy_reflect::erased_serde::__private::serde::__private::Clone>::clone( + &_self, + ) + .into(); + output + } + /// Returns the matrix column for the given `index`. + /// # Panics + /// Panics if `index` is greater than 2. + fn col(_self: Ref<::glam::Mat3>, index: usize) -> Val<::glam::Vec3> { + let output: Val<::glam::Vec3> = ::glam::Mat3::col(&_self, index).into(); + output + } + /// Returns the determinant of `self`. + fn determinant(_self: Ref<::glam::Mat3>) -> f32 { + let output: f32 = ::glam::Mat3::determinant(&_self).into(); + output + } + fn div(_self: Val<::glam::Mat3>, rhs: f32) -> Val<::glam::Mat3> { + let output: Val<::glam::Mat3> = <::glam::Mat3 as ::core::ops::Div< + f32, + >>::div(_self.into_inner(), rhs) + .into(); + output + } + /// Divides a 3x3 matrix by a scalar. + fn div_scalar(_self: Ref<::glam::Mat3>, rhs: f32) -> Val<::glam::Mat3> { + let output: Val<::glam::Mat3> = ::glam::Mat3::div_scalar(&_self, rhs).into(); + output + } + fn eq(_self: Ref<::glam::Mat3>, rhs: Ref<::glam::Mat3>) -> bool { + let output: bool = <::glam::Mat3 as ::core::cmp::PartialEq< + ::glam::Mat3, + >>::eq(&_self, &rhs) + .into(); + output + } + /// Creates an affine transformation matrix from the given 2D rotation `angle` (in + /// radians). + /// The resulting matrix can be used to transform 2D points and vectors. See + /// [`Self::transform_point2()`] and [`Self::transform_vector2()`]. + fn from_angle(angle: f32) -> Val<::glam::Mat3> { + let output: Val<::glam::Mat3> = ::glam::Mat3::from_angle(angle).into(); + output + } + /// Creates a 3D rotation matrix from a normalized rotation `axis` and `angle` (in + /// radians). + /// # Panics + /// Will panic if `axis` is not normalized when `glam_assert` is enabled. + fn from_axis_angle(axis: Val<::glam::Vec3>, angle: f32) -> Val<::glam::Mat3> { + let output: Val<::glam::Mat3> = ::glam::Mat3::from_axis_angle( + axis.into_inner(), + angle, + ) + .into(); + output + } + /// Creates a 3x3 matrix from three column vectors. + fn from_cols( + x_axis: Val<::glam::Vec3>, + y_axis: Val<::glam::Vec3>, + z_axis: Val<::glam::Vec3>, + ) -> Val<::glam::Mat3> { + let output: Val<::glam::Mat3> = ::glam::Mat3::from_cols( + x_axis.into_inner(), + y_axis.into_inner(), + z_axis.into_inner(), + ) + .into(); + output + } + /// Creates a 3x3 matrix with its diagonal set to `diagonal` and all other entries set to 0. + fn from_diagonal(diagonal: Val<::glam::Vec3>) -> Val<::glam::Mat3> { + let output: Val<::glam::Mat3> = ::glam::Mat3::from_diagonal( + diagonal.into_inner(), + ) + .into(); + output + } + /// Creates a 3D rotation matrix from the given euler rotation sequence and the angles (in + /// radians). + fn from_euler( + order: Val<::glam::EulerRot>, + a: f32, + b: f32, + c: f32, + ) -> Val<::glam::Mat3> { + let output: Val<::glam::Mat3> = ::glam::Mat3::from_euler( + order.into_inner(), + a, + b, + c, + ) + .into(); + output + } + /// Creates an affine transformation matrix from the given 2x2 matrix. + /// The resulting matrix can be used to transform 2D points and vectors. See + /// [`Self::transform_point2()`] and [`Self::transform_vector2()`]. + fn from_mat2(m: Val<::glam::Mat2>) -> Val<::glam::Mat3> { + let output: Val<::glam::Mat3> = ::glam::Mat3::from_mat2(m.into_inner()).into(); + output + } + /// Creates a 3x3 matrix from a 4x4 matrix, discarding the 4th row and column. + fn from_mat4(m: Val<::glam::Mat4>) -> Val<::glam::Mat3> { + let output: Val<::glam::Mat3> = ::glam::Mat3::from_mat4(m.into_inner()).into(); + output + } + /// Creates a 3x3 matrix from the minor of the given 4x4 matrix, discarding the `i`th column + /// and `j`th row. + /// # Panics + /// Panics if `i` or `j` is greater than 3. + fn from_mat4_minor(m: Val<::glam::Mat4>, i: usize, j: usize) -> Val<::glam::Mat3> { + let output: Val<::glam::Mat3> = ::glam::Mat3::from_mat4_minor( + m.into_inner(), + i, + j, + ) + .into(); + output + } + /// Creates a 3D rotation matrix from the given quaternion. + /// # Panics + /// Will panic if `rotation` is not normalized when `glam_assert` is enabled. + fn from_quat(rotation: Val<::glam::Quat>) -> Val<::glam::Mat3> { + let output: Val<::glam::Mat3> = ::glam::Mat3::from_quat(rotation.into_inner()) + .into(); + output + } + /// Creates a 3D rotation matrix from `angle` (in radians) around the x axis. + fn from_rotation_x(angle: f32) -> Val<::glam::Mat3> { + let output: Val<::glam::Mat3> = ::glam::Mat3::from_rotation_x(angle).into(); + output + } + /// Creates a 3D rotation matrix from `angle` (in radians) around the y axis. + fn from_rotation_y(angle: f32) -> Val<::glam::Mat3> { + let output: Val<::glam::Mat3> = ::glam::Mat3::from_rotation_y(angle).into(); + output + } + /// Creates a 3D rotation matrix from `angle` (in radians) around the z axis. + fn from_rotation_z(angle: f32) -> Val<::glam::Mat3> { + let output: Val<::glam::Mat3> = ::glam::Mat3::from_rotation_z(angle).into(); + output + } + /// Creates an affine transformation matrix from the given non-uniform 2D `scale`. + /// The resulting matrix can be used to transform 2D points and vectors. See + /// [`Self::transform_point2()`] and [`Self::transform_vector2()`]. + /// # Panics + /// Will panic if all elements of `scale` are zero when `glam_assert` is enabled. + fn from_scale(scale: Val<::glam::Vec2>) -> Val<::glam::Mat3> { + let output: Val<::glam::Mat3> = ::glam::Mat3::from_scale(scale.into_inner()) + .into(); + output + } + /// Creates an affine transformation matrix from the given 2D `scale`, rotation `angle` (in + /// radians) and `translation`. + /// The resulting matrix can be used to transform 2D points and vectors. See + /// [`Self::transform_point2()`] and [`Self::transform_vector2()`]. + fn from_scale_angle_translation( + scale: Val<::glam::Vec2>, + angle: f32, + translation: Val<::glam::Vec2>, + ) -> Val<::glam::Mat3> { + let output: Val<::glam::Mat3> = ::glam::Mat3::from_scale_angle_translation( + scale.into_inner(), + angle, + translation.into_inner(), + ) + .into(); + output + } + /// Creates an affine transformation matrix from the given 2D `translation`. + /// The resulting matrix can be used to transform 2D points and vectors. See + /// [`Self::transform_point2()`] and [`Self::transform_vector2()`]. + fn from_translation(translation: Val<::glam::Vec2>) -> Val<::glam::Mat3> { + let output: Val<::glam::Mat3> = ::glam::Mat3::from_translation( + translation.into_inner(), + ) + .into(); + output + } + /// Returns the inverse of `self`. + /// If the matrix is not invertible the returned matrix will be invalid. + /// # Panics + /// Will panic if the determinant of `self` is zero when `glam_assert` is enabled. + fn inverse(_self: Ref<::glam::Mat3>) -> Val<::glam::Mat3> { + let output: Val<::glam::Mat3> = ::glam::Mat3::inverse(&_self).into(); + output + } + /// Returns `true` if, and only if, all elements are finite. + /// If any element is either `NaN`, positive or negative infinity, this will return `false`. + fn is_finite(_self: Ref<::glam::Mat3>) -> bool { + let output: bool = ::glam::Mat3::is_finite(&_self).into(); + output + } + /// Returns `true` if any elements are `NaN`. + fn is_nan(_self: Ref<::glam::Mat3>) -> bool { + let output: bool = ::glam::Mat3::is_nan(&_self).into(); + output + } + fn mul(_self: Val<::glam::Mat3>, rhs: Val<::glam::Affine2>) -> Val<::glam::Mat3> { + let output: Val<::glam::Mat3> = <::glam::Mat3 as ::core::ops::Mul< + ::glam::Affine2, + >>::mul(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + fn mul(_self: Val<::glam::Mat3>, rhs: Val<::glam::Mat3>) -> Val<::glam::Mat3> { + let output: Val<::glam::Mat3> = <::glam::Mat3 as ::core::ops::Mul< + ::glam::Mat3, + >>::mul(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + fn mul(_self: Val<::glam::Mat3>, rhs: Val<::glam::Vec3>) -> Val<::glam::Vec3> { + let output: Val<::glam::Vec3> = <::glam::Mat3 as ::core::ops::Mul< + ::glam::Vec3, + >>::mul(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + fn mul(_self: Val<::glam::Mat3>, rhs: Val<::glam::Vec3A>) -> Val<::glam::Vec3A> { + let output: Val<::glam::Vec3A> = <::glam::Mat3 as ::core::ops::Mul< + ::glam::Vec3A, + >>::mul(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + fn mul(_self: Val<::glam::Mat3>, rhs: f32) -> Val<::glam::Mat3> { + let output: Val<::glam::Mat3> = <::glam::Mat3 as ::core::ops::Mul< + f32, + >>::mul(_self.into_inner(), rhs) + .into(); + output + } + /// Multiplies two 3x3 matrices. + fn mul_mat3(_self: Ref<::glam::Mat3>, rhs: Ref<::glam::Mat3>) -> Val<::glam::Mat3> { + let output: Val<::glam::Mat3> = ::glam::Mat3::mul_mat3(&_self, &rhs).into(); + output + } + /// Multiplies a 3x3 matrix by a scalar. + fn mul_scalar(_self: Ref<::glam::Mat3>, rhs: f32) -> Val<::glam::Mat3> { + let output: Val<::glam::Mat3> = ::glam::Mat3::mul_scalar(&_self, rhs).into(); + output + } + /// Transforms a 3D vector. + fn mul_vec3(_self: Ref<::glam::Mat3>, rhs: Val<::glam::Vec3>) -> Val<::glam::Vec3> { + let output: Val<::glam::Vec3> = ::glam::Mat3::mul_vec3(&_self, rhs.into_inner()) + .into(); + output + } + /// Transforms a [`Vec3A`]. + fn mul_vec3a( + _self: Ref<::glam::Mat3>, + rhs: Val<::glam::Vec3A>, + ) -> Val<::glam::Vec3A> { + let output: Val<::glam::Vec3A> = ::glam::Mat3::mul_vec3a( + &_self, + rhs.into_inner(), + ) + .into(); + output + } + fn neg(_self: Val<::glam::Mat3>) -> Val<::glam::Mat3> { + let output: Val<::glam::Mat3> = <::glam::Mat3 as ::core::ops::Neg>::neg( + _self.into_inner(), + ) + .into(); + output + } + /// Returns the matrix row for the given `index`. + /// # Panics + /// Panics if `index` is greater than 2. + fn row(_self: Ref<::glam::Mat3>, index: usize) -> Val<::glam::Vec3> { + let output: Val<::glam::Vec3> = ::glam::Mat3::row(&_self, index).into(); + output + } + fn sub(_self: Val<::glam::Mat3>, rhs: Val<::glam::Mat3>) -> Val<::glam::Mat3> { + let output: Val<::glam::Mat3> = <::glam::Mat3 as ::core::ops::Sub< + ::glam::Mat3, + >>::sub(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + /// Subtracts two 3x3 matrices. + fn sub_mat3(_self: Ref<::glam::Mat3>, rhs: Ref<::glam::Mat3>) -> Val<::glam::Mat3> { + let output: Val<::glam::Mat3> = ::glam::Mat3::sub_mat3(&_self, &rhs).into(); + output + } + /// Creates a `[f32; 9]` array storing data in column major order. + /// If you require data in row major order `transpose` the matrix first. + fn to_cols_array(_self: Ref<::glam::Mat3>) -> [f32; 9] { + let output: [f32; 9] = ::glam::Mat3::to_cols_array(&_self).into(); + output + } + /// Creates a `[[f32; 3]; 3]` 3D array storing data in column major order. + /// If you require data in row major order `transpose` the matrix first. + fn to_cols_array_2d(_self: Ref<::glam::Mat3>) -> [[f32; 3]; 3] { + let output: [[f32; 3]; 3] = ::glam::Mat3::to_cols_array_2d(&_self).into(); + output + } + /// Extract Euler angles with the given Euler rotation order. + /// Note if the input matrix contains scales, shears, or other non-rotation transformations then + /// the resulting Euler angles will be ill-defined. + /// # Panics + /// Will panic if any input matrix column is not normalized when `glam_assert` is enabled. + fn to_euler( + _self: Ref<::glam::Mat3>, + order: Val<::glam::EulerRot>, + ) -> (f32, f32, f32) { + let output: (f32, f32, f32) = ::glam::Mat3::to_euler(&_self, order.into_inner()) + .into(); + output + } + /// Transforms the given 2D vector as a point. + /// This is the equivalent of multiplying `rhs` as a 3D vector where `z` is `1`. + /// This method assumes that `self` contains a valid affine transform. + /// # Panics + /// Will panic if the 2nd row of `self` is not `(0, 0, 1)` when `glam_assert` is enabled. + fn transform_point2( + _self: Ref<::glam::Mat3>, + rhs: Val<::glam::Vec2>, + ) -> Val<::glam::Vec2> { + let output: Val<::glam::Vec2> = ::glam::Mat3::transform_point2( + &_self, + rhs.into_inner(), + ) + .into(); + output + } + /// Rotates the given 2D vector. + /// This is the equivalent of multiplying `rhs` as a 3D vector where `z` is `0`. + /// This method assumes that `self` contains a valid affine transform. + /// # Panics + /// Will panic if the 2nd row of `self` is not `(0, 0, 1)` when `glam_assert` is enabled. + fn transform_vector2( + _self: Ref<::glam::Mat3>, + rhs: Val<::glam::Vec2>, + ) -> Val<::glam::Vec2> { + let output: Val<::glam::Vec2> = ::glam::Mat3::transform_vector2( + &_self, + rhs.into_inner(), + ) + .into(); + output + } + /// Returns the transpose of `self`. + fn transpose(_self: Ref<::glam::Mat3>) -> Val<::glam::Mat3> { + let output: Val<::glam::Mat3> = ::glam::Mat3::transpose(&_self).into(); + output + } +} +#[script_bindings( + remote, + name = "mat_3_a_functions", + bms_core_path = "bevy_mod_scripting_core", + generated +)] +impl ::glam::Mat3A { + /// Takes the absolute value of each element in `self` + fn abs(_self: Ref<::glam::Mat3A>) -> Val<::glam::Mat3A> { + let output: Val<::glam::Mat3A> = ::glam::Mat3A::abs(&_self).into(); + output + } + /// Returns true if the absolute difference of all elements between `self` and `rhs` + /// is less than or equal to `max_abs_diff`. + /// This can be used to compare if two matrices contain similar elements. It works best + /// when comparing with a known value. The `max_abs_diff` that should be used used + /// depends on the values being compared against. + /// For more see + /// [comparing floating point numbers](https://randomascii.wordpress.com/2012/02/25/comparing-floating-point-numbers-2012-edition/). + fn abs_diff_eq( + _self: Ref<::glam::Mat3A>, + rhs: Val<::glam::Mat3A>, + max_abs_diff: f32, + ) -> bool { + let output: bool = ::glam::Mat3A::abs_diff_eq( + &_self, + rhs.into_inner(), + max_abs_diff, + ) + .into(); + output + } + fn add(_self: Val<::glam::Mat3A>, rhs: Val<::glam::Mat3A>) -> Val<::glam::Mat3A> { + let output: Val<::glam::Mat3A> = <::glam::Mat3A as ::core::ops::Add< + ::glam::Mat3A, + >>::add(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + /// Adds two 3x3 matrices. + fn add_mat3( + _self: Ref<::glam::Mat3A>, + rhs: Ref<::glam::Mat3A>, + ) -> Val<::glam::Mat3A> { + let output: Val<::glam::Mat3A> = ::glam::Mat3A::add_mat3(&_self, &rhs).into(); + output + } + fn as_dmat3(_self: Ref<::glam::Mat3A>) -> Val<::glam::DMat3> { + let output: Val<::glam::DMat3> = ::glam::Mat3A::as_dmat3(&_self).into(); + output + } + fn clone(_self: Ref<::glam::Mat3A>) -> Val<::glam::Mat3A> { + let output: Val<::glam::Mat3A> = <::glam::Mat3A as ::bevy_reflect::erased_serde::__private::serde::__private::Clone>::clone( + &_self, + ) + .into(); + output + } + /// Returns the matrix column for the given `index`. + /// # Panics + /// Panics if `index` is greater than 2. + fn col(_self: Ref<::glam::Mat3A>, index: usize) -> Val<::glam::Vec3A> { + let output: Val<::glam::Vec3A> = ::glam::Mat3A::col(&_self, index).into(); + output + } + /// Returns the determinant of `self`. + fn determinant(_self: Ref<::glam::Mat3A>) -> f32 { + let output: f32 = ::glam::Mat3A::determinant(&_self).into(); + output + } + fn div(_self: Val<::glam::Mat3A>, rhs: f32) -> Val<::glam::Mat3A> { + let output: Val<::glam::Mat3A> = <::glam::Mat3A as ::core::ops::Div< + f32, + >>::div(_self.into_inner(), rhs) + .into(); + output + } + /// Divides a 3x3 matrix by a scalar. + fn div_scalar(_self: Ref<::glam::Mat3A>, rhs: f32) -> Val<::glam::Mat3A> { + let output: Val<::glam::Mat3A> = ::glam::Mat3A::div_scalar(&_self, rhs).into(); + output + } + fn eq(_self: Ref<::glam::Mat3A>, rhs: Ref<::glam::Mat3A>) -> bool { + let output: bool = <::glam::Mat3A as ::core::cmp::PartialEq< + ::glam::Mat3A, + >>::eq(&_self, &rhs) + .into(); + output + } + /// Creates an affine transformation matrix from the given 2D rotation `angle` (in + /// radians). + /// The resulting matrix can be used to transform 2D points and vectors. See + /// [`Self::transform_point2()`] and [`Self::transform_vector2()`]. + fn from_angle(angle: f32) -> Val<::glam::Mat3A> { + let output: Val<::glam::Mat3A> = ::glam::Mat3A::from_angle(angle).into(); + output + } + /// Creates a 3D rotation matrix from a normalized rotation `axis` and `angle` (in + /// radians). + /// # Panics + /// Will panic if `axis` is not normalized when `glam_assert` is enabled. + fn from_axis_angle(axis: Val<::glam::Vec3>, angle: f32) -> Val<::glam::Mat3A> { + let output: Val<::glam::Mat3A> = ::glam::Mat3A::from_axis_angle( + axis.into_inner(), + angle, + ) + .into(); + output + } + /// Creates a 3x3 matrix from three column vectors. + fn from_cols( + x_axis: Val<::glam::Vec3A>, + y_axis: Val<::glam::Vec3A>, + z_axis: Val<::glam::Vec3A>, + ) -> Val<::glam::Mat3A> { + let output: Val<::glam::Mat3A> = ::glam::Mat3A::from_cols( + x_axis.into_inner(), + y_axis.into_inner(), + z_axis.into_inner(), + ) + .into(); + output + } + /// Creates a 3x3 matrix with its diagonal set to `diagonal` and all other entries set to 0. + fn from_diagonal(diagonal: Val<::glam::Vec3>) -> Val<::glam::Mat3A> { + let output: Val<::glam::Mat3A> = ::glam::Mat3A::from_diagonal( + diagonal.into_inner(), + ) + .into(); + output + } + /// Creates a 3D rotation matrix from the given euler rotation sequence and the angles (in + /// radians). + fn from_euler( + order: Val<::glam::EulerRot>, + a: f32, + b: f32, + c: f32, + ) -> Val<::glam::Mat3A> { + let output: Val<::glam::Mat3A> = ::glam::Mat3A::from_euler( + order.into_inner(), + a, + b, + c, + ) + .into(); + output + } + /// Creates an affine transformation matrix from the given 2x2 matrix. + /// The resulting matrix can be used to transform 2D points and vectors. See + /// [`Self::transform_point2()`] and [`Self::transform_vector2()`]. + fn from_mat2(m: Val<::glam::Mat2>) -> Val<::glam::Mat3A> { + let output: Val<::glam::Mat3A> = ::glam::Mat3A::from_mat2(m.into_inner()).into(); + output + } + /// Creates a 3x3 matrix from a 4x4 matrix, discarding the 4th row and column. + fn from_mat4(m: Val<::glam::Mat4>) -> Val<::glam::Mat3A> { + let output: Val<::glam::Mat3A> = ::glam::Mat3A::from_mat4(m.into_inner()).into(); + output + } + /// Creates a 3x3 matrix from the minor of the given 4x4 matrix, discarding the `i`th column + /// and `j`th row. + /// # Panics + /// Panics if `i` or `j` is greater than 3. + fn from_mat4_minor(m: Val<::glam::Mat4>, i: usize, j: usize) -> Val<::glam::Mat3A> { + let output: Val<::glam::Mat3A> = ::glam::Mat3A::from_mat4_minor( + m.into_inner(), + i, + j, + ) + .into(); + output + } + /// Creates a 3D rotation matrix from the given quaternion. + /// # Panics + /// Will panic if `rotation` is not normalized when `glam_assert` is enabled. + fn from_quat(rotation: Val<::glam::Quat>) -> Val<::glam::Mat3A> { + let output: Val<::glam::Mat3A> = ::glam::Mat3A::from_quat(rotation.into_inner()) + .into(); + output + } + /// Creates a 3D rotation matrix from `angle` (in radians) around the x axis. + fn from_rotation_x(angle: f32) -> Val<::glam::Mat3A> { + let output: Val<::glam::Mat3A> = ::glam::Mat3A::from_rotation_x(angle).into(); + output + } + /// Creates a 3D rotation matrix from `angle` (in radians) around the y axis. + fn from_rotation_y(angle: f32) -> Val<::glam::Mat3A> { + let output: Val<::glam::Mat3A> = ::glam::Mat3A::from_rotation_y(angle).into(); + output + } + /// Creates a 3D rotation matrix from `angle` (in radians) around the z axis. + fn from_rotation_z(angle: f32) -> Val<::glam::Mat3A> { + let output: Val<::glam::Mat3A> = ::glam::Mat3A::from_rotation_z(angle).into(); + output + } + /// Creates an affine transformation matrix from the given non-uniform 2D `scale`. + /// The resulting matrix can be used to transform 2D points and vectors. See + /// [`Self::transform_point2()`] and [`Self::transform_vector2()`]. + /// # Panics + /// Will panic if all elements of `scale` are zero when `glam_assert` is enabled. + fn from_scale(scale: Val<::glam::Vec2>) -> Val<::glam::Mat3A> { + let output: Val<::glam::Mat3A> = ::glam::Mat3A::from_scale(scale.into_inner()) + .into(); + output + } + /// Creates an affine transformation matrix from the given 2D `scale`, rotation `angle` (in + /// radians) and `translation`. + /// The resulting matrix can be used to transform 2D points and vectors. See + /// [`Self::transform_point2()`] and [`Self::transform_vector2()`]. + fn from_scale_angle_translation( + scale: Val<::glam::Vec2>, + angle: f32, + translation: Val<::glam::Vec2>, + ) -> Val<::glam::Mat3A> { + let output: Val<::glam::Mat3A> = ::glam::Mat3A::from_scale_angle_translation( + scale.into_inner(), + angle, + translation.into_inner(), + ) + .into(); + output + } + /// Creates an affine transformation matrix from the given 2D `translation`. + /// The resulting matrix can be used to transform 2D points and vectors. See + /// [`Self::transform_point2()`] and [`Self::transform_vector2()`]. + fn from_translation(translation: Val<::glam::Vec2>) -> Val<::glam::Mat3A> { + let output: Val<::glam::Mat3A> = ::glam::Mat3A::from_translation( + translation.into_inner(), + ) + .into(); + output + } + /// Returns the inverse of `self`. + /// If the matrix is not invertible the returned matrix will be invalid. + /// # Panics + /// Will panic if the determinant of `self` is zero when `glam_assert` is enabled. + fn inverse(_self: Ref<::glam::Mat3A>) -> Val<::glam::Mat3A> { + let output: Val<::glam::Mat3A> = ::glam::Mat3A::inverse(&_self).into(); + output + } + /// Returns `true` if, and only if, all elements are finite. + /// If any element is either `NaN`, positive or negative infinity, this will return `false`. + fn is_finite(_self: Ref<::glam::Mat3A>) -> bool { + let output: bool = ::glam::Mat3A::is_finite(&_self).into(); + output + } + /// Returns `true` if any elements are `NaN`. + fn is_nan(_self: Ref<::glam::Mat3A>) -> bool { + let output: bool = ::glam::Mat3A::is_nan(&_self).into(); + output + } + fn mul(_self: Val<::glam::Mat3A>, rhs: Val<::glam::Affine2>) -> Val<::glam::Mat3A> { + let output: Val<::glam::Mat3A> = <::glam::Mat3A as ::core::ops::Mul< + ::glam::Affine2, + >>::mul(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + fn mul(_self: Val<::glam::Mat3A>, rhs: Val<::glam::Mat3A>) -> Val<::glam::Mat3A> { + let output: Val<::glam::Mat3A> = <::glam::Mat3A as ::core::ops::Mul< + ::glam::Mat3A, + >>::mul(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + fn mul(_self: Val<::glam::Mat3A>, rhs: Val<::glam::Vec3>) -> Val<::glam::Vec3> { + let output: Val<::glam::Vec3> = <::glam::Mat3A as ::core::ops::Mul< + ::glam::Vec3, + >>::mul(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + fn mul(_self: Val<::glam::Mat3A>, rhs: Val<::glam::Vec3A>) -> Val<::glam::Vec3A> { + let output: Val<::glam::Vec3A> = <::glam::Mat3A as ::core::ops::Mul< + ::glam::Vec3A, + >>::mul(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + fn mul(_self: Val<::glam::Mat3A>, rhs: f32) -> Val<::glam::Mat3A> { + let output: Val<::glam::Mat3A> = <::glam::Mat3A as ::core::ops::Mul< + f32, + >>::mul(_self.into_inner(), rhs) + .into(); + output + } + /// Multiplies two 3x3 matrices. + fn mul_mat3( + _self: Ref<::glam::Mat3A>, + rhs: Ref<::glam::Mat3A>, + ) -> Val<::glam::Mat3A> { + let output: Val<::glam::Mat3A> = ::glam::Mat3A::mul_mat3(&_self, &rhs).into(); + output + } + /// Multiplies a 3x3 matrix by a scalar. + fn mul_scalar(_self: Ref<::glam::Mat3A>, rhs: f32) -> Val<::glam::Mat3A> { + let output: Val<::glam::Mat3A> = ::glam::Mat3A::mul_scalar(&_self, rhs).into(); + output + } + /// Transforms a 3D vector. + fn mul_vec3(_self: Ref<::glam::Mat3A>, rhs: Val<::glam::Vec3>) -> Val<::glam::Vec3> { + let output: Val<::glam::Vec3> = ::glam::Mat3A::mul_vec3(&_self, rhs.into_inner()) + .into(); + output + } + /// Transforms a [`Vec3A`]. + fn mul_vec3a( + _self: Ref<::glam::Mat3A>, + rhs: Val<::glam::Vec3A>, + ) -> Val<::glam::Vec3A> { + let output: Val<::glam::Vec3A> = ::glam::Mat3A::mul_vec3a( + &_self, + rhs.into_inner(), + ) + .into(); + output + } + fn neg(_self: Val<::glam::Mat3A>) -> Val<::glam::Mat3A> { + let output: Val<::glam::Mat3A> = <::glam::Mat3A as ::core::ops::Neg>::neg( + _self.into_inner(), + ) + .into(); + output + } + /// Returns the matrix row for the given `index`. + /// # Panics + /// Panics if `index` is greater than 2. + fn row(_self: Ref<::glam::Mat3A>, index: usize) -> Val<::glam::Vec3A> { + let output: Val<::glam::Vec3A> = ::glam::Mat3A::row(&_self, index).into(); + output + } + fn sub(_self: Val<::glam::Mat3A>, rhs: Val<::glam::Mat3A>) -> Val<::glam::Mat3A> { + let output: Val<::glam::Mat3A> = <::glam::Mat3A as ::core::ops::Sub< + ::glam::Mat3A, + >>::sub(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + /// Subtracts two 3x3 matrices. + fn sub_mat3( + _self: Ref<::glam::Mat3A>, + rhs: Ref<::glam::Mat3A>, + ) -> Val<::glam::Mat3A> { + let output: Val<::glam::Mat3A> = ::glam::Mat3A::sub_mat3(&_self, &rhs).into(); + output + } + /// Creates a `[f32; 9]` array storing data in column major order. + /// If you require data in row major order `transpose` the matrix first. + fn to_cols_array(_self: Ref<::glam::Mat3A>) -> [f32; 9] { + let output: [f32; 9] = ::glam::Mat3A::to_cols_array(&_self).into(); + output + } + /// Creates a `[[f32; 3]; 3]` 3D array storing data in column major order. + /// If you require data in row major order `transpose` the matrix first. + fn to_cols_array_2d(_self: Ref<::glam::Mat3A>) -> [[f32; 3]; 3] { + let output: [[f32; 3]; 3] = ::glam::Mat3A::to_cols_array_2d(&_self).into(); + output + } + /// Extract Euler angles with the given Euler rotation order. + /// Note if the input matrix contains scales, shears, or other non-rotation transformations then + /// the resulting Euler angles will be ill-defined. + /// # Panics + /// Will panic if any input matrix column is not normalized when `glam_assert` is enabled. + fn to_euler( + _self: Ref<::glam::Mat3A>, + order: Val<::glam::EulerRot>, + ) -> (f32, f32, f32) { + let output: (f32, f32, f32) = ::glam::Mat3A::to_euler(&_self, order.into_inner()) + .into(); + output + } + /// Transforms the given 2D vector as a point. + /// This is the equivalent of multiplying `rhs` as a 3D vector where `z` is `1`. + /// This method assumes that `self` contains a valid affine transform. + /// # Panics + /// Will panic if the 2nd row of `self` is not `(0, 0, 1)` when `glam_assert` is enabled. + fn transform_point2( + _self: Ref<::glam::Mat3A>, + rhs: Val<::glam::Vec2>, + ) -> Val<::glam::Vec2> { + let output: Val<::glam::Vec2> = ::glam::Mat3A::transform_point2( + &_self, + rhs.into_inner(), + ) + .into(); + output + } + /// Rotates the given 2D vector. + /// This is the equivalent of multiplying `rhs` as a 3D vector where `z` is `0`. + /// This method assumes that `self` contains a valid affine transform. + /// # Panics + /// Will panic if the 2nd row of `self` is not `(0, 0, 1)` when `glam_assert` is enabled. + fn transform_vector2( + _self: Ref<::glam::Mat3A>, + rhs: Val<::glam::Vec2>, + ) -> Val<::glam::Vec2> { + let output: Val<::glam::Vec2> = ::glam::Mat3A::transform_vector2( + &_self, + rhs.into_inner(), + ) + .into(); + output + } + /// Returns the transpose of `self`. + fn transpose(_self: Ref<::glam::Mat3A>) -> Val<::glam::Mat3A> { + let output: Val<::glam::Mat3A> = ::glam::Mat3A::transpose(&_self).into(); + output + } +} +#[script_bindings( + remote, + name = "mat_4_functions", + bms_core_path = "bevy_mod_scripting_core", + generated +)] +impl ::glam::Mat4 { + /// Takes the absolute value of each element in `self` + fn abs(_self: Ref<::glam::Mat4>) -> Val<::glam::Mat4> { + let output: Val<::glam::Mat4> = ::glam::Mat4::abs(&_self).into(); + output + } + /// Returns true if the absolute difference of all elements between `self` and `rhs` + /// is less than or equal to `max_abs_diff`. + /// This can be used to compare if two matrices contain similar elements. It works best + /// when comparing with a known value. The `max_abs_diff` that should be used used + /// depends on the values being compared against. + /// For more see + /// [comparing floating point numbers](https://randomascii.wordpress.com/2012/02/25/comparing-floating-point-numbers-2012-edition/). + fn abs_diff_eq( + _self: Ref<::glam::Mat4>, + rhs: Val<::glam::Mat4>, + max_abs_diff: f32, + ) -> bool { + let output: bool = ::glam::Mat4::abs_diff_eq( + &_self, + rhs.into_inner(), + max_abs_diff, + ) + .into(); + output + } + fn add(_self: Val<::glam::Mat4>, rhs: Val<::glam::Mat4>) -> Val<::glam::Mat4> { + let output: Val<::glam::Mat4> = <::glam::Mat4 as ::core::ops::Add< + ::glam::Mat4, + >>::add(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + /// Adds two 4x4 matrices. + fn add_mat4(_self: Ref<::glam::Mat4>, rhs: Ref<::glam::Mat4>) -> Val<::glam::Mat4> { + let output: Val<::glam::Mat4> = ::glam::Mat4::add_mat4(&_self, &rhs).into(); + output + } + fn as_dmat4(_self: Ref<::glam::Mat4>) -> Val<::glam::DMat4> { + let output: Val<::glam::DMat4> = ::glam::Mat4::as_dmat4(&_self).into(); + output + } + fn clone(_self: Ref<::glam::Mat4>) -> Val<::glam::Mat4> { + let output: Val<::glam::Mat4> = <::glam::Mat4 as ::bevy_reflect::erased_serde::__private::serde::__private::Clone>::clone( + &_self, + ) + .into(); + output + } + /// Returns the matrix column for the given `index`. + /// # Panics + /// Panics if `index` is greater than 3. + fn col(_self: Ref<::glam::Mat4>, index: usize) -> Val<::glam::Vec4> { + let output: Val<::glam::Vec4> = ::glam::Mat4::col(&_self, index).into(); + output + } + /// Returns the determinant of `self`. + fn determinant(_self: Ref<::glam::Mat4>) -> f32 { + let output: f32 = ::glam::Mat4::determinant(&_self).into(); + output + } + fn div(_self: Val<::glam::Mat4>, rhs: f32) -> Val<::glam::Mat4> { + let output: Val<::glam::Mat4> = <::glam::Mat4 as ::core::ops::Div< + f32, + >>::div(_self.into_inner(), rhs) + .into(); + output + } + /// Divides a 4x4 matrix by a scalar. + fn div_scalar(_self: Ref<::glam::Mat4>, rhs: f32) -> Val<::glam::Mat4> { + let output: Val<::glam::Mat4> = ::glam::Mat4::div_scalar(&_self, rhs).into(); + output + } + fn eq(_self: Ref<::glam::Mat4>, rhs: Ref<::glam::Mat4>) -> bool { + let output: bool = <::glam::Mat4 as ::core::cmp::PartialEq< + ::glam::Mat4, + >>::eq(&_self, &rhs) + .into(); + output + } + /// Creates an affine transformation matrix containing a 3D rotation around a normalized + /// rotation `axis` of `angle` (in radians). + /// The resulting matrix can be used to transform 3D points and vectors. See + /// [`Self::transform_point3()`] and [`Self::transform_vector3()`]. + /// # Panics + /// Will panic if `axis` is not normalized when `glam_assert` is enabled. + fn from_axis_angle(axis: Val<::glam::Vec3>, angle: f32) -> Val<::glam::Mat4> { + let output: Val<::glam::Mat4> = ::glam::Mat4::from_axis_angle( + axis.into_inner(), + angle, + ) + .into(); + output + } + /// Creates a 4x4 matrix from four column vectors. + fn from_cols( + x_axis: Val<::glam::Vec4>, + y_axis: Val<::glam::Vec4>, + z_axis: Val<::glam::Vec4>, + w_axis: Val<::glam::Vec4>, + ) -> Val<::glam::Mat4> { + let output: Val<::glam::Mat4> = ::glam::Mat4::from_cols( + x_axis.into_inner(), + y_axis.into_inner(), + z_axis.into_inner(), + w_axis.into_inner(), + ) + .into(); + output + } + /// Creates a 4x4 matrix with its diagonal set to `diagonal` and all other entries set to 0. + fn from_diagonal(diagonal: Val<::glam::Vec4>) -> Val<::glam::Mat4> { + let output: Val<::glam::Mat4> = ::glam::Mat4::from_diagonal( + diagonal.into_inner(), + ) + .into(); + output + } + /// Creates a affine transformation matrix containing a rotation from the given euler + /// rotation sequence and angles (in radians). + /// The resulting matrix can be used to transform 3D points and vectors. See + /// [`Self::transform_point3()`] and [`Self::transform_vector3()`]. + fn from_euler( + order: Val<::glam::EulerRot>, + a: f32, + b: f32, + c: f32, + ) -> Val<::glam::Mat4> { + let output: Val<::glam::Mat4> = ::glam::Mat4::from_euler( + order.into_inner(), + a, + b, + c, + ) + .into(); + output + } + /// Creates an affine transformation matrix from the given 3x3 linear transformation + /// matrix. + /// The resulting matrix can be used to transform 3D points and vectors. See + /// [`Self::transform_point3()`] and [`Self::transform_vector3()`]. + fn from_mat3(m: Val<::glam::Mat3>) -> Val<::glam::Mat4> { + let output: Val<::glam::Mat4> = ::glam::Mat4::from_mat3(m.into_inner()).into(); + output + } + /// Creates an affine transformation matrix from the given 3x3 linear transformation + /// matrix. + /// The resulting matrix can be used to transform 3D points and vectors. See + /// [`Self::transform_point3()`] and [`Self::transform_vector3()`]. + fn from_mat3a(m: Val<::glam::Mat3A>) -> Val<::glam::Mat4> { + let output: Val<::glam::Mat4> = ::glam::Mat4::from_mat3a(m.into_inner()).into(); + output + } + /// Creates an affine transformation matrix from the given `rotation` quaternion. + /// The resulting matrix can be used to transform 3D points and vectors. See + /// [`Self::transform_point3()`] and [`Self::transform_vector3()`]. + /// # Panics + /// Will panic if `rotation` is not normalized when `glam_assert` is enabled. + fn from_quat(rotation: Val<::glam::Quat>) -> Val<::glam::Mat4> { + let output: Val<::glam::Mat4> = ::glam::Mat4::from_quat(rotation.into_inner()) + .into(); + output + } + /// Creates an affine transformation matrix from the given 3D `translation`. + /// The resulting matrix can be used to transform 3D points and vectors. See + /// [`Self::transform_point3()`] and [`Self::transform_vector3()`]. + /// # Panics + /// Will panic if `rotation` is not normalized when `glam_assert` is enabled. + fn from_rotation_translation( + rotation: Val<::glam::Quat>, + translation: Val<::glam::Vec3>, + ) -> Val<::glam::Mat4> { + let output: Val<::glam::Mat4> = ::glam::Mat4::from_rotation_translation( + rotation.into_inner(), + translation.into_inner(), + ) + .into(); + output + } + /// Creates an affine transformation matrix containing a 3D rotation around the x axis of + /// `angle` (in radians). + /// The resulting matrix can be used to transform 3D points and vectors. See + /// [`Self::transform_point3()`] and [`Self::transform_vector3()`]. + fn from_rotation_x(angle: f32) -> Val<::glam::Mat4> { + let output: Val<::glam::Mat4> = ::glam::Mat4::from_rotation_x(angle).into(); + output + } + /// Creates an affine transformation matrix containing a 3D rotation around the y axis of + /// `angle` (in radians). + /// The resulting matrix can be used to transform 3D points and vectors. See + /// [`Self::transform_point3()`] and [`Self::transform_vector3()`]. + fn from_rotation_y(angle: f32) -> Val<::glam::Mat4> { + let output: Val<::glam::Mat4> = ::glam::Mat4::from_rotation_y(angle).into(); + output + } + /// Creates an affine transformation matrix containing a 3D rotation around the z axis of + /// `angle` (in radians). + /// The resulting matrix can be used to transform 3D points and vectors. See + /// [`Self::transform_point3()`] and [`Self::transform_vector3()`]. + fn from_rotation_z(angle: f32) -> Val<::glam::Mat4> { + let output: Val<::glam::Mat4> = ::glam::Mat4::from_rotation_z(angle).into(); + output + } + /// Creates an affine transformation matrix containing the given 3D non-uniform `scale`. + /// The resulting matrix can be used to transform 3D points and vectors. See + /// [`Self::transform_point3()`] and [`Self::transform_vector3()`]. + /// # Panics + /// Will panic if all elements of `scale` are zero when `glam_assert` is enabled. + fn from_scale(scale: Val<::glam::Vec3>) -> Val<::glam::Mat4> { + let output: Val<::glam::Mat4> = ::glam::Mat4::from_scale(scale.into_inner()) + .into(); + output + } + /// Creates an affine transformation matrix from the given 3D `scale`, `rotation` and + /// `translation`. + /// The resulting matrix can be used to transform 3D points and vectors. See + /// [`Self::transform_point3()`] and [`Self::transform_vector3()`]. + /// # Panics + /// Will panic if `rotation` is not normalized when `glam_assert` is enabled. + fn from_scale_rotation_translation( + scale: Val<::glam::Vec3>, + rotation: Val<::glam::Quat>, + translation: Val<::glam::Vec3>, + ) -> Val<::glam::Mat4> { + let output: Val<::glam::Mat4> = ::glam::Mat4::from_scale_rotation_translation( + scale.into_inner(), + rotation.into_inner(), + translation.into_inner(), + ) + .into(); + output + } + /// Creates an affine transformation matrix from the given 3D `translation`. + /// The resulting matrix can be used to transform 3D points and vectors. See + /// [`Self::transform_point3()`] and [`Self::transform_vector3()`]. + fn from_translation(translation: Val<::glam::Vec3>) -> Val<::glam::Mat4> { + let output: Val<::glam::Mat4> = ::glam::Mat4::from_translation( + translation.into_inner(), + ) + .into(); + output + } + /// Returns the inverse of `self`. + /// If the matrix is not invertible the returned matrix will be invalid. + /// # Panics + /// Will panic if the determinant of `self` is zero when `glam_assert` is enabled. + fn inverse(_self: Ref<::glam::Mat4>) -> Val<::glam::Mat4> { + let output: Val<::glam::Mat4> = ::glam::Mat4::inverse(&_self).into(); + output + } + /// Returns `true` if, and only if, all elements are finite. + /// If any element is either `NaN`, positive or negative infinity, this will return `false`. + fn is_finite(_self: Ref<::glam::Mat4>) -> bool { + let output: bool = ::glam::Mat4::is_finite(&_self).into(); + output + } + /// Returns `true` if any elements are `NaN`. + fn is_nan(_self: Ref<::glam::Mat4>) -> bool { + let output: bool = ::glam::Mat4::is_nan(&_self).into(); + output + } + /// Creates a left-handed view matrix using a camera position, an up direction, and a focal + /// point. + /// For a view coordinate system with `+X=right`, `+Y=up` and `+Z=forward`. + /// # Panics + /// Will panic if `up` is not normalized when `glam_assert` is enabled. + fn look_at_lh( + eye: Val<::glam::Vec3>, + center: Val<::glam::Vec3>, + up: Val<::glam::Vec3>, + ) -> Val<::glam::Mat4> { + let output: Val<::glam::Mat4> = ::glam::Mat4::look_at_lh( + eye.into_inner(), + center.into_inner(), + up.into_inner(), + ) + .into(); + output + } + /// Creates a right-handed view matrix using a camera position, an up direction, and a focal + /// point. + /// For a view coordinate system with `+X=right`, `+Y=up` and `+Z=back`. + /// # Panics + /// Will panic if `up` is not normalized when `glam_assert` is enabled. + fn look_at_rh( + eye: Val<::glam::Vec3>, + center: Val<::glam::Vec3>, + up: Val<::glam::Vec3>, + ) -> Val<::glam::Mat4> { + let output: Val<::glam::Mat4> = ::glam::Mat4::look_at_rh( + eye.into_inner(), + center.into_inner(), + up.into_inner(), + ) + .into(); + output + } + /// Creates a left-handed view matrix using a camera position, an up direction, and a facing + /// direction. + /// For a view coordinate system with `+X=right`, `+Y=up` and `+Z=forward`. + fn look_to_lh( + eye: Val<::glam::Vec3>, + dir: Val<::glam::Vec3>, + up: Val<::glam::Vec3>, + ) -> Val<::glam::Mat4> { + let output: Val<::glam::Mat4> = ::glam::Mat4::look_to_lh( + eye.into_inner(), + dir.into_inner(), + up.into_inner(), + ) + .into(); + output + } + /// Creates a right-handed view matrix using a camera position, an up direction, and a facing + /// direction. + /// For a view coordinate system with `+X=right`, `+Y=up` and `+Z=back`. + fn look_to_rh( + eye: Val<::glam::Vec3>, + dir: Val<::glam::Vec3>, + up: Val<::glam::Vec3>, + ) -> Val<::glam::Mat4> { + let output: Val<::glam::Mat4> = ::glam::Mat4::look_to_rh( + eye.into_inner(), + dir.into_inner(), + up.into_inner(), + ) + .into(); + output + } + fn mul(_self: Val<::glam::Mat4>, rhs: Val<::glam::Affine3A>) -> Val<::glam::Mat4> { + let output: Val<::glam::Mat4> = <::glam::Mat4 as ::core::ops::Mul< + ::glam::Affine3A, + >>::mul(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + fn mul(_self: Val<::glam::Mat4>, rhs: Val<::glam::Mat4>) -> Val<::glam::Mat4> { + let output: Val<::glam::Mat4> = <::glam::Mat4 as ::core::ops::Mul< + ::glam::Mat4, + >>::mul(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + fn mul(_self: Val<::glam::Mat4>, rhs: Val<::glam::Vec4>) -> Val<::glam::Vec4> { + let output: Val<::glam::Vec4> = <::glam::Mat4 as ::core::ops::Mul< + ::glam::Vec4, + >>::mul(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + fn mul(_self: Val<::glam::Mat4>, rhs: f32) -> Val<::glam::Mat4> { + let output: Val<::glam::Mat4> = <::glam::Mat4 as ::core::ops::Mul< + f32, + >>::mul(_self.into_inner(), rhs) + .into(); + output + } + /// Multiplies two 4x4 matrices. + fn mul_mat4(_self: Ref<::glam::Mat4>, rhs: Ref<::glam::Mat4>) -> Val<::glam::Mat4> { + let output: Val<::glam::Mat4> = ::glam::Mat4::mul_mat4(&_self, &rhs).into(); + output + } + /// Multiplies a 4x4 matrix by a scalar. + fn mul_scalar(_self: Ref<::glam::Mat4>, rhs: f32) -> Val<::glam::Mat4> { + let output: Val<::glam::Mat4> = ::glam::Mat4::mul_scalar(&_self, rhs).into(); + output + } + /// Transforms a 4D vector. + fn mul_vec4(_self: Ref<::glam::Mat4>, rhs: Val<::glam::Vec4>) -> Val<::glam::Vec4> { + let output: Val<::glam::Vec4> = ::glam::Mat4::mul_vec4(&_self, rhs.into_inner()) + .into(); + output + } + fn neg(_self: Val<::glam::Mat4>) -> Val<::glam::Mat4> { + let output: Val<::glam::Mat4> = <::glam::Mat4 as ::core::ops::Neg>::neg( + _self.into_inner(), + ) + .into(); + output + } + /// Creates a left-handed orthographic projection matrix with `[0,1]` depth range. + /// Useful to map a left-handed coordinate system to the normalized device coordinates that WebGPU/Direct3D/Metal expect. + fn orthographic_lh( + left: f32, + right: f32, + bottom: f32, + top: f32, + near: f32, + far: f32, + ) -> Val<::glam::Mat4> { + let output: Val<::glam::Mat4> = ::glam::Mat4::orthographic_lh( + left, + right, + bottom, + top, + near, + far, + ) + .into(); + output + } + /// Creates a right-handed orthographic projection matrix with `[0,1]` depth range. + /// Useful to map a right-handed coordinate system to the normalized device coordinates that WebGPU/Direct3D/Metal expect. + fn orthographic_rh( + left: f32, + right: f32, + bottom: f32, + top: f32, + near: f32, + far: f32, + ) -> Val<::glam::Mat4> { + let output: Val<::glam::Mat4> = ::glam::Mat4::orthographic_rh( + left, + right, + bottom, + top, + near, + far, + ) + .into(); + output + } + /// Creates a right-handed orthographic projection matrix with `[-1,1]` depth + /// range. This is the same as the OpenGL `glOrtho` function in OpenGL. + /// See + /// + /// Useful to map a right-handed coordinate system to the normalized device coordinates that OpenGL expects. + fn orthographic_rh_gl( + left: f32, + right: f32, + bottom: f32, + top: f32, + near: f32, + far: f32, + ) -> Val<::glam::Mat4> { + let output: Val<::glam::Mat4> = ::glam::Mat4::orthographic_rh_gl( + left, + right, + bottom, + top, + near, + far, + ) + .into(); + output + } + /// Creates an infinite left-handed perspective projection matrix with `[0,1]` depth range. + /// Like `perspective_lh`, but with an infinite value for `z_far`. + /// The result is that points near `z_near` are mapped to depth `0`, and as they move towards infinity the depth approaches `1`. + /// # Panics + /// Will panic if `z_near` or `z_far` are less than or equal to zero when `glam_assert` is + /// enabled. + fn perspective_infinite_lh( + fov_y_radians: f32, + aspect_ratio: f32, + z_near: f32, + ) -> Val<::glam::Mat4> { + let output: Val<::glam::Mat4> = ::glam::Mat4::perspective_infinite_lh( + fov_y_radians, + aspect_ratio, + z_near, + ) + .into(); + output + } + /// Creates an infinite reverse left-handed perspective projection matrix with `[0,1]` depth range. + /// Similar to `perspective_infinite_lh`, but maps `Z = z_near` to a depth of `1` and `Z = infinity` to a depth of `0`. + /// # Panics + /// Will panic if `z_near` is less than or equal to zero when `glam_assert` is enabled. + fn perspective_infinite_reverse_lh( + fov_y_radians: f32, + aspect_ratio: f32, + z_near: f32, + ) -> Val<::glam::Mat4> { + let output: Val<::glam::Mat4> = ::glam::Mat4::perspective_infinite_reverse_lh( + fov_y_radians, + aspect_ratio, + z_near, + ) + .into(); + output + } + /// Creates an infinite reverse right-handed perspective projection matrix with `[0,1]` depth range. + /// Similar to `perspective_infinite_rh`, but maps `Z = z_near` to a depth of `1` and `Z = infinity` to a depth of `0`. + /// # Panics + /// Will panic if `z_near` is less than or equal to zero when `glam_assert` is enabled. + fn perspective_infinite_reverse_rh( + fov_y_radians: f32, + aspect_ratio: f32, + z_near: f32, + ) -> Val<::glam::Mat4> { + let output: Val<::glam::Mat4> = ::glam::Mat4::perspective_infinite_reverse_rh( + fov_y_radians, + aspect_ratio, + z_near, + ) + .into(); + output + } + /// Creates an infinite right-handed perspective projection matrix with `[0,1]` depth range. + /// Like `perspective_rh`, but with an infinite value for `z_far`. + /// The result is that points near `z_near` are mapped to depth `0`, and as they move towards infinity the depth approaches `1`. + /// # Panics + /// Will panic if `z_near` or `z_far` are less than or equal to zero when `glam_assert` is + /// enabled. + fn perspective_infinite_rh( + fov_y_radians: f32, + aspect_ratio: f32, + z_near: f32, + ) -> Val<::glam::Mat4> { + let output: Val<::glam::Mat4> = ::glam::Mat4::perspective_infinite_rh( + fov_y_radians, + aspect_ratio, + z_near, + ) + .into(); + output + } + /// Creates a left-handed perspective projection matrix with `[0,1]` depth range. + /// Useful to map the standard left-handed coordinate system into what WebGPU/Metal/Direct3D expect. + /// # Panics + /// Will panic if `z_near` or `z_far` are less than or equal to zero when `glam_assert` is + /// enabled. + fn perspective_lh( + fov_y_radians: f32, + aspect_ratio: f32, + z_near: f32, + z_far: f32, + ) -> Val<::glam::Mat4> { + let output: Val<::glam::Mat4> = ::glam::Mat4::perspective_lh( + fov_y_radians, + aspect_ratio, + z_near, + z_far, + ) + .into(); + output + } + /// Creates a right-handed perspective projection matrix with `[0,1]` depth range. + /// Useful to map the standard right-handed coordinate system into what WebGPU/Metal/Direct3D expect. + /// # Panics + /// Will panic if `z_near` or `z_far` are less than or equal to zero when `glam_assert` is + /// enabled. + fn perspective_rh( + fov_y_radians: f32, + aspect_ratio: f32, + z_near: f32, + z_far: f32, + ) -> Val<::glam::Mat4> { + let output: Val<::glam::Mat4> = ::glam::Mat4::perspective_rh( + fov_y_radians, + aspect_ratio, + z_near, + z_far, + ) + .into(); + output + } + /// Creates a right-handed perspective projection matrix with `[-1,1]` depth range. + /// Useful to map the standard right-handed coordinate system into what OpenGL expects. + /// This is the same as the OpenGL `gluPerspective` function. + /// See + fn perspective_rh_gl( + fov_y_radians: f32, + aspect_ratio: f32, + z_near: f32, + z_far: f32, + ) -> Val<::glam::Mat4> { + let output: Val<::glam::Mat4> = ::glam::Mat4::perspective_rh_gl( + fov_y_radians, + aspect_ratio, + z_near, + z_far, + ) + .into(); + output + } + /// Transforms the given 3D vector as a point, applying perspective correction. + /// This is the equivalent of multiplying the 3D vector as a 4D vector where `w` is `1.0`. + /// The perspective divide is performed meaning the resulting 3D vector is divided by `w`. + /// This method assumes that `self` contains a projective transform. + fn project_point3( + _self: Ref<::glam::Mat4>, + rhs: Val<::glam::Vec3>, + ) -> Val<::glam::Vec3> { + let output: Val<::glam::Vec3> = ::glam::Mat4::project_point3( + &_self, + rhs.into_inner(), + ) + .into(); + output + } + /// Transforms the given [`Vec3A`] as a 3D point, applying perspective correction. + /// This is the equivalent of multiplying the [`Vec3A`] as a 4D vector where `w` is `1.0`. + /// The perspective divide is performed meaning the resulting 3D vector is divided by `w`. + /// This method assumes that `self` contains a projective transform. + fn project_point3a( + _self: Ref<::glam::Mat4>, + rhs: Val<::glam::Vec3A>, + ) -> Val<::glam::Vec3A> { + let output: Val<::glam::Vec3A> = ::glam::Mat4::project_point3a( + &_self, + rhs.into_inner(), + ) + .into(); + output + } + /// Returns the matrix row for the given `index`. + /// # Panics + /// Panics if `index` is greater than 3. + fn row(_self: Ref<::glam::Mat4>, index: usize) -> Val<::glam::Vec4> { + let output: Val<::glam::Vec4> = ::glam::Mat4::row(&_self, index).into(); + output + } + fn sub(_self: Val<::glam::Mat4>, rhs: Val<::glam::Mat4>) -> Val<::glam::Mat4> { + let output: Val<::glam::Mat4> = <::glam::Mat4 as ::core::ops::Sub< + ::glam::Mat4, + >>::sub(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + /// Subtracts two 4x4 matrices. + fn sub_mat4(_self: Ref<::glam::Mat4>, rhs: Ref<::glam::Mat4>) -> Val<::glam::Mat4> { + let output: Val<::glam::Mat4> = ::glam::Mat4::sub_mat4(&_self, &rhs).into(); + output + } + /// Creates a `[f32; 16]` array storing data in column major order. + /// If you require data in row major order `transpose` the matrix first. + fn to_cols_array(_self: Ref<::glam::Mat4>) -> [f32; 16] { + let output: [f32; 16] = ::glam::Mat4::to_cols_array(&_self).into(); + output + } + /// Creates a `[[f32; 4]; 4]` 4D array storing data in column major order. + /// If you require data in row major order `transpose` the matrix first. + fn to_cols_array_2d(_self: Ref<::glam::Mat4>) -> [[f32; 4]; 4] { + let output: [[f32; 4]; 4] = ::glam::Mat4::to_cols_array_2d(&_self).into(); + output + } + /// Extract Euler angles with the given Euler rotation order. + /// Note if the upper 3x3 matrix contain scales, shears, or other non-rotation transformations + /// then the resulting Euler angles will be ill-defined. + /// # Panics + /// Will panic if any column of the upper 3x3 rotation matrix is not normalized when + /// `glam_assert` is enabled. + fn to_euler( + _self: Ref<::glam::Mat4>, + order: Val<::glam::EulerRot>, + ) -> (f32, f32, f32) { + let output: (f32, f32, f32) = ::glam::Mat4::to_euler(&_self, order.into_inner()) + .into(); + output + } + /// Transforms the given 3D vector as a point. + /// This is the equivalent of multiplying the 3D vector as a 4D vector where `w` is + /// `1.0`. + /// This method assumes that `self` contains a valid affine transform. It does not perform + /// a perspective divide, if `self` contains a perspective transform, or if you are unsure, + /// the [`Self::project_point3()`] method should be used instead. + /// # Panics + /// Will panic if the 3rd row of `self` is not `(0, 0, 0, 1)` when `glam_assert` is enabled. + fn transform_point3( + _self: Ref<::glam::Mat4>, + rhs: Val<::glam::Vec3>, + ) -> Val<::glam::Vec3> { + let output: Val<::glam::Vec3> = ::glam::Mat4::transform_point3( + &_self, + rhs.into_inner(), + ) + .into(); + output + } + /// Transforms the given [`Vec3A`] as 3D point. + /// This is the equivalent of multiplying the [`Vec3A`] as a 4D vector where `w` is `1.0`. + fn transform_point3a( + _self: Ref<::glam::Mat4>, + rhs: Val<::glam::Vec3A>, + ) -> Val<::glam::Vec3A> { + let output: Val<::glam::Vec3A> = ::glam::Mat4::transform_point3a( + &_self, + rhs.into_inner(), + ) + .into(); + output + } + /// Transforms the give 3D vector as a direction. + /// This is the equivalent of multiplying the 3D vector as a 4D vector where `w` is + /// `0.0`. + /// This method assumes that `self` contains a valid affine transform. + /// # Panics + /// Will panic if the 3rd row of `self` is not `(0, 0, 0, 1)` when `glam_assert` is enabled. + fn transform_vector3( + _self: Ref<::glam::Mat4>, + rhs: Val<::glam::Vec3>, + ) -> Val<::glam::Vec3> { + let output: Val<::glam::Vec3> = ::glam::Mat4::transform_vector3( + &_self, + rhs.into_inner(), + ) + .into(); + output + } + /// Transforms the give [`Vec3A`] as 3D vector. + /// This is the equivalent of multiplying the [`Vec3A`] as a 4D vector where `w` is `0.0`. + fn transform_vector3a( + _self: Ref<::glam::Mat4>, + rhs: Val<::glam::Vec3A>, + ) -> Val<::glam::Vec3A> { + let output: Val<::glam::Vec3A> = ::glam::Mat4::transform_vector3a( + &_self, + rhs.into_inner(), + ) + .into(); + output + } + /// Returns the transpose of `self`. + fn transpose(_self: Ref<::glam::Mat4>) -> Val<::glam::Mat4> { + let output: Val<::glam::Mat4> = ::glam::Mat4::transpose(&_self).into(); + output + } +} +#[script_bindings( + remote, + name = "d_mat_2_functions", + bms_core_path = "bevy_mod_scripting_core", + generated +)] +impl ::glam::DMat2 { + /// Takes the absolute value of each element in `self` + fn abs(_self: Ref<::glam::DMat2>) -> Val<::glam::DMat2> { + let output: Val<::glam::DMat2> = ::glam::DMat2::abs(&_self).into(); + output + } + /// Returns true if the absolute difference of all elements between `self` and `rhs` + /// is less than or equal to `max_abs_diff`. + /// This can be used to compare if two matrices contain similar elements. It works best + /// when comparing with a known value. The `max_abs_diff` that should be used used + /// depends on the values being compared against. + /// For more see + /// [comparing floating point numbers](https://randomascii.wordpress.com/2012/02/25/comparing-floating-point-numbers-2012-edition/). + fn abs_diff_eq( + _self: Ref<::glam::DMat2>, + rhs: Val<::glam::DMat2>, + max_abs_diff: f64, + ) -> bool { + let output: bool = ::glam::DMat2::abs_diff_eq( + &_self, + rhs.into_inner(), + max_abs_diff, + ) + .into(); + output + } + fn add(_self: Val<::glam::DMat2>, rhs: Val<::glam::DMat2>) -> Val<::glam::DMat2> { + let output: Val<::glam::DMat2> = <::glam::DMat2 as ::core::ops::Add< + ::glam::DMat2, + >>::add(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + /// Adds two 2x2 matrices. + fn add_mat2( + _self: Ref<::glam::DMat2>, + rhs: Ref<::glam::DMat2>, + ) -> Val<::glam::DMat2> { + let output: Val<::glam::DMat2> = ::glam::DMat2::add_mat2(&_self, &rhs).into(); + output + } + fn as_mat2(_self: Ref<::glam::DMat2>) -> Val<::glam::Mat2> { + let output: Val<::glam::Mat2> = ::glam::DMat2::as_mat2(&_self).into(); + output + } + fn clone(_self: Ref<::glam::DMat2>) -> Val<::glam::DMat2> { + let output: Val<::glam::DMat2> = <::glam::DMat2 as ::bevy_reflect::erased_serde::__private::serde::__private::Clone>::clone( + &_self, + ) + .into(); + output + } + /// Returns the matrix column for the given `index`. + /// # Panics + /// Panics if `index` is greater than 1. + fn col(_self: Ref<::glam::DMat2>, index: usize) -> Val<::glam::DVec2> { + let output: Val<::glam::DVec2> = ::glam::DMat2::col(&_self, index).into(); + output + } + /// Returns the determinant of `self`. + fn determinant(_self: Ref<::glam::DMat2>) -> f64 { + let output: f64 = ::glam::DMat2::determinant(&_self).into(); + output + } + fn div(_self: Val<::glam::DMat2>, rhs: f64) -> Val<::glam::DMat2> { + let output: Val<::glam::DMat2> = <::glam::DMat2 as ::core::ops::Div< + f64, + >>::div(_self.into_inner(), rhs) + .into(); + output + } + /// Divides a 2x2 matrix by a scalar. + fn div_scalar(_self: Ref<::glam::DMat2>, rhs: f64) -> Val<::glam::DMat2> { + let output: Val<::glam::DMat2> = ::glam::DMat2::div_scalar(&_self, rhs).into(); + output + } + fn eq(_self: Ref<::glam::DMat2>, rhs: Ref<::glam::DMat2>) -> bool { + let output: bool = <::glam::DMat2 as ::core::cmp::PartialEq< + ::glam::DMat2, + >>::eq(&_self, &rhs) + .into(); + output + } + /// Creates a 2x2 matrix containing a rotation of `angle` (in radians). + fn from_angle(angle: f64) -> Val<::glam::DMat2> { + let output: Val<::glam::DMat2> = ::glam::DMat2::from_angle(angle).into(); + output + } + /// Creates a 2x2 matrix from two column vectors. + fn from_cols( + x_axis: Val<::glam::DVec2>, + y_axis: Val<::glam::DVec2>, + ) -> Val<::glam::DMat2> { + let output: Val<::glam::DMat2> = ::glam::DMat2::from_cols( + x_axis.into_inner(), + y_axis.into_inner(), + ) + .into(); + output + } + /// Creates a 2x2 matrix with its diagonal set to `diagonal` and all other entries set to 0. + fn from_diagonal(diagonal: Val<::glam::DVec2>) -> Val<::glam::DMat2> { + let output: Val<::glam::DMat2> = ::glam::DMat2::from_diagonal( + diagonal.into_inner(), + ) + .into(); + output + } + /// Creates a 2x2 matrix from a 3x3 matrix, discarding the 2nd row and column. + fn from_mat3(m: Val<::glam::DMat3>) -> Val<::glam::DMat2> { + let output: Val<::glam::DMat2> = ::glam::DMat2::from_mat3(m.into_inner()).into(); + output + } + /// Creates a 2x2 matrix from the minor of the given 3x3 matrix, discarding the `i`th column + /// and `j`th row. + /// # Panics + /// Panics if `i` or `j` is greater than 2. + fn from_mat3_minor(m: Val<::glam::DMat3>, i: usize, j: usize) -> Val<::glam::DMat2> { + let output: Val<::glam::DMat2> = ::glam::DMat2::from_mat3_minor( + m.into_inner(), + i, + j, + ) + .into(); + output + } + /// Creates a 2x2 matrix containing the combining non-uniform `scale` and rotation of + /// `angle` (in radians). + fn from_scale_angle(scale: Val<::glam::DVec2>, angle: f64) -> Val<::glam::DMat2> { + let output: Val<::glam::DMat2> = ::glam::DMat2::from_scale_angle( + scale.into_inner(), + angle, + ) + .into(); + output + } + /// Returns the inverse of `self`. + /// If the matrix is not invertible the returned matrix will be invalid. + /// # Panics + /// Will panic if the determinant of `self` is zero when `glam_assert` is enabled. + fn inverse(_self: Ref<::glam::DMat2>) -> Val<::glam::DMat2> { + let output: Val<::glam::DMat2> = ::glam::DMat2::inverse(&_self).into(); + output + } + /// Returns `true` if, and only if, all elements are finite. + /// If any element is either `NaN`, positive or negative infinity, this will return `false`. + fn is_finite(_self: Ref<::glam::DMat2>) -> bool { + let output: bool = ::glam::DMat2::is_finite(&_self).into(); + output + } + /// Returns `true` if any elements are `NaN`. + fn is_nan(_self: Ref<::glam::DMat2>) -> bool { + let output: bool = ::glam::DMat2::is_nan(&_self).into(); + output + } + fn mul(_self: Val<::glam::DMat2>, rhs: Val<::glam::DMat2>) -> Val<::glam::DMat2> { + let output: Val<::glam::DMat2> = <::glam::DMat2 as ::core::ops::Mul< + ::glam::DMat2, + >>::mul(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + fn mul(_self: Val<::glam::DMat2>, rhs: Val<::glam::DVec2>) -> Val<::glam::DVec2> { + let output: Val<::glam::DVec2> = <::glam::DMat2 as ::core::ops::Mul< + ::glam::DVec2, + >>::mul(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + fn mul(_self: Val<::glam::DMat2>, rhs: f64) -> Val<::glam::DMat2> { + let output: Val<::glam::DMat2> = <::glam::DMat2 as ::core::ops::Mul< + f64, + >>::mul(_self.into_inner(), rhs) + .into(); + output + } + /// Multiplies two 2x2 matrices. + fn mul_mat2( + _self: Ref<::glam::DMat2>, + rhs: Ref<::glam::DMat2>, + ) -> Val<::glam::DMat2> { + let output: Val<::glam::DMat2> = ::glam::DMat2::mul_mat2(&_self, &rhs).into(); + output + } + /// Multiplies a 2x2 matrix by a scalar. + fn mul_scalar(_self: Ref<::glam::DMat2>, rhs: f64) -> Val<::glam::DMat2> { + let output: Val<::glam::DMat2> = ::glam::DMat2::mul_scalar(&_self, rhs).into(); + output + } + /// Transforms a 2D vector. + fn mul_vec2( + _self: Ref<::glam::DMat2>, + rhs: Val<::glam::DVec2>, + ) -> Val<::glam::DVec2> { + let output: Val<::glam::DVec2> = ::glam::DMat2::mul_vec2( + &_self, + rhs.into_inner(), + ) + .into(); + output + } + fn neg(_self: Val<::glam::DMat2>) -> Val<::glam::DMat2> { + let output: Val<::glam::DMat2> = <::glam::DMat2 as ::core::ops::Neg>::neg( + _self.into_inner(), + ) + .into(); + output + } + /// Returns the matrix row for the given `index`. + /// # Panics + /// Panics if `index` is greater than 1. + fn row(_self: Ref<::glam::DMat2>, index: usize) -> Val<::glam::DVec2> { + let output: Val<::glam::DVec2> = ::glam::DMat2::row(&_self, index).into(); + output + } + fn sub(_self: Val<::glam::DMat2>, rhs: Val<::glam::DMat2>) -> Val<::glam::DMat2> { + let output: Val<::glam::DMat2> = <::glam::DMat2 as ::core::ops::Sub< + ::glam::DMat2, + >>::sub(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + /// Subtracts two 2x2 matrices. + fn sub_mat2( + _self: Ref<::glam::DMat2>, + rhs: Ref<::glam::DMat2>, + ) -> Val<::glam::DMat2> { + let output: Val<::glam::DMat2> = ::glam::DMat2::sub_mat2(&_self, &rhs).into(); + output + } + /// Creates a `[f64; 4]` array storing data in column major order. + /// If you require data in row major order `transpose` the matrix first. + fn to_cols_array(_self: Ref<::glam::DMat2>) -> [f64; 4] { + let output: [f64; 4] = ::glam::DMat2::to_cols_array(&_self).into(); + output + } + /// Creates a `[[f64; 2]; 2]` 2D array storing data in column major order. + /// If you require data in row major order `transpose` the matrix first. + fn to_cols_array_2d(_self: Ref<::glam::DMat2>) -> [[f64; 2]; 2] { + let output: [[f64; 2]; 2] = ::glam::DMat2::to_cols_array_2d(&_self).into(); + output + } + /// Returns the transpose of `self`. + fn transpose(_self: Ref<::glam::DMat2>) -> Val<::glam::DMat2> { + let output: Val<::glam::DMat2> = ::glam::DMat2::transpose(&_self).into(); + output + } +} +#[script_bindings( + remote, + name = "d_mat_3_functions", + bms_core_path = "bevy_mod_scripting_core", + generated +)] +impl ::glam::DMat3 { + /// Takes the absolute value of each element in `self` + fn abs(_self: Ref<::glam::DMat3>) -> Val<::glam::DMat3> { + let output: Val<::glam::DMat3> = ::glam::DMat3::abs(&_self).into(); + output + } + /// Returns true if the absolute difference of all elements between `self` and `rhs` + /// is less than or equal to `max_abs_diff`. + /// This can be used to compare if two matrices contain similar elements. It works best + /// when comparing with a known value. The `max_abs_diff` that should be used used + /// depends on the values being compared against. + /// For more see + /// [comparing floating point numbers](https://randomascii.wordpress.com/2012/02/25/comparing-floating-point-numbers-2012-edition/). + fn abs_diff_eq( + _self: Ref<::glam::DMat3>, + rhs: Val<::glam::DMat3>, + max_abs_diff: f64, + ) -> bool { + let output: bool = ::glam::DMat3::abs_diff_eq( + &_self, + rhs.into_inner(), + max_abs_diff, + ) + .into(); + output + } + fn add(_self: Val<::glam::DMat3>, rhs: Val<::glam::DMat3>) -> Val<::glam::DMat3> { + let output: Val<::glam::DMat3> = <::glam::DMat3 as ::core::ops::Add< + ::glam::DMat3, + >>::add(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + /// Adds two 3x3 matrices. + fn add_mat3( + _self: Ref<::glam::DMat3>, + rhs: Ref<::glam::DMat3>, + ) -> Val<::glam::DMat3> { + let output: Val<::glam::DMat3> = ::glam::DMat3::add_mat3(&_self, &rhs).into(); + output + } + fn as_mat3(_self: Ref<::glam::DMat3>) -> Val<::glam::Mat3> { + let output: Val<::glam::Mat3> = ::glam::DMat3::as_mat3(&_self).into(); + output + } + fn clone(_self: Ref<::glam::DMat3>) -> Val<::glam::DMat3> { + let output: Val<::glam::DMat3> = <::glam::DMat3 as ::bevy_reflect::erased_serde::__private::serde::__private::Clone>::clone( + &_self, + ) + .into(); + output + } + /// Returns the matrix column for the given `index`. + /// # Panics + /// Panics if `index` is greater than 2. + fn col(_self: Ref<::glam::DMat3>, index: usize) -> Val<::glam::DVec3> { + let output: Val<::glam::DVec3> = ::glam::DMat3::col(&_self, index).into(); + output + } + /// Returns the determinant of `self`. + fn determinant(_self: Ref<::glam::DMat3>) -> f64 { + let output: f64 = ::glam::DMat3::determinant(&_self).into(); + output + } + fn div(_self: Val<::glam::DMat3>, rhs: f64) -> Val<::glam::DMat3> { + let output: Val<::glam::DMat3> = <::glam::DMat3 as ::core::ops::Div< + f64, + >>::div(_self.into_inner(), rhs) + .into(); + output + } + /// Divides a 3x3 matrix by a scalar. + fn div_scalar(_self: Ref<::glam::DMat3>, rhs: f64) -> Val<::glam::DMat3> { + let output: Val<::glam::DMat3> = ::glam::DMat3::div_scalar(&_self, rhs).into(); + output + } + fn eq(_self: Ref<::glam::DMat3>, rhs: Ref<::glam::DMat3>) -> bool { + let output: bool = <::glam::DMat3 as ::core::cmp::PartialEq< + ::glam::DMat3, + >>::eq(&_self, &rhs) + .into(); + output + } + /// Creates an affine transformation matrix from the given 2D rotation `angle` (in + /// radians). + /// The resulting matrix can be used to transform 2D points and vectors. See + /// [`Self::transform_point2()`] and [`Self::transform_vector2()`]. + fn from_angle(angle: f64) -> Val<::glam::DMat3> { + let output: Val<::glam::DMat3> = ::glam::DMat3::from_angle(angle).into(); + output + } + /// Creates a 3D rotation matrix from a normalized rotation `axis` and `angle` (in + /// radians). + /// # Panics + /// Will panic if `axis` is not normalized when `glam_assert` is enabled. + fn from_axis_angle(axis: Val<::glam::DVec3>, angle: f64) -> Val<::glam::DMat3> { + let output: Val<::glam::DMat3> = ::glam::DMat3::from_axis_angle( + axis.into_inner(), + angle, + ) + .into(); + output + } + /// Creates a 3x3 matrix from three column vectors. + fn from_cols( + x_axis: Val<::glam::DVec3>, + y_axis: Val<::glam::DVec3>, + z_axis: Val<::glam::DVec3>, + ) -> Val<::glam::DMat3> { + let output: Val<::glam::DMat3> = ::glam::DMat3::from_cols( + x_axis.into_inner(), + y_axis.into_inner(), + z_axis.into_inner(), + ) + .into(); + output + } + /// Creates a 3x3 matrix with its diagonal set to `diagonal` and all other entries set to 0. + fn from_diagonal(diagonal: Val<::glam::DVec3>) -> Val<::glam::DMat3> { + let output: Val<::glam::DMat3> = ::glam::DMat3::from_diagonal( + diagonal.into_inner(), + ) + .into(); + output + } + /// Creates a 3D rotation matrix from the given euler rotation sequence and the angles (in + /// radians). + fn from_euler( + order: Val<::glam::EulerRot>, + a: f64, + b: f64, + c: f64, + ) -> Val<::glam::DMat3> { + let output: Val<::glam::DMat3> = ::glam::DMat3::from_euler( + order.into_inner(), + a, + b, + c, + ) + .into(); + output + } + /// Creates an affine transformation matrix from the given 2x2 matrix. + /// The resulting matrix can be used to transform 2D points and vectors. See + /// [`Self::transform_point2()`] and [`Self::transform_vector2()`]. + fn from_mat2(m: Val<::glam::DMat2>) -> Val<::glam::DMat3> { + let output: Val<::glam::DMat3> = ::glam::DMat3::from_mat2(m.into_inner()).into(); + output + } + /// Creates a 3x3 matrix from a 4x4 matrix, discarding the 4th row and column. + fn from_mat4(m: Val<::glam::DMat4>) -> Val<::glam::DMat3> { + let output: Val<::glam::DMat3> = ::glam::DMat3::from_mat4(m.into_inner()).into(); + output + } + /// Creates a 3x3 matrix from the minor of the given 4x4 matrix, discarding the `i`th column + /// and `j`th row. + /// # Panics + /// Panics if `i` or `j` is greater than 3. + fn from_mat4_minor(m: Val<::glam::DMat4>, i: usize, j: usize) -> Val<::glam::DMat3> { + let output: Val<::glam::DMat3> = ::glam::DMat3::from_mat4_minor( + m.into_inner(), + i, + j, + ) + .into(); + output + } + /// Creates a 3D rotation matrix from the given quaternion. + /// # Panics + /// Will panic if `rotation` is not normalized when `glam_assert` is enabled. + fn from_quat(rotation: Val<::glam::DQuat>) -> Val<::glam::DMat3> { + let output: Val<::glam::DMat3> = ::glam::DMat3::from_quat(rotation.into_inner()) + .into(); + output + } + /// Creates a 3D rotation matrix from `angle` (in radians) around the x axis. + fn from_rotation_x(angle: f64) -> Val<::glam::DMat3> { + let output: Val<::glam::DMat3> = ::glam::DMat3::from_rotation_x(angle).into(); + output + } + /// Creates a 3D rotation matrix from `angle` (in radians) around the y axis. + fn from_rotation_y(angle: f64) -> Val<::glam::DMat3> { + let output: Val<::glam::DMat3> = ::glam::DMat3::from_rotation_y(angle).into(); + output + } + /// Creates a 3D rotation matrix from `angle` (in radians) around the z axis. + fn from_rotation_z(angle: f64) -> Val<::glam::DMat3> { + let output: Val<::glam::DMat3> = ::glam::DMat3::from_rotation_z(angle).into(); + output + } + /// Creates an affine transformation matrix from the given non-uniform 2D `scale`. + /// The resulting matrix can be used to transform 2D points and vectors. See + /// [`Self::transform_point2()`] and [`Self::transform_vector2()`]. + /// # Panics + /// Will panic if all elements of `scale` are zero when `glam_assert` is enabled. + fn from_scale(scale: Val<::glam::DVec2>) -> Val<::glam::DMat3> { + let output: Val<::glam::DMat3> = ::glam::DMat3::from_scale(scale.into_inner()) + .into(); + output + } + /// Creates an affine transformation matrix from the given 2D `scale`, rotation `angle` (in + /// radians) and `translation`. + /// The resulting matrix can be used to transform 2D points and vectors. See + /// [`Self::transform_point2()`] and [`Self::transform_vector2()`]. + fn from_scale_angle_translation( + scale: Val<::glam::DVec2>, + angle: f64, + translation: Val<::glam::DVec2>, + ) -> Val<::glam::DMat3> { + let output: Val<::glam::DMat3> = ::glam::DMat3::from_scale_angle_translation( + scale.into_inner(), + angle, + translation.into_inner(), + ) + .into(); + output + } + /// Creates an affine transformation matrix from the given 2D `translation`. + /// The resulting matrix can be used to transform 2D points and vectors. See + /// [`Self::transform_point2()`] and [`Self::transform_vector2()`]. + fn from_translation(translation: Val<::glam::DVec2>) -> Val<::glam::DMat3> { + let output: Val<::glam::DMat3> = ::glam::DMat3::from_translation( + translation.into_inner(), + ) + .into(); + output + } + /// Returns the inverse of `self`. + /// If the matrix is not invertible the returned matrix will be invalid. + /// # Panics + /// Will panic if the determinant of `self` is zero when `glam_assert` is enabled. + fn inverse(_self: Ref<::glam::DMat3>) -> Val<::glam::DMat3> { + let output: Val<::glam::DMat3> = ::glam::DMat3::inverse(&_self).into(); + output + } + /// Returns `true` if, and only if, all elements are finite. + /// If any element is either `NaN`, positive or negative infinity, this will return `false`. + fn is_finite(_self: Ref<::glam::DMat3>) -> bool { + let output: bool = ::glam::DMat3::is_finite(&_self).into(); + output + } + /// Returns `true` if any elements are `NaN`. + fn is_nan(_self: Ref<::glam::DMat3>) -> bool { + let output: bool = ::glam::DMat3::is_nan(&_self).into(); + output + } + fn mul(_self: Val<::glam::DMat3>, rhs: Val<::glam::DAffine2>) -> Val<::glam::DMat3> { + let output: Val<::glam::DMat3> = <::glam::DMat3 as ::core::ops::Mul< + ::glam::DAffine2, + >>::mul(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + fn mul(_self: Val<::glam::DMat3>, rhs: Val<::glam::DMat3>) -> Val<::glam::DMat3> { + let output: Val<::glam::DMat3> = <::glam::DMat3 as ::core::ops::Mul< + ::glam::DMat3, + >>::mul(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + fn mul(_self: Val<::glam::DMat3>, rhs: Val<::glam::DVec3>) -> Val<::glam::DVec3> { + let output: Val<::glam::DVec3> = <::glam::DMat3 as ::core::ops::Mul< + ::glam::DVec3, + >>::mul(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + fn mul(_self: Val<::glam::DMat3>, rhs: f64) -> Val<::glam::DMat3> { + let output: Val<::glam::DMat3> = <::glam::DMat3 as ::core::ops::Mul< + f64, + >>::mul(_self.into_inner(), rhs) + .into(); + output + } + /// Multiplies two 3x3 matrices. + fn mul_mat3( + _self: Ref<::glam::DMat3>, + rhs: Ref<::glam::DMat3>, + ) -> Val<::glam::DMat3> { + let output: Val<::glam::DMat3> = ::glam::DMat3::mul_mat3(&_self, &rhs).into(); + output + } + /// Multiplies a 3x3 matrix by a scalar. + fn mul_scalar(_self: Ref<::glam::DMat3>, rhs: f64) -> Val<::glam::DMat3> { + let output: Val<::glam::DMat3> = ::glam::DMat3::mul_scalar(&_self, rhs).into(); + output + } + /// Transforms a 3D vector. + fn mul_vec3( + _self: Ref<::glam::DMat3>, + rhs: Val<::glam::DVec3>, + ) -> Val<::glam::DVec3> { + let output: Val<::glam::DVec3> = ::glam::DMat3::mul_vec3( + &_self, + rhs.into_inner(), + ) + .into(); + output + } + fn neg(_self: Val<::glam::DMat3>) -> Val<::glam::DMat3> { + let output: Val<::glam::DMat3> = <::glam::DMat3 as ::core::ops::Neg>::neg( + _self.into_inner(), + ) + .into(); + output + } + /// Returns the matrix row for the given `index`. + /// # Panics + /// Panics if `index` is greater than 2. + fn row(_self: Ref<::glam::DMat3>, index: usize) -> Val<::glam::DVec3> { + let output: Val<::glam::DVec3> = ::glam::DMat3::row(&_self, index).into(); + output + } + fn sub(_self: Val<::glam::DMat3>, rhs: Val<::glam::DMat3>) -> Val<::glam::DMat3> { + let output: Val<::glam::DMat3> = <::glam::DMat3 as ::core::ops::Sub< + ::glam::DMat3, + >>::sub(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + /// Subtracts two 3x3 matrices. + fn sub_mat3( + _self: Ref<::glam::DMat3>, + rhs: Ref<::glam::DMat3>, + ) -> Val<::glam::DMat3> { + let output: Val<::glam::DMat3> = ::glam::DMat3::sub_mat3(&_self, &rhs).into(); + output + } + /// Creates a `[f64; 9]` array storing data in column major order. + /// If you require data in row major order `transpose` the matrix first. + fn to_cols_array(_self: Ref<::glam::DMat3>) -> [f64; 9] { + let output: [f64; 9] = ::glam::DMat3::to_cols_array(&_self).into(); + output + } + /// Creates a `[[f64; 3]; 3]` 3D array storing data in column major order. + /// If you require data in row major order `transpose` the matrix first. + fn to_cols_array_2d(_self: Ref<::glam::DMat3>) -> [[f64; 3]; 3] { + let output: [[f64; 3]; 3] = ::glam::DMat3::to_cols_array_2d(&_self).into(); + output + } + /// Extract Euler angles with the given Euler rotation order. + /// Note if the input matrix contains scales, shears, or other non-rotation transformations then + /// the resulting Euler angles will be ill-defined. + /// # Panics + /// Will panic if any input matrix column is not normalized when `glam_assert` is enabled. + fn to_euler( + _self: Ref<::glam::DMat3>, + order: Val<::glam::EulerRot>, + ) -> (f64, f64, f64) { + let output: (f64, f64, f64) = ::glam::DMat3::to_euler(&_self, order.into_inner()) + .into(); + output + } + /// Transforms the given 2D vector as a point. + /// This is the equivalent of multiplying `rhs` as a 3D vector where `z` is `1`. + /// This method assumes that `self` contains a valid affine transform. + /// # Panics + /// Will panic if the 2nd row of `self` is not `(0, 0, 1)` when `glam_assert` is enabled. + fn transform_point2( + _self: Ref<::glam::DMat3>, + rhs: Val<::glam::DVec2>, + ) -> Val<::glam::DVec2> { + let output: Val<::glam::DVec2> = ::glam::DMat3::transform_point2( + &_self, + rhs.into_inner(), + ) + .into(); + output + } + /// Rotates the given 2D vector. + /// This is the equivalent of multiplying `rhs` as a 3D vector where `z` is `0`. + /// This method assumes that `self` contains a valid affine transform. + /// # Panics + /// Will panic if the 2nd row of `self` is not `(0, 0, 1)` when `glam_assert` is enabled. + fn transform_vector2( + _self: Ref<::glam::DMat3>, + rhs: Val<::glam::DVec2>, + ) -> Val<::glam::DVec2> { + let output: Val<::glam::DVec2> = ::glam::DMat3::transform_vector2( + &_self, + rhs.into_inner(), + ) + .into(); + output + } + /// Returns the transpose of `self`. + fn transpose(_self: Ref<::glam::DMat3>) -> Val<::glam::DMat3> { + let output: Val<::glam::DMat3> = ::glam::DMat3::transpose(&_self).into(); + output + } +} +#[script_bindings( + remote, + name = "d_mat_4_functions", + bms_core_path = "bevy_mod_scripting_core", + generated +)] +impl ::glam::DMat4 { + /// Takes the absolute value of each element in `self` + fn abs(_self: Ref<::glam::DMat4>) -> Val<::glam::DMat4> { + let output: Val<::glam::DMat4> = ::glam::DMat4::abs(&_self).into(); + output + } + /// Returns true if the absolute difference of all elements between `self` and `rhs` + /// is less than or equal to `max_abs_diff`. + /// This can be used to compare if two matrices contain similar elements. It works best + /// when comparing with a known value. The `max_abs_diff` that should be used used + /// depends on the values being compared against. + /// For more see + /// [comparing floating point numbers](https://randomascii.wordpress.com/2012/02/25/comparing-floating-point-numbers-2012-edition/). + fn abs_diff_eq( + _self: Ref<::glam::DMat4>, + rhs: Val<::glam::DMat4>, + max_abs_diff: f64, + ) -> bool { + let output: bool = ::glam::DMat4::abs_diff_eq( + &_self, + rhs.into_inner(), + max_abs_diff, + ) + .into(); + output + } + fn add(_self: Val<::glam::DMat4>, rhs: Val<::glam::DMat4>) -> Val<::glam::DMat4> { + let output: Val<::glam::DMat4> = <::glam::DMat4 as ::core::ops::Add< + ::glam::DMat4, + >>::add(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + /// Adds two 4x4 matrices. + fn add_mat4( + _self: Ref<::glam::DMat4>, + rhs: Ref<::glam::DMat4>, + ) -> Val<::glam::DMat4> { + let output: Val<::glam::DMat4> = ::glam::DMat4::add_mat4(&_self, &rhs).into(); + output + } + fn as_mat4(_self: Ref<::glam::DMat4>) -> Val<::glam::Mat4> { + let output: Val<::glam::Mat4> = ::glam::DMat4::as_mat4(&_self).into(); + output + } + fn clone(_self: Ref<::glam::DMat4>) -> Val<::glam::DMat4> { + let output: Val<::glam::DMat4> = <::glam::DMat4 as ::bevy_reflect::erased_serde::__private::serde::__private::Clone>::clone( + &_self, + ) + .into(); + output + } + /// Returns the matrix column for the given `index`. + /// # Panics + /// Panics if `index` is greater than 3. + fn col(_self: Ref<::glam::DMat4>, index: usize) -> Val<::glam::DVec4> { + let output: Val<::glam::DVec4> = ::glam::DMat4::col(&_self, index).into(); + output + } + /// Returns the determinant of `self`. + fn determinant(_self: Ref<::glam::DMat4>) -> f64 { + let output: f64 = ::glam::DMat4::determinant(&_self).into(); + output + } + fn div(_self: Val<::glam::DMat4>, rhs: f64) -> Val<::glam::DMat4> { + let output: Val<::glam::DMat4> = <::glam::DMat4 as ::core::ops::Div< + f64, + >>::div(_self.into_inner(), rhs) + .into(); + output + } + /// Divides a 4x4 matrix by a scalar. + fn div_scalar(_self: Ref<::glam::DMat4>, rhs: f64) -> Val<::glam::DMat4> { + let output: Val<::glam::DMat4> = ::glam::DMat4::div_scalar(&_self, rhs).into(); + output + } + fn eq(_self: Ref<::glam::DMat4>, rhs: Ref<::glam::DMat4>) -> bool { + let output: bool = <::glam::DMat4 as ::core::cmp::PartialEq< + ::glam::DMat4, + >>::eq(&_self, &rhs) + .into(); + output + } + /// Creates an affine transformation matrix containing a 3D rotation around a normalized + /// rotation `axis` of `angle` (in radians). + /// The resulting matrix can be used to transform 3D points and vectors. See + /// [`Self::transform_point3()`] and [`Self::transform_vector3()`]. + /// # Panics + /// Will panic if `axis` is not normalized when `glam_assert` is enabled. + fn from_axis_angle(axis: Val<::glam::DVec3>, angle: f64) -> Val<::glam::DMat4> { + let output: Val<::glam::DMat4> = ::glam::DMat4::from_axis_angle( + axis.into_inner(), + angle, + ) + .into(); + output + } + /// Creates a 4x4 matrix from four column vectors. + fn from_cols( + x_axis: Val<::glam::DVec4>, + y_axis: Val<::glam::DVec4>, + z_axis: Val<::glam::DVec4>, + w_axis: Val<::glam::DVec4>, + ) -> Val<::glam::DMat4> { + let output: Val<::glam::DMat4> = ::glam::DMat4::from_cols( + x_axis.into_inner(), + y_axis.into_inner(), + z_axis.into_inner(), + w_axis.into_inner(), + ) + .into(); + output + } + /// Creates a 4x4 matrix with its diagonal set to `diagonal` and all other entries set to 0. + fn from_diagonal(diagonal: Val<::glam::DVec4>) -> Val<::glam::DMat4> { + let output: Val<::glam::DMat4> = ::glam::DMat4::from_diagonal( + diagonal.into_inner(), + ) + .into(); + output + } + /// Creates a affine transformation matrix containing a rotation from the given euler + /// rotation sequence and angles (in radians). + /// The resulting matrix can be used to transform 3D points and vectors. See + /// [`Self::transform_point3()`] and [`Self::transform_vector3()`]. + fn from_euler( + order: Val<::glam::EulerRot>, + a: f64, + b: f64, + c: f64, + ) -> Val<::glam::DMat4> { + let output: Val<::glam::DMat4> = ::glam::DMat4::from_euler( + order.into_inner(), + a, + b, + c, + ) + .into(); + output + } + /// Creates an affine transformation matrix from the given 3x3 linear transformation + /// matrix. + /// The resulting matrix can be used to transform 3D points and vectors. See + /// [`Self::transform_point3()`] and [`Self::transform_vector3()`]. + fn from_mat3(m: Val<::glam::DMat3>) -> Val<::glam::DMat4> { + let output: Val<::glam::DMat4> = ::glam::DMat4::from_mat3(m.into_inner()).into(); + output + } + /// Creates an affine transformation matrix from the given `rotation` quaternion. + /// The resulting matrix can be used to transform 3D points and vectors. See + /// [`Self::transform_point3()`] and [`Self::transform_vector3()`]. + /// # Panics + /// Will panic if `rotation` is not normalized when `glam_assert` is enabled. + fn from_quat(rotation: Val<::glam::DQuat>) -> Val<::glam::DMat4> { + let output: Val<::glam::DMat4> = ::glam::DMat4::from_quat(rotation.into_inner()) + .into(); + output + } + /// Creates an affine transformation matrix from the given 3D `translation`. + /// The resulting matrix can be used to transform 3D points and vectors. See + /// [`Self::transform_point3()`] and [`Self::transform_vector3()`]. + /// # Panics + /// Will panic if `rotation` is not normalized when `glam_assert` is enabled. + fn from_rotation_translation( + rotation: Val<::glam::DQuat>, + translation: Val<::glam::DVec3>, + ) -> Val<::glam::DMat4> { + let output: Val<::glam::DMat4> = ::glam::DMat4::from_rotation_translation( + rotation.into_inner(), + translation.into_inner(), + ) + .into(); + output + } + /// Creates an affine transformation matrix containing a 3D rotation around the x axis of + /// `angle` (in radians). + /// The resulting matrix can be used to transform 3D points and vectors. See + /// [`Self::transform_point3()`] and [`Self::transform_vector3()`]. + fn from_rotation_x(angle: f64) -> Val<::glam::DMat4> { + let output: Val<::glam::DMat4> = ::glam::DMat4::from_rotation_x(angle).into(); + output + } + /// Creates an affine transformation matrix containing a 3D rotation around the y axis of + /// `angle` (in radians). + /// The resulting matrix can be used to transform 3D points and vectors. See + /// [`Self::transform_point3()`] and [`Self::transform_vector3()`]. + fn from_rotation_y(angle: f64) -> Val<::glam::DMat4> { + let output: Val<::glam::DMat4> = ::glam::DMat4::from_rotation_y(angle).into(); + output + } + /// Creates an affine transformation matrix containing a 3D rotation around the z axis of + /// `angle` (in radians). + /// The resulting matrix can be used to transform 3D points and vectors. See + /// [`Self::transform_point3()`] and [`Self::transform_vector3()`]. + fn from_rotation_z(angle: f64) -> Val<::glam::DMat4> { + let output: Val<::glam::DMat4> = ::glam::DMat4::from_rotation_z(angle).into(); + output + } + /// Creates an affine transformation matrix containing the given 3D non-uniform `scale`. + /// The resulting matrix can be used to transform 3D points and vectors. See + /// [`Self::transform_point3()`] and [`Self::transform_vector3()`]. + /// # Panics + /// Will panic if all elements of `scale` are zero when `glam_assert` is enabled. + fn from_scale(scale: Val<::glam::DVec3>) -> Val<::glam::DMat4> { + let output: Val<::glam::DMat4> = ::glam::DMat4::from_scale(scale.into_inner()) + .into(); + output + } + /// Creates an affine transformation matrix from the given 3D `scale`, `rotation` and + /// `translation`. + /// The resulting matrix can be used to transform 3D points and vectors. See + /// [`Self::transform_point3()`] and [`Self::transform_vector3()`]. + /// # Panics + /// Will panic if `rotation` is not normalized when `glam_assert` is enabled. + fn from_scale_rotation_translation( + scale: Val<::glam::DVec3>, + rotation: Val<::glam::DQuat>, + translation: Val<::glam::DVec3>, + ) -> Val<::glam::DMat4> { + let output: Val<::glam::DMat4> = ::glam::DMat4::from_scale_rotation_translation( + scale.into_inner(), + rotation.into_inner(), + translation.into_inner(), + ) + .into(); + output + } + /// Creates an affine transformation matrix from the given 3D `translation`. + /// The resulting matrix can be used to transform 3D points and vectors. See + /// [`Self::transform_point3()`] and [`Self::transform_vector3()`]. + fn from_translation(translation: Val<::glam::DVec3>) -> Val<::glam::DMat4> { + let output: Val<::glam::DMat4> = ::glam::DMat4::from_translation( + translation.into_inner(), + ) + .into(); + output + } + /// Returns the inverse of `self`. + /// If the matrix is not invertible the returned matrix will be invalid. + /// # Panics + /// Will panic if the determinant of `self` is zero when `glam_assert` is enabled. + fn inverse(_self: Ref<::glam::DMat4>) -> Val<::glam::DMat4> { + let output: Val<::glam::DMat4> = ::glam::DMat4::inverse(&_self).into(); + output + } + /// Returns `true` if, and only if, all elements are finite. + /// If any element is either `NaN`, positive or negative infinity, this will return `false`. + fn is_finite(_self: Ref<::glam::DMat4>) -> bool { + let output: bool = ::glam::DMat4::is_finite(&_self).into(); + output + } + /// Returns `true` if any elements are `NaN`. + fn is_nan(_self: Ref<::glam::DMat4>) -> bool { + let output: bool = ::glam::DMat4::is_nan(&_self).into(); + output + } + /// Creates a left-handed view matrix using a camera position, an up direction, and a focal + /// point. + /// For a view coordinate system with `+X=right`, `+Y=up` and `+Z=forward`. + /// # Panics + /// Will panic if `up` is not normalized when `glam_assert` is enabled. + fn look_at_lh( + eye: Val<::glam::DVec3>, + center: Val<::glam::DVec3>, + up: Val<::glam::DVec3>, + ) -> Val<::glam::DMat4> { + let output: Val<::glam::DMat4> = ::glam::DMat4::look_at_lh( + eye.into_inner(), + center.into_inner(), + up.into_inner(), + ) + .into(); + output + } + /// Creates a right-handed view matrix using a camera position, an up direction, and a focal + /// point. + /// For a view coordinate system with `+X=right`, `+Y=up` and `+Z=back`. + /// # Panics + /// Will panic if `up` is not normalized when `glam_assert` is enabled. + fn look_at_rh( + eye: Val<::glam::DVec3>, + center: Val<::glam::DVec3>, + up: Val<::glam::DVec3>, + ) -> Val<::glam::DMat4> { + let output: Val<::glam::DMat4> = ::glam::DMat4::look_at_rh( + eye.into_inner(), + center.into_inner(), + up.into_inner(), + ) + .into(); + output + } + /// Creates a left-handed view matrix using a camera position, an up direction, and a facing + /// direction. + /// For a view coordinate system with `+X=right`, `+Y=up` and `+Z=forward`. + fn look_to_lh( + eye: Val<::glam::DVec3>, + dir: Val<::glam::DVec3>, + up: Val<::glam::DVec3>, + ) -> Val<::glam::DMat4> { + let output: Val<::glam::DMat4> = ::glam::DMat4::look_to_lh( + eye.into_inner(), + dir.into_inner(), + up.into_inner(), + ) + .into(); + output + } + /// Creates a right-handed view matrix using a camera position, an up direction, and a facing + /// direction. + /// For a view coordinate system with `+X=right`, `+Y=up` and `+Z=back`. + fn look_to_rh( + eye: Val<::glam::DVec3>, + dir: Val<::glam::DVec3>, + up: Val<::glam::DVec3>, + ) -> Val<::glam::DMat4> { + let output: Val<::glam::DMat4> = ::glam::DMat4::look_to_rh( + eye.into_inner(), + dir.into_inner(), + up.into_inner(), + ) + .into(); + output + } + fn mul(_self: Val<::glam::DMat4>, rhs: Val<::glam::DAffine3>) -> Val<::glam::DMat4> { + let output: Val<::glam::DMat4> = <::glam::DMat4 as ::core::ops::Mul< + ::glam::DAffine3, + >>::mul(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + fn mul(_self: Val<::glam::DMat4>, rhs: Val<::glam::DMat4>) -> Val<::glam::DMat4> { + let output: Val<::glam::DMat4> = <::glam::DMat4 as ::core::ops::Mul< + ::glam::DMat4, + >>::mul(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + fn mul(_self: Val<::glam::DMat4>, rhs: Val<::glam::DVec4>) -> Val<::glam::DVec4> { + let output: Val<::glam::DVec4> = <::glam::DMat4 as ::core::ops::Mul< + ::glam::DVec4, + >>::mul(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + fn mul(_self: Val<::glam::DMat4>, rhs: f64) -> Val<::glam::DMat4> { + let output: Val<::glam::DMat4> = <::glam::DMat4 as ::core::ops::Mul< + f64, + >>::mul(_self.into_inner(), rhs) + .into(); + output + } + /// Multiplies two 4x4 matrices. + fn mul_mat4( + _self: Ref<::glam::DMat4>, + rhs: Ref<::glam::DMat4>, + ) -> Val<::glam::DMat4> { + let output: Val<::glam::DMat4> = ::glam::DMat4::mul_mat4(&_self, &rhs).into(); + output + } + /// Multiplies a 4x4 matrix by a scalar. + fn mul_scalar(_self: Ref<::glam::DMat4>, rhs: f64) -> Val<::glam::DMat4> { + let output: Val<::glam::DMat4> = ::glam::DMat4::mul_scalar(&_self, rhs).into(); + output + } + /// Transforms a 4D vector. + fn mul_vec4( + _self: Ref<::glam::DMat4>, + rhs: Val<::glam::DVec4>, + ) -> Val<::glam::DVec4> { + let output: Val<::glam::DVec4> = ::glam::DMat4::mul_vec4( + &_self, + rhs.into_inner(), + ) + .into(); + output + } + fn neg(_self: Val<::glam::DMat4>) -> Val<::glam::DMat4> { + let output: Val<::glam::DMat4> = <::glam::DMat4 as ::core::ops::Neg>::neg( + _self.into_inner(), + ) + .into(); + output + } + /// Creates a left-handed orthographic projection matrix with `[0,1]` depth range. + /// Useful to map a left-handed coordinate system to the normalized device coordinates that WebGPU/Direct3D/Metal expect. + fn orthographic_lh( + left: f64, + right: f64, + bottom: f64, + top: f64, + near: f64, + far: f64, + ) -> Val<::glam::DMat4> { + let output: Val<::glam::DMat4> = ::glam::DMat4::orthographic_lh( + left, + right, + bottom, + top, + near, + far, + ) + .into(); + output + } + /// Creates a right-handed orthographic projection matrix with `[0,1]` depth range. + /// Useful to map a right-handed coordinate system to the normalized device coordinates that WebGPU/Direct3D/Metal expect. + fn orthographic_rh( + left: f64, + right: f64, + bottom: f64, + top: f64, + near: f64, + far: f64, + ) -> Val<::glam::DMat4> { + let output: Val<::glam::DMat4> = ::glam::DMat4::orthographic_rh( + left, + right, + bottom, + top, + near, + far, + ) + .into(); + output + } + /// Creates a right-handed orthographic projection matrix with `[-1,1]` depth + /// range. This is the same as the OpenGL `glOrtho` function in OpenGL. + /// See + /// + /// Useful to map a right-handed coordinate system to the normalized device coordinates that OpenGL expects. + fn orthographic_rh_gl( + left: f64, + right: f64, + bottom: f64, + top: f64, + near: f64, + far: f64, + ) -> Val<::glam::DMat4> { + let output: Val<::glam::DMat4> = ::glam::DMat4::orthographic_rh_gl( + left, + right, + bottom, + top, + near, + far, + ) + .into(); + output + } + /// Creates an infinite left-handed perspective projection matrix with `[0,1]` depth range. + /// Like `perspective_lh`, but with an infinite value for `z_far`. + /// The result is that points near `z_near` are mapped to depth `0`, and as they move towards infinity the depth approaches `1`. + /// # Panics + /// Will panic if `z_near` or `z_far` are less than or equal to zero when `glam_assert` is + /// enabled. + fn perspective_infinite_lh( + fov_y_radians: f64, + aspect_ratio: f64, + z_near: f64, + ) -> Val<::glam::DMat4> { + let output: Val<::glam::DMat4> = ::glam::DMat4::perspective_infinite_lh( + fov_y_radians, + aspect_ratio, + z_near, + ) + .into(); + output + } + /// Creates an infinite reverse left-handed perspective projection matrix with `[0,1]` depth range. + /// Similar to `perspective_infinite_lh`, but maps `Z = z_near` to a depth of `1` and `Z = infinity` to a depth of `0`. + /// # Panics + /// Will panic if `z_near` is less than or equal to zero when `glam_assert` is enabled. + fn perspective_infinite_reverse_lh( + fov_y_radians: f64, + aspect_ratio: f64, + z_near: f64, + ) -> Val<::glam::DMat4> { + let output: Val<::glam::DMat4> = ::glam::DMat4::perspective_infinite_reverse_lh( + fov_y_radians, + aspect_ratio, + z_near, + ) + .into(); + output + } + /// Creates an infinite reverse right-handed perspective projection matrix with `[0,1]` depth range. + /// Similar to `perspective_infinite_rh`, but maps `Z = z_near` to a depth of `1` and `Z = infinity` to a depth of `0`. + /// # Panics + /// Will panic if `z_near` is less than or equal to zero when `glam_assert` is enabled. + fn perspective_infinite_reverse_rh( + fov_y_radians: f64, + aspect_ratio: f64, + z_near: f64, + ) -> Val<::glam::DMat4> { + let output: Val<::glam::DMat4> = ::glam::DMat4::perspective_infinite_reverse_rh( + fov_y_radians, + aspect_ratio, + z_near, + ) + .into(); + output + } + /// Creates an infinite right-handed perspective projection matrix with `[0,1]` depth range. + /// Like `perspective_rh`, but with an infinite value for `z_far`. + /// The result is that points near `z_near` are mapped to depth `0`, and as they move towards infinity the depth approaches `1`. + /// # Panics + /// Will panic if `z_near` or `z_far` are less than or equal to zero when `glam_assert` is + /// enabled. + fn perspective_infinite_rh( + fov_y_radians: f64, + aspect_ratio: f64, + z_near: f64, + ) -> Val<::glam::DMat4> { + let output: Val<::glam::DMat4> = ::glam::DMat4::perspective_infinite_rh( + fov_y_radians, + aspect_ratio, + z_near, + ) + .into(); + output + } + /// Creates a left-handed perspective projection matrix with `[0,1]` depth range. + /// Useful to map the standard left-handed coordinate system into what WebGPU/Metal/Direct3D expect. + /// # Panics + /// Will panic if `z_near` or `z_far` are less than or equal to zero when `glam_assert` is + /// enabled. + fn perspective_lh( + fov_y_radians: f64, + aspect_ratio: f64, + z_near: f64, + z_far: f64, + ) -> Val<::glam::DMat4> { + let output: Val<::glam::DMat4> = ::glam::DMat4::perspective_lh( + fov_y_radians, + aspect_ratio, + z_near, + z_far, + ) + .into(); + output + } + /// Creates a right-handed perspective projection matrix with `[0,1]` depth range. + /// Useful to map the standard right-handed coordinate system into what WebGPU/Metal/Direct3D expect. + /// # Panics + /// Will panic if `z_near` or `z_far` are less than or equal to zero when `glam_assert` is + /// enabled. + fn perspective_rh( + fov_y_radians: f64, + aspect_ratio: f64, + z_near: f64, + z_far: f64, + ) -> Val<::glam::DMat4> { + let output: Val<::glam::DMat4> = ::glam::DMat4::perspective_rh( + fov_y_radians, + aspect_ratio, + z_near, + z_far, + ) + .into(); + output + } + /// Creates a right-handed perspective projection matrix with `[-1,1]` depth range. + /// Useful to map the standard right-handed coordinate system into what OpenGL expects. + /// This is the same as the OpenGL `gluPerspective` function. + /// See + fn perspective_rh_gl( + fov_y_radians: f64, + aspect_ratio: f64, + z_near: f64, + z_far: f64, + ) -> Val<::glam::DMat4> { + let output: Val<::glam::DMat4> = ::glam::DMat4::perspective_rh_gl( + fov_y_radians, + aspect_ratio, + z_near, + z_far, + ) + .into(); + output + } + /// Transforms the given 3D vector as a point, applying perspective correction. + /// This is the equivalent of multiplying the 3D vector as a 4D vector where `w` is `1.0`. + /// The perspective divide is performed meaning the resulting 3D vector is divided by `w`. + /// This method assumes that `self` contains a projective transform. + fn project_point3( + _self: Ref<::glam::DMat4>, + rhs: Val<::glam::DVec3>, + ) -> Val<::glam::DVec3> { + let output: Val<::glam::DVec3> = ::glam::DMat4::project_point3( + &_self, + rhs.into_inner(), + ) + .into(); + output + } + /// Returns the matrix row for the given `index`. + /// # Panics + /// Panics if `index` is greater than 3. + fn row(_self: Ref<::glam::DMat4>, index: usize) -> Val<::glam::DVec4> { + let output: Val<::glam::DVec4> = ::glam::DMat4::row(&_self, index).into(); + output + } + fn sub(_self: Val<::glam::DMat4>, rhs: Val<::glam::DMat4>) -> Val<::glam::DMat4> { + let output: Val<::glam::DMat4> = <::glam::DMat4 as ::core::ops::Sub< + ::glam::DMat4, + >>::sub(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + /// Subtracts two 4x4 matrices. + fn sub_mat4( + _self: Ref<::glam::DMat4>, + rhs: Ref<::glam::DMat4>, + ) -> Val<::glam::DMat4> { + let output: Val<::glam::DMat4> = ::glam::DMat4::sub_mat4(&_self, &rhs).into(); + output + } + /// Creates a `[f64; 16]` array storing data in column major order. + /// If you require data in row major order `transpose` the matrix first. + fn to_cols_array(_self: Ref<::glam::DMat4>) -> [f64; 16] { + let output: [f64; 16] = ::glam::DMat4::to_cols_array(&_self).into(); + output + } + /// Creates a `[[f64; 4]; 4]` 4D array storing data in column major order. + /// If you require data in row major order `transpose` the matrix first. + fn to_cols_array_2d(_self: Ref<::glam::DMat4>) -> [[f64; 4]; 4] { + let output: [[f64; 4]; 4] = ::glam::DMat4::to_cols_array_2d(&_self).into(); + output + } + /// Extract Euler angles with the given Euler rotation order. + /// Note if the upper 3x3 matrix contain scales, shears, or other non-rotation transformations + /// then the resulting Euler angles will be ill-defined. + /// # Panics + /// Will panic if any column of the upper 3x3 rotation matrix is not normalized when + /// `glam_assert` is enabled. + fn to_euler( + _self: Ref<::glam::DMat4>, + order: Val<::glam::EulerRot>, + ) -> (f64, f64, f64) { + let output: (f64, f64, f64) = ::glam::DMat4::to_euler(&_self, order.into_inner()) + .into(); + output + } + /// Transforms the given 3D vector as a point. + /// This is the equivalent of multiplying the 3D vector as a 4D vector where `w` is + /// `1.0`. + /// This method assumes that `self` contains a valid affine transform. It does not perform + /// a perspective divide, if `self` contains a perspective transform, or if you are unsure, + /// the [`Self::project_point3()`] method should be used instead. + /// # Panics + /// Will panic if the 3rd row of `self` is not `(0, 0, 0, 1)` when `glam_assert` is enabled. + fn transform_point3( + _self: Ref<::glam::DMat4>, + rhs: Val<::glam::DVec3>, + ) -> Val<::glam::DVec3> { + let output: Val<::glam::DVec3> = ::glam::DMat4::transform_point3( + &_self, + rhs.into_inner(), + ) + .into(); + output + } + /// Transforms the give 3D vector as a direction. + /// This is the equivalent of multiplying the 3D vector as a 4D vector where `w` is + /// `0.0`. + /// This method assumes that `self` contains a valid affine transform. + /// # Panics + /// Will panic if the 3rd row of `self` is not `(0, 0, 0, 1)` when `glam_assert` is enabled. + fn transform_vector3( + _self: Ref<::glam::DMat4>, + rhs: Val<::glam::DVec3>, + ) -> Val<::glam::DVec3> { + let output: Val<::glam::DVec3> = ::glam::DMat4::transform_vector3( + &_self, + rhs.into_inner(), + ) + .into(); + output + } + /// Returns the transpose of `self`. + fn transpose(_self: Ref<::glam::DMat4>) -> Val<::glam::DMat4> { + let output: Val<::glam::DMat4> = ::glam::DMat4::transpose(&_self).into(); + output + } +} +#[script_bindings( + remote, + name = "affine_2_functions", + bms_core_path = "bevy_mod_scripting_core", + generated +)] +impl ::glam::Affine2 { + /// Returns true if the absolute difference of all elements between `self` and `rhs` + /// is less than or equal to `max_abs_diff`. + /// This can be used to compare if two 3x4 matrices contain similar elements. It works + /// best when comparing with a known value. The `max_abs_diff` that should be used used + /// depends on the values being compared against. + /// For more see + /// [comparing floating point numbers](https://randomascii.wordpress.com/2012/02/25/comparing-floating-point-numbers-2012-edition/). + fn abs_diff_eq( + _self: Ref<::glam::Affine2>, + rhs: Val<::glam::Affine2>, + max_abs_diff: f32, + ) -> bool { + let output: bool = ::glam::Affine2::abs_diff_eq( + &_self, + rhs.into_inner(), + max_abs_diff, + ) + .into(); + output + } + fn clone(_self: Ref<::glam::Affine2>) -> Val<::glam::Affine2> { + let output: Val<::glam::Affine2> = <::glam::Affine2 as ::bevy_reflect::erased_serde::__private::serde::__private::Clone>::clone( + &_self, + ) + .into(); + output + } + fn eq(_self: Ref<::glam::Affine2>, rhs: Ref<::glam::Affine2>) -> bool { + let output: bool = <::glam::Affine2 as ::core::cmp::PartialEq< + ::glam::Affine2, + >>::eq(&_self, &rhs) + .into(); + output + } + /// Creates an affine transform from the given rotation `angle`. + fn from_angle(angle: f32) -> Val<::glam::Affine2> { + let output: Val<::glam::Affine2> = ::glam::Affine2::from_angle(angle).into(); + output + } + /// Creates an affine transform from the given 2D rotation `angle` (in radians) and + /// `translation`. + /// Equivalent to `Affine2::from_translation(translation) * Affine2::from_angle(angle)` + fn from_angle_translation( + angle: f32, + translation: Val<::glam::Vec2>, + ) -> Val<::glam::Affine2> { + let output: Val<::glam::Affine2> = ::glam::Affine2::from_angle_translation( + angle, + translation.into_inner(), + ) + .into(); + output + } + /// Creates an affine transform from three column vectors. + fn from_cols( + x_axis: Val<::glam::Vec2>, + y_axis: Val<::glam::Vec2>, + z_axis: Val<::glam::Vec2>, + ) -> Val<::glam::Affine2> { + let output: Val<::glam::Affine2> = ::glam::Affine2::from_cols( + x_axis.into_inner(), + y_axis.into_inner(), + z_axis.into_inner(), + ) + .into(); + output + } + /// Creates an affine transform from a 2x2 matrix (expressing scale, shear and rotation) + fn from_mat2(matrix2: Val<::glam::Mat2>) -> Val<::glam::Affine2> { + let output: Val<::glam::Affine2> = ::glam::Affine2::from_mat2( + matrix2.into_inner(), + ) + .into(); + output + } + /// Creates an affine transform from a 2x2 matrix (expressing scale, shear and rotation) and a + /// translation vector. + /// Equivalent to + /// `Affine2::from_translation(translation) * Affine2::from_mat2(mat2)` + fn from_mat2_translation( + matrix2: Val<::glam::Mat2>, + translation: Val<::glam::Vec2>, + ) -> Val<::glam::Affine2> { + let output: Val<::glam::Affine2> = ::glam::Affine2::from_mat2_translation( + matrix2.into_inner(), + translation.into_inner(), + ) + .into(); + output + } + /// The given `Mat3` must be an affine transform, + fn from_mat3(m: Val<::glam::Mat3>) -> Val<::glam::Affine2> { + let output: Val<::glam::Affine2> = ::glam::Affine2::from_mat3(m.into_inner()) + .into(); + output + } + /// The given [`Mat3A`] must be an affine transform, + fn from_mat3a(m: Val<::glam::Mat3A>) -> Val<::glam::Affine2> { + let output: Val<::glam::Affine2> = ::glam::Affine2::from_mat3a(m.into_inner()) + .into(); + output + } + /// Creates an affine transform that changes scale. + /// Note that if any scale is zero the transform will be non-invertible. + fn from_scale(scale: Val<::glam::Vec2>) -> Val<::glam::Affine2> { + let output: Val<::glam::Affine2> = ::glam::Affine2::from_scale( + scale.into_inner(), + ) + .into(); + output + } + /// Creates an affine transform from the given 2D `scale`, rotation `angle` (in radians) and + /// `translation`. + /// Equivalent to `Affine2::from_translation(translation) * + /// Affine2::from_angle(angle) * Affine2::from_scale(scale)` + fn from_scale_angle_translation( + scale: Val<::glam::Vec2>, + angle: f32, + translation: Val<::glam::Vec2>, + ) -> Val<::glam::Affine2> { + let output: Val<::glam::Affine2> = ::glam::Affine2::from_scale_angle_translation( + scale.into_inner(), + angle, + translation.into_inner(), + ) + .into(); + output + } + /// Creates an affine transformation from the given 2D `translation`. + fn from_translation(translation: Val<::glam::Vec2>) -> Val<::glam::Affine2> { + let output: Val<::glam::Affine2> = ::glam::Affine2::from_translation( + translation.into_inner(), + ) + .into(); + output + } + /// Return the inverse of this transform. + /// Note that if the transform is not invertible the result will be invalid. + fn inverse(_self: Ref<::glam::Affine2>) -> Val<::glam::Affine2> { + let output: Val<::glam::Affine2> = ::glam::Affine2::inverse(&_self).into(); + output + } + /// Returns `true` if, and only if, all elements are finite. + /// If any element is either `NaN`, positive or negative infinity, this will return + /// `false`. + fn is_finite(_self: Ref<::glam::Affine2>) -> bool { + let output: bool = ::glam::Affine2::is_finite(&_self).into(); + output + } + /// Returns `true` if any elements are `NaN`. + fn is_nan(_self: Ref<::glam::Affine2>) -> bool { + let output: bool = ::glam::Affine2::is_nan(&_self).into(); + output + } + fn mul( + _self: Val<::glam::Affine2>, + rhs: Val<::glam::Affine2>, + ) -> Val<::glam::Affine2> { + let output: Val<::glam::Affine2> = <::glam::Affine2 as ::core::ops::Mul< + ::glam::Affine2, + >>::mul(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + fn mul(_self: Val<::glam::Affine2>, rhs: Val<::glam::Mat3>) -> Val<::glam::Mat3> { + let output: Val<::glam::Mat3> = <::glam::Affine2 as ::core::ops::Mul< + ::glam::Mat3, + >>::mul(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + fn mul(_self: Val<::glam::Affine2>, rhs: Val<::glam::Mat3A>) -> Val<::glam::Mat3A> { + let output: Val<::glam::Mat3A> = <::glam::Affine2 as ::core::ops::Mul< + ::glam::Mat3A, + >>::mul(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + /// Creates a `[f32; 6]` array storing data in column major order. + fn to_cols_array(_self: Ref<::glam::Affine2>) -> [f32; 6] { + let output: [f32; 6] = ::glam::Affine2::to_cols_array(&_self).into(); + output + } + /// Creates a `[[f32; 2]; 3]` 2D array storing data in + /// column major order. + /// If you require data in row major order `transpose` the matrix first. + fn to_cols_array_2d(_self: Ref<::glam::Affine2>) -> [[f32; 2]; 3] { + let output: [[f32; 2]; 3] = ::glam::Affine2::to_cols_array_2d(&_self).into(); + output + } + /// Transforms the given 2D point, applying shear, scale, rotation and translation. + fn transform_point2( + _self: Ref<::glam::Affine2>, + rhs: Val<::glam::Vec2>, + ) -> Val<::glam::Vec2> { + let output: Val<::glam::Vec2> = ::glam::Affine2::transform_point2( + &_self, + rhs.into_inner(), + ) + .into(); + output + } + /// Transforms the given 2D vector, applying shear, scale and rotation (but NOT + /// translation). + /// To also apply translation, use [`Self::transform_point2()`] instead. + fn transform_vector2( + _self: Ref<::glam::Affine2>, + rhs: Val<::glam::Vec2>, + ) -> Val<::glam::Vec2> { + let output: Val<::glam::Vec2> = ::glam::Affine2::transform_vector2( + &_self, + rhs.into_inner(), + ) + .into(); + output + } +} +#[script_bindings( + remote, + name = "affine_3_a_functions", + bms_core_path = "bevy_mod_scripting_core", + generated +)] +impl ::glam::Affine3A { + /// Returns true if the absolute difference of all elements between `self` and `rhs` + /// is less than or equal to `max_abs_diff`. + /// This can be used to compare if two 3x4 matrices contain similar elements. It works + /// best when comparing with a known value. The `max_abs_diff` that should be used used + /// depends on the values being compared against. + /// For more see + /// [comparing floating point numbers](https://randomascii.wordpress.com/2012/02/25/comparing-floating-point-numbers-2012-edition/). + fn abs_diff_eq( + _self: Ref<::glam::Affine3A>, + rhs: Val<::glam::Affine3A>, + max_abs_diff: f32, + ) -> bool { + let output: bool = ::glam::Affine3A::abs_diff_eq( + &_self, + rhs.into_inner(), + max_abs_diff, + ) + .into(); + output + } + fn clone(_self: Ref<::glam::Affine3A>) -> Val<::glam::Affine3A> { + let output: Val<::glam::Affine3A> = <::glam::Affine3A as ::bevy_reflect::erased_serde::__private::serde::__private::Clone>::clone( + &_self, + ) + .into(); + output + } + fn eq(_self: Ref<::glam::Affine3A>, rhs: Ref<::glam::Affine3A>) -> bool { + let output: bool = <::glam::Affine3A as ::core::cmp::PartialEq< + ::glam::Affine3A, + >>::eq(&_self, &rhs) + .into(); + output + } + /// Creates an affine transform containing a 3D rotation around a normalized + /// rotation `axis` of `angle` (in radians). + fn from_axis_angle(axis: Val<::glam::Vec3>, angle: f32) -> Val<::glam::Affine3A> { + let output: Val<::glam::Affine3A> = ::glam::Affine3A::from_axis_angle( + axis.into_inner(), + angle, + ) + .into(); + output + } + /// Creates an affine transform from three column vectors. + fn from_cols( + x_axis: Val<::glam::Vec3A>, + y_axis: Val<::glam::Vec3A>, + z_axis: Val<::glam::Vec3A>, + w_axis: Val<::glam::Vec3A>, + ) -> Val<::glam::Affine3A> { + let output: Val<::glam::Affine3A> = ::glam::Affine3A::from_cols( + x_axis.into_inner(), + y_axis.into_inner(), + z_axis.into_inner(), + w_axis.into_inner(), + ) + .into(); + output + } + /// Creates an affine transform from a 3x3 matrix (expressing scale, shear and + /// rotation) + fn from_mat3(mat3: Val<::glam::Mat3>) -> Val<::glam::Affine3A> { + let output: Val<::glam::Affine3A> = ::glam::Affine3A::from_mat3( + mat3.into_inner(), + ) + .into(); + output + } + /// Creates an affine transform from a 3x3 matrix (expressing scale, shear and rotation) + /// and a translation vector. + /// Equivalent to `Affine3A::from_translation(translation) * Affine3A::from_mat3(mat3)` + fn from_mat3_translation( + mat3: Val<::glam::Mat3>, + translation: Val<::glam::Vec3>, + ) -> Val<::glam::Affine3A> { + let output: Val<::glam::Affine3A> = ::glam::Affine3A::from_mat3_translation( + mat3.into_inner(), + translation.into_inner(), + ) + .into(); + output + } + /// The given `Mat4` must be an affine transform, + /// i.e. contain no perspective transform. + fn from_mat4(m: Val<::glam::Mat4>) -> Val<::glam::Affine3A> { + let output: Val<::glam::Affine3A> = ::glam::Affine3A::from_mat4(m.into_inner()) + .into(); + output + } + /// Creates an affine transform from the given `rotation` quaternion. + fn from_quat(rotation: Val<::glam::Quat>) -> Val<::glam::Affine3A> { + let output: Val<::glam::Affine3A> = ::glam::Affine3A::from_quat( + rotation.into_inner(), + ) + .into(); + output + } + /// Creates an affine transform from the given 3D `rotation` and `translation`. + /// Equivalent to `Affine3A::from_translation(translation) * Affine3A::from_quat(rotation)` + fn from_rotation_translation( + rotation: Val<::glam::Quat>, + translation: Val<::glam::Vec3>, + ) -> Val<::glam::Affine3A> { + let output: Val<::glam::Affine3A> = ::glam::Affine3A::from_rotation_translation( + rotation.into_inner(), + translation.into_inner(), + ) + .into(); + output + } + /// Creates an affine transform containing a 3D rotation around the x axis of + /// `angle` (in radians). + fn from_rotation_x(angle: f32) -> Val<::glam::Affine3A> { + let output: Val<::glam::Affine3A> = ::glam::Affine3A::from_rotation_x(angle) + .into(); + output + } + /// Creates an affine transform containing a 3D rotation around the y axis of + /// `angle` (in radians). + fn from_rotation_y(angle: f32) -> Val<::glam::Affine3A> { + let output: Val<::glam::Affine3A> = ::glam::Affine3A::from_rotation_y(angle) + .into(); + output + } + /// Creates an affine transform containing a 3D rotation around the z axis of + /// `angle` (in radians). + fn from_rotation_z(angle: f32) -> Val<::glam::Affine3A> { + let output: Val<::glam::Affine3A> = ::glam::Affine3A::from_rotation_z(angle) + .into(); + output + } + /// Creates an affine transform that changes scale. + /// Note that if any scale is zero the transform will be non-invertible. + fn from_scale(scale: Val<::glam::Vec3>) -> Val<::glam::Affine3A> { + let output: Val<::glam::Affine3A> = ::glam::Affine3A::from_scale( + scale.into_inner(), + ) + .into(); + output + } + /// Creates an affine transform from the given 3D `scale`, `rotation` and + /// `translation`. + /// Equivalent to `Affine3A::from_translation(translation) * + /// Affine3A::from_quat(rotation) * Affine3A::from_scale(scale)` + fn from_scale_rotation_translation( + scale: Val<::glam::Vec3>, + rotation: Val<::glam::Quat>, + translation: Val<::glam::Vec3>, + ) -> Val<::glam::Affine3A> { + let output: Val<::glam::Affine3A> = ::glam::Affine3A::from_scale_rotation_translation( + scale.into_inner(), + rotation.into_inner(), + translation.into_inner(), + ) + .into(); + output + } + /// Creates an affine transformation from the given 3D `translation`. + fn from_translation(translation: Val<::glam::Vec3>) -> Val<::glam::Affine3A> { + let output: Val<::glam::Affine3A> = ::glam::Affine3A::from_translation( + translation.into_inner(), + ) + .into(); + output + } + /// Return the inverse of this transform. + /// Note that if the transform is not invertible the result will be invalid. + fn inverse(_self: Ref<::glam::Affine3A>) -> Val<::glam::Affine3A> { + let output: Val<::glam::Affine3A> = ::glam::Affine3A::inverse(&_self).into(); + output + } + /// Returns `true` if, and only if, all elements are finite. + /// If any element is either `NaN`, positive or negative infinity, this will return + /// `false`. + fn is_finite(_self: Ref<::glam::Affine3A>) -> bool { + let output: bool = ::glam::Affine3A::is_finite(&_self).into(); + output + } + /// Returns `true` if any elements are `NaN`. + fn is_nan(_self: Ref<::glam::Affine3A>) -> bool { + let output: bool = ::glam::Affine3A::is_nan(&_self).into(); + output + } + /// Creates a left-handed view transform using a camera position, an up direction, and a focal + /// point. + /// For a view coordinate system with `+X=right`, `+Y=up` and `+Z=forward`. + /// # Panics + /// Will panic if `up` is not normalized when `glam_assert` is enabled. + fn look_at_lh( + eye: Val<::glam::Vec3>, + center: Val<::glam::Vec3>, + up: Val<::glam::Vec3>, + ) -> Val<::glam::Affine3A> { + let output: Val<::glam::Affine3A> = ::glam::Affine3A::look_at_lh( + eye.into_inner(), + center.into_inner(), + up.into_inner(), + ) + .into(); + output + } + /// Creates a right-handed view transform using a camera position, an up direction, and a focal + /// point. + /// For a view coordinate system with `+X=right`, `+Y=up` and `+Z=back`. + /// # Panics + /// Will panic if `up` is not normalized when `glam_assert` is enabled. + fn look_at_rh( + eye: Val<::glam::Vec3>, + center: Val<::glam::Vec3>, + up: Val<::glam::Vec3>, + ) -> Val<::glam::Affine3A> { + let output: Val<::glam::Affine3A> = ::glam::Affine3A::look_at_rh( + eye.into_inner(), + center.into_inner(), + up.into_inner(), + ) + .into(); + output + } + /// Creates a left-handed view transform using a camera position, an up direction, and a facing + /// direction. + /// For a view coordinate system with `+X=right`, `+Y=up` and `+Z=forward`. + fn look_to_lh( + eye: Val<::glam::Vec3>, + dir: Val<::glam::Vec3>, + up: Val<::glam::Vec3>, + ) -> Val<::glam::Affine3A> { + let output: Val<::glam::Affine3A> = ::glam::Affine3A::look_to_lh( + eye.into_inner(), + dir.into_inner(), + up.into_inner(), + ) + .into(); + output + } + /// Creates a right-handed view transform using a camera position, an up direction, and a facing + /// direction. + /// For a view coordinate system with `+X=right`, `+Y=up` and `+Z=back`. + fn look_to_rh( + eye: Val<::glam::Vec3>, + dir: Val<::glam::Vec3>, + up: Val<::glam::Vec3>, + ) -> Val<::glam::Affine3A> { + let output: Val<::glam::Affine3A> = ::glam::Affine3A::look_to_rh( + eye.into_inner(), + dir.into_inner(), + up.into_inner(), + ) + .into(); + output + } + fn mul( + _self: Val<::glam::Affine3A>, + rhs: Val<::glam::Affine3A>, + ) -> Val<::glam::Affine3A> { + let output: Val<::glam::Affine3A> = <::glam::Affine3A as ::core::ops::Mul< + ::glam::Affine3A, + >>::mul(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + fn mul(_self: Val<::glam::Affine3A>, rhs: Val<::glam::Mat4>) -> Val<::glam::Mat4> { + let output: Val<::glam::Mat4> = <::glam::Affine3A as ::core::ops::Mul< + ::glam::Mat4, + >>::mul(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + /// Creates a `[f32; 12]` array storing data in column major order. + fn to_cols_array(_self: Ref<::glam::Affine3A>) -> [f32; 12] { + let output: [f32; 12] = ::glam::Affine3A::to_cols_array(&_self).into(); + output + } + /// Creates a `[[f32; 3]; 4]` 3D array storing data in + /// column major order. + /// If you require data in row major order `transpose` the matrix first. + fn to_cols_array_2d(_self: Ref<::glam::Affine3A>) -> [[f32; 3]; 4] { + let output: [[f32; 3]; 4] = ::glam::Affine3A::to_cols_array_2d(&_self).into(); + output + } + /// Transforms the given 3D points, applying shear, scale, rotation and translation. + fn transform_point3( + _self: Ref<::glam::Affine3A>, + rhs: Val<::glam::Vec3>, + ) -> Val<::glam::Vec3> { + let output: Val<::glam::Vec3> = ::glam::Affine3A::transform_point3( + &_self, + rhs.into_inner(), + ) + .into(); + output + } + /// Transforms the given [`Vec3A`], applying shear, scale, rotation and translation. + fn transform_point3a( + _self: Ref<::glam::Affine3A>, + rhs: Val<::glam::Vec3A>, + ) -> Val<::glam::Vec3A> { + let output: Val<::glam::Vec3A> = ::glam::Affine3A::transform_point3a( + &_self, + rhs.into_inner(), + ) + .into(); + output + } + /// Transforms the given 3D vector, applying shear, scale and rotation (but NOT + /// translation). + /// To also apply translation, use [`Self::transform_point3()`] instead. + fn transform_vector3( + _self: Ref<::glam::Affine3A>, + rhs: Val<::glam::Vec3>, + ) -> Val<::glam::Vec3> { + let output: Val<::glam::Vec3> = ::glam::Affine3A::transform_vector3( + &_self, + rhs.into_inner(), + ) + .into(); + output + } + /// Transforms the given [`Vec3A`], applying shear, scale and rotation (but NOT + /// translation). + /// To also apply translation, use [`Self::transform_point3a()`] instead. + fn transform_vector3a( + _self: Ref<::glam::Affine3A>, + rhs: Val<::glam::Vec3A>, + ) -> Val<::glam::Vec3A> { + let output: Val<::glam::Vec3A> = ::glam::Affine3A::transform_vector3a( + &_self, + rhs.into_inner(), + ) + .into(); + output + } +} +#[script_bindings( + remote, + name = "d_affine_2_functions", + bms_core_path = "bevy_mod_scripting_core", + generated +)] +impl ::glam::DAffine2 { + /// Returns true if the absolute difference of all elements between `self` and `rhs` + /// is less than or equal to `max_abs_diff`. + /// This can be used to compare if two 3x4 matrices contain similar elements. It works + /// best when comparing with a known value. The `max_abs_diff` that should be used used + /// depends on the values being compared against. + /// For more see + /// [comparing floating point numbers](https://randomascii.wordpress.com/2012/02/25/comparing-floating-point-numbers-2012-edition/). + fn abs_diff_eq( + _self: Ref<::glam::DAffine2>, + rhs: Val<::glam::DAffine2>, + max_abs_diff: f64, + ) -> bool { + let output: bool = ::glam::DAffine2::abs_diff_eq( + &_self, + rhs.into_inner(), + max_abs_diff, + ) + .into(); + output + } + fn clone(_self: Ref<::glam::DAffine2>) -> Val<::glam::DAffine2> { + let output: Val<::glam::DAffine2> = <::glam::DAffine2 as ::bevy_reflect::erased_serde::__private::serde::__private::Clone>::clone( + &_self, + ) + .into(); + output + } + fn eq(_self: Ref<::glam::DAffine2>, rhs: Ref<::glam::DAffine2>) -> bool { + let output: bool = <::glam::DAffine2 as ::core::cmp::PartialEq< + ::glam::DAffine2, + >>::eq(&_self, &rhs) + .into(); + output + } + /// Creates an affine transform from the given rotation `angle`. + fn from_angle(angle: f64) -> Val<::glam::DAffine2> { + let output: Val<::glam::DAffine2> = ::glam::DAffine2::from_angle(angle).into(); + output + } + /// Creates an affine transform from the given 2D rotation `angle` (in radians) and + /// `translation`. + /// Equivalent to `DAffine2::from_translation(translation) * DAffine2::from_angle(angle)` + fn from_angle_translation( + angle: f64, + translation: Val<::glam::DVec2>, + ) -> Val<::glam::DAffine2> { + let output: Val<::glam::DAffine2> = ::glam::DAffine2::from_angle_translation( + angle, + translation.into_inner(), + ) + .into(); + output + } + /// Creates an affine transform from three column vectors. + fn from_cols( + x_axis: Val<::glam::DVec2>, + y_axis: Val<::glam::DVec2>, + z_axis: Val<::glam::DVec2>, + ) -> Val<::glam::DAffine2> { + let output: Val<::glam::DAffine2> = ::glam::DAffine2::from_cols( + x_axis.into_inner(), + y_axis.into_inner(), + z_axis.into_inner(), + ) + .into(); + output + } + /// Creates an affine transform from a 2x2 matrix (expressing scale, shear and rotation) + fn from_mat2(matrix2: Val<::glam::DMat2>) -> Val<::glam::DAffine2> { + let output: Val<::glam::DAffine2> = ::glam::DAffine2::from_mat2( + matrix2.into_inner(), + ) + .into(); + output + } + /// Creates an affine transform from a 2x2 matrix (expressing scale, shear and rotation) and a + /// translation vector. + /// Equivalent to + /// `DAffine2::from_translation(translation) * DAffine2::from_mat2(mat2)` + fn from_mat2_translation( + matrix2: Val<::glam::DMat2>, + translation: Val<::glam::DVec2>, + ) -> Val<::glam::DAffine2> { + let output: Val<::glam::DAffine2> = ::glam::DAffine2::from_mat2_translation( + matrix2.into_inner(), + translation.into_inner(), + ) + .into(); + output + } + /// The given `DMat3` must be an affine transform, + fn from_mat3(m: Val<::glam::DMat3>) -> Val<::glam::DAffine2> { + let output: Val<::glam::DAffine2> = ::glam::DAffine2::from_mat3(m.into_inner()) + .into(); + output + } + /// Creates an affine transform that changes scale. + /// Note that if any scale is zero the transform will be non-invertible. + fn from_scale(scale: Val<::glam::DVec2>) -> Val<::glam::DAffine2> { + let output: Val<::glam::DAffine2> = ::glam::DAffine2::from_scale( + scale.into_inner(), + ) + .into(); + output + } + /// Creates an affine transform from the given 2D `scale`, rotation `angle` (in radians) and + /// `translation`. + /// Equivalent to `DAffine2::from_translation(translation) * + /// DAffine2::from_angle(angle) * DAffine2::from_scale(scale)` + fn from_scale_angle_translation( + scale: Val<::glam::DVec2>, + angle: f64, + translation: Val<::glam::DVec2>, + ) -> Val<::glam::DAffine2> { + let output: Val<::glam::DAffine2> = ::glam::DAffine2::from_scale_angle_translation( + scale.into_inner(), + angle, + translation.into_inner(), + ) + .into(); + output + } + /// Creates an affine transformation from the given 2D `translation`. + fn from_translation(translation: Val<::glam::DVec2>) -> Val<::glam::DAffine2> { + let output: Val<::glam::DAffine2> = ::glam::DAffine2::from_translation( + translation.into_inner(), + ) + .into(); + output + } + /// Return the inverse of this transform. + /// Note that if the transform is not invertible the result will be invalid. + fn inverse(_self: Ref<::glam::DAffine2>) -> Val<::glam::DAffine2> { + let output: Val<::glam::DAffine2> = ::glam::DAffine2::inverse(&_self).into(); + output + } + /// Returns `true` if, and only if, all elements are finite. + /// If any element is either `NaN`, positive or negative infinity, this will return + /// `false`. + fn is_finite(_self: Ref<::glam::DAffine2>) -> bool { + let output: bool = ::glam::DAffine2::is_finite(&_self).into(); + output + } + /// Returns `true` if any elements are `NaN`. + fn is_nan(_self: Ref<::glam::DAffine2>) -> bool { + let output: bool = ::glam::DAffine2::is_nan(&_self).into(); + output + } + fn mul( + _self: Val<::glam::DAffine2>, + rhs: Val<::glam::DAffine2>, + ) -> Val<::glam::DAffine2> { + let output: Val<::glam::DAffine2> = <::glam::DAffine2 as ::core::ops::Mul< + ::glam::DAffine2, + >>::mul(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + fn mul(_self: Val<::glam::DAffine2>, rhs: Val<::glam::DMat3>) -> Val<::glam::DMat3> { + let output: Val<::glam::DMat3> = <::glam::DAffine2 as ::core::ops::Mul< + ::glam::DMat3, + >>::mul(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + /// Creates a `[f64; 6]` array storing data in column major order. + fn to_cols_array(_self: Ref<::glam::DAffine2>) -> [f64; 6] { + let output: [f64; 6] = ::glam::DAffine2::to_cols_array(&_self).into(); + output + } + /// Creates a `[[f64; 2]; 3]` 2D array storing data in + /// column major order. + /// If you require data in row major order `transpose` the matrix first. + fn to_cols_array_2d(_self: Ref<::glam::DAffine2>) -> [[f64; 2]; 3] { + let output: [[f64; 2]; 3] = ::glam::DAffine2::to_cols_array_2d(&_self).into(); + output + } + /// Transforms the given 2D point, applying shear, scale, rotation and translation. + fn transform_point2( + _self: Ref<::glam::DAffine2>, + rhs: Val<::glam::DVec2>, + ) -> Val<::glam::DVec2> { + let output: Val<::glam::DVec2> = ::glam::DAffine2::transform_point2( + &_self, + rhs.into_inner(), + ) + .into(); + output + } + /// Transforms the given 2D vector, applying shear, scale and rotation (but NOT + /// translation). + /// To also apply translation, use [`Self::transform_point2()`] instead. + fn transform_vector2( + _self: Ref<::glam::DAffine2>, + rhs: Val<::glam::DVec2>, + ) -> Val<::glam::DVec2> { + let output: Val<::glam::DVec2> = ::glam::DAffine2::transform_vector2( + &_self, + rhs.into_inner(), + ) + .into(); + output + } +} +#[script_bindings( + remote, + name = "d_affine_3_functions", + bms_core_path = "bevy_mod_scripting_core", + generated +)] +impl ::glam::DAffine3 { + /// Returns true if the absolute difference of all elements between `self` and `rhs` + /// is less than or equal to `max_abs_diff`. + /// This can be used to compare if two 3x4 matrices contain similar elements. It works + /// best when comparing with a known value. The `max_abs_diff` that should be used used + /// depends on the values being compared against. + /// For more see + /// [comparing floating point numbers](https://randomascii.wordpress.com/2012/02/25/comparing-floating-point-numbers-2012-edition/). + fn abs_diff_eq( + _self: Ref<::glam::DAffine3>, + rhs: Val<::glam::DAffine3>, + max_abs_diff: f64, + ) -> bool { + let output: bool = ::glam::DAffine3::abs_diff_eq( + &_self, + rhs.into_inner(), + max_abs_diff, + ) + .into(); + output + } + fn clone(_self: Ref<::glam::DAffine3>) -> Val<::glam::DAffine3> { + let output: Val<::glam::DAffine3> = <::glam::DAffine3 as ::bevy_reflect::erased_serde::__private::serde::__private::Clone>::clone( + &_self, + ) + .into(); + output + } + fn eq(_self: Ref<::glam::DAffine3>, rhs: Ref<::glam::DAffine3>) -> bool { + let output: bool = <::glam::DAffine3 as ::core::cmp::PartialEq< + ::glam::DAffine3, + >>::eq(&_self, &rhs) + .into(); + output + } + /// Creates an affine transform containing a 3D rotation around a normalized + /// rotation `axis` of `angle` (in radians). + fn from_axis_angle(axis: Val<::glam::DVec3>, angle: f64) -> Val<::glam::DAffine3> { + let output: Val<::glam::DAffine3> = ::glam::DAffine3::from_axis_angle( + axis.into_inner(), + angle, + ) + .into(); + output + } + /// Creates an affine transform from three column vectors. + fn from_cols( + x_axis: Val<::glam::DVec3>, + y_axis: Val<::glam::DVec3>, + z_axis: Val<::glam::DVec3>, + w_axis: Val<::glam::DVec3>, + ) -> Val<::glam::DAffine3> { + let output: Val<::glam::DAffine3> = ::glam::DAffine3::from_cols( + x_axis.into_inner(), + y_axis.into_inner(), + z_axis.into_inner(), + w_axis.into_inner(), + ) + .into(); + output + } + /// Creates an affine transform from a 3x3 matrix (expressing scale, shear and + /// rotation) + fn from_mat3(mat3: Val<::glam::DMat3>) -> Val<::glam::DAffine3> { + let output: Val<::glam::DAffine3> = ::glam::DAffine3::from_mat3( + mat3.into_inner(), + ) + .into(); + output + } + /// Creates an affine transform from a 3x3 matrix (expressing scale, shear and rotation) + /// and a translation vector. + /// Equivalent to `DAffine3::from_translation(translation) * DAffine3::from_mat3(mat3)` + fn from_mat3_translation( + mat3: Val<::glam::DMat3>, + translation: Val<::glam::DVec3>, + ) -> Val<::glam::DAffine3> { + let output: Val<::glam::DAffine3> = ::glam::DAffine3::from_mat3_translation( + mat3.into_inner(), + translation.into_inner(), + ) + .into(); + output + } + /// The given `DMat4` must be an affine transform, + /// i.e. contain no perspective transform. + fn from_mat4(m: Val<::glam::DMat4>) -> Val<::glam::DAffine3> { + let output: Val<::glam::DAffine3> = ::glam::DAffine3::from_mat4(m.into_inner()) + .into(); + output + } + /// Creates an affine transform from the given `rotation` quaternion. + fn from_quat(rotation: Val<::glam::DQuat>) -> Val<::glam::DAffine3> { + let output: Val<::glam::DAffine3> = ::glam::DAffine3::from_quat( + rotation.into_inner(), + ) + .into(); + output + } + /// Creates an affine transform from the given 3D `rotation` and `translation`. + /// Equivalent to `DAffine3::from_translation(translation) * DAffine3::from_quat(rotation)` + fn from_rotation_translation( + rotation: Val<::glam::DQuat>, + translation: Val<::glam::DVec3>, + ) -> Val<::glam::DAffine3> { + let output: Val<::glam::DAffine3> = ::glam::DAffine3::from_rotation_translation( + rotation.into_inner(), + translation.into_inner(), + ) + .into(); + output + } + /// Creates an affine transform containing a 3D rotation around the x axis of + /// `angle` (in radians). + fn from_rotation_x(angle: f64) -> Val<::glam::DAffine3> { + let output: Val<::glam::DAffine3> = ::glam::DAffine3::from_rotation_x(angle) + .into(); + output + } + /// Creates an affine transform containing a 3D rotation around the y axis of + /// `angle` (in radians). + fn from_rotation_y(angle: f64) -> Val<::glam::DAffine3> { + let output: Val<::glam::DAffine3> = ::glam::DAffine3::from_rotation_y(angle) + .into(); + output + } + /// Creates an affine transform containing a 3D rotation around the z axis of + /// `angle` (in radians). + fn from_rotation_z(angle: f64) -> Val<::glam::DAffine3> { + let output: Val<::glam::DAffine3> = ::glam::DAffine3::from_rotation_z(angle) + .into(); + output + } + /// Creates an affine transform that changes scale. + /// Note that if any scale is zero the transform will be non-invertible. + fn from_scale(scale: Val<::glam::DVec3>) -> Val<::glam::DAffine3> { + let output: Val<::glam::DAffine3> = ::glam::DAffine3::from_scale( + scale.into_inner(), + ) + .into(); + output + } + /// Creates an affine transform from the given 3D `scale`, `rotation` and + /// `translation`. + /// Equivalent to `DAffine3::from_translation(translation) * + /// DAffine3::from_quat(rotation) * DAffine3::from_scale(scale)` + fn from_scale_rotation_translation( + scale: Val<::glam::DVec3>, + rotation: Val<::glam::DQuat>, + translation: Val<::glam::DVec3>, + ) -> Val<::glam::DAffine3> { + let output: Val<::glam::DAffine3> = ::glam::DAffine3::from_scale_rotation_translation( + scale.into_inner(), + rotation.into_inner(), + translation.into_inner(), + ) + .into(); + output + } + /// Creates an affine transformation from the given 3D `translation`. + fn from_translation(translation: Val<::glam::DVec3>) -> Val<::glam::DAffine3> { + let output: Val<::glam::DAffine3> = ::glam::DAffine3::from_translation( + translation.into_inner(), + ) + .into(); + output + } + /// Return the inverse of this transform. + /// Note that if the transform is not invertible the result will be invalid. + fn inverse(_self: Ref<::glam::DAffine3>) -> Val<::glam::DAffine3> { + let output: Val<::glam::DAffine3> = ::glam::DAffine3::inverse(&_self).into(); + output + } + /// Returns `true` if, and only if, all elements are finite. + /// If any element is either `NaN`, positive or negative infinity, this will return + /// `false`. + fn is_finite(_self: Ref<::glam::DAffine3>) -> bool { + let output: bool = ::glam::DAffine3::is_finite(&_self).into(); + output + } + /// Returns `true` if any elements are `NaN`. + fn is_nan(_self: Ref<::glam::DAffine3>) -> bool { + let output: bool = ::glam::DAffine3::is_nan(&_self).into(); + output + } + /// Creates a left-handed view transform using a camera position, an up direction, and a focal + /// point. + /// For a view coordinate system with `+X=right`, `+Y=up` and `+Z=forward`. + /// # Panics + /// Will panic if `up` is not normalized when `glam_assert` is enabled. + fn look_at_lh( + eye: Val<::glam::DVec3>, + center: Val<::glam::DVec3>, + up: Val<::glam::DVec3>, + ) -> Val<::glam::DAffine3> { + let output: Val<::glam::DAffine3> = ::glam::DAffine3::look_at_lh( + eye.into_inner(), + center.into_inner(), + up.into_inner(), + ) + .into(); + output + } + /// Creates a right-handed view transform using a camera position, an up direction, and a focal + /// point. + /// For a view coordinate system with `+X=right`, `+Y=up` and `+Z=back`. + /// # Panics + /// Will panic if `up` is not normalized when `glam_assert` is enabled. + fn look_at_rh( + eye: Val<::glam::DVec3>, + center: Val<::glam::DVec3>, + up: Val<::glam::DVec3>, + ) -> Val<::glam::DAffine3> { + let output: Val<::glam::DAffine3> = ::glam::DAffine3::look_at_rh( + eye.into_inner(), + center.into_inner(), + up.into_inner(), + ) + .into(); + output + } + /// Creates a left-handed view transform using a camera position, an up direction, and a facing + /// direction. + /// For a view coordinate system with `+X=right`, `+Y=up` and `+Z=forward`. + fn look_to_lh( + eye: Val<::glam::DVec3>, + dir: Val<::glam::DVec3>, + up: Val<::glam::DVec3>, + ) -> Val<::glam::DAffine3> { + let output: Val<::glam::DAffine3> = ::glam::DAffine3::look_to_lh( + eye.into_inner(), + dir.into_inner(), + up.into_inner(), + ) + .into(); + output + } + /// Creates a right-handed view transform using a camera position, an up direction, and a facing + /// direction. + /// For a view coordinate system with `+X=right`, `+Y=up` and `+Z=back`. + fn look_to_rh( + eye: Val<::glam::DVec3>, + dir: Val<::glam::DVec3>, + up: Val<::glam::DVec3>, + ) -> Val<::glam::DAffine3> { + let output: Val<::glam::DAffine3> = ::glam::DAffine3::look_to_rh( + eye.into_inner(), + dir.into_inner(), + up.into_inner(), + ) + .into(); + output + } + fn mul( + _self: Val<::glam::DAffine3>, + rhs: Val<::glam::DAffine3>, + ) -> Val<::glam::DAffine3> { + let output: Val<::glam::DAffine3> = <::glam::DAffine3 as ::core::ops::Mul< + ::glam::DAffine3, + >>::mul(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + fn mul(_self: Val<::glam::DAffine3>, rhs: Val<::glam::DMat4>) -> Val<::glam::DMat4> { + let output: Val<::glam::DMat4> = <::glam::DAffine3 as ::core::ops::Mul< + ::glam::DMat4, + >>::mul(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + /// Creates a `[f64; 12]` array storing data in column major order. + fn to_cols_array(_self: Ref<::glam::DAffine3>) -> [f64; 12] { + let output: [f64; 12] = ::glam::DAffine3::to_cols_array(&_self).into(); + output + } + /// Creates a `[[f64; 3]; 4]` 3D array storing data in + /// column major order. + /// If you require data in row major order `transpose` the matrix first. + fn to_cols_array_2d(_self: Ref<::glam::DAffine3>) -> [[f64; 3]; 4] { + let output: [[f64; 3]; 4] = ::glam::DAffine3::to_cols_array_2d(&_self).into(); + output + } + /// Transforms the given 3D points, applying shear, scale, rotation and translation. + fn transform_point3( + _self: Ref<::glam::DAffine3>, + rhs: Val<::glam::DVec3>, + ) -> Val<::glam::DVec3> { + let output: Val<::glam::DVec3> = ::glam::DAffine3::transform_point3( + &_self, + rhs.into_inner(), + ) + .into(); + output + } + /// Transforms the given 3D vector, applying shear, scale and rotation (but NOT + /// translation). + /// To also apply translation, use [`Self::transform_point3()`] instead. + fn transform_vector3( + _self: Ref<::glam::DAffine3>, + rhs: Val<::glam::DVec3>, + ) -> Val<::glam::DVec3> { + let output: Val<::glam::DVec3> = ::glam::DAffine3::transform_vector3( + &_self, + rhs.into_inner(), + ) + .into(); + output + } +} +#[script_bindings( + remote, + name = "d_quat_functions", + bms_core_path = "bevy_mod_scripting_core", + generated +)] +impl ::glam::DQuat { + /// Returns true if the absolute difference of all elements between `self` and `rhs` + /// is less than or equal to `max_abs_diff`. + /// This can be used to compare if two quaternions contain similar elements. It works + /// best when comparing with a known value. The `max_abs_diff` that should be used used + /// depends on the values being compared against. + /// For more see + /// [comparing floating point numbers](https://randomascii.wordpress.com/2012/02/25/comparing-floating-point-numbers-2012-edition/). + fn abs_diff_eq( + _self: Val<::glam::DQuat>, + rhs: Val<::glam::DQuat>, + max_abs_diff: f64, + ) -> bool { + let output: bool = ::glam::DQuat::abs_diff_eq( + _self.into_inner(), + rhs.into_inner(), + max_abs_diff, + ) + .into(); + output + } + /// Adds two quaternions. + /// The sum is not guaranteed to be normalized. + /// Note that addition is not the same as combining the rotations represented by the + /// two quaternions! That corresponds to multiplication. + fn add(_self: Val<::glam::DQuat>, rhs: Val<::glam::DQuat>) -> Val<::glam::DQuat> { + let output: Val<::glam::DQuat> = <::glam::DQuat as ::core::ops::Add< + ::glam::DQuat, + >>::add(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + /// Returns the angle (in radians) for the minimal rotation + /// for transforming this quaternion into another. + /// Both quaternions must be normalized. + /// # Panics + /// Will panic if `self` or `rhs` are not normalized when `glam_assert` is enabled. + fn angle_between(_self: Val<::glam::DQuat>, rhs: Val<::glam::DQuat>) -> f64 { + let output: f64 = ::glam::DQuat::angle_between( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + fn as_quat(_self: Val<::glam::DQuat>) -> Val<::glam::Quat> { + let output: Val<::glam::Quat> = ::glam::DQuat::as_quat(_self.into_inner()) + .into(); + output + } + fn clone(_self: Ref<::glam::DQuat>) -> Val<::glam::DQuat> { + let output: Val<::glam::DQuat> = <::glam::DQuat as ::bevy_reflect::erased_serde::__private::serde::__private::Clone>::clone( + &_self, + ) + .into(); + output + } + /// Returns the quaternion conjugate of `self`. For a unit quaternion the + /// conjugate is also the inverse. + fn conjugate(_self: Val<::glam::DQuat>) -> Val<::glam::DQuat> { + let output: Val<::glam::DQuat> = ::glam::DQuat::conjugate(_self.into_inner()) + .into(); + output + } + /// Divides a quaternion by a scalar value. + /// The quotient is not guaranteed to be normalized. + fn div(_self: Val<::glam::DQuat>, rhs: f64) -> Val<::glam::DQuat> { + let output: Val<::glam::DQuat> = <::glam::DQuat as ::core::ops::Div< + f64, + >>::div(_self.into_inner(), rhs) + .into(); + output + } + /// Computes the dot product of `self` and `rhs`. The dot product is + /// equal to the cosine of the angle between two quaternion rotations. + fn dot(_self: Val<::glam::DQuat>, rhs: Val<::glam::DQuat>) -> f64 { + let output: f64 = ::glam::DQuat::dot(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + fn eq(_self: Ref<::glam::DQuat>, rhs: Ref<::glam::DQuat>) -> bool { + let output: bool = <::glam::DQuat as ::core::cmp::PartialEq< + ::glam::DQuat, + >>::eq(&_self, &rhs) + .into(); + output + } + /// Creates a quaternion from a 3x3 rotation matrix inside a 3D affine transform. + /// Note if the input affine matrix contain scales, shears, or other non-rotation + /// transformations then the resulting quaternion will be ill-defined. + /// # Panics + /// Will panic if any input affine matrix column is not normalized when `glam_assert` is + /// enabled. + fn from_affine3(a: Ref<::glam::DAffine3>) -> Val<::glam::DQuat> { + let output: Val<::glam::DQuat> = ::glam::DQuat::from_affine3(&a).into(); + output + } + /// Creates a rotation quaternion from an array. + /// # Preconditions + /// This function does not check if the input is normalized, it is up to the user to + /// provide normalized input or to normalized the resulting quaternion. + fn from_array(a: [f64; 4]) -> Val<::glam::DQuat> { + let output: Val<::glam::DQuat> = ::glam::DQuat::from_array(a).into(); + output + } + /// Create a quaternion for a normalized rotation `axis` and `angle` (in radians). + /// The axis must be a unit vector. + /// # Panics + /// Will panic if `axis` is not normalized when `glam_assert` is enabled. + fn from_axis_angle(axis: Val<::glam::DVec3>, angle: f64) -> Val<::glam::DQuat> { + let output: Val<::glam::DQuat> = ::glam::DQuat::from_axis_angle( + axis.into_inner(), + angle, + ) + .into(); + output + } + /// Creates a quaternion from the given Euler rotation sequence and the angles (in radians). + fn from_euler( + euler: Val<::glam::EulerRot>, + a: f64, + b: f64, + c: f64, + ) -> Val<::glam::DQuat> { + let output: Val<::glam::DQuat> = ::glam::DQuat::from_euler( + euler.into_inner(), + a, + b, + c, + ) + .into(); + output + } + /// Creates a quaternion from a 3x3 rotation matrix. + /// Note if the input matrix contain scales, shears, or other non-rotation transformations then + /// the resulting quaternion will be ill-defined. + /// # Panics + /// Will panic if any input matrix column is not normalized when `glam_assert` is enabled. + fn from_mat3(mat: Ref<::glam::DMat3>) -> Val<::glam::DQuat> { + let output: Val<::glam::DQuat> = ::glam::DQuat::from_mat3(&mat).into(); + output + } + /// Creates a quaternion from the upper 3x3 rotation matrix inside a homogeneous 4x4 matrix. + /// Note if the upper 3x3 matrix contain scales, shears, or other non-rotation transformations + /// then the resulting quaternion will be ill-defined. + /// # Panics + /// Will panic if any column of the upper 3x3 rotation matrix is not normalized when + /// `glam_assert` is enabled. + fn from_mat4(mat: Ref<::glam::DMat4>) -> Val<::glam::DQuat> { + let output: Val<::glam::DQuat> = ::glam::DQuat::from_mat4(&mat).into(); + output + } + /// Gets the minimal rotation for transforming `from` to `to`. The rotation is in the + /// plane spanned by the two vectors. Will rotate at most 180 degrees. + /// The inputs must be unit vectors. + /// `from_rotation_arc(from, to) * from ≈ to`. + /// For near-singular cases (from≈to and from≈-to) the current implementation + /// is only accurate to about 0.001 (for `f32`). + /// # Panics + /// Will panic if `from` or `to` are not normalized when `glam_assert` is enabled. + fn from_rotation_arc( + from: Val<::glam::DVec3>, + to: Val<::glam::DVec3>, + ) -> Val<::glam::DQuat> { + let output: Val<::glam::DQuat> = ::glam::DQuat::from_rotation_arc( + from.into_inner(), + to.into_inner(), + ) + .into(); + output + } + /// Gets the minimal rotation for transforming `from` to `to`. The resulting rotation is + /// around the z axis. Will rotate at most 180 degrees. + /// The inputs must be unit vectors. + /// `from_rotation_arc_2d(from, to) * from ≈ to`. + /// For near-singular cases (from≈to and from≈-to) the current implementation + /// is only accurate to about 0.001 (for `f32`). + /// # Panics + /// Will panic if `from` or `to` are not normalized when `glam_assert` is enabled. + fn from_rotation_arc_2d( + from: Val<::glam::DVec2>, + to: Val<::glam::DVec2>, + ) -> Val<::glam::DQuat> { + let output: Val<::glam::DQuat> = ::glam::DQuat::from_rotation_arc_2d( + from.into_inner(), + to.into_inner(), + ) + .into(); + output + } + /// Gets the minimal rotation for transforming `from` to either `to` or `-to`. This means + /// that the resulting quaternion will rotate `from` so that it is colinear with `to`. + /// The rotation is in the plane spanned by the two vectors. Will rotate at most 90 + /// degrees. + /// The inputs must be unit vectors. + /// `to.dot(from_rotation_arc_colinear(from, to) * from).abs() ≈ 1`. + /// # Panics + /// Will panic if `from` or `to` are not normalized when `glam_assert` is enabled. + fn from_rotation_arc_colinear( + from: Val<::glam::DVec3>, + to: Val<::glam::DVec3>, + ) -> Val<::glam::DQuat> { + let output: Val<::glam::DQuat> = ::glam::DQuat::from_rotation_arc_colinear( + from.into_inner(), + to.into_inner(), + ) + .into(); + output + } + /// Creates a quaternion from the `angle` (in radians) around the x axis. + fn from_rotation_x(angle: f64) -> Val<::glam::DQuat> { + let output: Val<::glam::DQuat> = ::glam::DQuat::from_rotation_x(angle).into(); + output + } + /// Creates a quaternion from the `angle` (in radians) around the y axis. + fn from_rotation_y(angle: f64) -> Val<::glam::DQuat> { + let output: Val<::glam::DQuat> = ::glam::DQuat::from_rotation_y(angle).into(); + output + } + /// Creates a quaternion from the `angle` (in radians) around the z axis. + fn from_rotation_z(angle: f64) -> Val<::glam::DQuat> { + let output: Val<::glam::DQuat> = ::glam::DQuat::from_rotation_z(angle).into(); + output + } + /// Create a quaternion that rotates `v.length()` radians around `v.normalize()`. + /// `from_scaled_axis(Vec3::ZERO)` results in the identity quaternion. + fn from_scaled_axis(v: Val<::glam::DVec3>) -> Val<::glam::DQuat> { + let output: Val<::glam::DQuat> = ::glam::DQuat::from_scaled_axis(v.into_inner()) + .into(); + output + } + /// Creates a new rotation quaternion from a 4D vector. + /// # Preconditions + /// This function does not check if the input is normalized, it is up to the user to + /// provide normalized input or to normalized the resulting quaternion. + fn from_vec4(v: Val<::glam::DVec4>) -> Val<::glam::DQuat> { + let output: Val<::glam::DQuat> = ::glam::DQuat::from_vec4(v.into_inner()).into(); + output + } + /// Creates a new rotation quaternion. + /// This should generally not be called manually unless you know what you are doing. + /// Use one of the other constructors instead such as `identity` or `from_axis_angle`. + /// `from_xyzw` is mostly used by unit tests and `serde` deserialization. + /// # Preconditions + /// This function does not check if the input is normalized, it is up to the user to + /// provide normalized input or to normalized the resulting quaternion. + fn from_xyzw(x: f64, y: f64, z: f64, w: f64) -> Val<::glam::DQuat> { + let output: Val<::glam::DQuat> = ::glam::DQuat::from_xyzw(x, y, z, w).into(); + output + } + /// Returns the inverse of a normalized quaternion. + /// Typically quaternion inverse returns the conjugate of a normalized quaternion. + /// Because `self` is assumed to already be unit length this method *does not* normalize + /// before returning the conjugate. + /// # Panics + /// Will panic if `self` is not normalized when `glam_assert` is enabled. + fn inverse(_self: Val<::glam::DQuat>) -> Val<::glam::DQuat> { + let output: Val<::glam::DQuat> = ::glam::DQuat::inverse(_self.into_inner()) + .into(); + output + } + /// Returns `true` if, and only if, all elements are finite. + /// If any element is either `NaN`, positive or negative infinity, this will return `false`. + fn is_finite(_self: Val<::glam::DQuat>) -> bool { + let output: bool = ::glam::DQuat::is_finite(_self.into_inner()).into(); + output + } + /// Returns `true` if any elements are `NAN`. + fn is_nan(_self: Val<::glam::DQuat>) -> bool { + let output: bool = ::glam::DQuat::is_nan(_self.into_inner()).into(); + output + } + fn is_near_identity(_self: Val<::glam::DQuat>) -> bool { + let output: bool = ::glam::DQuat::is_near_identity(_self.into_inner()).into(); + output + } + /// Returns whether `self` of length `1.0` or not. + /// Uses a precision threshold of `1e-6`. + fn is_normalized(_self: Val<::glam::DQuat>) -> bool { + let output: bool = ::glam::DQuat::is_normalized(_self.into_inner()).into(); + output + } + /// Computes the length of `self`. + fn length(_self: Val<::glam::DQuat>) -> f64 { + let output: f64 = ::glam::DQuat::length(_self.into_inner()).into(); + output + } + /// Computes `1.0 / length()`. + /// For valid results, `self` must _not_ be of length zero. + fn length_recip(_self: Val<::glam::DQuat>) -> f64 { + let output: f64 = ::glam::DQuat::length_recip(_self.into_inner()).into(); + output + } + /// Computes the squared length of `self`. + /// This is generally faster than `length()` as it avoids a square + /// root operation. + fn length_squared(_self: Val<::glam::DQuat>) -> f64 { + let output: f64 = ::glam::DQuat::length_squared(_self.into_inner()).into(); + output + } + /// Performs a linear interpolation between `self` and `rhs` based on + /// the value `s`. + /// When `s` is `0.0`, the result will be equal to `self`. When `s` + /// is `1.0`, the result will be equal to `rhs`. + /// # Panics + /// Will panic if `self` or `end` are not normalized when `glam_assert` is enabled. + fn lerp( + _self: Val<::glam::DQuat>, + end: Val<::glam::DQuat>, + s: f64, + ) -> Val<::glam::DQuat> { + let output: Val<::glam::DQuat> = ::glam::DQuat::lerp( + _self.into_inner(), + end.into_inner(), + s, + ) + .into(); + output + } + /// Multiplies two quaternions. If they each represent a rotation, the result will + /// represent the combined rotation. + /// Note that due to floating point rounding the result may not be perfectly + /// normalized. + /// # Panics + /// Will panic if `self` or `rhs` are not normalized when `glam_assert` is enabled. + fn mul(_self: Val<::glam::DQuat>, rhs: Val<::glam::DQuat>) -> Val<::glam::DQuat> { + let output: Val<::glam::DQuat> = <::glam::DQuat as ::core::ops::Mul< + ::glam::DQuat, + >>::mul(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + /// Multiplies a quaternion and a 3D vector, returning the rotated vector. + /// # Panics + /// Will panic if `self` is not normalized when `glam_assert` is enabled. + fn mul(_self: Val<::glam::DQuat>, rhs: Val<::glam::DVec3>) -> Val<::glam::DVec3> { + let output: Val<::glam::DVec3> = <::glam::DQuat as ::core::ops::Mul< + ::glam::DVec3, + >>::mul(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + /// Multiplies a quaternion by a scalar value. + /// The product is not guaranteed to be normalized. + fn mul(_self: Val<::glam::DQuat>, rhs: f64) -> Val<::glam::DQuat> { + let output: Val<::glam::DQuat> = <::glam::DQuat as ::core::ops::Mul< + f64, + >>::mul(_self.into_inner(), rhs) + .into(); + output + } + /// Multiplies two quaternions. If they each represent a rotation, the result will + /// represent the combined rotation. + /// Note that due to floating point rounding the result may not be perfectly normalized. + /// # Panics + /// Will panic if `self` or `rhs` are not normalized when `glam_assert` is enabled. + fn mul_quat( + _self: Val<::glam::DQuat>, + rhs: Val<::glam::DQuat>, + ) -> Val<::glam::DQuat> { + let output: Val<::glam::DQuat> = ::glam::DQuat::mul_quat( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Multiplies a quaternion and a 3D vector, returning the rotated vector. + /// # Panics + /// Will panic if `self` is not normalized when `glam_assert` is enabled. + fn mul_vec3( + _self: Val<::glam::DQuat>, + rhs: Val<::glam::DVec3>, + ) -> Val<::glam::DVec3> { + let output: Val<::glam::DVec3> = ::glam::DQuat::mul_vec3( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + fn neg(_self: Val<::glam::DQuat>) -> Val<::glam::DQuat> { + let output: Val<::glam::DQuat> = <::glam::DQuat as ::core::ops::Neg>::neg( + _self.into_inner(), + ) + .into(); + output + } + /// Returns `self` normalized to length 1.0. + /// For valid results, `self` must _not_ be of length zero. + /// Panics + /// Will panic if `self` is zero length when `glam_assert` is enabled. + fn normalize(_self: Val<::glam::DQuat>) -> Val<::glam::DQuat> { + let output: Val<::glam::DQuat> = ::glam::DQuat::normalize(_self.into_inner()) + .into(); + output + } + /// Rotates towards `rhs` up to `max_angle` (in radians). + /// When `max_angle` is `0.0`, the result will be equal to `self`. When `max_angle` is equal to + /// `self.angle_between(rhs)`, the result will be equal to `rhs`. If `max_angle` is negative, + /// rotates towards the exact opposite of `rhs`. Will not go past the target. + /// Both quaternions must be normalized. + /// # Panics + /// Will panic if `self` or `rhs` are not normalized when `glam_assert` is enabled. + fn rotate_towards( + _self: Ref<::glam::DQuat>, + rhs: Val<::glam::DQuat>, + max_angle: f64, + ) -> Val<::glam::DQuat> { + let output: Val<::glam::DQuat> = ::glam::DQuat::rotate_towards( + &_self, + rhs.into_inner(), + max_angle, + ) + .into(); + output + } + /// Performs a spherical linear interpolation between `self` and `end` + /// based on the value `s`. + /// When `s` is `0.0`, the result will be equal to `self`. When `s` + /// is `1.0`, the result will be equal to `end`. + /// # Panics + /// Will panic if `self` or `end` are not normalized when `glam_assert` is enabled. + fn slerp( + _self: Val<::glam::DQuat>, + end: Val<::glam::DQuat>, + s: f64, + ) -> Val<::glam::DQuat> { + let output: Val<::glam::DQuat> = ::glam::DQuat::slerp( + _self.into_inner(), + end.into_inner(), + s, + ) + .into(); + output + } + /// Subtracts the `rhs` quaternion from `self`. + /// The difference is not guaranteed to be normalized. + fn sub(_self: Val<::glam::DQuat>, rhs: Val<::glam::DQuat>) -> Val<::glam::DQuat> { + let output: Val<::glam::DQuat> = <::glam::DQuat as ::core::ops::Sub< + ::glam::DQuat, + >>::sub(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + /// `[x, y, z, w]` + fn to_array(_self: Ref<::glam::DQuat>) -> [f64; 4] { + let output: [f64; 4] = ::glam::DQuat::to_array(&_self).into(); + output + } + /// Returns the rotation angles for the given euler rotation sequence. + fn to_euler( + _self: Val<::glam::DQuat>, + order: Val<::glam::EulerRot>, + ) -> (f64, f64, f64) { + let output: (f64, f64, f64) = ::glam::DQuat::to_euler( + _self.into_inner(), + order.into_inner(), + ) + .into(); + output + } + /// Returns the rotation axis scaled by the rotation in radians. + fn to_scaled_axis(_self: Val<::glam::DQuat>) -> Val<::glam::DVec3> { + let output: Val<::glam::DVec3> = ::glam::DQuat::to_scaled_axis( + _self.into_inner(), + ) + .into(); + output + } + /// Returns the vector part of the quaternion. + fn xyz(_self: Val<::glam::DQuat>) -> Val<::glam::DVec3> { + let output: Val<::glam::DVec3> = ::glam::DQuat::xyz(_self.into_inner()).into(); + output + } +} +#[script_bindings( + remote, + name = "euler_rot_functions", + bms_core_path = "bevy_mod_scripting_core", + generated +)] +impl ::glam::EulerRot { + fn assert_receiver_is_total_eq(_self: Ref<::glam::EulerRot>) -> () { + let output: () = <::glam::EulerRot as ::core::cmp::Eq>::assert_receiver_is_total_eq( + &_self, + ) + .into(); + output + } + fn clone(_self: Ref<::glam::EulerRot>) -> Val<::glam::EulerRot> { + let output: Val<::glam::EulerRot> = <::glam::EulerRot as ::bevy_reflect::erased_serde::__private::serde::__private::Clone>::clone( + &_self, + ) + .into(); + output + } + fn eq(_self: Ref<::glam::EulerRot>, other: Ref<::glam::EulerRot>) -> bool { + let output: bool = <::glam::EulerRot as ::core::cmp::PartialEq< + ::glam::EulerRot, + >>::eq(&_self, &other) + .into(); + output + } +} +#[script_bindings( + remote, + name = "b_vec_3_a_functions", + bms_core_path = "bevy_mod_scripting_core", + generated +)] +impl ::glam::BVec3A { + /// Returns true if all the elements are true, false otherwise. + fn all(_self: Val<::glam::BVec3A>) -> bool { + let output: bool = ::glam::BVec3A::all(_self.into_inner()).into(); + output + } + /// Returns true if any of the elements are true, false otherwise. + fn any(_self: Val<::glam::BVec3A>) -> bool { + let output: bool = ::glam::BVec3A::any(_self.into_inner()).into(); + output + } + /// Returns a bitmask with the lowest 3 bits set from the elements of `self`. + /// A true element results in a `1` bit and a false element in a `0` bit. Element `x` goes + /// into the first lowest bit, element `y` into the second, etc. + fn bitmask(_self: Val<::glam::BVec3A>) -> u32 { + let output: u32 = ::glam::BVec3A::bitmask(_self.into_inner()).into(); + output + } + fn clone(_self: Ref<::glam::BVec3A>) -> Val<::glam::BVec3A> { + let output: Val<::glam::BVec3A> = <::glam::BVec3A as ::bevy_reflect::erased_serde::__private::serde::__private::Clone>::clone( + &_self, + ) + .into(); + output + } + fn eq(_self: Ref<::glam::BVec3A>, rhs: Ref<::glam::BVec3A>) -> bool { + let output: bool = <::glam::BVec3A as ::core::cmp::PartialEq< + ::glam::BVec3A, + >>::eq(&_self, &rhs) + .into(); + output + } + /// Creates a new vector mask from a bool array. + fn from_array(a: [bool; 3]) -> Val<::glam::BVec3A> { + let output: Val<::glam::BVec3A> = ::glam::BVec3A::from_array(a).into(); + output + } + /// Creates a new vector mask. + fn new(x: bool, y: bool, z: bool) -> Val<::glam::BVec3A> { + let output: Val<::glam::BVec3A> = ::glam::BVec3A::new(x, y, z).into(); + output + } + /// Sets the element at `index`. + /// Panics if `index` is greater than 2. + fn set(mut _self: Mut<::glam::BVec3A>, index: usize, value: bool) -> () { + let output: () = ::glam::BVec3A::set(&mut _self, index, value).into(); + output + } + /// Creates a vector mask with all elements set to `v`. + fn splat(v: bool) -> Val<::glam::BVec3A> { + let output: Val<::glam::BVec3A> = ::glam::BVec3A::splat(v).into(); + output + } + /// Tests the value at `index`. + /// Panics if `index` is greater than 2. + fn test(_self: Ref<::glam::BVec3A>, index: usize) -> bool { + let output: bool = ::glam::BVec3A::test(&_self, index).into(); + output + } +} +#[script_bindings( + remote, + name = "b_vec_4_a_functions", + bms_core_path = "bevy_mod_scripting_core", + generated +)] +impl ::glam::BVec4A { + /// Returns true if all the elements are true, false otherwise. + fn all(_self: Val<::glam::BVec4A>) -> bool { + let output: bool = ::glam::BVec4A::all(_self.into_inner()).into(); + output + } + /// Returns true if any of the elements are true, false otherwise. + fn any(_self: Val<::glam::BVec4A>) -> bool { + let output: bool = ::glam::BVec4A::any(_self.into_inner()).into(); + output + } + /// Returns a bitmask with the lowest 4 bits set from the elements of `self`. + /// A true element results in a `1` bit and a false element in a `0` bit. Element `x` goes + /// into the first lowest bit, element `y` into the second, etc. + fn bitmask(_self: Val<::glam::BVec4A>) -> u32 { + let output: u32 = ::glam::BVec4A::bitmask(_self.into_inner()).into(); + output + } + fn clone(_self: Ref<::glam::BVec4A>) -> Val<::glam::BVec4A> { + let output: Val<::glam::BVec4A> = <::glam::BVec4A as ::bevy_reflect::erased_serde::__private::serde::__private::Clone>::clone( + &_self, + ) + .into(); + output + } + fn eq(_self: Ref<::glam::BVec4A>, rhs: Ref<::glam::BVec4A>) -> bool { + let output: bool = <::glam::BVec4A as ::core::cmp::PartialEq< + ::glam::BVec4A, + >>::eq(&_self, &rhs) + .into(); + output + } + /// Creates a new vector mask from a bool array. + fn from_array(a: [bool; 4]) -> Val<::glam::BVec4A> { + let output: Val<::glam::BVec4A> = ::glam::BVec4A::from_array(a).into(); + output + } + /// Creates a new vector mask. + fn new(x: bool, y: bool, z: bool, w: bool) -> Val<::glam::BVec4A> { + let output: Val<::glam::BVec4A> = ::glam::BVec4A::new(x, y, z, w).into(); + output + } + /// Sets the element at `index`. + /// Panics if `index` is greater than 3. + fn set(mut _self: Mut<::glam::BVec4A>, index: usize, value: bool) -> () { + let output: () = ::glam::BVec4A::set(&mut _self, index, value).into(); + output + } + /// Creates a vector mask with all elements set to `v`. + fn splat(v: bool) -> Val<::glam::BVec4A> { + let output: Val<::glam::BVec4A> = ::glam::BVec4A::splat(v).into(); + output + } + /// Tests the value at `index`. + /// Panics if `index` is greater than 3. + fn test(_self: Ref<::glam::BVec4A>, index: usize) -> bool { + let output: bool = ::glam::BVec4A::test(&_self, index).into(); + output + } +} +#[script_bindings( + remote, + name = "smol_str_functions", + bms_core_path = "bevy_mod_scripting_core", + generated +)] +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<::smol_str::SmolStr>, 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<::smol_str::SmolStr>) -> bool { + let output: bool = ::smol_str::SmolStr::is_empty(&_self).into(); + output + } + 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<::smol_str::SmolStr>) -> usize { + let output: usize = ::smol_str::SmolStr::len(&_self).into(); + output + } + fn to_string(_self: Ref<::smol_str::SmolStr>) -> ::std::string::String { + let output: ::std::string::String = ::smol_str::SmolStr::to_string(&_self) + .into(); + output + } +} +#[script_bindings( + remote, + name = "uuid_functions", + bms_core_path = "bevy_mod_scripting_core", + generated +)] +impl ::uuid::Uuid { + /// Returns a 128bit value containing the value. + /// The bytes in the UUID will be packed directly into a `u128`. + /// # Examples + /// ``` + /// # use uuid::Uuid; + /// # fn main() -> Result<(), uuid::Error> { + /// let uuid = Uuid::parse_str("a1a2a3a4-b1b2-c1c2-d1d2-d3d4d5d6d7d8")?; + /// assert_eq!( + /// uuid.as_u128(), + /// 0xa1a2a3a4b1b2c1c2d1d2d3d4d5d6d7d8, + /// ); + /// # Ok(()) + /// # } + /// ``` + 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. + /// The bytes in the UUID will be split into two `u64`. + /// The first u64 represents the 64 most significant bits, + /// the second one represents the 64 least significant. + /// # Examples + /// ``` + /// # use uuid::Uuid; + /// # fn main() -> Result<(), uuid::Error> { + /// let uuid = Uuid::parse_str("a1a2a3a4-b1b2-c1c2-d1d2-d3d4d5d6d7d8")?; + /// assert_eq!( + /// uuid.as_u64_pair(), + /// (0xa1a2a3a4b1b2c1c2, 0xd1d2d3d4d5d6d7d8), + /// ); + /// # Ok(()) + /// # } + /// ``` + 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<::uuid::Uuid>) -> () { + let output: () = <::uuid::Uuid as ::core::cmp::Eq>::assert_receiver_is_total_eq( + &_self, + ) + .into(); + output + } + 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(); + output + } + /// A buffer that can be used for `encode_...` calls, that is + /// guaranteed to be long enough for any of the format adapters. + /// # Examples + /// ``` + /// # use uuid::Uuid; + /// let uuid = Uuid::nil(); + /// assert_eq!( + /// uuid.simple().encode_lower(&mut Uuid::encode_buffer()), + /// "00000000000000000000000000000000" + /// ); + /// assert_eq!( + /// uuid.hyphenated() + /// .encode_lower(&mut Uuid::encode_buffer()), + /// "00000000-0000-0000-0000-000000000000" + /// ); + /// assert_eq!( + /// uuid.urn().encode_lower(&mut Uuid::encode_buffer()), + /// "urn:uuid:00000000-0000-0000-0000-000000000000" + /// ); + /// ``` + fn encode_buffer() -> [u8; 45] { + let output: [u8; 45] = ::uuid::Uuid::encode_buffer().into(); + output + } + fn eq(_self: Ref<::uuid::Uuid>, other: Ref<::uuid::Uuid>) -> bool { + let output: bool = <::uuid::Uuid as ::core::cmp::PartialEq< + ::uuid::Uuid, + >>::eq(&_self, &other) + .into(); + output + } + /// Creates a UUID using the supplied bytes. + /// # Examples + /// Basic usage: + /// ``` + /// # fn main() -> Result<(), uuid::Error> { + /// # use uuid::Uuid; + /// let bytes = [ + /// 0xa1, 0xa2, 0xa3, 0xa4, + /// 0xb1, 0xb2, + /// 0xc1, 0xc2, + /// 0xd1, 0xd2, 0xd3, 0xd4, 0xd5, 0xd6, 0xd7, 0xd8, + /// ]; + /// let uuid = Uuid::from_bytes(bytes); + /// assert_eq!( + /// uuid.hyphenated().to_string(), + /// "a1a2a3a4-b1b2-c1c2-d1d2-d3d4d5d6d7d8" + /// ); + /// # Ok(()) + /// # } + /// ``` + 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. + /// The individual fields encoded in the buffer will be flipped. + /// # Examples + /// Basic usage: + /// ``` + /// # fn main() -> Result<(), uuid::Error> { + /// # use uuid::Uuid; + /// let bytes = [ + /// 0xa1, 0xa2, 0xa3, 0xa4, + /// 0xb1, 0xb2, + /// 0xc1, 0xc2, + /// 0xd1, 0xd2, 0xd3, 0xd4, 0xd5, 0xd6, 0xd7, 0xd8, + /// ]; + /// let uuid = Uuid::from_bytes_le(bytes); + /// assert_eq!( + /// "a4a3a2a1-b2b1-c2c1-d1d2-d3d4d5d6d7d8", + /// uuid.hyphenated().to_string(), + /// ); + /// # Ok(()) + /// # } + /// ``` + 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. + /// # Examples + /// Basic usage: + /// ``` + /// # use uuid::Uuid; + /// let v = 0xa1a2a3a4b1b2c1c2d1d2d3d4d5d6d7d8u128; + /// let uuid = Uuid::from_u128(v); + /// assert_eq!( + /// "a1a2a3a4-b1b2-c1c2-d1d2-d3d4d5d6d7d8", + /// uuid.hyphenated().to_string(), + /// ); + /// ``` + 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. + /// The entire value will be flipped to convert into big-endian order. + /// This is based on the endianness of the UUID, rather than the target + /// environment so bytes will be flipped on both big and little endian + /// machines. + /// # Examples + /// Basic usage: + /// ``` + /// # use uuid::Uuid; + /// let v = 0xa1a2a3a4b1b2c1c2d1d2d3d4d5d6d7d8u128; + /// let uuid = Uuid::from_u128_le(v); + /// assert_eq!( + /// "d8d7d6d5-d4d3-d2d1-c2c1-b2b1a4a3a2a1", + /// uuid.hyphenated().to_string(), + /// ); + /// ``` + 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. + /// # Examples + /// Basic usage: + /// ``` + /// # use uuid::Uuid; + /// let hi = 0xa1a2a3a4b1b2c1c2u64; + /// let lo = 0xd1d2d3d4d5d6d7d8u64; + /// let uuid = Uuid::from_u64_pair(hi, lo); + /// assert_eq!( + /// "a1a2a3a4-b1b2-c1c2-d1d2-d3d4d5d6d7d8", + /// uuid.hyphenated().to_string(), + /// ); + /// ``` + 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<::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(); + output + } + /// Returns the version number of the UUID. + /// This represents the algorithm used to generate the value. + /// This method is the future-proof alternative to [`Uuid::get_version`]. + /// # Examples + /// Basic usage: + /// ``` + /// # use uuid::Uuid; + /// # fn main() -> Result<(), uuid::Error> { + /// let my_uuid = Uuid::parse_str("02f09a3f-1624-3b1d-8409-44eff7708208")?; + /// assert_eq!(3, my_uuid.get_version_num()); + /// # Ok(()) + /// # } + /// ``` + /// # References + /// * [Version Field in RFC 9562](https://www.ietf.org/rfc/rfc9562.html#section-4.2) + 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. + /// # Examples + /// ``` + /// # use uuid::Uuid; + /// let bytes = [ + /// 0xa1, 0xa2, 0xa3, 0xa4, + /// 0xb1, 0xb2, + /// 0xc1, 0xc2, + /// 0xd1, 0xd2, 0xd3, 0xd4, 0xd5, 0xd6, 0xd7, 0xd8, + /// ]; + /// let uuid = Uuid::from_bytes(bytes); + /// assert_eq!(bytes, uuid.into_bytes()); + /// ``` + 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<::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<::uuid::Uuid>) -> bool { + let output: bool = ::uuid::Uuid::is_nil(&_self).into(); + output + } + /// The 'max UUID' (all ones). + /// The max UUID is a special form of UUID that is specified to have all + /// 128 bits set to one. + /// # References + /// * [Max UUID in RFC 9562](https://www.ietf.org/rfc/rfc9562.html#section-5.10) + /// # Examples + /// Basic usage: + /// ``` + /// # use uuid::Uuid; + /// let uuid = Uuid::max(); + /// assert_eq!( + /// "ffffffff-ffff-ffff-ffff-ffffffffffff", + /// uuid.hyphenated().to_string(), + /// ); + /// ``` + fn max() -> Val<::uuid::Uuid> { + let output: Val<::uuid::Uuid> = ::uuid::Uuid::max().into(); + output + } + /// Creates a random UUID. + /// This uses the [`getrandom`] crate to utilise the operating system's RNG + /// as the source of random numbers. If you'd like to use a custom + /// generator, don't use this method: generate random bytes using your + /// custom generator and pass them to the + /// [`uuid::Builder::from_random_bytes`][from_random_bytes] function + /// instead. + /// Note that usage of this method requires the `v4` feature of this crate + /// to be enabled. + /// # Examples + /// Basic usage: + /// ``` + /// # use uuid::{Uuid, Version}; + /// let uuid = Uuid::new_v4(); + /// assert_eq!(Some(Version::Random), uuid.get_version()); + /// ``` + /// # References + /// * [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<::uuid::Uuid> { + let output: Val<::uuid::Uuid> = ::uuid::Uuid::new_v4().into(); + output + } + /// The 'nil UUID' (all zeros). + /// The nil UUID is a special form of UUID that is specified to have all + /// 128 bits set to zero. + /// # References + /// * [Nil UUID in RFC 9562](https://www.ietf.org/rfc/rfc9562.html#section-5.9) + /// # Examples + /// Basic usage: + /// ``` + /// # use uuid::Uuid; + /// let uuid = Uuid::nil(); + /// assert_eq!( + /// "00000000-0000-0000-0000-000000000000", + /// uuid.hyphenated().to_string(), + /// ); + /// ``` + 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. + /// The bytes will be flipped to convert into little-endian order. This is + /// based on the endianness of the UUID, rather than the target environment + /// so bytes will be flipped on both big and little endian machines. + /// # Examples + /// ``` + /// use uuid::Uuid; + /// # fn main() -> Result<(), uuid::Error> { + /// let uuid = Uuid::parse_str("a1a2a3a4-b1b2-c1c2-d1d2-d3d4d5d6d7d8")?; + /// assert_eq!( + /// uuid.to_bytes_le(), + /// ([ + /// 0xa4, 0xa3, 0xa2, 0xa1, 0xb2, 0xb1, 0xc2, 0xc1, 0xd1, 0xd2, + /// 0xd3, 0xd4, 0xd5, 0xd6, 0xd7, 0xd8 + /// ]) + /// ); + /// # Ok(()) + /// # } + /// ``` + 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. + /// The bytes in the `u128` will be flipped to convert into big-endian + /// order. This is based on the endianness of the UUID, rather than the + /// target environment so bytes will be flipped on both big and little + /// endian machines. + /// Note that this will produce a different result than + /// [`Uuid::to_fields_le`], because the entire UUID is reversed, rather + /// than reversing the individual fields in-place. + /// # Examples + /// ``` + /// # use uuid::Uuid; + /// # fn main() -> Result<(), uuid::Error> { + /// let uuid = Uuid::parse_str("a1a2a3a4-b1b2-c1c2-d1d2-d3d4d5d6d7d8")?; + /// assert_eq!( + /// uuid.to_u128_le(), + /// 0xd8d7d6d5d4d3d2d1c2c1b2b1a4a3a2a1, + /// ); + /// # Ok(()) + /// # } + /// ``` + fn to_u128_le(_self: Ref<::uuid::Uuid>) -> u128 { + let output: u128 = ::uuid::Uuid::to_u128_le(&_self).into(); + output + } +} +impl Plugin for BevyReflectScriptingPlugin { + fn build(&self, app: &mut App) { + let mut world = app.world_mut(); + register_atomic_bool_functions(&mut world); + register_atomic_i_16_functions(&mut world); + register_atomic_i_32_functions(&mut world); + register_atomic_i_64_functions(&mut world); + register_atomic_i_8_functions(&mut world); + register_atomic_isize_functions(&mut world); + register_atomic_u_16_functions(&mut world); + register_atomic_u_32_functions(&mut world); + register_atomic_u_64_functions(&mut world); + register_atomic_u_8_functions(&mut world); + register_atomic_usize_functions(&mut world); + 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); + register_vec_2_functions(&mut world); + register_vec_3_a_functions(&mut world); + register_vec_4_functions(&mut world); + register_b_vec_2_functions(&mut world); + register_b_vec_3_functions(&mut world); + register_b_vec_4_functions(&mut world); + register_d_vec_2_functions(&mut world); + register_d_vec_3_functions(&mut world); + register_d_vec_4_functions(&mut world); + register_mat_2_functions(&mut world); + register_mat_3_functions(&mut world); + register_mat_3_a_functions(&mut world); + register_mat_4_functions(&mut world); + register_d_mat_2_functions(&mut world); + register_d_mat_3_functions(&mut world); + register_d_mat_4_functions(&mut world); + register_affine_2_functions(&mut world); + register_affine_3_a_functions(&mut world); + register_d_affine_2_functions(&mut world); + register_d_affine_3_functions(&mut world); + register_d_quat_functions(&mut world); + register_euler_rot_functions(&mut world); + register_b_vec_3_a_functions(&mut world); + register_b_vec_4_a_functions(&mut world); + register_smol_str_functions(&mut world); + register_uuid_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 c80d6c09dc..c19c29ccf4 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 @@ -1,828 +1,649 @@ - #![allow(clippy::all)] - #![allow(unused, deprecated, dead_code)] - 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 BevyTimeScriptingPlugin; - pub(crate) fn register_fixed_functions(world: &mut bevy::ecs::world::World) { - bevy_mod_scripting_core::bindings::function::namespace::NamespaceBuilder::< - bevy::time::prelude::Fixed, - >::new(world) - .register_documented( - "clone", - |_self: Ref| { - let output: Val = { - { - let output: Val = ::clone( - &_self, - ) - .into(); - output - } - }; - output - }, - "", - &["_self"], - ); - let registry = world - .get_resource_or_init::(); - let mut registry = registry.write(); - registry - .register_type_data::< - bevy::time::prelude::Fixed, - bevy_mod_scripting_core::bindings::MarkAsGenerated, - >(); - } - pub(crate) fn register_real_functions(world: &mut bevy::ecs::world::World) { - bevy_mod_scripting_core::bindings::function::namespace::NamespaceBuilder::< - bevy::time::prelude::Real, - >::new(world) - .register_documented( - "clone", - |_self: Ref| { - let output: Val = { - { - let output: Val = ::clone( - &_self, - ) - .into(); - output - } - }; - output - }, - "", - &["_self"], - ); - let registry = world - .get_resource_or_init::(); - let mut registry = registry.write(); - registry - .register_type_data::< - bevy::time::prelude::Real, - bevy_mod_scripting_core::bindings::MarkAsGenerated, - >(); - } - pub(crate) fn register_timer_functions(world: &mut bevy::ecs::world::World) { - bevy_mod_scripting_core::bindings::function::namespace::NamespaceBuilder::< - bevy::time::prelude::Timer, - >::new(world) - .register_documented( - "assert_receiver_is_total_eq", - |_self: Ref| { - let output: () = { - { - let output: () = ::assert_receiver_is_total_eq( - &_self, - ) - .into(); - output - } - }; - output - }, - "", - &["_self"], - ) - .register_documented( - "clone", - |_self: Ref| { - let output: Val = { - { - let output: Val = ::clone( - &_self, - ) - .into(); - output - } - }; - output - }, - "", - &["_self"], - ) - .register_documented( - "duration", - |_self: Ref| { - let output: Val<::core::time::Duration> = { - { - let output: Val<::core::time::Duration> = bevy::time::prelude::Timer::duration( - &_self, - ) - .into(); - output - } - }; - output - }, - " Returns the duration of the timer.\n # Examples\n ```\n # use bevy_time::*;\n use std::time::Duration;\n let timer = Timer::new(Duration::from_secs(1), TimerMode::Once);\n assert_eq!(timer.duration(), Duration::from_secs(1));\n ```", - &["_self"], - ) - .register_documented( - "elapsed", - |_self: Ref| { - let output: Val<::core::time::Duration> = { - { - let output: Val<::core::time::Duration> = bevy::time::prelude::Timer::elapsed( - &_self, - ) - .into(); - output - } - }; - output - }, - " Returns the time elapsed on the timer. Guaranteed to be between 0.0 and `duration`.\n Will only equal `duration` when the timer is finished and non repeating.\n See also [`Stopwatch::elapsed`](Stopwatch::elapsed).\n # Examples\n ```\n # use bevy_time::*;\n use std::time::Duration;\n let mut timer = Timer::from_seconds(1.0, TimerMode::Once);\n timer.tick(Duration::from_secs_f32(0.5));\n assert_eq!(timer.elapsed(), Duration::from_secs_f32(0.5));\n ```", - &["_self"], - ) - .register_documented( - "elapsed_secs", - |_self: Ref| { - let output: f32 = { - { - let output: f32 = bevy::time::prelude::Timer::elapsed_secs( - &_self, - ) - .into(); - output - } - }; - output - }, - " Returns the time elapsed on the timer as an `f32`.\n See also [`Timer::elapsed`](Timer::elapsed).", - &["_self"], - ) - .register_documented( - "elapsed_secs_f64", - |_self: Ref| { - let output: f64 = { - { - let output: f64 = bevy::time::prelude::Timer::elapsed_secs_f64( - &_self, - ) - .into(); - output - } - }; - output - }, - " Returns the time elapsed on the timer as an `f64`.\n See also [`Timer::elapsed`](Timer::elapsed).", - &["_self"], - ) - .register_documented( - "eq", - | - _self: Ref, - other: Ref| - { - let output: bool = { - { - let output: bool = >::eq(&_self, &other) - .into(); - output - } - }; - output - }, - "", - &["_self", "other"], - ) - .register_documented( - "finished", - |_self: Ref| { - let output: bool = { - { - let output: bool = bevy::time::prelude::Timer::finished( - &_self, - ) - .into(); - output - } - }; - output - }, - " Returns `true` if the timer has reached its duration.\n For repeating timers, this method behaves identically to [`Timer::just_finished`].\n # Examples\n ```\n # use bevy_time::*;\n use std::time::Duration;\n let mut timer_once = Timer::from_seconds(1.0, TimerMode::Once);\n timer_once.tick(Duration::from_secs_f32(1.5));\n assert!(timer_once.finished());\n timer_once.tick(Duration::from_secs_f32(0.5));\n assert!(timer_once.finished());\n let mut timer_repeating = Timer::from_seconds(1.0, TimerMode::Repeating);\n timer_repeating.tick(Duration::from_secs_f32(1.1));\n assert!(timer_repeating.finished());\n timer_repeating.tick(Duration::from_secs_f32(0.8));\n assert!(!timer_repeating.finished());\n timer_repeating.tick(Duration::from_secs_f32(0.6));\n assert!(timer_repeating.finished());\n ```", - &["_self"], - ) - .register_documented( - "fraction", - |_self: Ref| { - let output: f32 = { - { - let output: f32 = bevy::time::prelude::Timer::fraction( - &_self, - ) - .into(); - output - } - }; - output - }, - " Returns the fraction of the timer elapsed time (goes from 0.0 to 1.0).\n # Examples\n ```\n # use bevy_time::*;\n use std::time::Duration;\n let mut timer = Timer::from_seconds(2.0, TimerMode::Once);\n timer.tick(Duration::from_secs_f32(0.5));\n assert_eq!(timer.fraction(), 0.25);\n ```", - &["_self"], - ) - .register_documented( - "fraction_remaining", - |_self: Ref| { - let output: f32 = { - { - let output: f32 = bevy::time::prelude::Timer::fraction_remaining( - &_self, - ) - .into(); - output - } - }; - output - }, - " Returns the fraction of the timer remaining time (goes from 1.0 to 0.0).\n # Examples\n ```\n # use bevy_time::*;\n use std::time::Duration;\n let mut timer = Timer::from_seconds(2.0, TimerMode::Once);\n timer.tick(Duration::from_secs_f32(0.5));\n assert_eq!(timer.fraction_remaining(), 0.75);\n ```", - &["_self"], - ) - .register_documented( - "from_seconds", - |duration: f32, mode: Val| { - let output: Val = { - { - let output: Val = bevy::time::prelude::Timer::from_seconds( - duration, - mode.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Creates a new timer with a given duration in seconds.\n # Example\n ```\n # use bevy_time::*;\n let mut timer = Timer::from_seconds(1.0, TimerMode::Once);\n ```", - &["duration", "mode"], - ) - .register_documented( - "just_finished", - |_self: Ref| { - let output: bool = { - { - let output: bool = bevy::time::prelude::Timer::just_finished( - &_self, - ) - .into(); - output - } - }; - output - }, - " Returns `true` only on the tick the timer reached its duration.\n # Examples\n ```\n # use bevy_time::*;\n use std::time::Duration;\n let mut timer = Timer::from_seconds(1.0, TimerMode::Once);\n timer.tick(Duration::from_secs_f32(1.5));\n assert!(timer.just_finished());\n timer.tick(Duration::from_secs_f32(0.5));\n assert!(!timer.just_finished());\n ```", - &["_self"], - ) - .register_documented( - "mode", - |_self: Ref| { - let output: Val = { - { - let output: Val = bevy::time::prelude::Timer::mode( - &_self, - ) - .into(); - output - } - }; - output - }, - " Returns the mode of the timer.\n # Examples\n ```\n # use bevy_time::*;\n let mut timer = Timer::from_seconds(1.0, TimerMode::Repeating);\n assert_eq!(timer.mode(), TimerMode::Repeating);\n ```", - &["_self"], - ) - .register_documented( - "new", - | - duration: Val<::core::time::Duration>, - mode: Val| - { - let output: Val = { - { - let output: Val = bevy::time::prelude::Timer::new( - duration.into_inner(), - mode.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Creates a new timer with a given duration.\n See also [`Timer::from_seconds`](Timer::from_seconds).", - &["duration", "mode"], - ) - .register_documented( - "pause", - |mut _self: Mut| { - let output: () = { - { - let output: () = bevy::time::prelude::Timer::pause( - &mut _self, - ) - .into(); - output - } - }; - output - }, - " Pauses the Timer. Disables the ticking of the timer.\n See also [`Stopwatch::pause`](Stopwatch::pause).\n # Examples\n ```\n # use bevy_time::*;\n use std::time::Duration;\n let mut timer = Timer::from_seconds(1.0, TimerMode::Once);\n timer.pause();\n timer.tick(Duration::from_secs_f32(0.5));\n assert_eq!(timer.elapsed_secs(), 0.0);\n ```", - &["_self"], - ) - .register_documented( - "paused", - |_self: Ref| { - let output: bool = { - { - let output: bool = bevy::time::prelude::Timer::paused(&_self) - .into(); - output - } - }; - output - }, - " Returns `true` if the timer is paused.\n See also [`Stopwatch::is_paused`](Stopwatch::is_paused).\n # Examples\n ```\n # use bevy_time::*;\n let mut timer = Timer::from_seconds(1.0, TimerMode::Once);\n assert!(!timer.paused());\n timer.pause();\n assert!(timer.paused());\n timer.unpause();\n assert!(!timer.paused());\n ```", - &["_self"], - ) - .register_documented( - "remaining", - |_self: Ref| { - let output: Val<::core::time::Duration> = { - { - let output: Val<::core::time::Duration> = bevy::time::prelude::Timer::remaining( - &_self, - ) - .into(); - output - } - }; - output - }, - " Returns the remaining time using Duration\n # Examples\n ```\n # use bevy_time::*;\n use std::time::Duration;\n let mut timer = Timer::from_seconds(2.0, TimerMode::Once);\n timer.tick(Duration::from_secs_f32(0.5));\n assert_eq!(timer.remaining(), Duration::from_secs_f32(1.5));\n ```", - &["_self"], - ) - .register_documented( - "remaining_secs", - |_self: Ref| { - let output: f32 = { - { - let output: f32 = bevy::time::prelude::Timer::remaining_secs( - &_self, - ) - .into(); - output - } - }; - output - }, - " Returns the remaining time in seconds\n # Examples\n ```\n # use bevy_time::*;\n use std::cmp::Ordering;\n use std::time::Duration;\n let mut timer = Timer::from_seconds(2.0, TimerMode::Once);\n timer.tick(Duration::from_secs_f32(0.5));\n let result = timer.remaining_secs().total_cmp(&1.5);\n assert_eq!(Ordering::Equal, result);\n ```", - &["_self"], - ) - .register_documented( - "reset", - |mut _self: Mut| { - let output: () = { - { - let output: () = bevy::time::prelude::Timer::reset( - &mut _self, - ) - .into(); - output - } - }; - output - }, - " Resets the timer. The reset doesn't affect the `paused` state of the timer.\n See also [`Stopwatch::reset`](Stopwatch::reset).\n Examples\n ```\n # use bevy_time::*;\n use std::time::Duration;\n let mut timer = Timer::from_seconds(1.0, TimerMode::Once);\n timer.tick(Duration::from_secs_f32(1.5));\n timer.reset();\n assert!(!timer.finished());\n assert!(!timer.just_finished());\n assert_eq!(timer.elapsed_secs(), 0.0);\n ```", - &["_self"], - ) - .register_documented( - "set_duration", - | - mut _self: Mut, - duration: Val<::core::time::Duration>| - { - let output: () = { - { - let output: () = bevy::time::prelude::Timer::set_duration( - &mut _self, - duration.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Sets the duration of the timer.\n # Examples\n ```\n # use bevy_time::*;\n use std::time::Duration;\n let mut timer = Timer::from_seconds(1.5, TimerMode::Once);\n timer.set_duration(Duration::from_secs(1));\n assert_eq!(timer.duration(), Duration::from_secs(1));\n ```", - &["_self", "duration"], - ) - .register_documented( - "set_elapsed", - | - mut _self: Mut, - time: Val<::core::time::Duration>| - { - let output: () = { - { - let output: () = bevy::time::prelude::Timer::set_elapsed( - &mut _self, - time.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Sets the elapsed time of the timer without any other considerations.\n See also [`Stopwatch::set`](Stopwatch::set).\n #\n ```\n # use bevy_time::*;\n use std::time::Duration;\n let mut timer = Timer::from_seconds(1.0, TimerMode::Once);\n timer.set_elapsed(Duration::from_secs(2));\n assert_eq!(timer.elapsed(), Duration::from_secs(2));\n // the timer is not finished even if the elapsed time is greater than the duration.\n assert!(!timer.finished());\n ```", - &["_self", "time"], - ) - .register_documented( - "set_mode", - | - mut _self: Mut, - mode: Val| - { - let output: () = { - { - let output: () = bevy::time::prelude::Timer::set_mode( - &mut _self, - mode.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Sets the mode of the timer.\n # Examples\n ```\n # use bevy_time::*;\n let mut timer = Timer::from_seconds(1.0, TimerMode::Repeating);\n timer.set_mode(TimerMode::Once);\n assert_eq!(timer.mode(), TimerMode::Once);\n ```", - &["_self", "mode"], - ) - .register_documented( - "times_finished_this_tick", - |_self: Ref| { - let output: u32 = { - { - let output: u32 = bevy::time::prelude::Timer::times_finished_this_tick( - &_self, - ) - .into(); - output - } - }; - output - }, - " Returns the number of times a repeating timer\n finished during the last [`tick`](Timer::tick) call.\n For non repeating-timers, this method will only ever\n return 0 or 1.\n # Examples\n ```\n # use bevy_time::*;\n use std::time::Duration;\n let mut timer = Timer::from_seconds(1.0, TimerMode::Repeating);\n timer.tick(Duration::from_secs_f32(6.0));\n assert_eq!(timer.times_finished_this_tick(), 6);\n timer.tick(Duration::from_secs_f32(2.0));\n assert_eq!(timer.times_finished_this_tick(), 2);\n timer.tick(Duration::from_secs_f32(0.5));\n assert_eq!(timer.times_finished_this_tick(), 0);\n ```", - &["_self"], - ) - .register_documented( - "unpause", - |mut _self: Mut| { - let output: () = { - { - let output: () = bevy::time::prelude::Timer::unpause( - &mut _self, - ) - .into(); - output - } - }; - output - }, - " Unpauses the Timer. Resumes the ticking of the timer.\n See also [`Stopwatch::unpause()`](Stopwatch::unpause).\n # Examples\n ```\n # use bevy_time::*;\n use std::time::Duration;\n let mut timer = Timer::from_seconds(1.0, TimerMode::Once);\n timer.pause();\n timer.tick(Duration::from_secs_f32(0.5));\n timer.unpause();\n timer.tick(Duration::from_secs_f32(0.5));\n assert_eq!(timer.elapsed_secs(), 0.5);\n ```", - &["_self"], - ); - let registry = world - .get_resource_or_init::(); - let mut registry = registry.write(); - registry - .register_type_data::< - bevy::time::prelude::Timer, - bevy_mod_scripting_core::bindings::MarkAsGenerated, - >(); - } - pub(crate) fn register_timer_mode_functions(world: &mut bevy::ecs::world::World) { - bevy_mod_scripting_core::bindings::function::namespace::NamespaceBuilder::< - bevy::time::prelude::TimerMode, - >::new(world) - .register_documented( - "assert_receiver_is_total_eq", - |_self: Ref| { - let output: () = { - { - let output: () = ::assert_receiver_is_total_eq( - &_self, - ) - .into(); - output - } - }; - output - }, - "", - &["_self"], - ) - .register_documented( - "clone", - |_self: Ref| { - let output: Val = { - { - let output: Val = ::clone( - &_self, - ) - .into(); - output - } - }; - output - }, - "", - &["_self"], - ) - .register_documented( - "eq", - | - _self: Ref, - other: Ref| - { - let output: bool = { - { - let output: bool = >::eq(&_self, &other) - .into(); - output - } - }; - output - }, - "", - &["_self", "other"], - ); - let registry = world - .get_resource_or_init::(); - let mut registry = registry.write(); - registry - .register_type_data::< - bevy::time::prelude::TimerMode, - bevy_mod_scripting_core::bindings::MarkAsGenerated, - >(); - } - pub(crate) fn register_virtual_functions(world: &mut bevy::ecs::world::World) { - bevy_mod_scripting_core::bindings::function::namespace::NamespaceBuilder::< - bevy::time::prelude::Virtual, - >::new(world) - .register_documented( - "clone", - |_self: Ref| { - let output: Val = { - { - let output: Val = ::clone( - &_self, - ) - .into(); - output - } - }; - output - }, - "", - &["_self"], - ); - let registry = world - .get_resource_or_init::(); - let mut registry = registry.write(); - registry - .register_type_data::< - bevy::time::prelude::Virtual, - bevy_mod_scripting_core::bindings::MarkAsGenerated, - >(); - } - pub(crate) fn register_stopwatch_functions(world: &mut bevy::ecs::world::World) { - bevy_mod_scripting_core::bindings::function::namespace::NamespaceBuilder::< - bevy::time::Stopwatch, - >::new(world) - .register_documented( - "assert_receiver_is_total_eq", - |_self: Ref| { - let output: () = { - { - let output: () = ::assert_receiver_is_total_eq( - &_self, - ) - .into(); - output - } - }; - output - }, - "", - &["_self"], - ) - .register_documented( - "clone", - |_self: Ref| { - let output: Val = { - { - let output: Val = ::clone( - &_self, - ) - .into(); - output - } - }; - output - }, - "", - &["_self"], - ) - .register_documented( - "elapsed", - |_self: Ref| { - let output: Val<::core::time::Duration> = { - { - let output: Val<::core::time::Duration> = bevy::time::Stopwatch::elapsed( - &_self, - ) - .into(); - output - } - }; - output - }, - " Returns the elapsed time since the last [`reset`](Stopwatch::reset)\n of the stopwatch.\n # Examples\n ```\n # use bevy_time::*;\n use std::time::Duration;\n let mut stopwatch = Stopwatch::new();\n stopwatch.tick(Duration::from_secs(1));\n assert_eq!(stopwatch.elapsed(), Duration::from_secs(1));\n ```\n # See Also\n [`elapsed_secs`](Stopwatch::elapsed_secs) - if an `f32` value is desirable instead.\n [`elapsed_secs_f64`](Stopwatch::elapsed_secs_f64) - if an `f64` is desirable instead.", - &["_self"], - ) - .register_documented( - "elapsed_secs", - |_self: Ref| { - let output: f32 = { - { - let output: f32 = bevy::time::Stopwatch::elapsed_secs(&_self) - .into(); - output - } - }; - output - }, - " Returns the elapsed time since the last [`reset`](Stopwatch::reset)\n of the stopwatch, in seconds.\n # Examples\n ```\n # use bevy_time::*;\n use std::time::Duration;\n let mut stopwatch = Stopwatch::new();\n stopwatch.tick(Duration::from_secs(1));\n assert_eq!(stopwatch.elapsed_secs(), 1.0);\n ```\n # See Also\n [`elapsed`](Stopwatch::elapsed) - if a `Duration` is desirable instead.\n [`elapsed_secs_f64`](Stopwatch::elapsed_secs_f64) - if an `f64` is desirable instead.", - &["_self"], - ) - .register_documented( - "elapsed_secs_f64", - |_self: Ref| { - let output: f64 = { - { - let output: f64 = bevy::time::Stopwatch::elapsed_secs_f64( - &_self, - ) - .into(); - output - } - }; - output - }, - " Returns the elapsed time since the last [`reset`](Stopwatch::reset)\n of the stopwatch, in seconds, as f64.\n # See Also\n [`elapsed`](Stopwatch::elapsed) - if a `Duration` is desirable instead.\n [`elapsed_secs`](Stopwatch::elapsed_secs) - if an `f32` is desirable instead.", - &["_self"], - ) - .register_documented( - "eq", - |_self: Ref, other: Ref| { - let output: bool = { - { - let output: bool = >::eq(&_self, &other) - .into(); - output - } - }; - output - }, - "", - &["_self", "other"], - ) - .register_documented( - "is_paused", - |_self: Ref| { - let output: bool = { - { - let output: bool = bevy::time::Stopwatch::is_paused(&_self) - .into(); - output - } - }; - output - }, - " Returns `true` if the stopwatch is paused.\n # Examples\n ```\n # use bevy_time::*;\n let mut stopwatch = Stopwatch::new();\n assert!(!stopwatch.is_paused());\n stopwatch.pause();\n assert!(stopwatch.is_paused());\n stopwatch.unpause();\n assert!(!stopwatch.is_paused());\n ```", - &["_self"], - ) - .register_documented( - "new", - || { - let output: Val = { - { - let output: Val = bevy::time::Stopwatch::new() - .into(); - output - } - }; - output - }, - " Create a new unpaused `Stopwatch` with no elapsed time.\n # Examples\n ```\n # use bevy_time::*;\n let stopwatch = Stopwatch::new();\n assert_eq!(stopwatch.elapsed_secs(), 0.0);\n assert_eq!(stopwatch.is_paused(), false);\n ```", - &[], - ) - .register_documented( - "pause", - |mut _self: Mut| { - let output: () = { - { - let output: () = bevy::time::Stopwatch::pause(&mut _self) - .into(); - output - } - }; - output - }, - " Pauses the stopwatch. Any call to [`tick`](Stopwatch::tick) while\n paused will not have any effect on the elapsed time.\n # Examples\n ```\n # use bevy_time::*;\n use std::time::Duration;\n let mut stopwatch = Stopwatch::new();\n stopwatch.pause();\n stopwatch.tick(Duration::from_secs_f32(1.5));\n assert!(stopwatch.is_paused());\n assert_eq!(stopwatch.elapsed_secs(), 0.0);\n ```", - &["_self"], - ) - .register_documented( - "reset", - |mut _self: Mut| { - let output: () = { - { - let output: () = bevy::time::Stopwatch::reset(&mut _self) - .into(); - output - } - }; - output - }, - " Resets the stopwatch. The reset doesn't affect the paused state of the stopwatch.\n # Examples\n ```\n # use bevy_time::*;\n use std::time::Duration;\n let mut stopwatch = Stopwatch::new();\n stopwatch.tick(Duration::from_secs_f32(1.5));\n stopwatch.reset();\n assert_eq!(stopwatch.elapsed_secs(), 0.0);\n ```", - &["_self"], - ) - .register_documented( - "set_elapsed", - | - mut _self: Mut, - time: Val<::core::time::Duration>| - { - let output: () = { - { - let output: () = bevy::time::Stopwatch::set_elapsed( - &mut _self, - time.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Sets the elapsed time of the stopwatch.\n # Examples\n ```\n # use bevy_time::*;\n use std::time::Duration;\n let mut stopwatch = Stopwatch::new();\n stopwatch.set_elapsed(Duration::from_secs_f32(1.0));\n assert_eq!(stopwatch.elapsed_secs(), 1.0);\n ```", - &["_self", "time"], +// @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_ecs::prelude::*; +use bevy_mod_scripting_derive::script_bindings; +use crate::*; +pub struct BevyTimeScriptingPlugin; +#[script_bindings( + remote, + name = "fixed_functions", + bms_core_path = "bevy_mod_scripting_core", + generated +)] +impl ::bevy_time::prelude::Fixed { + fn clone( + _self: Ref<::bevy_time::prelude::Fixed>, + ) -> Val<::bevy_time::prelude::Fixed> { + let output: Val<::bevy_time::prelude::Fixed> = <::bevy_time::prelude::Fixed as ::core::clone::Clone>::clone( + &_self, + ) + .into(); + output + } +} +#[script_bindings( + remote, + name = "real_functions", + bms_core_path = "bevy_mod_scripting_core", + generated +)] +impl ::bevy_time::prelude::Real { + fn clone(_self: Ref<::bevy_time::prelude::Real>) -> Val<::bevy_time::prelude::Real> { + let output: Val<::bevy_time::prelude::Real> = <::bevy_time::prelude::Real as ::core::clone::Clone>::clone( + &_self, + ) + .into(); + output + } +} +#[script_bindings( + remote, + name = "timer_functions", + bms_core_path = "bevy_mod_scripting_core", + generated +)] +impl ::bevy_time::prelude::Timer { + fn assert_receiver_is_total_eq(_self: Ref<::bevy_time::prelude::Timer>) -> () { + let output: () = <::bevy_time::prelude::Timer as ::core::cmp::Eq>::assert_receiver_is_total_eq( + &_self, + ) + .into(); + output + } + fn clone( + _self: Ref<::bevy_time::prelude::Timer>, + ) -> Val<::bevy_time::prelude::Timer> { + let output: Val<::bevy_time::prelude::Timer> = <::bevy_time::prelude::Timer as ::core::clone::Clone>::clone( + &_self, + ) + .into(); + output + } + /// Returns the duration of the timer. + /// # Examples + /// ``` + /// # use bevy_time::*; + /// use std::time::Duration; + /// let timer = Timer::new(Duration::from_secs(1), TimerMode::Once); + /// assert_eq!(timer.duration(), Duration::from_secs(1)); + /// ``` + fn duration(_self: Ref<::bevy_time::prelude::Timer>) -> Val<::core::time::Duration> { + let output: Val<::core::time::Duration> = ::bevy_time::prelude::Timer::duration( + &_self, + ) + .into(); + output + } + /// Returns the time elapsed on the timer. Guaranteed to be between 0.0 and `duration`. + /// Will only equal `duration` when the timer is finished and non repeating. + /// See also [`Stopwatch::elapsed`](Stopwatch::elapsed). + /// # Examples + /// ``` + /// # use bevy_time::*; + /// use std::time::Duration; + /// let mut timer = Timer::from_seconds(1.0, TimerMode::Once); + /// timer.tick(Duration::from_secs_f32(0.5)); + /// assert_eq!(timer.elapsed(), Duration::from_secs_f32(0.5)); + /// ``` + fn elapsed(_self: Ref<::bevy_time::prelude::Timer>) -> Val<::core::time::Duration> { + let output: Val<::core::time::Duration> = ::bevy_time::prelude::Timer::elapsed( + &_self, + ) + .into(); + output + } + /// Returns the time elapsed on the timer as an `f32`. + /// See also [`Timer::elapsed`](Timer::elapsed). + fn elapsed_secs(_self: Ref<::bevy_time::prelude::Timer>) -> f32 { + let output: f32 = ::bevy_time::prelude::Timer::elapsed_secs(&_self).into(); + output + } + /// Returns the time elapsed on the timer as an `f64`. + /// See also [`Timer::elapsed`](Timer::elapsed). + fn elapsed_secs_f64(_self: Ref<::bevy_time::prelude::Timer>) -> f64 { + let output: f64 = ::bevy_time::prelude::Timer::elapsed_secs_f64(&_self).into(); + output + } + fn eq( + _self: Ref<::bevy_time::prelude::Timer>, + other: Ref<::bevy_time::prelude::Timer>, + ) -> bool { + let output: bool = <::bevy_time::prelude::Timer as ::core::cmp::PartialEq< + ::bevy_time::prelude::Timer, + >>::eq(&_self, &other) + .into(); + output + } + /// Returns `true` if the timer has reached its duration. + /// For repeating timers, this method behaves identically to [`Timer::just_finished`]. + /// # Examples + /// ``` + /// # use bevy_time::*; + /// use std::time::Duration; + /// let mut timer_once = Timer::from_seconds(1.0, TimerMode::Once); + /// timer_once.tick(Duration::from_secs_f32(1.5)); + /// assert!(timer_once.finished()); + /// timer_once.tick(Duration::from_secs_f32(0.5)); + /// assert!(timer_once.finished()); + /// let mut timer_repeating = Timer::from_seconds(1.0, TimerMode::Repeating); + /// timer_repeating.tick(Duration::from_secs_f32(1.1)); + /// assert!(timer_repeating.finished()); + /// timer_repeating.tick(Duration::from_secs_f32(0.8)); + /// assert!(!timer_repeating.finished()); + /// timer_repeating.tick(Duration::from_secs_f32(0.6)); + /// assert!(timer_repeating.finished()); + /// ``` + fn finished(_self: Ref<::bevy_time::prelude::Timer>) -> bool { + let output: bool = ::bevy_time::prelude::Timer::finished(&_self).into(); + output + } + /// Returns the fraction of the timer elapsed time (goes from 0.0 to 1.0). + /// # Examples + /// ``` + /// # use bevy_time::*; + /// use std::time::Duration; + /// let mut timer = Timer::from_seconds(2.0, TimerMode::Once); + /// timer.tick(Duration::from_secs_f32(0.5)); + /// assert_eq!(timer.fraction(), 0.25); + /// ``` + fn fraction(_self: Ref<::bevy_time::prelude::Timer>) -> f32 { + let output: f32 = ::bevy_time::prelude::Timer::fraction(&_self).into(); + output + } + /// Returns the fraction of the timer remaining time (goes from 1.0 to 0.0). + /// # Examples + /// ``` + /// # use bevy_time::*; + /// use std::time::Duration; + /// let mut timer = Timer::from_seconds(2.0, TimerMode::Once); + /// timer.tick(Duration::from_secs_f32(0.5)); + /// assert_eq!(timer.fraction_remaining(), 0.75); + /// ``` + fn fraction_remaining(_self: Ref<::bevy_time::prelude::Timer>) -> f32 { + let output: f32 = ::bevy_time::prelude::Timer::fraction_remaining(&_self).into(); + output + } + /// Creates a new timer with a given duration in seconds. + /// # Example + /// ``` + /// # use bevy_time::*; + /// let mut timer = Timer::from_seconds(1.0, TimerMode::Once); + /// ``` + fn from_seconds( + duration: f32, + mode: Val<::bevy_time::prelude::TimerMode>, + ) -> Val<::bevy_time::prelude::Timer> { + let output: Val<::bevy_time::prelude::Timer> = ::bevy_time::prelude::Timer::from_seconds( + duration, + mode.into_inner(), + ) + .into(); + output + } + /// Returns `true` only on the tick the timer reached its duration. + /// # Examples + /// ``` + /// # use bevy_time::*; + /// use std::time::Duration; + /// let mut timer = Timer::from_seconds(1.0, TimerMode::Once); + /// timer.tick(Duration::from_secs_f32(1.5)); + /// assert!(timer.just_finished()); + /// timer.tick(Duration::from_secs_f32(0.5)); + /// assert!(!timer.just_finished()); + /// ``` + fn just_finished(_self: Ref<::bevy_time::prelude::Timer>) -> bool { + let output: bool = ::bevy_time::prelude::Timer::just_finished(&_self).into(); + output + } + /// Returns the mode of the timer. + /// # Examples + /// ``` + /// # use bevy_time::*; + /// let mut timer = Timer::from_seconds(1.0, TimerMode::Repeating); + /// assert_eq!(timer.mode(), TimerMode::Repeating); + /// ``` + fn mode( + _self: Ref<::bevy_time::prelude::Timer>, + ) -> Val<::bevy_time::prelude::TimerMode> { + let output: Val<::bevy_time::prelude::TimerMode> = ::bevy_time::prelude::Timer::mode( + &_self, + ) + .into(); + output + } + /// Creates a new timer with a given duration. + /// See also [`Timer::from_seconds`](Timer::from_seconds). + fn new( + duration: Val<::core::time::Duration>, + mode: Val<::bevy_time::prelude::TimerMode>, + ) -> Val<::bevy_time::prelude::Timer> { + let output: Val<::bevy_time::prelude::Timer> = ::bevy_time::prelude::Timer::new( + duration.into_inner(), + mode.into_inner(), + ) + .into(); + output + } + /// Pauses the Timer. Disables the ticking of the timer. + /// See also [`Stopwatch::pause`](Stopwatch::pause). + /// # Examples + /// ``` + /// # use bevy_time::*; + /// use std::time::Duration; + /// let mut timer = Timer::from_seconds(1.0, TimerMode::Once); + /// timer.pause(); + /// timer.tick(Duration::from_secs_f32(0.5)); + /// assert_eq!(timer.elapsed_secs(), 0.0); + /// ``` + fn pause(mut _self: Mut<::bevy_time::prelude::Timer>) -> () { + let output: () = ::bevy_time::prelude::Timer::pause(&mut _self).into(); + output + } + /// Returns `true` if the timer is paused. + /// See also [`Stopwatch::is_paused`](Stopwatch::is_paused). + /// # Examples + /// ``` + /// # use bevy_time::*; + /// let mut timer = Timer::from_seconds(1.0, TimerMode::Once); + /// assert!(!timer.paused()); + /// timer.pause(); + /// assert!(timer.paused()); + /// timer.unpause(); + /// assert!(!timer.paused()); + /// ``` + fn paused(_self: Ref<::bevy_time::prelude::Timer>) -> bool { + let output: bool = ::bevy_time::prelude::Timer::paused(&_self).into(); + output + } + /// Returns the remaining time using Duration + /// # Examples + /// ``` + /// # use bevy_time::*; + /// use std::time::Duration; + /// let mut timer = Timer::from_seconds(2.0, TimerMode::Once); + /// timer.tick(Duration::from_secs_f32(0.5)); + /// assert_eq!(timer.remaining(), Duration::from_secs_f32(1.5)); + /// ``` + fn remaining( + _self: Ref<::bevy_time::prelude::Timer>, + ) -> Val<::core::time::Duration> { + let output: Val<::core::time::Duration> = ::bevy_time::prelude::Timer::remaining( + &_self, + ) + .into(); + output + } + /// Returns the remaining time in seconds + /// # Examples + /// ``` + /// # use bevy_time::*; + /// use std::cmp::Ordering; + /// use std::time::Duration; + /// let mut timer = Timer::from_seconds(2.0, TimerMode::Once); + /// timer.tick(Duration::from_secs_f32(0.5)); + /// let result = timer.remaining_secs().total_cmp(&1.5); + /// assert_eq!(Ordering::Equal, result); + /// ``` + fn remaining_secs(_self: Ref<::bevy_time::prelude::Timer>) -> f32 { + let output: f32 = ::bevy_time::prelude::Timer::remaining_secs(&_self).into(); + output + } + /// Resets the timer. The reset doesn't affect the `paused` state of the timer. + /// See also [`Stopwatch::reset`](Stopwatch::reset). + /// Examples + /// ``` + /// # use bevy_time::*; + /// use std::time::Duration; + /// let mut timer = Timer::from_seconds(1.0, TimerMode::Once); + /// timer.tick(Duration::from_secs_f32(1.5)); + /// timer.reset(); + /// assert!(!timer.finished()); + /// assert!(!timer.just_finished()); + /// assert_eq!(timer.elapsed_secs(), 0.0); + /// ``` + fn reset(mut _self: Mut<::bevy_time::prelude::Timer>) -> () { + let output: () = ::bevy_time::prelude::Timer::reset(&mut _self).into(); + output + } + /// Sets the duration of the timer. + /// # Examples + /// ``` + /// # use bevy_time::*; + /// use std::time::Duration; + /// let mut timer = Timer::from_seconds(1.5, TimerMode::Once); + /// timer.set_duration(Duration::from_secs(1)); + /// assert_eq!(timer.duration(), Duration::from_secs(1)); + /// ``` + fn set_duration( + mut _self: Mut<::bevy_time::prelude::Timer>, + duration: Val<::core::time::Duration>, + ) -> () { + let output: () = ::bevy_time::prelude::Timer::set_duration( + &mut _self, + duration.into_inner(), + ) + .into(); + output + } + /// Sets the elapsed time of the timer without any other considerations. + /// See also [`Stopwatch::set`](Stopwatch::set). + /// # + /// ``` + /// # use bevy_time::*; + /// use std::time::Duration; + /// let mut timer = Timer::from_seconds(1.0, TimerMode::Once); + /// timer.set_elapsed(Duration::from_secs(2)); + /// assert_eq!(timer.elapsed(), Duration::from_secs(2)); + /// // the timer is not finished even if the elapsed time is greater than the duration. + /// assert!(!timer.finished()); + /// ``` + fn set_elapsed( + mut _self: Mut<::bevy_time::prelude::Timer>, + time: Val<::core::time::Duration>, + ) -> () { + let output: () = ::bevy_time::prelude::Timer::set_elapsed( + &mut _self, + time.into_inner(), + ) + .into(); + output + } + /// Sets the mode of the timer. + /// # Examples + /// ``` + /// # use bevy_time::*; + /// let mut timer = Timer::from_seconds(1.0, TimerMode::Repeating); + /// timer.set_mode(TimerMode::Once); + /// assert_eq!(timer.mode(), TimerMode::Once); + /// ``` + fn set_mode( + mut _self: Mut<::bevy_time::prelude::Timer>, + mode: Val<::bevy_time::prelude::TimerMode>, + ) -> () { + let output: () = ::bevy_time::prelude::Timer::set_mode( + &mut _self, + mode.into_inner(), + ) + .into(); + output + } + /// Returns the number of times a repeating timer + /// finished during the last [`tick`](Timer::tick) call. + /// For non repeating-timers, this method will only ever + /// return 0 or 1. + /// # Examples + /// ``` + /// # use bevy_time::*; + /// use std::time::Duration; + /// let mut timer = Timer::from_seconds(1.0, TimerMode::Repeating); + /// timer.tick(Duration::from_secs_f32(6.0)); + /// assert_eq!(timer.times_finished_this_tick(), 6); + /// timer.tick(Duration::from_secs_f32(2.0)); + /// assert_eq!(timer.times_finished_this_tick(), 2); + /// timer.tick(Duration::from_secs_f32(0.5)); + /// assert_eq!(timer.times_finished_this_tick(), 0); + /// ``` + fn times_finished_this_tick(_self: Ref<::bevy_time::prelude::Timer>) -> u32 { + let output: u32 = ::bevy_time::prelude::Timer::times_finished_this_tick(&_self) + .into(); + output + } + /// Unpauses the Timer. Resumes the ticking of the timer. + /// See also [`Stopwatch::unpause()`](Stopwatch::unpause). + /// # Examples + /// ``` + /// # use bevy_time::*; + /// use std::time::Duration; + /// let mut timer = Timer::from_seconds(1.0, TimerMode::Once); + /// timer.pause(); + /// timer.tick(Duration::from_secs_f32(0.5)); + /// timer.unpause(); + /// timer.tick(Duration::from_secs_f32(0.5)); + /// assert_eq!(timer.elapsed_secs(), 0.5); + /// ``` + fn unpause(mut _self: Mut<::bevy_time::prelude::Timer>) -> () { + let output: () = ::bevy_time::prelude::Timer::unpause(&mut _self).into(); + output + } +} +#[script_bindings( + remote, + name = "timer_mode_functions", + bms_core_path = "bevy_mod_scripting_core", + generated +)] +impl ::bevy_time::prelude::TimerMode { + fn assert_receiver_is_total_eq(_self: Ref<::bevy_time::prelude::TimerMode>) -> () { + let output: () = <::bevy_time::prelude::TimerMode as ::core::cmp::Eq>::assert_receiver_is_total_eq( + &_self, + ) + .into(); + output + } + fn clone( + _self: Ref<::bevy_time::prelude::TimerMode>, + ) -> Val<::bevy_time::prelude::TimerMode> { + let output: Val<::bevy_time::prelude::TimerMode> = <::bevy_time::prelude::TimerMode as ::core::clone::Clone>::clone( + &_self, + ) + .into(); + output + } + fn eq( + _self: Ref<::bevy_time::prelude::TimerMode>, + other: Ref<::bevy_time::prelude::TimerMode>, + ) -> bool { + let output: bool = <::bevy_time::prelude::TimerMode as ::core::cmp::PartialEq< + ::bevy_time::prelude::TimerMode, + >>::eq(&_self, &other) + .into(); + output + } +} +#[script_bindings( + remote, + name = "virtual_functions", + bms_core_path = "bevy_mod_scripting_core", + generated +)] +impl ::bevy_time::prelude::Virtual { + fn clone( + _self: Ref<::bevy_time::prelude::Virtual>, + ) -> Val<::bevy_time::prelude::Virtual> { + let output: Val<::bevy_time::prelude::Virtual> = <::bevy_time::prelude::Virtual as ::core::clone::Clone>::clone( + &_self, + ) + .into(); + output + } +} +#[script_bindings( + remote, + name = "stopwatch_functions", + bms_core_path = "bevy_mod_scripting_core", + generated +)] +impl ::bevy_time::Stopwatch { + fn assert_receiver_is_total_eq(_self: Ref<::bevy_time::Stopwatch>) -> () { + let output: () = <::bevy_time::Stopwatch as ::core::cmp::Eq>::assert_receiver_is_total_eq( + &_self, + ) + .into(); + output + } + fn clone(_self: Ref<::bevy_time::Stopwatch>) -> Val<::bevy_time::Stopwatch> { + let output: Val<::bevy_time::Stopwatch> = <::bevy_time::Stopwatch as ::core::clone::Clone>::clone( + &_self, ) - .register_documented( - "unpause", - |mut _self: Mut| { - let output: () = { - { - let output: () = bevy::time::Stopwatch::unpause(&mut _self) - .into(); - output - } - }; - output - }, - " Unpauses the stopwatch. Resume the effect of ticking on elapsed time.\n # Examples\n ```\n # use bevy_time::*;\n use std::time::Duration;\n let mut stopwatch = Stopwatch::new();\n stopwatch.pause();\n stopwatch.tick(Duration::from_secs_f32(1.0));\n stopwatch.unpause();\n stopwatch.tick(Duration::from_secs_f32(1.0));\n assert!(!stopwatch.is_paused());\n assert_eq!(stopwatch.elapsed_secs(), 1.0);\n ```", - &["_self"], - ); - let registry = world - .get_resource_or_init::(); - let mut registry = registry.write(); - registry - .register_type_data::< - bevy::time::Stopwatch, - bevy_mod_scripting_core::bindings::MarkAsGenerated, - >(); - } - impl ::bevy::app::Plugin for BevyTimeScriptingPlugin { - fn build(&self, app: &mut ::bevy::prelude::App) { - let mut world = app.world_mut(); - register_fixed_functions(&mut world); - register_real_functions(&mut world); - register_timer_functions(&mut world); - register_timer_mode_functions(&mut world); - register_virtual_functions(&mut world); - register_stopwatch_functions(&mut world); - } - } \ No newline at end of file + .into(); + output + } + /// Returns the elapsed time since the last [`reset`](Stopwatch::reset) + /// of the stopwatch. + /// # Examples + /// ``` + /// # use bevy_time::*; + /// use std::time::Duration; + /// let mut stopwatch = Stopwatch::new(); + /// stopwatch.tick(Duration::from_secs(1)); + /// assert_eq!(stopwatch.elapsed(), Duration::from_secs(1)); + /// ``` + /// # 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<::bevy_time::Stopwatch>) -> Val<::core::time::Duration> { + let output: Val<::core::time::Duration> = ::bevy_time::Stopwatch::elapsed(&_self) + .into(); + output + } + /// Returns the elapsed time since the last [`reset`](Stopwatch::reset) + /// of the stopwatch, in seconds. + /// # Examples + /// ``` + /// # use bevy_time::*; + /// use std::time::Duration; + /// let mut stopwatch = Stopwatch::new(); + /// stopwatch.tick(Duration::from_secs(1)); + /// assert_eq!(stopwatch.elapsed_secs(), 1.0); + /// ``` + /// # See Also + /// [`elapsed`](Stopwatch::elapsed) - if a `Duration` is desirable instead. + /// [`elapsed_secs_f64`](Stopwatch::elapsed_secs_f64) - if an `f64` is desirable instead. + fn elapsed_secs(_self: Ref<::bevy_time::Stopwatch>) -> f32 { + let output: f32 = ::bevy_time::Stopwatch::elapsed_secs(&_self).into(); + output + } + /// Returns the elapsed time since the last [`reset`](Stopwatch::reset) + /// of the stopwatch, in seconds, as f64. + /// # See Also + /// [`elapsed`](Stopwatch::elapsed) - if a `Duration` is desirable instead. + /// [`elapsed_secs`](Stopwatch::elapsed_secs) - if an `f32` is desirable instead. + fn elapsed_secs_f64(_self: Ref<::bevy_time::Stopwatch>) -> f64 { + let output: f64 = ::bevy_time::Stopwatch::elapsed_secs_f64(&_self).into(); + output + } + fn eq( + _self: Ref<::bevy_time::Stopwatch>, + other: Ref<::bevy_time::Stopwatch>, + ) -> bool { + let output: bool = <::bevy_time::Stopwatch as ::core::cmp::PartialEq< + ::bevy_time::Stopwatch, + >>::eq(&_self, &other) + .into(); + output + } + /// Returns `true` if the stopwatch is paused. + /// # Examples + /// ``` + /// # use bevy_time::*; + /// let mut stopwatch = Stopwatch::new(); + /// assert!(!stopwatch.is_paused()); + /// stopwatch.pause(); + /// assert!(stopwatch.is_paused()); + /// stopwatch.unpause(); + /// assert!(!stopwatch.is_paused()); + /// ``` + fn is_paused(_self: Ref<::bevy_time::Stopwatch>) -> bool { + let output: bool = ::bevy_time::Stopwatch::is_paused(&_self).into(); + output + } + /// Create a new unpaused `Stopwatch` with no elapsed time. + /// # Examples + /// ``` + /// # use bevy_time::*; + /// let stopwatch = Stopwatch::new(); + /// assert_eq!(stopwatch.elapsed_secs(), 0.0); + /// assert_eq!(stopwatch.is_paused(), false); + /// ``` + fn new() -> Val<::bevy_time::Stopwatch> { + let output: Val<::bevy_time::Stopwatch> = ::bevy_time::Stopwatch::new().into(); + output + } + /// Pauses the stopwatch. Any call to [`tick`](Stopwatch::tick) while + /// paused will not have any effect on the elapsed time. + /// # Examples + /// ``` + /// # use bevy_time::*; + /// use std::time::Duration; + /// let mut stopwatch = Stopwatch::new(); + /// stopwatch.pause(); + /// stopwatch.tick(Duration::from_secs_f32(1.5)); + /// assert!(stopwatch.is_paused()); + /// assert_eq!(stopwatch.elapsed_secs(), 0.0); + /// ``` + fn pause(mut _self: Mut<::bevy_time::Stopwatch>) -> () { + let output: () = ::bevy_time::Stopwatch::pause(&mut _self).into(); + output + } + /// Resets the stopwatch. The reset doesn't affect the paused state of the stopwatch. + /// # Examples + /// ``` + /// # use bevy_time::*; + /// use std::time::Duration; + /// let mut stopwatch = Stopwatch::new(); + /// stopwatch.tick(Duration::from_secs_f32(1.5)); + /// stopwatch.reset(); + /// assert_eq!(stopwatch.elapsed_secs(), 0.0); + /// ``` + fn reset(mut _self: Mut<::bevy_time::Stopwatch>) -> () { + let output: () = ::bevy_time::Stopwatch::reset(&mut _self).into(); + output + } + /// Sets the elapsed time of the stopwatch. + /// # Examples + /// ``` + /// # use bevy_time::*; + /// use std::time::Duration; + /// let mut stopwatch = Stopwatch::new(); + /// stopwatch.set_elapsed(Duration::from_secs_f32(1.0)); + /// assert_eq!(stopwatch.elapsed_secs(), 1.0); + /// ``` + fn set_elapsed( + mut _self: Mut<::bevy_time::Stopwatch>, + time: Val<::core::time::Duration>, + ) -> () { + let output: () = ::bevy_time::Stopwatch::set_elapsed( + &mut _self, + time.into_inner(), + ) + .into(); + output + } + /// Unpauses the stopwatch. Resume the effect of ticking on elapsed time. + /// # Examples + /// ``` + /// # use bevy_time::*; + /// use std::time::Duration; + /// let mut stopwatch = Stopwatch::new(); + /// stopwatch.pause(); + /// stopwatch.tick(Duration::from_secs_f32(1.0)); + /// stopwatch.unpause(); + /// stopwatch.tick(Duration::from_secs_f32(1.0)); + /// assert!(!stopwatch.is_paused()); + /// assert_eq!(stopwatch.elapsed_secs(), 1.0); + /// ``` + fn unpause(mut _self: Mut<::bevy_time::Stopwatch>) -> () { + let output: () = ::bevy_time::Stopwatch::unpause(&mut _self).into(); + output + } +} +impl Plugin for BevyTimeScriptingPlugin { + fn build(&self, app: &mut App) { + let mut world = app.world_mut(); + register_fixed_functions(&mut world); + register_real_functions(&mut world); + register_timer_functions(&mut world); + register_timer_mode_functions(&mut world); + register_virtual_functions(&mut world); + register_stopwatch_functions(&mut world); + } +} 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 2eabbdd13e..97d5a0f5ed 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 @@ -1,1397 +1,910 @@ - #![allow(clippy::all)] - #![allow(unused, deprecated, dead_code)] - 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 BevyTransformScriptingPlugin; - pub(crate) fn register_global_transform_functions( - world: &mut bevy::ecs::world::World, - ) { - bevy_mod_scripting_core::bindings::function::namespace::NamespaceBuilder::< - bevy::transform::components::GlobalTransform, - >::new(world) - .register_documented( - "affine", - |_self: Ref| { - let output: Val = { - { - let output: Val = bevy::transform::components::GlobalTransform::affine( - &_self, - ) - .into(); - output - } - }; - output - }, - " Returns the 3d affine transformation matrix as an [`Affine3A`].", - &["_self"], - ) - .register_documented( - "back", - |_self: Ref| { - let output: Val = { - { - let output: Val = bevy::transform::components::GlobalTransform::back( - &_self, - ) - .into(); - output - } - }; - output - }, - "Return the local back vector (Z).", - &["_self"], - ) - .register_documented( - "clone", - |_self: Ref| { - let output: Val = { - { - let output: Val< - bevy::transform::components::GlobalTransform, - > = ::clone( - &_self, - ) - .into(); - output - } - }; - output - }, - "", - &["_self"], - ) - .register_documented( - "compute_matrix", - |_self: Ref| { - let output: Val = { - { - let output: Val = bevy::transform::components::GlobalTransform::compute_matrix( - &_self, - ) - .into(); - output - } - }; - output - }, - " Returns the 3d affine transformation matrix as a [`Mat4`].", - &["_self"], - ) - .register_documented( - "compute_transform", - |_self: Ref| { - let output: Val = { - { - let output: Val = bevy::transform::components::GlobalTransform::compute_transform( - &_self, - ) - .into(); - output - } - }; - output - }, - " Returns the transformation as a [`Transform`].\n The transform is expected to be non-degenerate and without shearing, or the output\n will be invalid.", - &["_self"], - ) - .register_documented( - "down", - |_self: Ref| { - let output: Val = { - { - let output: Val = bevy::transform::components::GlobalTransform::down( - &_self, - ) - .into(); - output - } - }; - output - }, - "Return the local down vector (-Y).", - &["_self"], - ) - .register_documented( - "eq", - | - _self: Ref, - other: Ref| - { - let output: bool = { - { - let output: bool = >::eq(&_self, &other) - .into(); - output - } - }; - output - }, - "", - &["_self", "other"], - ) - .register_documented( - "forward", - |_self: Ref| { - let output: Val = { - { - let output: Val = bevy::transform::components::GlobalTransform::forward( - &_self, - ) - .into(); - output - } - }; - output - }, - "Return the local forward vector (-Z).", - &["_self"], - ) - .register_documented( - "from_isometry", - |iso: Val| { - let output: Val = { - { - let output: Val< - bevy::transform::components::GlobalTransform, - > = bevy::transform::components::GlobalTransform::from_isometry( - iso.into_inner(), - ) - .into(); - output - } - }; - output - }, - "", - &["iso"], - ) - .register_documented( - "from_rotation", - |rotation: Val| { - let output: Val = { - { - let output: Val< - bevy::transform::components::GlobalTransform, - > = bevy::transform::components::GlobalTransform::from_rotation( - rotation.into_inner(), - ) - .into(); - output - } - }; - output - }, - "", - &["rotation"], - ) - .register_documented( - "from_scale", - |scale: Val| { - let output: Val = { - { - let output: Val< - bevy::transform::components::GlobalTransform, - > = bevy::transform::components::GlobalTransform::from_scale( - scale.into_inner(), - ) - .into(); - output - } - }; - output - }, - "", - &["scale"], - ) - .register_documented( - "from_translation", - |translation: Val| { - let output: Val = { - { - let output: Val< - bevy::transform::components::GlobalTransform, - > = bevy::transform::components::GlobalTransform::from_translation( - translation.into_inner(), - ) - .into(); - output - } - }; - output - }, - "", - &["translation"], - ) - .register_documented( - "from_xyz", - |x: f32, y: f32, z: f32| { - let output: Val = { - { - let output: Val< - bevy::transform::components::GlobalTransform, - > = bevy::transform::components::GlobalTransform::from_xyz( - x, - y, - z, - ) - .into(); - output - } - }; - output - }, - "", - &["x", "y", "z"], - ) - .register_documented( - "left", - |_self: Ref| { - let output: Val = { - { - let output: Val = bevy::transform::components::GlobalTransform::left( - &_self, - ) - .into(); - output - } - }; - output - }, - "Return the local left vector (-X).", - &["_self"], - ) - .register_documented( - "mul", - | - _self: Val, - value: Val| - { - let output: Val = { - { - let output: Val = >::mul(_self.into_inner(), value.into_inner()) - .into(); - output - } - }; - output - }, - "", - &["_self", "value"], - ) - .register_documented( - "mul", - | - _self: Val, - global_transform: Val| - { - let output: Val = { - { - let output: Val< - bevy::transform::components::GlobalTransform, - > = >::mul(_self.into_inner(), global_transform.into_inner()) - .into(); - output - } - }; - output - }, - "", - &["_self", "global_transform"], - ) - .register_documented( - "mul", - | - _self: Val, - transform: Val| - { - let output: Val = { - { - let output: Val< - bevy::transform::components::GlobalTransform, - > = >::mul(_self.into_inner(), transform.into_inner()) - .into(); - output - } - }; - output - }, - "", - &["_self", "transform"], - ) - .register_documented( - "mul_transform", - | - _self: Ref, - transform: Val| - { - let output: Val = { - { - let output: Val< - bevy::transform::components::GlobalTransform, - > = bevy::transform::components::GlobalTransform::mul_transform( - &_self, - transform.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Multiplies `self` with `transform` component by component, returning the\n resulting [`GlobalTransform`]", - &["_self", "transform"], - ) - .register_documented( - "radius_vec3a", - | - _self: Ref, - extents: Val| - { - let output: f32 = { - { - let output: f32 = bevy::transform::components::GlobalTransform::radius_vec3a( - &_self, - extents.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Get an upper bound of the radius from the given `extents`.", - &["_self", "extents"], - ) - .register_documented( - "reparented_to", - | - _self: Ref, - parent: Ref| - { - let output: Val = { - { - let output: Val = bevy::transform::components::GlobalTransform::reparented_to( - &_self, - &parent, - ) - .into(); - output - } - }; - output - }, - " Returns the [`Transform`] `self` would have if it was a child of an entity\n with the `parent` [`GlobalTransform`].\n This is useful if you want to \"reparent\" an [`Entity`](bevy_ecs::entity::Entity).\n Say you have an entity `e1` that you want to turn into a child of `e2`,\n but you want `e1` to keep the same global transform, even after re-parenting. You would use:\n ```\n # use bevy_transform::prelude::{GlobalTransform, Transform};\n # use bevy_ecs::prelude::{Entity, Query, Component, Commands};\n #[derive(Component)]\n struct ToReparent {\n new_parent: Entity,\n }\n fn reparent_system(\n mut commands: Commands,\n mut targets: Query<(&mut Transform, Entity, &GlobalTransform, &ToReparent)>,\n transforms: Query<&GlobalTransform>,\n ) {\n for (mut transform, entity, initial, to_reparent) in targets.iter_mut() {\n if let Ok(parent_transform) = transforms.get(to_reparent.new_parent) {\n *transform = initial.reparented_to(parent_transform);\n commands.entity(entity)\n .remove::()\n .set_parent(to_reparent.new_parent);\n }\n }\n }\n ```\n The transform is expected to be non-degenerate and without shearing, or the output\n will be invalid.", - &["_self", "parent"], - ) - .register_documented( - "right", - |_self: Ref| { - let output: Val = { - { - let output: Val = bevy::transform::components::GlobalTransform::right( - &_self, - ) - .into(); - output - } - }; - output - }, - "Return the local right vector (X).", - &["_self"], - ) - .register_documented( - "rotation", - |_self: Ref| { - let output: Val = { - { - let output: Val = bevy::transform::components::GlobalTransform::rotation( - &_self, - ) - .into(); - output - } - }; - output - }, - " Get the rotation as a [`Quat`].\n The transform is expected to be non-degenerate and without shearing, or the output will be invalid.\n # Warning\n This is calculated using `to_scale_rotation_translation`, meaning that you\n should probably use it directly if you also need translation or scale.", - &["_self"], - ) - .register_documented( - "scale", - |_self: Ref| { - let output: Val = { - { - let output: Val = bevy::transform::components::GlobalTransform::scale( - &_self, - ) - .into(); - output - } - }; - output - }, - " Get the scale as a [`Vec3`].\n The transform is expected to be non-degenerate and without shearing, or the output will be invalid.\n Some of the computations overlap with `to_scale_rotation_translation`, which means you should use\n it instead if you also need rotation.", - &["_self"], - ) - .register_documented( - "to_isometry", - |_self: Ref| { - let output: Val = { - { - let output: Val = bevy::transform::components::GlobalTransform::to_isometry( - &_self, - ) - .into(); - output - } - }; - output - }, - " Returns the isometric part of the transformation as an [isometry]. Any scaling done by the\n transformation will be ignored.\n The transform is expected to be non-degenerate and without shearing, or the output\n will be invalid.\n [isometry]: Isometry3d", - &["_self"], - ) - .register_documented( - "transform_point", - | - _self: Ref, - point: Val| - { - let output: Val = { - { - let output: Val = bevy::transform::components::GlobalTransform::transform_point( - &_self, - point.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Transforms the given point from local space to global space, applying shear, scale, rotation and translation.\n It can be used like this:\n ```\n # use bevy_transform::prelude::{GlobalTransform};\n # use bevy_math::prelude::Vec3;\n let global_transform = GlobalTransform::from_xyz(1., 2., 3.);\n let local_point = Vec3::new(1., 2., 3.);\n let global_point = global_transform.transform_point(local_point);\n assert_eq!(global_point, Vec3::new(2., 4., 6.));\n ```\n ```\n # use bevy_transform::prelude::{GlobalTransform};\n # use bevy_math::Vec3;\n let global_point = Vec3::new(2., 4., 6.);\n let global_transform = GlobalTransform::from_xyz(1., 2., 3.);\n let local_point = global_transform.affine().inverse().transform_point3(global_point);\n assert_eq!(local_point, Vec3::new(1., 2., 3.))\n ```\n To apply shear, scale, and rotation *without* applying translation, different functions are available:\n ```\n # use bevy_transform::prelude::{GlobalTransform};\n # use bevy_math::prelude::Vec3;\n let global_transform = GlobalTransform::from_xyz(1., 2., 3.);\n let local_direction = Vec3::new(1., 2., 3.);\n let global_direction = global_transform.affine().transform_vector3(local_direction);\n assert_eq!(global_direction, Vec3::new(1., 2., 3.));\n let roundtripped_local_direction = global_transform.affine().inverse().transform_vector3(global_direction);\n assert_eq!(roundtripped_local_direction, local_direction);\n ```", - &["_self", "point"], - ) - .register_documented( - "translation", - |_self: Ref| { - let output: Val = { - { - let output: Val = bevy::transform::components::GlobalTransform::translation( - &_self, - ) - .into(); - output - } - }; - output - }, - " Get the translation as a [`Vec3`].", - &["_self"], - ) - .register_documented( - "translation_vec3a", - |_self: Ref| { - let output: Val = { - { - let output: Val = bevy::transform::components::GlobalTransform::translation_vec3a( - &_self, - ) - .into(); - output - } - }; - output - }, - " Get the translation as a [`Vec3A`].", - &["_self"], - ) - .register_documented( - "up", - |_self: Ref| { - let output: Val = { - { - let output: Val = bevy::transform::components::GlobalTransform::up( - &_self, - ) - .into(); - output - } - }; - output - }, - "Return the local up vector (Y).", - &["_self"], - ); - let registry = world - .get_resource_or_init::(); - let mut registry = registry.write(); - registry - .register_type_data::< - bevy::transform::components::GlobalTransform, - bevy_mod_scripting_core::bindings::MarkAsGenerated, - >(); - } - pub(crate) fn register_transform_functions(world: &mut bevy::ecs::world::World) { - bevy_mod_scripting_core::bindings::function::namespace::NamespaceBuilder::< - bevy::transform::components::Transform, - >::new(world) - .register_documented( - "back", - |_self: Ref| { - let output: Val = { - { - let output: Val = bevy::transform::components::Transform::back( - &_self, - ) - .into(); - output - } - }; - output - }, - " Equivalent to [`local_z()`][Transform::local_z]", - &["_self"], - ) - .register_documented( - "clone", - |_self: Ref| { - let output: Val = { - { - let output: Val = ::clone( - &_self, - ) - .into(); - output - } - }; - output - }, - "", - &["_self"], - ) - .register_documented( - "compute_affine", - |_self: Ref| { - let output: Val = { - { - let output: Val = bevy::transform::components::Transform::compute_affine( - &_self, - ) - .into(); - output - } - }; - output - }, - " Returns the 3d affine transformation matrix from this transforms translation,\n rotation, and scale.", - &["_self"], - ) - .register_documented( - "compute_matrix", - |_self: Ref| { - let output: Val = { - { - let output: Val = bevy::transform::components::Transform::compute_matrix( - &_self, - ) - .into(); - output - } - }; - output - }, - " Returns the 3d affine transformation matrix from this transforms translation,\n rotation, and scale.", - &["_self"], - ) - .register_documented( - "down", - |_self: Ref| { - let output: Val = { - { - let output: Val = bevy::transform::components::Transform::down( - &_self, - ) - .into(); - output - } - }; - output - }, - " Equivalent to [`-local_y()`][Transform::local_y]", - &["_self"], - ) - .register_documented( - "eq", - | - _self: Ref, - other: Ref| - { - let output: bool = { - { - let output: bool = >::eq(&_self, &other) - .into(); - output - } - }; - output - }, - "", - &["_self", "other"], - ) - .register_documented( - "forward", - |_self: Ref| { - let output: Val = { - { - let output: Val = bevy::transform::components::Transform::forward( - &_self, - ) - .into(); - output - } - }; - output - }, - " Equivalent to [`-local_z()`][Transform::local_z]", - &["_self"], - ) - .register_documented( - "from_isometry", - |iso: Val| { - let output: Val = { - { - let output: Val = bevy::transform::components::Transform::from_isometry( - iso.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Creates a new [`Transform`] that is equivalent to the given [isometry].\n [isometry]: Isometry3d", - &["iso"], - ) - .register_documented( - "from_matrix", - |world_from_local: Val| { - let output: Val = { - { - let output: Val = bevy::transform::components::Transform::from_matrix( - world_from_local.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Extracts the translation, rotation, and scale from `matrix`. It must be a 3d affine\n transformation matrix.", - &["world_from_local"], - ) - .register_documented( - "from_rotation", - |rotation: Val| { - let output: Val = { - { - let output: Val = bevy::transform::components::Transform::from_rotation( - rotation.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Creates a new [`Transform`], with `rotation`. Translation will be 0 and scale 1 on\n all axes.", - &["rotation"], - ) - .register_documented( - "from_scale", - |scale: Val| { - let output: Val = { - { - let output: Val = bevy::transform::components::Transform::from_scale( - scale.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Creates a new [`Transform`], with `scale`. Translation will be 0 and rotation 0 on\n all axes.", - &["scale"], - ) - .register_documented( - "from_translation", - |translation: Val| { - let output: Val = { - { - let output: Val = bevy::transform::components::Transform::from_translation( - translation.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Creates a new [`Transform`], with `translation`. Rotation will be 0 and scale 1 on\n all axes.", - &["translation"], - ) - .register_documented( - "from_xyz", - |x: f32, y: f32, z: f32| { - let output: Val = { - { - let output: Val = bevy::transform::components::Transform::from_xyz( - x, - y, - z, - ) - .into(); - output - } - }; - output - }, - " Creates a new [`Transform`] at the position `(x, y, z)`. In 2d, the `z` component\n is used for z-ordering elements: higher `z`-value will be in front of lower\n `z`-value.", - &["x", "y", "z"], - ) - .register_documented( - "is_finite", - |_self: Ref| { - let output: bool = { - { - let output: bool = bevy::transform::components::Transform::is_finite( - &_self, - ) - .into(); - output - } - }; - output - }, - " Returns `true` if, and only if, translation, rotation and scale all are\n finite. If any of them contains a `NaN`, positive or negative infinity,\n this will return `false`.", - &["_self"], - ) - .register_documented( - "left", - |_self: Ref| { - let output: Val = { - { - let output: Val = bevy::transform::components::Transform::left( - &_self, - ) - .into(); - output - } - }; - output - }, - " Equivalent to [`-local_x()`][Transform::local_x()]", - &["_self"], - ) - .register_documented( - "local_x", - |_self: Ref| { - let output: Val = { - { - let output: Val = bevy::transform::components::Transform::local_x( - &_self, - ) - .into(); - output - } - }; - output - }, - " Get the unit vector in the local `X` direction.", - &["_self"], - ) - .register_documented( - "local_y", - |_self: Ref| { - let output: Val = { - { - let output: Val = bevy::transform::components::Transform::local_y( - &_self, - ) - .into(); - output - } - }; - output - }, - " Get the unit vector in the local `Y` direction.", - &["_self"], - ) - .register_documented( - "local_z", - |_self: Ref| { - let output: Val = { - { - let output: Val = bevy::transform::components::Transform::local_z( - &_self, - ) - .into(); - output - } - }; - output - }, - " Get the unit vector in the local `Z` direction.", - &["_self"], - ) - .register_documented( - "mul", - | - _self: Val, - value: Val| - { - let output: Val = { - { - let output: Val = >::mul(_self.into_inner(), value.into_inner()) - .into(); - output - } - }; - output - }, - "", - &["_self", "value"], - ) - .register_documented( - "mul", - | - _self: Val, - global_transform: Val| - { - let output: Val = { - { - let output: Val< - bevy::transform::components::GlobalTransform, - > = >::mul(_self.into_inner(), global_transform.into_inner()) - .into(); - output - } - }; - output - }, - "", - &["_self", "global_transform"], - ) - .register_documented( - "mul", - | - _self: Val, - transform: Val| - { - let output: Val = { - { - let output: Val = >::mul(_self.into_inner(), transform.into_inner()) - .into(); - output - } - }; - output - }, - "", - &["_self", "transform"], - ) - .register_documented( - "mul_transform", - | - _self: Ref, - transform: Val| - { - let output: Val = { - { - let output: Val = bevy::transform::components::Transform::mul_transform( - &_self, - transform.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Multiplies `self` with `transform` component by component, returning the\n resulting [`Transform`]", - &["_self", "transform"], - ) - .register_documented( - "right", - |_self: Ref| { - let output: Val = { - { - let output: Val = bevy::transform::components::Transform::right( - &_self, - ) - .into(); - output - } - }; - output - }, - " Equivalent to [`local_x()`][Transform::local_x()]", - &["_self"], - ) - .register_documented( - "rotate", - | - mut _self: Mut, - rotation: Val| - { - let output: () = { - { - let output: () = bevy::transform::components::Transform::rotate( - &mut _self, - rotation.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Rotates this [`Transform`] by the given rotation.\n If this [`Transform`] has a parent, the `rotation` is relative to the rotation of the parent.\n # Examples\n - [`3d_rotation`]\n [`3d_rotation`]: https://github.com/bevyengine/bevy/blob/latest/examples/transforms/3d_rotation.rs", - &["_self", "rotation"], - ) - .register_documented( - "rotate_around", - | - mut _self: Mut, - point: Val, - rotation: Val| - { - let output: () = { - { - let output: () = bevy::transform::components::Transform::rotate_around( - &mut _self, - point.into_inner(), - rotation.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Rotates this [`Transform`] around a `point` in space.\n If this [`Transform`] has a parent, the `point` is relative to the [`Transform`] of the parent.", - &["_self", "point", "rotation"], - ) - .register_documented( - "rotate_axis", - | - mut _self: Mut, - axis: Val, - angle: f32| - { - let output: () = { - { - let output: () = bevy::transform::components::Transform::rotate_axis( - &mut _self, - axis.into_inner(), - angle, - ) - .into(); - output - } - }; - output - }, - " Rotates this [`Transform`] around the given `axis` by `angle` (in radians).\n If this [`Transform`] has a parent, the `axis` is relative to the rotation of the parent.\n # Warning\n If you pass in an `axis` based on the current rotation (e.g. obtained via [`Transform::local_x`]),\n floating point errors can accumulate exponentially when applying rotations repeatedly this way. This will\n result in a denormalized rotation. In this case, it is recommended to normalize the [`Transform::rotation`] after\n each call to this method.", - &["_self", "axis", "angle"], - ) - .register_documented( - "rotate_local", - | - mut _self: Mut, - rotation: Val| - { - let output: () = { - { - let output: () = bevy::transform::components::Transform::rotate_local( - &mut _self, - rotation.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Rotates this [`Transform`] by the given `rotation`.\n The `rotation` is relative to this [`Transform`]'s current rotation.", - &["_self", "rotation"], - ) - .register_documented( - "rotate_local_axis", - | - mut _self: Mut, - axis: Val, - angle: f32| - { - let output: () = { - { - let output: () = bevy::transform::components::Transform::rotate_local_axis( - &mut _self, - axis.into_inner(), - angle, - ) - .into(); - output - } - }; - output - }, - " Rotates this [`Transform`] around its local `axis` by `angle` (in radians).\n # Warning\n If you pass in an `axis` based on the current rotation (e.g. obtained via [`Transform::local_x`]),\n floating point errors can accumulate exponentially when applying rotations repeatedly this way. This will\n result in a denormalized rotation. In this case, it is recommended to normalize the [`Transform::rotation`] after\n each call to this method.", - &["_self", "axis", "angle"], - ) - .register_documented( - "rotate_local_x", - |mut _self: Mut, angle: f32| { - let output: () = { - { - let output: () = bevy::transform::components::Transform::rotate_local_x( - &mut _self, - angle, - ) - .into(); - output - } - }; - output - }, - " Rotates this [`Transform`] around its local `X` axis by `angle` (in radians).", - &["_self", "angle"], - ) - .register_documented( - "rotate_local_y", - |mut _self: Mut, angle: f32| { - let output: () = { - { - let output: () = bevy::transform::components::Transform::rotate_local_y( - &mut _self, - angle, - ) - .into(); - output - } - }; - output - }, - " Rotates this [`Transform`] around its local `Y` axis by `angle` (in radians).", - &["_self", "angle"], - ) - .register_documented( - "rotate_local_z", - |mut _self: Mut, angle: f32| { - let output: () = { - { - let output: () = bevy::transform::components::Transform::rotate_local_z( - &mut _self, - angle, - ) - .into(); - output - } - }; - output - }, - " Rotates this [`Transform`] around its local `Z` axis by `angle` (in radians).", - &["_self", "angle"], - ) - .register_documented( - "rotate_x", - |mut _self: Mut, angle: f32| { - let output: () = { - { - let output: () = bevy::transform::components::Transform::rotate_x( - &mut _self, - angle, - ) - .into(); - output - } - }; - output - }, - " Rotates this [`Transform`] around the `X` axis by `angle` (in radians).\n If this [`Transform`] has a parent, the axis is relative to the rotation of the parent.", - &["_self", "angle"], - ) - .register_documented( - "rotate_y", - |mut _self: Mut, angle: f32| { - let output: () = { - { - let output: () = bevy::transform::components::Transform::rotate_y( - &mut _self, - angle, - ) - .into(); - output - } - }; - output - }, - " Rotates this [`Transform`] around the `Y` axis by `angle` (in radians).\n If this [`Transform`] has a parent, the axis is relative to the rotation of the parent.", - &["_self", "angle"], - ) - .register_documented( - "rotate_z", - |mut _self: Mut, angle: f32| { - let output: () = { - { - let output: () = bevy::transform::components::Transform::rotate_z( - &mut _self, - angle, - ) - .into(); - output - } - }; - output - }, - " Rotates this [`Transform`] around the `Z` axis by `angle` (in radians).\n If this [`Transform`] has a parent, the axis is relative to the rotation of the parent.", - &["_self", "angle"], - ) - .register_documented( - "to_isometry", - |_self: Ref| { - let output: Val = { - { - let output: Val = bevy::transform::components::Transform::to_isometry( - &_self, - ) - .into(); - output - } - }; - output - }, - " Get the [isometry] defined by this transform's rotation and translation, ignoring scale.\n [isometry]: Isometry3d", - &["_self"], - ) - .register_documented( - "transform_point", - | - _self: Ref, - point: Val| - { - let output: Val = { - { - let output: Val = bevy::transform::components::Transform::transform_point( - &_self, - point.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Transforms the given `point`, applying scale, rotation and translation.\n If this [`Transform`] has an ancestor entity with a [`Transform`] component,\n [`Transform::transform_point`] will transform a point in local space into its\n parent transform's space.\n If this [`Transform`] does not have a parent, [`Transform::transform_point`] will\n transform a point in local space into worldspace coordinates.\n If you always want to transform a point in local space to worldspace, or if you need\n the inverse transformations, see [`GlobalTransform::transform_point()`].", - &["_self", "point"], - ) - .register_documented( - "translate_around", - | - mut _self: Mut, - point: Val, - rotation: Val| - { - let output: () = { - { - let output: () = bevy::transform::components::Transform::translate_around( - &mut _self, - point.into_inner(), - rotation.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Translates this [`Transform`] around a `point` in space.\n If this [`Transform`] has a parent, the `point` is relative to the [`Transform`] of the parent.", - &["_self", "point", "rotation"], - ) - .register_documented( - "up", - |_self: Ref| { - let output: Val = { - { - let output: Val = bevy::transform::components::Transform::up( - &_self, - ) - .into(); - output - } - }; - output - }, - " Equivalent to [`local_y()`][Transform::local_y]", - &["_self"], - ) - .register_documented( - "with_rotation", - | - _self: Val, - rotation: Val| - { - let output: Val = { - { - let output: Val = bevy::transform::components::Transform::with_rotation( - _self.into_inner(), - rotation.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns this [`Transform`] with a new rotation.", - &["_self", "rotation"], - ) - .register_documented( - "with_scale", - | - _self: Val, - scale: Val| - { - let output: Val = { - { - let output: Val = bevy::transform::components::Transform::with_scale( - _self.into_inner(), - scale.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns this [`Transform`] with a new scale.", - &["_self", "scale"], - ) - .register_documented( - "with_translation", - | - _self: Val, - translation: Val| - { - let output: Val = { - { - let output: Val = bevy::transform::components::Transform::with_translation( - _self.into_inner(), - translation.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns this [`Transform`] with a new translation.", - &["_self", "translation"], - ); - let registry = world - .get_resource_or_init::(); - let mut registry = registry.write(); - registry - .register_type_data::< - bevy::transform::components::Transform, - bevy_mod_scripting_core::bindings::MarkAsGenerated, - >(); - } - pub(crate) fn register_transform_tree_changed_functions( - world: &mut bevy::ecs::world::World, - ) { - bevy_mod_scripting_core::bindings::function::namespace::NamespaceBuilder::< - bevy::transform::components::TransformTreeChanged, - >::new(world) - .register_documented( - "clone", - |_self: Ref| { - let output: Val = { - { - let output: Val< - bevy::transform::components::TransformTreeChanged, - > = ::clone( - &_self, - ) - .into(); - output - } - }; - output - }, - "", - &["_self"], - ) - .register_documented( - "eq", - | - _self: Ref, - other: Ref| - { - let output: bool = { - { - let output: bool = >::eq(&_self, &other) - .into(); - output - } - }; - output - }, - "", - &["_self", "other"], - ); - let registry = world - .get_resource_or_init::(); - let mut registry = registry.write(); - registry - .register_type_data::< - bevy::transform::components::TransformTreeChanged, - bevy_mod_scripting_core::bindings::MarkAsGenerated, - >(); - } - 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); - } - } \ No newline at end of file +// @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_ecs::prelude::*; +use bevy_mod_scripting_derive::script_bindings; +use crate::*; +pub struct BevyTransformScriptingPlugin; +#[script_bindings( + remote, + name = "global_transform_functions", + bms_core_path = "bevy_mod_scripting_core", + generated +)] +impl ::bevy_transform::components::GlobalTransform { + /// Returns the 3d affine transformation matrix as an [`Affine3A`]. + fn affine( + _self: Ref<::bevy_transform::components::GlobalTransform>, + ) -> Val<::bevy_math::Affine3A> { + let output: Val<::bevy_math::Affine3A> = ::bevy_transform::components::GlobalTransform::affine( + &_self, + ) + .into(); + output + } + /// Return the local back vector (Z). + fn back( + _self: Ref<::bevy_transform::components::GlobalTransform>, + ) -> Val<::bevy_math::Dir3> { + let output: Val<::bevy_math::Dir3> = ::bevy_transform::components::GlobalTransform::back( + &_self, + ) + .into(); + output + } + fn clone( + _self: Ref<::bevy_transform::components::GlobalTransform>, + ) -> Val<::bevy_transform::components::GlobalTransform> { + let output: Val<::bevy_transform::components::GlobalTransform> = <::bevy_transform::components::GlobalTransform as ::core::clone::Clone>::clone( + &_self, + ) + .into(); + output + } + /// Returns the 3d affine transformation matrix as a [`Mat4`]. + fn compute_matrix( + _self: Ref<::bevy_transform::components::GlobalTransform>, + ) -> Val<::bevy_math::Mat4> { + let output: Val<::bevy_math::Mat4> = ::bevy_transform::components::GlobalTransform::compute_matrix( + &_self, + ) + .into(); + output + } + /// Returns the transformation as a [`Transform`]. + /// The transform is expected to be non-degenerate and without shearing, or the output + /// will be invalid. + fn compute_transform( + _self: Ref<::bevy_transform::components::GlobalTransform>, + ) -> Val<::bevy_transform::components::Transform> { + let output: Val<::bevy_transform::components::Transform> = ::bevy_transform::components::GlobalTransform::compute_transform( + &_self, + ) + .into(); + output + } + /// Return the local down vector (-Y). + fn down( + _self: Ref<::bevy_transform::components::GlobalTransform>, + ) -> Val<::bevy_math::Dir3> { + let output: Val<::bevy_math::Dir3> = ::bevy_transform::components::GlobalTransform::down( + &_self, + ) + .into(); + output + } + fn eq( + _self: Ref<::bevy_transform::components::GlobalTransform>, + other: Ref<::bevy_transform::components::GlobalTransform>, + ) -> bool { + let output: bool = <::bevy_transform::components::GlobalTransform as ::core::cmp::PartialEq< + ::bevy_transform::components::GlobalTransform, + >>::eq(&_self, &other) + .into(); + output + } + /// Return the local forward vector (-Z). + fn forward( + _self: Ref<::bevy_transform::components::GlobalTransform>, + ) -> Val<::bevy_math::Dir3> { + let output: Val<::bevy_math::Dir3> = ::bevy_transform::components::GlobalTransform::forward( + &_self, + ) + .into(); + output + } + fn from_isometry( + iso: Val<::bevy_math::Isometry3d>, + ) -> Val<::bevy_transform::components::GlobalTransform> { + let output: Val<::bevy_transform::components::GlobalTransform> = ::bevy_transform::components::GlobalTransform::from_isometry( + iso.into_inner(), + ) + .into(); + output + } + fn from_rotation( + rotation: Val<::bevy_math::Quat>, + ) -> Val<::bevy_transform::components::GlobalTransform> { + let output: Val<::bevy_transform::components::GlobalTransform> = ::bevy_transform::components::GlobalTransform::from_rotation( + rotation.into_inner(), + ) + .into(); + output + } + fn from_scale( + scale: Val<::bevy_math::Vec3>, + ) -> Val<::bevy_transform::components::GlobalTransform> { + let output: Val<::bevy_transform::components::GlobalTransform> = ::bevy_transform::components::GlobalTransform::from_scale( + scale.into_inner(), + ) + .into(); + output + } + fn from_translation( + translation: Val<::bevy_math::Vec3>, + ) -> Val<::bevy_transform::components::GlobalTransform> { + let output: Val<::bevy_transform::components::GlobalTransform> = ::bevy_transform::components::GlobalTransform::from_translation( + translation.into_inner(), + ) + .into(); + output + } + fn from_xyz( + x: f32, + y: f32, + z: f32, + ) -> Val<::bevy_transform::components::GlobalTransform> { + let output: Val<::bevy_transform::components::GlobalTransform> = ::bevy_transform::components::GlobalTransform::from_xyz( + x, + y, + z, + ) + .into(); + output + } + /// Return the local left vector (-X). + fn left( + _self: Ref<::bevy_transform::components::GlobalTransform>, + ) -> Val<::bevy_math::Dir3> { + let output: Val<::bevy_math::Dir3> = ::bevy_transform::components::GlobalTransform::left( + &_self, + ) + .into(); + output + } + fn mul( + _self: Val<::bevy_transform::components::GlobalTransform>, + value: Val<::bevy_math::Vec3>, + ) -> Val<::bevy_math::Vec3> { + let output: Val<::bevy_math::Vec3> = <::bevy_transform::components::GlobalTransform as ::core::ops::Mul< + ::bevy_math::Vec3, + >>::mul(_self.into_inner(), value.into_inner()) + .into(); + output + } + fn mul( + _self: Val<::bevy_transform::components::GlobalTransform>, + global_transform: Val<::bevy_transform::components::GlobalTransform>, + ) -> Val<::bevy_transform::components::GlobalTransform> { + let output: Val<::bevy_transform::components::GlobalTransform> = <::bevy_transform::components::GlobalTransform as ::core::ops::Mul< + ::bevy_transform::components::GlobalTransform, + >>::mul(_self.into_inner(), global_transform.into_inner()) + .into(); + output + } + fn mul( + _self: Val<::bevy_transform::components::GlobalTransform>, + transform: Val<::bevy_transform::components::Transform>, + ) -> Val<::bevy_transform::components::GlobalTransform> { + let output: Val<::bevy_transform::components::GlobalTransform> = <::bevy_transform::components::GlobalTransform as ::core::ops::Mul< + ::bevy_transform::components::Transform, + >>::mul(_self.into_inner(), transform.into_inner()) + .into(); + output + } + /// Multiplies `self` with `transform` component by component, returning the + /// resulting [`GlobalTransform`] + fn mul_transform( + _self: Ref<::bevy_transform::components::GlobalTransform>, + transform: Val<::bevy_transform::components::Transform>, + ) -> Val<::bevy_transform::components::GlobalTransform> { + let output: Val<::bevy_transform::components::GlobalTransform> = ::bevy_transform::components::GlobalTransform::mul_transform( + &_self, + transform.into_inner(), + ) + .into(); + output + } + /// Get an upper bound of the radius from the given `extents`. + fn radius_vec3a( + _self: Ref<::bevy_transform::components::GlobalTransform>, + extents: Val<::bevy_math::Vec3A>, + ) -> f32 { + let output: f32 = ::bevy_transform::components::GlobalTransform::radius_vec3a( + &_self, + extents.into_inner(), + ) + .into(); + output + } + /// Returns the [`Transform`] `self` would have if it was a child of an entity + /// with the `parent` [`GlobalTransform`]. + /// This is useful if you want to "reparent" an [`Entity`](bevy_ecs::entity::Entity). + /// Say you have an entity `e1` that you want to turn into a child of `e2`, + /// but you want `e1` to keep the same global transform, even after re-parenting. You would use: + /// ``` + /// # use bevy_transform::prelude::{GlobalTransform, Transform}; + /// # use bevy_ecs::prelude::{Entity, Query, Component, Commands}; + /// #[derive(Component)] + /// struct ToReparent { + /// new_parent: Entity, + /// } + /// fn reparent_system( + /// mut commands: Commands, + /// mut targets: Query<(&mut Transform, Entity, &GlobalTransform, &ToReparent)>, + /// transforms: Query<&GlobalTransform>, + /// ) { + /// for (mut transform, entity, initial, to_reparent) in targets.iter_mut() { + /// if let Ok(parent_transform) = transforms.get(to_reparent.new_parent) { + /// *transform = initial.reparented_to(parent_transform); + /// commands.entity(entity) + /// .remove::() + /// .set_parent(to_reparent.new_parent); + /// } + /// } + /// } + /// ``` + /// The transform is expected to be non-degenerate and without shearing, or the output + /// will be invalid. + fn reparented_to( + _self: Ref<::bevy_transform::components::GlobalTransform>, + parent: Ref<::bevy_transform::components::GlobalTransform>, + ) -> Val<::bevy_transform::components::Transform> { + let output: Val<::bevy_transform::components::Transform> = ::bevy_transform::components::GlobalTransform::reparented_to( + &_self, + &parent, + ) + .into(); + output + } + /// Return the local right vector (X). + fn right( + _self: Ref<::bevy_transform::components::GlobalTransform>, + ) -> Val<::bevy_math::Dir3> { + let output: Val<::bevy_math::Dir3> = ::bevy_transform::components::GlobalTransform::right( + &_self, + ) + .into(); + output + } + /// Get the rotation as a [`Quat`]. + /// The transform is expected to be non-degenerate and without shearing, or the output will be invalid. + /// # Warning + /// This is calculated using `to_scale_rotation_translation`, meaning that you + /// should probably use it directly if you also need translation or scale. + fn rotation( + _self: Ref<::bevy_transform::components::GlobalTransform>, + ) -> Val<::bevy_math::Quat> { + let output: Val<::bevy_math::Quat> = ::bevy_transform::components::GlobalTransform::rotation( + &_self, + ) + .into(); + output + } + /// Get the scale as a [`Vec3`]. + /// The transform is expected to be non-degenerate and without shearing, or the output will be invalid. + /// Some of the computations overlap with `to_scale_rotation_translation`, which means you should use + /// it instead if you also need rotation. + fn scale( + _self: Ref<::bevy_transform::components::GlobalTransform>, + ) -> Val<::bevy_math::Vec3> { + let output: Val<::bevy_math::Vec3> = ::bevy_transform::components::GlobalTransform::scale( + &_self, + ) + .into(); + output + } + /// Returns the isometric part of the transformation as an [isometry]. Any scaling done by the + /// transformation will be ignored. + /// The transform is expected to be non-degenerate and without shearing, or the output + /// will be invalid. + /// [isometry]: Isometry3d + fn to_isometry( + _self: Ref<::bevy_transform::components::GlobalTransform>, + ) -> Val<::bevy_math::Isometry3d> { + let output: Val<::bevy_math::Isometry3d> = ::bevy_transform::components::GlobalTransform::to_isometry( + &_self, + ) + .into(); + output + } + /// Transforms the given point from local space to global space, applying shear, scale, rotation and translation. + /// It can be used like this: + /// ``` + /// # use bevy_transform::prelude::{GlobalTransform}; + /// # use bevy_math::prelude::Vec3; + /// let global_transform = GlobalTransform::from_xyz(1., 2., 3.); + /// let local_point = Vec3::new(1., 2., 3.); + /// let global_point = global_transform.transform_point(local_point); + /// assert_eq!(global_point, Vec3::new(2., 4., 6.)); + /// ``` + /// ``` + /// # use bevy_transform::prelude::{GlobalTransform}; + /// # use bevy_math::Vec3; + /// let global_point = Vec3::new(2., 4., 6.); + /// let global_transform = GlobalTransform::from_xyz(1., 2., 3.); + /// let local_point = global_transform.affine().inverse().transform_point3(global_point); + /// assert_eq!(local_point, Vec3::new(1., 2., 3.)) + /// ``` + /// To apply shear, scale, and rotation *without* applying translation, different functions are available: + /// ``` + /// # use bevy_transform::prelude::{GlobalTransform}; + /// # use bevy_math::prelude::Vec3; + /// let global_transform = GlobalTransform::from_xyz(1., 2., 3.); + /// let local_direction = Vec3::new(1., 2., 3.); + /// let global_direction = global_transform.affine().transform_vector3(local_direction); + /// assert_eq!(global_direction, Vec3::new(1., 2., 3.)); + /// let roundtripped_local_direction = global_transform.affine().inverse().transform_vector3(global_direction); + /// assert_eq!(roundtripped_local_direction, local_direction); + /// ``` + fn transform_point( + _self: Ref<::bevy_transform::components::GlobalTransform>, + point: Val<::bevy_math::Vec3>, + ) -> Val<::bevy_math::Vec3> { + let output: Val<::bevy_math::Vec3> = ::bevy_transform::components::GlobalTransform::transform_point( + &_self, + point.into_inner(), + ) + .into(); + output + } + /// Get the translation as a [`Vec3`]. + fn translation( + _self: Ref<::bevy_transform::components::GlobalTransform>, + ) -> Val<::bevy_math::Vec3> { + let output: Val<::bevy_math::Vec3> = ::bevy_transform::components::GlobalTransform::translation( + &_self, + ) + .into(); + output + } + /// Get the translation as a [`Vec3A`]. + fn translation_vec3a( + _self: Ref<::bevy_transform::components::GlobalTransform>, + ) -> Val<::bevy_math::Vec3A> { + let output: Val<::bevy_math::Vec3A> = ::bevy_transform::components::GlobalTransform::translation_vec3a( + &_self, + ) + .into(); + output + } + /// Return the local up vector (Y). + fn up( + _self: Ref<::bevy_transform::components::GlobalTransform>, + ) -> Val<::bevy_math::Dir3> { + let output: Val<::bevy_math::Dir3> = ::bevy_transform::components::GlobalTransform::up( + &_self, + ) + .into(); + output + } +} +#[script_bindings( + remote, + name = "transform_functions", + bms_core_path = "bevy_mod_scripting_core", + generated +)] +impl ::bevy_transform::components::Transform { + /// Equivalent to [`local_z()`][Transform::local_z] + fn back( + _self: Ref<::bevy_transform::components::Transform>, + ) -> Val<::bevy_math::Dir3> { + let output: Val<::bevy_math::Dir3> = ::bevy_transform::components::Transform::back( + &_self, + ) + .into(); + output + } + fn clone( + _self: Ref<::bevy_transform::components::Transform>, + ) -> Val<::bevy_transform::components::Transform> { + let output: Val<::bevy_transform::components::Transform> = <::bevy_transform::components::Transform as ::core::clone::Clone>::clone( + &_self, + ) + .into(); + output + } + /// Returns the 3d affine transformation matrix from this transforms translation, + /// rotation, and scale. + fn compute_affine( + _self: Ref<::bevy_transform::components::Transform>, + ) -> Val<::bevy_math::Affine3A> { + let output: Val<::bevy_math::Affine3A> = ::bevy_transform::components::Transform::compute_affine( + &_self, + ) + .into(); + output + } + /// Returns the 3d affine transformation matrix from this transforms translation, + /// rotation, and scale. + fn compute_matrix( + _self: Ref<::bevy_transform::components::Transform>, + ) -> Val<::bevy_math::Mat4> { + let output: Val<::bevy_math::Mat4> = ::bevy_transform::components::Transform::compute_matrix( + &_self, + ) + .into(); + output + } + /// Equivalent to [`-local_y()`][Transform::local_y] + fn down( + _self: Ref<::bevy_transform::components::Transform>, + ) -> Val<::bevy_math::Dir3> { + let output: Val<::bevy_math::Dir3> = ::bevy_transform::components::Transform::down( + &_self, + ) + .into(); + output + } + fn eq( + _self: Ref<::bevy_transform::components::Transform>, + other: Ref<::bevy_transform::components::Transform>, + ) -> bool { + let output: bool = <::bevy_transform::components::Transform as ::core::cmp::PartialEq< + ::bevy_transform::components::Transform, + >>::eq(&_self, &other) + .into(); + output + } + /// Equivalent to [`-local_z()`][Transform::local_z] + fn forward( + _self: Ref<::bevy_transform::components::Transform>, + ) -> Val<::bevy_math::Dir3> { + let output: Val<::bevy_math::Dir3> = ::bevy_transform::components::Transform::forward( + &_self, + ) + .into(); + output + } + /// Creates a new [`Transform`] that is equivalent to the given [isometry]. + /// [isometry]: Isometry3d + fn from_isometry( + iso: Val<::bevy_math::Isometry3d>, + ) -> Val<::bevy_transform::components::Transform> { + let output: Val<::bevy_transform::components::Transform> = ::bevy_transform::components::Transform::from_isometry( + iso.into_inner(), + ) + .into(); + output + } + /// Extracts the translation, rotation, and scale from `matrix`. It must be a 3d affine + /// transformation matrix. + fn from_matrix( + world_from_local: Val<::bevy_math::Mat4>, + ) -> Val<::bevy_transform::components::Transform> { + let output: Val<::bevy_transform::components::Transform> = ::bevy_transform::components::Transform::from_matrix( + world_from_local.into_inner(), + ) + .into(); + output + } + /// Creates a new [`Transform`], with `rotation`. Translation will be 0 and scale 1 on + /// all axes. + fn from_rotation( + rotation: Val<::bevy_math::Quat>, + ) -> Val<::bevy_transform::components::Transform> { + let output: Val<::bevy_transform::components::Transform> = ::bevy_transform::components::Transform::from_rotation( + rotation.into_inner(), + ) + .into(); + output + } + /// Creates a new [`Transform`], with `scale`. Translation will be 0 and rotation 0 on + /// all axes. + fn from_scale( + scale: Val<::bevy_math::Vec3>, + ) -> Val<::bevy_transform::components::Transform> { + let output: Val<::bevy_transform::components::Transform> = ::bevy_transform::components::Transform::from_scale( + scale.into_inner(), + ) + .into(); + output + } + /// Creates a new [`Transform`], with `translation`. Rotation will be 0 and scale 1 on + /// all axes. + fn from_translation( + translation: Val<::bevy_math::Vec3>, + ) -> Val<::bevy_transform::components::Transform> { + let output: Val<::bevy_transform::components::Transform> = ::bevy_transform::components::Transform::from_translation( + translation.into_inner(), + ) + .into(); + output + } + /// Creates a new [`Transform`] at the position `(x, y, z)`. In 2d, the `z` component + /// is used for z-ordering elements: higher `z`-value will be in front of lower + /// `z`-value. + fn from_xyz(x: f32, y: f32, z: f32) -> Val<::bevy_transform::components::Transform> { + let output: Val<::bevy_transform::components::Transform> = ::bevy_transform::components::Transform::from_xyz( + x, + y, + z, + ) + .into(); + output + } + /// Returns `true` if, and only if, translation, rotation and scale all are + /// finite. If any of them contains a `NaN`, positive or negative infinity, + /// this will return `false`. + fn is_finite(_self: Ref<::bevy_transform::components::Transform>) -> bool { + let output: bool = ::bevy_transform::components::Transform::is_finite(&_self) + .into(); + output + } + /// Equivalent to [`-local_x()`][Transform::local_x()] + fn left( + _self: Ref<::bevy_transform::components::Transform>, + ) -> Val<::bevy_math::Dir3> { + let output: Val<::bevy_math::Dir3> = ::bevy_transform::components::Transform::left( + &_self, + ) + .into(); + output + } + /// Get the unit vector in the local `X` direction. + fn local_x( + _self: Ref<::bevy_transform::components::Transform>, + ) -> Val<::bevy_math::Dir3> { + let output: Val<::bevy_math::Dir3> = ::bevy_transform::components::Transform::local_x( + &_self, + ) + .into(); + output + } + /// Get the unit vector in the local `Y` direction. + fn local_y( + _self: Ref<::bevy_transform::components::Transform>, + ) -> Val<::bevy_math::Dir3> { + let output: Val<::bevy_math::Dir3> = ::bevy_transform::components::Transform::local_y( + &_self, + ) + .into(); + output + } + /// Get the unit vector in the local `Z` direction. + fn local_z( + _self: Ref<::bevy_transform::components::Transform>, + ) -> Val<::bevy_math::Dir3> { + let output: Val<::bevy_math::Dir3> = ::bevy_transform::components::Transform::local_z( + &_self, + ) + .into(); + output + } + fn mul( + _self: Val<::bevy_transform::components::Transform>, + value: Val<::bevy_math::Vec3>, + ) -> Val<::bevy_math::Vec3> { + let output: Val<::bevy_math::Vec3> = <::bevy_transform::components::Transform as ::core::ops::Mul< + ::bevy_math::Vec3, + >>::mul(_self.into_inner(), value.into_inner()) + .into(); + output + } + fn mul( + _self: Val<::bevy_transform::components::Transform>, + global_transform: Val<::bevy_transform::components::GlobalTransform>, + ) -> Val<::bevy_transform::components::GlobalTransform> { + let output: Val<::bevy_transform::components::GlobalTransform> = <::bevy_transform::components::Transform as ::core::ops::Mul< + ::bevy_transform::components::GlobalTransform, + >>::mul(_self.into_inner(), global_transform.into_inner()) + .into(); + output + } + fn mul( + _self: Val<::bevy_transform::components::Transform>, + transform: Val<::bevy_transform::components::Transform>, + ) -> Val<::bevy_transform::components::Transform> { + let output: Val<::bevy_transform::components::Transform> = <::bevy_transform::components::Transform as ::core::ops::Mul< + ::bevy_transform::components::Transform, + >>::mul(_self.into_inner(), transform.into_inner()) + .into(); + output + } + /// Multiplies `self` with `transform` component by component, returning the + /// resulting [`Transform`] + fn mul_transform( + _self: Ref<::bevy_transform::components::Transform>, + transform: Val<::bevy_transform::components::Transform>, + ) -> Val<::bevy_transform::components::Transform> { + let output: Val<::bevy_transform::components::Transform> = ::bevy_transform::components::Transform::mul_transform( + &_self, + transform.into_inner(), + ) + .into(); + output + } + /// Equivalent to [`local_x()`][Transform::local_x()] + fn right( + _self: Ref<::bevy_transform::components::Transform>, + ) -> Val<::bevy_math::Dir3> { + let output: Val<::bevy_math::Dir3> = ::bevy_transform::components::Transform::right( + &_self, + ) + .into(); + output + } + /// Rotates this [`Transform`] by the given rotation. + /// If this [`Transform`] has a parent, the `rotation` is relative to the rotation of the parent. + /// # Examples + /// - [`3d_rotation`] + /// [`3d_rotation`]: https://github.com/bevyengine/bevy/blob/latest/examples/transforms/3d_rotation.rs + fn rotate( + mut _self: Mut<::bevy_transform::components::Transform>, + rotation: Val<::bevy_math::Quat>, + ) -> () { + let output: () = ::bevy_transform::components::Transform::rotate( + &mut _self, + rotation.into_inner(), + ) + .into(); + output + } + /// Rotates this [`Transform`] around a `point` in space. + /// If this [`Transform`] has a parent, the `point` is relative to the [`Transform`] of the parent. + fn rotate_around( + mut _self: Mut<::bevy_transform::components::Transform>, + point: Val<::bevy_math::Vec3>, + rotation: Val<::bevy_math::Quat>, + ) -> () { + let output: () = ::bevy_transform::components::Transform::rotate_around( + &mut _self, + point.into_inner(), + rotation.into_inner(), + ) + .into(); + output + } + /// 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<::bevy_transform::components::Transform>, + axis: Val<::bevy_math::Dir3>, + angle: f32, + ) -> () { + let output: () = ::bevy_transform::components::Transform::rotate_axis( + &mut _self, + axis.into_inner(), + angle, + ) + .into(); + output + } + /// Rotates this [`Transform`] by the given `rotation`. + /// The `rotation` is relative to this [`Transform`]'s current rotation. + fn rotate_local( + mut _self: Mut<::bevy_transform::components::Transform>, + rotation: Val<::bevy_math::Quat>, + ) -> () { + let output: () = ::bevy_transform::components::Transform::rotate_local( + &mut _self, + rotation.into_inner(), + ) + .into(); + 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<::bevy_transform::components::Transform>, + axis: Val<::bevy_math::Dir3>, + angle: f32, + ) -> () { + let output: () = ::bevy_transform::components::Transform::rotate_local_axis( + &mut _self, + axis.into_inner(), + angle, + ) + .into(); + output + } + /// Rotates this [`Transform`] around its local `X` axis by `angle` (in radians). + fn rotate_local_x( + mut _self: Mut<::bevy_transform::components::Transform>, + angle: f32, + ) -> () { + let output: () = ::bevy_transform::components::Transform::rotate_local_x( + &mut _self, + angle, + ) + .into(); + output + } + /// Rotates this [`Transform`] around its local `Y` axis by `angle` (in radians). + fn rotate_local_y( + mut _self: Mut<::bevy_transform::components::Transform>, + angle: f32, + ) -> () { + let output: () = ::bevy_transform::components::Transform::rotate_local_y( + &mut _self, + angle, + ) + .into(); + output + } + /// Rotates this [`Transform`] around its local `Z` axis by `angle` (in radians). + fn rotate_local_z( + mut _self: Mut<::bevy_transform::components::Transform>, + angle: f32, + ) -> () { + let output: () = ::bevy_transform::components::Transform::rotate_local_z( + &mut _self, + angle, + ) + .into(); + output + } + /// Rotates this [`Transform`] around the `X` axis by `angle` (in radians). + /// If this [`Transform`] has a parent, the axis is relative to the rotation of the parent. + fn rotate_x( + mut _self: Mut<::bevy_transform::components::Transform>, + angle: f32, + ) -> () { + let output: () = ::bevy_transform::components::Transform::rotate_x( + &mut _self, + angle, + ) + .into(); + output + } + /// Rotates this [`Transform`] around the `Y` axis by `angle` (in radians). + /// If this [`Transform`] has a parent, the axis is relative to the rotation of the parent. + fn rotate_y( + mut _self: Mut<::bevy_transform::components::Transform>, + angle: f32, + ) -> () { + let output: () = ::bevy_transform::components::Transform::rotate_y( + &mut _self, + angle, + ) + .into(); + output + } + /// Rotates this [`Transform`] around the `Z` axis by `angle` (in radians). + /// If this [`Transform`] has a parent, the axis is relative to the rotation of the parent. + fn rotate_z( + mut _self: Mut<::bevy_transform::components::Transform>, + angle: f32, + ) -> () { + let output: () = ::bevy_transform::components::Transform::rotate_z( + &mut _self, + angle, + ) + .into(); + output + } + /// Get the [isometry] defined by this transform's rotation and translation, ignoring scale. + /// [isometry]: Isometry3d + fn to_isometry( + _self: Ref<::bevy_transform::components::Transform>, + ) -> Val<::bevy_math::Isometry3d> { + let output: Val<::bevy_math::Isometry3d> = ::bevy_transform::components::Transform::to_isometry( + &_self, + ) + .into(); + output + } + /// Transforms the given `point`, applying scale, rotation and translation. + /// If this [`Transform`] has an ancestor entity with a [`Transform`] component, + /// [`Transform::transform_point`] will transform a point in local space into its + /// parent transform's space. + /// If this [`Transform`] does not have a parent, [`Transform::transform_point`] will + /// transform a point in local space into worldspace coordinates. + /// If you always want to transform a point in local space to worldspace, or if you need + /// the inverse transformations, see [`GlobalTransform::transform_point()`]. + fn transform_point( + _self: Ref<::bevy_transform::components::Transform>, + point: Val<::bevy_math::Vec3>, + ) -> Val<::bevy_math::Vec3> { + let output: Val<::bevy_math::Vec3> = ::bevy_transform::components::Transform::transform_point( + &_self, + point.into_inner(), + ) + .into(); + output + } + /// Translates this [`Transform`] around a `point` in space. + /// If this [`Transform`] has a parent, the `point` is relative to the [`Transform`] of the parent. + fn translate_around( + mut _self: Mut<::bevy_transform::components::Transform>, + point: Val<::bevy_math::Vec3>, + rotation: Val<::bevy_math::Quat>, + ) -> () { + let output: () = ::bevy_transform::components::Transform::translate_around( + &mut _self, + point.into_inner(), + rotation.into_inner(), + ) + .into(); + output + } + /// Equivalent to [`local_y()`][Transform::local_y] + fn up( + _self: Ref<::bevy_transform::components::Transform>, + ) -> Val<::bevy_math::Dir3> { + let output: Val<::bevy_math::Dir3> = ::bevy_transform::components::Transform::up( + &_self, + ) + .into(); + output + } + /// Returns this [`Transform`] with a new rotation. + fn with_rotation( + _self: Val<::bevy_transform::components::Transform>, + rotation: Val<::bevy_math::Quat>, + ) -> Val<::bevy_transform::components::Transform> { + let output: Val<::bevy_transform::components::Transform> = ::bevy_transform::components::Transform::with_rotation( + _self.into_inner(), + rotation.into_inner(), + ) + .into(); + output + } + /// Returns this [`Transform`] with a new scale. + fn with_scale( + _self: Val<::bevy_transform::components::Transform>, + scale: Val<::bevy_math::Vec3>, + ) -> Val<::bevy_transform::components::Transform> { + let output: Val<::bevy_transform::components::Transform> = ::bevy_transform::components::Transform::with_scale( + _self.into_inner(), + scale.into_inner(), + ) + .into(); + output + } + /// Returns this [`Transform`] with a new translation. + fn with_translation( + _self: Val<::bevy_transform::components::Transform>, + translation: Val<::bevy_math::Vec3>, + ) -> Val<::bevy_transform::components::Transform> { + let output: Val<::bevy_transform::components::Transform> = ::bevy_transform::components::Transform::with_translation( + _self.into_inner(), + translation.into_inner(), + ) + .into(); + 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<::bevy_transform::components::TransformTreeChanged>, + ) -> Val<::bevy_transform::components::TransformTreeChanged> { + let output: Val<::bevy_transform::components::TransformTreeChanged> = <::bevy_transform::components::TransformTreeChanged as ::core::clone::Clone>::clone( + &_self, + ) + .into(); + output + } + fn eq( + _self: Ref<::bevy_transform::components::TransformTreeChanged>, + other: Ref<::bevy_transform::components::TransformTreeChanged>, + ) -> bool { + let output: bool = <::bevy_transform::components::TransformTreeChanged as ::core::cmp::PartialEq< + ::bevy_transform::components::TransformTreeChanged, + >>::eq(&_self, &other) + .into(); + output + } +} +impl Plugin for BevyTransformScriptingPlugin { + fn build(&self, app: &mut 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/core.rs b/crates/bevy_mod_scripting_functions/src/core.rs index 3eefea720a..d35b10aa80 100644 --- a/crates/bevy_mod_scripting_functions/src/core.rs +++ b/crates/bevy_mod_scripting_functions/src/core.rs @@ -1,8 +1,11 @@ //! Contains functions defined by the [`bevy_mod_scripting_core`] crate -use std::{collections::HashMap, ops::Deref}; +use bevy_platform::collections::HashMap; +use std::ops::Deref; -use bevy::prelude::*; +use bevy_app::App; +use bevy_asset::{AssetServer, Handle}; +use bevy_ecs::{entity::Entity, prelude::AppTypeRegistry, schedule::Schedules, world::World}; use bevy_mod_scripting_core::{ asset::ScriptAsset, bindings::{ @@ -16,6 +19,7 @@ use bevy_mod_scripting_core::{ *, }; use bevy_mod_scripting_derive::script_bindings; +use bevy_reflect::PartialReflect; use bevy_system_reflection::{ReflectSchedule, ReflectSystem}; use bindings::{ ReflectReference, ScriptComponentRegistration, ScriptQueryBuilder, ScriptQueryResult, @@ -1357,6 +1361,7 @@ pub fn register_core_functions(app: &mut App) { register_script_system_builder_functions(world); register_script_attachment_functions(world); + register_script_handle_functions(world); register_global_namespace_functions(world); diff --git a/crates/bevy_mod_scripting_functions/src/lib.rs b/crates/bevy_mod_scripting_functions/src/lib.rs index a30e0fffd0..3b6c8d8390 100644 --- a/crates/bevy_mod_scripting_functions/src/lib.rs +++ b/crates/bevy_mod_scripting_functions/src/lib.rs @@ -1,10 +1,12 @@ #![allow(missing_docs)] -use bevy::prelude::*; pub mod bevy_bindings; pub mod core; pub use core::*; +use bevy_app::{App, Plugin}; +use bevy_ecs::hierarchy::{ChildOf, Children}; + /// A plugin that registers the core scripting functions. #[derive(Default)] pub struct ScriptFunctionsPlugin; diff --git a/crates/bevy_system_reflection/Cargo.toml b/crates/bevy_system_reflection/Cargo.toml index 36e24dc1aa..2899c6d6ab 100644 --- a/crates/bevy_system_reflection/Cargo.toml +++ b/crates/bevy_system_reflection/Cargo.toml @@ -12,12 +12,17 @@ categories = ["game-development"] readme = "readme.md" [dependencies] -bevy = { workspace = true, default-features = false, features = ["bevy_log"]} -dot-writer = "0.1.4" +bevy_ecs = { workspace = true, default-features = false, features = [] } +bevy_reflect = { workspace = true, default-features = false, features = [] } +bevy_platform = { workspace = true, default-features = false, features = [] } +bevy_log = { workspace = true, default-features = false, features = [] } +dot-writer = { workspace = true } [dev-dependencies] -pretty_assertions = "1.4" -manifest-dir-macros = "0.1.18" +bevy_app = { workspace = true, default-features = false, features = [] } +pretty_assertions = { workspace = true } +manifest-dir-macros = { workspace = true } + [lints] workspace = true diff --git a/crates/bevy_system_reflection/src/lib.rs b/crates/bevy_system_reflection/src/lib.rs index 6184321178..932a22a672 100644 --- a/crates/bevy_system_reflection/src/lib.rs +++ b/crates/bevy_system_reflection/src/lib.rs @@ -1,16 +1,17 @@ //! A visualiser for bevy system schedules, as well as utilities for querying them via reflection use std::{any::TypeId, borrow::Cow, ops::Deref}; -use bevy::{ - ecs::{ +use ::{ + bevy_ecs::{ schedule::{ InternedScheduleLabel, InternedSystemSet, NodeId, Schedule, ScheduleLabel, SystemSet, }, system::{System, SystemInput}, }, - platform::collections::{HashMap, HashSet}, - reflect::Reflect, + bevy_platform::collections::{HashMap, HashSet}, + bevy_reflect::Reflect, }; +use bevy_log::warn; use dot_writer::{Attributes, DotWriter}; #[derive(Reflect, Debug, Clone)] @@ -281,7 +282,7 @@ pub fn schedule_to_reflect_graph(schedule: &Schedule) -> ReflectSystemGraph { continue; } - bevy::log::warn!("Found uncovered node {node_id:?}"); + warn!("Found uncovered node {node_id:?}"); } let dependencies = dependency @@ -469,7 +470,10 @@ pub struct Edge { #[cfg(test)] mod test { - use bevy::{app::Update, ecs::world::World, prelude::IntoScheduleConfigs}; + use ::{ + bevy_app::Update, + bevy_ecs::{schedule::IntoScheduleConfigs, world::World}, + }; use super::*; diff --git a/crates/lad_backends/mdbook_lad_preprocessor/Cargo.toml b/crates/lad_backends/mdbook_lad_preprocessor/Cargo.toml index 9b6c1c1594..939873041c 100644 --- a/crates/lad_backends/mdbook_lad_preprocessor/Cargo.toml +++ b/crates/lad_backends/mdbook_lad_preprocessor/Cargo.toml @@ -13,17 +13,17 @@ include = ["readme.md", "/src"] readme = "readme.md" [dependencies] -clap = "4" -mdbook = "0.4" -ladfile = { path = "../../ladfile", version = "0.5.0" } -env_logger = "0.11" -log = "0.4" -serde_json = "1.0" -regex = "1.11" +env_logger = { workspace = true } +clap = { workspace = true } +ladfile = { workspace = true } +mdbook = { workspace = true, features = ["search"] } +log = { workspace = true } +serde_json = { workspace = true } +regex = { workspace = true } [dev-dependencies] -assert_cmd = "2.0" -pretty_assertions = "1.4.1" +assert_cmd = { workspace = true } +pretty_assertions = { workspace = true } [lints] workspace = true diff --git a/crates/ladfile/Cargo.toml b/crates/ladfile/Cargo.toml index bc2fa1442e..01b2845579 100644 --- a/crates/ladfile/Cargo.toml +++ b/crates/ladfile/Cargo.toml @@ -13,9 +13,9 @@ include = ["readme.md", "/src", "/test_assets"] readme = "readme.md" [dependencies] -serde = { version = "1.0", features = ["derive"] } -serde_json = "1.0" -indexmap = { version = "2.7", features = ["serde"] } +serde = { workspace = true, features = ["derive"] } +serde_json = { workspace = true } +indexmap = { workspace = true, features = ["serde"] } [features] diff --git a/crates/ladfile_builder/Cargo.toml b/crates/ladfile_builder/Cargo.toml index 47e0ad56b9..80bd326c3f 100644 --- a/crates/ladfile_builder/Cargo.toml +++ b/crates/ladfile_builder/Cargo.toml @@ -13,15 +13,17 @@ include = ["readme.md", "/src", "/test_assets"] readme = "readme.md" [dependencies] +bevy_app = { workspace = true, default-features = false, features = [] } +bevy_ecs = { workspace = true, default-features = false, features = [] } +bevy_platform = { workspace = true, default-features = false, features = [] } +bevy_log = { workspace = true, default-features = false, features = [] } 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.16.0", features = ["documentation"] } -ladfile = { version = "0.5.0", path = "../ladfile" } -regex = "1.11" +bevy_reflect = { workspace = true, features = ["documentation"] } +ladfile = { workspace = true } +regex = { workspace = true } [dev-dependencies] -pretty_assertions = "1.4" +pretty_assertions = { workspace = true } [lints] workspace = true diff --git a/crates/ladfile_builder/src/lib.rs b/crates/ladfile_builder/src/lib.rs index 036aee195c..42cbb6de6a 100644 --- a/crates/ladfile_builder/src/lib.rs +++ b/crates/ladfile_builder/src/lib.rs @@ -5,12 +5,12 @@ use std::{ any::TypeId, borrow::Cow, cmp::{max, min}, - collections::HashMap, ffi::OsString, path::PathBuf, }; -use bevy::{ecs::world::World, log, platform::collections::HashSet}; +use bevy_ecs::world::World; +use bevy_log::warn; use bevy_mod_scripting_core::{ bindings::{ MarkAsCore, MarkAsGenerated, MarkAsSignificant, ReflectReference, @@ -28,6 +28,7 @@ use bevy_mod_scripting_core::{ }, match_by_type, }; +use bevy_platform::collections::{HashMap, HashSet}; use bevy_reflect::{NamedField, TypeInfo, TypeRegistry, Typed, UnnamedField}; use ladfile::*; @@ -493,10 +494,9 @@ impl<'t> LadFileBuilder<'t> { if let Some(t) = file.types.get_mut(type_id) { t.associated_functions.push(function_id.clone()); } else { - log::warn!( + warn!( "Function {} is on type {}, but the type is not registered in the LAD file.", - function_id, - type_id + function_id, type_id ); } } diff --git a/crates/ladfile_builder/src/plugin.rs b/crates/ladfile_builder/src/plugin.rs index 984a47542c..97a3db29e5 100644 --- a/crates/ladfile_builder/src/plugin.rs +++ b/crates/ladfile_builder/src/plugin.rs @@ -2,10 +2,11 @@ use std::path::PathBuf; -use bevy::{ - app::{App, Plugin, Startup}, - ecs::{prelude::Resource, reflect::AppTypeRegistry, system::Res, world::World}, +use ::{ + bevy_app::{App, Plugin, Startup}, + bevy_ecs::{prelude::Resource, reflect::AppTypeRegistry, system::Res, world::World}, }; +use bevy_log::{error, info}; use bevy_mod_scripting_core::bindings::{ IntoNamespace, function::{namespace::Namespace, script_function::AppScriptFunctionRegistry}, @@ -151,7 +152,7 @@ pub fn generate_lad_file( let file = match ladfile::serialize_lad_file(&file, settings.pretty) { Ok(file) => file, Err(e) => { - bevy::log::error!("Error serializing LAD file: {}", e); + error!("Error serializing LAD file: {}", e); return; } }; @@ -159,10 +160,10 @@ pub fn generate_lad_file( // save match std::fs::write(&path, file) { Ok(_) => { - bevy::log::info!("Successfully generated LAD file at {:?}", path); + info!("Successfully generated LAD file at {:?}", path); } Err(e) => { - bevy::log::error!("Error saving LAD file to {:?}: {}", path, e); + error!("Error saving LAD file to {:?}: {}", path, e); } } } diff --git a/crates/languages/bevy_mod_scripting_lua/Cargo.toml b/crates/languages/bevy_mod_scripting_lua/Cargo.toml index 87cf7a56cc..53b5e69f0a 100644 --- a/crates/languages/bevy_mod_scripting_lua/Cargo.toml +++ b/crates/languages/bevy_mod_scripting_lua/Cargo.toml @@ -37,9 +37,13 @@ name = "bevy_mod_scripting_lua" path = "src/lib.rs" [dependencies] -bevy = { workspace = true, default-features = false } +bevy_app = { workspace = true, default-features = false, features = [] } +bevy_ecs = { workspace = true, default-features = false, features = [] } +bevy_asset = { workspace = true, default-features = false, features = [] } +bevy_log = { workspace = true, default-features = false, features = [] } +bevy_platform = { workspace = true, default-features = false, features = [] } bevy_mod_scripting_core = { workspace = true, features = ["mlua_impls"] } -mlua = { version = "0.10", features = ["vendored", "send", "macros"] } +mlua = { workspace = true, features = ["vendored", "send", "macros"] } profiling = { workspace = true } [lints] diff --git a/crates/languages/bevy_mod_scripting_lua/src/bindings/script_value.rs b/crates/languages/bevy_mod_scripting_lua/src/bindings/script_value.rs index 8eff8e51bd..11a326054b 100644 --- a/crates/languages/bevy_mod_scripting_lua/src/bindings/script_value.rs +++ b/crates/languages/bevy_mod_scripting_lua/src/bindings/script_value.rs @@ -1,5 +1,5 @@ use std::{ - collections::{HashMap, VecDeque}, + collections::VecDeque, ops::{Deref, DerefMut}, }; @@ -8,6 +8,7 @@ use bevy_mod_scripting_core::{ bindings::{function::script_function::FunctionCallContext, script_value::ScriptValue}, error::InteropError, }; +use bevy_platform::collections::HashMap; use mlua::{FromLua, IntoLua, Value, Variadic}; use super::reference::LuaReflectReference; @@ -162,7 +163,7 @@ impl IntoLua for LuaScriptValue { Value::Table(table) } ScriptValue::Map(map) => { - let hashmap: HashMap = map + let hashmap: std::collections::HashMap = map .into_iter() .map(|(k, v)| Ok((k, LuaScriptValue::from(v).into_lua(lua)?))) .collect::>()?; diff --git a/crates/languages/bevy_mod_scripting_lua/src/lib.rs b/crates/languages/bevy_mod_scripting_lua/src/lib.rs index 60c38478b5..423fb5cb11 100644 --- a/crates/languages/bevy_mod_scripting_lua/src/lib.rs +++ b/crates/languages/bevy_mod_scripting_lua/src/lib.rs @@ -1,9 +1,11 @@ //! Lua integration for the bevy_mod_scripting system. -use bevy::{ - app::Plugin, - asset::Handle, - ecs::{entity::Entity, world::World}, +use ::{ + bevy_app::Plugin, + bevy_asset::Handle, + bevy_ecs::{entity::Entity, world::World}, }; +use bevy_app::App; +use bevy_log::trace; use bevy_mod_scripting_core::{ IntoScriptPluginParams, ScriptingPlugin, asset::{Language, ScriptAsset}, @@ -159,11 +161,11 @@ impl Default for LuaScriptingPlugin { } impl Plugin for LuaScriptingPlugin { - fn build(&self, app: &mut bevy::prelude::App) { + fn build(&self, app: &mut App) { self.scripting_plugin.build(app); } - fn finish(&self, app: &mut bevy::app::App) { + fn finish(&self, app: &mut App) { self.scripting_plugin.finish(app); } } @@ -254,7 +256,7 @@ pub fn lua_handler( Ok(handler) => handler, // not subscribed to this event type Err(_) => { - bevy::log::trace!( + trace!( "Context {} is not subscribed to callback {}", context_key, callback_label.as_ref() @@ -275,10 +277,7 @@ pub fn lua_handler( #[cfg(test)] mod test { - use bevy::{ - asset::{AssetId, AssetIndex}, - prelude::Handle, - }; + use ::bevy_asset::{AssetId, AssetIndex, Handle}; use mlua::Value; use super::*; diff --git a/crates/languages/bevy_mod_scripting_rhai/Cargo.toml b/crates/languages/bevy_mod_scripting_rhai/Cargo.toml index 3fd4aab11c..6fd78d878e 100644 --- a/crates/languages/bevy_mod_scripting_rhai/Cargo.toml +++ b/crates/languages/bevy_mod_scripting_rhai/Cargo.toml @@ -16,11 +16,14 @@ name = "bevy_mod_scripting_rhai" path = "src/lib.rs" [dependencies] -bevy = { workspace = true, default-features = false } -rhai = { version = "1.21" } +bevy_ecs = { workspace = true, default-features = false, features = [] } +bevy_asset = { workspace = true, default-features = false, features = [] } +bevy_app = { workspace = true, default-features = false, features = [] } +bevy_log = { workspace = true, default-features = false, features = [] } +rhai = { workspace = true, features = ["std"] } bevy_mod_scripting_core = { workspace = true, features = ["rhai_impls"] } -strum = { version = "0.26", features = ["derive"] } -parking_lot = "0.12.1" +strum = { workspace = true, features = ["derive"] } +parking_lot = { workspace = true } [lints] workspace = true diff --git a/crates/languages/bevy_mod_scripting_rhai/src/lib.rs b/crates/languages/bevy_mod_scripting_rhai/src/lib.rs index acbbd201fd..ca713fdcf4 100644 --- a/crates/languages/bevy_mod_scripting_rhai/src/lib.rs +++ b/crates/languages/bevy_mod_scripting_rhai/src/lib.rs @@ -2,11 +2,13 @@ use std::ops::Deref; -use bevy::{ - app::Plugin, - asset::Handle, - ecs::{entity::Entity, world::World}, +use ::{ + bevy_app::Plugin, + bevy_asset::Handle, + bevy_ecs::{entity::Entity, world::World}, }; +use bevy_app::App; +use bevy_log::trace; use bevy_mod_scripting_core::{ IntoScriptPluginParams, ScriptingPlugin, asset::{Language, ScriptAsset}, @@ -188,11 +190,11 @@ impl Default for RhaiScriptingPlugin { } impl Plugin for RhaiScriptingPlugin { - fn build(&self, app: &mut bevy::prelude::App) { + fn build(&self, app: &mut App) { self.scripting_plugin.build(app); } - fn finish(&self, app: &mut bevy::app::App) { + fn finish(&self, app: &mut App) { self.scripting_plugin.finish(app); } } @@ -289,11 +291,9 @@ pub fn rhai_callback_handler( .map(|v| v.into_dynamic()) .collect::, _>>()?; - bevy::log::trace!( + trace!( "Calling callback {} in context {} with args: {:?}", - callback, - context_key, - args + callback, context_key, args ); let runtime = runtime.read(); @@ -307,10 +307,9 @@ pub fn rhai_callback_handler( Ok(v) => Ok(ScriptValue::from_dynamic(v)?), Err(e) => { if let EvalAltResult::ErrorFunctionNotFound(_, _) = e.unwrap_inner() { - bevy::log::trace!( + trace!( "Context {} is not subscribed to callback {} with the provided arguments.", - context_key, - callback + context_key, callback ); Ok(ScriptValue::Unit) } else { diff --git a/crates/testing_crates/script_integration_test_harness/Cargo.toml b/crates/testing_crates/script_integration_test_harness/Cargo.toml index feeecc9212..ad959930d0 100644 --- a/crates/testing_crates/script_integration_test_harness/Cargo.toml +++ b/crates/testing_crates/script_integration_test_harness/Cargo.toml @@ -14,20 +14,24 @@ lua = [ rhai = ["bevy_mod_scripting_rhai", "bevy_mod_scripting_functions/rhai_bindings"] [dependencies] -bevy = { workspace = true } +bevy_asset = { workspace = true } +bevy_ecs = { workspace = true } +bevy_app = { workspace = true } test_utils = { workspace = true } +bevy_reflect = { workspace = true } +bevy_log = { workspace = true } bevy_mod_scripting_core = { workspace = true } bevy_mod_scripting_functions = { workspace = true, features = [ "core_functions", ] } -regex = { version = "1.11" } -pretty_assertions = "1.*" -bevy_mod_scripting_lua = { path = "../../languages/bevy_mod_scripting_lua", optional = true } -bevy_mod_scripting_rhai = { path = "../../languages/bevy_mod_scripting_rhai", optional = true } -criterion = "0.5" -rand = "0.9" -rand_chacha = "0.9" -uuid = "1.11" -anyhow = "1.0" -serde = { version = "1.0", features = ["derive"] } -serde_json = "1.0" +regex = { workspace = true } +pretty_assertions = { workspace = true } +bevy_mod_scripting_lua = { workspace = true, optional = true } +bevy_mod_scripting_rhai = { workspace = true, optional = true } +criterion = { workspace = true } +rand = { workspace = true } +rand_chacha = { workspace = true } +uuid = { workspace = true } +anyhow = { workspace = true } +serde = { workspace = true, features = ["derive"] } +serde_json = { workspace = true } 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 aa422e8415..78ba1ba67a 100644 --- a/crates/testing_crates/script_integration_test_harness/src/lib.rs +++ b/crates/testing_crates/script_integration_test_harness/src/lib.rs @@ -7,18 +7,18 @@ use std::{ time::{Duration, Instant}, }; -use bevy::{ - app::{App, Plugin, PostUpdate, Startup, Update}, - asset::{AssetPath, AssetServer, Handle, LoadState}, - ecs::{ +use ::{ + bevy_app::{App, Plugin, PostUpdate, Startup, Update}, + bevy_asset::{AssetPath, AssetServer, Handle, LoadState}, + bevy_ecs::{ component::Component, resource::Resource, schedule::IntoScheduleConfigs, system::Command, world::FromWorld, }, - log::{ + bevy_log::{ Level, tracing::{self, event}, }, - reflect::Reflect, + bevy_reflect::Reflect, }; use bevy_mod_scripting_core::{ BMSScriptingInfrastructurePlugin, IntoScriptPluginParams, @@ -44,7 +44,7 @@ fn dummy_startup_system() {} fn dummy_before_post_update_system() {} fn dummy_post_update_system() {} -pub fn install_test_plugin(app: &mut bevy::app::App, include_test_functions: bool) { +pub fn install_test_plugin(app: &mut App, include_test_functions: bool) { app.add_plugins(( ScriptFunctionsPlugin, CoreScriptGlobalsPlugin::default(), @@ -205,9 +205,7 @@ pub fn run_lua_benchmark( pre_bencher.call::<()>(()).unwrap(); } c.iter(|| { - use bevy::log::{Level, tracing}; - - tracing::event!(Level::TRACE, "profiling_iter {}", label); + event!(Level::TRACE, "profiling_iter {}", label); bencher.call::<()>(()).unwrap(); }) }); @@ -243,9 +241,7 @@ pub fn run_rhai_benchmark( } c.iter(|| { - use bevy::log::{Level, tracing}; - - tracing::event!(Level::TRACE, "profiling_iter {}", label); + event!(Level::TRACE, "profiling_iter {}", label); let _ = runtime .call_fn::(&mut ctxt.scope, &ctxt.ast, "bench", ARGS) .unwrap(); @@ -275,6 +271,11 @@ where install_test_plugin(&mut app, true); app.add_plugins(plugin); + + // finalize + app.cleanup(); + app.finish(); + let script_path = script_path.into(); let script_handle = app.world().resource::().load(script_path); let script_id = script_handle.id(); @@ -283,10 +284,6 @@ where .spawn(ScriptComponent(vec![script_handle.clone()])) .id(); - // finalize - app.cleanup(); - app.finish(); - let timer = Instant::now(); // Wait until script is loaded. @@ -443,7 +440,7 @@ pub fn perform_benchmark_with_generator< ) }, |(i, w)| { - event!(bevy::log::Level::TRACE, "profiling_iter {}", label); + event!(Level::TRACE, "profiling_iter {}", label); bench_fn(w, i) }, batch_size, diff --git a/crates/testing_crates/script_integration_test_harness/src/scenario.rs b/crates/testing_crates/script_integration_test_harness/src/scenario.rs index e50e2b34b5..b734b726c1 100644 --- a/crates/testing_crates/script_integration_test_harness/src/scenario.rs +++ b/crates/testing_crates/script_integration_test_harness/src/scenario.rs @@ -5,19 +5,22 @@ use std::{ time::Instant, }; -use anyhow::{Context, Error, anyhow}; -use bevy::{ - app::App, - asset::{AssetEvent, Handle, LoadState}, - ecs::{ +use ::{ + bevy_app::App, + bevy_asset::{AssetEvent, Handle, LoadState}, + bevy_ecs::{ entity::Entity, event::{Event, EventCursor, Events}, schedule::ScheduleLabel, system::Command, + system::IntoSystem, world::World, }, - prelude::IntoSystem, }; +use anyhow::{Context, Error, anyhow}; +use bevy_app::{DynEq, FixedUpdate, Last, PostUpdate, Startup, Update}; +use bevy_asset::{AssetServer, Assets}; +use bevy_log::info; use bevy_mod_scripting_core::{ ConfigureScriptPlugin, LanguageExtensions, asset::{Language, ScriptAsset}, @@ -121,7 +124,7 @@ impl Scenario { pub fn execute(mut self, mut app: App) -> Result<(), Error> { let original_steps = self.steps.clone(); for (i, step) in self.steps.into_iter().enumerate() { - bevy::log::info!( + info!( "Executing step #{i}: {}", step.to_flat_string().unwrap_or_default() ); @@ -141,7 +144,7 @@ impl Scenario { #[derive(Debug, Clone)] pub struct ScenarioContext { pub script_handles: HashMap>, - pub entities: HashMap, + pub entities: HashMap, pub scenario_time_started: Instant, pub this_script_asset_relative_path: PathBuf, pub event_log: InterestingEventWatcher, @@ -160,7 +163,7 @@ pub struct InterestingEventWatcher { } impl InterestingEventWatcher { - pub fn log_events(&mut self, step_no: usize, world: &bevy::ecs::world::World) { + pub fn log_events(&mut self, step_no: usize, world: &World) { let asset_events = world.resource::>>(); let script_events = world.resource::>(); let script_responses = world.resource::>(); @@ -228,7 +231,7 @@ impl ScenarioContext { .ok_or_else(|| anyhow!("Script with name '{name}' not found in context. Did you miss a `LoadScriptAs` step?")) } - pub fn get_entity(&self, name: &str) -> Result { + pub fn get_entity(&self, name: &str) -> Result { self .entities .get(name) @@ -270,31 +273,31 @@ impl ScenarioSchedule { impl ScheduleLabel for ScenarioSchedule { fn dyn_clone(&self) -> Box { match self { - ScenarioSchedule::Startup => bevy::app::Startup.dyn_clone(), - ScenarioSchedule::Update => bevy::app::Update.dyn_clone(), - ScenarioSchedule::FixedUpdate => bevy::app::FixedUpdate.dyn_clone(), - ScenarioSchedule::PostUpdate => bevy::app::PostUpdate.dyn_clone(), - ScenarioSchedule::Last => bevy::app::Last.dyn_clone(), + ScenarioSchedule::Startup => Startup.dyn_clone(), + ScenarioSchedule::Update => Update.dyn_clone(), + ScenarioSchedule::FixedUpdate => FixedUpdate.dyn_clone(), + ScenarioSchedule::PostUpdate => PostUpdate.dyn_clone(), + ScenarioSchedule::Last => Last.dyn_clone(), } } - fn as_dyn_eq(&self) -> &dyn bevy::ecs::label::DynEq { + fn as_dyn_eq(&self) -> &dyn DynEq { match self { - ScenarioSchedule::Startup => bevy::app::Startup.as_dyn_eq(), - ScenarioSchedule::Update => bevy::app::Update.as_dyn_eq(), - ScenarioSchedule::FixedUpdate => bevy::app::FixedUpdate.as_dyn_eq(), - ScenarioSchedule::PostUpdate => bevy::app::PostUpdate.as_dyn_eq(), - ScenarioSchedule::Last => bevy::app::Last.as_dyn_eq(), + ScenarioSchedule::Startup => Startup.as_dyn_eq(), + ScenarioSchedule::Update => Update.as_dyn_eq(), + ScenarioSchedule::FixedUpdate => FixedUpdate.as_dyn_eq(), + ScenarioSchedule::PostUpdate => PostUpdate.as_dyn_eq(), + ScenarioSchedule::Last => Last.as_dyn_eq(), } } fn dyn_hash(&self, state: &mut dyn ::core::hash::Hasher) { match self { - ScenarioSchedule::Startup => bevy::app::Startup.dyn_hash(state), - ScenarioSchedule::Update => bevy::app::Update.dyn_hash(state), - ScenarioSchedule::FixedUpdate => bevy::app::FixedUpdate.dyn_hash(state), - ScenarioSchedule::PostUpdate => bevy::app::PostUpdate.dyn_hash(state), - ScenarioSchedule::Last => bevy::app::Last.dyn_hash(state), + ScenarioSchedule::Startup => Startup.dyn_hash(state), + ScenarioSchedule::Update => Update.dyn_hash(state), + ScenarioSchedule::FixedUpdate => FixedUpdate.dyn_hash(state), + ScenarioSchedule::PostUpdate => PostUpdate.dyn_hash(state), + ScenarioSchedule::Last => Last.dyn_hash(state), } } } @@ -428,7 +431,7 @@ impl ScenarioStep { loop { { let world = app.world_mut(); - let events = world.resource::>(); + let events = world.resource::>(); let events = event_cursor .read(events) @@ -473,7 +476,7 @@ impl ScenarioStep { }; context.current_script_language = Some(language); - bevy::log::info!( + info!( "Set current script language to: {:?}", context.current_script_language ); @@ -481,7 +484,7 @@ impl ScenarioStep { ScenarioStep::FinalizeApp => { app.finish(); app.cleanup(); - bevy::log::info!("App finalized and cleaned up"); + info!("App finalized and cleaned up"); } ScenarioStep::InstallPlugin { context_policy, @@ -533,13 +536,13 @@ impl ScenarioStep { } else { path.clone() }; - let asset_server = app.world_mut().resource::(); + let asset_server = app.world_mut().resource::(); let script_handle = asset_server.load(context.scenario_path(&path)); context .script_handles .insert(as_name.to_string(), script_handle); - bevy::log::info!( + info!( "Script '{}' marked for loading from path '{}'", as_name, path.display() @@ -551,7 +554,7 @@ impl ScenarioStep { app, |e| e.is_added(script.id()), |w| { - let server = w.resource::(); + let server = w.resource::(); if let LoadState::Failed(r) = server.load_state(script.id()) { Some(r) } else { @@ -564,7 +567,7 @@ impl ScenarioStep { return Err(anyhow!("Failed to load script: {e}")); } - bevy::log::info!("Script '{}' loaded successfully", script.id()); + info!("Script '{}' loaded successfully", script.id()); } ScenarioStep::SetupHandler { schedule, label } => { match label.to_string().as_str() { @@ -601,7 +604,7 @@ impl ScenarioStep { .id(); context.entities.insert(name.to_string(), entity); - bevy::log::info!("Spawned entity '{}' with script '{}'", entity, script.id()); + info!("Spawned entity '{}' with script '{}'", entity, script.id()); } ScenarioStep::EmitScriptCallbackEvent { event } => { app.world_mut().send_event(event.clone()); @@ -627,7 +630,7 @@ impl ScenarioStep { match &event.response { Ok(val) => { - bevy::log::info!( + info!( "Callback '{}' for attachment: '{}' succeeded, with value: {:?}", label, script.to_string(), @@ -687,12 +690,10 @@ impl ScenarioStep { script.id() ) })?; - bevy::log::info!("Dropped script asset '{}' from context", name); + info!("Dropped script asset '{}' from context", name); } ScenarioStep::ReloadScriptFrom { script, path } => { - let mut assets = app - .world_mut() - .resource_mut::>(); + let mut assets = app.world_mut().resource_mut::>(); let absolute_path = context.absolute_scenario_path(&path); @@ -721,7 +722,7 @@ impl ScenarioStep { next_event )); } else { - bevy::log::info!("No callback responses emitted as expected"); + info!("No callback responses emitted as expected"); } } ScenarioStep::DespawnEntity { entity } => { @@ -732,16 +733,16 @@ impl ScenarioStep { entity )); } else { - bevy::log::info!("Despawning entity with name '{}'", entity); + info!("Despawning entity with name '{}'", entity); } } ScenarioStep::AttachStaticScript { script } => { AddStaticScript::new(script.clone()).apply(app.world_mut()); - bevy::log::info!("Attached static script with handle: {}", script.id()); + info!("Attached static script with handle: {}", script.id()); } ScenarioStep::DetachStaticScript { script } => { RemoveStaticScript::new(script.clone()).apply(app.world_mut()); - bevy::log::info!("Detached static script with handle: {}", script.id()); + info!("Detached static script with handle: {}", script.id()); } ScenarioStep::AssertContextResidents { script, @@ -773,7 +774,7 @@ impl ScenarioStep { residents )); } else { - bevy::log::info!( + info!( "Script attachment: {} has {} residents as expected", script.to_string(), residents @@ -782,7 +783,7 @@ impl ScenarioStep { } ScenarioStep::Comment { comment } => { // Comments are ignored, do nothing, log it though for debugging - bevy::log::info!("Comment: {}", comment); + info!("Comment: {}", comment); } } Ok(()) diff --git a/crates/testing_crates/script_integration_test_harness/src/test_functions.rs b/crates/testing_crates/script_integration_test_harness/src/test_functions.rs index a73aa6e39b..d7204671d3 100644 --- a/crates/testing_crates/script_integration_test_harness/src/test_functions.rs +++ b/crates/testing_crates/script_integration_test_harness/src/test_functions.rs @@ -3,11 +3,10 @@ use std::{ sync::{Arc, Mutex}, }; -use bevy::{ - app::App, - ecs::component::ComponentId, - prelude::{Entity, World}, - reflect::{Reflect, TypeRegistration}, +use ::{ + bevy_app::App, + bevy_ecs::{component::ComponentId, entity::Entity, world::World}, + bevy_reflect::{Reflect, TypeRegistration}, }; use bevy_mod_scripting_core::{ asset::Language, diff --git a/crates/testing_crates/test_utils/Cargo.toml b/crates/testing_crates/test_utils/Cargo.toml index dbb4e24c35..a474cedc0b 100644 --- a/crates/testing_crates/test_utils/Cargo.toml +++ b/crates/testing_crates/test_utils/Cargo.toml @@ -5,7 +5,14 @@ edition = "2024" publish = false [dependencies] -bevy = { workspace = true, features = ["bevy_asset"] } +bevy_ecs = { workspace = true, default-features = false, features = [] } +bevy_app = { workspace = true, default-features = false, features = [] } +bevy_asset = { workspace = true, default-features = false, features = [] } +bevy_log = { workspace = true, default-features = false, features = [] } +bevy_diagnostic = { workspace = true, default-features = false, features = [] } +bevy_reflect = { workspace = true, default-features = false, features = [] } +bevy_time = { workspace = true, default-features = false, features = [] } + [lib] path = "src/lib.rs" diff --git a/crates/testing_crates/test_utils/src/test_data.rs b/crates/testing_crates/test_utils/src/test_data.rs index 86acbcc7ca..5cadbaf63f 100644 --- a/crates/testing_crates/test_utils/src/test_data.rs +++ b/crates/testing_crates/test_utils/src/test_data.rs @@ -1,11 +1,15 @@ use std::{alloc::Layout, collections::HashMap}; -use bevy::{ - asset::AssetPlugin, - diagnostic::DiagnosticsPlugin, - ecs::{component::*, world::World}, - prelude::*, - reflect::*, +use bevy_app::{App, ScheduleRunnerPlugin, TaskPoolPlugin}; +use bevy_diagnostic::FrameCountPlugin; +use bevy_log::LogPlugin; +use bevy_time::TimePlugin; + +use ::{ + bevy_asset::AssetPlugin, + bevy_diagnostic::DiagnosticsPlugin, + bevy_ecs::{component::*, prelude::*, world::World}, + bevy_reflect::{prelude::*, *}, }; /// Test component with Reflect and ReflectComponent registered @@ -346,10 +350,13 @@ pub fn setup_integration_test(init: F) std::env::var("RUST_LOG").unwrap_or_else(|_| "bevy_mod_scripting_core=debug".to_string()); app.add_plugins(( - MinimalPlugins, + TaskPoolPlugin::default(), + FrameCountPlugin, + TimePlugin, + ScheduleRunnerPlugin::default(), AssetPlugin::default(), DiagnosticsPlugin, - bevy::log::LogPlugin { + LogPlugin { filter: log_level, ..Default::default() }, diff --git a/crates/testing_crates/test_utils/src/test_plugin.rs b/crates/testing_crates/test_utils/src/test_plugin.rs index 335f2bc203..b1c25aacc3 100644 --- a/crates/testing_crates/test_utils/src/test_plugin.rs +++ b/crates/testing_crates/test_utils/src/test_plugin.rs @@ -12,8 +12,8 @@ macro_rules! make_test_plugin { } } - impl bevy::app::Plugin for TestPlugin { - fn build(&self, app: &mut bevy::app::App) { + impl Plugin for TestPlugin { + fn build(&self, app: &mut App) { self.0.build(app); } } @@ -63,12 +63,8 @@ macro_rules! make_test_plugin { #[derive(Default, std::fmt::Debug)] struct TestRuntime { - pub invocations: parking_lot::Mutex< - Vec<( - Option, - Option<$ident::script::ScriptId>, - )>, - >, + pub invocations: + parking_lot::Mutex, Option<$ident::script::ScriptId>)>>, } #[derive(Default, std::fmt::Debug, Clone)] diff --git a/src/lib.rs b/src/lib.rs index 6f6e83fd94..6ea28406fe 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -16,12 +16,7 @@ pub mod rhai { pub use bevy_mod_scripting_rhai::*; } -// #[cfg(feature = "rune")] -// pub mod rune { -// pub use bevy_mod_scripting_rune::*; -// } - -use bevy::app::plugin_group; +use bevy_app::plugin_group; use bevy_mod_scripting_core::{ BMSScriptingInfrastructurePlugin, bindings::CoreScriptGlobalsPlugin, }; diff --git a/xtask/src/main.rs b/xtask/src/main.rs index 654e088322..b304e3aba1 100644 --- a/xtask/src/main.rs +++ b/xtask/src/main.rs @@ -1256,20 +1256,21 @@ impl Xtasks { "crates/bevy_mod_scripting_functions", )?; - let expand_crates = std::fs::read_dir(&output_dir)?; - for entry in expand_crates { - let entry = entry?; - let path = entry.path(); - if path.extension().and_then(|s| s.to_str()) != Some("rs") || path.ends_with("mod.rs") { - continue; - } - - let without_extension = path.file_stem().unwrap().to_str().unwrap(); + let expand_crates = (std::fs::read_dir(&output_dir)?).collect::, _>>()?; + let crate_names = expand_crates + .iter() + .filter(|s| { + s.path().is_file() && s.path().ends_with(".rs") && !s.path().ends_with("mod.rs") + }) + .map(|s| s.path().file_stem().unwrap().to_str().unwrap().to_owned()) + .collect::>(); + let features = crate_names.join(","); + for entry in crate_names { let args = vec![ String::from("expand"), - format!("bevy_bindings::{without_extension}"), + format!("bevy_bindings::{entry}"), String::from("--features"), - String::from(without_extension), + features.clone(), ]; let expand_cmd = Self::run_system_command( &main_workspace_app_settings, @@ -1288,7 +1289,7 @@ impl Xtasks { .take(output.lines().count() - 2) .collect::>() .join("\n"); - + let path = output_dir.join(format!("{entry}.rs")); std::fs::write(&path, output) .with_context(|| format!("writing expanded code to {path:?}"))?; info!("Wrote expanded code to {path:?}");