From 6bae518132ffbf0f737d2a3dc015550096743179 Mon Sep 17 00:00:00 2001 From: Alex Parlett <alexparlett@proton.me> Date: Thu, 22 May 2025 19:21:30 +0100 Subject: [PATCH 01/17] Upgrade to bevy 0.16 * Move from utils::HashMap to platform::collections::HashMap * Change to IntoSchedules vs IntoSystems * Change in namespaces --- .gitignore | 3 +- Cargo.toml | 22 +- .../added_systems_run_in_parallel.lua | 39 +-- .../added_systems_run_in_parallel.rhai | 39 +-- benches/benchmarks.rs | 29 +- crates/bevy_api_gen/Cargo.toml | 2 - crates/bevy_mod_scripting_core/Cargo.toml | 12 +- crates/bevy_mod_scripting_core/src/asset.rs | 32 +-- .../src/bindings/access_map.rs | 2 +- .../src/bindings/allocator.rs | 5 +- .../src/bindings/function/from.rs | 2 +- .../src/bindings/function/into.rs | 2 +- .../src/bindings/function/script_function.rs | 8 +- .../bindings/function/type_dependencies.rs | 10 +- .../src/bindings/globals/mod.rs | 18 +- .../src/bindings/reference.rs | 46 ++-- .../src/bindings/schedule.rs | 45 ++-- .../src/bindings/script_component.rs | 21 +- .../src/bindings/script_system.rs | 23 +- .../src/bindings/world.rs | 28 +- crates/bevy_mod_scripting_core/src/context.rs | 5 +- .../src/docgen/info.rs | 14 +- .../src/docgen/typed_through.rs | 30 +-- .../bevy_mod_scripting_core/src/extractors.rs | 24 +- crates/bevy_mod_scripting_core/src/handler.rs | 4 +- crates/bevy_mod_scripting_core/src/runtime.rs | 4 +- crates/bevy_mod_scripting_core/src/script.rs | 14 +- crates/bevy_mod_scripting_derive/Cargo.toml | 2 +- .../src/derive/mod.rs | 4 +- .../bevy_mod_scripting_functions/Cargo.toml | 6 +- .../src/bevy_bindings/bevy_core.rs | 23 +- .../src/bevy_bindings/bevy_hierarchy.rs | 59 +---- .../src/bevy_bindings/bevy_input.rs | 32 --- .../src/bevy_bindings/bevy_math.rs | 17 +- .../src/bevy_bindings/bevy_reflect.rs | 248 +++++++++--------- .../src/bevy_bindings/bevy_time.rs | 24 +- .../bevy_mod_scripting_functions/src/core.rs | 36 +-- .../bevy_mod_scripting_functions/src/lib.rs | 2 +- crates/bevy_system_reflection/Cargo.toml | 1 - crates/bevy_system_reflection/src/lib.rs | 35 ++- crates/ladfile_builder/Cargo.toml | 2 +- crates/ladfile_builder/src/lib.rs | 79 +++--- crates/ladfile_builder/src/plugin.rs | 14 +- .../bevy_mod_scripting_lua/Cargo.toml | 6 +- .../bevy_mod_scripting_lua/src/lib.rs | 2 +- .../bevy_mod_scripting_rhai/Cargo.toml | 2 +- .../bevy_mod_scripting_rhai/src/lib.rs | 45 ++-- .../src/lib.rs | 87 +++--- .../test_utils/src/test_data.rs | 24 +- examples/game_of_life.rs | 4 +- src/lib.rs | 8 +- 51 files changed, 598 insertions(+), 647 deletions(-) diff --git a/.gitignore b/.gitignore index f8a150654c..b8efa21749 100644 --- a/.gitignore +++ b/.gitignore @@ -15,6 +15,7 @@ assets/scripts/tlconfig.lua **.log **build/ .html +.idea/ /assets/**/*.lad.json -/docs/src/ladfiles/*.lad.json \ No newline at end of file +/docs/src/ladfiles/*.lad.json diff --git a/Cargo.toml b/Cargo.toml index b5a0fe4c7d..b12cc377bc 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "bevy_mod_scripting" -version = "0.12.0" +version = "0.13.0" authors = ["Maksymilian Mozolewski <makspl17@gmail.com>"] edition = "2021" license = "MIT OR Apache-2.0" @@ -76,37 +76,35 @@ profile_with_tracy = ["bevy/trace_tracy"] [dependencies] bevy = { workspace = true } bevy_mod_scripting_core = { workspace = true } -bevy_mod_scripting_lua = { path = "crates/languages/bevy_mod_scripting_lua", version = "0.12.0", optional = true } -bevy_mod_scripting_rhai = { path = "crates/languages/bevy_mod_scripting_rhai", version = "0.12.0", optional = true } +bevy_mod_scripting_lua = { path = "crates/languages/bevy_mod_scripting_lua", version = "0.13.0", optional = true } +bevy_mod_scripting_rhai = { path = "crates/languages/bevy_mod_scripting_rhai", version = "0.13.0", optional = true } # bevy_mod_scripting_rune = { path = "crates/languages/bevy_mod_scripting_rune", version = "0.9.0-alpha.2", optional = true } bevy_mod_scripting_functions = { workspace = true } bevy_mod_scripting_derive = { workspace = true } [workspace.dependencies] profiling = { version = "1.0" } -bevy = { version = "0.15.3", default-features = false } -bevy_mod_scripting_core = { path = "crates/bevy_mod_scripting_core", version = "0.12.0" } -bevy_mod_scripting_functions = { path = "crates/bevy_mod_scripting_functions", version = "0.12.0", default-features = false } -bevy_mod_scripting_derive = { path = "crates/bevy_mod_scripting_derive", version = "0.12.0" } +bevy = { version = "0.16.0", default-features = false } +bevy_mod_scripting_core = { path = "crates/bevy_mod_scripting_core", version = "0.13.0" } +bevy_mod_scripting_functions = { path = "crates/bevy_mod_scripting_functions", version = "0.13.0", default-features = false } +bevy_mod_scripting_derive = { path = "crates/bevy_mod_scripting_derive", version = "0.13.0" } # test utilities script_integration_test_harness = { path = "crates/testing_crates/script_integration_test_harness" } test_utils = { path = "crates/testing_crates/test_utils" } [dev-dependencies] -bevy = { workspace = true, default-features = true } +bevy = { workspace = true, default-features = true, features = ["std"] } clap = { version = "4.1", features = ["derive"] } -rand = "0.8.5" -bevy_console = "0.13" -# rhai-rand = "0.1" +rand = "0.9.1" criterion = { version = "0.5" } -ansi-parser = "0.9" ladfile_builder = { path = "crates/ladfile_builder", version = "0.3.2" } script_integration_test_harness = { workspace = true } test_utils = { workspace = true } libtest-mimic = "0.8" tracing-tracy = "0.11" regex = "1.11" +bevy_console = { git = "https://github.com/Katsutoshii/bevy-console", branch = "bevy-0.16.0"} [workspace] members = [ diff --git a/assets/tests/add_system/added_systems_run_in_parallel.lua b/assets/tests/add_system/added_systems_run_in_parallel.lua index 2adf8104d0..bd7951c729 100644 --- a/assets/tests/add_system/added_systems_run_in_parallel.lua +++ b/assets/tests/add_system/added_systems_run_in_parallel.lua @@ -21,21 +21,30 @@ function on_test() local expected_dot_graph = [[ digraph { - node_0 [label="bevy_mod_scripting_core::bindings::allocator::garbage_collector"]; - node_1 [label="on_test_post_update"]; - node_2 [label="script_integration_test_harness::dummy_before_post_update_system"]; - node_3 [label="script_integration_test_harness::dummy_post_update_system"]; - node_4 [label="custom_system_a"]; - node_5 [label="custom_system_b"]; - node_6 [label="SystemSet GarbageCollection"]; - node_7 [label="SystemSet ScriptSystem(custom_system_a)"]; - node_8 [label="SystemSet ScriptSystem(custom_system_b)"]; - node_0 -> node_6 [color=red, label="child of", arrowhead=diamond]; - node_4 -> node_7 [color=red, label="child of", arrowhead=diamond]; - node_5 -> node_8 [color=red, label="child of", arrowhead=diamond]; - node_1 -> node_4 [color=blue, label="runs before", arrowhead=normal]; - node_1 -> node_5 [color=blue, label="runs before", arrowhead=normal]; - node_2 -> node_3 [color=blue, label="runs before", arrowhead=normal]; + node_0 [label="bevy_asset::assets::Assets<bevy_asset::folder::LoadedFolder>::asset_events"]; + node_1 [label="bevy_asset::assets::Assets<bevy_asset::assets::LoadedUntypedAsset>::asset_events"]; + node_2 [label="bevy_asset::assets::Assets<()>::asset_events"]; + node_3 [label="bevy_asset::assets::Assets<bevy_mod_scripting_core::asset::ScriptAsset>::asset_events"]; + node_4 [label="bevy_mod_scripting_core::bindings::allocator::garbage_collector"]; + node_5 [label="on_test_post_update"]; + node_6 [label="script_integration_test_harness::dummy_before_post_update_system"]; + node_7 [label="script_integration_test_harness::dummy_post_update_system"]; + node_8 [label="custom_system_a"]; + node_9 [label="custom_system_b"]; + node_10 [label="SystemSet AssetEvents"]; + node_11 [label="SystemSet GarbageCollection"]; + node_12 [label="SystemSet ScriptSystem(custom_system_a)"]; + node_13 [label="SystemSet ScriptSystem(custom_system_b)"]; + node_0 -> node_10 [color=red, label="child of", arrowhead=diamond]; + node_1 -> node_10 [color=red, label="child of", arrowhead=diamond]; + node_2 -> node_10 [color=red, label="child of", arrowhead=diamond]; + node_3 -> node_10 [color=red, label="child of", arrowhead=diamond]; + node_4 -> node_11 [color=red, label="child of", arrowhead=diamond]; + node_8 -> node_12 [color=red, label="child of", arrowhead=diamond]; + node_9 -> node_13 [color=red, label="child of", arrowhead=diamond]; + node_5 -> node_8 [color=blue, label="runs before", arrowhead=normal]; + node_5 -> node_9 [color=blue, label="runs before", arrowhead=normal]; + node_6 -> node_7 [color=blue, label="runs before", arrowhead=normal]; } ]] diff --git a/assets/tests/add_system/added_systems_run_in_parallel.rhai b/assets/tests/add_system/added_systems_run_in_parallel.rhai index 4ab2ddc17a..b49d41b9b3 100644 --- a/assets/tests/add_system/added_systems_run_in_parallel.rhai +++ b/assets/tests/add_system/added_systems_run_in_parallel.rhai @@ -20,21 +20,30 @@ fn on_test() { let expected_dot_graph = ` digraph { - node_0 [label="bevy_mod_scripting_core::bindings::allocator::garbage_collector"]; - node_1 [label="on_test_post_update"]; - node_2 [label="script_integration_test_harness::dummy_before_post_update_system"]; - node_3 [label="script_integration_test_harness::dummy_post_update_system"]; - node_4 [label="custom_system_a"]; - node_5 [label="custom_system_b"]; - node_6 [label="SystemSet GarbageCollection"]; - node_7 [label="SystemSet ScriptSystem(custom_system_a)"]; - node_8 [label="SystemSet ScriptSystem(custom_system_b)"]; - node_0 -> node_6 [color=red, label="child of", arrowhead=diamond]; - node_4 -> node_7 [color=red, label="child of", arrowhead=diamond]; - node_5 -> node_8 [color=red, label="child of", arrowhead=diamond]; - node_1 -> node_4 [color=blue, label="runs before", arrowhead=normal]; - node_1 -> node_5 [color=blue, label="runs before", arrowhead=normal]; - node_2 -> node_3 [color=blue, label="runs before", arrowhead=normal]; + node_0 [label="bevy_asset::assets::Assets<bevy_asset::folder::LoadedFolder>::asset_events"]; + node_1 [label="bevy_asset::assets::Assets<bevy_asset::assets::LoadedUntypedAsset>::asset_events"]; + node_2 [label="bevy_asset::assets::Assets<()>::asset_events"]; + node_3 [label="bevy_asset::assets::Assets<bevy_mod_scripting_core::asset::ScriptAsset>::asset_events"]; + node_4 [label="bevy_mod_scripting_core::bindings::allocator::garbage_collector"]; + node_5 [label="on_test_post_update"]; + node_6 [label="script_integration_test_harness::dummy_before_post_update_system"]; + node_7 [label="script_integration_test_harness::dummy_post_update_system"]; + node_8 [label="custom_system_a"]; + node_9 [label="custom_system_b"]; + node_10 [label="SystemSet AssetEvents"]; + node_11 [label="SystemSet GarbageCollection"]; + node_12 [label="SystemSet ScriptSystem(custom_system_a)"]; + node_13 [label="SystemSet ScriptSystem(custom_system_b)"]; + node_0 -> node_10 [color=red, label="child of", arrowhead=diamond]; + node_1 -> node_10 [color=red, label="child of", arrowhead=diamond]; + node_2 -> node_10 [color=red, label="child of", arrowhead=diamond]; + node_3 -> node_10 [color=red, label="child of", arrowhead=diamond]; + node_4 -> node_11 [color=red, label="child of", arrowhead=diamond]; + node_8 -> node_12 [color=red, label="child of", arrowhead=diamond]; + node_9 -> node_13 [color=red, label="child of", arrowhead=diamond]; + node_5 -> node_8 [color=blue, label="runs before", arrowhead=normal]; + node_5 -> node_9 [color=blue, label="runs before", arrowhead=normal]; + node_6 -> node_7 [color=blue, label="runs before", arrowhead=normal]; }`; assert_str_eq.call(dot_graph, expected_dot_graph, "Expected the schedule graph to match the expected graph"); diff --git a/benches/benchmarks.rs b/benches/benchmarks.rs index c69109c5e5..2a7c599756 100644 --- a/benches/benchmarks.rs +++ b/benches/benchmarks.rs @@ -1,27 +1,28 @@ -use bevy::log::tracing_subscriber::layer::SubscriberExt; -use bevy::log::{tracing_subscriber, Level}; -use bevy::reflect::Reflect; -use bevy::utils::tracing; -use bevy::utils::tracing::span; +extern crate bevy_mod_scripting; +extern crate script_integration_test_harness; +extern crate test_utils; +use std::{collections::HashMap, path::PathBuf, sync::LazyLock, time::Duration}; + +use bevy::{ + log::{ + tracing, tracing::span, tracing_subscriber, tracing_subscriber::layer::SubscriberExt, Level, + }, + reflect::Reflect, +}; use bevy_mod_scripting_core::bindings::{ FromScript, IntoScript, Mut, Ref, ReflectReference, ScriptValue, Val, }; -use criterion::{criterion_main, measurement::Measurement, BenchmarkGroup, Criterion}; -use criterion::{BatchSize, BenchmarkFilter}; +use criterion::{ + criterion_main, measurement::Measurement, BatchSize, BenchmarkFilter, BenchmarkGroup, Criterion, +}; use regex::Regex; -use script_integration_test_harness::test_functions::rand::Rng; use script_integration_test_harness::{ make_test_lua_plugin, make_test_rhai_plugin, perform_benchmark_with_generator, run_lua_benchmark, run_plugin_script_load_benchmark, run_rhai_benchmark, + test_functions::rand::Rng, }; -use std::collections::HashMap; -use std::{path::PathBuf, sync::LazyLock, time::Duration}; use test_utils::{discover_all_tests, Test}; -extern crate bevy_mod_scripting; -extern crate script_integration_test_harness; -extern crate test_utils; - static ENABLE_PROFILING: LazyLock<bool> = LazyLock::new(|| std::env::var("ENABLE_PROFILING").is_ok()); diff --git a/crates/bevy_api_gen/Cargo.toml b/crates/bevy_api_gen/Cargo.toml index 5773d66271..e84c96e17d 100644 --- a/crates/bevy_api_gen/Cargo.toml +++ b/crates/bevy_api_gen/Cargo.toml @@ -41,7 +41,6 @@ log = "0.4" env_logger = "0.11" rustc_plugin = "0.12.0-nightly-2024-12-15" indexmap = "2" -tempdir = "0.3" cargo_metadata = "0.18" serde_json = "1" serde = "1" @@ -52,7 +51,6 @@ include_dir = "0.7" prettyplease = "0.2" convert_case = "0.6" syn = { version = "2", features = ["parsing"], no-default-features = true } -clap-verbosity-flag = "2.2" itertools = "0.12" chrono = "0.4" diff --git a/crates/bevy_mod_scripting_core/Cargo.toml b/crates/bevy_mod_scripting_core/Cargo.toml index b94c1a88a3..5ce556108b 100644 --- a/crates/bevy_mod_scripting_core/Cargo.toml +++ b/crates/bevy_mod_scripting_core/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "bevy_mod_scripting_core" -version = "0.12.0" +version = "0.13.0" authors = ["Maksymilian Mozolewski <makspl17@gmail.com>"] edition = "2021" license = "MIT OR Apache-2.0" @@ -29,19 +29,15 @@ mlua = { version = "0.10", default-features = false, optional = true } rhai = { version = "1.21", default-features = false, features = [ "sync", ], optional = true } -bevy = { workspace = true, default-features = false, features = ["bevy_asset"] } -thiserror = "1.0.31" +bevy = { workspace = true, default-features = false, features = ["bevy_asset", "std"] } parking_lot = "0.12.1" -dashmap = "6" smallvec = "1.11" -itertools = "0.13" -derivative = "2.2" +itertools = "0.14" profiling = { workspace = true } bevy_mod_scripting_derive = { workspace = true } fixedbitset = "0.5" -petgraph = "0.6" -bevy_mod_debugdump = "0.12" bevy_system_reflection = { path = "../bevy_system_reflection", version = "0.1.1" } +variadics_please = "1.1.0" [dev-dependencies] test_utils = { workspace = true } diff --git a/crates/bevy_mod_scripting_core/src/asset.rs b/crates/bevy_mod_scripting_core/src/asset.rs index 5b122ab7f8..3427b66013 100644 --- a/crates/bevy_mod_scripting_core/src/asset.rs +++ b/crates/bevy_mod_scripting_core/src/asset.rs @@ -1,24 +1,24 @@ //! Systems and resources for handling script assets and events -use crate::{ - commands::{CreateOrUpdateScript, DeleteScript}, - error::ScriptError, - script::ScriptId, - IntoScriptPluginParams, ScriptingSystemSet, -}; +use std::borrow::Cow; + use bevy::{ app::{App, PreUpdate}, asset::{Asset, AssetEvent, AssetId, AssetLoader, AssetPath, Assets}, - ecs::system::Resource, log::{debug, info, trace, warn}, + platform::collections::HashMap, prelude::{ - Commands, Event, EventReader, EventWriter, IntoSystemConfigs, IntoSystemSetConfigs, Res, - ResMut, + Commands, Event, EventReader, EventWriter, IntoScheduleConfigs, Res, ResMut, Resource, }, reflect::TypePath, - utils::hashbrown::HashMap, }; -use std::borrow::Cow; + +use crate::{ + commands::{CreateOrUpdateScript, DeleteScript}, + error::ScriptError, + script::ScriptId, + IntoScriptPluginParams, ScriptingSystemSet, +}; /// Represents a scripting language. Languages which compile into another language should use the target language as their language. #[derive(Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Default)] @@ -231,7 +231,7 @@ pub(crate) fn dispatch_script_asset_events( language, }; debug!("Script loaded, populating metadata: {:?}:", metadata); - script_asset_events.send(ScriptAssetEvent::Added(metadata.clone())); + script_asset_events.write(ScriptAssetEvent::Added(metadata.clone())); metadata_store.insert(*id, metadata); } else { warn!("A script was added but it's asset was not found, failed to compute metadata. This script will not be loaded. Did you forget to store `Handle<ScriptAsset>` somewhere?. {}", id); @@ -241,7 +241,7 @@ pub(crate) fn dispatch_script_asset_events( AssetEvent::Removed { id } => { if let Some(metadata) = metadata_store.get(*id) { debug!("Script removed: {:?}", metadata); - script_asset_events.send(ScriptAssetEvent::Removed(metadata.clone())); + script_asset_events.write(ScriptAssetEvent::Removed(metadata.clone())); } else { warn!("Script metadata not found for removed script asset: {}. Cannot properly clean up script", id); } @@ -249,7 +249,7 @@ pub(crate) fn dispatch_script_asset_events( AssetEvent::Modified { id } => { if let Some(metadata) = metadata_store.get(*id) { debug!("Script modified: {:?}", metadata); - script_asset_events.send(ScriptAssetEvent::Modified(metadata.clone())); + script_asset_events.write(ScriptAssetEvent::Modified(metadata.clone())); } else { warn!("Script metadata not found for modified script asset: {}. Cannot properly update script", id); } @@ -572,9 +572,9 @@ mod tests { struct DummyPlugin; impl IntoScriptPluginParams for DummyPlugin { - type R = (); - type C = (); const LANGUAGE: Language = Language::Lua; + type C = (); + type R = (); fn build_runtime() -> Self::R {} } diff --git a/crates/bevy_mod_scripting_core/src/bindings/access_map.rs b/crates/bevy_mod_scripting_core/src/bindings/access_map.rs index cf91e5bced..d4a290fab0 100644 --- a/crates/bevy_mod_scripting_core/src/bindings/access_map.rs +++ b/crates/bevy_mod_scripting_core/src/bindings/access_map.rs @@ -4,8 +4,8 @@ use std::hash::{BuildHasherDefault, Hasher}; use bevy::{ ecs::{component::ComponentId, world::unsafe_world_cell::UnsafeWorldCell}, + platform::collections::{HashMap, HashSet}, prelude::Resource, - utils::hashbrown::{HashMap, HashSet}, }; use parking_lot::Mutex; use smallvec::SmallVec; diff --git a/crates/bevy_mod_scripting_core/src/bindings/allocator.rs b/crates/bevy_mod_scripting_core/src/bindings/allocator.rs index c37acdb943..9feb3c2454 100644 --- a/crates/bevy_mod_scripting_core/src/bindings/allocator.rs +++ b/crates/bevy_mod_scripting_core/src/bindings/allocator.rs @@ -1,12 +1,13 @@ //! An allocator used to control the lifetime of allocations +use bevy::prelude::Resource; use bevy::{ app::{App, Plugin, PostUpdate}, diagnostic::{Diagnostic, DiagnosticPath, Diagnostics, RegisterDiagnostic}, - ecs::system::{Res, Resource}, + ecs::system::Res, + platform::collections::HashMap, prelude::ResMut, reflect::PartialReflect, - utils::hashbrown::HashMap, }; use parking_lot::{RwLock, RwLockReadGuard, RwLockWriteGuard}; use std::{ diff --git a/crates/bevy_mod_scripting_core/src/bindings/function/from.rs b/crates/bevy_mod_scripting_core/src/bindings/function/from.rs index 0852840708..c07b25921c 100644 --- a/crates/bevy_mod_scripting_core/src/bindings/function/from.rs +++ b/crates/bevy_mod_scripting_core/src/bindings/function/from.rs @@ -585,4 +585,4 @@ macro_rules! impl_from_script_tuple { }; } -bevy::utils::all_tuples!(impl_from_script_tuple, 1, 14, T); +variadics_please::all_tuples!(impl_from_script_tuple, 1, 14, T); diff --git a/crates/bevy_mod_scripting_core/src/bindings/function/into.rs b/crates/bevy_mod_scripting_core/src/bindings/function/into.rs index fd1fb88e9b..fd48053c1e 100644 --- a/crates/bevy_mod_scripting_core/src/bindings/function/into.rs +++ b/crates/bevy_mod_scripting_core/src/bindings/function/into.rs @@ -199,4 +199,4 @@ macro_rules! impl_into_script_tuple { } } -bevy::utils::all_tuples!(impl_into_script_tuple, 1, 14, T); +variadics_please::all_tuples!(impl_into_script_tuple, 1, 14, T); diff --git a/crates/bevy_mod_scripting_core/src/bindings/function/script_function.rs b/crates/bevy_mod_scripting_core/src/bindings/function/script_function.rs index 0b255995dd..2ac70799f0 100644 --- a/crates/bevy_mod_scripting_core/src/bindings/function/script_function.rs +++ b/crates/bevy_mod_scripting_core/src/bindings/function/script_function.rs @@ -10,8 +10,8 @@ use crate::{ error::InteropError, ScriptValue, }; +use bevy::platform::collections::HashMap; use bevy::prelude::{Reflect, Resource}; -use bevy::utils::hashbrown::HashMap; use parking_lot::{RwLock, RwLockReadGuard, RwLockWriteGuard}; use std::borrow::Cow; use std::collections::VecDeque; @@ -622,13 +622,13 @@ macro_rules! impl_script_function { }; } -bevy::utils::all_tuples!(impl_script_function, 0, 13, T); +variadics_please::all_tuples!(impl_script_function, 0, 13, T); #[cfg(test)] mod test { - use super::*; + use super::*; - fn with_local_world<F: Fn()>(f: F) { + fn with_local_world<F: Fn()>(f: F) { let mut world = bevy::prelude::World::default(); WorldGuard::with_static_guard(&mut world, |world| { ThreadWorldContainer.set_world(world).unwrap(); diff --git a/crates/bevy_mod_scripting_core/src/bindings/function/type_dependencies.rs b/crates/bevy_mod_scripting_core/src/bindings/function/type_dependencies.rs index 0bc1bf0a3f..e02dc601af 100644 --- a/crates/bevy_mod_scripting_core/src/bindings/function/type_dependencies.rs +++ b/crates/bevy_mod_scripting_core/src/bindings/function/type_dependencies.rs @@ -1,11 +1,11 @@ //! This module contains the [`GetTypeDependencies`] trait and its implementations for various types. use super::{ - from::{Mut, Ref, Union, Val}, - script_function::FunctionCallContext, DynamicScriptFunction, DynamicScriptFunctionMut, + from::{Mut, Ref, Union, Val}, + script_function::FunctionCallContext, DynamicScriptFunction, DynamicScriptFunctionMut, }; use crate::{ - bindings::{ReflectReference, ScriptValue}, error::InteropError} + bindings::{ReflectReference, ScriptValue}, error::InteropError} ; use bevy::reflect::{FromReflect, GetTypeRegistration, TypeRegistry, Typed}; use bevy_mod_scripting_derive::impl_get_type_dependencies; @@ -156,7 +156,7 @@ macro_rules! register_tuple_dependencies { } -bevy::utils::all_tuples!(register_tuple_dependencies, 1, 14, T); +variadics_please::all_tuples!(register_tuple_dependencies, 1, 14, T); /// A trait collecting type dependency information for a whole function. Used to register everything used by a function with the type registry pub trait GetFunctionTypeDependencies<Marker> { @@ -184,4 +184,4 @@ macro_rules! impl_script_function_type_dependencies{ }; } -bevy::utils::all_tuples!(impl_script_function_type_dependencies, 0, 13, T); +variadics_please::all_tuples!(impl_script_function_type_dependencies, 0, 13, T); diff --git a/crates/bevy_mod_scripting_core/src/bindings/globals/mod.rs b/crates/bevy_mod_scripting_core/src/bindings/globals/mod.rs index 42f4d2de80..49e329e5ba 100644 --- a/crates/bevy_mod_scripting_core/src/bindings/globals/mod.rs +++ b/crates/bevy_mod_scripting_core/src/bindings/globals/mod.rs @@ -1,15 +1,15 @@ //! Contains abstractions for exposing "globals" to scripts, in a language-agnostic way. use super::{ - function::arg_meta::{ScriptReturn, TypedScriptReturn}, - script_value::ScriptValue, - WorldGuard, + function::arg_meta::{ScriptReturn, TypedScriptReturn}, + script_value::ScriptValue, + WorldGuard, }; use crate::{ - docgen::{into_through_type_info, typed_through::ThroughTypeInfo}, - error::InteropError, + docgen::{into_through_type_info, typed_through::ThroughTypeInfo}, + error::InteropError, }; -use bevy::{ecs::system::Resource, reflect::Typed, utils::hashbrown::HashMap}; +use bevy::{platform::collections::HashMap, prelude::Resource, reflect::Typed}; use parking_lot::{RwLock, RwLockReadGuard, RwLockWriteGuard}; use std::{any::TypeId, borrow::Cow, sync::Arc}; @@ -235,11 +235,11 @@ impl ScriptGlobalsRegistry { #[cfg(test)] mod test { - use bevy::ecs::world::World; + use bevy::ecs::world::World; - use super::*; + use super::*; - #[test] + #[test] fn test_script_globals_registry() { let mut registry = ScriptGlobalsRegistry::default(); diff --git a/crates/bevy_mod_scripting_core/src/bindings/reference.rs b/crates/bevy_mod_scripting_core/src/bindings/reference.rs index 9df1e2fbdc..0e1fe9396f 100644 --- a/crates/bevy_mod_scripting_core/src/bindings/reference.rs +++ b/crates/bevy_mod_scripting_core/src/bindings/reference.rs @@ -6,19 +6,19 @@ //! we need wrapper types which have owned and ref variants. use super::{access_map::ReflectAccessId, WorldGuard}; use crate::{ - bindings::{with_access_read, with_access_write, ReflectAllocationId}, - error::InteropError, - reflection_extensions::{PartialReflectExt, TypeIdExtensions}, - ReflectAllocator, + bindings::{with_access_read, with_access_write, ReflectAllocationId}, + error::InteropError, + reflection_extensions::{PartialReflectExt, TypeIdExtensions}, + ReflectAllocator, }; 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}, + 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}, }; use std::{any::TypeId, fmt::Debug}; @@ -503,7 +503,11 @@ impl ReflectBase { match self { ReflectBase::Component(entity, component_id) => { // Safety: the caller ensures invariants hold - world.get_entity(entity)?.get_by_id(component_id) + if let Ok(entity) = world.get_entity(entity) { + entity.get_by_id(component_id) + } else { + None + } } ReflectBase::Resource(component_id) => { // Safety: the caller ensures invariants hold @@ -522,7 +526,11 @@ impl ReflectBase { match self { ReflectBase::Component(entity, component_id) => { // Safety: the caller ensures invariants hold - world.get_entity(entity)?.get_mut_by_id(component_id) + if let Ok(entity) = world.get_entity(entity) { + entity.get_mut_by_id(component_id).ok() + } else { + None + } } ReflectBase::Resource(component_id) => { // Safety: the caller ensures invariants hold @@ -638,15 +646,15 @@ impl Iterator for ReflectRefIter { #[cfg(test)] mod test { - use bevy::prelude::{AppTypeRegistry, World}; + use bevy::prelude::{AppTypeRegistry, World}; - use crate::bindings::{ - function::script_function::AppScriptFunctionRegistry, AppReflectAllocator, - }; + use crate::bindings::{ + function::script_function::AppScriptFunctionRegistry, AppReflectAllocator, + }; - use super::*; + use super::*; - #[derive(Reflect, Component, Debug, Clone, PartialEq)] + #[derive(Reflect, Component, Debug, Clone, PartialEq)] struct Component(Vec<String>); #[derive(Reflect, Resource, Debug, Clone, PartialEq)] diff --git a/crates/bevy_mod_scripting_core/src/bindings/schedule.rs b/crates/bevy_mod_scripting_core/src/bindings/schedule.rs index 4e04dbdc78..25d66e2405 100644 --- a/crates/bevy_mod_scripting_core/src/bindings/schedule.rs +++ b/crates/bevy_mod_scripting_core/src/bindings/schedule.rs @@ -3,15 +3,15 @@ use super::{script_system::ScriptSystemBuilder, WorldAccessGuard}; use crate::{error::InteropError, IntoScriptPluginParams}; use bevy::{ - app::{ - First, FixedFirst, FixedLast, FixedMain, FixedPostUpdate, FixedPreUpdate, FixedUpdate, - Last, PostStartup, PostUpdate, PreStartup, PreUpdate, RunFixedMainLoop, Startup, Update, - }, - ecs::{ - schedule::{Schedule, ScheduleLabel, Schedules}, - system::Resource, - world::World, - }, + app::{ + First, FixedFirst, FixedLast, FixedMain, FixedPostUpdate, FixedPreUpdate, FixedUpdate, + Last, PostStartup, PostUpdate, PreStartup, PreUpdate, RunFixedMainLoop, Startup, Update, + }, + ecs::{ + schedule::{Schedule, ScheduleLabel, Schedules}, + world::World, + }, + prelude::Resource, }; use bevy_system_reflection::{ReflectSchedule, ReflectSystem}; use parking_lot::RwLock; @@ -191,19 +191,18 @@ impl WorldAccessGuard<'_> { reason = "tests are there but not working currently" )] mod tests { - - use bevy::{ - app::{App, Update}, - ecs::{ - schedule::{NodeId, Schedules}, - system::IntoSystem, - }, - }; - use test_utils::make_test_plugin; - - use super::*; - - #[test] + use bevy::{ + app::Update, + ecs::{ + schedule::{NodeId, Schedules}, + system::IntoSystem, + }, + }; + use test_utils::make_test_plugin; + + use super::*; + + #[test] fn test_schedule_registry() { let mut registry = ScheduleRegistry::default(); registry.register(Update); @@ -342,7 +341,7 @@ mod tests { // Collect all edges as (from, to) name pairs. let mut found_edges = Vec::new(); - for (from, to, _) in graph.dependency().graph().all_edges() { + for (from, to) in graph.dependency().graph().all_edges() { let name_from = resolve_name(from); let name_to = resolve_name(to); found_edges.push((name_from, name_to)); diff --git a/crates/bevy_mod_scripting_core/src/bindings/script_component.rs b/crates/bevy_mod_scripting_core/src/bindings/script_component.rs index 74243b29a3..b1a0c650f0 100644 --- a/crates/bevy_mod_scripting_core/src/bindings/script_component.rs +++ b/crates/bevy_mod_scripting_core/src/bindings/script_component.rs @@ -3,13 +3,11 @@ use super::{ScriptComponentRegistration, ScriptTypeRegistration, ScriptValue, WorldAccessGuard}; use crate::error::InteropError; use bevy::{ - app::{App, Plugin}, - ecs::{ - component::{Component, ComponentDescriptor, StorageType}, - system::Resource, - }, - reflect::{prelude::ReflectDefault, GetTypeRegistration, Reflect}, - utils::HashMap, + app::{App, Plugin}, + ecs::component::{Component, ComponentDescriptor, StorageType, ComponentCloneBehavior, Mutable}, + platform::collections::HashMap, + prelude::Resource, + reflect::{prelude::ReflectDefault, GetTypeRegistration, Reflect}, }; use parking_lot::RwLock; use std::{alloc::Layout, mem::needs_drop, sync::Arc}; @@ -31,6 +29,7 @@ pub struct DynamicComponentInfo { impl Component for DynamicComponent { const STORAGE_TYPE: StorageType = StorageType::Table; + type Mutability = Mutable; } /// A registry of dynamically registered script components @@ -96,6 +95,8 @@ impl WorldAccessGuard<'_> { DynamicComponent::STORAGE_TYPE, Layout::new::<DynamicComponent>(), needs_drop::<DynamicComponent>().then_some(|x| x.drop_as::<DynamicComponent>()), + true, + ComponentCloneBehavior::Default, ) }; w.register_component_with_descriptor(descriptor) @@ -135,10 +136,10 @@ impl Plugin for DynamicScriptComponentPlugin { #[cfg(test)] mod test { - use super::*; - use bevy::ecs::world::World; + use super::*; + use bevy::ecs::world::World; - #[test] + #[test] fn test_script_component() { let mut world = World::new(); let registration = { diff --git a/crates/bevy_mod_scripting_core/src/bindings/script_system.rs b/crates/bevy_mod_scripting_core/src/bindings/script_system.rs index ab840e9593..323a6b77e7 100644 --- a/crates/bevy_mod_scripting_core/src/bindings/script_system.rs +++ b/crates/bevy_mod_scripting_core/src/bindings/script_system.rs @@ -27,15 +27,19 @@ use bevy::{ entity::Entity, query::{Access, FilteredAccess, FilteredAccessSet, QueryState}, reflect::AppTypeRegistry, - schedule::{IntoSystemConfigs, SystemSet}, - system::{IntoSystem, System}, + schedule::{ + SystemSet, Infallible, graph::GraphInfo, + }, + system::{IntoSystem, System, SystemParamValidationError}, world::{unsafe_world_cell::UnsafeWorldCell, World}, }, + platform::collections::HashSet, + prelude::{BevyError, IntoScheduleConfigs}, reflect::{OffsetAccess, ParsedPath, Reflect}, - utils::hashbrown::HashSet, }; use bevy_system_reflection::{ReflectSchedule, ReflectSystem}; use std::{any::TypeId, borrow::Cow, hash::Hash, marker::PhantomData, ops::Deref}; + #[derive(Clone, Hash, PartialEq, Eq)] /// a system set for script systems. pub struct ScriptSystemSet(Cow<'static, str>); @@ -160,7 +164,7 @@ impl ScriptSystemBuilder { // this is quite important, by default systems are placed in a set defined by their TYPE, i.e. in this case // all script systems would be the same // let set = ScriptSystemSet::next(); - let mut system_config = IntoSystemConfigs::<IsDynamicScriptSystem<P>>::into_configs(self); // apply ordering + let mut system_config = <ScriptSystemBuilder as IntoScheduleConfigs<Box<(dyn System<In = (), Out = Result<(), BevyError>> + 'static)>, (Infallible, IsDynamicScriptSystem<P>)>>::into_configs(self); // apply ordering for (other, is_before) in before_systems .into_iter() .map(|b| (b, true)) @@ -170,7 +174,8 @@ impl ScriptSystemBuilder { if is_before { bevy::log::info!("before {default_set:?}"); system_config = system_config.before(*default_set); - } else { bevy::log::info!("before {default_set:?}"); + } else { + bevy::log::info!("before {default_set:?}"); bevy::log::info!("after {default_set:?}"); system_config = system_config.after(*default_set); } @@ -642,9 +647,9 @@ impl<P: IntoScriptPluginParams> System for DynamicScriptSystem<P> { unsafe fn validate_param_unsafe( &mut self, - _world: bevy::ecs::world::unsafe_world_cell::UnsafeWorldCell, - ) -> bool { - true + _world: UnsafeWorldCell, + ) -> Result<(), SystemParamValidationError> { + Ok(()) } fn default_system_sets(&self) -> Vec<bevy::ecs::schedule::InternedSystemSet> { @@ -655,7 +660,7 @@ impl<P: IntoScriptPluginParams> System for DynamicScriptSystem<P> { TypeId::of::<Self>() } - fn validate_param(&mut self, world: &World) -> bool { + fn validate_param(&mut self, world: &World) -> Result<(), SystemParamValidationError> { let world_cell = world.as_unsafe_world_cell_readonly(); self.update_archetype_component_access(world_cell); // SAFETY: diff --git a/crates/bevy_mod_scripting_core/src/bindings/world.rs b/crates/bevy_mod_scripting_core/src/bindings/world.rs index c88dc84f61..67a5b96c04 100644 --- a/crates/bevy_mod_scripting_core/src/bindings/world.rs +++ b/crates/bevy_mod_scripting_core/src/bindings/world.rs @@ -29,16 +29,18 @@ use crate::{ error::InteropError, reflection_extensions::PartialReflectExt, }; +use bevy::ecs::component::Mutable; +use bevy::prelude::{ChildOf, Children}; use bevy::{ app::AppExit, ecs::{ component::{Component, ComponentId}, entity::Entity, + prelude::Resource, reflect::{AppTypeRegistry, ReflectFromWorld, ReflectResource}, - system::{Commands, Resource}, + system::Commands, world::{unsafe_world_cell::UnsafeWorldCell, CommandQueue, Mut, World}, }, - hierarchy::{BuildChildren, Children, DespawnRecursiveExt, Parent}, reflect::{ std_traits::ReflectDefault, DynamicEnum, DynamicStruct, DynamicTuple, DynamicTupleStruct, DynamicVariant, ParsedPath, PartialReflect, TypeRegistryArc, @@ -446,7 +448,7 @@ impl<'w> WorldAccessGuard<'w> { format!("Could not access component: {}", std::any::type_name::<T>()), { // Safety: we have acquired access for the duration of the closure - f(unsafe { cell.get_entity(entity).and_then(|e| e.get::<T>()) }) + f(unsafe { cell.get_entity(entity).map(|e| e.get::<T>()) }.ok().unwrap_or(None)) } ) } @@ -454,7 +456,7 @@ impl<'w> WorldAccessGuard<'w> { /// Safely accesses the component by claiming and releasing access to it. pub fn with_component_mut<F, T, O>(&self, entity: Entity, f: F) -> Result<O, InteropError> where - T: Component, + T: Component<Mutability = Mutable>, F: FnOnce(Option<Mut<T>>) -> O, { let cell = self.as_unsafe_world_cell()?; @@ -466,7 +468,7 @@ impl<'w> WorldAccessGuard<'w> { format!("Could not access component: {}", std::any::type_name::<T>()), { // Safety: we have acquired access for the duration of the closure - f(unsafe { cell.get_entity(entity).and_then(|e| e.get_mut::<T>()) }) + f(unsafe { cell.get_entity(entity).map(|e| e.get_mut::<T>()) }.ok().unwrap_or(None)) } ) } @@ -478,7 +480,7 @@ impl<'w> WorldAccessGuard<'w> { f: F, ) -> Result<O, InteropError> where - T: Component + Default, + T: Component<Mutability = Mutable> + Default, F: FnOnce(&mut T) -> O, { self.with_global_access(|world| match world.get_mut::<T>(entity) { @@ -536,7 +538,7 @@ impl<'w> WorldAccessGuard<'w> { /// checks if a given entity exists and is valid pub fn is_valid_entity(&self, entity: Entity) -> Result<bool, InteropError> { let cell = self.as_unsafe_world_cell()?; - Ok(cell.get_entity(entity).is_some() && entity.index() != 0) + Ok(cell.get_entity(entity).is_ok() && entity.index() != 0) } /// Tries to call a fitting overload of the function with the given name and in the type id's namespace based on the arguments provided. @@ -989,7 +991,7 @@ impl WorldAccessGuard<'_> { let cell = self.as_unsafe_world_cell()?; let entity = cell .get_entity(entity) - .ok_or_else(|| InteropError::missing_entity(entity))?; + .map_err(|_| InteropError::missing_entity(entity))?; if entity.contains_id(component_registration.component_id) { Ok(Some(ReflectReference { @@ -1016,7 +1018,7 @@ impl WorldAccessGuard<'_> { let cell = self.as_unsafe_world_cell()?; let entity = cell .get_entity(entity) - .ok_or_else(|| InteropError::missing_entity(entity))?; + .map_err(|_| InteropError::missing_entity(entity))?; Ok(entity.contains_id(component_id)) } @@ -1111,7 +1113,7 @@ impl WorldAccessGuard<'_> { return Err(InteropError::missing_entity(entity)); } - self.with_component(entity, |c: Option<&Parent>| c.map(|c| c.get())) + self.with_component(entity, |c: Option<&ChildOf>| c.map(|c| c.parent())) } /// insert children into the given entity @@ -1185,7 +1187,7 @@ impl WorldAccessGuard<'_> { self.with_global_access(|world| { let mut queue = CommandQueue::default(); let mut commands = Commands::new(&mut queue, world); - commands.entity(parent).despawn_recursive(); + commands.entity(parent).despawn(); queue.apply(world); }) } @@ -1199,7 +1201,7 @@ impl WorldAccessGuard<'_> { self.with_global_access(|world| { let mut queue = CommandQueue::default(); let mut commands = Commands::new(&mut queue, world); - commands.entity(entity).despawn(); + commands.entity(entity).remove::<Children>().despawn(); queue.apply(world); }) } @@ -1213,7 +1215,7 @@ impl WorldAccessGuard<'_> { self.with_global_access(|world| { let mut queue = CommandQueue::default(); let mut commands = Commands::new(&mut queue, world); - commands.entity(parent).despawn_descendants(); + commands.entity(parent).despawn_related::<Children>(); queue.apply(world); }) } diff --git a/crates/bevy_mod_scripting_core/src/context.rs b/crates/bevy_mod_scripting_core/src/context.rs index dec993f7be..6d8fe65f6f 100644 --- a/crates/bevy_mod_scripting_core/src/context.rs +++ b/crates/bevy_mod_scripting_core/src/context.rs @@ -6,7 +6,10 @@ use crate::{ script::ScriptId, IntoScriptPluginParams, }; -use bevy::ecs::{entity::Entity, system::Resource}; +use bevy::{ + ecs::entity::Entity, + prelude::Resource +}; /// A trait that all script contexts must implement. /// diff --git a/crates/bevy_mod_scripting_core/src/docgen/info.rs b/crates/bevy_mod_scripting_core/src/docgen/info.rs index b6a9ce5ae1..949286c0d3 100644 --- a/crates/bevy_mod_scripting_core/src/docgen/info.rs +++ b/crates/bevy_mod_scripting_core/src/docgen/info.rs @@ -191,18 +191,18 @@ macro_rules! impl_documentable { }; } -bevy::utils::all_tuples!(impl_documentable, 0, 13, T); +variadics_please::all_tuples!(impl_documentable, 0, 13, T); #[cfg(test)] mod test { - use crate::{ - bindings::function::from::{Mut, Ref, Val}, - docgen::typed_through::UntypedWrapperKind, - }; + use crate::{ + bindings::function::from::{Mut, Ref, Val}, + docgen::typed_through::UntypedWrapperKind, + }; - use super::*; + use super::*; - #[test] + #[test] fn test_get_function_info() { fn test_fn(a: i32, b: f32) -> f64 { (a as f64) + (b as f64) diff --git a/crates/bevy_mod_scripting_core/src/docgen/typed_through.rs b/crates/bevy_mod_scripting_core/src/docgen/typed_through.rs index 7e467b6180..694711af35 100644 --- a/crates/bevy_mod_scripting_core/src/docgen/typed_through.rs +++ b/crates/bevy_mod_scripting_core/src/docgen/typed_through.rs @@ -6,18 +6,18 @@ use std::{ffi::OsString, path::PathBuf}; use bevy::reflect::{TypeInfo, Typed}; use crate::{ - bindings::{ - function::{ - from::{Mut, Ref, Union, Val}, - script_function::{ - DynamicScriptFunction, DynamicScriptFunctionMut, FunctionCallContext, - }, - }, - script_value::ScriptValue, - ReflectReference, - }, - error::InteropError, - reflection_extensions::TypeInfoExtensions, + bindings::{ + function::{ + from::{Mut, Ref, Union, Val}, + script_function::{ + DynamicScriptFunction, DynamicScriptFunctionMut, FunctionCallContext, + }, + }, + script_value::ScriptValue, + ReflectReference, + }, + error::InteropError, + reflection_extensions::TypeInfoExtensions, }; /// All Through types follow one rule: @@ -265,13 +265,13 @@ macro_rules! impl_through_typed_tuple { }; } -bevy::utils::all_tuples!(impl_through_typed_tuple, 0, 13, T); +variadics_please::all_tuples!(impl_through_typed_tuple, 0, 13, T); #[cfg(test)] mod test { - use super::*; + use super::*; - fn assert_type_info_is_through<T: Typed + TypedThrough>() { + fn assert_type_info_is_through<T: Typed + TypedThrough>() { let type_info = T::type_info(); let through_type_info = T::through_type_info(); diff --git a/crates/bevy_mod_scripting_core/src/extractors.rs b/crates/bevy_mod_scripting_core/src/extractors.rs index d105cca7b5..d5ff141a16 100644 --- a/crates/bevy_mod_scripting_core/src/extractors.rs +++ b/crates/bevy_mod_scripting_core/src/extractors.rs @@ -4,14 +4,17 @@ #![allow(deprecated)] use std::ops::{Deref, DerefMut}; -use bevy::ecs::{ - component::ComponentId, - entity::Entity, - event::{Event, EventCursor, EventIterator, Events}, - query::{Access, AccessConflicts}, - storage::SparseSetIndex, - system::{Local, Resource, SystemParam, SystemState}, - world::World, +use bevy::{ + ecs::{ + component::ComponentId, + entity::Entity, + event::{Event, EventCursor, EventIterator, Events}, + query::{Access, AccessConflicts}, + storage::SparseSetIndex, + system::{Local, SystemParam, SystemState}, + world::World, + }, + prelude::Resource }; use fixedbitset::FixedBitSet; @@ -366,7 +369,7 @@ unsafe impl<T: SystemParam> SystemParam for WithWorldGuard<'_, '_, T> { system_meta: &bevy::ecs::system::SystemMeta, world: bevy::ecs::world::unsafe_world_cell::UnsafeWorldCell, ) -> bool { - T::validate_param(&state.0, system_meta, world) + T::validate_param(&state.0, system_meta, world).is_ok() } } @@ -417,9 +420,10 @@ mod test { ecs::{ component::Component, event::{Event, EventReader}, - system::{Query, ResMut, Resource}, + system::{Query, ResMut}, world::FromWorld, }, + prelude::Resource, }; use test_utils::make_test_plugin; diff --git a/crates/bevy_mod_scripting_core/src/handler.rs b/crates/bevy_mod_scripting_core/src/handler.rs index 34f259c4c7..f3ff397c66 100644 --- a/crates/bevy_mod_scripting_core/src/handler.rs +++ b/crates/bevy_mod_scripting_core/src/handler.rs @@ -18,11 +18,11 @@ use bevy::{ ecs::{ entity::Entity, query::QueryState, - system::{Local, Resource, SystemState}, + system::{Local, SystemState}, world::{Mut, World}, }, log::trace_once, - prelude::{Events, Ref}, + prelude::{Events, Ref, Resource}, }; /// A function that handles a callback event diff --git a/crates/bevy_mod_scripting_core/src/runtime.rs b/crates/bevy_mod_scripting_core/src/runtime.rs index 359a7a0c97..0f69158fed 100644 --- a/crates/bevy_mod_scripting_core/src/runtime.rs +++ b/crates/bevy_mod_scripting_core/src/runtime.rs @@ -3,8 +3,8 @@ use crate::{error::ScriptError, IntoScriptPluginParams}; use bevy::{ - ecs::system::{ResMut, Resource}, - prelude::Res, + ecs::system::{ResMut}, + prelude::{Res, Resource}, }; /// A trait that all script runtimes must implement. diff --git a/crates/bevy_mod_scripting_core/src/script.rs b/crates/bevy_mod_scripting_core/src/script.rs index d5b0fe46ae..dd29fdc22a 100644 --- a/crates/bevy_mod_scripting_core/src/script.rs +++ b/crates/bevy_mod_scripting_core/src/script.rs @@ -1,11 +1,17 @@ //! Script related types, functions and components -use crate::{asset::ScriptAsset, IntoScriptPluginParams}; -use bevy::prelude::ReflectComponent; -use bevy::{asset::Handle, ecs::system::Resource, reflect::Reflect, utils::HashSet}; -use parking_lot::Mutex; use std::{borrow::Cow, collections::HashMap, ops::Deref, sync::Arc}; +use bevy::{ + asset::Handle, + platform::collections::HashSet, + prelude::{ReflectComponent, Resource}, + reflect::Reflect, +}; +use parking_lot::Mutex; + +use crate::{asset::ScriptAsset, IntoScriptPluginParams}; + /// A unique identifier for a script, by default corresponds to the path of the asset excluding the asset source. /// /// I.e. an asset with the path `path/to/asset.ext` will have the script id `path/to/asset.ext` diff --git a/crates/bevy_mod_scripting_derive/Cargo.toml b/crates/bevy_mod_scripting_derive/Cargo.toml index 0f867cbf67..cd77066a16 100644 --- a/crates/bevy_mod_scripting_derive/Cargo.toml +++ b/crates/bevy_mod_scripting_derive/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "bevy_mod_scripting_derive" -version = "0.12.0" +version = "0.13.0" edition = "2021" authors = ["Maksymilian Mozolewski <makspl17@gmail.com>"] license = "MIT OR Apache-2.0" diff --git a/crates/bevy_mod_scripting_derive/src/derive/mod.rs b/crates/bevy_mod_scripting_derive/src/derive/mod.rs index b0363a2455..b2b1171376 100644 --- a/crates/bevy_mod_scripting_derive/src/derive/mod.rs +++ b/crates/bevy_mod_scripting_derive/src/derive/mod.rs @@ -9,8 +9,8 @@ use quote::{quote_spanned, ToTokens}; use syn::{Ident, ImplItemFn, ItemImpl}; pub use self::{ - get_type_dependencies::get_type_dependencies, into_script::into_script, - script_bindings::script_bindings, script_globals::script_globals, typed_through::typed_through, + get_type_dependencies::get_type_dependencies, into_script::into_script, + script_bindings::script_bindings, script_globals::script_globals, typed_through::typed_through, }; pub(crate) fn impl_fn_to_namespace_builder_registration(fun: &ImplItemFn) -> TokenStream { diff --git a/crates/bevy_mod_scripting_functions/Cargo.toml b/crates/bevy_mod_scripting_functions/Cargo.toml index e2ad1971a3..7aa2f4ede9 100644 --- a/crates/bevy_mod_scripting_functions/Cargo.toml +++ b/crates/bevy_mod_scripting_functions/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "bevy_mod_scripting_functions" -version = "0.12.0" +version = "0.13.0" edition = "2021" authors = ["Maksymilian Mozolewski <makspl17@gmail.com>"] license = "MIT OR Apache-2.0" @@ -33,8 +33,8 @@ uuid = "1.11" smol_str = "0.2.2" 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.12.0" } -bevy_mod_scripting_rhai = { path = "../languages/bevy_mod_scripting_rhai", optional = true, version = "0.12.0" } +bevy_mod_scripting_lua = { path = "../languages/bevy_mod_scripting_lua", optional = true, version = "0.13.0" } +bevy_mod_scripting_rhai = { path = "../languages/bevy_mod_scripting_rhai", optional = true, version = "0.13.0" } bevy_system_reflection = { path = "../bevy_system_reflection", version = "0.1.1" } [lints] diff --git a/crates/bevy_mod_scripting_functions/src/bevy_bindings/bevy_core.rs b/crates/bevy_mod_scripting_functions/src/bevy_bindings/bevy_core.rs index 2d2e6ee754..f6466929c0 100644 --- a/crates/bevy_mod_scripting_functions/src/bevy_bindings/bevy_core.rs +++ b/crates/bevy_mod_scripting_functions/src/bevy_bindings/bevy_core.rs @@ -2,15 +2,8 @@ #![allow(clippy::all)] #![allow(unused, deprecated, dead_code)] #![cfg_attr(rustfmt, rustfmt_skip)] -use bevy_mod_scripting_core::bindings::{ - ReflectReference, - function::{ - from::{Ref, Mut, Val}, - namespace::NamespaceBuilder, - }, -}; +use bevy_mod_scripting_core::bindings::function::from::{Ref, Val}; use bevy_mod_scripting_derive::script_bindings; -use crate::*; pub struct BevyCoreScriptingPlugin; #[script_bindings( remote, @@ -18,20 +11,20 @@ pub struct BevyCoreScriptingPlugin; bms_core_path = "bevy_mod_scripting_core", generated )] -impl bevy::core::prelude::Name { - fn clone(_self: Ref<bevy::core::prelude::Name>) -> Val<bevy::core::prelude::Name> { - let output: Val<bevy::core::prelude::Name> = <bevy::core::prelude::Name as std::clone::Clone>::clone( +impl bevy::prelude::Name { + fn clone(_self: Ref<bevy::prelude::Name>) -> Val<bevy::prelude::Name> { + let output: Val<bevy::prelude::Name> = <bevy::prelude::Name as std::clone::Clone>::clone( &_self, ) .into(); output } fn eq( - _self: Ref<bevy::core::prelude::Name>, - other: Ref<bevy::core::prelude::Name>, + _self: Ref<bevy::prelude::Name>, + other: Ref<bevy::prelude::Name>, ) -> bool { - let output: bool = <bevy::core::prelude::Name as std::cmp::PartialEq< - bevy::core::prelude::Name, + let output: bool = <bevy::prelude::Name as std::cmp::PartialEq< + bevy::prelude::Name, >>::eq(&_self, &other) .into(); output diff --git a/crates/bevy_mod_scripting_functions/src/bevy_bindings/bevy_hierarchy.rs b/crates/bevy_mod_scripting_functions/src/bevy_bindings/bevy_hierarchy.rs index 529c8c7f5d..373bff58bc 100644 --- a/crates/bevy_mod_scripting_functions/src/bevy_bindings/bevy_hierarchy.rs +++ b/crates/bevy_mod_scripting_functions/src/bevy_bindings/bevy_hierarchy.rs @@ -18,14 +18,14 @@ pub struct BevyHierarchyScriptingPlugin; bms_core_path = "bevy_mod_scripting_core", generated )] -impl bevy::hierarchy::prelude::Children { +impl bevy::prelude::Children { /// Swaps the child at `a_index` with the child at `b_index`. fn swap( - mut _self: Mut<bevy::hierarchy::prelude::Children>, + mut _self: Mut<bevy::prelude::Children>, a_index: usize, b_index: usize, ) -> () { - let output: () = bevy::hierarchy::prelude::Children::swap( + let output: () = bevy::prelude::Children::swap( &mut _self, a_index, b_index, @@ -40,74 +40,39 @@ impl bevy::hierarchy::prelude::Children { bms_core_path = "bevy_mod_scripting_core", generated )] -impl bevy::hierarchy::prelude::Parent { - fn assert_receiver_is_total_eq(_self: Ref<bevy::hierarchy::prelude::Parent>) -> () { - let output: () = <bevy::hierarchy::prelude::Parent as std::cmp::Eq>::assert_receiver_is_total_eq( +impl bevy::prelude::ChildOf { + fn assert_receiver_is_total_eq(_self: Ref<bevy::prelude::ChildOf>) -> () { + let output: () = <bevy::prelude::ChildOf as std::cmp::Eq>::assert_receiver_is_total_eq( &_self, ) .into(); output } fn eq( - _self: Ref<bevy::hierarchy::prelude::Parent>, - other: Ref<bevy::hierarchy::prelude::Parent>, + _self: Ref<bevy::prelude::ChildOf>, + other: Ref<bevy::prelude::ChildOf>, ) -> bool { - let output: bool = <bevy::hierarchy::prelude::Parent as std::cmp::PartialEq< - bevy::hierarchy::prelude::Parent, + let output: bool = <bevy::prelude::ChildOf as std::cmp::PartialEq< + bevy::prelude::ChildOf, >>::eq(&_self, &other) .into(); output } /// Gets the [`Entity`] ID of the parent. fn get( - _self: Ref<bevy::hierarchy::prelude::Parent>, + _self: Ref<bevy::prelude::ChildOf>, ) -> Val<bevy::ecs::entity::Entity> { - let output: Val<bevy::ecs::entity::Entity> = bevy::hierarchy::prelude::Parent::get( + let output: Val<bevy::ecs::entity::Entity> = bevy::prelude::ChildOf::get( &_self, ) .into(); output } } -#[script_bindings( - remote, - name = "hierarchy_event_functions", - bms_core_path = "bevy_mod_scripting_core", - generated -)] -impl bevy::hierarchy::HierarchyEvent { - fn assert_receiver_is_total_eq(_self: Ref<bevy::hierarchy::HierarchyEvent>) -> () { - let output: () = <bevy::hierarchy::HierarchyEvent as std::cmp::Eq>::assert_receiver_is_total_eq( - &_self, - ) - .into(); - output - } - fn clone( - _self: Ref<bevy::hierarchy::HierarchyEvent>, - ) -> Val<bevy::hierarchy::HierarchyEvent> { - let output: Val<bevy::hierarchy::HierarchyEvent> = <bevy::hierarchy::HierarchyEvent as std::clone::Clone>::clone( - &_self, - ) - .into(); - output - } - fn eq( - _self: Ref<bevy::hierarchy::HierarchyEvent>, - other: Ref<bevy::hierarchy::HierarchyEvent>, - ) -> bool { - let output: bool = <bevy::hierarchy::HierarchyEvent as std::cmp::PartialEq< - bevy::hierarchy::HierarchyEvent, - >>::eq(&_self, &other) - .into(); - output - } -} impl ::bevy::app::Plugin for BevyHierarchyScriptingPlugin { fn build(&self, app: &mut ::bevy::prelude::App) { let mut world = app.world_mut(); register_children_functions(&mut world); register_parent_functions(&mut world); - register_hierarchy_event_functions(&mut world); } } diff --git a/crates/bevy_mod_scripting_functions/src/bevy_bindings/bevy_input.rs b/crates/bevy_mod_scripting_functions/src/bevy_bindings/bevy_input.rs index 712fa729dc..592fd54354 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 @@ -1191,22 +1191,6 @@ impl bevy::input::gamepad::AxisSettings { .into(); output } - /// Filters the `new_value` based on the `old_value`, according to the [`AxisSettings`]. - /// Returns the clamped `new_value` if the change exceeds the settings threshold, - /// and `None` otherwise. - fn filter( - _self: Ref<bevy::input::gamepad::AxisSettings>, - new_value: f32, - old_value: std::option::Option<f32>, - ) -> std::option::Option<f32> { - let output: std::option::Option<f32> = bevy::input::gamepad::AxisSettings::filter( - &_self, - new_value, - old_value, - ) - .into(); - output - } /// Get the value below which negative inputs will be rounded down to -1.0. fn livezone_lowerbound(_self: Ref<bevy::input::gamepad::AxisSettings>) -> f32 { let output: f32 = bevy::input::gamepad::AxisSettings::livezone_lowerbound(&_self) @@ -1315,22 +1299,6 @@ impl bevy::input::gamepad::ButtonAxisSettings { .into(); output } - /// Filters the `new_value` based on the `old_value`, according to the [`ButtonAxisSettings`]. - /// Returns the clamped `new_value`, according to the [`ButtonAxisSettings`], if the change - /// exceeds the settings threshold, and `None` otherwise. - fn filter( - _self: Ref<bevy::input::gamepad::ButtonAxisSettings>, - new_value: f32, - old_value: std::option::Option<f32>, - ) -> std::option::Option<f32> { - let output: std::option::Option<f32> = bevy::input::gamepad::ButtonAxisSettings::filter( - &_self, - new_value, - old_value, - ) - .into(); - output - } } #[script_bindings( remote, diff --git a/crates/bevy_mod_scripting_functions/src/bevy_bindings/bevy_math.rs b/crates/bevy_mod_scripting_functions/src/bevy_bindings/bevy_math.rs index 6a65dc0527..58ae59b470 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 @@ -501,15 +501,6 @@ impl bevy::math::Ray3d { generated )] impl bevy::math::Rot2 { - /// Returns the angle in radians needed to make `self` and `other` coincide. - fn angle_between(_self: Val<bevy::math::Rot2>, other: Val<bevy::math::Rot2>) -> f32 { - let output: f32 = bevy::math::Rot2::angle_between( - _self.into_inner(), - other.into_inner(), - ) - .into(); - output - } /// Returns the angle in radians needed to make `self` and `other` coincide. fn angle_to(_self: Val<bevy::math::Rot2>, other: Val<bevy::math::Rot2>) -> f32 { let output: f32 = bevy::math::Rot2::angle_to( @@ -3390,11 +3381,11 @@ impl bevy::math::primitives::Segment2d { output } /// Create a new `Segment2d` from a direction and full length of the segment - fn new( + 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::new( + let output: Val<bevy::math::primitives::Segment2d> = bevy::math::primitives::Segment2d::from_direction_and_length( direction.into_inner(), length, ) @@ -4039,11 +4030,11 @@ impl bevy::math::primitives::Segment3d { output } /// Create a new `Segment3d` from a direction and full length of the segment - fn new( + 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::new( + let output: Val<bevy::math::primitives::Segment3d> = bevy::math::primitives::Segment3d::from_direction_and_length( direction.into_inner(), length, ) diff --git a/crates/bevy_mod_scripting_functions/src/bevy_bindings/bevy_reflect.rs b/crates/bevy_mod_scripting_functions/src/bevy_bindings/bevy_reflect.rs index 303da037a7..b981719c12 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 @@ -408,7 +408,7 @@ impl std::sync::atomic::AtomicUsize { bms_core_path = "bevy_mod_scripting_core", generated )] -impl bevy::utils::Duration { +impl std::time::Duration { /// Computes the absolute difference between `self` and `other`. /// # Examples /// ``` @@ -417,10 +417,10 @@ impl bevy::utils::Duration { /// assert_eq!(Duration::new(100, 400_000_000).abs_diff(Duration::new(110, 0)), Duration::new(9, 600_000_000)); /// ``` fn abs_diff( - _self: Val<bevy::utils::Duration>, - other: Val<bevy::utils::Duration>, - ) -> Val<bevy::utils::Duration> { - let output: Val<bevy::utils::Duration> = bevy::utils::Duration::abs_diff( + _self: Val<std::time::Duration>, + other: Val<std::time::Duration>, + ) -> Val<std::time::Duration> { + let output: Val<std::time::Duration> = std::time::Duration::abs_diff( _self.into_inner(), other.into_inner(), ) @@ -428,11 +428,11 @@ impl bevy::utils::Duration { output } fn add( - _self: Val<bevy::utils::Duration>, - rhs: Val<bevy::utils::Duration>, - ) -> Val<bevy::utils::Duration> { - let output: Val<bevy::utils::Duration> = <bevy::utils::Duration as std::ops::Add< - bevy::utils::Duration, + _self: Val<std::time::Duration>, + rhs: Val<std::time::Duration>, + ) -> Val<std::time::Duration> { + let output: Val<std::time::Duration> = <std::time::Duration as std::ops::Add< + std::time::Duration, >>::add(_self.into_inner(), rhs.into_inner()) .into(); output @@ -444,8 +444,8 @@ impl bevy::utils::Duration { /// let duration = Duration::new(5, 730_023_852); /// assert_eq!(duration.as_micros(), 5_730_023); /// ``` - fn as_micros(_self: Ref<bevy::utils::Duration>) -> u128 { - let output: u128 = bevy::utils::Duration::as_micros(&_self).into(); + fn as_micros(_self: Ref<std::time::Duration>) -> u128 { + let output: u128 = std::time::Duration::as_micros(&_self).into(); output } /// Returns the total number of whole milliseconds contained by this `Duration`. @@ -455,8 +455,8 @@ impl bevy::utils::Duration { /// let duration = Duration::new(5, 730_023_852); /// assert_eq!(duration.as_millis(), 5_730); /// ``` - fn as_millis(_self: Ref<bevy::utils::Duration>) -> u128 { - let output: u128 = bevy::utils::Duration::as_millis(&_self).into(); + fn as_millis(_self: Ref<std::time::Duration>) -> u128 { + let output: u128 = std::time::Duration::as_millis(&_self).into(); output } /// Returns the total number of nanoseconds contained by this `Duration`. @@ -466,8 +466,8 @@ impl bevy::utils::Duration { /// let duration = Duration::new(5, 730_023_852); /// assert_eq!(duration.as_nanos(), 5_730_023_852); /// ``` - fn as_nanos(_self: Ref<bevy::utils::Duration>) -> u128 { - let output: u128 = bevy::utils::Duration::as_nanos(&_self).into(); + fn as_nanos(_self: Ref<std::time::Duration>) -> u128 { + let output: u128 = std::time::Duration::as_nanos(&_self).into(); output } /// Returns the number of _whole_ seconds contained by this `Duration`. @@ -484,8 +484,8 @@ impl bevy::utils::Duration { /// [`as_secs_f64`]: Duration::as_secs_f64 /// [`as_secs_f32`]: Duration::as_secs_f32 /// [`subsec_nanos`]: Duration::subsec_nanos - fn as_secs(_self: Ref<bevy::utils::Duration>) -> u64 { - let output: u64 = bevy::utils::Duration::as_secs(&_self).into(); + fn as_secs(_self: Ref<std::time::Duration>) -> u64 { + let output: u64 = std::time::Duration::as_secs(&_self).into(); output } /// Returns the number of seconds contained by this `Duration` as `f32`. @@ -496,8 +496,8 @@ impl bevy::utils::Duration { /// let dur = Duration::new(2, 700_000_000); /// assert_eq!(dur.as_secs_f32(), 2.7); /// ``` - fn as_secs_f32(_self: Ref<bevy::utils::Duration>) -> f32 { - let output: f32 = bevy::utils::Duration::as_secs_f32(&_self).into(); + fn as_secs_f32(_self: Ref<std::time::Duration>) -> f32 { + let output: f32 = std::time::Duration::as_secs_f32(&_self).into(); output } /// Returns the number of seconds contained by this `Duration` as `f64`. @@ -508,26 +508,26 @@ impl bevy::utils::Duration { /// let dur = Duration::new(2, 700_000_000); /// assert_eq!(dur.as_secs_f64(), 2.7); /// ``` - fn as_secs_f64(_self: Ref<bevy::utils::Duration>) -> f64 { - let output: f64 = bevy::utils::Duration::as_secs_f64(&_self).into(); + fn as_secs_f64(_self: Ref<std::time::Duration>) -> f64 { + let output: f64 = std::time::Duration::as_secs_f64(&_self).into(); output } - fn assert_receiver_is_total_eq(_self: Ref<bevy::utils::Duration>) -> () { - let output: () = <bevy::utils::Duration as std::cmp::Eq>::assert_receiver_is_total_eq( + fn assert_receiver_is_total_eq(_self: Ref<std::time::Duration>) -> () { + let output: () = <std::time::Duration as std::cmp::Eq>::assert_receiver_is_total_eq( &_self, ) .into(); output } - fn clone(_self: Ref<bevy::utils::Duration>) -> Val<bevy::utils::Duration> { - let output: Val<bevy::utils::Duration> = <bevy::utils::Duration as bevy::reflect::erased_serde::__private::serde::__private::Clone>::clone( + fn clone(_self: Ref<std::time::Duration>) -> Val<std::time::Duration> { + let output: Val<std::time::Duration> = <std::time::Duration as bevy::reflect::erased_serde::__private::serde::__private::Clone>::clone( &_self, ) .into(); output } - fn div(_self: Val<bevy::utils::Duration>, rhs: u32) -> Val<bevy::utils::Duration> { - let output: Val<bevy::utils::Duration> = <bevy::utils::Duration as std::ops::Div< + fn div(_self: Val<std::time::Duration>, rhs: u32) -> Val<std::time::Duration> { + let output: Val<std::time::Duration> = <std::time::Duration as std::ops::Div< u32, >>::div(_self.into_inner(), rhs) .into(); @@ -542,10 +542,10 @@ impl bevy::utils::Duration { /// assert_eq!(dur1.div_duration_f32(dur2), 0.5); /// ``` fn div_duration_f32( - _self: Val<bevy::utils::Duration>, - rhs: Val<bevy::utils::Duration>, + _self: Val<std::time::Duration>, + rhs: Val<std::time::Duration>, ) -> f32 { - let output: f32 = bevy::utils::Duration::div_duration_f32( + let output: f32 = std::time::Duration::div_duration_f32( _self.into_inner(), rhs.into_inner(), ) @@ -561,10 +561,10 @@ impl bevy::utils::Duration { /// assert_eq!(dur1.div_duration_f64(dur2), 0.5); /// ``` fn div_duration_f64( - _self: Val<bevy::utils::Duration>, - rhs: Val<bevy::utils::Duration>, + _self: Val<std::time::Duration>, + rhs: Val<std::time::Duration>, ) -> f64 { - let output: f64 = bevy::utils::Duration::div_duration_f64( + let output: f64 = std::time::Duration::div_duration_f64( _self.into_inner(), rhs.into_inner(), ) @@ -584,10 +584,10 @@ impl bevy::utils::Duration { /// assert_eq!(dur.div_f32(3.14e5), Duration::new(0, 8_599)); /// ``` fn div_f32( - _self: Val<bevy::utils::Duration>, + _self: Val<std::time::Duration>, rhs: f32, - ) -> Val<bevy::utils::Duration> { - let output: Val<bevy::utils::Duration> = bevy::utils::Duration::div_f32( + ) -> Val<std::time::Duration> { + let output: Val<std::time::Duration> = std::time::Duration::div_f32( _self.into_inner(), rhs, ) @@ -605,19 +605,19 @@ impl bevy::utils::Duration { /// assert_eq!(dur.div_f64(3.14e5), Duration::new(0, 8_599)); /// ``` fn div_f64( - _self: Val<bevy::utils::Duration>, + _self: Val<std::time::Duration>, rhs: f64, - ) -> Val<bevy::utils::Duration> { - let output: Val<bevy::utils::Duration> = bevy::utils::Duration::div_f64( + ) -> Val<std::time::Duration> { + let output: Val<std::time::Duration> = std::time::Duration::div_f64( _self.into_inner(), rhs, ) .into(); output } - fn eq(_self: Ref<bevy::utils::Duration>, other: Ref<bevy::utils::Duration>) -> bool { - let output: bool = <bevy::utils::Duration as std::cmp::PartialEq< - bevy::utils::Duration, + fn eq(_self: Ref<std::time::Duration>, other: Ref<std::time::Duration>) -> bool { + let output: bool = <std::time::Duration as std::cmp::PartialEq< + std::time::Duration, >>::eq(&_self, &other) .into(); output @@ -630,8 +630,8 @@ impl bevy::utils::Duration { /// assert_eq!(1, duration.as_secs()); /// assert_eq!(2_000, duration.subsec_nanos()); /// ``` - fn from_micros(micros: u64) -> Val<bevy::utils::Duration> { - let output: Val<bevy::utils::Duration> = bevy::utils::Duration::from_micros( + fn from_micros(micros: u64) -> Val<std::time::Duration> { + let output: Val<std::time::Duration> = std::time::Duration::from_micros( micros, ) .into(); @@ -645,8 +645,8 @@ impl bevy::utils::Duration { /// assert_eq!(2, duration.as_secs()); /// assert_eq!(569_000_000, duration.subsec_nanos()); /// ``` - fn from_millis(millis: u64) -> Val<bevy::utils::Duration> { - let output: Val<bevy::utils::Duration> = bevy::utils::Duration::from_millis( + fn from_millis(millis: u64) -> Val<std::time::Duration> { + let output: Val<std::time::Duration> = std::time::Duration::from_millis( millis, ) .into(); @@ -664,8 +664,8 @@ impl bevy::utils::Duration { /// assert_eq!(1, duration.as_secs()); /// assert_eq!(123, duration.subsec_nanos()); /// ``` - fn from_nanos(nanos: u64) -> Val<bevy::utils::Duration> { - let output: Val<bevy::utils::Duration> = bevy::utils::Duration::from_nanos(nanos) + fn from_nanos(nanos: u64) -> Val<std::time::Duration> { + let output: Val<std::time::Duration> = std::time::Duration::from_nanos(nanos) .into(); output } @@ -677,8 +677,8 @@ impl bevy::utils::Duration { /// assert_eq!(5, duration.as_secs()); /// assert_eq!(0, duration.subsec_nanos()); /// ``` - fn from_secs(secs: u64) -> Val<bevy::utils::Duration> { - let output: Val<bevy::utils::Duration> = bevy::utils::Duration::from_secs(secs) + fn from_secs(secs: u64) -> Val<std::time::Duration> { + let output: Val<std::time::Duration> = std::time::Duration::from_secs(secs) .into(); output } @@ -706,8 +706,8 @@ impl bevy::utils::Duration { /// let res = Duration::from_secs_f32(0.999e-9); /// assert_eq!(res, Duration::new(0, 1)); /// ``` - fn from_secs_f32(secs: f32) -> Val<bevy::utils::Duration> { - let output: Val<bevy::utils::Duration> = bevy::utils::Duration::from_secs_f32( + fn from_secs_f32(secs: f32) -> Val<std::time::Duration> { + let output: Val<std::time::Duration> = std::time::Duration::from_secs_f32( secs, ) .into(); @@ -737,8 +737,8 @@ impl bevy::utils::Duration { /// let res = Duration::from_secs_f64(0.999e-9); /// assert_eq!(res, Duration::new(0, 1)); /// ``` - fn from_secs_f64(secs: f64) -> Val<bevy::utils::Duration> { - let output: Val<bevy::utils::Duration> = bevy::utils::Duration::from_secs_f64( + fn from_secs_f64(secs: f64) -> Val<std::time::Duration> { + let output: Val<std::time::Duration> = std::time::Duration::from_secs_f64( secs, ) .into(); @@ -756,12 +756,12 @@ impl bevy::utils::Duration { /// assert!(!Duration::from_nanos(1).is_zero()); /// assert!(!Duration::from_secs(1).is_zero()); /// ``` - fn is_zero(_self: Ref<bevy::utils::Duration>) -> bool { - let output: bool = bevy::utils::Duration::is_zero(&_self).into(); + fn is_zero(_self: Ref<std::time::Duration>) -> bool { + let output: bool = std::time::Duration::is_zero(&_self).into(); output } - fn mul(_self: Val<bevy::utils::Duration>, rhs: u32) -> Val<bevy::utils::Duration> { - let output: Val<bevy::utils::Duration> = <bevy::utils::Duration as std::ops::Mul< + fn mul(_self: Val<std::time::Duration>, rhs: u32) -> Val<std::time::Duration> { + let output: Val<std::time::Duration> = <std::time::Duration as std::ops::Mul< u32, >>::mul(_self.into_inner(), rhs) .into(); @@ -778,10 +778,10 @@ impl bevy::utils::Duration { /// assert_eq!(dur.mul_f32(3.14e5), Duration::new(847_800, 0)); /// ``` fn mul_f32( - _self: Val<bevy::utils::Duration>, + _self: Val<std::time::Duration>, rhs: f32, - ) -> Val<bevy::utils::Duration> { - let output: Val<bevy::utils::Duration> = bevy::utils::Duration::mul_f32( + ) -> Val<std::time::Duration> { + let output: Val<std::time::Duration> = std::time::Duration::mul_f32( _self.into_inner(), rhs, ) @@ -799,10 +799,10 @@ impl bevy::utils::Duration { /// assert_eq!(dur.mul_f64(3.14e5), Duration::new(847_800, 0)); /// ``` fn mul_f64( - _self: Val<bevy::utils::Duration>, + _self: Val<std::time::Duration>, rhs: f64, - ) -> Val<bevy::utils::Duration> { - let output: Val<bevy::utils::Duration> = bevy::utils::Duration::mul_f64( + ) -> Val<std::time::Duration> { + let output: Val<std::time::Duration> = std::time::Duration::mul_f64( _self.into_inner(), rhs, ) @@ -821,8 +821,8 @@ impl bevy::utils::Duration { /// use std::time::Duration; /// let five_seconds = Duration::new(5, 0); /// ``` - fn new(secs: u64, nanos: u32) -> Val<bevy::utils::Duration> { - let output: Val<bevy::utils::Duration> = bevy::utils::Duration::new(secs, nanos) + fn new(secs: u64, nanos: u32) -> Val<std::time::Duration> { + let output: Val<std::time::Duration> = std::time::Duration::new(secs, nanos) .into(); output } @@ -836,10 +836,10 @@ impl bevy::utils::Duration { /// assert_eq!(Duration::new(1, 0).saturating_add(Duration::new(u64::MAX, 0)), Duration::MAX); /// ``` fn saturating_add( - _self: Val<bevy::utils::Duration>, - rhs: Val<bevy::utils::Duration>, - ) -> Val<bevy::utils::Duration> { - let output: Val<bevy::utils::Duration> = bevy::utils::Duration::saturating_add( + _self: Val<std::time::Duration>, + rhs: Val<std::time::Duration>, + ) -> Val<std::time::Duration> { + let output: Val<std::time::Duration> = std::time::Duration::saturating_add( _self.into_inner(), rhs.into_inner(), ) @@ -856,10 +856,10 @@ impl bevy::utils::Duration { /// assert_eq!(Duration::new(u64::MAX - 1, 0).saturating_mul(2), Duration::MAX); /// ``` fn saturating_mul( - _self: Val<bevy::utils::Duration>, + _self: Val<std::time::Duration>, rhs: u32, - ) -> Val<bevy::utils::Duration> { - let output: Val<bevy::utils::Duration> = bevy::utils::Duration::saturating_mul( + ) -> Val<std::time::Duration> { + let output: Val<std::time::Duration> = std::time::Duration::saturating_mul( _self.into_inner(), rhs, ) @@ -875,10 +875,10 @@ impl bevy::utils::Duration { /// assert_eq!(Duration::new(0, 0).saturating_sub(Duration::new(0, 1)), Duration::ZERO); /// ``` fn saturating_sub( - _self: Val<bevy::utils::Duration>, - rhs: Val<bevy::utils::Duration>, - ) -> Val<bevy::utils::Duration> { - let output: Val<bevy::utils::Duration> = bevy::utils::Duration::saturating_sub( + _self: Val<std::time::Duration>, + rhs: Val<std::time::Duration>, + ) -> Val<std::time::Duration> { + let output: Val<std::time::Duration> = std::time::Duration::saturating_sub( _self.into_inner(), rhs.into_inner(), ) @@ -886,11 +886,11 @@ impl bevy::utils::Duration { output } fn sub( - _self: Val<bevy::utils::Duration>, - rhs: Val<bevy::utils::Duration>, - ) -> Val<bevy::utils::Duration> { - let output: Val<bevy::utils::Duration> = <bevy::utils::Duration as std::ops::Sub< - bevy::utils::Duration, + _self: Val<std::time::Duration>, + rhs: Val<std::time::Duration>, + ) -> Val<std::time::Duration> { + let output: Val<std::time::Duration> = <std::time::Duration as std::ops::Sub< + std::time::Duration, >>::sub(_self.into_inner(), rhs.into_inner()) .into(); output @@ -906,8 +906,8 @@ impl bevy::utils::Duration { /// assert_eq!(duration.as_secs(), 1); /// assert_eq!(duration.subsec_micros(), 234_567); /// ``` - fn subsec_micros(_self: Ref<bevy::utils::Duration>) -> u32 { - let output: u32 = bevy::utils::Duration::subsec_micros(&_self).into(); + fn subsec_micros(_self: Ref<std::time::Duration>) -> u32 { + let output: u32 = std::time::Duration::subsec_micros(&_self).into(); output } /// Returns the fractional part of this `Duration`, in whole milliseconds. @@ -921,8 +921,8 @@ impl bevy::utils::Duration { /// assert_eq!(duration.as_secs(), 5); /// assert_eq!(duration.subsec_millis(), 432); /// ``` - fn subsec_millis(_self: Ref<bevy::utils::Duration>) -> u32 { - let output: u32 = bevy::utils::Duration::subsec_millis(&_self).into(); + fn subsec_millis(_self: Ref<std::time::Duration>) -> u32 { + let output: u32 = std::time::Duration::subsec_millis(&_self).into(); output } /// Returns the fractional part of this `Duration`, in nanoseconds. @@ -936,8 +936,8 @@ impl bevy::utils::Duration { /// assert_eq!(duration.as_secs(), 5); /// assert_eq!(duration.subsec_nanos(), 10_000_000); /// ``` - fn subsec_nanos(_self: Ref<bevy::utils::Duration>) -> u32 { - let output: u32 = bevy::utils::Duration::subsec_nanos(&_self).into(); + fn subsec_nanos(_self: Ref<std::time::Duration>) -> u32 { + let output: u32 = std::time::Duration::subsec_nanos(&_self).into(); output } } @@ -947,29 +947,29 @@ impl bevy::utils::Duration { bms_core_path = "bevy_mod_scripting_core", generated )] -impl bevy::utils::Instant { +impl bevy::platform::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<bevy::utils::Instant>, - other: Val<bevy::utils::Duration>, - ) -> Val<bevy::utils::Instant> { - let output: Val<bevy::utils::Instant> = <bevy::utils::Instant as std::ops::Add< - bevy::utils::Duration, + _self: Val<bevy::platform::time::Instant>, + other: Val<std::time::Duration>, + ) -> Val<bevy::platform::time::Instant> { + let output: Val<bevy::platform::time::Instant> = <bevy::platform::time::Instant as std::ops::Add< + std::time::Duration, >>::add(_self.into_inner(), other.into_inner()) .into(); output } - fn assert_receiver_is_total_eq(_self: Ref<bevy::utils::Instant>) -> () { - let output: () = <bevy::utils::Instant as std::cmp::Eq>::assert_receiver_is_total_eq( + fn assert_receiver_is_total_eq(_self: Ref<bevy::platform::time::Instant>) -> () { + let output: () = <bevy::platform::time::Instant as std::cmp::Eq>::assert_receiver_is_total_eq( &_self, ) .into(); output } - fn clone(_self: Ref<bevy::utils::Instant>) -> Val<bevy::utils::Instant> { - let output: Val<bevy::utils::Instant> = <bevy::utils::Instant as bevy::reflect::erased_serde::__private::serde::__private::Clone>::clone( + fn clone(_self: Ref<bevy::platform::time::Instant>) -> Val<bevy::platform::time::Instant> { + let output: Val<bevy::platform::time::Instant> = <bevy::platform::time::Instant as bevy::reflect::erased_serde::__private::serde::__private::Clone>::clone( &_self, ) .into(); @@ -993,10 +993,10 @@ impl bevy::utils::Instant { /// println!("{:?}", now.duration_since(new_now)); // 0ns /// ``` fn duration_since( - _self: Ref<bevy::utils::Instant>, - earlier: Val<bevy::utils::Instant>, - ) -> Val<bevy::utils::Duration> { - let output: Val<bevy::utils::Duration> = bevy::utils::Instant::duration_since( + _self: Ref<bevy::platform::time::Instant>, + earlier: Val<bevy::platform::time::Instant>, + ) -> Val<std::time::Duration> { + let output: Val<std::time::Duration> = bevy::platform::time::Instant::duration_since( &_self, earlier.into_inner(), ) @@ -1018,14 +1018,14 @@ impl bevy::utils::Instant { /// sleep(three_secs); /// assert!(instant.elapsed() >= three_secs); /// ``` - fn elapsed(_self: Ref<bevy::utils::Instant>) -> Val<bevy::utils::Duration> { - let output: Val<bevy::utils::Duration> = bevy::utils::Instant::elapsed(&_self) + fn elapsed(_self: Ref<bevy::platform::time::Instant>) -> Val<std::time::Duration> { + let output: Val<std::time::Duration> = bevy::platform::time::Instant::elapsed(&_self) .into(); output } - fn eq(_self: Ref<bevy::utils::Instant>, other: Ref<bevy::utils::Instant>) -> bool { - let output: bool = <bevy::utils::Instant as std::cmp::PartialEq< - bevy::utils::Instant, + fn eq(_self: Ref<bevy::platform::time::Instant>, other: Ref<bevy::platform::time::Instant>) -> bool { + let output: bool = <bevy::platform::time::Instant as std::cmp::PartialEq< + bevy::platform::time::Instant, >>::eq(&_self, &other) .into(); output @@ -1036,8 +1036,8 @@ impl bevy::utils::Instant { /// use std::time::Instant; /// let now = Instant::now(); /// ``` - fn now() -> Val<bevy::utils::Instant> { - let output: Val<bevy::utils::Instant> = bevy::utils::Instant::now().into(); + fn now() -> Val<bevy::platform::time::Instant> { + let output: Val<bevy::platform::time::Instant> = bevy::platform::time::Instant::now().into(); output } /// Returns the amount of time elapsed from another instant to this one, @@ -1053,10 +1053,10 @@ impl bevy::utils::Instant { /// println!("{:?}", now.saturating_duration_since(new_now)); // 0ns /// ``` fn saturating_duration_since( - _self: Ref<bevy::utils::Instant>, - earlier: Val<bevy::utils::Instant>, - ) -> Val<bevy::utils::Duration> { - let output: Val<bevy::utils::Duration> = bevy::utils::Instant::saturating_duration_since( + _self: Ref<bevy::platform::time::Instant>, + earlier: Val<bevy::platform::time::Instant>, + ) -> Val<std::time::Duration> { + let output: Val<std::time::Duration> = bevy::platform::time::Instant::saturating_duration_since( &_self, earlier.into_inner(), ) @@ -1064,11 +1064,11 @@ impl bevy::utils::Instant { output } fn sub( - _self: Val<bevy::utils::Instant>, - other: Val<bevy::utils::Duration>, - ) -> Val<bevy::utils::Instant> { - let output: Val<bevy::utils::Instant> = <bevy::utils::Instant as std::ops::Sub< - bevy::utils::Duration, + _self: Val<bevy::platform::time::Instant>, + other: Val<std::time::Duration>, + ) -> Val<bevy::platform::time::Instant> { + let output: Val<bevy::platform::time::Instant> = <bevy::platform::time::Instant as std::ops::Sub< + std::time::Duration, >>::sub(_self.into_inner(), other.into_inner()) .into(); output @@ -1081,11 +1081,11 @@ impl bevy::utils::Instant { /// See [Monotonicity]. /// [Monotonicity]: Instant#monotonicity fn sub( - _self: Val<bevy::utils::Instant>, - other: Val<bevy::utils::Instant>, - ) -> Val<bevy::utils::Duration> { - let output: Val<bevy::utils::Duration> = <bevy::utils::Instant as std::ops::Sub< - bevy::utils::Instant, + _self: Val<bevy::platform::time::Instant>, + other: Val<bevy::platform::time::Instant>, + ) -> Val<std::time::Duration> { + let output: Val<std::time::Duration> = <bevy::platform::time::Instant as std::ops::Sub< + bevy::platform::time::Instant, >>::sub(_self.into_inner(), other.into_inner()) .into(); output diff --git a/crates/bevy_mod_scripting_functions/src/bevy_bindings/bevy_time.rs b/crates/bevy_mod_scripting_functions/src/bevy_bindings/bevy_time.rs index 4802139580..2e7a937b67 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 @@ -71,8 +71,8 @@ impl bevy::time::prelude::Timer { /// let timer = Timer::new(Duration::from_secs(1), TimerMode::Once); /// assert_eq!(timer.duration(), Duration::from_secs(1)); /// ``` - fn duration(_self: Ref<bevy::time::prelude::Timer>) -> Val<bevy::utils::Duration> { - let output: Val<bevy::utils::Duration> = bevy::time::prelude::Timer::duration( + fn duration(_self: Ref<bevy::time::prelude::Timer>) -> Val<std::time::Duration> { + let output: Val<std::time::Duration> = bevy::time::prelude::Timer::duration( &_self, ) .into(); @@ -89,8 +89,8 @@ impl bevy::time::prelude::Timer { /// timer.tick(Duration::from_secs_f32(0.5)); /// assert_eq!(timer.elapsed(), Duration::from_secs_f32(0.5)); /// ``` - fn elapsed(_self: Ref<bevy::time::prelude::Timer>) -> Val<bevy::utils::Duration> { - let output: Val<bevy::utils::Duration> = bevy::time::prelude::Timer::elapsed( + fn elapsed(_self: Ref<bevy::time::prelude::Timer>) -> Val<std::time::Duration> { + let output: Val<std::time::Duration> = bevy::time::prelude::Timer::elapsed( &_self, ) .into(); @@ -218,7 +218,7 @@ impl bevy::time::prelude::Timer { /// Creates a new timer with a given duration. /// See also [`Timer::from_seconds`](Timer::from_seconds). fn new( - duration: Val<bevy::utils::Duration>, + duration: Val<std::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( @@ -268,8 +268,8 @@ impl bevy::time::prelude::Timer { /// timer.tick(Duration::from_secs_f32(0.5)); /// assert_eq!(timer.remaining(), Duration::from_secs_f32(1.5)); /// ``` - fn remaining(_self: Ref<bevy::time::prelude::Timer>) -> Val<bevy::utils::Duration> { - let output: Val<bevy::utils::Duration> = bevy::time::prelude::Timer::remaining( + fn remaining(_self: Ref<bevy::time::prelude::Timer>) -> Val<std::time::Duration> { + let output: Val<std::time::Duration> = bevy::time::prelude::Timer::remaining( &_self, ) .into(); @@ -318,7 +318,7 @@ impl bevy::time::prelude::Timer { /// ``` fn set_duration( mut _self: Mut<bevy::time::prelude::Timer>, - duration: Val<bevy::utils::Duration>, + duration: Val<std::time::Duration>, ) -> () { let output: () = bevy::time::prelude::Timer::set_duration( &mut _self, @@ -341,7 +341,7 @@ impl bevy::time::prelude::Timer { /// ``` fn set_elapsed( mut _self: Mut<bevy::time::prelude::Timer>, - time: Val<bevy::utils::Duration>, + time: Val<std::time::Duration>, ) -> () { let output: () = bevy::time::prelude::Timer::set_elapsed( &mut _self, @@ -493,8 +493,8 @@ impl bevy::time::Stopwatch { /// # See Also /// [`elapsed_secs`](Stopwatch::elapsed_secs) - if an `f32` value is desirable instead. /// [`elapsed_secs_f64`](Stopwatch::elapsed_secs_f64) - if an `f64` is desirable instead. - fn elapsed(_self: Ref<bevy::time::Stopwatch>) -> Val<bevy::utils::Duration> { - let output: Val<bevy::utils::Duration> = bevy::time::Stopwatch::elapsed(&_self) + fn elapsed(_self: Ref<bevy::time::Stopwatch>) -> Val<std::time::Duration> { + let output: Val<std::time::Duration> = bevy::time::Stopwatch::elapsed(&_self) .into(); output } @@ -599,7 +599,7 @@ impl bevy::time::Stopwatch { /// ``` fn set_elapsed( mut _self: Mut<bevy::time::Stopwatch>, - time: Val<bevy::utils::Duration>, + time: Val<std::time::Duration>, ) -> () { let output: () = bevy::time::Stopwatch::set_elapsed( &mut _self, diff --git a/crates/bevy_mod_scripting_functions/src/core.rs b/crates/bevy_mod_scripting_functions/src/core.rs index 08963a02d3..82da20e1ad 100644 --- a/crates/bevy_mod_scripting_functions/src/core.rs +++ b/crates/bevy_mod_scripting_functions/src/core.rs @@ -4,28 +4,28 @@ use std::{collections::HashMap, ops::Deref}; use bevy::prelude::*; use bevy_mod_scripting_core::{ - bindings::{ - function::{ - from::Union, namespace::GlobalNamespace, script_function::DynamicScriptFunctionMut, - }, - script_system::ScriptSystemBuilder, - }, - docgen::info::FunctionInfo, - *, + bindings::{ + function::{ + from::Union, namespace::GlobalNamespace, script_function::DynamicScriptFunctionMut, + }, + script_system::ScriptSystemBuilder, + }, + docgen::info::FunctionInfo, + *, }; use bevy_mod_scripting_derive::script_bindings; use bevy_system_reflection::{ReflectSchedule, ReflectSystem}; use bindings::{ - function::{ - from::{Ref, Val}, - from_ref::FromScriptRef, - into_ref::IntoScriptRef, - script_function::{FunctionCallContext, ScriptFunctionMut}, - }, - pretty_print::DisplayWithWorld, - script_value::ScriptValue, - ReflectReference, ScriptComponentRegistration, ScriptQueryBuilder, ScriptQueryResult, - ScriptResourceRegistration, ScriptTypeRegistration, ThreadWorldContainer, WorldContainer, + function::{ + from::{Ref, Val}, + from_ref::FromScriptRef, + into_ref::IntoScriptRef, + script_function::{FunctionCallContext, ScriptFunctionMut}, + }, + pretty_print::DisplayWithWorld, + script_value::ScriptValue, + ReflectReference, ScriptComponentRegistration, ScriptQueryBuilder, ScriptQueryResult, + ScriptResourceRegistration, ScriptTypeRegistration, ThreadWorldContainer, WorldContainer, }; use error::InteropError; use reflection_extensions::{PartialReflectExt, TypeIdExtensions}; diff --git a/crates/bevy_mod_scripting_functions/src/lib.rs b/crates/bevy_mod_scripting_functions/src/lib.rs index 5f998f4cb4..5d48dc58a6 100644 --- a/crates/bevy_mod_scripting_functions/src/lib.rs +++ b/crates/bevy_mod_scripting_functions/src/lib.rs @@ -15,7 +15,7 @@ impl Plugin for ScriptFunctionsPlugin { register_core_functions(app); // TODO: if bevy ever does this itself we should remove this - app.world_mut().register_component::<Parent>(); + app.world_mut().register_component::<ChildOf>(); app.world_mut().register_component::<Children>(); } } diff --git a/crates/bevy_system_reflection/Cargo.toml b/crates/bevy_system_reflection/Cargo.toml index 95921576f8..5d614ac81a 100644 --- a/crates/bevy_system_reflection/Cargo.toml +++ b/crates/bevy_system_reflection/Cargo.toml @@ -14,7 +14,6 @@ readme = "readme.md" [dependencies] bevy = { workspace = true, default-features = false } dot-writer = "0.1.4" -petgraph = "0.6" [dev-dependencies] diff --git a/crates/bevy_system_reflection/src/lib.rs b/crates/bevy_system_reflection/src/lib.rs index bf7cf158db..e8829d411e 100644 --- a/crates/bevy_system_reflection/src/lib.rs +++ b/crates/bevy_system_reflection/src/lib.rs @@ -1,13 +1,16 @@ //! A visualiser for bevy system schedules, as well as utilities for querying them via reflection -use std::ops::Deref; -use std::{any::TypeId, borrow::Cow}; - -use bevy::ecs::schedule::{ - InternedScheduleLabel, InternedSystemSet, NodeId, Schedule, ScheduleLabel, SystemSet, +use std::{any::TypeId, borrow::Cow, ops::Deref}; + +use bevy::{ + ecs::{ + schedule::{ + InternedScheduleLabel, InternedSystemSet, NodeId, Schedule, ScheduleLabel, SystemSet, + }, + system::{System, SystemInput}, + }, + platform::collections::{HashMap, HashSet}, + reflect::Reflect, }; -use bevy::ecs::system::{System, SystemInput}; -use bevy::reflect::Reflect; -use bevy::utils::hashbrown::{HashMap, HashSet}; use dot_writer::{Attributes, DotWriter}; #[derive(Reflect, Debug, Clone)] @@ -283,7 +286,7 @@ pub fn schedule_to_reflect_graph(schedule: &Schedule) -> ReflectSystemGraph { let dependencies = dependency .all_edges() - .map(|(from, to, _)| Edge { + .map(|(from, to)| Edge { from: ReflectNodeId(from), to: ReflectNodeId(to), }) @@ -291,7 +294,7 @@ pub fn schedule_to_reflect_graph(schedule: &Schedule) -> ReflectSystemGraph { let hierarchy = hierarchy .all_edges() - .map(|(from, to, _)| Edge { + .map(|(from, to)| Edge { from: ReflectNodeId(from), to: ReflectNodeId(to), }) @@ -466,17 +469,11 @@ pub struct Edge { #[cfg(test)] mod test { - use bevy::{ - app::Update, - ecs::{ - schedule::{IntoSystemConfigs, IntoSystemSetConfigs}, - world::World, - }, - }; + use bevy::{app::Update, ecs::world::World, prelude::IntoScheduleConfigs}; - use super::*; + use super::*; - fn system_a() {} + fn system_a() {} fn system_b() {} diff --git a/crates/ladfile_builder/Cargo.toml b/crates/ladfile_builder/Cargo.toml index 6b78ed7b8d..adcc25e745 100644 --- a/crates/ladfile_builder/Cargo.toml +++ b/crates/ladfile_builder/Cargo.toml @@ -16,7 +16,7 @@ readme = "readme.md" bevy_mod_scripting_core = { workspace = true } # I don't think bevy has a top level feature for this :C bevy = { workspace = true } -bevy_reflect = { version = "0.15.3", features = ["documentation"] } +bevy_reflect = { version = "0.16.0", features = ["documentation"] } ladfile = { version = "0.5.0", path = "../ladfile" } regex = "1.11" diff --git a/crates/ladfile_builder/src/lib.rs b/crates/ladfile_builder/src/lib.rs index 9fa1150d6b..3c146b7a9f 100644 --- a/crates/ladfile_builder/src/lib.rs +++ b/crates/ladfile_builder/src/lib.rs @@ -1,34 +1,35 @@ //! Parsing definitions for the LAD (Language Agnostic Decleration) file format. pub mod plugin; -use bevy::{ecs::world::World, utils::HashSet}; +use std::{ + any::TypeId, + borrow::Cow, + cmp::{max, min}, + collections::HashMap, + ffi::OsString, + path::PathBuf, +}; + +use bevy::{ecs::world::World, platform::collections::HashSet}; use bevy_mod_scripting_core::{ - bindings::{ - function::{ - namespace::Namespace, - script_function::{ - DynamicScriptFunction, DynamicScriptFunctionMut, FunctionCallContext, - }, - }, - ReflectReference, - }, - docgen::{ - info::FunctionInfo, - typed_through::{ThroughTypeInfo, TypedWrapperKind, UntypedWrapperKind}, - TypedThrough, - }, - match_by_type, + bindings::{ + function::{ + namespace::Namespace, + script_function::{ + DynamicScriptFunction, DynamicScriptFunctionMut, FunctionCallContext, + }, + }, + ReflectReference, + }, + docgen::{ + info::FunctionInfo, + typed_through::{ThroughTypeInfo, TypedWrapperKind, UntypedWrapperKind}, + TypedThrough, + }, + match_by_type, }; use bevy_reflect::{NamedField, TypeInfo, TypeRegistry, Typed, UnnamedField}; use ladfile::*; -use std::{ - any::TypeId, - borrow::Cow, - cmp::{max, min}, - collections::HashMap, - ffi::OsString, - path::PathBuf, -}; /// We can assume that the types here will be either primitives /// or reflect types, as the rest will be covered by typed wrappers @@ -787,21 +788,21 @@ impl<'t> LadFileBuilder<'t> { #[cfg(test)] mod test { - use bevy_mod_scripting_core::{ - bindings::{ - function::{ - from::Ref, - namespace::{GlobalNamespace, IntoNamespace}, - }, - Union, Val, - }, - docgen::info::GetFunctionInfo, - }; - use bevy_reflect::Reflect; - - use super::*; - - /// normalize line endings etc.. + use bevy_mod_scripting_core::{ + bindings::{ + function::{ + from::Ref, + namespace::{GlobalNamespace, IntoNamespace}, + }, + Union, Val, + }, + docgen::info::GetFunctionInfo, + }; + use bevy_reflect::Reflect; + + use super::*; + + /// normalize line endings etc.. fn normalize_file(file: &mut String) { *file = file.replace("\r\n", "\n"); } diff --git a/crates/ladfile_builder/src/plugin.rs b/crates/ladfile_builder/src/plugin.rs index ef6a3a6773..89942ae47a 100644 --- a/crates/ladfile_builder/src/plugin.rs +++ b/crates/ladfile_builder/src/plugin.rs @@ -3,17 +3,13 @@ use std::path::PathBuf; use bevy::{ - app::{App, Plugin, Startup}, - ecs::{ - reflect::AppTypeRegistry, - system::{Res, Resource}, - world::World, - }, + app::{App, Plugin, Startup}, + ecs::{prelude::Resource, reflect::AppTypeRegistry, system::Res, world::World}, }; use bevy_mod_scripting_core::bindings::{ - function::{namespace::Namespace, script_function::AppScriptFunctionRegistry}, - globals::AppScriptGlobalsRegistry, - IntoNamespace, MarkAsCore, MarkAsGenerated, MarkAsSignificant, + function::{namespace::Namespace, script_function::AppScriptFunctionRegistry}, + globals::AppScriptGlobalsRegistry, + IntoNamespace, MarkAsCore, MarkAsGenerated, MarkAsSignificant, }; use ladfile::{default_importance, LadTypeKind}; diff --git a/crates/languages/bevy_mod_scripting_lua/Cargo.toml b/crates/languages/bevy_mod_scripting_lua/Cargo.toml index 9ca8352a0a..45aa8aee47 100644 --- a/crates/languages/bevy_mod_scripting_lua/Cargo.toml +++ b/crates/languages/bevy_mod_scripting_lua/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "bevy_mod_scripting_lua" -version = "0.12.0" +version = "0.13.0" authors = ["Maksymilian Mozolewski <makspl17@gmail.com>"] edition = "2021" license = "MIT OR Apache-2.0" @@ -40,10 +40,6 @@ path = "src/lib.rs" bevy = { workspace = true, default-features = false } bevy_mod_scripting_core = { workspace = true, features = ["mlua_impls"] } mlua = { version = "0.10", features = ["vendored", "send", "macros"] } -parking_lot = "0.12.1" -uuid = "1.1" -smol_str = "0.2.2" -smallvec = "1.13" profiling = { workspace = true } [lints] diff --git a/crates/languages/bevy_mod_scripting_lua/src/lib.rs b/crates/languages/bevy_mod_scripting_lua/src/lib.rs index 473c98d24c..33df2015d0 100644 --- a/crates/languages/bevy_mod_scripting_lua/src/lib.rs +++ b/crates/languages/bevy_mod_scripting_lua/src/lib.rs @@ -72,7 +72,7 @@ impl Default for LuaScriptingPlugin { Ok(()) }, - |_script_id, context: &mut Lua| { + |_script_id, context| { // set static globals let world = ThreadWorldContainer.try_get_world()?; let globals_registry = diff --git a/crates/languages/bevy_mod_scripting_rhai/Cargo.toml b/crates/languages/bevy_mod_scripting_rhai/Cargo.toml index 2c2789922d..64e10ee089 100644 --- a/crates/languages/bevy_mod_scripting_rhai/Cargo.toml +++ b/crates/languages/bevy_mod_scripting_rhai/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "bevy_mod_scripting_rhai" -version = "0.12.0" +version = "0.13.0" authors = ["Maksymilian Mozolewski <makspl17@gmail.com>"] edition = "2021" license = "MIT OR Apache-2.0" diff --git a/crates/languages/bevy_mod_scripting_rhai/src/lib.rs b/crates/languages/bevy_mod_scripting_rhai/src/lib.rs index a1a477cf5e..c72d6ca7a8 100644 --- a/crates/languages/bevy_mod_scripting_rhai/src/lib.rs +++ b/crates/languages/bevy_mod_scripting_rhai/src/lib.rs @@ -3,31 +3,30 @@ use std::ops::Deref; use bevy::{ - app::Plugin, - ecs::{entity::Entity, world::World}, + app::Plugin, + ecs::{entity::Entity, world::World}, }; use bevy_mod_scripting_core::{ - asset::Language, - bindings::{ - function::namespace::Namespace, globals::AppScriptGlobalsRegistry, - script_value::ScriptValue, ThreadWorldContainer, WorldContainer, - }, - context::{ContextBuilder, ContextInitializer, ContextPreHandlingInitializer}, - error::ScriptError, - event::CallbackLabel, - reflection_extensions::PartialReflectExt, - runtime::RuntimeSettings, - script::ScriptId, - IntoScriptPluginParams, ScriptingPlugin, + asset::Language, + bindings::{ + function::namespace::Namespace, globals::AppScriptGlobalsRegistry, + script_value::ScriptValue, ThreadWorldContainer, WorldContainer, + }, + context::{ContextBuilder, ContextInitializer, ContextPreHandlingInitializer}, + error::ScriptError, + event::CallbackLabel, + reflection_extensions::PartialReflectExt, + runtime::RuntimeSettings, + script::ScriptId, + IntoScriptPluginParams, ScriptingPlugin, }; use bindings::{ - reference::{ReservedKeyword, RhaiReflectReference, RhaiStaticReflectReference}, - script_value::{FromDynamic, IntoDynamic}, + reference::{ReservedKeyword, RhaiReflectReference, RhaiStaticReflectReference}, + script_value::{FromDynamic, IntoDynamic}, }; use parking_lot::RwLock; -use rhai::{CallFnOptions, Dynamic, Engine, EvalAltResult, Scope, AST}; - pub use rhai; +use rhai::{CallFnOptions, Dynamic, Engine, EvalAltResult, Scope, AST}; /// Bindings for rhai. pub mod bindings; @@ -71,7 +70,7 @@ impl Default for RhaiScriptingPlugin { scripting_plugin: ScriptingPlugin { context_assignment_strategy: Default::default(), runtime_settings: RuntimeSettings { - initializers: vec![|runtime: &RhaiRuntime| { + initializers: vec![|runtime| { let mut engine = runtime.write(); engine.set_max_expr_depths(999, 999); engine.build_type::<RhaiReflectReference>(); @@ -86,14 +85,14 @@ impl Default for RhaiScriptingPlugin { reload: rhai_context_reload, }, context_initializers: vec![ - |_, context: &mut RhaiScriptContext| { + |_, context| { context.scope.set_or_push( "world", RhaiStaticReflectReference(std::any::TypeId::of::<World>()), ); Ok(()) }, - |_, context: &mut RhaiScriptContext| { + |_, context| { // initialize global functions let world = ThreadWorldContainer.try_get_world()?; let globals_registry = @@ -301,9 +300,9 @@ pub fn rhai_callback_handler( #[cfg(test)] mod test { - use super::*; + use super::*; - #[test] + #[test] fn test_reload_doesnt_overwrite_old_context() { let runtime = RhaiRuntime::new(Engine::new()); let script_id = ScriptId::from("asd.rhai"); 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 fa039361e7..ae69ed2082 100644 --- a/crates/testing_crates/script_integration_test_harness/src/lib.rs +++ b/crates/testing_crates/script_integration_test_harness/src/lib.rs @@ -1,40 +1,40 @@ pub mod test_functions; use std::{ - marker::PhantomData, - path::PathBuf, - time::{Duration, Instant}, + marker::PhantomData, + path::PathBuf, + time::{Duration, Instant}, }; use bevy::{ - app::{Last, Plugin, PostUpdate, Startup, Update}, - asset::{AssetServer, Handle}, - ecs::{ - component::Component, - event::{Event, Events}, - schedule::{IntoSystemConfigs, SystemConfigs}, - system::{IntoSystem, Local, Res, Resource, SystemState}, - world::{Command, FromWorld, Mut}, - }, - log::Level, - prelude::{Entity, World}, - reflect::{Reflect, TypeRegistry}, - utils::tracing, + app::{Last, Plugin, PostUpdate, Startup, Update}, + asset::{AssetServer, Handle}, + ecs::{ + component::Component, + event::{Event, Events}, + prelude::{Command, Resource}, + schedule::ScheduleConfigs, + system::{BoxedSystem, InfallibleSystemWrapper, IntoSystem, Local, Res, SystemState}, + world::{FromWorld, Mut}, + }, + log::{tracing, tracing::event, Level}, + prelude::{BevyError, Entity, IntoScheduleConfigs, World}, + reflect::{Reflect, TypeRegistry}, }; use bevy_mod_scripting_core::{ - asset::ScriptAsset, - bindings::{ - pretty_print::DisplayWithWorld, script_value::ScriptValue, CoreScriptGlobalsPlugin, - ReflectAccessId, WorldAccessGuard, WorldGuard, - }, - callback_labels, - commands::CreateOrUpdateScript, - error::{InteropError, ScriptError}, - event::{IntoCallbackLabel, ScriptErrorEvent}, - extractors::{HandlerContext, WithWorldGuard}, - handler::handle_script_errors, - script::ScriptId, - BMSScriptingInfrastructurePlugin, IntoScriptPluginParams, ScriptingPlugin, + asset::ScriptAsset, + bindings::{ + pretty_print::DisplayWithWorld, script_value::ScriptValue, CoreScriptGlobalsPlugin, + ReflectAccessId, WorldAccessGuard, WorldGuard, + }, + callback_labels, + commands::CreateOrUpdateScript, + error::{InteropError, ScriptError}, + event::{IntoCallbackLabel, ScriptErrorEvent}, + extractors::{HandlerContext, WithWorldGuard}, + handler::handle_script_errors, + script::ScriptId, + BMSScriptingInfrastructurePlugin, IntoScriptPluginParams, ScriptingPlugin, }; use bevy_mod_scripting_functions::ScriptFunctionsPlugin; use criterion::{measurement::Measurement, BatchSize}; @@ -55,9 +55,12 @@ struct TestCallbackBuilder<P: IntoScriptPluginParams, L: IntoCallbackLabel> { } impl<L: IntoCallbackLabel, P: IntoScriptPluginParams> TestCallbackBuilder<P, L> { - fn build(script_id: impl Into<ScriptId>, expect_response: bool) -> SystemConfigs { + fn build( + script_id: impl Into<ScriptId>, + expect_response: bool, + ) -> ScheduleConfigs<BoxedSystem<(), Result<(), BevyError>>> { let script_id = script_id.into(); - IntoSystem::into_system( + let system = Box::new(InfallibleSystemWrapper::new(IntoSystem::into_system( move |world: &mut World, system_state: &mut SystemState<WithWorldGuard<HandlerContext<P>>>| { let with_guard = system_state.get_mut(world); @@ -65,9 +68,9 @@ impl<L: IntoCallbackLabel, P: IntoScriptPluginParams> TestCallbackBuilder<P, L> system_state.apply(world); }, - ) - .with_name(L::into_callback_label().to_string()) - .into_configs() + ).with_name(L::into_callback_label().to_string()))); + + system.into_configs() } } @@ -130,12 +133,12 @@ pub fn make_test_lua_plugin() -> bevy_mod_scripting_lua::LuaScriptingPlugin { #[cfg(feature = "rhai")] pub fn make_test_rhai_plugin() -> bevy_mod_scripting_rhai::RhaiScriptingPlugin { use bevy_mod_scripting_core::{ - bindings::{ThreadWorldContainer, WorldContainer}, - ConfigureScriptPlugin, + bindings::{ThreadWorldContainer, WorldContainer}, + ConfigureScriptPlugin, }; use bevy_mod_scripting_rhai::{ - rhai::{Dynamic, EvalAltResult, FnPtr, NativeCallContext}, - RhaiScriptingPlugin, + rhai::{Dynamic, EvalAltResult, FnPtr, NativeCallContext}, + RhaiScriptingPlugin, }; RhaiScriptingPlugin::default().add_runtime_initializer(|runtime| { @@ -341,7 +344,7 @@ pub fn run_lua_benchmark<M: criterion::measurement::Measurement>( label: &str, criterion: &mut criterion::BenchmarkGroup<M>, ) -> Result<(), String> { - use bevy::{log::Level, utils::tracing}; + use bevy::log::Level; use bevy_mod_scripting_lua::mlua::Function; let plugin = make_test_lua_plugin(); @@ -373,7 +376,7 @@ pub fn run_rhai_benchmark<M: criterion::measurement::Measurement>( label: &str, criterion: &mut criterion::BenchmarkGroup<M>, ) -> Result<(), String> { - use bevy::{log::Level, utils::tracing}; + use bevy::log::Level; use bevy_mod_scripting_rhai::rhai::Dynamic; let plugin = make_test_rhai_plugin(); @@ -418,7 +421,7 @@ where F: Fn(&mut P::C, &P::R, &str, &mut criterion::BenchmarkGroup<M>) -> Result<(), String>, { use bevy_mod_scripting_core::bindings::{ - ThreadWorldContainer, WorldAccessGuard, WorldContainer, + ThreadWorldContainer, WorldAccessGuard, WorldContainer, }; let mut app = setup_integration_test(|_, _| {}); @@ -587,7 +590,7 @@ pub fn perform_benchmark_with_generator< ) }, |(i, w)| { - bevy::utils::tracing::event!(bevy::log::Level::TRACE, "profiling_iter {}", label); + event!(bevy::log::Level::TRACE, "profiling_iter {}", label); bench_fn(w, i) }, batch_size, diff --git a/crates/testing_crates/test_utils/src/test_data.rs b/crates/testing_crates/test_utils/src/test_data.rs index 030f7dc020..6bc5d1eaba 100644 --- a/crates/testing_crates/test_utils/src/test_data.rs +++ b/crates/testing_crates/test_utils/src/test_data.rs @@ -1,12 +1,13 @@ -use std::alloc::Layout; -use std::collections::HashMap; +use std::{alloc::Layout, collections::HashMap}; -use bevy::asset::AssetPlugin; -use bevy::diagnostic::DiagnosticsPlugin; -use bevy::ecs::{component::*, world::World}; -use bevy::log::LogPlugin; -use bevy::prelude::*; -use bevy::reflect::*; +use bevy::{ + asset::AssetPlugin, + diagnostic::DiagnosticsPlugin, + ecs::{component::*, world::World}, + log::LogPlugin, + prelude::*, + reflect::*, +}; /// Test component with Reflect and ReflectComponent registered #[derive(Component, Reflect, PartialEq, Eq, Debug)] @@ -312,6 +313,8 @@ fn init_world<F: FnOnce(&mut World, &mut TypeRegistry)>(world: &mut World, init: StorageType::Table, Layout::new::<usize>(), None, + true, + ComponentCloneBehavior::Default, )) }; } @@ -346,7 +349,6 @@ pub fn setup_integration_test<F: FnOnce(&mut World, &mut TypeRegistry)>(init: F) app.add_plugins(( MinimalPlugins, AssetPlugin::default(), - HierarchyPlugin, DiagnosticsPlugin, LogPlugin { filter: log_level, @@ -358,9 +360,9 @@ pub fn setup_integration_test<F: FnOnce(&mut World, &mut TypeRegistry)>(init: F) #[cfg(test)] mod test { - use super::*; + use super::*; - #[test] + #[test] fn setup_works() { setup_world(|_, _| {}); } diff --git a/examples/game_of_life.rs b/examples/game_of_life.rs index 325b4a4db9..a65b907596 100644 --- a/examples/game_of_life.rs +++ b/examples/game_of_life.rs @@ -280,7 +280,7 @@ pub fn update_rendered_state( let old_rendered_state = assets .get_mut(&old_rendered_state.image) .expect("World is not setup correctly"); - old_rendered_state.data = new_state.cells.clone(); + old_rendered_state.data = Some(new_state.cells.clone()); } } @@ -301,7 +301,7 @@ pub fn send_on_click( ) { if buttons.just_pressed(MouseButton::Left) { let window = q_windows.single(); - let pos = window.cursor_position().unwrap_or_default(); + let pos = window.unwrap().cursor_position().unwrap_or_default(); let x = pos.x as u32; let y = pos.y as u32; events.send(ScriptCallbackEvent::new_for_all( diff --git a/src/lib.rs b/src/lib.rs index a880540a76..5860ae083c 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -1,17 +1,17 @@ #![doc=include_str!("../readme.md")] pub mod core { - pub use bevy_mod_scripting_core::*; + pub use bevy_mod_scripting_core::*; } #[cfg(feature = "lua")] pub mod lua { - pub use bevy_mod_scripting_lua::*; + pub use bevy_mod_scripting_lua::*; } #[cfg(feature = "rhai")] pub mod rhai { - pub use bevy_mod_scripting_rhai::*; + pub use bevy_mod_scripting_rhai::*; } // #[cfg(feature = "rune")] @@ -21,7 +21,7 @@ pub mod rhai { use bevy::app::plugin_group; use bevy_mod_scripting_core::{ - bindings::CoreScriptGlobalsPlugin, BMSScriptingInfrastructurePlugin, + bindings::CoreScriptGlobalsPlugin, BMSScriptingInfrastructurePlugin, }; pub use bevy_mod_scripting_derive::*; pub use bevy_mod_scripting_functions::*; From f1a200be7f0e71ddd2d91bcdd72452eff51b93b2 Mon Sep 17 00:00:00 2001 From: Alex Parlett <alexparlett@proton.me> Date: Mon, 26 May 2025 11:54:28 +0100 Subject: [PATCH 02/17] Fix compile issues not seen when using as branch --- Cargo.toml | 3 +++ .../src/bindings/reference.rs | 2 +- .../src/bindings/script_system.rs | 2 +- .../src/bindings/world.rs | 4 ++-- .../bevy_mod_scripting_core/src/extractors.rs | 6 ++--- .../src/reflection_extensions.rs | 23 ++++++++++++++----- .../bevy_mod_scripting_functions/Cargo.toml | 3 +++ .../src/bevy_bindings/bevy_math.rs | 2 +- crates/bevy_system_reflection/Cargo.toml | 2 +- 9 files changed, 32 insertions(+), 15 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 8bd84b57bd..97cba286e6 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -84,6 +84,9 @@ bevy_mod_scripting_derive = { workspace = true } [workspace.dependencies] profiling = { version = "1.0" } +bevy_math = { version = "0.16.0", default-features = false } +bevy_reflect = { version = "0.16.0", default-features = false } +bevy_input = { version = "0.16.0", default-features = false } bevy = { version = "0.16.0", default-features = false } bevy_mod_scripting_core = { path = "crates/bevy_mod_scripting_core", version = "0.13.0" } bevy_mod_scripting_functions = { path = "crates/bevy_mod_scripting_functions", version = "0.13.0", default-features = false } diff --git a/crates/bevy_mod_scripting_core/src/bindings/reference.rs b/crates/bevy_mod_scripting_core/src/bindings/reference.rs index 0e1fe9396f..d573154d7b 100644 --- a/crates/bevy_mod_scripting_core/src/bindings/reference.rs +++ b/crates/bevy_mod_scripting_core/src/bindings/reference.rs @@ -214,7 +214,7 @@ impl ReflectReference { self.with_reflect(world.clone(), |r| { <dyn PartialReflect>::from_reflect_or_clone(r, world.clone()) - }) + })? } /// The way to access the value of the reference, that is the pointed-to value. 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 323a6b77e7..5ccc3c0a56 100644 --- a/crates/bevy_mod_scripting_core/src/bindings/script_system.rs +++ b/crates/bevy_mod_scripting_core/src/bindings/script_system.rs @@ -28,7 +28,7 @@ use bevy::{ query::{Access, FilteredAccess, FilteredAccessSet, QueryState}, reflect::AppTypeRegistry, schedule::{ - SystemSet, Infallible, graph::GraphInfo, + SystemSet, Infallible }, system::{IntoSystem, System, SystemParamValidationError}, world::{unsafe_world_cell::UnsafeWorldCell, World}, diff --git a/crates/bevy_mod_scripting_core/src/bindings/world.rs b/crates/bevy_mod_scripting_core/src/bindings/world.rs index 67a5b96c04..7c061d2d19 100644 --- a/crates/bevy_mod_scripting_core/src/bindings/world.rs +++ b/crates/bevy_mod_scripting_core/src/bindings/world.rs @@ -818,10 +818,10 @@ impl WorldAccessGuard<'_> { // try to construct type from reflect // TODO: it would be nice to have a <dyn PartialReflect>::from_reflect_with_fallback equivalent, that does exactly that // only using this as it's already there and convenient, the clone variant hitting will be confusing to end users - Ok(<dyn PartialReflect>::from_reflect_or_clone( + <dyn PartialReflect>::from_reflect_or_clone( dynamic.as_ref(), self.clone(), - )) + ) } /// Spawns a new entity in the world diff --git a/crates/bevy_mod_scripting_core/src/extractors.rs b/crates/bevy_mod_scripting_core/src/extractors.rs index d5ff141a16..5b1f0c9d12 100644 --- a/crates/bevy_mod_scripting_core/src/extractors.rs +++ b/crates/bevy_mod_scripting_core/src/extractors.rs @@ -11,7 +11,7 @@ use bevy::{ event::{Event, EventCursor, EventIterator, Events}, query::{Access, AccessConflicts}, storage::SparseSetIndex, - system::{Local, SystemParam, SystemState}, + system::{Local, SystemParam, SystemState, SystemParamValidationError}, world::World, }, prelude::Resource @@ -368,8 +368,8 @@ unsafe impl<T: SystemParam> SystemParam for WithWorldGuard<'_, '_, T> { state: &Self::State, system_meta: &bevy::ecs::system::SystemMeta, world: bevy::ecs::world::unsafe_world_cell::UnsafeWorldCell, - ) -> bool { - T::validate_param(&state.0, system_meta, world).is_ok() + ) -> Result<(), SystemParamValidationError> { + T::validate_param(&state.0, system_meta, world) } } diff --git a/crates/bevy_mod_scripting_core/src/reflection_extensions.rs b/crates/bevy_mod_scripting_core/src/reflection_extensions.rs index e923c33b3f..1ff32fb425 100644 --- a/crates/bevy_mod_scripting_core/src/reflection_extensions.rs +++ b/crates/bevy_mod_scripting_core/src/reflection_extensions.rs @@ -4,11 +4,14 @@ use crate::{ bindings::{ReflectReference, WorldGuard}, error::InteropError, }; -use bevy::reflect::{PartialReflect, Reflect, ReflectFromReflect, ReflectMut, TypeInfo}; +use bevy::reflect::{ + PartialReflect, Reflect, ReflectFromReflect, ReflectMut, TypeInfo, +}; use std::{ any::{Any, TypeId}, cmp::max, }; + /// Extension trait for [`PartialReflect`] providing additional functionality for working with specific types. pub trait PartialReflectExt { /// Try to get a reference to the given key in an underyling map, if the type is a map. @@ -30,7 +33,7 @@ pub trait PartialReflectExt { fn from_reflect_or_clone( reflect: &dyn PartialReflect, world: WorldGuard, - ) -> Box<dyn PartialReflect>; + ) -> Result<Box<dyn PartialReflect>, InteropError>; /// Allocate a new boxed reflect reference from a boxed reflect. fn allocate(boxed: Box<dyn Reflect>, world: WorldGuard) -> ReflectReference; @@ -424,11 +427,19 @@ impl<T: PartialReflect + ?Sized> PartialReflectExt for T { fn from_reflect_or_clone( reflect: &dyn PartialReflect, world: WorldGuard, - ) -> Box<dyn PartialReflect> { + ) -> Result<Box<dyn PartialReflect>, InteropError> { // try from reflect match <dyn PartialReflect>::from_reflect(reflect, world.clone()) { - Ok(v) => v.into_partial_reflect(), - Err(_) => reflect.clone_value(), + Ok(v) => Ok(v.into_partial_reflect()), + Err(_) => reflect + .reflect_clone() + .map(|v| v.into_partial_reflect()) + .map_err(|e| { + InteropError::failed_from_reflect( + reflect.get_represented_type_info().map(|ti| ti.type_id()), + e.to_string(), + ) + }), } } @@ -667,7 +678,7 @@ mod test { let mut map = std::collections::HashMap::<i32, std::collections::HashMap<i32, i32>>::default(); let value = DynamicMap::from_iter(vec![(1, 2), (2, 3), (3, 4)]); - let value_ref: Box<dyn PartialReflect> = Box::new(value.clone_dynamic()); + let value_ref: Box<dyn PartialReflect> = Box::new(value.to_dynamic_map()); map.insert(1, std::collections::HashMap::<i32, i32>::default()); map.insert(2, std::collections::HashMap::<i32, i32>::default()); map.insert(3, std::collections::HashMap::<i32, i32>::default()); diff --git a/crates/bevy_mod_scripting_functions/Cargo.toml b/crates/bevy_mod_scripting_functions/Cargo.toml index 7aa2f4ede9..18433d6297 100644 --- a/crates/bevy_mod_scripting_functions/Cargo.toml +++ b/crates/bevy_mod_scripting_functions/Cargo.toml @@ -28,6 +28,9 @@ rhai_bindings = ["bevy_mod_scripting_rhai"] [dependencies] bevy = { workspace = true } +bevy_math = { workspace = true, features = ["curve"]} +bevy_reflect = { workspace = true, features = ["smol_str"]} +bevy_input = { workspace = true, features = ["smol_str"]} profiling = { workspace = true } uuid = "1.11" smol_str = "0.2.2" 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 58ae59b470..5d0a60944c 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 @@ -4560,7 +4560,7 @@ impl bevy::math::bounding::BoundingSphereCast { bms_core_path = "bevy_mod_scripting_core", generated )] -impl bevy::math::curve::interval::Interval { +impl bevy::math::curve::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( diff --git a/crates/bevy_system_reflection/Cargo.toml b/crates/bevy_system_reflection/Cargo.toml index 5d614ac81a..675d8929f3 100644 --- a/crates/bevy_system_reflection/Cargo.toml +++ b/crates/bevy_system_reflection/Cargo.toml @@ -12,7 +12,7 @@ categories = ["game-development"] readme = "readme.md" [dependencies] -bevy = { workspace = true, default-features = false } +bevy = { workspace = true, default-features = false, features = ["bevy_log"]} dot-writer = "0.1.4" From 802c864b1ce5df5a85c7d009117f5ab30c3847b7 Mon Sep 17 00:00:00 2001 From: Alex Parlett <alexparlett@proton.me> Date: Thu, 29 May 2025 05:22:33 +0100 Subject: [PATCH 03/17] Update bevy_console --- Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Cargo.toml b/Cargo.toml index 97cba286e6..a057f98c39 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -107,7 +107,7 @@ test_utils = { workspace = true } libtest-mimic = "0.8" tracing-tracy = "0.11" regex = "1.11" -bevy_console = { git = "https://github.com/RichoDemus/bevy-console" } +bevy_console = "0.14" [workspace] members = [ From 5f9fb522be07f4a1028e536b1513bd263a1ce503 Mon Sep 17 00:00:00 2001 From: makspll <makspl17@gmail.com> Date: Sat, 5 Jul 2025 11:41:43 +0100 Subject: [PATCH 04/17] make codegen work --- codegen_bevy_features.txt | 1 + crates/bevy_api_gen/Cargo.bootstrap.toml | 4 +- crates/bevy_api_gen/Cargo.toml | 10 +- crates/bevy_api_gen/src/context.rs | 24 +- .../bevy_api_gen/src/modifying_file_loader.rs | 12 +- .../bevy_api_gen/src/passes/cache_traits.rs | 18 +- .../src/bevy_bindings/bevy_ecs.rs | 252 +- .../src/bevy_bindings/bevy_input.rs | 942 +- .../src/bevy_bindings/bevy_math.rs | 1544 +- .../src/bevy_bindings/bevy_reflect.rs | 12789 +++++++++------- .../src/bevy_bindings/bevy_time.rs | 130 +- .../src/bevy_bindings/bevy_transform.rs | 117 +- crates/xtask/src/main.rs | 9 +- 13 files changed, 8284 insertions(+), 7568 deletions(-) create mode 100644 codegen_bevy_features.txt diff --git a/codegen_bevy_features.txt b/codegen_bevy_features.txt new file mode 100644 index 0000000000..f14d74c7a3 --- /dev/null +++ b/codegen_bevy_features.txt @@ -0,0 +1 @@ +bevy_asset,bevy_animation,bevy_core_pipeline,bevy_ui,bevy_pbr,bevy_render,bevy_text,bevy_sprite,file_watcher,multi_threaded,std,async_executor \ No newline at end of file diff --git a/crates/bevy_api_gen/Cargo.bootstrap.toml b/crates/bevy_api_gen/Cargo.bootstrap.toml index d34f8c99eb..04b6cf4532 100644 --- a/crates/bevy_api_gen/Cargo.bootstrap.toml +++ b/crates/bevy_api_gen/Cargo.bootstrap.toml @@ -6,8 +6,8 @@ edition = "2021" [dependencies] bevy_mod_scripting_core = { path = "{{BMS_CORE_PATH}}" } -bevy_reflect = { version = "0.15.3", features = [ - "bevy", +bevy_reflect = { version = "0.16.0", features = [ + "smol_str", "glam", "petgraph", "smallvec", diff --git a/crates/bevy_api_gen/Cargo.toml b/crates/bevy_api_gen/Cargo.toml index e84c96e17d..9b0c238847 100644 --- a/crates/bevy_api_gen/Cargo.toml +++ b/crates/bevy_api_gen/Cargo.toml @@ -30,11 +30,11 @@ codegen-units = 8 incremental = false debug = false -[rust-analyzer.rustc] -source = "discover" +# [rust-analyzer.rustc] +# source = "discover" -[package.metadata.rust-analyzer] -rustc_private = true +# [package.metadata.rust-analyzer] +# rustc_private = true [dependencies] log = "0.4" @@ -50,7 +50,7 @@ strum = { version = "0.26", features = ["derive"] } include_dir = "0.7" prettyplease = "0.2" convert_case = "0.6" -syn = { version = "2", features = ["parsing"], no-default-features = true } +syn = { version = "2", features = ["parsing"], default-features = false } itertools = "0.12" chrono = "0.4" diff --git a/crates/bevy_api_gen/src/context.rs b/crates/bevy_api_gen/src/context.rs index 8ee79de8bb..27f8979fda 100644 --- a/crates/bevy_api_gen/src/context.rs +++ b/crates/bevy_api_gen/src/context.rs @@ -94,7 +94,7 @@ pub(crate) const DEF_PATHS_REFLECT: [&str; 2] = ["bevy_reflect::PartialReflect", "reflect::PartialReflect"]; pub(crate) const DEF_PATHS_GET_TYPE_REGISTRATION: [&str; 2] = [ "bevy_reflect::GetTypeRegistration", - "reflect::GetTypeRegistration", + "type_registry::GetTypeRegistration", ]; /// A collection of traits which we search for in the codebase, some are included purely for the methods they provide, @@ -132,12 +132,26 @@ pub(crate) struct CachedTraits { } impl CachedTraits { - pub(crate) fn has_all_bms_traits(&self) -> bool { - self.bms_into_script.is_some() && self.bms_from_script.is_some() + pub(crate) fn missing_bms_traits(&self) -> Vec<&'static str> { + let mut missing = Vec::new(); + if self.bms_into_script.is_none() { + missing.extend(DEF_PATHS_BMS_INTO_SCRIPT); + } + if self.bms_from_script.is_none() { + missing.extend(DEF_PATHS_BMS_FROM_SCRIPT); + } + missing } - pub(crate) fn has_all_bevy_traits(&self) -> bool { - self.bevy_reflect_reflect.is_some() && self.bevy_reflect_get_type_registration.is_some() + pub(crate) fn missing_bevy_traits(&self) -> Vec<&'static str> { + let mut missing = Vec::new(); + if self.bevy_reflect_reflect.is_none() { + missing.extend(DEF_PATHS_REFLECT); + } + if self.bevy_reflect_get_type_registration.is_none() { + missing.extend(DEF_PATHS_GET_TYPE_REGISTRATION); + } + missing } // pub(crate) fn has_all_std_source_traits(&self) -> bool { diff --git a/crates/bevy_api_gen/src/modifying_file_loader.rs b/crates/bevy_api_gen/src/modifying_file_loader.rs index c0028179e6..4a302adf68 100644 --- a/crates/bevy_api_gen/src/modifying_file_loader.rs +++ b/crates/bevy_api_gen/src/modifying_file_loader.rs @@ -27,9 +27,15 @@ impl FileLoader for ModifyingFileLoader { ); RealFileLoader.read_file(path).map(|mut f| { // we make it pub so in case we are re-exporting this crate we won't run into private re-export issues - - for crate_ in &["bevy_reflect", "bevy_mod_scripting_core"] { - if !f.contains(&format!("extern crate {crate_}")) { + for (crate_, excluded_files) in &[ + ("bevy_reflect", vec!["crates/bevy_reflect/src/lib.rs"]), + ("bevy_mod_scripting_core", vec![]), + ] { + if !f.contains(&format!("extern crate {crate_}")) + && !excluded_files + .iter() + .any(|s| path.to_str().unwrap().contains(s)) + { if f.contains(&format!("pub use {crate_}")) { f.push_str(&format!( "#[allow(unused_extern_crates)] pub extern crate {crate_};" diff --git a/crates/bevy_api_gen/src/passes/cache_traits.rs b/crates/bevy_api_gen/src/passes/cache_traits.rs index d912591165..8ae7b90ca0 100644 --- a/crates/bevy_api_gen/src/passes/cache_traits.rs +++ b/crates/bevy_api_gen/src/passes/cache_traits.rs @@ -8,7 +8,7 @@ use crate::{ DEF_PATHS_GET_TYPE_REGISTRATION, DEF_PATHS_REFLECT, STD_SOURCE_TRAITS, }; -fn dump_traits(tcx: &TyCtxt) -> String{ +fn dump_traits(tcx: &TyCtxt) -> String { let mut buffer = String::new(); for t in tcx.all_traits() { buffer.push_str(&tcx.def_path_str(t)); @@ -43,20 +43,24 @@ pub(crate) fn cache_traits(ctxt: &mut BevyCtxt<'_>, _args: &Args) -> bool { } } - if !ctxt.cached_traits.has_all_bms_traits() { + let missing_bevy_traits = ctxt.cached_traits.missing_bevy_traits(); + if !missing_bevy_traits.is_empty() { panic!( - "Could not find all bms traits in crate: {}. Available traits: {}", + "Could not find traits: [{}] in crate: {}, did bootstrapping go wrong? Available traits: {}", + missing_bevy_traits.join(", "), tcx.crate_name(LOCAL_CRATE), dump_traits(tcx) - ) + ); } - if !ctxt.cached_traits.has_all_bevy_traits() { + let missing_bms_traits = ctxt.cached_traits.missing_bms_traits(); + if !missing_bms_traits.is_empty() { panic!( - "Could not find all reflect traits in crate: {}, did bootstrapping go wrong?. Available traits: {}", + "Could not find traits: [{}] in crate: {}, did bootstrapping go wrong? Available traits: {}", + missing_bms_traits.join(", "), tcx.crate_name(LOCAL_CRATE), dump_traits(tcx) - ) + ); } // some crates specifically do not have std in scope via `#![no_std]` which means we do not care about these traits diff --git a/crates/bevy_mod_scripting_functions/src/bevy_bindings/bevy_ecs.rs b/crates/bevy_mod_scripting_functions/src/bevy_bindings/bevy_ecs.rs index aabe3ae722..c752fdbf71 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 @@ -19,23 +19,6 @@ pub struct BevyEcsScriptingPlugin; 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 std::clone::Clone>::clone( - &_self, - ) - .into(); - output - } - fn eq( - _self: Ref<bevy::ecs::entity::Entity>, - other: Ref<bevy::ecs::entity::Entity>, - ) -> bool { - let output: bool = <bevy::ecs::entity::Entity as std::cmp::PartialEq< - bevy::ecs::entity::Entity, - >>::eq(&_self, &other) - .into(); - output - } /// 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 @@ -88,6 +71,61 @@ impl bevy::ecs::entity::Entity { output } } +#[script_bindings( + remote, + name = "child_of_functions", + bms_core_path = "bevy_mod_scripting_core", + generated +)] +impl bevy::ecs::hierarchy::ChildOf { + /// 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 + } + /// 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 + } +} +#[script_bindings( + remote, + name = "children_functions", + bms_core_path = "bevy_mod_scripting_core", + generated +)] +impl bevy::ecs::hierarchy::Children { + /// 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 {} #[script_bindings( remote, name = "on_add_functions", @@ -123,32 +161,6 @@ impl bevy::ecs::world::OnReplace {} 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 std::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 std::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 std::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()) @@ -168,35 +180,46 @@ impl bevy::ecs::component::ComponentId { } #[script_bindings( remote, - name = "tick_functions", + name = "default_query_filters_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 std::cmp::Eq>::assert_receiver_is_total_eq( - &_self, - ) +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 } - 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 std::clone::Clone>::clone( - &_self, + /// 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 } - fn eq( - _self: Ref<bevy::ecs::component::Tick>, - other: Ref<bevy::ecs::component::Tick>, - ) -> bool { - let output: bool = <bevy::ecs::component::Tick as std::cmp::PartialEq< - bevy::ecs::component::Tick, - >>::eq(&_self, &other) - .into(); - output - } +} +#[script_bindings( + remote, + name = "tick_functions", + bms_core_path = "bevy_mod_scripting_core", + generated +)] +impl bevy::ecs::component::Tick { /// 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(); @@ -238,15 +261,6 @@ impl bevy::ecs::component::Tick { 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 std::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( @@ -288,7 +302,7 @@ impl bevy::ecs::component::ComponentTicks { output } /// Manually sets the change tick. - /// This is normally done automatically via the [`DerefMut`](std::ops::DerefMut) implementation + /// This is normally done automatically via the [`DerefMut`] implementation /// on [`Mut<T>`](crate::change_detection::Mut), [`ResMut<T>`](crate::change_detection::ResMut), etc. /// However, components and resources that make use of interior mutability might require manual updates. /// # Example @@ -312,30 +326,49 @@ impl bevy::ecs::component::ComponentTicks { } #[script_bindings( remote, - name = "identifier_functions", + name = "entity_hash_set_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 std::clone::Clone>::clone( - &_self, - ) +impl bevy::ecs::entity::hash_set::EntityHashSet { + /// 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 } - fn eq( - _self: Ref<bevy::ecs::identifier::Identifier>, - other: Ref<bevy::ecs::identifier::Identifier>, - ) -> bool { - let output: bool = <bevy::ecs::identifier::Identifier as std::cmp::PartialEq< - bevy::ecs::identifier::Identifier, - >>::eq(&_self, &other) + /// 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 { /// Convert a `u64` into an [`Identifier`]. /// # Panics /// This method will likely panic if given `u64` values that did not come from [`Identifier::to_bits`]. @@ -374,34 +407,21 @@ impl bevy::ecs::identifier::Identifier { 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 std::clone::Clone>::clone( - &_self, - ) - .into(); - output - } -} +impl bevy::ecs::entity::EntityHash {} +#[script_bindings( + remote, + name = "disabled_functions", + bms_core_path = "bevy_mod_scripting_core", + generated +)] +impl bevy::ecs::entity_disabling::Disabled {} #[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 std::clone::Clone>::clone( - &_self, - ) - .into(); - output - } -} +impl bevy::ecs::removal_detection::RemovedComponentEntity {} #[script_bindings( remote, name = "system_id_marker_functions", @@ -409,20 +429,34 @@ impl bevy::ecs::removal_detection::RemovedComponentEntity { generated )] impl bevy::ecs::system::SystemIdMarker {} +#[script_bindings( + remote, + name = "on_despawn_functions", + bms_core_path = "bevy_mod_scripting_core", + generated +)] +impl bevy::ecs::world::OnDespawn {} impl ::bevy::app::Plugin for BevyEcsScriptingPlugin { fn build(&self, app: &mut ::bevy::prelude::App) { let mut world = app.world_mut(); register_entity_functions(&mut world); + register_child_of_functions(&mut world); + register_children_functions(&mut world); + register_name_functions(&mut world); register_on_add_functions(&mut world); register_on_insert_functions(&mut world); register_on_remove_functions(&mut world); register_on_replace_functions(&mut world); register_component_id_functions(&mut world); + register_default_query_filters_functions(&mut world); register_tick_functions(&mut world); register_component_ticks_functions(&mut world); + register_entity_hash_set_functions(&mut world); register_identifier_functions(&mut world); register_entity_hash_functions(&mut world); + register_disabled_functions(&mut world); register_removed_component_entity_functions(&mut world); register_system_id_marker_functions(&mut world); + register_on_despawn_functions(&mut world); } } diff --git a/crates/bevy_mod_scripting_functions/src/bevy_bindings/bevy_input.rs b/crates/bevy_mod_scripting_functions/src/bevy_bindings/bevy_input.rs index 592fd54354..20bc13c6a6 100644 --- a/crates/bevy_mod_scripting_functions/src/bevy_bindings/bevy_input.rs +++ b/crates/bevy_mod_scripting_functions/src/bevy_bindings/bevy_input.rs @@ -19,7 +19,7 @@ pub struct BevyInputScriptingPlugin; generated )] impl bevy::input::gamepad::Gamepad { - /// Returns the directional pad as a [`Vec2`] + /// Returns the directional pad as a [`Vec2`]. fn dpad(_self: Ref<bevy::input::gamepad::Gamepad>) -> Val<bevy::math::Vec2> { let output: Val<bevy::math::Vec2> = bevy::input::gamepad::Gamepad::dpad(&_self) .into(); @@ -51,7 +51,7 @@ impl bevy::input::gamepad::Gamepad { .into(); output } - /// Returns the left stick as a [`Vec2`] + /// Returns the left stick as a [`Vec2`]. fn left_stick(_self: Ref<bevy::input::gamepad::Gamepad>) -> Val<bevy::math::Vec2> { let output: Val<bevy::math::Vec2> = bevy::input::gamepad::Gamepad::left_stick( &_self, @@ -75,14 +75,14 @@ impl bevy::input::gamepad::Gamepad { /// [vendor]: Self::vendor_id fn product_id( _self: Ref<bevy::input::gamepad::Gamepad>, - ) -> std::option::Option<u16> { - let output: std::option::Option<u16> = bevy::input::gamepad::Gamepad::product_id( + ) -> core::option::Option<u16> { + let output: core::option::Option<u16> = bevy::input::gamepad::Gamepad::product_id( &_self, ) .into(); output } - /// Returns the right stick as a [`Vec2`] + /// Returns the right stick as a [`Vec2`]. fn right_stick(_self: Ref<bevy::input::gamepad::Gamepad>) -> Val<bevy::math::Vec2> { let output: Val<bevy::math::Vec2> = bevy::input::gamepad::Gamepad::right_stick( &_self, @@ -91,8 +91,10 @@ impl bevy::input::gamepad::Gamepad { output } /// Returns the USB vendor ID as assigned by the USB-IF, if available. - fn vendor_id(_self: Ref<bevy::input::gamepad::Gamepad>) -> std::option::Option<u16> { - let output: std::option::Option<u16> = bevy::input::gamepad::Gamepad::vendor_id( + fn vendor_id( + _self: Ref<bevy::input::gamepad::Gamepad>, + ) -> core::option::Option<u16> { + let output: core::option::Option<u16> = bevy::input::gamepad::Gamepad::vendor_id( &_self, ) .into(); @@ -105,398 +107,91 @@ impl bevy::input::gamepad::Gamepad { 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 std::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 std::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 std::cmp::PartialEq< - bevy::input::gamepad::GamepadAxis, - >>::eq(&_self, &other) - .into(); - output - } -} +impl bevy::input::gamepad::GamepadAxis {} #[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 std::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 std::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 std::cmp::PartialEq< - bevy::input::gamepad::GamepadButton, - >>::eq(&_self, &other) - .into(); - output - } -} +impl bevy::input::gamepad::GamepadButton {} #[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 std::clone::Clone>::clone( - &_self, - ) - .into(); - output - } -} +impl bevy::input::gamepad::GamepadSettings {} #[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 std::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 std::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 std::cmp::PartialEq< - bevy::input::keyboard::KeyCode, - >>::eq(&_self, &other) - .into(); - output - } -} +impl bevy::input::keyboard::KeyCode {} #[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 std::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 std::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 std::cmp::PartialEq< - bevy::input::mouse::MouseButton, - >>::eq(&_self, &other) - .into(); - output - } -} +impl bevy::input::mouse::MouseButton {} #[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 std::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 std::cmp::PartialEq< - bevy::input::touch::TouchInput, - >>::eq(&_self, &other) - .into(); - output - } -} +impl bevy::input::touch::TouchInput {} #[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 std::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 std::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 std::cmp::PartialEq< - bevy::input::keyboard::KeyboardFocusLost, - >>::eq(&_self, &other) - .into(); - output - } -} +impl bevy::input::keyboard::KeyboardFocusLost {} #[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 std::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 std::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 std::cmp::PartialEq< - bevy::input::keyboard::KeyboardInput, - >>::eq(&_self, &other) - .into(); - output - } -} +impl bevy::input::keyboard::KeyboardInput {} #[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 std::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 std::cmp::PartialEq< - bevy::input::mouse::AccumulatedMouseMotion, - >>::eq(&_self, &other) - .into(); - output - } -} +impl bevy::input::mouse::AccumulatedMouseMotion {} #[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 std::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 std::cmp::PartialEq< - bevy::input::mouse::AccumulatedMouseScroll, - >>::eq(&_self, &other) - .into(); - output - } -} +impl bevy::input::mouse::AccumulatedMouseScroll {} #[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 std::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 std::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 std::cmp::PartialEq< - bevy::input::mouse::MouseButtonInput, - >>::eq(&_self, &other) - .into(); - output - } -} +impl bevy::input::mouse::MouseButtonInput {} #[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 std::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 std::cmp::PartialEq< - bevy::input::mouse::MouseMotion, - >>::eq(&_self, &other) - .into(); - output - } -} +impl bevy::input::mouse::MouseMotion {} #[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 std::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 std::cmp::PartialEq< - bevy::input::mouse::MouseWheel, - >>::eq(&_self, &other) - .into(); - output - } -} +impl bevy::input::mouse::MouseWheel {} #[script_bindings( remote, name = "gamepad_axis_changed_event_functions", @@ -504,26 +199,7 @@ impl bevy::input::mouse::MouseWheel { 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 std::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 std::cmp::PartialEq< - bevy::input::gamepad::GamepadAxisChangedEvent, - >>::eq(&_self, &other) - .into(); - output - } - /// Creates a new [`GamepadAxisChangedEvent`] + /// Creates a new [`GamepadAxisChangedEvent`]. fn new( entity: Val<bevy::ecs::entity::Entity>, axis: Val<bevy::input::gamepad::GamepadAxis>, @@ -545,26 +221,7 @@ impl bevy::input::gamepad::GamepadAxisChangedEvent { 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 std::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 std::cmp::PartialEq< - bevy::input::gamepad::GamepadButtonChangedEvent, - >>::eq(&_self, &other) - .into(); - output - } - /// Creates a new [`GamepadButtonChangedEvent`] + /// Creates a new [`GamepadButtonChangedEvent`]. fn new( entity: Val<bevy::ecs::entity::Entity>, button: Val<bevy::input::gamepad::GamepadButton>, @@ -588,35 +245,7 @@ impl bevy::input::gamepad::GamepadButtonChangedEvent { 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 std::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 std::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 std::cmp::PartialEq< - bevy::input::gamepad::GamepadButtonStateChangedEvent, - >>::eq(&_self, &other) - .into(); - output - } - /// Creates a new [`GamepadButtonStateChangedEvent`] + /// Creates a new [`GamepadButtonStateChangedEvent`]. fn new( entity: Val<bevy::ecs::entity::Entity>, button: Val<bevy::input::gamepad::GamepadButton>, @@ -637,27 +266,7 @@ impl bevy::input::gamepad::GamepadButtonStateChangedEvent { 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 std::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 std::cmp::PartialEq< - bevy::input::gamepad::GamepadConnection, - >>::eq(&_self, &other) - .into(); - output - } -} +impl bevy::input::gamepad::GamepadConnection {} #[script_bindings( remote, name = "gamepad_connection_event_functions", @@ -665,16 +274,7 @@ impl bevy::input::gamepad::GamepadConnection { 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 std::clone::Clone>::clone( - &_self, - ) - .into(); - output - } - /// Is the gamepad connected? + /// Whether the gamepad is connected. fn connected(_self: Ref<bevy::input::gamepad::GamepadConnectionEvent>) -> bool { let output: bool = bevy::input::gamepad::GamepadConnectionEvent::connected( &_self, @@ -682,7 +282,7 @@ impl bevy::input::gamepad::GamepadConnectionEvent { .into(); output } - /// Is the gamepad disconnected? + /// Whether the gamepad is disconnected. fn disconnected(_self: Ref<bevy::input::gamepad::GamepadConnectionEvent>) -> bool { let output: bool = bevy::input::gamepad::GamepadConnectionEvent::disconnected( &_self, @@ -690,16 +290,6 @@ impl bevy::input::gamepad::GamepadConnectionEvent { .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 std::cmp::PartialEq< - bevy::input::gamepad::GamepadConnectionEvent, - >>::eq(&_self, &other) - .into(); - output - } /// Creates a [`GamepadConnectionEvent`]. fn new( gamepad: Val<bevy::ecs::entity::Entity>, @@ -719,63 +309,14 @@ impl bevy::input::gamepad::GamepadConnectionEvent { 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 std::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 std::cmp::PartialEq< - bevy::input::gamepad::GamepadEvent, - >>::eq(&_self, &other) - .into(); - output - } -} +impl bevy::input::gamepad::GamepadEvent {} #[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 std::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 std::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 std::cmp::PartialEq< - bevy::input::gamepad::GamepadInput, - >>::eq(&_self, &other) - .into(); - output - } -} +impl bevy::input::gamepad::GamepadInput {} #[script_bindings( remote, name = "gamepad_rumble_request_functions", @@ -783,15 +324,6 @@ impl bevy::input::gamepad::GamepadInput { 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 std::clone::Clone>::clone( - &_self, - ) - .into(); - output - } /// Get the [`Entity`] associated with this request. fn gamepad( _self: Ref<bevy::input::gamepad::GamepadRumbleRequest>, @@ -810,25 +342,6 @@ impl bevy::input::gamepad::GamepadRumbleRequest { 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 std::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 std::cmp::PartialEq< - bevy::input::gamepad::RawGamepadAxisChangedEvent, - >>::eq(&_self, &other) - .into(); - output - } /// Creates a [`RawGamepadAxisChangedEvent`]. fn new( gamepad: Val<bevy::ecs::entity::Entity>, @@ -851,25 +364,6 @@ impl bevy::input::gamepad::RawGamepadAxisChangedEvent { 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 std::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 std::cmp::PartialEq< - bevy::input::gamepad::RawGamepadButtonChangedEvent, - >>::eq(&_self, &other) - .into(); - output - } /// Creates a [`RawGamepadButtonChangedEvent`]. fn new( gamepad: Val<bevy::ecs::entity::Entity>, @@ -891,135 +385,35 @@ impl bevy::input::gamepad::RawGamepadButtonChangedEvent { 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 std::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 std::cmp::PartialEq< - bevy::input::gamepad::RawGamepadEvent, - >>::eq(&_self, &other) - .into(); - output - } -} +impl bevy::input::gamepad::RawGamepadEvent {} #[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 std::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 std::cmp::PartialEq< - bevy::input::gestures::PinchGesture, - >>::eq(&_self, &other) - .into(); - output - } -} +impl bevy::input::gestures::PinchGesture {} #[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 std::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 std::cmp::PartialEq< - bevy::input::gestures::RotationGesture, - >>::eq(&_self, &other) - .into(); - output - } -} +impl bevy::input::gestures::RotationGesture {} #[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 std::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 std::cmp::PartialEq< - bevy::input::gestures::DoubleTapGesture, - >>::eq(&_self, &other) - .into(); - output - } -} +impl bevy::input::gestures::DoubleTapGesture {} #[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 std::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 std::cmp::PartialEq< - bevy::input::gestures::PanGesture, - >>::eq(&_self, &other) - .into(); - output - } -} +impl bevy::input::gestures::PanGesture {} #[script_bindings( remote, name = "button_state_functions", @@ -1027,30 +421,6 @@ impl bevy::input::gestures::PanGesture { generated )] impl bevy::input::ButtonState { - fn assert_receiver_is_total_eq(_self: Ref<bevy::input::ButtonState>) -> () { - let output: () = <bevy::input::ButtonState as std::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 std::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 std::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(); @@ -1064,25 +434,6 @@ impl bevy::input::ButtonState { 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 std::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 std::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 { @@ -1155,17 +506,8 @@ impl bevy::input::gamepad::ButtonSettings { )] impl bevy::input::gamepad::AxisSettings { /// Clamps the `raw_value` according to the `AxisSettings`. - fn clamp(_self: Ref<bevy::input::gamepad::AxisSettings>, new_value: f32) -> f32 { - let output: f32 = bevy::input::gamepad::AxisSettings::clamp(&_self, new_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 std::clone::Clone>::clone( - &_self, - ) + 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 } @@ -1181,16 +523,6 @@ impl bevy::input::gamepad::AxisSettings { .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 std::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) @@ -1289,17 +621,7 @@ impl bevy::input::gamepad::AxisSettings { 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 std::clone::Clone>::clone( - &_self, - ) - .into(); - output - } -} +impl bevy::input::gamepad::ButtonAxisSettings {} #[script_bindings( remote, name = "gamepad_rumble_intensity_functions", @@ -1307,25 +629,6 @@ impl bevy::input::gamepad::ButtonAxisSettings { 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 std::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 std::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( @@ -1353,199 +656,42 @@ impl bevy::input::gamepad::GamepadRumbleIntensity { 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 std::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 std::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 std::cmp::PartialEq< - bevy::input::keyboard::Key, - >>::eq(&_self, &other) - .into(); - output - } -} +impl bevy::input::keyboard::Key {} #[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 std::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 std::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 std::cmp::PartialEq< - bevy::input::keyboard::NativeKeyCode, - >>::eq(&_self, &other) - .into(); - output - } -} +impl bevy::input::keyboard::NativeKeyCode {} #[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 std::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 std::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 std::cmp::PartialEq< - bevy::input::keyboard::NativeKey, - >>::eq(&_self, &other) - .into(); - output - } -} +impl bevy::input::keyboard::NativeKey {} #[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 std::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 std::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 std::cmp::PartialEq< - bevy::input::mouse::MouseScrollUnit, - >>::eq(&_self, &other) - .into(); - output - } -} +impl bevy::input::mouse::MouseScrollUnit {} #[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 std::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 std::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 std::cmp::PartialEq< - bevy::input::touch::TouchPhase, - >>::eq(&_self, &other) - .into(); - output - } -} +impl bevy::input::touch::TouchPhase {} #[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 std::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 std::cmp::PartialEq< - bevy::input::touch::ForceTouch, - >>::eq(&_self, &other) - .into(); - output - } -} +impl bevy::input::touch::ForceTouch {} impl ::bevy::app::Plugin for BevyInputScriptingPlugin { fn build(&self, app: &mut ::bevy::prelude::App) { let mut world = app.world_mut(); 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 5d0a60944c..c23785c23b 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 @@ -19,23 +19,6 @@ pub struct BevyMathScriptingPlugin; 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 std::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 std::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( @@ -72,27 +55,21 @@ impl bevy::math::AspectRatio { generated )] impl bevy::math::CompassOctant { - fn assert_receiver_is_total_eq(_self: Ref<bevy::math::CompassOctant>) -> () { - let output: () = <bevy::math::CompassOctant as std::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 std::clone::Clone>::clone( + /// 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 } - fn eq( - _self: Ref<bevy::math::CompassOctant>, - other: Ref<bevy::math::CompassOctant>, - ) -> bool { - let output: bool = <bevy::math::CompassOctant as std::cmp::PartialEq< - bevy::math::CompassOctant, - >>::eq(&_self, &other) + /// 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 } @@ -104,29 +81,21 @@ impl bevy::math::CompassOctant { generated )] impl bevy::math::CompassQuadrant { - fn assert_receiver_is_total_eq(_self: Ref<bevy::math::CompassQuadrant>) -> () { - let output: () = <bevy::math::CompassQuadrant as std::cmp::Eq>::assert_receiver_is_total_eq( - &_self, - ) - .into(); - output - } - fn clone( + /// 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 as std::clone::Clone>::clone( + let output: Val<bevy::math::CompassQuadrant> = bevy::math::CompassQuadrant::opposite( &_self, ) .into(); output } - fn eq( - _self: Ref<bevy::math::CompassQuadrant>, - other: Ref<bevy::math::CompassQuadrant>, - ) -> bool { - let output: bool = <bevy::math::CompassQuadrant as std::cmp::PartialEq< - bevy::math::CompassQuadrant, - >>::eq(&_self, &other) + /// 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 } @@ -138,23 +107,6 @@ impl bevy::math::CompassQuadrant { 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 std::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 std::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( @@ -214,36 +166,6 @@ impl bevy::math::Isometry2d { .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 std::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 std::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 std::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>, @@ -276,23 +198,6 @@ impl bevy::math::Isometry2d { 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 std::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 std::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>, @@ -333,46 +238,6 @@ impl bevy::math::Isometry3d { .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 std::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::Vec3A>, - ) -> Val<bevy::math::Vec3A> { - let output: Val<bevy::math::Vec3A> = <bevy::math::Isometry3d as std::ops::Mul< - bevy::math::Vec3A, - >>::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 std::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 std::ops::Mul< - bevy::math::prelude::Vec3, - >>::mul(_self.into_inner(), rhs.into_inner()) - .into(); - output - } } #[script_bindings( remote, @@ -381,20 +246,6 @@ impl bevy::math::Isometry3d { 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 std::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 std::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>, @@ -412,8 +263,8 @@ impl bevy::math::Ray2d { _self: Ref<bevy::math::Ray2d>, plane_origin: Val<bevy::math::prelude::Vec2>, plane: Val<bevy::math::primitives::Plane2d>, - ) -> std::option::Option<f32> { - let output: std::option::Option<f32> = bevy::math::Ray2d::intersect_plane( + ) -> core::option::Option<f32> { + let output: core::option::Option<f32> = bevy::math::Ray2d::intersect_plane( &_self, plane_origin.into_inner(), plane.into_inner(), @@ -441,20 +292,6 @@ impl bevy::math::Ray2d { 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 std::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 std::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>, @@ -472,8 +309,8 @@ impl bevy::math::Ray3d { _self: Ref<bevy::math::Ray3d>, plane_origin: Val<bevy::math::prelude::Vec3>, plane: Val<bevy::math::primitives::InfinitePlane3d>, - ) -> std::option::Option<f32> { - let output: std::option::Option<f32> = bevy::math::Ray3d::intersect_plane( + ) -> core::option::Option<f32> { + let output: core::option::Option<f32> = bevy::math::Ray3d::intersect_plane( &_self, plane_origin.into_inner(), plane.into_inner(), @@ -525,13 +362,6 @@ impl bevy::math::Rot2 { 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 std::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. @@ -541,21 +371,16 @@ impl bevy::math::Rot2 { /// # use approx::assert_relative_eq; /// let rot1 = Rot2::degrees(270.0); /// let rot2 = Rot2::degrees(-90.0); + /// #[cfg(feature = "approx")] /// assert_relative_eq!(rot1, rot2); /// let rot3 = Rot2::degrees(180.0); + /// #[cfg(feature = "approx")] /// assert_relative_eq!(rot1 * rot1, rot3); /// ``` fn degrees(degrees: f32) -> Val<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 std::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. @@ -627,38 +452,6 @@ impl bevy::math::Rot2 { 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 std::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 std::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 std::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`. @@ -723,8 +516,10 @@ impl bevy::math::Rot2 { /// # use std::f32::consts::{FRAC_PI_2, PI}; /// let rot1 = Rot2::radians(3.0 * FRAC_PI_2); /// let rot2 = Rot2::radians(-FRAC_PI_2); + /// #[cfg(feature = "approx")] /// assert_relative_eq!(rot1, rot2); /// let rot3 = Rot2::radians(PI); + /// #[cfg(feature = "approx")] /// assert_relative_eq!(rot1 * rot1, rot3); /// ``` fn radians(radians: f32) -> Val<bevy::math::Rot2> { @@ -776,8 +571,10 @@ impl bevy::math::Rot2 { /// # use approx::assert_relative_eq; /// let rot1 = Rot2::turn_fraction(0.75); /// let rot2 = Rot2::turn_fraction(-0.25); + /// #[cfg(feature = "approx")] /// assert_relative_eq!(rot1, rot2); /// let rot3 = Rot2::turn_fraction(0.5); + /// #[cfg(feature = "approx")] /// assert_relative_eq!(rot1 * rot1, rot3); /// ``` fn turn_fraction(fraction: f32) -> Val<bevy::math::Rot2> { @@ -801,23 +598,6 @@ impl bevy::math::prelude::Dir2 { .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 std::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 std::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. @@ -841,23 +621,6 @@ impl bevy::math::prelude::Dir2 { .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 std::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 std::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`. @@ -939,8 +702,10 @@ impl bevy::math::prelude::Dir2 { /// let dir1 = Dir2::X; /// let dir2 = Dir2::Y; /// let result1 = dir1.slerp(dir2, 1.0 / 3.0); + /// #[cfg(feature = "approx")] /// assert_relative_eq!(result1, Dir2::from_xy(0.75_f32.sqrt(), 0.5).unwrap()); /// let result2 = dir1.slerp(dir2, 0.5); + /// #[cfg(feature = "approx")] /// assert_relative_eq!(result2, Dir2::from_xy(0.5_f32.sqrt(), 0.5_f32.sqrt()).unwrap()); /// ``` fn slerp( @@ -972,23 +737,6 @@ impl bevy::math::prelude::Dir3 { .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 std::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 std::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 @@ -1035,23 +783,6 @@ impl bevy::math::prelude::Dir3 { .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 std::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 std::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`. @@ -1077,12 +808,14 @@ impl bevy::math::prelude::Dir3 { /// let dir1 = Dir3::X; /// let dir2 = Dir3::Y; /// let result1 = dir1.slerp(dir2, 1.0 / 3.0); + /// #[cfg(feature = "approx")] /// assert_relative_eq!( /// result1, /// Dir3::from_xyz(0.75_f32.sqrt(), 0.5, 0.0).unwrap(), /// epsilon = 0.000001 /// ); /// let result2 = dir1.slerp(dir2, 0.5); + /// #[cfg(feature = "approx")] /// assert_relative_eq!(result2, Dir3::from_xyz(0.5_f32.sqrt(), 0.5_f32.sqrt(), 0.0).unwrap()); /// ``` fn slerp( @@ -1107,28 +840,15 @@ impl bevy::math::prelude::Dir3 { )] impl bevy::math::prelude::Dir3A { /// Returns the inner [`Vec3A`] - fn as_vec3a(_self: Ref<bevy::math::prelude::Dir3A>) -> Val<bevy::math::Vec3A> { - let output: Val<bevy::math::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 std::clone::Clone>::clone( + 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 eq( - _self: Ref<bevy::math::prelude::Dir3A>, - other: Ref<bevy::math::prelude::Dir3A>, - ) -> bool { - let output: bool = <bevy::math::prelude::Dir3A as std::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. @@ -1153,24 +873,12 @@ impl bevy::math::prelude::Dir3A { .into(); output } - fn mul(_self: Val<bevy::math::prelude::Dir3A>, rhs: f32) -> Val<bevy::math::Vec3A> { - let output: Val<bevy::math::Vec3A> = <bevy::math::prelude::Dir3A as std::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 std::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::Vec3A>) -> Val<bevy::math::prelude::Dir3A> { + 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(), ) @@ -1190,12 +898,14 @@ impl bevy::math::prelude::Dir3A { /// let dir1 = Dir3A::X; /// let dir2 = Dir3A::Y; /// let result1 = dir1.slerp(dir2, 1.0 / 3.0); + /// #[cfg(feature = "approx")] /// assert_relative_eq!( /// result1, /// Dir3A::from_xyz(0.75_f32.sqrt(), 0.5, 0.0).unwrap(), /// epsilon = 0.000001 /// ); /// let result2 = dir1.slerp(dir2, 0.5); + /// #[cfg(feature = "approx")] /// assert_relative_eq!(result2, Dir3A::from_xyz(0.5_f32.sqrt(), 0.5_f32.sqrt(), 0.0).unwrap()); /// ``` fn slerp( @@ -1239,13 +949,6 @@ impl bevy::math::prelude::IRect { .into(); output } - fn assert_receiver_is_total_eq(_self: Ref<bevy::math::prelude::IRect>) -> () { - let output: () = <bevy::math::prelude::IRect as std::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. @@ -1264,13 +967,6 @@ impl bevy::math::prelude::IRect { .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 std::clone::Clone>::clone( - &_self, - ) - .into(); - output - } /// Check if a point lies within this rectangle, inclusive of its edges. /// # Examples /// ``` @@ -1291,16 +987,6 @@ impl bevy::math::prelude::IRect { .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 std::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. @@ -1588,13 +1274,6 @@ impl bevy::math::prelude::Rect { .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 std::clone::Clone>::clone( - &_self, - ) - .into(); - output - } /// Check if a point lies within this rectangle, inclusive of its edges. /// # Examples /// ``` @@ -1615,16 +1294,6 @@ impl bevy::math::prelude::Rect { .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 std::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. @@ -1918,13 +1587,6 @@ impl bevy::math::prelude::URect { .into(); output } - fn assert_receiver_is_total_eq(_self: Ref<bevy::math::prelude::URect>) -> () { - let output: () = <bevy::math::prelude::URect as std::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. @@ -1943,13 +1605,6 @@ impl bevy::math::prelude::URect { .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 std::clone::Clone>::clone( - &_self, - ) - .into(); - output - } /// Check if a point lies within this rectangle, inclusive of its edges. /// # Examples /// ``` @@ -1970,16 +1625,6 @@ impl bevy::math::prelude::URect { .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 std::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. @@ -2250,15 +1895,6 @@ impl bevy::math::bounding::Aabb2d { .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 std::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. @@ -2303,15 +1939,6 @@ impl bevy::math::bounding::BoundingCircle { .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 std::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. @@ -2351,15 +1978,6 @@ impl bevy::math::bounding::BoundingCircle { 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 std::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. @@ -2379,16 +1997,6 @@ impl bevy::math::primitives::Circle { 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 std::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( @@ -2405,15 +2013,6 @@ impl bevy::math::primitives::Circle { 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 std::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. @@ -2434,16 +2033,6 @@ impl bevy::math::primitives::Annulus { 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 std::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, @@ -2497,25 +2086,6 @@ impl bevy::math::primitives::Arc2d { .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 std::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 std::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( @@ -2622,25 +2192,6 @@ impl bevy::math::primitives::Arc2d { 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 std::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 std::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( @@ -2703,25 +2254,6 @@ impl bevy::math::primitives::CircularSector { .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 std::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 std::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, @@ -2837,25 +2369,6 @@ impl bevy::math::primitives::CircularSegment { .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 std::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 std::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, @@ -2936,15 +2449,6 @@ impl bevy::math::primitives::CircularSegment { 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 std::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. @@ -2952,16 +2456,6 @@ impl bevy::math::primitives::Ellipse { 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 std::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 { @@ -3006,27 +2500,7 @@ impl bevy::math::primitives::Ellipse { 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 std::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 std::cmp::PartialEq< - bevy::math::primitives::Line2d, - >>::eq(&_self, &other) - .into(); - output - } -} +impl bevy::math::primitives::Line2d {} #[script_bindings( remote, name = "plane_2_d_functions", @@ -3034,25 +2508,6 @@ impl bevy::math::primitives::Line2d { 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 std::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 std::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. @@ -3073,15 +2528,6 @@ impl bevy::math::primitives::Plane2d { 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 std::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. @@ -3096,16 +2542,6 @@ impl bevy::math::primitives::Rectangle { .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 std::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>, @@ -3171,25 +2607,6 @@ impl bevy::math::primitives::RegularPolygon { .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 std::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 std::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 @@ -3281,15 +2698,6 @@ impl bevy::math::primitives::Rhombus { 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 std::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. @@ -3304,16 +2712,6 @@ impl bevy::math::primitives::Rhombus { .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 std::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( @@ -3361,26 +2759,41 @@ impl bevy::math::primitives::Rhombus { generated )] impl bevy::math::primitives::Segment2d { - fn clone( + /// 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 as std::clone::Clone>::clone( + let output: Val<bevy::math::primitives::Segment2d> = bevy::math::primitives::Segment2d::centered( &_self, ) .into(); output } - fn eq( + /// 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>, - other: Ref<bevy::math::primitives::Segment2d>, - ) -> bool { - let output: bool = <bevy::math::primitives::Segment2d as std::cmp::PartialEq< - bevy::math::primitives::Segment2d, - >>::eq(&_self, &other) + ) -> Val<bevy::math::prelude::Dir2> { + let output: Val<bevy::math::prelude::Dir2> = bevy::math::primitives::Segment2d::direction( + &_self, + ) .into(); output } - /// Create a new `Segment2d` from a direction and full length of the segment + /// 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, @@ -3392,7 +2805,69 @@ impl bevy::math::primitives::Segment2d { .into(); output } - /// Get the position of the first point on the line segment + /// Create a new `Segment2d` starting from the origin of the given `ray`, + /// going in the direction of the ray for the given `length`. + /// The endpoints will be at `ray.origin` and `ray.origin + length * ray.direction`. + fn from_ray_and_length( + ray: Val<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> { @@ -3402,7 +2877,7 @@ impl bevy::math::primitives::Segment2d { .into(); output } - /// Get the position of the second point on the line segment + /// Get the position of the second endpoint of the line segment. fn point2( _self: Ref<bevy::math::primitives::Segment2d>, ) -> Val<bevy::math::prelude::Vec2> { @@ -3412,33 +2887,136 @@ impl bevy::math::primitives::Segment2d { .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 std::clone::Clone>::clone( + /// 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 } - fn eq( - _self: Ref<bevy::math::primitives::Triangle2d>, - other: Ref<bevy::math::primitives::Triangle2d>, - ) -> bool { - let output: bool = <bevy::math::primitives::Triangle2d as std::cmp::PartialEq< - bevy::math::primitives::Triangle2d, - >>::eq(&_self, &other) + /// 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 { /// 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(); @@ -3505,15 +3083,6 @@ impl bevy::math::bounding::Aabb3d { .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 std::clone::Clone>::clone( - &_self, - ) - .into(); - output - } } #[script_bindings( remote, @@ -3532,15 +3101,6 @@ impl bevy::math::bounding::BoundingSphere { .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 std::clone::Clone>::clone( - &_self, - ) - .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(); @@ -3554,15 +3114,6 @@ impl bevy::math::bounding::BoundingSphere { 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 std::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. @@ -3582,16 +3133,6 @@ impl bevy::math::primitives::Sphere { 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 std::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( @@ -3608,15 +3149,6 @@ impl bevy::math::primitives::Sphere { 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 std::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. @@ -3631,16 +3163,6 @@ impl bevy::math::primitives::Cuboid { .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 std::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>, @@ -3719,25 +3241,6 @@ impl bevy::math::primitives::Cylinder { 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 std::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 std::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 { @@ -3761,25 +3264,6 @@ impl bevy::math::primitives::Cylinder { 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 std::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 std::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( @@ -3823,25 +3307,6 @@ impl bevy::math::primitives::Cone { 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 std::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 std::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 { @@ -3870,27 +3335,7 @@ impl bevy::math::primitives::Cone { 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 std::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 std::cmp::PartialEq< - bevy::math::primitives::ConicalFrustum, - >>::eq(&_self, &other) - .into(); - output - } -} +impl bevy::math::primitives::ConicalFrustum {} #[script_bindings( remote, name = "infinite_plane_3_d_functions", @@ -3898,25 +3343,6 @@ impl bevy::math::primitives::ConicalFrustum { 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 std::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 std::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 @@ -3982,27 +3408,7 @@ impl bevy::math::primitives::InfinitePlane3d { 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 std::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 std::cmp::PartialEq< - bevy::math::primitives::Line3d, - >>::eq(&_self, &other) - .into(); - output - } -} +impl bevy::math::primitives::Line3d {} #[script_bindings( remote, name = "segment_3_d_functions", @@ -4010,26 +3416,41 @@ impl bevy::math::primitives::Line3d { generated )] impl bevy::math::primitives::Segment3d { - fn clone( + /// 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 as std::clone::Clone>::clone( + let output: Val<bevy::math::primitives::Segment3d> = bevy::math::primitives::Segment3d::centered( &_self, ) .into(); output } - fn eq( + /// 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>, - other: Ref<bevy::math::primitives::Segment3d>, - ) -> bool { - let output: bool = <bevy::math::primitives::Segment3d as std::cmp::PartialEq< - bevy::math::primitives::Segment3d, - >>::eq(&_self, &other) + ) -> Val<bevy::math::prelude::Dir3> { + let output: Val<bevy::math::prelude::Dir3> = bevy::math::primitives::Segment3d::direction( + &_self, + ) .into(); output } - /// Create a new `Segment3d` from a direction and full length of the segment + /// 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, @@ -4041,7 +3462,56 @@ impl bevy::math::primitives::Segment3d { .into(); output } - /// Get the position of the first point on the line segment + /// Create a new `Segment3d` starting from the origin of the given `ray`, + /// going in the direction of the ray for the given `length`. + /// The endpoints will be at `ray.origin` and `ray.origin + length * ray.direction`. + fn from_ray_and_length( + ray: Val<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> { @@ -4051,7 +3521,7 @@ impl bevy::math::primitives::Segment3d { .into(); output } - /// Get the position of the second point on the line segment + /// Get the position of the second endpoint of the line segment. fn point2( _self: Ref<bevy::math::primitives::Segment3d>, ) -> Val<bevy::math::prelude::Vec3> { @@ -4061,33 +3531,101 @@ impl bevy::math::primitives::Segment3d { .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 std::clone::Clone>::clone( + /// 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 } - fn eq( - _self: Ref<bevy::math::primitives::Torus>, - other: Ref<bevy::math::primitives::Torus>, - ) -> bool { - let output: bool = <bevy::math::primitives::Torus as std::cmp::PartialEq< - bevy::math::primitives::Torus, - >>::eq(&_self, &other) + /// 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 { /// Get the inner radius of the torus. /// For a ring torus, this corresponds to the radius of the hole, /// or `major_radius - minor_radius` @@ -4143,25 +3681,6 @@ impl bevy::math::primitives::Triangle3d { .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 std::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 std::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(); @@ -4221,8 +3740,8 @@ impl bevy::math::bounding::RayCast2d { fn aabb_intersection_at( _self: Ref<bevy::math::bounding::RayCast2d>, aabb: Ref<bevy::math::bounding::Aabb2d>, - ) -> std::option::Option<f32> { - let output: std::option::Option<f32> = bevy::math::bounding::RayCast2d::aabb_intersection_at( + ) -> core::option::Option<f32> { + let output: core::option::Option<f32> = bevy::math::bounding::RayCast2d::aabb_intersection_at( &_self, &aabb, ) @@ -4233,23 +3752,14 @@ impl bevy::math::bounding::RayCast2d { fn circle_intersection_at( _self: Ref<bevy::math::bounding::RayCast2d>, circle: Ref<bevy::math::bounding::BoundingCircle>, - ) -> std::option::Option<f32> { - let output: std::option::Option<f32> = bevy::math::bounding::RayCast2d::circle_intersection_at( + ) -> core::option::Option<f32> { + let output: core::option::Option<f32> = 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 std::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>, @@ -4298,23 +3808,14 @@ impl bevy::math::bounding::AabbCast2d { fn aabb_collision_at( _self: Ref<bevy::math::bounding::AabbCast2d>, aabb: Val<bevy::math::bounding::Aabb2d>, - ) -> std::option::Option<f32> { - let output: std::option::Option<f32> = bevy::math::bounding::AabbCast2d::aabb_collision_at( + ) -> core::option::Option<f32> { + let output: core::option::Option<f32> = 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 std::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>, @@ -4357,23 +3858,14 @@ impl bevy::math::bounding::BoundingCircleCast { fn circle_collision_at( _self: Ref<bevy::math::bounding::BoundingCircleCast>, circle: Val<bevy::math::bounding::BoundingCircle>, - ) -> std::option::Option<f32> { - let output: std::option::Option<f32> = bevy::math::bounding::BoundingCircleCast::circle_collision_at( + ) -> core::option::Option<f32> { + let output: core::option::Option<f32> = 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 std::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>, @@ -4416,28 +3908,19 @@ impl bevy::math::bounding::RayCast3d { fn aabb_intersection_at( _self: Ref<bevy::math::bounding::RayCast3d>, aabb: Ref<bevy::math::bounding::Aabb3d>, - ) -> std::option::Option<f32> { - let output: std::option::Option<f32> = bevy::math::bounding::RayCast3d::aabb_intersection_at( + ) -> core::option::Option<f32> { + let output: core::option::Option<f32> = 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 std::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::Vec3A> { - let output: Val<bevy::math::Vec3A> = bevy::math::bounding::RayCast3d::direction_recip( + ) -> Val<bevy::math::prelude::Vec3A> { + let output: Val<bevy::math::prelude::Vec3A> = bevy::math::bounding::RayCast3d::direction_recip( &_self, ) .into(); @@ -4459,8 +3942,8 @@ impl bevy::math::bounding::RayCast3d { fn sphere_intersection_at( _self: Ref<bevy::math::bounding::RayCast3d>, sphere: Ref<bevy::math::bounding::BoundingSphere>, - ) -> std::option::Option<f32> { - let output: std::option::Option<f32> = bevy::math::bounding::RayCast3d::sphere_intersection_at( + ) -> core::option::Option<f32> { + let output: core::option::Option<f32> = bevy::math::bounding::RayCast3d::sphere_intersection_at( &_self, &sphere, ) @@ -4479,23 +3962,14 @@ impl bevy::math::bounding::AabbCast3d { fn aabb_collision_at( _self: Ref<bevy::math::bounding::AabbCast3d>, aabb: Val<bevy::math::bounding::Aabb3d>, - ) -> std::option::Option<f32> { - let output: std::option::Option<f32> = bevy::math::bounding::AabbCast3d::aabb_collision_at( + ) -> core::option::Option<f32> { + let output: core::option::Option<f32> = 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 std::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>, @@ -4518,15 +3992,6 @@ impl bevy::math::bounding::AabbCast3d { 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 std::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>, @@ -4545,8 +4010,8 @@ impl bevy::math::bounding::BoundingSphereCast { fn sphere_collision_at( _self: Ref<bevy::math::bounding::BoundingSphereCast>, sphere: Val<bevy::math::bounding::BoundingSphere>, - ) -> std::option::Option<f32> { - let output: std::option::Option<f32> = bevy::math::bounding::BoundingSphereCast::sphere_collision_at( + ) -> core::option::Option<f32> { + let output: core::option::Option<f32> = bevy::math::bounding::BoundingSphereCast::sphere_collision_at( &_self, sphere.into_inner(), ) @@ -4560,7 +4025,7 @@ impl bevy::math::bounding::BoundingSphereCast { bms_core_path = "bevy_mod_scripting_core", generated )] -impl bevy::math::curve::Interval { +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( @@ -4570,15 +4035,6 @@ impl bevy::math::curve::Interval { .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 std::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( @@ -4607,16 +4063,6 @@ impl bevy::math::curve::Interval { .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 std::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( @@ -4665,57 +4111,7 @@ impl bevy::math::curve::Interval { 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 std::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 std::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 std::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 std::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 std::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 std::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 std::ops::Neg>::neg( - _self.into_inner(), - ) - .into(); - output - } -} +impl bevy::math::FloatOrd {} #[script_bindings( remote, name = "plane_3_d_functions", @@ -4723,25 +4119,6 @@ impl bevy::math::FloatOrd { 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 std::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 std::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. @@ -4776,25 +4153,6 @@ impl bevy::math::primitives::Tetrahedron { .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 std::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 std::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>, @@ -4827,27 +4185,14 @@ impl bevy::math::primitives::Tetrahedron { 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 std::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 std::cmp::PartialEq< - bevy::math::curve::easing::EaseFunction, - >>::eq(&_self, &other) - .into(); - output - } -} +impl bevy::math::curve::easing::EaseFunction {} +#[script_bindings( + remote, + name = "jump_at_functions", + bms_core_path = "bevy_mod_scripting_core", + generated +)] +impl bevy::math::curve::easing::JumpAt {} impl ::bevy::app::Plugin for BevyMathScriptingPlugin { fn build(&self, app: &mut ::bevy::prelude::App) { let mut world = app.world_mut(); @@ -4906,5 +4251,6 @@ impl ::bevy::app::Plugin for BevyMathScriptingPlugin { register_plane_3_d_functions(&mut world); register_tetrahedron_functions(&mut world); register_ease_function_functions(&mut world); + register_jump_at_functions(&mut world); } } diff --git a/crates/bevy_mod_scripting_functions/src/bevy_bindings/bevy_reflect.rs b/crates/bevy_mod_scripting_functions/src/bevy_bindings/bevy_reflect.rs index b981719c12..3751560827 100644 --- a/crates/bevy_mod_scripting_functions/src/bevy_bindings/bevy_reflect.rs +++ b/crates/bevy_mod_scripting_functions/src/bevy_bindings/bevy_reflect.rs @@ -18,7 +18,7 @@ pub struct BevyReflectScriptingPlugin; bms_core_path = "bevy_mod_scripting_core", generated )] -impl std::sync::atomic::AtomicBool { +impl core::sync::atomic::AtomicBool { /// Consumes the atomic and returns the contained value. /// This is safe because passing `self` by value guarantees that no other threads are /// concurrently accessing the atomic data. @@ -28,8 +28,8 @@ impl std::sync::atomic::AtomicBool { /// let some_bool = AtomicBool::new(true); /// assert_eq!(some_bool.into_inner(), true); /// ``` - fn into_inner(_self: Val<std::sync::atomic::AtomicBool>) -> bool { - let output: bool = std::sync::atomic::AtomicBool::into_inner(_self.into_inner()) + fn into_inner(_self: Val<core::sync::atomic::AtomicBool>) -> bool { + let output: bool = core::sync::atomic::AtomicBool::into_inner(_self.into_inner()) .into(); output } @@ -40,8 +40,8 @@ impl std::sync::atomic::AtomicBool { /// let atomic_true = AtomicBool::new(true); /// let atomic_false = AtomicBool::new(false); /// ``` - fn new(v: bool) -> Val<std::sync::atomic::AtomicBool> { - let output: Val<std::sync::atomic::AtomicBool> = std::sync::atomic::AtomicBool::new( + fn new(v: bool) -> Val<core::sync::atomic::AtomicBool> { + let output: Val<core::sync::atomic::AtomicBool> = core::sync::atomic::AtomicBool::new( v, ) .into(); @@ -54,7 +54,7 @@ impl std::sync::atomic::AtomicBool { bms_core_path = "bevy_mod_scripting_core", generated )] -impl std::sync::atomic::AtomicI16 { +impl core::sync::atomic::AtomicI16 { /// Consumes the atomic and returns the contained value. /// This is safe because passing `self` by value guarantees that no other threads are /// concurrently accessing the atomic data. @@ -64,8 +64,8 @@ impl std::sync::atomic::AtomicI16 { /// let some_var = AtomicI16::new(5); /// assert_eq!(some_var.into_inner(), 5); /// ``` - fn into_inner(_self: Val<std::sync::atomic::AtomicI16>) -> i16 { - let output: i16 = std::sync::atomic::AtomicI16::into_inner(_self.into_inner()) + fn into_inner(_self: Val<core::sync::atomic::AtomicI16>) -> i16 { + let output: i16 = core::sync::atomic::AtomicI16::into_inner(_self.into_inner()) .into(); output } @@ -75,8 +75,8 @@ impl std::sync::atomic::AtomicI16 { /// use std::sync::atomic::AtomicI16; /// let atomic_forty_two = AtomicI16::new(42); /// ``` - fn new(v: i16) -> Val<std::sync::atomic::AtomicI16> { - let output: Val<std::sync::atomic::AtomicI16> = std::sync::atomic::AtomicI16::new( + fn new(v: i16) -> Val<core::sync::atomic::AtomicI16> { + let output: Val<core::sync::atomic::AtomicI16> = core::sync::atomic::AtomicI16::new( v, ) .into(); @@ -89,7 +89,7 @@ impl std::sync::atomic::AtomicI16 { bms_core_path = "bevy_mod_scripting_core", generated )] -impl std::sync::atomic::AtomicI32 { +impl core::sync::atomic::AtomicI32 { /// Consumes the atomic and returns the contained value. /// This is safe because passing `self` by value guarantees that no other threads are /// concurrently accessing the atomic data. @@ -99,8 +99,8 @@ impl std::sync::atomic::AtomicI32 { /// let some_var = AtomicI32::new(5); /// assert_eq!(some_var.into_inner(), 5); /// ``` - fn into_inner(_self: Val<std::sync::atomic::AtomicI32>) -> i32 { - let output: i32 = std::sync::atomic::AtomicI32::into_inner(_self.into_inner()) + fn into_inner(_self: Val<core::sync::atomic::AtomicI32>) -> i32 { + let output: i32 = core::sync::atomic::AtomicI32::into_inner(_self.into_inner()) .into(); output } @@ -110,8 +110,8 @@ impl std::sync::atomic::AtomicI32 { /// use std::sync::atomic::AtomicI32; /// let atomic_forty_two = AtomicI32::new(42); /// ``` - fn new(v: i32) -> Val<std::sync::atomic::AtomicI32> { - let output: Val<std::sync::atomic::AtomicI32> = std::sync::atomic::AtomicI32::new( + fn new(v: i32) -> Val<core::sync::atomic::AtomicI32> { + let output: Val<core::sync::atomic::AtomicI32> = core::sync::atomic::AtomicI32::new( v, ) .into(); @@ -124,7 +124,7 @@ impl std::sync::atomic::AtomicI32 { bms_core_path = "bevy_mod_scripting_core", generated )] -impl std::sync::atomic::AtomicI64 { +impl core::sync::atomic::AtomicI64 { /// Consumes the atomic and returns the contained value. /// This is safe because passing `self` by value guarantees that no other threads are /// concurrently accessing the atomic data. @@ -134,8 +134,8 @@ impl std::sync::atomic::AtomicI64 { /// let some_var = AtomicI64::new(5); /// assert_eq!(some_var.into_inner(), 5); /// ``` - fn into_inner(_self: Val<std::sync::atomic::AtomicI64>) -> i64 { - let output: i64 = std::sync::atomic::AtomicI64::into_inner(_self.into_inner()) + fn into_inner(_self: Val<core::sync::atomic::AtomicI64>) -> i64 { + let output: i64 = core::sync::atomic::AtomicI64::into_inner(_self.into_inner()) .into(); output } @@ -145,8 +145,8 @@ impl std::sync::atomic::AtomicI64 { /// use std::sync::atomic::AtomicI64; /// let atomic_forty_two = AtomicI64::new(42); /// ``` - fn new(v: i64) -> Val<std::sync::atomic::AtomicI64> { - let output: Val<std::sync::atomic::AtomicI64> = std::sync::atomic::AtomicI64::new( + fn new(v: i64) -> Val<core::sync::atomic::AtomicI64> { + let output: Val<core::sync::atomic::AtomicI64> = core::sync::atomic::AtomicI64::new( v, ) .into(); @@ -159,7 +159,7 @@ impl std::sync::atomic::AtomicI64 { bms_core_path = "bevy_mod_scripting_core", generated )] -impl std::sync::atomic::AtomicI8 { +impl core::sync::atomic::AtomicI8 { /// Consumes the atomic and returns the contained value. /// This is safe because passing `self` by value guarantees that no other threads are /// concurrently accessing the atomic data. @@ -169,8 +169,8 @@ impl std::sync::atomic::AtomicI8 { /// let some_var = AtomicI8::new(5); /// assert_eq!(some_var.into_inner(), 5); /// ``` - fn into_inner(_self: Val<std::sync::atomic::AtomicI8>) -> i8 { - let output: i8 = std::sync::atomic::AtomicI8::into_inner(_self.into_inner()) + fn into_inner(_self: Val<core::sync::atomic::AtomicI8>) -> i8 { + let output: i8 = core::sync::atomic::AtomicI8::into_inner(_self.into_inner()) .into(); output } @@ -180,8 +180,8 @@ impl std::sync::atomic::AtomicI8 { /// use std::sync::atomic::AtomicI8; /// let atomic_forty_two = AtomicI8::new(42); /// ``` - fn new(v: i8) -> Val<std::sync::atomic::AtomicI8> { - let output: Val<std::sync::atomic::AtomicI8> = std::sync::atomic::AtomicI8::new( + fn new(v: i8) -> Val<core::sync::atomic::AtomicI8> { + let output: Val<core::sync::atomic::AtomicI8> = core::sync::atomic::AtomicI8::new( v, ) .into(); @@ -194,7 +194,7 @@ impl std::sync::atomic::AtomicI8 { bms_core_path = "bevy_mod_scripting_core", generated )] -impl std::sync::atomic::AtomicIsize { +impl core::sync::atomic::AtomicIsize { /// Consumes the atomic and returns the contained value. /// This is safe because passing `self` by value guarantees that no other threads are /// concurrently accessing the atomic data. @@ -204,8 +204,8 @@ impl std::sync::atomic::AtomicIsize { /// let some_var = AtomicIsize::new(5); /// assert_eq!(some_var.into_inner(), 5); /// ``` - fn into_inner(_self: Val<std::sync::atomic::AtomicIsize>) -> isize { - let output: isize = std::sync::atomic::AtomicIsize::into_inner( + fn into_inner(_self: Val<core::sync::atomic::AtomicIsize>) -> isize { + let output: isize = core::sync::atomic::AtomicIsize::into_inner( _self.into_inner(), ) .into(); @@ -217,8 +217,8 @@ impl std::sync::atomic::AtomicIsize { /// use std::sync::atomic::AtomicIsize; /// let atomic_forty_two = AtomicIsize::new(42); /// ``` - fn new(v: isize) -> Val<std::sync::atomic::AtomicIsize> { - let output: Val<std::sync::atomic::AtomicIsize> = std::sync::atomic::AtomicIsize::new( + fn new(v: isize) -> Val<core::sync::atomic::AtomicIsize> { + let output: Val<core::sync::atomic::AtomicIsize> = core::sync::atomic::AtomicIsize::new( v, ) .into(); @@ -231,7 +231,7 @@ impl std::sync::atomic::AtomicIsize { bms_core_path = "bevy_mod_scripting_core", generated )] -impl std::sync::atomic::AtomicU16 { +impl core::sync::atomic::AtomicU16 { /// Consumes the atomic and returns the contained value. /// This is safe because passing `self` by value guarantees that no other threads are /// concurrently accessing the atomic data. @@ -241,8 +241,8 @@ impl std::sync::atomic::AtomicU16 { /// let some_var = AtomicU16::new(5); /// assert_eq!(some_var.into_inner(), 5); /// ``` - fn into_inner(_self: Val<std::sync::atomic::AtomicU16>) -> u16 { - let output: u16 = std::sync::atomic::AtomicU16::into_inner(_self.into_inner()) + fn into_inner(_self: Val<core::sync::atomic::AtomicU16>) -> u16 { + let output: u16 = core::sync::atomic::AtomicU16::into_inner(_self.into_inner()) .into(); output } @@ -252,8 +252,8 @@ impl std::sync::atomic::AtomicU16 { /// use std::sync::atomic::AtomicU16; /// let atomic_forty_two = AtomicU16::new(42); /// ``` - fn new(v: u16) -> Val<std::sync::atomic::AtomicU16> { - let output: Val<std::sync::atomic::AtomicU16> = std::sync::atomic::AtomicU16::new( + fn new(v: u16) -> Val<core::sync::atomic::AtomicU16> { + let output: Val<core::sync::atomic::AtomicU16> = core::sync::atomic::AtomicU16::new( v, ) .into(); @@ -266,7 +266,7 @@ impl std::sync::atomic::AtomicU16 { bms_core_path = "bevy_mod_scripting_core", generated )] -impl std::sync::atomic::AtomicU32 { +impl core::sync::atomic::AtomicU32 { /// Consumes the atomic and returns the contained value. /// This is safe because passing `self` by value guarantees that no other threads are /// concurrently accessing the atomic data. @@ -276,8 +276,8 @@ impl std::sync::atomic::AtomicU32 { /// let some_var = AtomicU32::new(5); /// assert_eq!(some_var.into_inner(), 5); /// ``` - fn into_inner(_self: Val<std::sync::atomic::AtomicU32>) -> u32 { - let output: u32 = std::sync::atomic::AtomicU32::into_inner(_self.into_inner()) + fn into_inner(_self: Val<core::sync::atomic::AtomicU32>) -> u32 { + let output: u32 = core::sync::atomic::AtomicU32::into_inner(_self.into_inner()) .into(); output } @@ -287,8 +287,8 @@ impl std::sync::atomic::AtomicU32 { /// use std::sync::atomic::AtomicU32; /// let atomic_forty_two = AtomicU32::new(42); /// ``` - fn new(v: u32) -> Val<std::sync::atomic::AtomicU32> { - let output: Val<std::sync::atomic::AtomicU32> = std::sync::atomic::AtomicU32::new( + fn new(v: u32) -> Val<core::sync::atomic::AtomicU32> { + let output: Val<core::sync::atomic::AtomicU32> = core::sync::atomic::AtomicU32::new( v, ) .into(); @@ -301,7 +301,7 @@ impl std::sync::atomic::AtomicU32 { bms_core_path = "bevy_mod_scripting_core", generated )] -impl std::sync::atomic::AtomicU64 { +impl core::sync::atomic::AtomicU64 { /// Consumes the atomic and returns the contained value. /// This is safe because passing `self` by value guarantees that no other threads are /// concurrently accessing the atomic data. @@ -311,8 +311,8 @@ impl std::sync::atomic::AtomicU64 { /// let some_var = AtomicU64::new(5); /// assert_eq!(some_var.into_inner(), 5); /// ``` - fn into_inner(_self: Val<std::sync::atomic::AtomicU64>) -> u64 { - let output: u64 = std::sync::atomic::AtomicU64::into_inner(_self.into_inner()) + fn into_inner(_self: Val<core::sync::atomic::AtomicU64>) -> u64 { + let output: u64 = core::sync::atomic::AtomicU64::into_inner(_self.into_inner()) .into(); output } @@ -322,8 +322,8 @@ impl std::sync::atomic::AtomicU64 { /// use std::sync::atomic::AtomicU64; /// let atomic_forty_two = AtomicU64::new(42); /// ``` - fn new(v: u64) -> Val<std::sync::atomic::AtomicU64> { - let output: Val<std::sync::atomic::AtomicU64> = std::sync::atomic::AtomicU64::new( + fn new(v: u64) -> Val<core::sync::atomic::AtomicU64> { + let output: Val<core::sync::atomic::AtomicU64> = core::sync::atomic::AtomicU64::new( v, ) .into(); @@ -336,7 +336,7 @@ impl std::sync::atomic::AtomicU64 { bms_core_path = "bevy_mod_scripting_core", generated )] -impl std::sync::atomic::AtomicU8 { +impl core::sync::atomic::AtomicU8 { /// Consumes the atomic and returns the contained value. /// This is safe because passing `self` by value guarantees that no other threads are /// concurrently accessing the atomic data. @@ -346,8 +346,8 @@ impl std::sync::atomic::AtomicU8 { /// let some_var = AtomicU8::new(5); /// assert_eq!(some_var.into_inner(), 5); /// ``` - fn into_inner(_self: Val<std::sync::atomic::AtomicU8>) -> u8 { - let output: u8 = std::sync::atomic::AtomicU8::into_inner(_self.into_inner()) + fn into_inner(_self: Val<core::sync::atomic::AtomicU8>) -> u8 { + let output: u8 = core::sync::atomic::AtomicU8::into_inner(_self.into_inner()) .into(); output } @@ -357,8 +357,8 @@ impl std::sync::atomic::AtomicU8 { /// use std::sync::atomic::AtomicU8; /// let atomic_forty_two = AtomicU8::new(42); /// ``` - fn new(v: u8) -> Val<std::sync::atomic::AtomicU8> { - let output: Val<std::sync::atomic::AtomicU8> = std::sync::atomic::AtomicU8::new( + fn new(v: u8) -> Val<core::sync::atomic::AtomicU8> { + let output: Val<core::sync::atomic::AtomicU8> = core::sync::atomic::AtomicU8::new( v, ) .into(); @@ -371,7 +371,7 @@ impl std::sync::atomic::AtomicU8 { bms_core_path = "bevy_mod_scripting_core", generated )] -impl std::sync::atomic::AtomicUsize { +impl core::sync::atomic::AtomicUsize { /// Consumes the atomic and returns the contained value. /// This is safe because passing `self` by value guarantees that no other threads are /// concurrently accessing the atomic data. @@ -381,8 +381,8 @@ impl std::sync::atomic::AtomicUsize { /// let some_var = AtomicUsize::new(5); /// assert_eq!(some_var.into_inner(), 5); /// ``` - fn into_inner(_self: Val<std::sync::atomic::AtomicUsize>) -> usize { - let output: usize = std::sync::atomic::AtomicUsize::into_inner( + fn into_inner(_self: Val<core::sync::atomic::AtomicUsize>) -> usize { + let output: usize = core::sync::atomic::AtomicUsize::into_inner( _self.into_inner(), ) .into(); @@ -394,8 +394,8 @@ impl std::sync::atomic::AtomicUsize { /// use std::sync::atomic::AtomicUsize; /// let atomic_forty_two = AtomicUsize::new(42); /// ``` - fn new(v: usize) -> Val<std::sync::atomic::AtomicUsize> { - let output: Val<std::sync::atomic::AtomicUsize> = std::sync::atomic::AtomicUsize::new( + fn new(v: usize) -> Val<core::sync::atomic::AtomicUsize> { + let output: Val<core::sync::atomic::AtomicUsize> = core::sync::atomic::AtomicUsize::new( v, ) .into(); @@ -408,7 +408,7 @@ impl std::sync::atomic::AtomicUsize { bms_core_path = "bevy_mod_scripting_core", generated )] -impl std::time::Duration { +impl core::time::Duration { /// Computes the absolute difference between `self` and `other`. /// # Examples /// ``` @@ -417,26 +417,16 @@ impl std::time::Duration { /// assert_eq!(Duration::new(100, 400_000_000).abs_diff(Duration::new(110, 0)), Duration::new(9, 600_000_000)); /// ``` fn abs_diff( - _self: Val<std::time::Duration>, - other: Val<std::time::Duration>, - ) -> Val<std::time::Duration> { - let output: Val<std::time::Duration> = std::time::Duration::abs_diff( + _self: Val<core::time::Duration>, + other: Val<core::time::Duration>, + ) -> Val<core::time::Duration> { + let output: Val<core::time::Duration> = core::time::Duration::abs_diff( _self.into_inner(), other.into_inner(), ) .into(); output } - fn add( - _self: Val<std::time::Duration>, - rhs: Val<std::time::Duration>, - ) -> Val<std::time::Duration> { - let output: Val<std::time::Duration> = <std::time::Duration as std::ops::Add< - std::time::Duration, - >>::add(_self.into_inner(), rhs.into_inner()) - .into(); - output - } /// Returns the total number of whole microseconds contained by this `Duration`. /// # Examples /// ``` @@ -444,8 +434,8 @@ impl std::time::Duration { /// let duration = Duration::new(5, 730_023_852); /// assert_eq!(duration.as_micros(), 5_730_023); /// ``` - fn as_micros(_self: Ref<std::time::Duration>) -> u128 { - let output: u128 = std::time::Duration::as_micros(&_self).into(); + fn as_micros(_self: Ref<core::time::Duration>) -> u128 { + let output: u128 = core::time::Duration::as_micros(&_self).into(); output } /// Returns the total number of whole milliseconds contained by this `Duration`. @@ -455,8 +445,8 @@ impl std::time::Duration { /// let duration = Duration::new(5, 730_023_852); /// assert_eq!(duration.as_millis(), 5_730); /// ``` - fn as_millis(_self: Ref<std::time::Duration>) -> u128 { - let output: u128 = std::time::Duration::as_millis(&_self).into(); + fn as_millis(_self: Ref<core::time::Duration>) -> u128 { + let output: u128 = core::time::Duration::as_millis(&_self).into(); output } /// Returns the total number of nanoseconds contained by this `Duration`. @@ -466,8 +456,8 @@ impl 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<std::time::Duration>) -> u128 { - let output: u128 = std::time::Duration::as_nanos(&_self).into(); + fn as_nanos(_self: Ref<core::time::Duration>) -> u128 { + let output: u128 = core::time::Duration::as_nanos(&_self).into(); output } /// Returns the number of _whole_ seconds contained by this `Duration`. @@ -484,8 +474,8 @@ impl std::time::Duration { /// [`as_secs_f64`]: Duration::as_secs_f64 /// [`as_secs_f32`]: Duration::as_secs_f32 /// [`subsec_nanos`]: Duration::subsec_nanos - fn as_secs(_self: Ref<std::time::Duration>) -> u64 { - let output: u64 = std::time::Duration::as_secs(&_self).into(); + fn as_secs(_self: Ref<core::time::Duration>) -> u64 { + let output: u64 = core::time::Duration::as_secs(&_self).into(); output } /// Returns the number of seconds contained by this `Duration` as `f32`. @@ -496,8 +486,8 @@ impl 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<std::time::Duration>) -> f32 { - let output: f32 = std::time::Duration::as_secs_f32(&_self).into(); + fn as_secs_f32(_self: Ref<core::time::Duration>) -> f32 { + let output: f32 = core::time::Duration::as_secs_f32(&_self).into(); output } /// Returns the number of seconds contained by this `Duration` as `f64`. @@ -508,29 +498,8 @@ impl 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<std::time::Duration>) -> f64 { - let output: f64 = std::time::Duration::as_secs_f64(&_self).into(); - output - } - fn assert_receiver_is_total_eq(_self: Ref<std::time::Duration>) -> () { - let output: () = <std::time::Duration as std::cmp::Eq>::assert_receiver_is_total_eq( - &_self, - ) - .into(); - output - } - fn clone(_self: Ref<std::time::Duration>) -> Val<std::time::Duration> { - let output: Val<std::time::Duration> = <std::time::Duration as bevy::reflect::erased_serde::__private::serde::__private::Clone>::clone( - &_self, - ) - .into(); - output - } - fn div(_self: Val<std::time::Duration>, rhs: u32) -> Val<std::time::Duration> { - let output: Val<std::time::Duration> = <std::time::Duration as std::ops::Div< - u32, - >>::div(_self.into_inner(), rhs) - .into(); + fn as_secs_f64(_self: Ref<core::time::Duration>) -> f64 { + let output: f64 = core::time::Duration::as_secs_f64(&_self).into(); output } /// Divides `Duration` by `Duration` and returns `f32`. @@ -542,10 +511,10 @@ impl std::time::Duration { /// assert_eq!(dur1.div_duration_f32(dur2), 0.5); /// ``` fn div_duration_f32( - _self: Val<std::time::Duration>, - rhs: Val<std::time::Duration>, + _self: Val<core::time::Duration>, + rhs: Val<core::time::Duration>, ) -> f32 { - let output: f32 = std::time::Duration::div_duration_f32( + let output: f32 = core::time::Duration::div_duration_f32( _self.into_inner(), rhs.into_inner(), ) @@ -561,10 +530,10 @@ impl std::time::Duration { /// assert_eq!(dur1.div_duration_f64(dur2), 0.5); /// ``` fn div_duration_f64( - _self: Val<std::time::Duration>, - rhs: Val<std::time::Duration>, + _self: Val<core::time::Duration>, + rhs: Val<core::time::Duration>, ) -> f64 { - let output: f64 = std::time::Duration::div_duration_f64( + let output: f64 = core::time::Duration::div_duration_f64( _self.into_inner(), rhs.into_inner(), ) @@ -583,11 +552,8 @@ impl std::time::Duration { /// 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<std::time::Duration>, - rhs: f32, - ) -> Val<std::time::Duration> { - let output: Val<std::time::Duration> = std::time::Duration::div_f32( + 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, ) @@ -604,24 +570,14 @@ impl std::time::Duration { /// 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<std::time::Duration>, - rhs: f64, - ) -> Val<std::time::Duration> { - let output: Val<std::time::Duration> = std::time::Duration::div_f64( + 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<std::time::Duration>, other: Ref<std::time::Duration>) -> bool { - let output: bool = <std::time::Duration as std::cmp::PartialEq< - std::time::Duration, - >>::eq(&_self, &other) - .into(); - output - } /// Creates a new `Duration` from the specified number of microseconds. /// # Examples /// ``` @@ -630,10 +586,8 @@ impl std::time::Duration { /// assert_eq!(1, duration.as_secs()); /// assert_eq!(2_000, duration.subsec_nanos()); /// ``` - fn from_micros(micros: u64) -> Val<std::time::Duration> { - let output: Val<std::time::Duration> = std::time::Duration::from_micros( - micros, - ) + fn from_micros(micros: u64) -> Val<core::time::Duration> { + let output: Val<core::time::Duration> = core::time::Duration::from_micros(micros) .into(); output } @@ -645,10 +599,8 @@ impl std::time::Duration { /// assert_eq!(2, duration.as_secs()); /// assert_eq!(569_000_000, duration.subsec_nanos()); /// ``` - fn from_millis(millis: u64) -> Val<std::time::Duration> { - let output: Val<std::time::Duration> = std::time::Duration::from_millis( - millis, - ) + fn from_millis(millis: u64) -> Val<core::time::Duration> { + let output: Val<core::time::Duration> = core::time::Duration::from_millis(millis) .into(); output } @@ -664,8 +616,8 @@ impl std::time::Duration { /// assert_eq!(1, duration.as_secs()); /// assert_eq!(123, duration.subsec_nanos()); /// ``` - fn from_nanos(nanos: u64) -> Val<std::time::Duration> { - let output: Val<std::time::Duration> = std::time::Duration::from_nanos(nanos) + fn from_nanos(nanos: u64) -> Val<core::time::Duration> { + let output: Val<core::time::Duration> = core::time::Duration::from_nanos(nanos) .into(); output } @@ -677,8 +629,8 @@ impl std::time::Duration { /// assert_eq!(5, duration.as_secs()); /// assert_eq!(0, duration.subsec_nanos()); /// ``` - fn from_secs(secs: u64) -> Val<std::time::Duration> { - let output: Val<std::time::Duration> = std::time::Duration::from_secs(secs) + fn from_secs(secs: u64) -> Val<core::time::Duration> { + let output: Val<core::time::Duration> = core::time::Duration::from_secs(secs) .into(); output } @@ -706,10 +658,8 @@ impl std::time::Duration { /// let res = Duration::from_secs_f32(0.999e-9); /// assert_eq!(res, Duration::new(0, 1)); /// ``` - fn from_secs_f32(secs: f32) -> Val<std::time::Duration> { - let output: Val<std::time::Duration> = std::time::Duration::from_secs_f32( - secs, - ) + 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 } @@ -737,10 +687,8 @@ impl std::time::Duration { /// let res = Duration::from_secs_f64(0.999e-9); /// assert_eq!(res, Duration::new(0, 1)); /// ``` - fn from_secs_f64(secs: f64) -> Val<std::time::Duration> { - let output: Val<std::time::Duration> = std::time::Duration::from_secs_f64( - secs, - ) + 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 } @@ -756,15 +704,8 @@ impl std::time::Duration { /// assert!(!Duration::from_nanos(1).is_zero()); /// assert!(!Duration::from_secs(1).is_zero()); /// ``` - fn is_zero(_self: Ref<std::time::Duration>) -> bool { - let output: bool = std::time::Duration::is_zero(&_self).into(); - output - } - fn mul(_self: Val<std::time::Duration>, rhs: u32) -> Val<std::time::Duration> { - let output: Val<std::time::Duration> = <std::time::Duration as std::ops::Mul< - u32, - >>::mul(_self.into_inner(), rhs) - .into(); + fn is_zero(_self: Ref<core::time::Duration>) -> bool { + let output: bool = core::time::Duration::is_zero(&_self).into(); output } /// Multiplies `Duration` by `f32`. @@ -777,11 +718,8 @@ impl std::time::Duration { /// 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<std::time::Duration>, - rhs: f32, - ) -> Val<std::time::Duration> { - let output: Val<std::time::Duration> = std::time::Duration::mul_f32( + 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, ) @@ -798,11 +736,8 @@ impl std::time::Duration { /// 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<std::time::Duration>, - rhs: f64, - ) -> Val<std::time::Duration> { - let output: Val<std::time::Duration> = std::time::Duration::mul_f64( + 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, ) @@ -821,8 +756,8 @@ impl std::time::Duration { /// use std::time::Duration; /// let five_seconds = Duration::new(5, 0); /// ``` - fn new(secs: u64, nanos: u32) -> Val<std::time::Duration> { - let output: Val<std::time::Duration> = std::time::Duration::new(secs, nanos) + fn new(secs: u64, nanos: u32) -> Val<core::time::Duration> { + let output: Val<core::time::Duration> = core::time::Duration::new(secs, nanos) .into(); output } @@ -836,10 +771,10 @@ impl std::time::Duration { /// assert_eq!(Duration::new(1, 0).saturating_add(Duration::new(u64::MAX, 0)), Duration::MAX); /// ``` fn saturating_add( - _self: Val<std::time::Duration>, - rhs: Val<std::time::Duration>, - ) -> Val<std::time::Duration> { - let output: Val<std::time::Duration> = std::time::Duration::saturating_add( + _self: Val<core::time::Duration>, + rhs: Val<core::time::Duration>, + ) -> Val<core::time::Duration> { + let output: Val<core::time::Duration> = core::time::Duration::saturating_add( _self.into_inner(), rhs.into_inner(), ) @@ -856,10 +791,10 @@ impl std::time::Duration { /// assert_eq!(Duration::new(u64::MAX - 1, 0).saturating_mul(2), Duration::MAX); /// ``` fn saturating_mul( - _self: Val<std::time::Duration>, + _self: Val<core::time::Duration>, rhs: u32, - ) -> Val<std::time::Duration> { - let output: Val<std::time::Duration> = std::time::Duration::saturating_mul( + ) -> Val<core::time::Duration> { + let output: Val<core::time::Duration> = core::time::Duration::saturating_mul( _self.into_inner(), rhs, ) @@ -875,26 +810,16 @@ impl std::time::Duration { /// assert_eq!(Duration::new(0, 0).saturating_sub(Duration::new(0, 1)), Duration::ZERO); /// ``` fn saturating_sub( - _self: Val<std::time::Duration>, - rhs: Val<std::time::Duration>, - ) -> Val<std::time::Duration> { - let output: Val<std::time::Duration> = std::time::Duration::saturating_sub( + _self: Val<core::time::Duration>, + rhs: Val<core::time::Duration>, + ) -> Val<core::time::Duration> { + let output: Val<core::time::Duration> = core::time::Duration::saturating_sub( _self.into_inner(), rhs.into_inner(), ) .into(); output } - fn sub( - _self: Val<std::time::Duration>, - rhs: Val<std::time::Duration>, - ) -> Val<std::time::Duration> { - let output: Val<std::time::Duration> = <std::time::Duration as std::ops::Sub< - std::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 @@ -906,8 +831,8 @@ impl std::time::Duration { /// assert_eq!(duration.as_secs(), 1); /// assert_eq!(duration.subsec_micros(), 234_567); /// ``` - fn subsec_micros(_self: Ref<std::time::Duration>) -> u32 { - let output: u32 = std::time::Duration::subsec_micros(&_self).into(); + fn subsec_micros(_self: Ref<core::time::Duration>) -> u32 { + let output: u32 = core::time::Duration::subsec_micros(&_self).into(); output } /// Returns the fractional part of this `Duration`, in whole milliseconds. @@ -921,8 +846,8 @@ impl std::time::Duration { /// assert_eq!(duration.as_secs(), 5); /// assert_eq!(duration.subsec_millis(), 432); /// ``` - fn subsec_millis(_self: Ref<std::time::Duration>) -> u32 { - let output: u32 = std::time::Duration::subsec_millis(&_self).into(); + fn subsec_millis(_self: Ref<core::time::Duration>) -> u32 { + let output: u32 = core::time::Duration::subsec_millis(&_self).into(); output } /// Returns the fractional part of this `Duration`, in nanoseconds. @@ -936,8 +861,8 @@ impl std::time::Duration { /// assert_eq!(duration.as_secs(), 5); /// assert_eq!(duration.subsec_nanos(), 10_000_000); /// ``` - fn subsec_nanos(_self: Ref<std::time::Duration>) -> u32 { - let output: u32 = std::time::Duration::subsec_nanos(&_self).into(); + fn subsec_nanos(_self: Ref<core::time::Duration>) -> u32 { + let output: u32 = core::time::Duration::subsec_nanos(&_self).into(); output } } @@ -947,34 +872,7 @@ impl std::time::Duration { bms_core_path = "bevy_mod_scripting_core", generated )] -impl bevy::platform::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<bevy::platform::time::Instant>, - other: Val<std::time::Duration>, - ) -> Val<bevy::platform::time::Instant> { - let output: Val<bevy::platform::time::Instant> = <bevy::platform::time::Instant as std::ops::Add< - std::time::Duration, - >>::add(_self.into_inner(), other.into_inner()) - .into(); - output - } - fn assert_receiver_is_total_eq(_self: Ref<bevy::platform::time::Instant>) -> () { - let output: () = <bevy::platform::time::Instant as std::cmp::Eq>::assert_receiver_is_total_eq( - &_self, - ) - .into(); - output - } - fn clone(_self: Ref<bevy::platform::time::Instant>) -> Val<bevy::platform::time::Instant> { - let output: Val<bevy::platform::time::Instant> = <bevy::platform::time::Instant as bevy::reflect::erased_serde::__private::serde::__private::Clone>::clone( - &_self, - ) - .into(); - output - } +impl std::time::Instant { /// Returns the amount of time elapsed from another instant to this one, /// or zero duration if that instant is later than this one. /// # Panics @@ -993,10 +891,10 @@ impl bevy::platform::time::Instant { /// println!("{:?}", now.duration_since(new_now)); // 0ns /// ``` fn duration_since( - _self: Ref<bevy::platform::time::Instant>, - earlier: Val<bevy::platform::time::Instant>, - ) -> Val<std::time::Duration> { - let output: Val<std::time::Duration> = bevy::platform::time::Instant::duration_since( + _self: Ref<std::time::Instant>, + earlier: Val<std::time::Instant>, + ) -> Val<core::time::Duration> { + let output: Val<core::time::Duration> = std::time::Instant::duration_since( &_self, earlier.into_inner(), ) @@ -1018,15 +916,8 @@ impl bevy::platform::time::Instant { /// sleep(three_secs); /// assert!(instant.elapsed() >= three_secs); /// ``` - fn elapsed(_self: Ref<bevy::platform::time::Instant>) -> Val<std::time::Duration> { - let output: Val<std::time::Duration> = bevy::platform::time::Instant::elapsed(&_self) - .into(); - output - } - fn eq(_self: Ref<bevy::platform::time::Instant>, other: Ref<bevy::platform::time::Instant>) -> bool { - let output: bool = <bevy::platform::time::Instant as std::cmp::PartialEq< - bevy::platform::time::Instant, - >>::eq(&_self, &other) + fn elapsed(_self: Ref<std::time::Instant>) -> Val<core::time::Duration> { + let output: Val<core::time::Duration> = std::time::Instant::elapsed(&_self) .into(); output } @@ -1036,8 +927,8 @@ impl bevy::platform::time::Instant { /// use std::time::Instant; /// let now = Instant::now(); /// ``` - fn now() -> Val<bevy::platform::time::Instant> { - let output: Val<bevy::platform::time::Instant> = bevy::platform::time::Instant::now().into(); + fn now() -> Val<std::time::Instant> { + let output: Val<std::time::Instant> = std::time::Instant::now().into(); output } /// Returns the amount of time elapsed from another instant to this one, @@ -1053,43 +944,16 @@ impl bevy::platform::time::Instant { /// println!("{:?}", now.saturating_duration_since(new_now)); // 0ns /// ``` fn saturating_duration_since( - _self: Ref<bevy::platform::time::Instant>, - earlier: Val<bevy::platform::time::Instant>, - ) -> Val<std::time::Duration> { - let output: Val<std::time::Duration> = bevy::platform::time::Instant::saturating_duration_since( + _self: Ref<std::time::Instant>, + earlier: Val<std::time::Instant>, + ) -> Val<core::time::Duration> { + let output: Val<core::time::Duration> = std::time::Instant::saturating_duration_since( &_self, earlier.into_inner(), ) .into(); output } - fn sub( - _self: Val<bevy::platform::time::Instant>, - other: Val<std::time::Duration>, - ) -> Val<bevy::platform::time::Instant> { - let output: Val<bevy::platform::time::Instant> = <bevy::platform::time::Instant as std::ops::Sub< - std::time::Duration, - >>::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<bevy::platform::time::Instant>, - other: Val<bevy::platform::time::Instant>, - ) -> Val<std::time::Duration> { - let output: Val<std::time::Duration> = <bevy::platform::time::Instant as std::ops::Sub< - bevy::platform::time::Instant, - >>::sub(_self.into_inner(), other.into_inner()) - .into(); - output - } } #[script_bindings( remote, @@ -1097,26 +961,27 @@ impl bevy::platform::time::Instant { bms_core_path = "bevy_mod_scripting_core", generated )] -impl std::ops::RangeFull { - fn assert_receiver_is_total_eq(_self: Ref<std::ops::RangeFull>) -> () { - let output: () = <std::ops::RangeFull as std::cmp::Eq>::assert_receiver_is_total_eq( - &_self, - ) - .into(); - output - } - fn clone(_self: Ref<std::ops::RangeFull>) -> Val<std::ops::RangeFull> { - let output: Val<std::ops::RangeFull> = <std::ops::RangeFull as bevy::reflect::erased_serde::__private::serde::__private::Clone>::clone( - &_self, - ) - .into(); - output - } - fn eq(_self: Ref<std::ops::RangeFull>, other: Ref<std::ops::RangeFull>) -> bool { - let output: bool = <std::ops::RangeFull as std::cmp::PartialEq< - std::ops::RangeFull, - >>::eq(&_self, &other) - .into(); +impl core::ops::RangeFull {} +#[script_bindings( + remote, + name = "type_id_functions", + bms_core_path = "bevy_mod_scripting_core", + generated +)] +impl core::any::TypeId { + /// Returns the `TypeId` of the type this generic function has been + /// instantiated with. + /// # Examples + /// ``` + /// use std::any::{Any, TypeId}; + /// fn is_string<T: ?Sized + Any>(_s: &T) -> bool { + /// TypeId::of::<String>() == TypeId::of::<T>() + /// } + /// assert_eq!(is_string(&0), false); + /// assert_eq!(is_string(&"cookie monster".to_string()), true); + /// ``` + fn of() -> Val<core::any::TypeId> { + let output: Val<core::any::TypeId> = core::any::TypeId::of().into(); output } } @@ -1147,20 +1012,6 @@ impl bevy::math::Quat { .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<bevy::math::Quat>, - rhs: Val<bevy::math::Quat>, - ) -> Val<bevy::math::Quat> { - let output: Val<bevy::math::Quat> = <bevy::math::Quat as std::ops::Add< - bevy::math::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. @@ -1181,13 +1032,6 @@ impl bevy::math::Quat { .into(); output } - fn clone(_self: Ref<bevy::math::Quat>) -> Val<bevy::math::Quat> { - let output: Val<bevy::math::Quat> = <bevy::math::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<bevy::math::Quat>) -> Val<bevy::math::Quat> { @@ -1197,15 +1041,6 @@ impl bevy::math::Quat { .into(); output } - /// Divides a quaternion by a scalar value. - /// The quotient is not guaranteed to be normalized. - fn div(_self: Val<bevy::math::Quat>, rhs: f32) -> Val<bevy::math::Quat> { - let output: Val<bevy::math::Quat> = <bevy::math::Quat as std::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<bevy::math::Quat>, rhs: Val<bevy::math::Quat>) -> f32 { @@ -1213,13 +1048,6 @@ impl bevy::math::Quat { .into(); output } - fn eq(_self: Ref<bevy::math::Quat>, rhs: Ref<bevy::math::Quat>) -> bool { - let output: bool = <bevy::math::Quat as std::cmp::PartialEq< - bevy::math::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. @@ -1473,54 +1301,6 @@ impl bevy::math::Quat { } /// 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<bevy::math::Quat>, - rhs: Val<bevy::math::Quat>, - ) -> Val<bevy::math::Quat> { - let output: Val<bevy::math::Quat> = <bevy::math::Quat as std::ops::Mul< - bevy::math::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<bevy::math::Quat>, - rhs: Val<bevy::math::Vec3>, - ) -> Val<bevy::math::Vec3> { - let output: Val<bevy::math::Vec3> = <bevy::math::Quat as std::ops::Mul< - bevy::math::Vec3, - >>::mul(_self.into_inner(), rhs.into_inner()) - .into(); - output - } - fn mul( - _self: Val<bevy::math::Quat>, - rhs: Val<bevy::math::Vec3A>, - ) -> Val<bevy::math::Vec3A> { - let output: Val<bevy::math::Vec3A> = <bevy::math::Quat as std::ops::Mul< - bevy::math::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<bevy::math::Quat>, rhs: f32) -> Val<bevy::math::Quat> { - let output: Val<bevy::math::Quat> = <bevy::math::Quat as std::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. @@ -1561,13 +1341,6 @@ impl bevy::math::Quat { .into(); output } - fn neg(_self: Val<bevy::math::Quat>) -> Val<bevy::math::Quat> { - let output: Val<bevy::math::Quat> = <bevy::math::Quat as std::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 @@ -1618,18 +1391,6 @@ impl bevy::math::Quat { .into(); output } - /// Subtracts the `rhs` quaternion from `self`. - /// The difference is not guaranteed to be normalized. - fn sub( - _self: Val<bevy::math::Quat>, - rhs: Val<bevy::math::Quat>, - ) -> Val<bevy::math::Quat> { - let output: Val<bevy::math::Quat> = <bevy::math::Quat as std::ops::Sub< - bevy::math::Quat, - >>::sub(_self.into_inner(), rhs.into_inner()) - .into(); - output - } /// `[x, y, z, w]` fn to_array(_self: Ref<bevy::math::Quat>) -> [f32; 4] { let output: [f32; 4] = bevy::math::Quat::to_array(&_self).into(); @@ -1695,33 +1456,6 @@ impl bevy::math::Vec3 { .into(); output } - fn add( - _self: Val<bevy::math::Vec3>, - rhs: Ref<bevy::math::Vec3>, - ) -> Val<bevy::math::Vec3> { - let output: Val<bevy::math::Vec3> = <bevy::math::Vec3 as std::ops::Add< - &bevy::math::Vec3, - >>::add(_self.into_inner(), &rhs) - .into(); - output - } - fn add( - _self: Val<bevy::math::Vec3>, - rhs: Val<bevy::math::Vec3>, - ) -> Val<bevy::math::Vec3> { - let output: Val<bevy::math::Vec3> = <bevy::math::Vec3 as std::ops::Add< - bevy::math::Vec3, - >>::add(_self.into_inner(), rhs.into_inner()) - .into(); - output - } - fn add(_self: Val<bevy::math::Vec3>, rhs: f32) -> Val<bevy::math::Vec3> { - let output: Val<bevy::math::Vec3> = <bevy::math::Vec3 as std::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<bevy::math::Vec3>, rhs: Val<bevy::math::Vec3>) -> f32 { @@ -1759,23 +1493,45 @@ impl bevy::math::Vec3 { let output: Val<bevy::math::DVec3> = bevy::math::Vec3::as_dvec3(&_self).into(); output } + /// Casts all elements of `self` to `i16`. + fn as_i16vec3(_self: Ref<bevy::math::Vec3>) -> Val<bevy::math::I16Vec3> { + let output: Val<bevy::math::I16Vec3> = bevy::math::Vec3::as_i16vec3(&_self) + .into(); + output + } /// Casts all elements of `self` to `i64`. fn as_i64vec3(_self: Ref<bevy::math::Vec3>) -> Val<bevy::math::I64Vec3> { let output: Val<bevy::math::I64Vec3> = bevy::math::Vec3::as_i64vec3(&_self) .into(); output } + /// Casts all elements of `self` to `i8`. + fn as_i8vec3(_self: Ref<bevy::math::Vec3>) -> Val<bevy::math::I8Vec3> { + let output: Val<bevy::math::I8Vec3> = bevy::math::Vec3::as_i8vec3(&_self).into(); + output + } /// Casts all elements of `self` to `i32`. fn as_ivec3(_self: Ref<bevy::math::Vec3>) -> Val<bevy::math::IVec3> { let output: Val<bevy::math::IVec3> = bevy::math::Vec3::as_ivec3(&_self).into(); output } + /// Casts all elements of `self` to `u16`. + fn as_u16vec3(_self: Ref<bevy::math::Vec3>) -> Val<bevy::math::U16Vec3> { + let output: Val<bevy::math::U16Vec3> = bevy::math::Vec3::as_u16vec3(&_self) + .into(); + output + } /// Casts all elements of `self` to `u64`. fn as_u64vec3(_self: Ref<bevy::math::Vec3>) -> Val<bevy::math::U64Vec3> { let output: Val<bevy::math::U64Vec3> = bevy::math::Vec3::as_u64vec3(&_self) .into(); output } + /// Casts all elements of `self` to `u8`. + fn as_u8vec3(_self: Ref<bevy::math::Vec3>) -> Val<bevy::math::U8Vec3> { + let output: Val<bevy::math::U8Vec3> = bevy::math::Vec3::as_u8vec3(&_self).into(); + output + } /// Casts all elements of `self` to `u32`. fn as_uvec3(_self: Ref<bevy::math::Vec3>) -> Val<bevy::math::UVec3> { let output: Val<bevy::math::UVec3> = bevy::math::Vec3::as_uvec3(&_self).into(); @@ -1849,13 +1605,6 @@ impl bevy::math::Vec3 { .into(); output } - fn clone(_self: Ref<bevy::math::Vec3>) -> Val<bevy::math::Vec3> { - let output: Val<bevy::math::Vec3> = <bevy::math::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 @@ -1991,33 +1740,6 @@ impl bevy::math::Vec3 { .into(); output } - fn div( - _self: Val<bevy::math::Vec3>, - rhs: Ref<bevy::math::Vec3>, - ) -> Val<bevy::math::Vec3> { - let output: Val<bevy::math::Vec3> = <bevy::math::Vec3 as std::ops::Div< - &bevy::math::Vec3, - >>::div(_self.into_inner(), &rhs) - .into(); - output - } - fn div( - _self: Val<bevy::math::Vec3>, - rhs: Val<bevy::math::Vec3>, - ) -> Val<bevy::math::Vec3> { - let output: Val<bevy::math::Vec3> = <bevy::math::Vec3 as std::ops::Div< - bevy::math::Vec3, - >>::div(_self.into_inner(), rhs.into_inner()) - .into(); - output - } - fn div(_self: Val<bevy::math::Vec3>, rhs: f32) -> Val<bevy::math::Vec3> { - let output: Val<bevy::math::Vec3> = <bevy::math::Vec3 as std::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<bevy::math::Vec3>, @@ -2060,13 +1782,6 @@ impl bevy::math::Vec3 { let output: f32 = bevy::math::Vec3::element_sum(_self.into_inner()).into(); output } - fn eq(_self: Ref<bevy::math::Vec3>, other: Ref<bevy::math::Vec3>) -> bool { - let output: bool = <bevy::math::Vec3 as std::cmp::PartialEq< - bevy::math::Vec3, - >>::eq(&_self, &other) - .into(); - output - } /// Returns a vector containing `e^self` (the exponential function) for each element of /// `self`. fn exp(_self: Val<bevy::math::Vec3>) -> Val<bevy::math::Vec3> { @@ -2261,33 +1976,6 @@ impl bevy::math::Vec3 { .into(); output } - fn mul( - _self: Val<bevy::math::Vec3>, - rhs: Ref<bevy::math::Vec3>, - ) -> Val<bevy::math::Vec3> { - let output: Val<bevy::math::Vec3> = <bevy::math::Vec3 as std::ops::Mul< - &bevy::math::Vec3, - >>::mul(_self.into_inner(), &rhs) - .into(); - output - } - fn mul( - _self: Val<bevy::math::Vec3>, - rhs: Val<bevy::math::Vec3>, - ) -> Val<bevy::math::Vec3> { - let output: Val<bevy::math::Vec3> = <bevy::math::Vec3 as std::ops::Mul< - bevy::math::Vec3, - >>::mul(_self.into_inner(), rhs.into_inner()) - .into(); - output - } - fn mul(_self: Val<bevy::math::Vec3>, rhs: f32) -> Val<bevy::math::Vec3> { - let output: Val<bevy::math::Vec3> = <bevy::math::Vec3 as std::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 @@ -2307,13 +1995,6 @@ impl bevy::math::Vec3 { .into(); output } - fn neg(_self: Val<bevy::math::Vec3>) -> Val<bevy::math::Vec3> { - let output: Val<bevy::math::Vec3> = <bevy::math::Vec3 as std::ops::Neg>::neg( - _self.into_inner(), - ) - .into(); - output - } /// Creates a new vector. fn new(x: f32, y: f32, z: f32) -> Val<bevy::math::Vec3> { let output: Val<bevy::math::Vec3> = bevy::math::Vec3::new(x, y, z).into(); @@ -2469,33 +2150,6 @@ impl bevy::math::Vec3 { .into(); output } - fn rem( - _self: Val<bevy::math::Vec3>, - rhs: Ref<bevy::math::Vec3>, - ) -> Val<bevy::math::Vec3> { - let output: Val<bevy::math::Vec3> = <bevy::math::Vec3 as std::ops::Rem< - &bevy::math::Vec3, - >>::rem(_self.into_inner(), &rhs) - .into(); - output - } - fn rem( - _self: Val<bevy::math::Vec3>, - rhs: Val<bevy::math::Vec3>, - ) -> Val<bevy::math::Vec3> { - let output: Val<bevy::math::Vec3> = <bevy::math::Vec3 as std::ops::Rem< - bevy::math::Vec3, - >>::rem(_self.into_inner(), rhs.into_inner()) - .into(); - output - } - fn rem(_self: Val<bevy::math::Vec3>, rhs: f32) -> Val<bevy::math::Vec3> { - let output: Val<bevy::math::Vec3> = <bevy::math::Vec3 as std::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( @@ -2547,33 +2201,6 @@ impl bevy::math::Vec3 { let output: Val<bevy::math::Vec3> = bevy::math::Vec3::splat(v).into(); output } - fn sub( - _self: Val<bevy::math::Vec3>, - rhs: Ref<bevy::math::Vec3>, - ) -> Val<bevy::math::Vec3> { - let output: Val<bevy::math::Vec3> = <bevy::math::Vec3 as std::ops::Sub< - &bevy::math::Vec3, - >>::sub(_self.into_inner(), &rhs) - .into(); - output - } - fn sub( - _self: Val<bevy::math::Vec3>, - rhs: Val<bevy::math::Vec3>, - ) -> Val<bevy::math::Vec3> { - let output: Val<bevy::math::Vec3> = <bevy::math::Vec3 as std::ops::Sub< - bevy::math::Vec3, - >>::sub(_self.into_inner(), rhs.into_inner()) - .into(); - output - } - fn sub(_self: Val<bevy::math::Vec3>, rhs: f32) -> Val<bevy::math::Vec3> { - let output: Val<bevy::math::Vec3> = <bevy::math::Vec3 as std::ops::Sub< - f32, - >>::sub(_self.into_inner(), rhs) - .into(); - output - } /// `[x, y, z]` fn to_array(_self: Ref<bevy::math::Vec3>) -> [f32; 3] { let output: [f32; 3] = bevy::math::Vec3::to_array(&_self).into(); @@ -2625,48 +2252,88 @@ impl bevy::math::Vec3 { } #[script_bindings( remote, - name = "i_vec_2_functions", + name = "socket_addr_functions", bms_core_path = "bevy_mod_scripting_core", generated )] -impl bevy::math::IVec2 { - /// Returns a vector containing the absolute value of each element of `self`. - fn abs(_self: Val<bevy::math::IVec2>) -> Val<bevy::math::IVec2> { - let output: Val<bevy::math::IVec2> = bevy::math::IVec2::abs(_self.into_inner()) - .into(); +impl core::net::SocketAddr { + /// 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 } - fn add( - _self: Val<bevy::math::IVec2>, - rhs: Ref<bevy::math::IVec2>, - ) -> Val<bevy::math::IVec2> { - let output: Val<bevy::math::IVec2> = <bevy::math::IVec2 as std::ops::Add< - &bevy::math::IVec2, - >>::add(_self.into_inner(), &rhs) - .into(); + /// 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 } - fn add( - _self: Val<bevy::math::IVec2>, - rhs: Val<bevy::math::IVec2>, - ) -> Val<bevy::math::IVec2> { - let output: Val<bevy::math::IVec2> = <bevy::math::IVec2 as std::ops::Add< - bevy::math::IVec2, - >>::add(_self.into_inner(), rhs.into_inner()) - .into(); + /// 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 } - fn add(_self: Val<bevy::math::IVec2>, rhs: i32) -> Val<bevy::math::IVec2> { - let output: Val<bevy::math::IVec2> = <bevy::math::IVec2 as std::ops::Add< - i32, - >>::add(_self.into_inner(), rhs) - .into(); + /// 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 } - /// Casts all elements of `self` to `f64`. - fn as_dvec2(_self: Ref<bevy::math::IVec2>) -> Val<bevy::math::DVec2> { - let output: Val<bevy::math::DVec2> = bevy::math::IVec2::as_dvec2(&_self).into(); - output +} +#[script_bindings( + remote, + name = "i_vec_2_functions", + bms_core_path = "bevy_mod_scripting_core", + generated +)] +impl bevy::math::IVec2 { + /// Returns a vector containing the absolute value of each element of `self`. + fn abs(_self: Val<bevy::math::IVec2>) -> Val<bevy::math::IVec2> { + let output: Val<bevy::math::IVec2> = bevy::math::IVec2::abs(_self.into_inner()) + .into(); + output + } + /// Casts all elements of `self` to `f64`. + fn as_dvec2(_self: Ref<bevy::math::IVec2>) -> Val<bevy::math::DVec2> { + let output: Val<bevy::math::DVec2> = bevy::math::IVec2::as_dvec2(&_self).into(); + output + } + /// Casts all elements of `self` to `i16`. + fn as_i16vec2(_self: Ref<bevy::math::IVec2>) -> Val<bevy::math::I16Vec2> { + let output: Val<bevy::math::I16Vec2> = bevy::math::IVec2::as_i16vec2(&_self) + .into(); + output } /// Casts all elements of `self` to `i64`. fn as_i64vec2(_self: Ref<bevy::math::IVec2>) -> Val<bevy::math::I64Vec2> { @@ -2674,12 +2341,30 @@ impl bevy::math::IVec2 { .into(); output } + /// Casts all elements of `self` to `i8`. + fn as_i8vec2(_self: Ref<bevy::math::IVec2>) -> Val<bevy::math::I8Vec2> { + let output: Val<bevy::math::I8Vec2> = bevy::math::IVec2::as_i8vec2(&_self) + .into(); + output + } + /// Casts all elements of `self` to `u16`. + fn as_u16vec2(_self: Ref<bevy::math::IVec2>) -> Val<bevy::math::U16Vec2> { + let output: Val<bevy::math::U16Vec2> = bevy::math::IVec2::as_u16vec2(&_self) + .into(); + output + } /// Casts all elements of `self` to `u64`. fn as_u64vec2(_self: Ref<bevy::math::IVec2>) -> Val<bevy::math::U64Vec2> { let output: Val<bevy::math::U64Vec2> = bevy::math::IVec2::as_u64vec2(&_self) .into(); output } + /// Casts all elements of `self` to `u8`. + fn as_u8vec2(_self: Ref<bevy::math::IVec2>) -> Val<bevy::math::U8Vec2> { + let output: Val<bevy::math::U8Vec2> = bevy::math::IVec2::as_u8vec2(&_self) + .into(); + output + } /// Casts all elements of `self` to `u32`. fn as_uvec2(_self: Ref<bevy::math::IVec2>) -> Val<bevy::math::UVec2> { let output: Val<bevy::math::UVec2> = bevy::math::IVec2::as_uvec2(&_self).into(); @@ -2690,13 +2375,6 @@ impl bevy::math::IVec2 { let output: Val<bevy::math::Vec2> = bevy::math::IVec2::as_vec2(&_self).into(); output } - fn assert_receiver_is_total_eq(_self: Ref<bevy::math::IVec2>) -> () { - let output: () = <bevy::math::IVec2 as std::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 @@ -2714,13 +2392,6 @@ impl bevy::math::IVec2 { .into(); output } - fn clone(_self: Ref<bevy::math::IVec2>) -> Val<bevy::math::IVec2> { - let output: Val<bevy::math::IVec2> = <bevy::math::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 @@ -2823,33 +2494,6 @@ impl bevy::math::IVec2 { .into(); output } - fn div( - _self: Val<bevy::math::IVec2>, - rhs: Ref<bevy::math::IVec2>, - ) -> Val<bevy::math::IVec2> { - let output: Val<bevy::math::IVec2> = <bevy::math::IVec2 as std::ops::Div< - &bevy::math::IVec2, - >>::div(_self.into_inner(), &rhs) - .into(); - output - } - fn div( - _self: Val<bevy::math::IVec2>, - rhs: Val<bevy::math::IVec2>, - ) -> Val<bevy::math::IVec2> { - let output: Val<bevy::math::IVec2> = <bevy::math::IVec2 as std::ops::Div< - bevy::math::IVec2, - >>::div(_self.into_inner(), rhs.into_inner()) - .into(); - output - } - fn div(_self: Val<bevy::math::IVec2>, rhs: i32) -> Val<bevy::math::IVec2> { - let output: Val<bevy::math::IVec2> = <bevy::math::IVec2 as std::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. @@ -2894,13 +2538,6 @@ impl bevy::math::IVec2 { let output: i32 = bevy::math::IVec2::element_sum(_self.into_inner()).into(); output } - fn eq(_self: Ref<bevy::math::IVec2>, other: Ref<bevy::math::IVec2>) -> bool { - let output: bool = <bevy::math::IVec2 as std::cmp::PartialEq< - bevy::math::IVec2, - >>::eq(&_self, &other) - .into(); - output - } /// Creates a 3D vector from `self` and the given `z` value. fn extend(_self: Val<bevy::math::IVec2>, z: i32) -> Val<bevy::math::IVec3> { let output: Val<bevy::math::IVec3> = bevy::math::IVec2::extend( @@ -2966,40 +2603,6 @@ impl bevy::math::IVec2 { let output: i32 = bevy::math::IVec2::min_element(_self.into_inner()).into(); output } - fn mul( - _self: Val<bevy::math::IVec2>, - rhs: Ref<bevy::math::IVec2>, - ) -> Val<bevy::math::IVec2> { - let output: Val<bevy::math::IVec2> = <bevy::math::IVec2 as std::ops::Mul< - &bevy::math::IVec2, - >>::mul(_self.into_inner(), &rhs) - .into(); - output - } - fn mul( - _self: Val<bevy::math::IVec2>, - rhs: Val<bevy::math::IVec2>, - ) -> Val<bevy::math::IVec2> { - let output: Val<bevy::math::IVec2> = <bevy::math::IVec2 as std::ops::Mul< - bevy::math::IVec2, - >>::mul(_self.into_inner(), rhs.into_inner()) - .into(); - output - } - fn mul(_self: Val<bevy::math::IVec2>, rhs: i32) -> Val<bevy::math::IVec2> { - let output: Val<bevy::math::IVec2> = <bevy::math::IVec2 as std::ops::Mul< - i32, - >>::mul(_self.into_inner(), rhs) - .into(); - output - } - fn neg(_self: Val<bevy::math::IVec2>) -> Val<bevy::math::IVec2> { - let output: Val<bevy::math::IVec2> = <bevy::math::IVec2 as std::ops::Neg>::neg( - _self.into_inner(), - ) - .into(); - output - } /// Creates a new vector. fn new(x: i32, y: i32) -> Val<bevy::math::IVec2> { let output: Val<bevy::math::IVec2> = bevy::math::IVec2::new(x, y).into(); @@ -3021,33 +2624,6 @@ impl bevy::math::IVec2 { .into(); output } - fn rem( - _self: Val<bevy::math::IVec2>, - rhs: Ref<bevy::math::IVec2>, - ) -> Val<bevy::math::IVec2> { - let output: Val<bevy::math::IVec2> = <bevy::math::IVec2 as std::ops::Rem< - &bevy::math::IVec2, - >>::rem(_self.into_inner(), &rhs) - .into(); - output - } - fn rem( - _self: Val<bevy::math::IVec2>, - rhs: Val<bevy::math::IVec2>, - ) -> Val<bevy::math::IVec2> { - let output: Val<bevy::math::IVec2> = <bevy::math::IVec2 as std::ops::Rem< - bevy::math::IVec2, - >>::rem(_self.into_inner(), rhs.into_inner()) - .into(); - output - } - fn rem(_self: Val<bevy::math::IVec2>, rhs: i32) -> Val<bevy::math::IVec2> { - let output: Val<bevy::math::IVec2> = <bevy::math::IVec2 as std::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. @@ -3187,33 +2763,6 @@ impl bevy::math::IVec2 { let output: Val<bevy::math::IVec2> = bevy::math::IVec2::splat(v).into(); output } - fn sub( - _self: Val<bevy::math::IVec2>, - rhs: Ref<bevy::math::IVec2>, - ) -> Val<bevy::math::IVec2> { - let output: Val<bevy::math::IVec2> = <bevy::math::IVec2 as std::ops::Sub< - &bevy::math::IVec2, - >>::sub(_self.into_inner(), &rhs) - .into(); - output - } - fn sub( - _self: Val<bevy::math::IVec2>, - rhs: Val<bevy::math::IVec2>, - ) -> Val<bevy::math::IVec2> { - let output: Val<bevy::math::IVec2> = <bevy::math::IVec2 as std::ops::Sub< - bevy::math::IVec2, - >>::sub(_self.into_inner(), rhs.into_inner()) - .into(); - output - } - fn sub(_self: Val<bevy::math::IVec2>, rhs: i32) -> Val<bevy::math::IVec2> { - let output: Val<bevy::math::IVec2> = <bevy::math::IVec2 as std::ops::Sub< - i32, - >>::sub(_self.into_inner(), rhs) - .into(); - output - } /// `[x, y]` fn to_array(_self: Ref<bevy::math::IVec2>) -> [i32; 2] { let output: [i32; 2] = bevy::math::IVec2::to_array(&_self).into(); @@ -3329,41 +2878,32 @@ impl bevy::math::IVec3 { .into(); output } - fn add( - _self: Val<bevy::math::IVec3>, - rhs: Ref<bevy::math::IVec3>, - ) -> Val<bevy::math::IVec3> { - let output: Val<bevy::math::IVec3> = <bevy::math::IVec3 as std::ops::Add< - &bevy::math::IVec3, - >>::add(_self.into_inner(), &rhs) - .into(); + /// Casts all elements of `self` to `f64`. + fn as_dvec3(_self: Ref<bevy::math::IVec3>) -> Val<bevy::math::DVec3> { + let output: Val<bevy::math::DVec3> = bevy::math::IVec3::as_dvec3(&_self).into(); output } - fn add( - _self: Val<bevy::math::IVec3>, - rhs: Val<bevy::math::IVec3>, - ) -> Val<bevy::math::IVec3> { - let output: Val<bevy::math::IVec3> = <bevy::math::IVec3 as std::ops::Add< - bevy::math::IVec3, - >>::add(_self.into_inner(), rhs.into_inner()) + /// Casts all elements of `self` to `i16`. + fn as_i16vec3(_self: Ref<bevy::math::IVec3>) -> Val<bevy::math::I16Vec3> { + let output: Val<bevy::math::I16Vec3> = bevy::math::IVec3::as_i16vec3(&_self) .into(); output } - fn add(_self: Val<bevy::math::IVec3>, rhs: i32) -> Val<bevy::math::IVec3> { - let output: Val<bevy::math::IVec3> = <bevy::math::IVec3 as std::ops::Add< - i32, - >>::add(_self.into_inner(), rhs) + /// Casts all elements of `self` to `i64`. + fn as_i64vec3(_self: Ref<bevy::math::IVec3>) -> Val<bevy::math::I64Vec3> { + let output: Val<bevy::math::I64Vec3> = bevy::math::IVec3::as_i64vec3(&_self) .into(); output } - /// Casts all elements of `self` to `f64`. - fn as_dvec3(_self: Ref<bevy::math::IVec3>) -> Val<bevy::math::DVec3> { - let output: Val<bevy::math::DVec3> = bevy::math::IVec3::as_dvec3(&_self).into(); + /// Casts all elements of `self` to `i8`. + fn as_i8vec3(_self: Ref<bevy::math::IVec3>) -> Val<bevy::math::I8Vec3> { + let output: Val<bevy::math::I8Vec3> = bevy::math::IVec3::as_i8vec3(&_self) + .into(); output } - /// Casts all elements of `self` to `i64`. - fn as_i64vec3(_self: Ref<bevy::math::IVec3>) -> Val<bevy::math::I64Vec3> { - let output: Val<bevy::math::I64Vec3> = bevy::math::IVec3::as_i64vec3(&_self) + /// Casts all elements of `self` to `u16`. + fn as_u16vec3(_self: Ref<bevy::math::IVec3>) -> Val<bevy::math::U16Vec3> { + let output: Val<bevy::math::U16Vec3> = bevy::math::IVec3::as_u16vec3(&_self) .into(); output } @@ -3373,6 +2913,12 @@ impl bevy::math::IVec3 { .into(); output } + /// Casts all elements of `self` to `u8`. + fn as_u8vec3(_self: Ref<bevy::math::IVec3>) -> Val<bevy::math::U8Vec3> { + let output: Val<bevy::math::U8Vec3> = bevy::math::IVec3::as_u8vec3(&_self) + .into(); + output + } /// Casts all elements of `self` to `u32`. fn as_uvec3(_self: Ref<bevy::math::IVec3>) -> Val<bevy::math::UVec3> { let output: Val<bevy::math::UVec3> = bevy::math::IVec3::as_uvec3(&_self).into(); @@ -3388,13 +2934,6 @@ impl bevy::math::IVec3 { let output: Val<bevy::math::Vec3A> = bevy::math::IVec3::as_vec3a(&_self).into(); output } - fn assert_receiver_is_total_eq(_self: Ref<bevy::math::IVec3>) -> () { - let output: () = <bevy::math::IVec3 as std::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 @@ -3412,13 +2951,6 @@ impl bevy::math::IVec3 { .into(); output } - fn clone(_self: Ref<bevy::math::IVec3>) -> Val<bevy::math::IVec3> { - let output: Val<bevy::math::IVec3> = <bevy::math::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 @@ -3533,33 +3065,6 @@ impl bevy::math::IVec3 { .into(); output } - fn div( - _self: Val<bevy::math::IVec3>, - rhs: Ref<bevy::math::IVec3>, - ) -> Val<bevy::math::IVec3> { - let output: Val<bevy::math::IVec3> = <bevy::math::IVec3 as std::ops::Div< - &bevy::math::IVec3, - >>::div(_self.into_inner(), &rhs) - .into(); - output - } - fn div( - _self: Val<bevy::math::IVec3>, - rhs: Val<bevy::math::IVec3>, - ) -> Val<bevy::math::IVec3> { - let output: Val<bevy::math::IVec3> = <bevy::math::IVec3 as std::ops::Div< - bevy::math::IVec3, - >>::div(_self.into_inner(), rhs.into_inner()) - .into(); - output - } - fn div(_self: Val<bevy::math::IVec3>, rhs: i32) -> Val<bevy::math::IVec3> { - let output: Val<bevy::math::IVec3> = <bevy::math::IVec3 as std::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. @@ -3604,13 +3109,6 @@ impl bevy::math::IVec3 { let output: i32 = bevy::math::IVec3::element_sum(_self.into_inner()).into(); output } - fn eq(_self: Ref<bevy::math::IVec3>, other: Ref<bevy::math::IVec3>) -> bool { - let output: bool = <bevy::math::IVec3 as std::cmp::PartialEq< - bevy::math::IVec3, - >>::eq(&_self, &other) - .into(); - output - } /// Creates a 4D vector from `self` and the given `w` value. fn extend(_self: Val<bevy::math::IVec3>, w: i32) -> Val<bevy::math::IVec4> { let output: Val<bevy::math::IVec4> = bevy::math::IVec3::extend( @@ -3676,72 +3174,11 @@ impl bevy::math::IVec3 { let output: i32 = bevy::math::IVec3::min_element(_self.into_inner()).into(); output } - fn mul( - _self: Val<bevy::math::IVec3>, - rhs: Ref<bevy::math::IVec3>, - ) -> Val<bevy::math::IVec3> { - let output: Val<bevy::math::IVec3> = <bevy::math::IVec3 as std::ops::Mul< - &bevy::math::IVec3, - >>::mul(_self.into_inner(), &rhs) - .into(); - output - } - fn mul( - _self: Val<bevy::math::IVec3>, - rhs: Val<bevy::math::IVec3>, - ) -> Val<bevy::math::IVec3> { - let output: Val<bevy::math::IVec3> = <bevy::math::IVec3 as std::ops::Mul< - bevy::math::IVec3, - >>::mul(_self.into_inner(), rhs.into_inner()) - .into(); - output - } - fn mul(_self: Val<bevy::math::IVec3>, rhs: i32) -> Val<bevy::math::IVec3> { - let output: Val<bevy::math::IVec3> = <bevy::math::IVec3 as std::ops::Mul< - i32, - >>::mul(_self.into_inner(), rhs) - .into(); - output - } - fn neg(_self: Val<bevy::math::IVec3>) -> Val<bevy::math::IVec3> { - let output: Val<bevy::math::IVec3> = <bevy::math::IVec3 as std::ops::Neg>::neg( - _self.into_inner(), - ) - .into(); - output - } /// Creates a new vector. fn new(x: i32, y: i32, z: i32) -> Val<bevy::math::IVec3> { let output: Val<bevy::math::IVec3> = bevy::math::IVec3::new(x, y, z).into(); output } - fn rem( - _self: Val<bevy::math::IVec3>, - rhs: Ref<bevy::math::IVec3>, - ) -> Val<bevy::math::IVec3> { - let output: Val<bevy::math::IVec3> = <bevy::math::IVec3 as std::ops::Rem< - &bevy::math::IVec3, - >>::rem(_self.into_inner(), &rhs) - .into(); - output - } - fn rem( - _self: Val<bevy::math::IVec3>, - rhs: Val<bevy::math::IVec3>, - ) -> Val<bevy::math::IVec3> { - let output: Val<bevy::math::IVec3> = <bevy::math::IVec3 as std::ops::Rem< - bevy::math::IVec3, - >>::rem(_self.into_inner(), rhs.into_inner()) - .into(); - output - } - fn rem(_self: Val<bevy::math::IVec3>, rhs: i32) -> Val<bevy::math::IVec3> { - let output: Val<bevy::math::IVec3> = <bevy::math::IVec3 as std::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. @@ -3867,33 +3304,6 @@ impl bevy::math::IVec3 { let output: Val<bevy::math::IVec3> = bevy::math::IVec3::splat(v).into(); output } - fn sub( - _self: Val<bevy::math::IVec3>, - rhs: Ref<bevy::math::IVec3>, - ) -> Val<bevy::math::IVec3> { - let output: Val<bevy::math::IVec3> = <bevy::math::IVec3 as std::ops::Sub< - &bevy::math::IVec3, - >>::sub(_self.into_inner(), &rhs) - .into(); - output - } - fn sub( - _self: Val<bevy::math::IVec3>, - rhs: Val<bevy::math::IVec3>, - ) -> Val<bevy::math::IVec3> { - let output: Val<bevy::math::IVec3> = <bevy::math::IVec3 as std::ops::Sub< - bevy::math::IVec3, - >>::sub(_self.into_inner(), rhs.into_inner()) - .into(); - output - } - fn sub(_self: Val<bevy::math::IVec3>, rhs: i32) -> Val<bevy::math::IVec3> { - let output: Val<bevy::math::IVec3> = <bevy::math::IVec3 as std::ops::Sub< - i32, - >>::sub(_self.into_inner(), rhs) - .into(); - output - } /// `[x, y, z]` fn to_array(_self: Ref<bevy::math::IVec3>) -> [i32; 3] { let output: [i32; 3] = bevy::math::IVec3::to_array(&_self).into(); @@ -4027,41 +3437,32 @@ impl bevy::math::IVec4 { .into(); output } - fn add( - _self: Val<bevy::math::IVec4>, - rhs: Ref<bevy::math::IVec4>, - ) -> Val<bevy::math::IVec4> { - let output: Val<bevy::math::IVec4> = <bevy::math::IVec4 as std::ops::Add< - &bevy::math::IVec4, - >>::add(_self.into_inner(), &rhs) - .into(); + /// Casts all elements of `self` to `f64`. + fn as_dvec4(_self: Ref<bevy::math::IVec4>) -> Val<bevy::math::DVec4> { + let output: Val<bevy::math::DVec4> = bevy::math::IVec4::as_dvec4(&_self).into(); output } - fn add( - _self: Val<bevy::math::IVec4>, - rhs: Val<bevy::math::IVec4>, - ) -> Val<bevy::math::IVec4> { - let output: Val<bevy::math::IVec4> = <bevy::math::IVec4 as std::ops::Add< - bevy::math::IVec4, - >>::add(_self.into_inner(), rhs.into_inner()) + /// Casts all elements of `self` to `i16`. + fn as_i16vec4(_self: Ref<bevy::math::IVec4>) -> Val<bevy::math::I16Vec4> { + let output: Val<bevy::math::I16Vec4> = bevy::math::IVec4::as_i16vec4(&_self) .into(); output } - fn add(_self: Val<bevy::math::IVec4>, rhs: i32) -> Val<bevy::math::IVec4> { - let output: Val<bevy::math::IVec4> = <bevy::math::IVec4 as std::ops::Add< - i32, - >>::add(_self.into_inner(), rhs) + /// Casts all elements of `self` to `i64`. + fn as_i64vec4(_self: Ref<bevy::math::IVec4>) -> Val<bevy::math::I64Vec4> { + let output: Val<bevy::math::I64Vec4> = bevy::math::IVec4::as_i64vec4(&_self) .into(); output } - /// Casts all elements of `self` to `f64`. - fn as_dvec4(_self: Ref<bevy::math::IVec4>) -> Val<bevy::math::DVec4> { - let output: Val<bevy::math::DVec4> = bevy::math::IVec4::as_dvec4(&_self).into(); + /// Casts all elements of `self` to `i8`. + fn as_i8vec4(_self: Ref<bevy::math::IVec4>) -> Val<bevy::math::I8Vec4> { + let output: Val<bevy::math::I8Vec4> = bevy::math::IVec4::as_i8vec4(&_self) + .into(); output } - /// Casts all elements of `self` to `i64`. - fn as_i64vec4(_self: Ref<bevy::math::IVec4>) -> Val<bevy::math::I64Vec4> { - let output: Val<bevy::math::I64Vec4> = bevy::math::IVec4::as_i64vec4(&_self) + /// Casts all elements of `self` to `u16`. + fn as_u16vec4(_self: Ref<bevy::math::IVec4>) -> Val<bevy::math::U16Vec4> { + let output: Val<bevy::math::U16Vec4> = bevy::math::IVec4::as_u16vec4(&_self) .into(); output } @@ -4071,6 +3472,12 @@ impl bevy::math::IVec4 { .into(); output } + /// Casts all elements of `self` to `u8`. + fn as_u8vec4(_self: Ref<bevy::math::IVec4>) -> Val<bevy::math::U8Vec4> { + let output: Val<bevy::math::U8Vec4> = bevy::math::IVec4::as_u8vec4(&_self) + .into(); + output + } /// Casts all elements of `self` to `u32`. fn as_uvec4(_self: Ref<bevy::math::IVec4>) -> Val<bevy::math::UVec4> { let output: Val<bevy::math::UVec4> = bevy::math::IVec4::as_uvec4(&_self).into(); @@ -4081,13 +3488,6 @@ impl bevy::math::IVec4 { let output: Val<bevy::math::Vec4> = bevy::math::IVec4::as_vec4(&_self).into(); output } - fn assert_receiver_is_total_eq(_self: Ref<bevy::math::IVec4>) -> () { - let output: () = <bevy::math::IVec4 as std::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 @@ -4105,13 +3505,6 @@ impl bevy::math::IVec4 { .into(); output } - fn clone(_self: Ref<bevy::math::IVec4>) -> Val<bevy::math::IVec4> { - let output: Val<bevy::math::IVec4> = <bevy::math::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 @@ -4214,33 +3607,6 @@ impl bevy::math::IVec4 { .into(); output } - fn div( - _self: Val<bevy::math::IVec4>, - rhs: Ref<bevy::math::IVec4>, - ) -> Val<bevy::math::IVec4> { - let output: Val<bevy::math::IVec4> = <bevy::math::IVec4 as std::ops::Div< - &bevy::math::IVec4, - >>::div(_self.into_inner(), &rhs) - .into(); - output - } - fn div( - _self: Val<bevy::math::IVec4>, - rhs: Val<bevy::math::IVec4>, - ) -> Val<bevy::math::IVec4> { - let output: Val<bevy::math::IVec4> = <bevy::math::IVec4 as std::ops::Div< - bevy::math::IVec4, - >>::div(_self.into_inner(), rhs.into_inner()) - .into(); - output - } - fn div(_self: Val<bevy::math::IVec4>, rhs: i32) -> Val<bevy::math::IVec4> { - let output: Val<bevy::math::IVec4> = <bevy::math::IVec4 as std::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. @@ -4285,13 +3651,6 @@ impl bevy::math::IVec4 { let output: i32 = bevy::math::IVec4::element_sum(_self.into_inner()).into(); output } - fn eq(_self: Ref<bevy::math::IVec4>, other: Ref<bevy::math::IVec4>) -> bool { - let output: bool = <bevy::math::IVec4 as std::cmp::PartialEq< - bevy::math::IVec4, - >>::eq(&_self, &other) - .into(); - output - } /// Creates a new vector from an array. fn from_array(a: [i32; 4]) -> Val<bevy::math::IVec4> { let output: Val<bevy::math::IVec4> = bevy::math::IVec4::from_array(a).into(); @@ -4348,70 +3707,9 @@ impl bevy::math::IVec4 { let output: i32 = bevy::math::IVec4::min_element(_self.into_inner()).into(); output } - fn mul( - _self: Val<bevy::math::IVec4>, - rhs: Ref<bevy::math::IVec4>, - ) -> Val<bevy::math::IVec4> { - let output: Val<bevy::math::IVec4> = <bevy::math::IVec4 as std::ops::Mul< - &bevy::math::IVec4, - >>::mul(_self.into_inner(), &rhs) - .into(); - output - } - fn mul( - _self: Val<bevy::math::IVec4>, - rhs: Val<bevy::math::IVec4>, - ) -> Val<bevy::math::IVec4> { - let output: Val<bevy::math::IVec4> = <bevy::math::IVec4 as std::ops::Mul< - bevy::math::IVec4, - >>::mul(_self.into_inner(), rhs.into_inner()) - .into(); - output - } - fn mul(_self: Val<bevy::math::IVec4>, rhs: i32) -> Val<bevy::math::IVec4> { - let output: Val<bevy::math::IVec4> = <bevy::math::IVec4 as std::ops::Mul< - i32, - >>::mul(_self.into_inner(), rhs) - .into(); - output - } - fn neg(_self: Val<bevy::math::IVec4>) -> Val<bevy::math::IVec4> { - let output: Val<bevy::math::IVec4> = <bevy::math::IVec4 as std::ops::Neg>::neg( - _self.into_inner(), - ) - .into(); - output - } - /// Creates a new vector. - fn new(x: i32, y: i32, z: i32, w: i32) -> Val<bevy::math::IVec4> { - let output: Val<bevy::math::IVec4> = bevy::math::IVec4::new(x, y, z, w).into(); - output - } - fn rem( - _self: Val<bevy::math::IVec4>, - rhs: Ref<bevy::math::IVec4>, - ) -> Val<bevy::math::IVec4> { - let output: Val<bevy::math::IVec4> = <bevy::math::IVec4 as std::ops::Rem< - &bevy::math::IVec4, - >>::rem(_self.into_inner(), &rhs) - .into(); - output - } - fn rem( - _self: Val<bevy::math::IVec4>, - rhs: Val<bevy::math::IVec4>, - ) -> Val<bevy::math::IVec4> { - let output: Val<bevy::math::IVec4> = <bevy::math::IVec4 as std::ops::Rem< - bevy::math::IVec4, - >>::rem(_self.into_inner(), rhs.into_inner()) - .into(); - output - } - fn rem(_self: Val<bevy::math::IVec4>, rhs: i32) -> Val<bevy::math::IVec4> { - let output: Val<bevy::math::IVec4> = <bevy::math::IVec4 as std::ops::Rem< - i32, - >>::rem(_self.into_inner(), rhs) - .into(); + /// Creates a new vector. + fn new(x: i32, y: i32, z: i32, w: i32) -> Val<bevy::math::IVec4> { + let output: Val<bevy::math::IVec4> = bevy::math::IVec4::new(x, y, z, w).into(); output } /// Returns the element-wise remainder of [Euclidean division] of `self` by `rhs`. @@ -4539,33 +3837,6 @@ impl bevy::math::IVec4 { let output: Val<bevy::math::IVec4> = bevy::math::IVec4::splat(v).into(); output } - fn sub( - _self: Val<bevy::math::IVec4>, - rhs: Ref<bevy::math::IVec4>, - ) -> Val<bevy::math::IVec4> { - let output: Val<bevy::math::IVec4> = <bevy::math::IVec4 as std::ops::Sub< - &bevy::math::IVec4, - >>::sub(_self.into_inner(), &rhs) - .into(); - output - } - fn sub( - _self: Val<bevy::math::IVec4>, - rhs: Val<bevy::math::IVec4>, - ) -> Val<bevy::math::IVec4> { - let output: Val<bevy::math::IVec4> = <bevy::math::IVec4 as std::ops::Sub< - bevy::math::IVec4, - >>::sub(_self.into_inner(), rhs.into_inner()) - .into(); - output - } - fn sub(_self: Val<bevy::math::IVec4>, rhs: i32) -> Val<bevy::math::IVec4> { - let output: Val<bevy::math::IVec4> = <bevy::math::IVec4 as std::ops::Sub< - i32, - >>::sub(_self.into_inner(), rhs) - .into(); - output - } /// `[x, y, z, w]` fn to_array(_self: Ref<bevy::math::IVec4>) -> [i32; 4] { let output: [i32; 4] = bevy::math::IVec4::to_array(&_self).into(); @@ -4697,92 +3968,77 @@ impl bevy::math::IVec4 { } #[script_bindings( remote, - name = "i_64_vec_2_functions", + name = "i_8_vec_2_functions", bms_core_path = "bevy_mod_scripting_core", generated )] -impl bevy::math::I64Vec2 { +impl bevy::math::I8Vec2 { /// Returns a vector containing the absolute value of each element of `self`. - fn abs(_self: Val<bevy::math::I64Vec2>) -> Val<bevy::math::I64Vec2> { - let output: Val<bevy::math::I64Vec2> = bevy::math::I64Vec2::abs( - _self.into_inner(), - ) + fn abs(_self: Val<bevy::math::I8Vec2>) -> Val<bevy::math::I8Vec2> { + let output: Val<bevy::math::I8Vec2> = bevy::math::I8Vec2::abs(_self.into_inner()) .into(); output } - fn add( - _self: Val<bevy::math::I64Vec2>, - rhs: Ref<bevy::math::I64Vec2>, - ) -> Val<bevy::math::I64Vec2> { - let output: Val<bevy::math::I64Vec2> = <bevy::math::I64Vec2 as std::ops::Add< - &bevy::math::I64Vec2, - >>::add(_self.into_inner(), &rhs) - .into(); + /// Casts all elements of `self` to `f64`. + fn as_dvec2(_self: Ref<bevy::math::I8Vec2>) -> Val<bevy::math::DVec2> { + let output: Val<bevy::math::DVec2> = bevy::math::I8Vec2::as_dvec2(&_self).into(); output } - fn add( - _self: Val<bevy::math::I64Vec2>, - rhs: Val<bevy::math::I64Vec2>, - ) -> Val<bevy::math::I64Vec2> { - let output: Val<bevy::math::I64Vec2> = <bevy::math::I64Vec2 as std::ops::Add< - bevy::math::I64Vec2, - >>::add(_self.into_inner(), rhs.into_inner()) + /// Casts all elements of `self` to `i16`. + fn as_i16vec2(_self: Ref<bevy::math::I8Vec2>) -> Val<bevy::math::I16Vec2> { + let output: Val<bevy::math::I16Vec2> = bevy::math::I8Vec2::as_i16vec2(&_self) .into(); output } - fn add(_self: Val<bevy::math::I64Vec2>, rhs: i64) -> Val<bevy::math::I64Vec2> { - let output: Val<bevy::math::I64Vec2> = <bevy::math::I64Vec2 as std::ops::Add< - i64, - >>::add(_self.into_inner(), rhs) + /// Casts all elements of `self` to `i64`. + fn as_i64vec2(_self: Ref<bevy::math::I8Vec2>) -> Val<bevy::math::I64Vec2> { + let output: Val<bevy::math::I64Vec2> = bevy::math::I8Vec2::as_i64vec2(&_self) .into(); output } - /// Casts all elements of `self` to `f64`. - fn as_dvec2(_self: Ref<bevy::math::I64Vec2>) -> Val<bevy::math::DVec2> { - let output: Val<bevy::math::DVec2> = bevy::math::I64Vec2::as_dvec2(&_self) - .into(); + /// Casts all elements of `self` to `i32`. + fn as_ivec2(_self: Ref<bevy::math::I8Vec2>) -> Val<bevy::math::IVec2> { + let output: Val<bevy::math::IVec2> = bevy::math::I8Vec2::as_ivec2(&_self).into(); output } - /// Casts all elements of `self` to `i32`. - fn as_ivec2(_self: Ref<bevy::math::I64Vec2>) -> Val<bevy::math::IVec2> { - let output: Val<bevy::math::IVec2> = bevy::math::I64Vec2::as_ivec2(&_self) + /// Casts all elements of `self` to `u16`. + fn as_u16vec2(_self: Ref<bevy::math::I8Vec2>) -> Val<bevy::math::U16Vec2> { + let output: Val<bevy::math::U16Vec2> = bevy::math::I8Vec2::as_u16vec2(&_self) .into(); output } /// Casts all elements of `self` to `u64`. - fn as_u64vec2(_self: Ref<bevy::math::I64Vec2>) -> Val<bevy::math::U64Vec2> { - let output: Val<bevy::math::U64Vec2> = bevy::math::I64Vec2::as_u64vec2(&_self) + fn as_u64vec2(_self: Ref<bevy::math::I8Vec2>) -> Val<bevy::math::U64Vec2> { + let output: Val<bevy::math::U64Vec2> = bevy::math::I8Vec2::as_u64vec2(&_self) .into(); output } - /// Casts all elements of `self` to `u32`. - fn as_uvec2(_self: Ref<bevy::math::I64Vec2>) -> Val<bevy::math::UVec2> { - let output: Val<bevy::math::UVec2> = bevy::math::I64Vec2::as_uvec2(&_self) + /// Casts all elements of `self` to `u8`. + fn as_u8vec2(_self: Ref<bevy::math::I8Vec2>) -> Val<bevy::math::U8Vec2> { + let output: Val<bevy::math::U8Vec2> = bevy::math::I8Vec2::as_u8vec2(&_self) .into(); output } - /// Casts all elements of `self` to `f32`. - fn as_vec2(_self: Ref<bevy::math::I64Vec2>) -> Val<bevy::math::Vec2> { - let output: Val<bevy::math::Vec2> = bevy::math::I64Vec2::as_vec2(&_self).into(); + /// Casts all elements of `self` to `u32`. + fn as_uvec2(_self: Ref<bevy::math::I8Vec2>) -> Val<bevy::math::UVec2> { + let output: Val<bevy::math::UVec2> = bevy::math::I8Vec2::as_uvec2(&_self).into(); output } - fn assert_receiver_is_total_eq(_self: Ref<bevy::math::I64Vec2>) -> () { - let output: () = <bevy::math::I64Vec2 as std::cmp::Eq>::assert_receiver_is_total_eq( - &_self, - ) - .into(); + /// Casts all elements of `self` to `f32`. + fn as_vec2(_self: Ref<bevy::math::I8Vec2>) -> Val<bevy::math::Vec2> { + let output: Val<bevy::math::Vec2> = bevy::math::I8Vec2::as_vec2(&_self).into(); output } - /// Component-wise clamping of values, similar to [`i64::clamp`]. + /// Component-wise clamping of values, similar to [`i8::clamp`]. /// Each element in `min` must be less-or-equal to the corresponding element in `max`. /// # Panics /// Will panic if `min` is greater than `max` when `glam_assert` is enabled. fn clamp( - _self: Val<bevy::math::I64Vec2>, - min: Val<bevy::math::I64Vec2>, - max: Val<bevy::math::I64Vec2>, - ) -> Val<bevy::math::I64Vec2> { - let output: Val<bevy::math::I64Vec2> = bevy::math::I64Vec2::clamp( + _self: Val<bevy::math::I8Vec2>, + min: Val<bevy::math::I8Vec2>, + max: Val<bevy::math::I8Vec2>, + ) -> Val<bevy::math::I8Vec2> { + let output: Val<bevy::math::I8Vec2> = bevy::math::I8Vec2::clamp( _self.into_inner(), min.into_inner(), max.into_inner(), @@ -4790,22 +4046,15 @@ impl bevy::math::I64Vec2 { .into(); output } - fn clone(_self: Ref<bevy::math::I64Vec2>) -> Val<bevy::math::I64Vec2> { - let output: Val<bevy::math::I64Vec2> = <bevy::math::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<bevy::math::I64Vec2>, - rhs: Val<bevy::math::I64Vec2>, + _self: Val<bevy::math::I8Vec2>, + rhs: Val<bevy::math::I8Vec2>, ) -> Val<bevy::math::BVec2> { - let output: Val<bevy::math::BVec2> = bevy::math::I64Vec2::cmpeq( + let output: Val<bevy::math::BVec2> = bevy::math::I8Vec2::cmpeq( _self.into_inner(), rhs.into_inner(), ) @@ -4817,10 +4066,10 @@ impl bevy::math::I64Vec2 { /// In other words this computes `[self.x >= rhs.x, self.y >= rhs.y, ..]` for all /// elements. fn cmpge( - _self: Val<bevy::math::I64Vec2>, - rhs: Val<bevy::math::I64Vec2>, + _self: Val<bevy::math::I8Vec2>, + rhs: Val<bevy::math::I8Vec2>, ) -> Val<bevy::math::BVec2> { - let output: Val<bevy::math::BVec2> = bevy::math::I64Vec2::cmpge( + let output: Val<bevy::math::BVec2> = bevy::math::I8Vec2::cmpge( _self.into_inner(), rhs.into_inner(), ) @@ -4832,10 +4081,10 @@ impl bevy::math::I64Vec2 { /// In other words this computes `[self.x > rhs.x, self.y > rhs.y, ..]` for all /// elements. fn cmpgt( - _self: Val<bevy::math::I64Vec2>, - rhs: Val<bevy::math::I64Vec2>, + _self: Val<bevy::math::I8Vec2>, + rhs: Val<bevy::math::I8Vec2>, ) -> Val<bevy::math::BVec2> { - let output: Val<bevy::math::BVec2> = bevy::math::I64Vec2::cmpgt( + let output: Val<bevy::math::BVec2> = bevy::math::I8Vec2::cmpgt( _self.into_inner(), rhs.into_inner(), ) @@ -4847,10 +4096,10 @@ impl bevy::math::I64Vec2 { /// In other words this computes `[self.x <= rhs.x, self.y <= rhs.y, ..]` for all /// elements. fn cmple( - _self: Val<bevy::math::I64Vec2>, - rhs: Val<bevy::math::I64Vec2>, + _self: Val<bevy::math::I8Vec2>, + rhs: Val<bevy::math::I8Vec2>, ) -> Val<bevy::math::BVec2> { - let output: Val<bevy::math::BVec2> = bevy::math::I64Vec2::cmple( + let output: Val<bevy::math::BVec2> = bevy::math::I8Vec2::cmple( _self.into_inner(), rhs.into_inner(), ) @@ -4862,10 +4111,10 @@ impl bevy::math::I64Vec2 { /// In other words this computes `[self.x < rhs.x, self.y < rhs.y, ..]` for all /// elements. fn cmplt( - _self: Val<bevy::math::I64Vec2>, - rhs: Val<bevy::math::I64Vec2>, + _self: Val<bevy::math::I8Vec2>, + rhs: Val<bevy::math::I8Vec2>, ) -> Val<bevy::math::BVec2> { - let output: Val<bevy::math::BVec2> = bevy::math::I64Vec2::cmplt( + let output: Val<bevy::math::BVec2> = bevy::math::I8Vec2::cmplt( _self.into_inner(), rhs.into_inner(), ) @@ -4877,10 +4126,10 @@ impl bevy::math::I64Vec2 { /// In other words this computes `[self.x != rhs.x, self.y != rhs.y, ..]` for all /// elements. fn cmpne( - _self: Val<bevy::math::I64Vec2>, - rhs: Val<bevy::math::I64Vec2>, + _self: Val<bevy::math::I8Vec2>, + rhs: Val<bevy::math::I8Vec2>, ) -> Val<bevy::math::BVec2> { - let output: Val<bevy::math::BVec2> = bevy::math::I64Vec2::cmpne( + let output: Val<bevy::math::BVec2> = bevy::math::I8Vec2::cmpne( _self.into_inner(), rhs.into_inner(), ) @@ -4889,51 +4138,24 @@ impl bevy::math::I64Vec2 { } /// Compute the squared euclidean distance between two points in space. fn distance_squared( - _self: Val<bevy::math::I64Vec2>, - rhs: Val<bevy::math::I64Vec2>, - ) -> i64 { - let output: i64 = bevy::math::I64Vec2::distance_squared( + _self: Val<bevy::math::I8Vec2>, + rhs: Val<bevy::math::I8Vec2>, + ) -> i8 { + let output: i8 = bevy::math::I8Vec2::distance_squared( _self.into_inner(), rhs.into_inner(), ) .into(); output } - fn div( - _self: Val<bevy::math::I64Vec2>, - rhs: Ref<bevy::math::I64Vec2>, - ) -> Val<bevy::math::I64Vec2> { - let output: Val<bevy::math::I64Vec2> = <bevy::math::I64Vec2 as std::ops::Div< - &bevy::math::I64Vec2, - >>::div(_self.into_inner(), &rhs) - .into(); - output - } - fn div( - _self: Val<bevy::math::I64Vec2>, - rhs: Val<bevy::math::I64Vec2>, - ) -> Val<bevy::math::I64Vec2> { - let output: Val<bevy::math::I64Vec2> = <bevy::math::I64Vec2 as std::ops::Div< - bevy::math::I64Vec2, - >>::div(_self.into_inner(), rhs.into_inner()) - .into(); - output - } - fn div(_self: Val<bevy::math::I64Vec2>, rhs: i64) -> Val<bevy::math::I64Vec2> { - let output: Val<bevy::math::I64Vec2> = <bevy::math::I64Vec2 as std::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<bevy::math::I64Vec2>, - rhs: Val<bevy::math::I64Vec2>, - ) -> Val<bevy::math::I64Vec2> { - let output: Val<bevy::math::I64Vec2> = bevy::math::I64Vec2::div_euclid( + _self: Val<bevy::math::I8Vec2>, + rhs: Val<bevy::math::I8Vec2>, + ) -> Val<bevy::math::I8Vec2> { + let output: Val<bevy::math::I8Vec2> = bevy::math::I8Vec2::div_euclid( _self.into_inner(), rhs.into_inner(), ) @@ -4941,17 +4163,17 @@ impl bevy::math::I64Vec2 { output } /// Computes the dot product of `self` and `rhs`. - fn dot(_self: Val<bevy::math::I64Vec2>, rhs: Val<bevy::math::I64Vec2>) -> i64 { - let output: i64 = bevy::math::I64Vec2::dot(_self.into_inner(), rhs.into_inner()) + fn dot(_self: Val<bevy::math::I8Vec2>, rhs: Val<bevy::math::I8Vec2>) -> i8 { + let output: i8 = bevy::math::I8Vec2::dot(_self.into_inner(), rhs.into_inner()) .into(); output } /// Returns a vector where every component is the dot product of `self` and `rhs`. fn dot_into_vec( - _self: Val<bevy::math::I64Vec2>, - rhs: Val<bevy::math::I64Vec2>, - ) -> Val<bevy::math::I64Vec2> { - let output: Val<bevy::math::I64Vec2> = bevy::math::I64Vec2::dot_into_vec( + _self: Val<bevy::math::I8Vec2>, + rhs: Val<bevy::math::I8Vec2>, + ) -> Val<bevy::math::I8Vec2> { + let output: Val<bevy::math::I8Vec2> = bevy::math::I8Vec2::dot_into_vec( _self.into_inner(), rhs.into_inner(), ) @@ -4960,27 +4182,19 @@ impl bevy::math::I64Vec2 { } /// Returns the product of all elements of `self`. /// In other words, this computes `self.x * self.y * ..`. - fn element_product(_self: Val<bevy::math::I64Vec2>) -> i64 { - let output: i64 = bevy::math::I64Vec2::element_product(_self.into_inner()) - .into(); + fn element_product(_self: Val<bevy::math::I8Vec2>) -> i8 { + let output: i8 = bevy::math::I8Vec2::element_product(_self.into_inner()).into(); output } /// Returns the sum of all elements of `self`. /// In other words, this computes `self.x + self.y + ..`. - fn element_sum(_self: Val<bevy::math::I64Vec2>) -> i64 { - let output: i64 = bevy::math::I64Vec2::element_sum(_self.into_inner()).into(); - output - } - fn eq(_self: Ref<bevy::math::I64Vec2>, other: Ref<bevy::math::I64Vec2>) -> bool { - let output: bool = <bevy::math::I64Vec2 as std::cmp::PartialEq< - bevy::math::I64Vec2, - >>::eq(&_self, &other) - .into(); + fn element_sum(_self: Val<bevy::math::I8Vec2>) -> i8 { + let output: i8 = bevy::math::I8Vec2::element_sum(_self.into_inner()).into(); output } /// Creates a 3D vector from `self` and the given `z` value. - fn extend(_self: Val<bevy::math::I64Vec2>, z: i64) -> Val<bevy::math::I64Vec3> { - let output: Val<bevy::math::I64Vec3> = bevy::math::I64Vec2::extend( + fn extend(_self: Val<bevy::math::I8Vec2>, z: i8) -> Val<bevy::math::I8Vec3> { + let output: Val<bevy::math::I8Vec3> = bevy::math::I8Vec2::extend( _self.into_inner(), z, ) @@ -4988,30 +4202,30 @@ impl bevy::math::I64Vec2 { output } /// Creates a new vector from an array. - fn from_array(a: [i64; 2]) -> Val<bevy::math::I64Vec2> { - let output: Val<bevy::math::I64Vec2> = bevy::math::I64Vec2::from_array(a).into(); + fn from_array(a: [i8; 2]) -> Val<bevy::math::I8Vec2> { + let output: Val<bevy::math::I8Vec2> = bevy::math::I8Vec2::from_array(a).into(); output } /// Returns a bitmask with the lowest 2 bits set to the sign bits from the elements of `self`. /// A negative element results in a `1` bit and a positive element in a `0` bit. Element `x` goes /// into the first lowest bit, element `y` into the second, etc. - fn is_negative_bitmask(_self: Val<bevy::math::I64Vec2>) -> u32 { - let output: u32 = bevy::math::I64Vec2::is_negative_bitmask(_self.into_inner()) + fn is_negative_bitmask(_self: Val<bevy::math::I8Vec2>) -> u32 { + let output: u32 = bevy::math::I8Vec2::is_negative_bitmask(_self.into_inner()) .into(); output } /// Computes the squared length of `self`. - fn length_squared(_self: Val<bevy::math::I64Vec2>) -> i64 { - let output: i64 = bevy::math::I64Vec2::length_squared(_self.into_inner()).into(); + fn length_squared(_self: Val<bevy::math::I8Vec2>) -> i8 { + let output: i8 = bevy::math::I8Vec2::length_squared(_self.into_inner()).into(); output } /// Returns a vector containing the maximum values for each element of `self` and `rhs`. /// In other words this computes `[self.x.max(rhs.x), self.y.max(rhs.y), ..]`. fn max( - _self: Val<bevy::math::I64Vec2>, - rhs: Val<bevy::math::I64Vec2>, - ) -> Val<bevy::math::I64Vec2> { - let output: Val<bevy::math::I64Vec2> = bevy::math::I64Vec2::max( + _self: Val<bevy::math::I8Vec2>, + rhs: Val<bevy::math::I8Vec2>, + ) -> Val<bevy::math::I8Vec2> { + let output: Val<bevy::math::I8Vec2> = bevy::math::I8Vec2::max( _self.into_inner(), rhs.into_inner(), ) @@ -5020,17 +4234,17 @@ impl bevy::math::I64Vec2 { } /// Returns the horizontal maximum of `self`. /// In other words this computes `max(x, y, ..)`. - fn max_element(_self: Val<bevy::math::I64Vec2>) -> i64 { - let output: i64 = bevy::math::I64Vec2::max_element(_self.into_inner()).into(); + fn max_element(_self: Val<bevy::math::I8Vec2>) -> i8 { + let output: i8 = bevy::math::I8Vec2::max_element(_self.into_inner()).into(); output } /// Returns a vector containing the minimum values for each element of `self` and `rhs`. /// In other words this computes `[self.x.min(rhs.x), self.y.min(rhs.y), ..]`. fn min( - _self: Val<bevy::math::I64Vec2>, - rhs: Val<bevy::math::I64Vec2>, - ) -> Val<bevy::math::I64Vec2> { - let output: Val<bevy::math::I64Vec2> = bevy::math::I64Vec2::min( + _self: Val<bevy::math::I8Vec2>, + rhs: Val<bevy::math::I8Vec2>, + ) -> Val<bevy::math::I8Vec2> { + let output: Val<bevy::math::I8Vec2> = bevy::math::I8Vec2::min( _self.into_inner(), rhs.into_inner(), ) @@ -5039,52 +4253,18 @@ impl bevy::math::I64Vec2 { } /// Returns the horizontal minimum of `self`. /// In other words this computes `min(x, y, ..)`. - fn min_element(_self: Val<bevy::math::I64Vec2>) -> i64 { - let output: i64 = bevy::math::I64Vec2::min_element(_self.into_inner()).into(); - output - } - fn mul( - _self: Val<bevy::math::I64Vec2>, - rhs: Ref<bevy::math::I64Vec2>, - ) -> Val<bevy::math::I64Vec2> { - let output: Val<bevy::math::I64Vec2> = <bevy::math::I64Vec2 as std::ops::Mul< - &bevy::math::I64Vec2, - >>::mul(_self.into_inner(), &rhs) - .into(); - output - } - fn mul( - _self: Val<bevy::math::I64Vec2>, - rhs: Val<bevy::math::I64Vec2>, - ) -> Val<bevy::math::I64Vec2> { - let output: Val<bevy::math::I64Vec2> = <bevy::math::I64Vec2 as std::ops::Mul< - bevy::math::I64Vec2, - >>::mul(_self.into_inner(), rhs.into_inner()) - .into(); - output - } - fn mul(_self: Val<bevy::math::I64Vec2>, rhs: i64) -> Val<bevy::math::I64Vec2> { - let output: Val<bevy::math::I64Vec2> = <bevy::math::I64Vec2 as std::ops::Mul< - i64, - >>::mul(_self.into_inner(), rhs) - .into(); - output - } - fn neg(_self: Val<bevy::math::I64Vec2>) -> Val<bevy::math::I64Vec2> { - let output: Val<bevy::math::I64Vec2> = <bevy::math::I64Vec2 as std::ops::Neg>::neg( - _self.into_inner(), - ) - .into(); + fn min_element(_self: Val<bevy::math::I8Vec2>) -> i8 { + let output: i8 = bevy::math::I8Vec2::min_element(_self.into_inner()).into(); output } /// Creates a new vector. - fn new(x: i64, y: i64) -> Val<bevy::math::I64Vec2> { - let output: Val<bevy::math::I64Vec2> = bevy::math::I64Vec2::new(x, y).into(); + fn new(x: i8, y: i8) -> Val<bevy::math::I8Vec2> { + let output: Val<bevy::math::I8Vec2> = bevy::math::I8Vec2::new(x, y).into(); output } /// Returns a vector that is equal to `self` rotated by 90 degrees. - fn perp(_self: Val<bevy::math::I64Vec2>) -> Val<bevy::math::I64Vec2> { - let output: Val<bevy::math::I64Vec2> = bevy::math::I64Vec2::perp( + fn perp(_self: Val<bevy::math::I8Vec2>) -> Val<bevy::math::I8Vec2> { + let output: Val<bevy::math::I8Vec2> = bevy::math::I8Vec2::perp( _self.into_inner(), ) .into(); @@ -5092,50 +4272,23 @@ impl bevy::math::I64Vec2 { } /// The perpendicular dot product of `self` and `rhs`. /// Also known as the wedge product, 2D cross product, and determinant. - fn perp_dot(_self: Val<bevy::math::I64Vec2>, rhs: Val<bevy::math::I64Vec2>) -> i64 { - let output: i64 = bevy::math::I64Vec2::perp_dot( + fn perp_dot(_self: Val<bevy::math::I8Vec2>, rhs: Val<bevy::math::I8Vec2>) -> i8 { + let output: i8 = bevy::math::I8Vec2::perp_dot( _self.into_inner(), rhs.into_inner(), ) .into(); output } - fn rem( - _self: Val<bevy::math::I64Vec2>, - rhs: Ref<bevy::math::I64Vec2>, - ) -> Val<bevy::math::I64Vec2> { - let output: Val<bevy::math::I64Vec2> = <bevy::math::I64Vec2 as std::ops::Rem< - &bevy::math::I64Vec2, - >>::rem(_self.into_inner(), &rhs) - .into(); - output - } - fn rem( - _self: Val<bevy::math::I64Vec2>, - rhs: Val<bevy::math::I64Vec2>, - ) -> Val<bevy::math::I64Vec2> { - let output: Val<bevy::math::I64Vec2> = <bevy::math::I64Vec2 as std::ops::Rem< - bevy::math::I64Vec2, - >>::rem(_self.into_inner(), rhs.into_inner()) - .into(); - output - } - fn rem(_self: Val<bevy::math::I64Vec2>, rhs: i64) -> Val<bevy::math::I64Vec2> { - let output: Val<bevy::math::I64Vec2> = <bevy::math::I64Vec2 as std::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 + /// [Euclidean division]: i8::rem_euclid fn rem_euclid( - _self: Val<bevy::math::I64Vec2>, - rhs: Val<bevy::math::I64Vec2>, - ) -> Val<bevy::math::I64Vec2> { - let output: Val<bevy::math::I64Vec2> = bevy::math::I64Vec2::rem_euclid( + _self: Val<bevy::math::I8Vec2>, + rhs: Val<bevy::math::I8Vec2>, + ) -> Val<bevy::math::I8Vec2> { + let output: Val<bevy::math::I8Vec2> = bevy::math::I8Vec2::rem_euclid( _self.into_inner(), rhs.into_inner(), ) @@ -5146,10 +4299,10 @@ impl bevy::math::I64Vec2 { /// then this just rotation. This is what you usually want. Otherwise, /// it will be like a rotation with a multiplication by `self`'s length. fn rotate( - _self: Val<bevy::math::I64Vec2>, - rhs: Val<bevy::math::I64Vec2>, - ) -> Val<bevy::math::I64Vec2> { - let output: Val<bevy::math::I64Vec2> = bevy::math::I64Vec2::rotate( + _self: Val<bevy::math::I8Vec2>, + rhs: Val<bevy::math::I8Vec2>, + ) -> Val<bevy::math::I8Vec2> { + let output: Val<bevy::math::I8Vec2> = bevy::math::I8Vec2::rotate( _self.into_inner(), rhs.into_inner(), ) @@ -5159,10 +4312,10 @@ impl bevy::math::I64Vec2 { /// Returns a vector containing the saturating addition of `self` and `rhs`. /// In other words this computes `[self.x.saturating_add(rhs.x), self.y.saturating_add(rhs.y), ..]`. fn saturating_add( - _self: Val<bevy::math::I64Vec2>, - rhs: Val<bevy::math::I64Vec2>, - ) -> Val<bevy::math::I64Vec2> { - let output: Val<bevy::math::I64Vec2> = bevy::math::I64Vec2::saturating_add( + _self: Val<bevy::math::I8Vec2>, + rhs: Val<bevy::math::I8Vec2>, + ) -> Val<bevy::math::I8Vec2> { + let output: Val<bevy::math::I8Vec2> = bevy::math::I8Vec2::saturating_add( _self.into_inner(), rhs.into_inner(), ) @@ -5171,10 +4324,10 @@ impl bevy::math::I64Vec2 { } /// In other words this computes `[self.x.saturating_add_unsigned(rhs.x), self.y.saturating_add_unsigned(rhs.y), ..]`. fn saturating_add_unsigned( - _self: Val<bevy::math::I64Vec2>, - rhs: Val<bevy::math::U64Vec2>, - ) -> Val<bevy::math::I64Vec2> { - let output: Val<bevy::math::I64Vec2> = bevy::math::I64Vec2::saturating_add_unsigned( + _self: Val<bevy::math::I8Vec2>, + rhs: Val<bevy::math::U8Vec2>, + ) -> Val<bevy::math::I8Vec2> { + let output: Val<bevy::math::I8Vec2> = bevy::math::I8Vec2::saturating_add_unsigned( _self.into_inner(), rhs.into_inner(), ) @@ -5184,10 +4337,10 @@ impl bevy::math::I64Vec2 { /// Returns a vector containing the saturating division of `self` and `rhs`. /// In other words this computes `[self.x.saturating_div(rhs.x), self.y.saturating_div(rhs.y), ..]`. fn saturating_div( - _self: Val<bevy::math::I64Vec2>, - rhs: Val<bevy::math::I64Vec2>, - ) -> Val<bevy::math::I64Vec2> { - let output: Val<bevy::math::I64Vec2> = bevy::math::I64Vec2::saturating_div( + _self: Val<bevy::math::I8Vec2>, + rhs: Val<bevy::math::I8Vec2>, + ) -> Val<bevy::math::I8Vec2> { + let output: Val<bevy::math::I8Vec2> = bevy::math::I8Vec2::saturating_div( _self.into_inner(), rhs.into_inner(), ) @@ -5197,10 +4350,10 @@ impl bevy::math::I64Vec2 { /// Returns a vector containing the saturating multiplication of `self` and `rhs`. /// In other words this computes `[self.x.saturating_mul(rhs.x), self.y.saturating_mul(rhs.y), ..]`. fn saturating_mul( - _self: Val<bevy::math::I64Vec2>, - rhs: Val<bevy::math::I64Vec2>, - ) -> Val<bevy::math::I64Vec2> { - let output: Val<bevy::math::I64Vec2> = bevy::math::I64Vec2::saturating_mul( + _self: Val<bevy::math::I8Vec2>, + rhs: Val<bevy::math::I8Vec2>, + ) -> Val<bevy::math::I8Vec2> { + let output: Val<bevy::math::I8Vec2> = bevy::math::I8Vec2::saturating_mul( _self.into_inner(), rhs.into_inner(), ) @@ -5210,10 +4363,10 @@ impl bevy::math::I64Vec2 { /// Returns a vector containing the saturating subtraction of `self` and `rhs`. /// In other words this computes `[self.x.saturating_sub(rhs.x), self.y.saturating_sub(rhs.y), ..]`. fn saturating_sub( - _self: Val<bevy::math::I64Vec2>, - rhs: Val<bevy::math::I64Vec2>, - ) -> Val<bevy::math::I64Vec2> { - let output: Val<bevy::math::I64Vec2> = bevy::math::I64Vec2::saturating_sub( + _self: Val<bevy::math::I8Vec2>, + rhs: Val<bevy::math::I8Vec2>, + ) -> Val<bevy::math::I8Vec2> { + let output: Val<bevy::math::I8Vec2> = bevy::math::I8Vec2::saturating_sub( _self.into_inner(), rhs.into_inner(), ) @@ -5223,10 +4376,10 @@ impl bevy::math::I64Vec2 { /// Returns a vector containing the saturating subtraction of `self` and unsigned vector `rhs`. /// In other words this computes `[self.x.saturating_sub_unsigned(rhs.x), self.y.saturating_sub_unsigned(rhs.y), ..]`. fn saturating_sub_unsigned( - _self: Val<bevy::math::I64Vec2>, - rhs: Val<bevy::math::U64Vec2>, - ) -> Val<bevy::math::I64Vec2> { - let output: Val<bevy::math::I64Vec2> = bevy::math::I64Vec2::saturating_sub_unsigned( + _self: Val<bevy::math::I8Vec2>, + rhs: Val<bevy::math::U8Vec2>, + ) -> Val<bevy::math::I8Vec2> { + let output: Val<bevy::math::I8Vec2> = bevy::math::I8Vec2::saturating_sub_unsigned( _self.into_inner(), rhs.into_inner(), ) @@ -5239,10 +4392,10 @@ impl bevy::math::I64Vec2 { /// uses the element from `if_false`. fn select( mask: Val<bevy::math::BVec2>, - if_true: Val<bevy::math::I64Vec2>, - if_false: Val<bevy::math::I64Vec2>, - ) -> Val<bevy::math::I64Vec2> { - let output: Val<bevy::math::I64Vec2> = bevy::math::I64Vec2::select( + if_true: Val<bevy::math::I8Vec2>, + if_false: Val<bevy::math::I8Vec2>, + ) -> Val<bevy::math::I8Vec2> { + let output: Val<bevy::math::I8Vec2> = bevy::math::I8Vec2::select( mask.into_inner(), if_true.into_inner(), if_false.into_inner(), @@ -5254,62 +4407,35 @@ impl bevy::math::I64Vec2 { /// - `0` if the number is zero /// - `1` if the number is positive /// - `-1` if the number is negative - fn signum(_self: Val<bevy::math::I64Vec2>) -> Val<bevy::math::I64Vec2> { - let output: Val<bevy::math::I64Vec2> = bevy::math::I64Vec2::signum( + fn signum(_self: Val<bevy::math::I8Vec2>) -> Val<bevy::math::I8Vec2> { + let output: Val<bevy::math::I8Vec2> = bevy::math::I8Vec2::signum( _self.into_inner(), ) .into(); output } /// Creates a vector with all elements set to `v`. - fn splat(v: i64) -> Val<bevy::math::I64Vec2> { - let output: Val<bevy::math::I64Vec2> = bevy::math::I64Vec2::splat(v).into(); + fn splat(v: i8) -> Val<bevy::math::I8Vec2> { + let output: Val<bevy::math::I8Vec2> = bevy::math::I8Vec2::splat(v).into(); output } - fn sub( - _self: Val<bevy::math::I64Vec2>, - rhs: Ref<bevy::math::I64Vec2>, - ) -> Val<bevy::math::I64Vec2> { - let output: Val<bevy::math::I64Vec2> = <bevy::math::I64Vec2 as std::ops::Sub< - &bevy::math::I64Vec2, - >>::sub(_self.into_inner(), &rhs) - .into(); - output - } - fn sub( - _self: Val<bevy::math::I64Vec2>, - rhs: Val<bevy::math::I64Vec2>, - ) -> Val<bevy::math::I64Vec2> { - let output: Val<bevy::math::I64Vec2> = <bevy::math::I64Vec2 as std::ops::Sub< - bevy::math::I64Vec2, - >>::sub(_self.into_inner(), rhs.into_inner()) - .into(); - output - } - fn sub(_self: Val<bevy::math::I64Vec2>, rhs: i64) -> Val<bevy::math::I64Vec2> { - let output: Val<bevy::math::I64Vec2> = <bevy::math::I64Vec2 as std::ops::Sub< - i64, - >>::sub(_self.into_inner(), rhs) - .into(); - output - } - /// `[x, y]` - fn to_array(_self: Ref<bevy::math::I64Vec2>) -> [i64; 2] { - let output: [i64; 2] = bevy::math::I64Vec2::to_array(&_self).into(); - output - } - /// Creates a 2D vector from `self` with the given value of `x`. - fn with_x(_self: Val<bevy::math::I64Vec2>, x: i64) -> Val<bevy::math::I64Vec2> { - let output: Val<bevy::math::I64Vec2> = bevy::math::I64Vec2::with_x( - _self.into_inner(), - x, - ) + /// `[x, y]` + fn to_array(_self: Ref<bevy::math::I8Vec2>) -> [i8; 2] { + let output: [i8; 2] = bevy::math::I8Vec2::to_array(&_self).into(); + output + } + /// Creates a 2D vector from `self` with the given value of `x`. + fn with_x(_self: Val<bevy::math::I8Vec2>, x: i8) -> Val<bevy::math::I8Vec2> { + let output: Val<bevy::math::I8Vec2> = bevy::math::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<bevy::math::I64Vec2>, y: i64) -> Val<bevy::math::I64Vec2> { - let output: Val<bevy::math::I64Vec2> = bevy::math::I64Vec2::with_y( + fn with_y(_self: Val<bevy::math::I8Vec2>, y: i8) -> Val<bevy::math::I8Vec2> { + let output: Val<bevy::math::I8Vec2> = bevy::math::I8Vec2::with_y( _self.into_inner(), y, ) @@ -5319,10 +4445,10 @@ impl bevy::math::I64Vec2 { /// Returns a vector containing the wrapping addition of `self` and `rhs`. /// In other words this computes `[self.x.wrapping_add(rhs.x), self.y.wrapping_add(rhs.y), ..]`. fn wrapping_add( - _self: Val<bevy::math::I64Vec2>, - rhs: Val<bevy::math::I64Vec2>, - ) -> Val<bevy::math::I64Vec2> { - let output: Val<bevy::math::I64Vec2> = bevy::math::I64Vec2::wrapping_add( + _self: Val<bevy::math::I8Vec2>, + rhs: Val<bevy::math::I8Vec2>, + ) -> Val<bevy::math::I8Vec2> { + let output: Val<bevy::math::I8Vec2> = bevy::math::I8Vec2::wrapping_add( _self.into_inner(), rhs.into_inner(), ) @@ -5332,10 +4458,10 @@ impl bevy::math::I64Vec2 { /// Returns a vector containing the wrapping addition of `self` and unsigned vector `rhs`. /// In other words this computes `[self.x.wrapping_add_unsigned(rhs.x), self.y.wrapping_add_unsigned(rhs.y), ..]`. fn wrapping_add_unsigned( - _self: Val<bevy::math::I64Vec2>, - rhs: Val<bevy::math::U64Vec2>, - ) -> Val<bevy::math::I64Vec2> { - let output: Val<bevy::math::I64Vec2> = bevy::math::I64Vec2::wrapping_add_unsigned( + _self: Val<bevy::math::I8Vec2>, + rhs: Val<bevy::math::U8Vec2>, + ) -> Val<bevy::math::I8Vec2> { + let output: Val<bevy::math::I8Vec2> = bevy::math::I8Vec2::wrapping_add_unsigned( _self.into_inner(), rhs.into_inner(), ) @@ -5345,10 +4471,10 @@ impl bevy::math::I64Vec2 { /// Returns a vector containing the wrapping division of `self` and `rhs`. /// In other words this computes `[self.x.wrapping_div(rhs.x), self.y.wrapping_div(rhs.y), ..]`. fn wrapping_div( - _self: Val<bevy::math::I64Vec2>, - rhs: Val<bevy::math::I64Vec2>, - ) -> Val<bevy::math::I64Vec2> { - let output: Val<bevy::math::I64Vec2> = bevy::math::I64Vec2::wrapping_div( + _self: Val<bevy::math::I8Vec2>, + rhs: Val<bevy::math::I8Vec2>, + ) -> Val<bevy::math::I8Vec2> { + let output: Val<bevy::math::I8Vec2> = bevy::math::I8Vec2::wrapping_div( _self.into_inner(), rhs.into_inner(), ) @@ -5358,10 +4484,10 @@ impl bevy::math::I64Vec2 { /// Returns a vector containing the wrapping multiplication of `self` and `rhs`. /// In other words this computes `[self.x.wrapping_mul(rhs.x), self.y.wrapping_mul(rhs.y), ..]`. fn wrapping_mul( - _self: Val<bevy::math::I64Vec2>, - rhs: Val<bevy::math::I64Vec2>, - ) -> Val<bevy::math::I64Vec2> { - let output: Val<bevy::math::I64Vec2> = bevy::math::I64Vec2::wrapping_mul( + _self: Val<bevy::math::I8Vec2>, + rhs: Val<bevy::math::I8Vec2>, + ) -> Val<bevy::math::I8Vec2> { + let output: Val<bevy::math::I8Vec2> = bevy::math::I8Vec2::wrapping_mul( _self.into_inner(), rhs.into_inner(), ) @@ -5371,10 +4497,10 @@ impl bevy::math::I64Vec2 { /// Returns a vector containing the wrapping subtraction of `self` and `rhs`. /// In other words this computes `[self.x.wrapping_sub(rhs.x), self.y.wrapping_sub(rhs.y), ..]`. fn wrapping_sub( - _self: Val<bevy::math::I64Vec2>, - rhs: Val<bevy::math::I64Vec2>, - ) -> Val<bevy::math::I64Vec2> { - let output: Val<bevy::math::I64Vec2> = bevy::math::I64Vec2::wrapping_sub( + _self: Val<bevy::math::I8Vec2>, + rhs: Val<bevy::math::I8Vec2>, + ) -> Val<bevy::math::I8Vec2> { + let output: Val<bevy::math::I8Vec2> = bevy::math::I8Vec2::wrapping_sub( _self.into_inner(), rhs.into_inner(), ) @@ -5384,10 +4510,10 @@ impl bevy::math::I64Vec2 { /// Returns a vector containing the wrapping subtraction of `self` and unsigned vector `rhs`. /// In other words this computes `[self.x.wrapping_sub_unsigned(rhs.x), self.y.wrapping_sub_unsigned(rhs.y), ..]`. fn wrapping_sub_unsigned( - _self: Val<bevy::math::I64Vec2>, - rhs: Val<bevy::math::U64Vec2>, - ) -> Val<bevy::math::I64Vec2> { - let output: Val<bevy::math::I64Vec2> = bevy::math::I64Vec2::wrapping_sub_unsigned( + _self: Val<bevy::math::I8Vec2>, + rhs: Val<bevy::math::U8Vec2>, + ) -> Val<bevy::math::I8Vec2> { + let output: Val<bevy::math::I8Vec2> = bevy::math::I8Vec2::wrapping_sub_unsigned( _self.into_inner(), rhs.into_inner(), ) @@ -5397,98 +4523,82 @@ impl bevy::math::I64Vec2 { } #[script_bindings( remote, - name = "i_64_vec_3_functions", + name = "i_8_vec_3_functions", bms_core_path = "bevy_mod_scripting_core", generated )] -impl bevy::math::I64Vec3 { +impl bevy::math::I8Vec3 { /// Returns a vector containing the absolute value of each element of `self`. - fn abs(_self: Val<bevy::math::I64Vec3>) -> Val<bevy::math::I64Vec3> { - let output: Val<bevy::math::I64Vec3> = bevy::math::I64Vec3::abs( - _self.into_inner(), - ) + fn abs(_self: Val<bevy::math::I8Vec3>) -> Val<bevy::math::I8Vec3> { + let output: Val<bevy::math::I8Vec3> = bevy::math::I8Vec3::abs(_self.into_inner()) .into(); output } - fn add( - _self: Val<bevy::math::I64Vec3>, - rhs: Ref<bevy::math::I64Vec3>, - ) -> Val<bevy::math::I64Vec3> { - let output: Val<bevy::math::I64Vec3> = <bevy::math::I64Vec3 as std::ops::Add< - &bevy::math::I64Vec3, - >>::add(_self.into_inner(), &rhs) - .into(); + /// Casts all elements of `self` to `f64`. + fn as_dvec3(_self: Ref<bevy::math::I8Vec3>) -> Val<bevy::math::DVec3> { + let output: Val<bevy::math::DVec3> = bevy::math::I8Vec3::as_dvec3(&_self).into(); output } - fn add( - _self: Val<bevy::math::I64Vec3>, - rhs: Val<bevy::math::I64Vec3>, - ) -> Val<bevy::math::I64Vec3> { - let output: Val<bevy::math::I64Vec3> = <bevy::math::I64Vec3 as std::ops::Add< - bevy::math::I64Vec3, - >>::add(_self.into_inner(), rhs.into_inner()) + /// Casts all elements of `self` to `i16`. + fn as_i16vec3(_self: Ref<bevy::math::I8Vec3>) -> Val<bevy::math::I16Vec3> { + let output: Val<bevy::math::I16Vec3> = bevy::math::I8Vec3::as_i16vec3(&_self) .into(); output } - fn add(_self: Val<bevy::math::I64Vec3>, rhs: i64) -> Val<bevy::math::I64Vec3> { - let output: Val<bevy::math::I64Vec3> = <bevy::math::I64Vec3 as std::ops::Add< - i64, - >>::add(_self.into_inner(), rhs) + /// Casts all elements of `self` to `i64`. + fn as_i64vec3(_self: Ref<bevy::math::I8Vec3>) -> Val<bevy::math::I64Vec3> { + let output: Val<bevy::math::I64Vec3> = bevy::math::I8Vec3::as_i64vec3(&_self) .into(); output } - /// Casts all elements of `self` to `f64`. - fn as_dvec3(_self: Ref<bevy::math::I64Vec3>) -> Val<bevy::math::DVec3> { - let output: Val<bevy::math::DVec3> = bevy::math::I64Vec3::as_dvec3(&_self) - .into(); + /// Casts all elements of `self` to `i32`. + fn as_ivec3(_self: Ref<bevy::math::I8Vec3>) -> Val<bevy::math::IVec3> { + let output: Val<bevy::math::IVec3> = bevy::math::I8Vec3::as_ivec3(&_self).into(); output } - /// Casts all elements of `self` to `i32`. - fn as_ivec3(_self: Ref<bevy::math::I64Vec3>) -> Val<bevy::math::IVec3> { - let output: Val<bevy::math::IVec3> = bevy::math::I64Vec3::as_ivec3(&_self) + /// Casts all elements of `self` to `u16`. + fn as_u16vec3(_self: Ref<bevy::math::I8Vec3>) -> Val<bevy::math::U16Vec3> { + let output: Val<bevy::math::U16Vec3> = bevy::math::I8Vec3::as_u16vec3(&_self) .into(); output } /// Casts all elements of `self` to `u64`. - fn as_u64vec3(_self: Ref<bevy::math::I64Vec3>) -> Val<bevy::math::U64Vec3> { - let output: Val<bevy::math::U64Vec3> = bevy::math::I64Vec3::as_u64vec3(&_self) + fn as_u64vec3(_self: Ref<bevy::math::I8Vec3>) -> Val<bevy::math::U64Vec3> { + let output: Val<bevy::math::U64Vec3> = bevy::math::I8Vec3::as_u64vec3(&_self) .into(); output } - /// Casts all elements of `self` to `u32`. - fn as_uvec3(_self: Ref<bevy::math::I64Vec3>) -> Val<bevy::math::UVec3> { - let output: Val<bevy::math::UVec3> = bevy::math::I64Vec3::as_uvec3(&_self) + /// Casts all elements of `self` to `u8`. + fn as_u8vec3(_self: Ref<bevy::math::I8Vec3>) -> Val<bevy::math::U8Vec3> { + let output: Val<bevy::math::U8Vec3> = bevy::math::I8Vec3::as_u8vec3(&_self) .into(); output } - /// Casts all elements of `self` to `f32`. - fn as_vec3(_self: Ref<bevy::math::I64Vec3>) -> Val<bevy::math::Vec3> { - let output: Val<bevy::math::Vec3> = bevy::math::I64Vec3::as_vec3(&_self).into(); + /// Casts all elements of `self` to `u32`. + fn as_uvec3(_self: Ref<bevy::math::I8Vec3>) -> Val<bevy::math::UVec3> { + let output: Val<bevy::math::UVec3> = bevy::math::I8Vec3::as_uvec3(&_self).into(); output } /// Casts all elements of `self` to `f32`. - fn as_vec3a(_self: Ref<bevy::math::I64Vec3>) -> Val<bevy::math::Vec3A> { - let output: Val<bevy::math::Vec3A> = bevy::math::I64Vec3::as_vec3a(&_self) - .into(); + fn as_vec3(_self: Ref<bevy::math::I8Vec3>) -> Val<bevy::math::Vec3> { + let output: Val<bevy::math::Vec3> = bevy::math::I8Vec3::as_vec3(&_self).into(); output } - fn assert_receiver_is_total_eq(_self: Ref<bevy::math::I64Vec3>) -> () { - let output: () = <bevy::math::I64Vec3 as std::cmp::Eq>::assert_receiver_is_total_eq( - &_self, - ) - .into(); + /// Casts all elements of `self` to `f32`. + fn as_vec3a(_self: Ref<bevy::math::I8Vec3>) -> Val<bevy::math::Vec3A> { + let output: Val<bevy::math::Vec3A> = bevy::math::I8Vec3::as_vec3a(&_self).into(); output } - /// Component-wise clamping of values, similar to [`i64::clamp`]. + /// Component-wise clamping of values, similar to [`i8::clamp`]. /// Each element in `min` must be less-or-equal to the corresponding element in `max`. /// # Panics /// Will panic if `min` is greater than `max` when `glam_assert` is enabled. fn clamp( - _self: Val<bevy::math::I64Vec3>, - min: Val<bevy::math::I64Vec3>, - max: Val<bevy::math::I64Vec3>, - ) -> Val<bevy::math::I64Vec3> { - let output: Val<bevy::math::I64Vec3> = bevy::math::I64Vec3::clamp( + _self: Val<bevy::math::I8Vec3>, + min: Val<bevy::math::I8Vec3>, + max: Val<bevy::math::I8Vec3>, + ) -> Val<bevy::math::I8Vec3> { + let output: Val<bevy::math::I8Vec3> = bevy::math::I8Vec3::clamp( _self.into_inner(), min.into_inner(), max.into_inner(), @@ -5496,22 +4606,15 @@ impl bevy::math::I64Vec3 { .into(); output } - fn clone(_self: Ref<bevy::math::I64Vec3>) -> Val<bevy::math::I64Vec3> { - let output: Val<bevy::math::I64Vec3> = <bevy::math::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<bevy::math::I64Vec3>, - rhs: Val<bevy::math::I64Vec3>, + _self: Val<bevy::math::I8Vec3>, + rhs: Val<bevy::math::I8Vec3>, ) -> Val<bevy::math::BVec3> { - let output: Val<bevy::math::BVec3> = bevy::math::I64Vec3::cmpeq( + let output: Val<bevy::math::BVec3> = bevy::math::I8Vec3::cmpeq( _self.into_inner(), rhs.into_inner(), ) @@ -5523,10 +4626,10 @@ impl bevy::math::I64Vec3 { /// In other words this computes `[self.x >= rhs.x, self.y >= rhs.y, ..]` for all /// elements. fn cmpge( - _self: Val<bevy::math::I64Vec3>, - rhs: Val<bevy::math::I64Vec3>, + _self: Val<bevy::math::I8Vec3>, + rhs: Val<bevy::math::I8Vec3>, ) -> Val<bevy::math::BVec3> { - let output: Val<bevy::math::BVec3> = bevy::math::I64Vec3::cmpge( + let output: Val<bevy::math::BVec3> = bevy::math::I8Vec3::cmpge( _self.into_inner(), rhs.into_inner(), ) @@ -5538,10 +4641,10 @@ impl bevy::math::I64Vec3 { /// In other words this computes `[self.x > rhs.x, self.y > rhs.y, ..]` for all /// elements. fn cmpgt( - _self: Val<bevy::math::I64Vec3>, - rhs: Val<bevy::math::I64Vec3>, + _self: Val<bevy::math::I8Vec3>, + rhs: Val<bevy::math::I8Vec3>, ) -> Val<bevy::math::BVec3> { - let output: Val<bevy::math::BVec3> = bevy::math::I64Vec3::cmpgt( + let output: Val<bevy::math::BVec3> = bevy::math::I8Vec3::cmpgt( _self.into_inner(), rhs.into_inner(), ) @@ -5553,10 +4656,10 @@ impl bevy::math::I64Vec3 { /// In other words this computes `[self.x <= rhs.x, self.y <= rhs.y, ..]` for all /// elements. fn cmple( - _self: Val<bevy::math::I64Vec3>, - rhs: Val<bevy::math::I64Vec3>, + _self: Val<bevy::math::I8Vec3>, + rhs: Val<bevy::math::I8Vec3>, ) -> Val<bevy::math::BVec3> { - let output: Val<bevy::math::BVec3> = bevy::math::I64Vec3::cmple( + let output: Val<bevy::math::BVec3> = bevy::math::I8Vec3::cmple( _self.into_inner(), rhs.into_inner(), ) @@ -5568,10 +4671,10 @@ impl bevy::math::I64Vec3 { /// In other words this computes `[self.x < rhs.x, self.y < rhs.y, ..]` for all /// elements. fn cmplt( - _self: Val<bevy::math::I64Vec3>, - rhs: Val<bevy::math::I64Vec3>, + _self: Val<bevy::math::I8Vec3>, + rhs: Val<bevy::math::I8Vec3>, ) -> Val<bevy::math::BVec3> { - let output: Val<bevy::math::BVec3> = bevy::math::I64Vec3::cmplt( + let output: Val<bevy::math::BVec3> = bevy::math::I8Vec3::cmplt( _self.into_inner(), rhs.into_inner(), ) @@ -5583,10 +4686,10 @@ impl bevy::math::I64Vec3 { /// In other words this computes `[self.x != rhs.x, self.y != rhs.y, ..]` for all /// elements. fn cmpne( - _self: Val<bevy::math::I64Vec3>, - rhs: Val<bevy::math::I64Vec3>, + _self: Val<bevy::math::I8Vec3>, + rhs: Val<bevy::math::I8Vec3>, ) -> Val<bevy::math::BVec3> { - let output: Val<bevy::math::BVec3> = bevy::math::I64Vec3::cmpne( + let output: Val<bevy::math::BVec3> = bevy::math::I8Vec3::cmpne( _self.into_inner(), rhs.into_inner(), ) @@ -5595,10 +4698,10 @@ impl bevy::math::I64Vec3 { } /// Computes the cross product of `self` and `rhs`. fn cross( - _self: Val<bevy::math::I64Vec3>, - rhs: Val<bevy::math::I64Vec3>, - ) -> Val<bevy::math::I64Vec3> { - let output: Val<bevy::math::I64Vec3> = bevy::math::I64Vec3::cross( + _self: Val<bevy::math::I8Vec3>, + rhs: Val<bevy::math::I8Vec3>, + ) -> Val<bevy::math::I8Vec3> { + let output: Val<bevy::math::I8Vec3> = bevy::math::I8Vec3::cross( _self.into_inner(), rhs.into_inner(), ) @@ -5607,51 +4710,24 @@ impl bevy::math::I64Vec3 { } /// Compute the squared euclidean distance between two points in space. fn distance_squared( - _self: Val<bevy::math::I64Vec3>, - rhs: Val<bevy::math::I64Vec3>, - ) -> i64 { - let output: i64 = bevy::math::I64Vec3::distance_squared( + _self: Val<bevy::math::I8Vec3>, + rhs: Val<bevy::math::I8Vec3>, + ) -> i8 { + let output: i8 = bevy::math::I8Vec3::distance_squared( _self.into_inner(), rhs.into_inner(), ) .into(); output } - fn div( - _self: Val<bevy::math::I64Vec3>, - rhs: Ref<bevy::math::I64Vec3>, - ) -> Val<bevy::math::I64Vec3> { - let output: Val<bevy::math::I64Vec3> = <bevy::math::I64Vec3 as std::ops::Div< - &bevy::math::I64Vec3, - >>::div(_self.into_inner(), &rhs) - .into(); - output - } - fn div( - _self: Val<bevy::math::I64Vec3>, - rhs: Val<bevy::math::I64Vec3>, - ) -> Val<bevy::math::I64Vec3> { - let output: Val<bevy::math::I64Vec3> = <bevy::math::I64Vec3 as std::ops::Div< - bevy::math::I64Vec3, - >>::div(_self.into_inner(), rhs.into_inner()) - .into(); - output - } - fn div(_self: Val<bevy::math::I64Vec3>, rhs: i64) -> Val<bevy::math::I64Vec3> { - let output: Val<bevy::math::I64Vec3> = <bevy::math::I64Vec3 as std::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<bevy::math::I64Vec3>, - rhs: Val<bevy::math::I64Vec3>, - ) -> Val<bevy::math::I64Vec3> { - let output: Val<bevy::math::I64Vec3> = bevy::math::I64Vec3::div_euclid( + _self: Val<bevy::math::I8Vec3>, + rhs: Val<bevy::math::I8Vec3>, + ) -> Val<bevy::math::I8Vec3> { + let output: Val<bevy::math::I8Vec3> = bevy::math::I8Vec3::div_euclid( _self.into_inner(), rhs.into_inner(), ) @@ -5659,17 +4735,17 @@ impl bevy::math::I64Vec3 { output } /// Computes the dot product of `self` and `rhs`. - fn dot(_self: Val<bevy::math::I64Vec3>, rhs: Val<bevy::math::I64Vec3>) -> i64 { - let output: i64 = bevy::math::I64Vec3::dot(_self.into_inner(), rhs.into_inner()) + fn dot(_self: Val<bevy::math::I8Vec3>, rhs: Val<bevy::math::I8Vec3>) -> i8 { + let output: i8 = bevy::math::I8Vec3::dot(_self.into_inner(), rhs.into_inner()) .into(); output } /// Returns a vector where every component is the dot product of `self` and `rhs`. fn dot_into_vec( - _self: Val<bevy::math::I64Vec3>, - rhs: Val<bevy::math::I64Vec3>, - ) -> Val<bevy::math::I64Vec3> { - let output: Val<bevy::math::I64Vec3> = bevy::math::I64Vec3::dot_into_vec( + _self: Val<bevy::math::I8Vec3>, + rhs: Val<bevy::math::I8Vec3>, + ) -> Val<bevy::math::I8Vec3> { + let output: Val<bevy::math::I8Vec3> = bevy::math::I8Vec3::dot_into_vec( _self.into_inner(), rhs.into_inner(), ) @@ -5678,27 +4754,19 @@ impl bevy::math::I64Vec3 { } /// Returns the product of all elements of `self`. /// In other words, this computes `self.x * self.y * ..`. - fn element_product(_self: Val<bevy::math::I64Vec3>) -> i64 { - let output: i64 = bevy::math::I64Vec3::element_product(_self.into_inner()) - .into(); + fn element_product(_self: Val<bevy::math::I8Vec3>) -> i8 { + let output: i8 = bevy::math::I8Vec3::element_product(_self.into_inner()).into(); output } /// Returns the sum of all elements of `self`. /// In other words, this computes `self.x + self.y + ..`. - fn element_sum(_self: Val<bevy::math::I64Vec3>) -> i64 { - let output: i64 = bevy::math::I64Vec3::element_sum(_self.into_inner()).into(); - output - } - fn eq(_self: Ref<bevy::math::I64Vec3>, other: Ref<bevy::math::I64Vec3>) -> bool { - let output: bool = <bevy::math::I64Vec3 as std::cmp::PartialEq< - bevy::math::I64Vec3, - >>::eq(&_self, &other) - .into(); + fn element_sum(_self: Val<bevy::math::I8Vec3>) -> i8 { + let output: i8 = bevy::math::I8Vec3::element_sum(_self.into_inner()).into(); output } /// Creates a 4D vector from `self` and the given `w` value. - fn extend(_self: Val<bevy::math::I64Vec3>, w: i64) -> Val<bevy::math::I64Vec4> { - let output: Val<bevy::math::I64Vec4> = bevy::math::I64Vec3::extend( + fn extend(_self: Val<bevy::math::I8Vec3>, w: i8) -> Val<bevy::math::I8Vec4> { + let output: Val<bevy::math::I8Vec4> = bevy::math::I8Vec3::extend( _self.into_inner(), w, ) @@ -5706,30 +4774,30 @@ impl bevy::math::I64Vec3 { output } /// Creates a new vector from an array. - fn from_array(a: [i64; 3]) -> Val<bevy::math::I64Vec3> { - let output: Val<bevy::math::I64Vec3> = bevy::math::I64Vec3::from_array(a).into(); + fn from_array(a: [i8; 3]) -> Val<bevy::math::I8Vec3> { + let output: Val<bevy::math::I8Vec3> = bevy::math::I8Vec3::from_array(a).into(); output } /// Returns a bitmask with the lowest 3 bits set to the sign bits from the elements of `self`. /// A negative element results in a `1` bit and a positive element in a `0` bit. Element `x` goes /// into the first lowest bit, element `y` into the second, etc. - fn is_negative_bitmask(_self: Val<bevy::math::I64Vec3>) -> u32 { - let output: u32 = bevy::math::I64Vec3::is_negative_bitmask(_self.into_inner()) + fn is_negative_bitmask(_self: Val<bevy::math::I8Vec3>) -> u32 { + let output: u32 = bevy::math::I8Vec3::is_negative_bitmask(_self.into_inner()) .into(); output } /// Computes the squared length of `self`. - fn length_squared(_self: Val<bevy::math::I64Vec3>) -> i64 { - let output: i64 = bevy::math::I64Vec3::length_squared(_self.into_inner()).into(); + fn length_squared(_self: Val<bevy::math::I8Vec3>) -> i8 { + let output: i8 = bevy::math::I8Vec3::length_squared(_self.into_inner()).into(); output } /// Returns a vector containing the maximum values for each element of `self` and `rhs`. /// In other words this computes `[self.x.max(rhs.x), self.y.max(rhs.y), ..]`. fn max( - _self: Val<bevy::math::I64Vec3>, - rhs: Val<bevy::math::I64Vec3>, - ) -> Val<bevy::math::I64Vec3> { - let output: Val<bevy::math::I64Vec3> = bevy::math::I64Vec3::max( + _self: Val<bevy::math::I8Vec3>, + rhs: Val<bevy::math::I8Vec3>, + ) -> Val<bevy::math::I8Vec3> { + let output: Val<bevy::math::I8Vec3> = bevy::math::I8Vec3::max( _self.into_inner(), rhs.into_inner(), ) @@ -5738,17 +4806,17 @@ impl bevy::math::I64Vec3 { } /// Returns the horizontal maximum of `self`. /// In other words this computes `max(x, y, ..)`. - fn max_element(_self: Val<bevy::math::I64Vec3>) -> i64 { - let output: i64 = bevy::math::I64Vec3::max_element(_self.into_inner()).into(); + fn max_element(_self: Val<bevy::math::I8Vec3>) -> i8 { + let output: i8 = bevy::math::I8Vec3::max_element(_self.into_inner()).into(); output } /// Returns a vector containing the minimum values for each element of `self` and `rhs`. /// In other words this computes `[self.x.min(rhs.x), self.y.min(rhs.y), ..]`. fn min( - _self: Val<bevy::math::I64Vec3>, - rhs: Val<bevy::math::I64Vec3>, - ) -> Val<bevy::math::I64Vec3> { - let output: Val<bevy::math::I64Vec3> = bevy::math::I64Vec3::min( + _self: Val<bevy::math::I8Vec3>, + rhs: Val<bevy::math::I8Vec3>, + ) -> Val<bevy::math::I8Vec3> { + let output: Val<bevy::math::I8Vec3> = bevy::math::I8Vec3::min( _self.into_inner(), rhs.into_inner(), ) @@ -5757,85 +4825,24 @@ impl bevy::math::I64Vec3 { } /// Returns the horizontal minimum of `self`. /// In other words this computes `min(x, y, ..)`. - fn min_element(_self: Val<bevy::math::I64Vec3>) -> i64 { - let output: i64 = bevy::math::I64Vec3::min_element(_self.into_inner()).into(); - output - } - fn mul( - _self: Val<bevy::math::I64Vec3>, - rhs: Ref<bevy::math::I64Vec3>, - ) -> Val<bevy::math::I64Vec3> { - let output: Val<bevy::math::I64Vec3> = <bevy::math::I64Vec3 as std::ops::Mul< - &bevy::math::I64Vec3, - >>::mul(_self.into_inner(), &rhs) - .into(); - output - } - fn mul( - _self: Val<bevy::math::I64Vec3>, - rhs: Val<bevy::math::I64Vec3>, - ) -> Val<bevy::math::I64Vec3> { - let output: Val<bevy::math::I64Vec3> = <bevy::math::I64Vec3 as std::ops::Mul< - bevy::math::I64Vec3, - >>::mul(_self.into_inner(), rhs.into_inner()) - .into(); - output - } - fn mul(_self: Val<bevy::math::I64Vec3>, rhs: i64) -> Val<bevy::math::I64Vec3> { - let output: Val<bevy::math::I64Vec3> = <bevy::math::I64Vec3 as std::ops::Mul< - i64, - >>::mul(_self.into_inner(), rhs) - .into(); - output - } - fn neg(_self: Val<bevy::math::I64Vec3>) -> Val<bevy::math::I64Vec3> { - let output: Val<bevy::math::I64Vec3> = <bevy::math::I64Vec3 as std::ops::Neg>::neg( - _self.into_inner(), - ) - .into(); + fn min_element(_self: Val<bevy::math::I8Vec3>) -> i8 { + let output: i8 = bevy::math::I8Vec3::min_element(_self.into_inner()).into(); output } /// Creates a new vector. - fn new(x: i64, y: i64, z: i64) -> Val<bevy::math::I64Vec3> { - let output: Val<bevy::math::I64Vec3> = bevy::math::I64Vec3::new(x, y, z).into(); - output - } - fn rem( - _self: Val<bevy::math::I64Vec3>, - rhs: Ref<bevy::math::I64Vec3>, - ) -> Val<bevy::math::I64Vec3> { - let output: Val<bevy::math::I64Vec3> = <bevy::math::I64Vec3 as std::ops::Rem< - &bevy::math::I64Vec3, - >>::rem(_self.into_inner(), &rhs) - .into(); - output - } - fn rem( - _self: Val<bevy::math::I64Vec3>, - rhs: Val<bevy::math::I64Vec3>, - ) -> Val<bevy::math::I64Vec3> { - let output: Val<bevy::math::I64Vec3> = <bevy::math::I64Vec3 as std::ops::Rem< - bevy::math::I64Vec3, - >>::rem(_self.into_inner(), rhs.into_inner()) - .into(); - output - } - fn rem(_self: Val<bevy::math::I64Vec3>, rhs: i64) -> Val<bevy::math::I64Vec3> { - let output: Val<bevy::math::I64Vec3> = <bevy::math::I64Vec3 as std::ops::Rem< - i64, - >>::rem(_self.into_inner(), rhs) - .into(); + fn new(x: i8, y: i8, z: i8) -> Val<bevy::math::I8Vec3> { + let output: Val<bevy::math::I8Vec3> = bevy::math::I8Vec3::new(x, y, z).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 + /// [Euclidean division]: i8::rem_euclid fn rem_euclid( - _self: Val<bevy::math::I64Vec3>, - rhs: Val<bevy::math::I64Vec3>, - ) -> Val<bevy::math::I64Vec3> { - let output: Val<bevy::math::I64Vec3> = bevy::math::I64Vec3::rem_euclid( + _self: Val<bevy::math::I8Vec3>, + rhs: Val<bevy::math::I8Vec3>, + ) -> Val<bevy::math::I8Vec3> { + let output: Val<bevy::math::I8Vec3> = bevy::math::I8Vec3::rem_euclid( _self.into_inner(), rhs.into_inner(), ) @@ -5845,10 +4852,10 @@ impl bevy::math::I64Vec3 { /// Returns a vector containing the saturating addition of `self` and `rhs`. /// In other words this computes `[self.x.saturating_add(rhs.x), self.y.saturating_add(rhs.y), ..]`. fn saturating_add( - _self: Val<bevy::math::I64Vec3>, - rhs: Val<bevy::math::I64Vec3>, - ) -> Val<bevy::math::I64Vec3> { - let output: Val<bevy::math::I64Vec3> = bevy::math::I64Vec3::saturating_add( + _self: Val<bevy::math::I8Vec3>, + rhs: Val<bevy::math::I8Vec3>, + ) -> Val<bevy::math::I8Vec3> { + let output: Val<bevy::math::I8Vec3> = bevy::math::I8Vec3::saturating_add( _self.into_inner(), rhs.into_inner(), ) @@ -5857,10 +4864,10 @@ impl bevy::math::I64Vec3 { } /// In other words this computes `[self.x.saturating_add_unsigned(rhs.x), self.y.saturating_add_unsigned(rhs.y), ..]`. fn saturating_add_unsigned( - _self: Val<bevy::math::I64Vec3>, - rhs: Val<bevy::math::U64Vec3>, - ) -> Val<bevy::math::I64Vec3> { - let output: Val<bevy::math::I64Vec3> = bevy::math::I64Vec3::saturating_add_unsigned( + _self: Val<bevy::math::I8Vec3>, + rhs: Val<bevy::math::U8Vec3>, + ) -> Val<bevy::math::I8Vec3> { + let output: Val<bevy::math::I8Vec3> = bevy::math::I8Vec3::saturating_add_unsigned( _self.into_inner(), rhs.into_inner(), ) @@ -5870,10 +4877,10 @@ impl bevy::math::I64Vec3 { /// Returns a vector containing the saturating division of `self` and `rhs`. /// In other words this computes `[self.x.saturating_div(rhs.x), self.y.saturating_div(rhs.y), ..]`. fn saturating_div( - _self: Val<bevy::math::I64Vec3>, - rhs: Val<bevy::math::I64Vec3>, - ) -> Val<bevy::math::I64Vec3> { - let output: Val<bevy::math::I64Vec3> = bevy::math::I64Vec3::saturating_div( + _self: Val<bevy::math::I8Vec3>, + rhs: Val<bevy::math::I8Vec3>, + ) -> Val<bevy::math::I8Vec3> { + let output: Val<bevy::math::I8Vec3> = bevy::math::I8Vec3::saturating_div( _self.into_inner(), rhs.into_inner(), ) @@ -5883,10 +4890,10 @@ impl bevy::math::I64Vec3 { /// Returns a vector containing the saturating multiplication of `self` and `rhs`. /// In other words this computes `[self.x.saturating_mul(rhs.x), self.y.saturating_mul(rhs.y), ..]`. fn saturating_mul( - _self: Val<bevy::math::I64Vec3>, - rhs: Val<bevy::math::I64Vec3>, - ) -> Val<bevy::math::I64Vec3> { - let output: Val<bevy::math::I64Vec3> = bevy::math::I64Vec3::saturating_mul( + _self: Val<bevy::math::I8Vec3>, + rhs: Val<bevy::math::I8Vec3>, + ) -> Val<bevy::math::I8Vec3> { + let output: Val<bevy::math::I8Vec3> = bevy::math::I8Vec3::saturating_mul( _self.into_inner(), rhs.into_inner(), ) @@ -5896,10 +4903,10 @@ impl bevy::math::I64Vec3 { /// Returns a vector containing the saturating subtraction of `self` and `rhs`. /// In other words this computes `[self.x.saturating_sub(rhs.x), self.y.saturating_sub(rhs.y), ..]`. fn saturating_sub( - _self: Val<bevy::math::I64Vec3>, - rhs: Val<bevy::math::I64Vec3>, - ) -> Val<bevy::math::I64Vec3> { - let output: Val<bevy::math::I64Vec3> = bevy::math::I64Vec3::saturating_sub( + _self: Val<bevy::math::I8Vec3>, + rhs: Val<bevy::math::I8Vec3>, + ) -> Val<bevy::math::I8Vec3> { + let output: Val<bevy::math::I8Vec3> = bevy::math::I8Vec3::saturating_sub( _self.into_inner(), rhs.into_inner(), ) @@ -5909,10 +4916,10 @@ impl bevy::math::I64Vec3 { /// Returns a vector containing the saturating subtraction of `self` and unsigned vector `rhs`. /// In other words this computes `[self.x.saturating_sub_unsigned(rhs.x), self.y.saturating_sub_unsigned(rhs.y), ..]`. fn saturating_sub_unsigned( - _self: Val<bevy::math::I64Vec3>, - rhs: Val<bevy::math::U64Vec3>, - ) -> Val<bevy::math::I64Vec3> { - let output: Val<bevy::math::I64Vec3> = bevy::math::I64Vec3::saturating_sub_unsigned( + _self: Val<bevy::math::I8Vec3>, + rhs: Val<bevy::math::U8Vec3>, + ) -> Val<bevy::math::I8Vec3> { + let output: Val<bevy::math::I8Vec3> = bevy::math::I8Vec3::saturating_sub_unsigned( _self.into_inner(), rhs.into_inner(), ) @@ -5925,10 +4932,10 @@ impl bevy::math::I64Vec3 { /// uses the element from `if_false`. fn select( mask: Val<bevy::math::BVec3>, - if_true: Val<bevy::math::I64Vec3>, - if_false: Val<bevy::math::I64Vec3>, - ) -> Val<bevy::math::I64Vec3> { - let output: Val<bevy::math::I64Vec3> = bevy::math::I64Vec3::select( + if_true: Val<bevy::math::I8Vec3>, + if_false: Val<bevy::math::I8Vec3>, + ) -> Val<bevy::math::I8Vec3> { + let output: Val<bevy::math::I8Vec3> = bevy::math::I8Vec3::select( mask.into_inner(), if_true.into_inner(), if_false.into_inner(), @@ -5940,62 +4947,35 @@ impl bevy::math::I64Vec3 { /// - `0` if the number is zero /// - `1` if the number is positive /// - `-1` if the number is negative - fn signum(_self: Val<bevy::math::I64Vec3>) -> Val<bevy::math::I64Vec3> { - let output: Val<bevy::math::I64Vec3> = bevy::math::I64Vec3::signum( + fn signum(_self: Val<bevy::math::I8Vec3>) -> Val<bevy::math::I8Vec3> { + let output: Val<bevy::math::I8Vec3> = bevy::math::I8Vec3::signum( _self.into_inner(), ) .into(); output } /// Creates a vector with all elements set to `v`. - fn splat(v: i64) -> Val<bevy::math::I64Vec3> { - let output: Val<bevy::math::I64Vec3> = bevy::math::I64Vec3::splat(v).into(); + fn splat(v: i8) -> Val<bevy::math::I8Vec3> { + let output: Val<bevy::math::I8Vec3> = bevy::math::I8Vec3::splat(v).into(); output } - fn sub( - _self: Val<bevy::math::I64Vec3>, - rhs: Ref<bevy::math::I64Vec3>, - ) -> Val<bevy::math::I64Vec3> { - let output: Val<bevy::math::I64Vec3> = <bevy::math::I64Vec3 as std::ops::Sub< - &bevy::math::I64Vec3, - >>::sub(_self.into_inner(), &rhs) - .into(); - output - } - fn sub( - _self: Val<bevy::math::I64Vec3>, - rhs: Val<bevy::math::I64Vec3>, - ) -> Val<bevy::math::I64Vec3> { - let output: Val<bevy::math::I64Vec3> = <bevy::math::I64Vec3 as std::ops::Sub< - bevy::math::I64Vec3, - >>::sub(_self.into_inner(), rhs.into_inner()) - .into(); - output - } - fn sub(_self: Val<bevy::math::I64Vec3>, rhs: i64) -> Val<bevy::math::I64Vec3> { - let output: Val<bevy::math::I64Vec3> = <bevy::math::I64Vec3 as std::ops::Sub< - i64, - >>::sub(_self.into_inner(), rhs) - .into(); - output - } - /// `[x, y, z]` - fn to_array(_self: Ref<bevy::math::I64Vec3>) -> [i64; 3] { - let output: [i64; 3] = bevy::math::I64Vec3::to_array(&_self).into(); - output - } - /// Creates a 2D vector from the `x` and `y` elements of `self`, discarding `z`. - /// Truncation may also be performed by using [`self.xy()`][crate::swizzles::Vec3Swizzles::xy()]. - fn truncate(_self: Val<bevy::math::I64Vec3>) -> Val<bevy::math::I64Vec2> { - let output: Val<bevy::math::I64Vec2> = bevy::math::I64Vec3::truncate( - _self.into_inner(), - ) + /// `[x, y, z]` + fn to_array(_self: Ref<bevy::math::I8Vec3>) -> [i8; 3] { + let output: [i8; 3] = bevy::math::I8Vec3::to_array(&_self).into(); + output + } + /// Creates a 2D vector from the `x` and `y` elements of `self`, discarding `z`. + /// Truncation may also be performed by using [`self.xy()`][crate::swizzles::Vec3Swizzles::xy()]. + fn truncate(_self: Val<bevy::math::I8Vec3>) -> Val<bevy::math::I8Vec2> { + let output: Val<bevy::math::I8Vec2> = bevy::math::I8Vec3::truncate( + _self.into_inner(), + ) .into(); output } /// Creates a 3D vector from `self` with the given value of `x`. - fn with_x(_self: Val<bevy::math::I64Vec3>, x: i64) -> Val<bevy::math::I64Vec3> { - let output: Val<bevy::math::I64Vec3> = bevy::math::I64Vec3::with_x( + fn with_x(_self: Val<bevy::math::I8Vec3>, x: i8) -> Val<bevy::math::I8Vec3> { + let output: Val<bevy::math::I8Vec3> = bevy::math::I8Vec3::with_x( _self.into_inner(), x, ) @@ -6003,8 +4983,8 @@ impl bevy::math::I64Vec3 { output } /// Creates a 3D vector from `self` with the given value of `y`. - fn with_y(_self: Val<bevy::math::I64Vec3>, y: i64) -> Val<bevy::math::I64Vec3> { - let output: Val<bevy::math::I64Vec3> = bevy::math::I64Vec3::with_y( + fn with_y(_self: Val<bevy::math::I8Vec3>, y: i8) -> Val<bevy::math::I8Vec3> { + let output: Val<bevy::math::I8Vec3> = bevy::math::I8Vec3::with_y( _self.into_inner(), y, ) @@ -6012,8 +4992,8 @@ impl bevy::math::I64Vec3 { output } /// Creates a 3D vector from `self` with the given value of `z`. - fn with_z(_self: Val<bevy::math::I64Vec3>, z: i64) -> Val<bevy::math::I64Vec3> { - let output: Val<bevy::math::I64Vec3> = bevy::math::I64Vec3::with_z( + fn with_z(_self: Val<bevy::math::I8Vec3>, z: i8) -> Val<bevy::math::I8Vec3> { + let output: Val<bevy::math::I8Vec3> = bevy::math::I8Vec3::with_z( _self.into_inner(), z, ) @@ -6023,10 +5003,10 @@ impl bevy::math::I64Vec3 { /// Returns a vector containing the wrapping addition of `self` and `rhs`. /// In other words this computes `[self.x.wrapping_add(rhs.x), self.y.wrapping_add(rhs.y), ..]`. fn wrapping_add( - _self: Val<bevy::math::I64Vec3>, - rhs: Val<bevy::math::I64Vec3>, - ) -> Val<bevy::math::I64Vec3> { - let output: Val<bevy::math::I64Vec3> = bevy::math::I64Vec3::wrapping_add( + _self: Val<bevy::math::I8Vec3>, + rhs: Val<bevy::math::I8Vec3>, + ) -> Val<bevy::math::I8Vec3> { + let output: Val<bevy::math::I8Vec3> = bevy::math::I8Vec3::wrapping_add( _self.into_inner(), rhs.into_inner(), ) @@ -6036,10 +5016,10 @@ impl bevy::math::I64Vec3 { /// Returns a vector containing the wrapping addition of `self` and unsigned vector `rhs`. /// In other words this computes `[self.x.wrapping_add_unsigned(rhs.x), self.y.wrapping_add_unsigned(rhs.y), ..]`. fn wrapping_add_unsigned( - _self: Val<bevy::math::I64Vec3>, - rhs: Val<bevy::math::U64Vec3>, - ) -> Val<bevy::math::I64Vec3> { - let output: Val<bevy::math::I64Vec3> = bevy::math::I64Vec3::wrapping_add_unsigned( + _self: Val<bevy::math::I8Vec3>, + rhs: Val<bevy::math::U8Vec3>, + ) -> Val<bevy::math::I8Vec3> { + let output: Val<bevy::math::I8Vec3> = bevy::math::I8Vec3::wrapping_add_unsigned( _self.into_inner(), rhs.into_inner(), ) @@ -6049,10 +5029,10 @@ impl bevy::math::I64Vec3 { /// Returns a vector containing the wrapping division of `self` and `rhs`. /// In other words this computes `[self.x.wrapping_div(rhs.x), self.y.wrapping_div(rhs.y), ..]`. fn wrapping_div( - _self: Val<bevy::math::I64Vec3>, - rhs: Val<bevy::math::I64Vec3>, - ) -> Val<bevy::math::I64Vec3> { - let output: Val<bevy::math::I64Vec3> = bevy::math::I64Vec3::wrapping_div( + _self: Val<bevy::math::I8Vec3>, + rhs: Val<bevy::math::I8Vec3>, + ) -> Val<bevy::math::I8Vec3> { + let output: Val<bevy::math::I8Vec3> = bevy::math::I8Vec3::wrapping_div( _self.into_inner(), rhs.into_inner(), ) @@ -6062,10 +5042,10 @@ impl bevy::math::I64Vec3 { /// Returns a vector containing the wrapping multiplication of `self` and `rhs`. /// In other words this computes `[self.x.wrapping_mul(rhs.x), self.y.wrapping_mul(rhs.y), ..]`. fn wrapping_mul( - _self: Val<bevy::math::I64Vec3>, - rhs: Val<bevy::math::I64Vec3>, - ) -> Val<bevy::math::I64Vec3> { - let output: Val<bevy::math::I64Vec3> = bevy::math::I64Vec3::wrapping_mul( + _self: Val<bevy::math::I8Vec3>, + rhs: Val<bevy::math::I8Vec3>, + ) -> Val<bevy::math::I8Vec3> { + let output: Val<bevy::math::I8Vec3> = bevy::math::I8Vec3::wrapping_mul( _self.into_inner(), rhs.into_inner(), ) @@ -6075,10 +5055,10 @@ impl bevy::math::I64Vec3 { /// Returns a vector containing the wrapping subtraction of `self` and `rhs`. /// In other words this computes `[self.x.wrapping_sub(rhs.x), self.y.wrapping_sub(rhs.y), ..]`. fn wrapping_sub( - _self: Val<bevy::math::I64Vec3>, - rhs: Val<bevy::math::I64Vec3>, - ) -> Val<bevy::math::I64Vec3> { - let output: Val<bevy::math::I64Vec3> = bevy::math::I64Vec3::wrapping_sub( + _self: Val<bevy::math::I8Vec3>, + rhs: Val<bevy::math::I8Vec3>, + ) -> Val<bevy::math::I8Vec3> { + let output: Val<bevy::math::I8Vec3> = bevy::math::I8Vec3::wrapping_sub( _self.into_inner(), rhs.into_inner(), ) @@ -6088,10 +5068,10 @@ impl bevy::math::I64Vec3 { /// Returns a vector containing the wrapping subtraction of `self` and unsigned vector `rhs`. /// In other words this computes `[self.x.wrapping_sub_unsigned(rhs.x), self.y.wrapping_sub_unsigned(rhs.y), ..]`. fn wrapping_sub_unsigned( - _self: Val<bevy::math::I64Vec3>, - rhs: Val<bevy::math::U64Vec3>, - ) -> Val<bevy::math::I64Vec3> { - let output: Val<bevy::math::I64Vec3> = bevy::math::I64Vec3::wrapping_sub_unsigned( + _self: Val<bevy::math::I8Vec3>, + rhs: Val<bevy::math::U8Vec3>, + ) -> Val<bevy::math::I8Vec3> { + let output: Val<bevy::math::I8Vec3> = bevy::math::I8Vec3::wrapping_sub_unsigned( _self.into_inner(), rhs.into_inner(), ) @@ -6101,92 +5081,77 @@ impl bevy::math::I64Vec3 { } #[script_bindings( remote, - name = "i_64_vec_4_functions", + name = "i_8_vec_4_functions", bms_core_path = "bevy_mod_scripting_core", generated )] -impl bevy::math::I64Vec4 { +impl bevy::math::I8Vec4 { /// Returns a vector containing the absolute value of each element of `self`. - fn abs(_self: Val<bevy::math::I64Vec4>) -> Val<bevy::math::I64Vec4> { - let output: Val<bevy::math::I64Vec4> = bevy::math::I64Vec4::abs( - _self.into_inner(), - ) + fn abs(_self: Val<bevy::math::I8Vec4>) -> Val<bevy::math::I8Vec4> { + let output: Val<bevy::math::I8Vec4> = bevy::math::I8Vec4::abs(_self.into_inner()) .into(); output } - fn add( - _self: Val<bevy::math::I64Vec4>, - rhs: Ref<bevy::math::I64Vec4>, - ) -> Val<bevy::math::I64Vec4> { - let output: Val<bevy::math::I64Vec4> = <bevy::math::I64Vec4 as std::ops::Add< - &bevy::math::I64Vec4, - >>::add(_self.into_inner(), &rhs) - .into(); + /// Casts all elements of `self` to `f64`. + fn as_dvec4(_self: Ref<bevy::math::I8Vec4>) -> Val<bevy::math::DVec4> { + let output: Val<bevy::math::DVec4> = bevy::math::I8Vec4::as_dvec4(&_self).into(); output } - fn add( - _self: Val<bevy::math::I64Vec4>, - rhs: Val<bevy::math::I64Vec4>, - ) -> Val<bevy::math::I64Vec4> { - let output: Val<bevy::math::I64Vec4> = <bevy::math::I64Vec4 as std::ops::Add< - bevy::math::I64Vec4, - >>::add(_self.into_inner(), rhs.into_inner()) + /// Casts all elements of `self` to `i16`. + fn as_i16vec4(_self: Ref<bevy::math::I8Vec4>) -> Val<bevy::math::I16Vec4> { + let output: Val<bevy::math::I16Vec4> = bevy::math::I8Vec4::as_i16vec4(&_self) .into(); output } - fn add(_self: Val<bevy::math::I64Vec4>, rhs: i64) -> Val<bevy::math::I64Vec4> { - let output: Val<bevy::math::I64Vec4> = <bevy::math::I64Vec4 as std::ops::Add< - i64, - >>::add(_self.into_inner(), rhs) + /// Casts all elements of `self` to `i64`. + fn as_i64vec4(_self: Ref<bevy::math::I8Vec4>) -> Val<bevy::math::I64Vec4> { + let output: Val<bevy::math::I64Vec4> = bevy::math::I8Vec4::as_i64vec4(&_self) .into(); output } - /// Casts all elements of `self` to `f64`. - fn as_dvec4(_self: Ref<bevy::math::I64Vec4>) -> Val<bevy::math::DVec4> { - let output: Val<bevy::math::DVec4> = bevy::math::I64Vec4::as_dvec4(&_self) - .into(); + /// Casts all elements of `self` to `i32`. + fn as_ivec4(_self: Ref<bevy::math::I8Vec4>) -> Val<bevy::math::IVec4> { + let output: Val<bevy::math::IVec4> = bevy::math::I8Vec4::as_ivec4(&_self).into(); output } - /// Casts all elements of `self` to `i32`. - fn as_ivec4(_self: Ref<bevy::math::I64Vec4>) -> Val<bevy::math::IVec4> { - let output: Val<bevy::math::IVec4> = bevy::math::I64Vec4::as_ivec4(&_self) + /// Casts all elements of `self` to `u16`. + fn as_u16vec4(_self: Ref<bevy::math::I8Vec4>) -> Val<bevy::math::U16Vec4> { + let output: Val<bevy::math::U16Vec4> = bevy::math::I8Vec4::as_u16vec4(&_self) .into(); output } /// Casts all elements of `self` to `u64`. - fn as_u64vec4(_self: Ref<bevy::math::I64Vec4>) -> Val<bevy::math::U64Vec4> { - let output: Val<bevy::math::U64Vec4> = bevy::math::I64Vec4::as_u64vec4(&_self) + fn as_u64vec4(_self: Ref<bevy::math::I8Vec4>) -> Val<bevy::math::U64Vec4> { + let output: Val<bevy::math::U64Vec4> = bevy::math::I8Vec4::as_u64vec4(&_self) .into(); output } - /// Casts all elements of `self` to `u32`. - fn as_uvec4(_self: Ref<bevy::math::I64Vec4>) -> Val<bevy::math::UVec4> { - let output: Val<bevy::math::UVec4> = bevy::math::I64Vec4::as_uvec4(&_self) + /// Casts all elements of `self` to `u8`. + fn as_u8vec4(_self: Ref<bevy::math::I8Vec4>) -> Val<bevy::math::U8Vec4> { + let output: Val<bevy::math::U8Vec4> = bevy::math::I8Vec4::as_u8vec4(&_self) .into(); output } - /// Casts all elements of `self` to `f32`. - fn as_vec4(_self: Ref<bevy::math::I64Vec4>) -> Val<bevy::math::Vec4> { - let output: Val<bevy::math::Vec4> = bevy::math::I64Vec4::as_vec4(&_self).into(); + /// Casts all elements of `self` to `u32`. + fn as_uvec4(_self: Ref<bevy::math::I8Vec4>) -> Val<bevy::math::UVec4> { + let output: Val<bevy::math::UVec4> = bevy::math::I8Vec4::as_uvec4(&_self).into(); output } - fn assert_receiver_is_total_eq(_self: Ref<bevy::math::I64Vec4>) -> () { - let output: () = <bevy::math::I64Vec4 as std::cmp::Eq>::assert_receiver_is_total_eq( - &_self, - ) - .into(); + /// Casts all elements of `self` to `f32`. + fn as_vec4(_self: Ref<bevy::math::I8Vec4>) -> Val<bevy::math::Vec4> { + let output: Val<bevy::math::Vec4> = bevy::math::I8Vec4::as_vec4(&_self).into(); output } - /// Component-wise clamping of values, similar to [`i64::clamp`]. + /// Component-wise clamping of values, similar to [`i8::clamp`]. /// Each element in `min` must be less-or-equal to the corresponding element in `max`. /// # Panics /// Will panic if `min` is greater than `max` when `glam_assert` is enabled. fn clamp( - _self: Val<bevy::math::I64Vec4>, - min: Val<bevy::math::I64Vec4>, - max: Val<bevy::math::I64Vec4>, - ) -> Val<bevy::math::I64Vec4> { - let output: Val<bevy::math::I64Vec4> = bevy::math::I64Vec4::clamp( + _self: Val<bevy::math::I8Vec4>, + min: Val<bevy::math::I8Vec4>, + max: Val<bevy::math::I8Vec4>, + ) -> Val<bevy::math::I8Vec4> { + let output: Val<bevy::math::I8Vec4> = bevy::math::I8Vec4::clamp( _self.into_inner(), min.into_inner(), max.into_inner(), @@ -6194,22 +5159,15 @@ impl bevy::math::I64Vec4 { .into(); output } - fn clone(_self: Ref<bevy::math::I64Vec4>) -> Val<bevy::math::I64Vec4> { - let output: Val<bevy::math::I64Vec4> = <bevy::math::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<bevy::math::I64Vec4>, - rhs: Val<bevy::math::I64Vec4>, + _self: Val<bevy::math::I8Vec4>, + rhs: Val<bevy::math::I8Vec4>, ) -> Val<bevy::math::BVec4> { - let output: Val<bevy::math::BVec4> = bevy::math::I64Vec4::cmpeq( + let output: Val<bevy::math::BVec4> = bevy::math::I8Vec4::cmpeq( _self.into_inner(), rhs.into_inner(), ) @@ -6221,10 +5179,10 @@ impl bevy::math::I64Vec4 { /// In other words this computes `[self.x >= rhs.x, self.y >= rhs.y, ..]` for all /// elements. fn cmpge( - _self: Val<bevy::math::I64Vec4>, - rhs: Val<bevy::math::I64Vec4>, + _self: Val<bevy::math::I8Vec4>, + rhs: Val<bevy::math::I8Vec4>, ) -> Val<bevy::math::BVec4> { - let output: Val<bevy::math::BVec4> = bevy::math::I64Vec4::cmpge( + let output: Val<bevy::math::BVec4> = bevy::math::I8Vec4::cmpge( _self.into_inner(), rhs.into_inner(), ) @@ -6236,10 +5194,10 @@ impl bevy::math::I64Vec4 { /// In other words this computes `[self.x > rhs.x, self.y > rhs.y, ..]` for all /// elements. fn cmpgt( - _self: Val<bevy::math::I64Vec4>, - rhs: Val<bevy::math::I64Vec4>, + _self: Val<bevy::math::I8Vec4>, + rhs: Val<bevy::math::I8Vec4>, ) -> Val<bevy::math::BVec4> { - let output: Val<bevy::math::BVec4> = bevy::math::I64Vec4::cmpgt( + let output: Val<bevy::math::BVec4> = bevy::math::I8Vec4::cmpgt( _self.into_inner(), rhs.into_inner(), ) @@ -6251,10 +5209,10 @@ impl bevy::math::I64Vec4 { /// In other words this computes `[self.x <= rhs.x, self.y <= rhs.y, ..]` for all /// elements. fn cmple( - _self: Val<bevy::math::I64Vec4>, - rhs: Val<bevy::math::I64Vec4>, + _self: Val<bevy::math::I8Vec4>, + rhs: Val<bevy::math::I8Vec4>, ) -> Val<bevy::math::BVec4> { - let output: Val<bevy::math::BVec4> = bevy::math::I64Vec4::cmple( + let output: Val<bevy::math::BVec4> = bevy::math::I8Vec4::cmple( _self.into_inner(), rhs.into_inner(), ) @@ -6266,10 +5224,10 @@ impl bevy::math::I64Vec4 { /// In other words this computes `[self.x < rhs.x, self.y < rhs.y, ..]` for all /// elements. fn cmplt( - _self: Val<bevy::math::I64Vec4>, - rhs: Val<bevy::math::I64Vec4>, + _self: Val<bevy::math::I8Vec4>, + rhs: Val<bevy::math::I8Vec4>, ) -> Val<bevy::math::BVec4> { - let output: Val<bevy::math::BVec4> = bevy::math::I64Vec4::cmplt( + let output: Val<bevy::math::BVec4> = bevy::math::I8Vec4::cmplt( _self.into_inner(), rhs.into_inner(), ) @@ -6281,10 +5239,10 @@ impl bevy::math::I64Vec4 { /// In other words this computes `[self.x != rhs.x, self.y != rhs.y, ..]` for all /// elements. fn cmpne( - _self: Val<bevy::math::I64Vec4>, - rhs: Val<bevy::math::I64Vec4>, + _self: Val<bevy::math::I8Vec4>, + rhs: Val<bevy::math::I8Vec4>, ) -> Val<bevy::math::BVec4> { - let output: Val<bevy::math::BVec4> = bevy::math::I64Vec4::cmpne( + let output: Val<bevy::math::BVec4> = bevy::math::I8Vec4::cmpne( _self.into_inner(), rhs.into_inner(), ) @@ -6293,51 +5251,24 @@ impl bevy::math::I64Vec4 { } /// Compute the squared euclidean distance between two points in space. fn distance_squared( - _self: Val<bevy::math::I64Vec4>, - rhs: Val<bevy::math::I64Vec4>, - ) -> i64 { - let output: i64 = bevy::math::I64Vec4::distance_squared( + _self: Val<bevy::math::I8Vec4>, + rhs: Val<bevy::math::I8Vec4>, + ) -> i8 { + let output: i8 = bevy::math::I8Vec4::distance_squared( _self.into_inner(), rhs.into_inner(), ) .into(); output } - fn div( - _self: Val<bevy::math::I64Vec4>, - rhs: Ref<bevy::math::I64Vec4>, - ) -> Val<bevy::math::I64Vec4> { - let output: Val<bevy::math::I64Vec4> = <bevy::math::I64Vec4 as std::ops::Div< - &bevy::math::I64Vec4, - >>::div(_self.into_inner(), &rhs) - .into(); - output - } - fn div( - _self: Val<bevy::math::I64Vec4>, - rhs: Val<bevy::math::I64Vec4>, - ) -> Val<bevy::math::I64Vec4> { - let output: Val<bevy::math::I64Vec4> = <bevy::math::I64Vec4 as std::ops::Div< - bevy::math::I64Vec4, - >>::div(_self.into_inner(), rhs.into_inner()) - .into(); - output - } - fn div(_self: Val<bevy::math::I64Vec4>, rhs: i64) -> Val<bevy::math::I64Vec4> { - let output: Val<bevy::math::I64Vec4> = <bevy::math::I64Vec4 as std::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<bevy::math::I64Vec4>, - rhs: Val<bevy::math::I64Vec4>, - ) -> Val<bevy::math::I64Vec4> { - let output: Val<bevy::math::I64Vec4> = bevy::math::I64Vec4::div_euclid( + _self: Val<bevy::math::I8Vec4>, + rhs: Val<bevy::math::I8Vec4>, + ) -> Val<bevy::math::I8Vec4> { + let output: Val<bevy::math::I8Vec4> = bevy::math::I8Vec4::div_euclid( _self.into_inner(), rhs.into_inner(), ) @@ -6345,17 +5276,17 @@ impl bevy::math::I64Vec4 { output } /// Computes the dot product of `self` and `rhs`. - fn dot(_self: Val<bevy::math::I64Vec4>, rhs: Val<bevy::math::I64Vec4>) -> i64 { - let output: i64 = bevy::math::I64Vec4::dot(_self.into_inner(), rhs.into_inner()) + fn dot(_self: Val<bevy::math::I8Vec4>, rhs: Val<bevy::math::I8Vec4>) -> i8 { + let output: i8 = bevy::math::I8Vec4::dot(_self.into_inner(), rhs.into_inner()) .into(); output } /// Returns a vector where every component is the dot product of `self` and `rhs`. fn dot_into_vec( - _self: Val<bevy::math::I64Vec4>, - rhs: Val<bevy::math::I64Vec4>, - ) -> Val<bevy::math::I64Vec4> { - let output: Val<bevy::math::I64Vec4> = bevy::math::I64Vec4::dot_into_vec( + _self: Val<bevy::math::I8Vec4>, + rhs: Val<bevy::math::I8Vec4>, + ) -> Val<bevy::math::I8Vec4> { + let output: Val<bevy::math::I8Vec4> = bevy::math::I8Vec4::dot_into_vec( _self.into_inner(), rhs.into_inner(), ) @@ -6364,49 +5295,41 @@ impl bevy::math::I64Vec4 { } /// Returns the product of all elements of `self`. /// In other words, this computes `self.x * self.y * ..`. - fn element_product(_self: Val<bevy::math::I64Vec4>) -> i64 { - let output: i64 = bevy::math::I64Vec4::element_product(_self.into_inner()) - .into(); + fn element_product(_self: Val<bevy::math::I8Vec4>) -> i8 { + let output: i8 = bevy::math::I8Vec4::element_product(_self.into_inner()).into(); output } /// Returns the sum of all elements of `self`. /// In other words, this computes `self.x + self.y + ..`. - fn element_sum(_self: Val<bevy::math::I64Vec4>) -> i64 { - let output: i64 = bevy::math::I64Vec4::element_sum(_self.into_inner()).into(); - output - } - fn eq(_self: Ref<bevy::math::I64Vec4>, other: Ref<bevy::math::I64Vec4>) -> bool { - let output: bool = <bevy::math::I64Vec4 as std::cmp::PartialEq< - bevy::math::I64Vec4, - >>::eq(&_self, &other) - .into(); + fn element_sum(_self: Val<bevy::math::I8Vec4>) -> i8 { + let output: i8 = bevy::math::I8Vec4::element_sum(_self.into_inner()).into(); output } /// Creates a new vector from an array. - fn from_array(a: [i64; 4]) -> Val<bevy::math::I64Vec4> { - let output: Val<bevy::math::I64Vec4> = bevy::math::I64Vec4::from_array(a).into(); + fn from_array(a: [i8; 4]) -> Val<bevy::math::I8Vec4> { + let output: Val<bevy::math::I8Vec4> = bevy::math::I8Vec4::from_array(a).into(); output } /// Returns a bitmask with the lowest 4 bits set to the sign bits from the elements of `self`. /// A negative element results in a `1` bit and a positive element in a `0` bit. Element `x` goes /// into the first lowest bit, element `y` into the second, etc. - fn is_negative_bitmask(_self: Val<bevy::math::I64Vec4>) -> u32 { - let output: u32 = bevy::math::I64Vec4::is_negative_bitmask(_self.into_inner()) + fn is_negative_bitmask(_self: Val<bevy::math::I8Vec4>) -> u32 { + let output: u32 = bevy::math::I8Vec4::is_negative_bitmask(_self.into_inner()) .into(); output } /// Computes the squared length of `self`. - fn length_squared(_self: Val<bevy::math::I64Vec4>) -> i64 { - let output: i64 = bevy::math::I64Vec4::length_squared(_self.into_inner()).into(); + fn length_squared(_self: Val<bevy::math::I8Vec4>) -> i8 { + let output: i8 = bevy::math::I8Vec4::length_squared(_self.into_inner()).into(); output } /// Returns a vector containing the maximum values for each element of `self` and `rhs`. /// In other words this computes `[self.x.max(rhs.x), self.y.max(rhs.y), ..]`. fn max( - _self: Val<bevy::math::I64Vec4>, - rhs: Val<bevy::math::I64Vec4>, - ) -> Val<bevy::math::I64Vec4> { - let output: Val<bevy::math::I64Vec4> = bevy::math::I64Vec4::max( + _self: Val<bevy::math::I8Vec4>, + rhs: Val<bevy::math::I8Vec4>, + ) -> Val<bevy::math::I8Vec4> { + let output: Val<bevy::math::I8Vec4> = bevy::math::I8Vec4::max( _self.into_inner(), rhs.into_inner(), ) @@ -6415,17 +5338,17 @@ impl bevy::math::I64Vec4 { } /// Returns the horizontal maximum of `self`. /// In other words this computes `max(x, y, ..)`. - fn max_element(_self: Val<bevy::math::I64Vec4>) -> i64 { - let output: i64 = bevy::math::I64Vec4::max_element(_self.into_inner()).into(); + fn max_element(_self: Val<bevy::math::I8Vec4>) -> i8 { + let output: i8 = bevy::math::I8Vec4::max_element(_self.into_inner()).into(); output } /// Returns a vector containing the minimum values for each element of `self` and `rhs`. /// In other words this computes `[self.x.min(rhs.x), self.y.min(rhs.y), ..]`. fn min( - _self: Val<bevy::math::I64Vec4>, - rhs: Val<bevy::math::I64Vec4>, - ) -> Val<bevy::math::I64Vec4> { - let output: Val<bevy::math::I64Vec4> = bevy::math::I64Vec4::min( + _self: Val<bevy::math::I8Vec4>, + rhs: Val<bevy::math::I8Vec4>, + ) -> Val<bevy::math::I8Vec4> { + let output: Val<bevy::math::I8Vec4> = bevy::math::I8Vec4::min( _self.into_inner(), rhs.into_inner(), ) @@ -6434,86 +5357,24 @@ impl bevy::math::I64Vec4 { } /// Returns the horizontal minimum of `self`. /// In other words this computes `min(x, y, ..)`. - fn min_element(_self: Val<bevy::math::I64Vec4>) -> i64 { - let output: i64 = bevy::math::I64Vec4::min_element(_self.into_inner()).into(); - output - } - fn mul( - _self: Val<bevy::math::I64Vec4>, - rhs: Ref<bevy::math::I64Vec4>, - ) -> Val<bevy::math::I64Vec4> { - let output: Val<bevy::math::I64Vec4> = <bevy::math::I64Vec4 as std::ops::Mul< - &bevy::math::I64Vec4, - >>::mul(_self.into_inner(), &rhs) - .into(); - output - } - fn mul( - _self: Val<bevy::math::I64Vec4>, - rhs: Val<bevy::math::I64Vec4>, - ) -> Val<bevy::math::I64Vec4> { - let output: Val<bevy::math::I64Vec4> = <bevy::math::I64Vec4 as std::ops::Mul< - bevy::math::I64Vec4, - >>::mul(_self.into_inner(), rhs.into_inner()) - .into(); - output - } - fn mul(_self: Val<bevy::math::I64Vec4>, rhs: i64) -> Val<bevy::math::I64Vec4> { - let output: Val<bevy::math::I64Vec4> = <bevy::math::I64Vec4 as std::ops::Mul< - i64, - >>::mul(_self.into_inner(), rhs) - .into(); - output - } - fn neg(_self: Val<bevy::math::I64Vec4>) -> Val<bevy::math::I64Vec4> { - let output: Val<bevy::math::I64Vec4> = <bevy::math::I64Vec4 as std::ops::Neg>::neg( - _self.into_inner(), - ) - .into(); + fn min_element(_self: Val<bevy::math::I8Vec4>) -> i8 { + let output: i8 = bevy::math::I8Vec4::min_element(_self.into_inner()).into(); output } /// Creates a new vector. - fn new(x: i64, y: i64, z: i64, w: i64) -> Val<bevy::math::I64Vec4> { - let output: Val<bevy::math::I64Vec4> = bevy::math::I64Vec4::new(x, y, z, w) - .into(); - output - } - fn rem( - _self: Val<bevy::math::I64Vec4>, - rhs: Ref<bevy::math::I64Vec4>, - ) -> Val<bevy::math::I64Vec4> { - let output: Val<bevy::math::I64Vec4> = <bevy::math::I64Vec4 as std::ops::Rem< - &bevy::math::I64Vec4, - >>::rem(_self.into_inner(), &rhs) - .into(); - output - } - fn rem( - _self: Val<bevy::math::I64Vec4>, - rhs: Val<bevy::math::I64Vec4>, - ) -> Val<bevy::math::I64Vec4> { - let output: Val<bevy::math::I64Vec4> = <bevy::math::I64Vec4 as std::ops::Rem< - bevy::math::I64Vec4, - >>::rem(_self.into_inner(), rhs.into_inner()) - .into(); - output - } - fn rem(_self: Val<bevy::math::I64Vec4>, rhs: i64) -> Val<bevy::math::I64Vec4> { - let output: Val<bevy::math::I64Vec4> = <bevy::math::I64Vec4 as std::ops::Rem< - i64, - >>::rem(_self.into_inner(), rhs) - .into(); + fn new(x: i8, y: i8, z: i8, w: i8) -> Val<bevy::math::I8Vec4> { + let output: Val<bevy::math::I8Vec4> = bevy::math::I8Vec4::new(x, y, z, w).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 + /// [Euclidean division]: i8::rem_euclid fn rem_euclid( - _self: Val<bevy::math::I64Vec4>, - rhs: Val<bevy::math::I64Vec4>, - ) -> Val<bevy::math::I64Vec4> { - let output: Val<bevy::math::I64Vec4> = bevy::math::I64Vec4::rem_euclid( + _self: Val<bevy::math::I8Vec4>, + rhs: Val<bevy::math::I8Vec4>, + ) -> Val<bevy::math::I8Vec4> { + let output: Val<bevy::math::I8Vec4> = bevy::math::I8Vec4::rem_euclid( _self.into_inner(), rhs.into_inner(), ) @@ -6523,10 +5384,10 @@ impl bevy::math::I64Vec4 { /// Returns a vector containing the saturating addition of `self` and `rhs`. /// In other words this computes `[self.x.saturating_add(rhs.x), self.y.saturating_add(rhs.y), ..]`. fn saturating_add( - _self: Val<bevy::math::I64Vec4>, - rhs: Val<bevy::math::I64Vec4>, - ) -> Val<bevy::math::I64Vec4> { - let output: Val<bevy::math::I64Vec4> = bevy::math::I64Vec4::saturating_add( + _self: Val<bevy::math::I8Vec4>, + rhs: Val<bevy::math::I8Vec4>, + ) -> Val<bevy::math::I8Vec4> { + let output: Val<bevy::math::I8Vec4> = bevy::math::I8Vec4::saturating_add( _self.into_inner(), rhs.into_inner(), ) @@ -6535,10 +5396,10 @@ impl bevy::math::I64Vec4 { } /// In other words this computes `[self.x.saturating_add_unsigned(rhs.x), self.y.saturating_add_unsigned(rhs.y), ..]`. fn saturating_add_unsigned( - _self: Val<bevy::math::I64Vec4>, - rhs: Val<bevy::math::U64Vec4>, - ) -> Val<bevy::math::I64Vec4> { - let output: Val<bevy::math::I64Vec4> = bevy::math::I64Vec4::saturating_add_unsigned( + _self: Val<bevy::math::I8Vec4>, + rhs: Val<bevy::math::U8Vec4>, + ) -> Val<bevy::math::I8Vec4> { + let output: Val<bevy::math::I8Vec4> = bevy::math::I8Vec4::saturating_add_unsigned( _self.into_inner(), rhs.into_inner(), ) @@ -6548,10 +5409,10 @@ impl bevy::math::I64Vec4 { /// Returns a vector containing the saturating division of `self` and `rhs`. /// In other words this computes `[self.x.saturating_div(rhs.x), self.y.saturating_div(rhs.y), ..]`. fn saturating_div( - _self: Val<bevy::math::I64Vec4>, - rhs: Val<bevy::math::I64Vec4>, - ) -> Val<bevy::math::I64Vec4> { - let output: Val<bevy::math::I64Vec4> = bevy::math::I64Vec4::saturating_div( + _self: Val<bevy::math::I8Vec4>, + rhs: Val<bevy::math::I8Vec4>, + ) -> Val<bevy::math::I8Vec4> { + let output: Val<bevy::math::I8Vec4> = bevy::math::I8Vec4::saturating_div( _self.into_inner(), rhs.into_inner(), ) @@ -6561,10 +5422,10 @@ impl bevy::math::I64Vec4 { /// Returns a vector containing the saturating multiplication of `self` and `rhs`. /// In other words this computes `[self.x.saturating_mul(rhs.x), self.y.saturating_mul(rhs.y), ..]`. fn saturating_mul( - _self: Val<bevy::math::I64Vec4>, - rhs: Val<bevy::math::I64Vec4>, - ) -> Val<bevy::math::I64Vec4> { - let output: Val<bevy::math::I64Vec4> = bevy::math::I64Vec4::saturating_mul( + _self: Val<bevy::math::I8Vec4>, + rhs: Val<bevy::math::I8Vec4>, + ) -> Val<bevy::math::I8Vec4> { + let output: Val<bevy::math::I8Vec4> = bevy::math::I8Vec4::saturating_mul( _self.into_inner(), rhs.into_inner(), ) @@ -6574,10 +5435,10 @@ impl bevy::math::I64Vec4 { /// Returns a vector containing the saturating subtraction of `self` and `rhs`. /// In other words this computes `[self.x.saturating_sub(rhs.x), self.y.saturating_sub(rhs.y), ..]`. fn saturating_sub( - _self: Val<bevy::math::I64Vec4>, - rhs: Val<bevy::math::I64Vec4>, - ) -> Val<bevy::math::I64Vec4> { - let output: Val<bevy::math::I64Vec4> = bevy::math::I64Vec4::saturating_sub( + _self: Val<bevy::math::I8Vec4>, + rhs: Val<bevy::math::I8Vec4>, + ) -> Val<bevy::math::I8Vec4> { + let output: Val<bevy::math::I8Vec4> = bevy::math::I8Vec4::saturating_sub( _self.into_inner(), rhs.into_inner(), ) @@ -6587,10 +5448,10 @@ impl bevy::math::I64Vec4 { /// Returns a vector containing the saturating subtraction of `self` and unsigned vector `rhs`. /// In other words this computes `[self.x.saturating_sub_unsigned(rhs.x), self.y.saturating_sub_unsigned(rhs.y), ..]`. fn saturating_sub_unsigned( - _self: Val<bevy::math::I64Vec4>, - rhs: Val<bevy::math::U64Vec4>, - ) -> Val<bevy::math::I64Vec4> { - let output: Val<bevy::math::I64Vec4> = bevy::math::I64Vec4::saturating_sub_unsigned( + _self: Val<bevy::math::I8Vec4>, + rhs: Val<bevy::math::U8Vec4>, + ) -> Val<bevy::math::I8Vec4> { + let output: Val<bevy::math::I8Vec4> = bevy::math::I8Vec4::saturating_sub_unsigned( _self.into_inner(), rhs.into_inner(), ) @@ -6603,10 +5464,10 @@ impl bevy::math::I64Vec4 { /// uses the element from `if_false`. fn select( mask: Val<bevy::math::BVec4>, - if_true: Val<bevy::math::I64Vec4>, - if_false: Val<bevy::math::I64Vec4>, - ) -> Val<bevy::math::I64Vec4> { - let output: Val<bevy::math::I64Vec4> = bevy::math::I64Vec4::select( + if_true: Val<bevy::math::I8Vec4>, + if_false: Val<bevy::math::I8Vec4>, + ) -> Val<bevy::math::I8Vec4> { + let output: Val<bevy::math::I8Vec4> = bevy::math::I8Vec4::select( mask.into_inner(), if_true.into_inner(), if_false.into_inner(), @@ -6618,62 +5479,35 @@ impl bevy::math::I64Vec4 { /// - `0` if the number is zero /// - `1` if the number is positive /// - `-1` if the number is negative - fn signum(_self: Val<bevy::math::I64Vec4>) -> Val<bevy::math::I64Vec4> { - let output: Val<bevy::math::I64Vec4> = bevy::math::I64Vec4::signum( + fn signum(_self: Val<bevy::math::I8Vec4>) -> Val<bevy::math::I8Vec4> { + let output: Val<bevy::math::I8Vec4> = bevy::math::I8Vec4::signum( _self.into_inner(), ) .into(); output } /// Creates a vector with all elements set to `v`. - fn splat(v: i64) -> Val<bevy::math::I64Vec4> { - let output: Val<bevy::math::I64Vec4> = bevy::math::I64Vec4::splat(v).into(); + fn splat(v: i8) -> Val<bevy::math::I8Vec4> { + let output: Val<bevy::math::I8Vec4> = bevy::math::I8Vec4::splat(v).into(); output } - fn sub( - _self: Val<bevy::math::I64Vec4>, - rhs: Ref<bevy::math::I64Vec4>, - ) -> Val<bevy::math::I64Vec4> { - let output: Val<bevy::math::I64Vec4> = <bevy::math::I64Vec4 as std::ops::Sub< - &bevy::math::I64Vec4, - >>::sub(_self.into_inner(), &rhs) - .into(); + /// `[x, y, z, w]` + fn to_array(_self: Ref<bevy::math::I8Vec4>) -> [i8; 4] { + let output: [i8; 4] = bevy::math::I8Vec4::to_array(&_self).into(); output } - fn sub( - _self: Val<bevy::math::I64Vec4>, - rhs: Val<bevy::math::I64Vec4>, - ) -> Val<bevy::math::I64Vec4> { - let output: Val<bevy::math::I64Vec4> = <bevy::math::I64Vec4 as std::ops::Sub< - bevy::math::I64Vec4, - >>::sub(_self.into_inner(), rhs.into_inner()) - .into(); - output - } - fn sub(_self: Val<bevy::math::I64Vec4>, rhs: i64) -> Val<bevy::math::I64Vec4> { - let output: Val<bevy::math::I64Vec4> = <bevy::math::I64Vec4 as std::ops::Sub< - i64, - >>::sub(_self.into_inner(), rhs) - .into(); - output - } - /// `[x, y, z, w]` - fn to_array(_self: Ref<bevy::math::I64Vec4>) -> [i64; 4] { - let output: [i64; 4] = bevy::math::I64Vec4::to_array(&_self).into(); - output - } - /// Creates a 3D vector from the `x`, `y` and `z` elements of `self`, discarding `w`. - /// Truncation to [`I64Vec3`] may also be performed by using [`self.xyz()`][crate::swizzles::Vec4Swizzles::xyz()]. - fn truncate(_self: Val<bevy::math::I64Vec4>) -> Val<bevy::math::I64Vec3> { - let output: Val<bevy::math::I64Vec3> = bevy::math::I64Vec4::truncate( - _self.into_inner(), - ) + /// 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<bevy::math::I8Vec4>) -> Val<bevy::math::I8Vec3> { + let output: Val<bevy::math::I8Vec3> = bevy::math::I8Vec4::truncate( + _self.into_inner(), + ) .into(); output } /// Creates a 4D vector from `self` with the given value of `w`. - fn with_w(_self: Val<bevy::math::I64Vec4>, w: i64) -> Val<bevy::math::I64Vec4> { - let output: Val<bevy::math::I64Vec4> = bevy::math::I64Vec4::with_w( + fn with_w(_self: Val<bevy::math::I8Vec4>, w: i8) -> Val<bevy::math::I8Vec4> { + let output: Val<bevy::math::I8Vec4> = bevy::math::I8Vec4::with_w( _self.into_inner(), w, ) @@ -6681,8 +5515,8 @@ impl bevy::math::I64Vec4 { output } /// Creates a 4D vector from `self` with the given value of `x`. - fn with_x(_self: Val<bevy::math::I64Vec4>, x: i64) -> Val<bevy::math::I64Vec4> { - let output: Val<bevy::math::I64Vec4> = bevy::math::I64Vec4::with_x( + fn with_x(_self: Val<bevy::math::I8Vec4>, x: i8) -> Val<bevy::math::I8Vec4> { + let output: Val<bevy::math::I8Vec4> = bevy::math::I8Vec4::with_x( _self.into_inner(), x, ) @@ -6690,8 +5524,8 @@ impl bevy::math::I64Vec4 { output } /// Creates a 4D vector from `self` with the given value of `y`. - fn with_y(_self: Val<bevy::math::I64Vec4>, y: i64) -> Val<bevy::math::I64Vec4> { - let output: Val<bevy::math::I64Vec4> = bevy::math::I64Vec4::with_y( + fn with_y(_self: Val<bevy::math::I8Vec4>, y: i8) -> Val<bevy::math::I8Vec4> { + let output: Val<bevy::math::I8Vec4> = bevy::math::I8Vec4::with_y( _self.into_inner(), y, ) @@ -6699,8 +5533,8 @@ impl bevy::math::I64Vec4 { output } /// Creates a 4D vector from `self` with the given value of `z`. - fn with_z(_self: Val<bevy::math::I64Vec4>, z: i64) -> Val<bevy::math::I64Vec4> { - let output: Val<bevy::math::I64Vec4> = bevy::math::I64Vec4::with_z( + fn with_z(_self: Val<bevy::math::I8Vec4>, z: i8) -> Val<bevy::math::I8Vec4> { + let output: Val<bevy::math::I8Vec4> = bevy::math::I8Vec4::with_z( _self.into_inner(), z, ) @@ -6710,10 +5544,10 @@ impl bevy::math::I64Vec4 { /// Returns a vector containing the wrapping addition of `self` and `rhs`. /// In other words this computes `[self.x.wrapping_add(rhs.x), self.y.wrapping_add(rhs.y), ..]`. fn wrapping_add( - _self: Val<bevy::math::I64Vec4>, - rhs: Val<bevy::math::I64Vec4>, - ) -> Val<bevy::math::I64Vec4> { - let output: Val<bevy::math::I64Vec4> = bevy::math::I64Vec4::wrapping_add( + _self: Val<bevy::math::I8Vec4>, + rhs: Val<bevy::math::I8Vec4>, + ) -> Val<bevy::math::I8Vec4> { + let output: Val<bevy::math::I8Vec4> = bevy::math::I8Vec4::wrapping_add( _self.into_inner(), rhs.into_inner(), ) @@ -6723,10 +5557,10 @@ impl bevy::math::I64Vec4 { /// Returns a vector containing the wrapping addition of `self` and unsigned vector `rhs`. /// In other words this computes `[self.x.wrapping_add_unsigned(rhs.x), self.y.wrapping_add_unsigned(rhs.y), ..]`. fn wrapping_add_unsigned( - _self: Val<bevy::math::I64Vec4>, - rhs: Val<bevy::math::U64Vec4>, - ) -> Val<bevy::math::I64Vec4> { - let output: Val<bevy::math::I64Vec4> = bevy::math::I64Vec4::wrapping_add_unsigned( + _self: Val<bevy::math::I8Vec4>, + rhs: Val<bevy::math::U8Vec4>, + ) -> Val<bevy::math::I8Vec4> { + let output: Val<bevy::math::I8Vec4> = bevy::math::I8Vec4::wrapping_add_unsigned( _self.into_inner(), rhs.into_inner(), ) @@ -6736,10 +5570,10 @@ impl bevy::math::I64Vec4 { /// Returns a vector containing the wrapping division of `self` and `rhs`. /// In other words this computes `[self.x.wrapping_div(rhs.x), self.y.wrapping_div(rhs.y), ..]`. fn wrapping_div( - _self: Val<bevy::math::I64Vec4>, - rhs: Val<bevy::math::I64Vec4>, - ) -> Val<bevy::math::I64Vec4> { - let output: Val<bevy::math::I64Vec4> = bevy::math::I64Vec4::wrapping_div( + _self: Val<bevy::math::I8Vec4>, + rhs: Val<bevy::math::I8Vec4>, + ) -> Val<bevy::math::I8Vec4> { + let output: Val<bevy::math::I8Vec4> = bevy::math::I8Vec4::wrapping_div( _self.into_inner(), rhs.into_inner(), ) @@ -6749,10 +5583,10 @@ impl bevy::math::I64Vec4 { /// Returns a vector containing the wrapping multiplication of `self` and `rhs`. /// In other words this computes `[self.x.wrapping_mul(rhs.x), self.y.wrapping_mul(rhs.y), ..]`. fn wrapping_mul( - _self: Val<bevy::math::I64Vec4>, - rhs: Val<bevy::math::I64Vec4>, - ) -> Val<bevy::math::I64Vec4> { - let output: Val<bevy::math::I64Vec4> = bevy::math::I64Vec4::wrapping_mul( + _self: Val<bevy::math::I8Vec4>, + rhs: Val<bevy::math::I8Vec4>, + ) -> Val<bevy::math::I8Vec4> { + let output: Val<bevy::math::I8Vec4> = bevy::math::I8Vec4::wrapping_mul( _self.into_inner(), rhs.into_inner(), ) @@ -6762,10 +5596,10 @@ impl bevy::math::I64Vec4 { /// Returns a vector containing the wrapping subtraction of `self` and `rhs`. /// In other words this computes `[self.x.wrapping_sub(rhs.x), self.y.wrapping_sub(rhs.y), ..]`. fn wrapping_sub( - _self: Val<bevy::math::I64Vec4>, - rhs: Val<bevy::math::I64Vec4>, - ) -> Val<bevy::math::I64Vec4> { - let output: Val<bevy::math::I64Vec4> = bevy::math::I64Vec4::wrapping_sub( + _self: Val<bevy::math::I8Vec4>, + rhs: Val<bevy::math::I8Vec4>, + ) -> Val<bevy::math::I8Vec4> { + let output: Val<bevy::math::I8Vec4> = bevy::math::I8Vec4::wrapping_sub( _self.into_inner(), rhs.into_inner(), ) @@ -6775,10 +5609,6059 @@ impl bevy::math::I64Vec4 { /// 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<bevy::math::I64Vec4>, - rhs: Val<bevy::math::U64Vec4>, - ) -> Val<bevy::math::I64Vec4> { - let output: Val<bevy::math::I64Vec4> = bevy::math::I64Vec4::wrapping_sub_unsigned( + _self: Val<bevy::math::I8Vec4>, + rhs: Val<bevy::math::U8Vec4>, + ) -> Val<bevy::math::I8Vec4> { + let output: Val<bevy::math::I8Vec4> = bevy::math::I8Vec4::wrapping_sub_unsigned( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } +} +#[script_bindings( + remote, + name = "i_16_vec_2_functions", + bms_core_path = "bevy_mod_scripting_core", + generated +)] +impl bevy::math::I16Vec2 { + /// Returns a vector containing the absolute value of each element of `self`. + fn abs(_self: Val<bevy::math::I16Vec2>) -> Val<bevy::math::I16Vec2> { + let output: Val<bevy::math::I16Vec2> = bevy::math::I16Vec2::abs( + _self.into_inner(), + ) + .into(); + output + } + /// Casts all elements of `self` to `f64`. + fn as_dvec2(_self: Ref<bevy::math::I16Vec2>) -> Val<bevy::math::DVec2> { + let output: Val<bevy::math::DVec2> = bevy::math::I16Vec2::as_dvec2(&_self) + .into(); + output + } + /// Casts all elements of `self` to `i64`. + fn as_i64vec2(_self: Ref<bevy::math::I16Vec2>) -> Val<bevy::math::I64Vec2> { + let output: Val<bevy::math::I64Vec2> = bevy::math::I16Vec2::as_i64vec2(&_self) + .into(); + output + } + /// Casts all elements of `self` to `i8`. + fn as_i8vec2(_self: Ref<bevy::math::I16Vec2>) -> Val<bevy::math::I8Vec2> { + let output: Val<bevy::math::I8Vec2> = bevy::math::I16Vec2::as_i8vec2(&_self) + .into(); + output + } + /// Casts all elements of `self` to `i32`. + fn as_ivec2(_self: Ref<bevy::math::I16Vec2>) -> Val<bevy::math::IVec2> { + let output: Val<bevy::math::IVec2> = bevy::math::I16Vec2::as_ivec2(&_self) + .into(); + output + } + /// Casts all elements of `self` to `u16`. + fn as_u16vec2(_self: Ref<bevy::math::I16Vec2>) -> Val<bevy::math::U16Vec2> { + let output: Val<bevy::math::U16Vec2> = bevy::math::I16Vec2::as_u16vec2(&_self) + .into(); + output + } + /// Casts all elements of `self` to `u64`. + fn as_u64vec2(_self: Ref<bevy::math::I16Vec2>) -> Val<bevy::math::U64Vec2> { + let output: Val<bevy::math::U64Vec2> = bevy::math::I16Vec2::as_u64vec2(&_self) + .into(); + output + } + /// Casts all elements of `self` to `u8`. + fn as_u8vec2(_self: Ref<bevy::math::I16Vec2>) -> Val<bevy::math::U8Vec2> { + let output: Val<bevy::math::U8Vec2> = bevy::math::I16Vec2::as_u8vec2(&_self) + .into(); + output + } + /// Casts all elements of `self` to `u32`. + fn as_uvec2(_self: Ref<bevy::math::I16Vec2>) -> Val<bevy::math::UVec2> { + let output: Val<bevy::math::UVec2> = bevy::math::I16Vec2::as_uvec2(&_self) + .into(); + output + } + /// Casts all elements of `self` to `f32`. + fn as_vec2(_self: Ref<bevy::math::I16Vec2>) -> Val<bevy::math::Vec2> { + let output: Val<bevy::math::Vec2> = bevy::math::I16Vec2::as_vec2(&_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<bevy::math::I16Vec2>, + min: Val<bevy::math::I16Vec2>, + max: Val<bevy::math::I16Vec2>, + ) -> Val<bevy::math::I16Vec2> { + let output: Val<bevy::math::I16Vec2> = bevy::math::I16Vec2::clamp( + _self.into_inner(), + min.into_inner(), + max.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 cmpeq( + _self: Val<bevy::math::I16Vec2>, + rhs: Val<bevy::math::I16Vec2>, + ) -> Val<bevy::math::BVec2> { + let output: Val<bevy::math::BVec2> = bevy::math::I16Vec2::cmpeq( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Returns a vector mask containing the result of a `>=` comparison for each element of + /// `self` and `rhs`. + /// In other words this computes `[self.x >= rhs.x, self.y >= rhs.y, ..]` for all + /// elements. + fn cmpge( + _self: Val<bevy::math::I16Vec2>, + rhs: Val<bevy::math::I16Vec2>, + ) -> Val<bevy::math::BVec2> { + let output: Val<bevy::math::BVec2> = bevy::math::I16Vec2::cmpge( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Returns a vector mask containing the result of a `>` comparison for each element of + /// `self` and `rhs`. + /// In other words this computes `[self.x > rhs.x, self.y > rhs.y, ..]` for all + /// elements. + fn cmpgt( + _self: Val<bevy::math::I16Vec2>, + rhs: Val<bevy::math::I16Vec2>, + ) -> Val<bevy::math::BVec2> { + let output: Val<bevy::math::BVec2> = bevy::math::I16Vec2::cmpgt( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Returns a vector mask containing the result of a `<=` comparison for each element of + /// `self` and `rhs`. + /// In other words this computes `[self.x <= rhs.x, self.y <= rhs.y, ..]` for all + /// elements. + fn cmple( + _self: Val<bevy::math::I16Vec2>, + rhs: Val<bevy::math::I16Vec2>, + ) -> Val<bevy::math::BVec2> { + let output: Val<bevy::math::BVec2> = bevy::math::I16Vec2::cmple( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Returns a vector mask containing the result of a `<` comparison for each element of + /// `self` and `rhs`. + /// In other words this computes `[self.x < rhs.x, self.y < rhs.y, ..]` for all + /// elements. + fn cmplt( + _self: Val<bevy::math::I16Vec2>, + rhs: Val<bevy::math::I16Vec2>, + ) -> Val<bevy::math::BVec2> { + let output: Val<bevy::math::BVec2> = bevy::math::I16Vec2::cmplt( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Returns a vector mask containing the result of a `!=` comparison for each element of + /// `self` and `rhs`. + /// In other words this computes `[self.x != rhs.x, self.y != rhs.y, ..]` for all + /// elements. + fn cmpne( + _self: Val<bevy::math::I16Vec2>, + rhs: Val<bevy::math::I16Vec2>, + ) -> Val<bevy::math::BVec2> { + let output: Val<bevy::math::BVec2> = bevy::math::I16Vec2::cmpne( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Compute the squared euclidean distance between two points in space. + fn distance_squared( + _self: Val<bevy::math::I16Vec2>, + rhs: Val<bevy::math::I16Vec2>, + ) -> i16 { + let output: i16 = bevy::math::I16Vec2::distance_squared( + _self.into_inner(), + rhs.into_inner(), + ) + .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<bevy::math::I16Vec2>, + rhs: Val<bevy::math::I16Vec2>, + ) -> Val<bevy::math::I16Vec2> { + let output: Val<bevy::math::I16Vec2> = bevy::math::I16Vec2::div_euclid( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Computes the dot product of `self` and `rhs`. + fn dot(_self: Val<bevy::math::I16Vec2>, rhs: Val<bevy::math::I16Vec2>) -> i16 { + let output: i16 = bevy::math::I16Vec2::dot(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + /// Returns a vector where every component is the dot product of `self` and `rhs`. + fn dot_into_vec( + _self: Val<bevy::math::I16Vec2>, + rhs: Val<bevy::math::I16Vec2>, + ) -> Val<bevy::math::I16Vec2> { + let output: Val<bevy::math::I16Vec2> = bevy::math::I16Vec2::dot_into_vec( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Returns the product of all elements of `self`. + /// In other words, this computes `self.x * self.y * ..`. + fn element_product(_self: Val<bevy::math::I16Vec2>) -> i16 { + let output: i16 = bevy::math::I16Vec2::element_product(_self.into_inner()) + .into(); + output + } + /// Returns the sum of all elements of `self`. + /// In other words, this computes `self.x + self.y + ..`. + fn element_sum(_self: Val<bevy::math::I16Vec2>) -> i16 { + let output: i16 = bevy::math::I16Vec2::element_sum(_self.into_inner()).into(); + output + } + /// Creates a 3D vector from `self` and the given `z` value. + fn extend(_self: Val<bevy::math::I16Vec2>, z: i16) -> Val<bevy::math::I16Vec3> { + let output: Val<bevy::math::I16Vec3> = bevy::math::I16Vec2::extend( + _self.into_inner(), + z, + ) + .into(); + output + } + /// Creates a new vector from an array. + fn from_array(a: [i16; 2]) -> Val<bevy::math::I16Vec2> { + let output: Val<bevy::math::I16Vec2> = bevy::math::I16Vec2::from_array(a).into(); + output + } + /// Returns a bitmask with the lowest 2 bits set to the sign bits from the elements of `self`. + /// A negative element results in a `1` bit and a positive element in a `0` bit. Element `x` goes + /// into the first lowest bit, element `y` into the second, etc. + fn is_negative_bitmask(_self: Val<bevy::math::I16Vec2>) -> u32 { + let output: u32 = bevy::math::I16Vec2::is_negative_bitmask(_self.into_inner()) + .into(); + output + } + /// Computes the squared length of `self`. + fn length_squared(_self: Val<bevy::math::I16Vec2>) -> i16 { + let output: i16 = bevy::math::I16Vec2::length_squared(_self.into_inner()).into(); + output + } + /// Returns a vector containing the maximum values for each element of `self` and `rhs`. + /// In other words this computes `[self.x.max(rhs.x), self.y.max(rhs.y), ..]`. + fn max( + _self: Val<bevy::math::I16Vec2>, + rhs: Val<bevy::math::I16Vec2>, + ) -> Val<bevy::math::I16Vec2> { + let output: Val<bevy::math::I16Vec2> = bevy::math::I16Vec2::max( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Returns the horizontal maximum of `self`. + /// In other words this computes `max(x, y, ..)`. + fn max_element(_self: Val<bevy::math::I16Vec2>) -> i16 { + let output: i16 = bevy::math::I16Vec2::max_element(_self.into_inner()).into(); + output + } + /// Returns a vector containing the minimum values for each element of `self` and `rhs`. + /// In other words this computes `[self.x.min(rhs.x), self.y.min(rhs.y), ..]`. + fn min( + _self: Val<bevy::math::I16Vec2>, + rhs: Val<bevy::math::I16Vec2>, + ) -> Val<bevy::math::I16Vec2> { + let output: Val<bevy::math::I16Vec2> = bevy::math::I16Vec2::min( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Returns the horizontal minimum of `self`. + /// In other words this computes `min(x, y, ..)`. + fn min_element(_self: Val<bevy::math::I16Vec2>) -> i16 { + let output: i16 = bevy::math::I16Vec2::min_element(_self.into_inner()).into(); + output + } + /// Creates a new vector. + fn new(x: i16, y: i16) -> Val<bevy::math::I16Vec2> { + let output: Val<bevy::math::I16Vec2> = bevy::math::I16Vec2::new(x, y).into(); + output + } + /// Returns a vector that is equal to `self` rotated by 90 degrees. + fn perp(_self: Val<bevy::math::I16Vec2>) -> Val<bevy::math::I16Vec2> { + let output: Val<bevy::math::I16Vec2> = bevy::math::I16Vec2::perp( + _self.into_inner(), + ) + .into(); + output + } + /// The perpendicular dot product of `self` and `rhs`. + /// Also known as the wedge product, 2D cross product, and determinant. + fn perp_dot(_self: Val<bevy::math::I16Vec2>, rhs: Val<bevy::math::I16Vec2>) -> i16 { + let output: i16 = bevy::math::I16Vec2::perp_dot( + _self.into_inner(), + rhs.into_inner(), + ) + .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<bevy::math::I16Vec2>, + rhs: Val<bevy::math::I16Vec2>, + ) -> Val<bevy::math::I16Vec2> { + let output: Val<bevy::math::I16Vec2> = bevy::math::I16Vec2::rem_euclid( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Returns `rhs` rotated by the angle of `self`. If `self` is normalized, + /// then this just rotation. This is what you usually want. Otherwise, + /// it will be like a rotation with a multiplication by `self`'s length. + fn rotate( + _self: Val<bevy::math::I16Vec2>, + rhs: Val<bevy::math::I16Vec2>, + ) -> Val<bevy::math::I16Vec2> { + let output: Val<bevy::math::I16Vec2> = bevy::math::I16Vec2::rotate( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Returns a vector containing the saturating addition of `self` and `rhs`. + /// In other words this computes `[self.x.saturating_add(rhs.x), self.y.saturating_add(rhs.y), ..]`. + fn saturating_add( + _self: Val<bevy::math::I16Vec2>, + rhs: Val<bevy::math::I16Vec2>, + ) -> Val<bevy::math::I16Vec2> { + let output: Val<bevy::math::I16Vec2> = bevy::math::I16Vec2::saturating_add( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// In other words this computes `[self.x.saturating_add_unsigned(rhs.x), self.y.saturating_add_unsigned(rhs.y), ..]`. + fn saturating_add_unsigned( + _self: Val<bevy::math::I16Vec2>, + rhs: Val<bevy::math::U16Vec2>, + ) -> Val<bevy::math::I16Vec2> { + let output: Val<bevy::math::I16Vec2> = bevy::math::I16Vec2::saturating_add_unsigned( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Returns a vector containing the saturating division of `self` and `rhs`. + /// In other words this computes `[self.x.saturating_div(rhs.x), self.y.saturating_div(rhs.y), ..]`. + fn saturating_div( + _self: Val<bevy::math::I16Vec2>, + rhs: Val<bevy::math::I16Vec2>, + ) -> Val<bevy::math::I16Vec2> { + let output: Val<bevy::math::I16Vec2> = bevy::math::I16Vec2::saturating_div( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Returns a vector containing the saturating multiplication of `self` and `rhs`. + /// In other words this computes `[self.x.saturating_mul(rhs.x), self.y.saturating_mul(rhs.y), ..]`. + fn saturating_mul( + _self: Val<bevy::math::I16Vec2>, + rhs: Val<bevy::math::I16Vec2>, + ) -> Val<bevy::math::I16Vec2> { + let output: Val<bevy::math::I16Vec2> = bevy::math::I16Vec2::saturating_mul( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Returns a vector containing the saturating subtraction of `self` and `rhs`. + /// In other words this computes `[self.x.saturating_sub(rhs.x), self.y.saturating_sub(rhs.y), ..]`. + fn saturating_sub( + _self: Val<bevy::math::I16Vec2>, + rhs: Val<bevy::math::I16Vec2>, + ) -> Val<bevy::math::I16Vec2> { + let output: Val<bevy::math::I16Vec2> = bevy::math::I16Vec2::saturating_sub( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Returns a vector containing the saturating subtraction of `self` and unsigned vector `rhs`. + /// In other words this computes `[self.x.saturating_sub_unsigned(rhs.x), self.y.saturating_sub_unsigned(rhs.y), ..]`. + fn saturating_sub_unsigned( + _self: Val<bevy::math::I16Vec2>, + rhs: Val<bevy::math::U16Vec2>, + ) -> Val<bevy::math::I16Vec2> { + let output: Val<bevy::math::I16Vec2> = bevy::math::I16Vec2::saturating_sub_unsigned( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Creates a vector from the elements in `if_true` and `if_false`, selecting which to use + /// for each element of `self`. + /// A true element in the mask uses the corresponding element from `if_true`, and false + /// uses the element from `if_false`. + fn select( + mask: Val<bevy::math::BVec2>, + if_true: Val<bevy::math::I16Vec2>, + if_false: Val<bevy::math::I16Vec2>, + ) -> Val<bevy::math::I16Vec2> { + let output: Val<bevy::math::I16Vec2> = bevy::math::I16Vec2::select( + mask.into_inner(), + if_true.into_inner(), + if_false.into_inner(), + ) + .into(); + output + } + /// Returns a vector with elements representing the sign of `self`. + /// - `0` if the number is zero + /// - `1` if the number is positive + /// - `-1` if the number is negative + fn signum(_self: Val<bevy::math::I16Vec2>) -> Val<bevy::math::I16Vec2> { + let output: Val<bevy::math::I16Vec2> = bevy::math::I16Vec2::signum( + _self.into_inner(), + ) + .into(); + output + } + /// Creates a vector with all elements set to `v`. + fn splat(v: i16) -> Val<bevy::math::I16Vec2> { + let output: Val<bevy::math::I16Vec2> = bevy::math::I16Vec2::splat(v).into(); + output + } + /// `[x, y]` + fn to_array(_self: Ref<bevy::math::I16Vec2>) -> [i16; 2] { + let output: [i16; 2] = bevy::math::I16Vec2::to_array(&_self).into(); + output + } + /// Creates a 2D vector from `self` with the given value of `x`. + fn with_x(_self: Val<bevy::math::I16Vec2>, x: i16) -> Val<bevy::math::I16Vec2> { + let output: Val<bevy::math::I16Vec2> = bevy::math::I16Vec2::with_x( + _self.into_inner(), + x, + ) + .into(); + output + } + /// Creates a 2D vector from `self` with the given value of `y`. + fn with_y(_self: Val<bevy::math::I16Vec2>, y: i16) -> Val<bevy::math::I16Vec2> { + let output: Val<bevy::math::I16Vec2> = bevy::math::I16Vec2::with_y( + _self.into_inner(), + y, + ) + .into(); + output + } + /// Returns a vector containing the wrapping addition of `self` and `rhs`. + /// In other words this computes `[self.x.wrapping_add(rhs.x), self.y.wrapping_add(rhs.y), ..]`. + fn wrapping_add( + _self: Val<bevy::math::I16Vec2>, + rhs: Val<bevy::math::I16Vec2>, + ) -> Val<bevy::math::I16Vec2> { + let output: Val<bevy::math::I16Vec2> = bevy::math::I16Vec2::wrapping_add( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Returns a vector containing the wrapping addition of `self` and unsigned vector `rhs`. + /// In other words this computes `[self.x.wrapping_add_unsigned(rhs.x), self.y.wrapping_add_unsigned(rhs.y), ..]`. + fn wrapping_add_unsigned( + _self: Val<bevy::math::I16Vec2>, + rhs: Val<bevy::math::U16Vec2>, + ) -> Val<bevy::math::I16Vec2> { + let output: Val<bevy::math::I16Vec2> = bevy::math::I16Vec2::wrapping_add_unsigned( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Returns a vector containing the wrapping division of `self` and `rhs`. + /// In other words this computes `[self.x.wrapping_div(rhs.x), self.y.wrapping_div(rhs.y), ..]`. + fn wrapping_div( + _self: Val<bevy::math::I16Vec2>, + rhs: Val<bevy::math::I16Vec2>, + ) -> Val<bevy::math::I16Vec2> { + let output: Val<bevy::math::I16Vec2> = bevy::math::I16Vec2::wrapping_div( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Returns a vector containing the wrapping multiplication of `self` and `rhs`. + /// In other words this computes `[self.x.wrapping_mul(rhs.x), self.y.wrapping_mul(rhs.y), ..]`. + fn wrapping_mul( + _self: Val<bevy::math::I16Vec2>, + rhs: Val<bevy::math::I16Vec2>, + ) -> Val<bevy::math::I16Vec2> { + let output: Val<bevy::math::I16Vec2> = bevy::math::I16Vec2::wrapping_mul( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Returns a vector containing the wrapping subtraction of `self` and `rhs`. + /// In other words this computes `[self.x.wrapping_sub(rhs.x), self.y.wrapping_sub(rhs.y), ..]`. + fn wrapping_sub( + _self: Val<bevy::math::I16Vec2>, + rhs: Val<bevy::math::I16Vec2>, + ) -> Val<bevy::math::I16Vec2> { + let output: Val<bevy::math::I16Vec2> = bevy::math::I16Vec2::wrapping_sub( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Returns a vector containing the wrapping subtraction of `self` and unsigned vector `rhs`. + /// In other words this computes `[self.x.wrapping_sub_unsigned(rhs.x), self.y.wrapping_sub_unsigned(rhs.y), ..]`. + fn wrapping_sub_unsigned( + _self: Val<bevy::math::I16Vec2>, + rhs: Val<bevy::math::U16Vec2>, + ) -> Val<bevy::math::I16Vec2> { + let output: Val<bevy::math::I16Vec2> = bevy::math::I16Vec2::wrapping_sub_unsigned( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } +} +#[script_bindings( + remote, + name = "i_16_vec_3_functions", + bms_core_path = "bevy_mod_scripting_core", + generated +)] +impl bevy::math::I16Vec3 { + /// Returns a vector containing the absolute value of each element of `self`. + fn abs(_self: Val<bevy::math::I16Vec3>) -> Val<bevy::math::I16Vec3> { + let output: Val<bevy::math::I16Vec3> = bevy::math::I16Vec3::abs( + _self.into_inner(), + ) + .into(); + output + } + /// Casts all elements of `self` to `f64`. + fn as_dvec3(_self: Ref<bevy::math::I16Vec3>) -> Val<bevy::math::DVec3> { + let output: Val<bevy::math::DVec3> = bevy::math::I16Vec3::as_dvec3(&_self) + .into(); + output + } + /// Casts all elements of `self` to `i64`. + fn as_i64vec3(_self: Ref<bevy::math::I16Vec3>) -> Val<bevy::math::I64Vec3> { + let output: Val<bevy::math::I64Vec3> = bevy::math::I16Vec3::as_i64vec3(&_self) + .into(); + output + } + /// Casts all elements of `self` to `i8`. + fn as_i8vec3(_self: Ref<bevy::math::I16Vec3>) -> Val<bevy::math::I8Vec3> { + let output: Val<bevy::math::I8Vec3> = bevy::math::I16Vec3::as_i8vec3(&_self) + .into(); + output + } + /// Casts all elements of `self` to `i32`. + fn as_ivec3(_self: Ref<bevy::math::I16Vec3>) -> Val<bevy::math::IVec3> { + let output: Val<bevy::math::IVec3> = bevy::math::I16Vec3::as_ivec3(&_self) + .into(); + output + } + /// Casts all elements of `self` to `u16`. + fn as_u16vec3(_self: Ref<bevy::math::I16Vec3>) -> Val<bevy::math::U16Vec3> { + let output: Val<bevy::math::U16Vec3> = bevy::math::I16Vec3::as_u16vec3(&_self) + .into(); + output + } + /// Casts all elements of `self` to `u64`. + fn as_u64vec3(_self: Ref<bevy::math::I16Vec3>) -> Val<bevy::math::U64Vec3> { + let output: Val<bevy::math::U64Vec3> = bevy::math::I16Vec3::as_u64vec3(&_self) + .into(); + output + } + /// Casts all elements of `self` to `u8`. + fn as_u8vec3(_self: Ref<bevy::math::I16Vec3>) -> Val<bevy::math::U8Vec3> { + let output: Val<bevy::math::U8Vec3> = bevy::math::I16Vec3::as_u8vec3(&_self) + .into(); + output + } + /// Casts all elements of `self` to `u32`. + fn as_uvec3(_self: Ref<bevy::math::I16Vec3>) -> Val<bevy::math::UVec3> { + let output: Val<bevy::math::UVec3> = bevy::math::I16Vec3::as_uvec3(&_self) + .into(); + output + } + /// Casts all elements of `self` to `f32`. + fn as_vec3(_self: Ref<bevy::math::I16Vec3>) -> Val<bevy::math::Vec3> { + let output: Val<bevy::math::Vec3> = bevy::math::I16Vec3::as_vec3(&_self).into(); + output + } + /// Casts all elements of `self` to `f32`. + fn as_vec3a(_self: Ref<bevy::math::I16Vec3>) -> Val<bevy::math::Vec3A> { + let output: Val<bevy::math::Vec3A> = bevy::math::I16Vec3::as_vec3a(&_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<bevy::math::I16Vec3>, + min: Val<bevy::math::I16Vec3>, + max: Val<bevy::math::I16Vec3>, + ) -> Val<bevy::math::I16Vec3> { + let output: Val<bevy::math::I16Vec3> = bevy::math::I16Vec3::clamp( + _self.into_inner(), + min.into_inner(), + max.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 cmpeq( + _self: Val<bevy::math::I16Vec3>, + rhs: Val<bevy::math::I16Vec3>, + ) -> Val<bevy::math::BVec3> { + let output: Val<bevy::math::BVec3> = bevy::math::I16Vec3::cmpeq( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Returns a vector mask containing the result of a `>=` comparison for each element of + /// `self` and `rhs`. + /// In other words this computes `[self.x >= rhs.x, self.y >= rhs.y, ..]` for all + /// elements. + fn cmpge( + _self: Val<bevy::math::I16Vec3>, + rhs: Val<bevy::math::I16Vec3>, + ) -> Val<bevy::math::BVec3> { + let output: Val<bevy::math::BVec3> = bevy::math::I16Vec3::cmpge( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Returns a vector mask containing the result of a `>` comparison for each element of + /// `self` and `rhs`. + /// In other words this computes `[self.x > rhs.x, self.y > rhs.y, ..]` for all + /// elements. + fn cmpgt( + _self: Val<bevy::math::I16Vec3>, + rhs: Val<bevy::math::I16Vec3>, + ) -> Val<bevy::math::BVec3> { + let output: Val<bevy::math::BVec3> = bevy::math::I16Vec3::cmpgt( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Returns a vector mask containing the result of a `<=` comparison for each element of + /// `self` and `rhs`. + /// In other words this computes `[self.x <= rhs.x, self.y <= rhs.y, ..]` for all + /// elements. + fn cmple( + _self: Val<bevy::math::I16Vec3>, + rhs: Val<bevy::math::I16Vec3>, + ) -> Val<bevy::math::BVec3> { + let output: Val<bevy::math::BVec3> = bevy::math::I16Vec3::cmple( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Returns a vector mask containing the result of a `<` comparison for each element of + /// `self` and `rhs`. + /// In other words this computes `[self.x < rhs.x, self.y < rhs.y, ..]` for all + /// elements. + fn cmplt( + _self: Val<bevy::math::I16Vec3>, + rhs: Val<bevy::math::I16Vec3>, + ) -> Val<bevy::math::BVec3> { + let output: Val<bevy::math::BVec3> = bevy::math::I16Vec3::cmplt( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Returns a vector mask containing the result of a `!=` comparison for each element of + /// `self` and `rhs`. + /// In other words this computes `[self.x != rhs.x, self.y != rhs.y, ..]` for all + /// elements. + fn cmpne( + _self: Val<bevy::math::I16Vec3>, + rhs: Val<bevy::math::I16Vec3>, + ) -> Val<bevy::math::BVec3> { + let output: Val<bevy::math::BVec3> = bevy::math::I16Vec3::cmpne( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Computes the cross product of `self` and `rhs`. + fn cross( + _self: Val<bevy::math::I16Vec3>, + rhs: Val<bevy::math::I16Vec3>, + ) -> Val<bevy::math::I16Vec3> { + let output: Val<bevy::math::I16Vec3> = bevy::math::I16Vec3::cross( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Compute the squared euclidean distance between two points in space. + fn distance_squared( + _self: Val<bevy::math::I16Vec3>, + rhs: Val<bevy::math::I16Vec3>, + ) -> i16 { + let output: i16 = bevy::math::I16Vec3::distance_squared( + _self.into_inner(), + rhs.into_inner(), + ) + .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<bevy::math::I16Vec3>, + rhs: Val<bevy::math::I16Vec3>, + ) -> Val<bevy::math::I16Vec3> { + let output: Val<bevy::math::I16Vec3> = bevy::math::I16Vec3::div_euclid( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Computes the dot product of `self` and `rhs`. + fn dot(_self: Val<bevy::math::I16Vec3>, rhs: Val<bevy::math::I16Vec3>) -> i16 { + let output: i16 = bevy::math::I16Vec3::dot(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + /// Returns a vector where every component is the dot product of `self` and `rhs`. + fn dot_into_vec( + _self: Val<bevy::math::I16Vec3>, + rhs: Val<bevy::math::I16Vec3>, + ) -> Val<bevy::math::I16Vec3> { + let output: Val<bevy::math::I16Vec3> = bevy::math::I16Vec3::dot_into_vec( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Returns the product of all elements of `self`. + /// In other words, this computes `self.x * self.y * ..`. + fn element_product(_self: Val<bevy::math::I16Vec3>) -> i16 { + let output: i16 = bevy::math::I16Vec3::element_product(_self.into_inner()) + .into(); + output + } + /// Returns the sum of all elements of `self`. + /// In other words, this computes `self.x + self.y + ..`. + fn element_sum(_self: Val<bevy::math::I16Vec3>) -> i16 { + let output: i16 = bevy::math::I16Vec3::element_sum(_self.into_inner()).into(); + output + } + /// Creates a 4D vector from `self` and the given `w` value. + fn extend(_self: Val<bevy::math::I16Vec3>, w: i16) -> Val<bevy::math::I16Vec4> { + let output: Val<bevy::math::I16Vec4> = bevy::math::I16Vec3::extend( + _self.into_inner(), + w, + ) + .into(); + output + } + /// Creates a new vector from an array. + fn from_array(a: [i16; 3]) -> Val<bevy::math::I16Vec3> { + let output: Val<bevy::math::I16Vec3> = bevy::math::I16Vec3::from_array(a).into(); + output + } + /// Returns a bitmask with the lowest 3 bits set to the sign bits from the elements of `self`. + /// A negative element results in a `1` bit and a positive element in a `0` bit. Element `x` goes + /// into the first lowest bit, element `y` into the second, etc. + fn is_negative_bitmask(_self: Val<bevy::math::I16Vec3>) -> u32 { + let output: u32 = bevy::math::I16Vec3::is_negative_bitmask(_self.into_inner()) + .into(); + output + } + /// Computes the squared length of `self`. + fn length_squared(_self: Val<bevy::math::I16Vec3>) -> i16 { + let output: i16 = bevy::math::I16Vec3::length_squared(_self.into_inner()).into(); + output + } + /// Returns a vector containing the maximum values for each element of `self` and `rhs`. + /// In other words this computes `[self.x.max(rhs.x), self.y.max(rhs.y), ..]`. + fn max( + _self: Val<bevy::math::I16Vec3>, + rhs: Val<bevy::math::I16Vec3>, + ) -> Val<bevy::math::I16Vec3> { + let output: Val<bevy::math::I16Vec3> = bevy::math::I16Vec3::max( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Returns the horizontal maximum of `self`. + /// In other words this computes `max(x, y, ..)`. + fn max_element(_self: Val<bevy::math::I16Vec3>) -> i16 { + let output: i16 = bevy::math::I16Vec3::max_element(_self.into_inner()).into(); + output + } + /// Returns a vector containing the minimum values for each element of `self` and `rhs`. + /// In other words this computes `[self.x.min(rhs.x), self.y.min(rhs.y), ..]`. + fn min( + _self: Val<bevy::math::I16Vec3>, + rhs: Val<bevy::math::I16Vec3>, + ) -> Val<bevy::math::I16Vec3> { + let output: Val<bevy::math::I16Vec3> = bevy::math::I16Vec3::min( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Returns the horizontal minimum of `self`. + /// In other words this computes `min(x, y, ..)`. + fn min_element(_self: Val<bevy::math::I16Vec3>) -> i16 { + let output: i16 = bevy::math::I16Vec3::min_element(_self.into_inner()).into(); + output + } + /// Creates a new vector. + fn new(x: i16, y: i16, z: i16) -> Val<bevy::math::I16Vec3> { + let output: Val<bevy::math::I16Vec3> = bevy::math::I16Vec3::new(x, y, z).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<bevy::math::I16Vec3>, + rhs: Val<bevy::math::I16Vec3>, + ) -> Val<bevy::math::I16Vec3> { + let output: Val<bevy::math::I16Vec3> = bevy::math::I16Vec3::rem_euclid( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Returns a vector containing the saturating addition of `self` and `rhs`. + /// In other words this computes `[self.x.saturating_add(rhs.x), self.y.saturating_add(rhs.y), ..]`. + fn saturating_add( + _self: Val<bevy::math::I16Vec3>, + rhs: Val<bevy::math::I16Vec3>, + ) -> Val<bevy::math::I16Vec3> { + let output: Val<bevy::math::I16Vec3> = bevy::math::I16Vec3::saturating_add( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// In other words this computes `[self.x.saturating_add_unsigned(rhs.x), self.y.saturating_add_unsigned(rhs.y), ..]`. + fn saturating_add_unsigned( + _self: Val<bevy::math::I16Vec3>, + rhs: Val<bevy::math::U16Vec3>, + ) -> Val<bevy::math::I16Vec3> { + let output: Val<bevy::math::I16Vec3> = bevy::math::I16Vec3::saturating_add_unsigned( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Returns a vector containing the saturating division of `self` and `rhs`. + /// In other words this computes `[self.x.saturating_div(rhs.x), self.y.saturating_div(rhs.y), ..]`. + fn saturating_div( + _self: Val<bevy::math::I16Vec3>, + rhs: Val<bevy::math::I16Vec3>, + ) -> Val<bevy::math::I16Vec3> { + let output: Val<bevy::math::I16Vec3> = bevy::math::I16Vec3::saturating_div( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Returns a vector containing the saturating multiplication of `self` and `rhs`. + /// In other words this computes `[self.x.saturating_mul(rhs.x), self.y.saturating_mul(rhs.y), ..]`. + fn saturating_mul( + _self: Val<bevy::math::I16Vec3>, + rhs: Val<bevy::math::I16Vec3>, + ) -> Val<bevy::math::I16Vec3> { + let output: Val<bevy::math::I16Vec3> = bevy::math::I16Vec3::saturating_mul( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Returns a vector containing the saturating subtraction of `self` and `rhs`. + /// In other words this computes `[self.x.saturating_sub(rhs.x), self.y.saturating_sub(rhs.y), ..]`. + fn saturating_sub( + _self: Val<bevy::math::I16Vec3>, + rhs: Val<bevy::math::I16Vec3>, + ) -> Val<bevy::math::I16Vec3> { + let output: Val<bevy::math::I16Vec3> = bevy::math::I16Vec3::saturating_sub( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Returns a vector containing the saturating subtraction of `self` and unsigned vector `rhs`. + /// In other words this computes `[self.x.saturating_sub_unsigned(rhs.x), self.y.saturating_sub_unsigned(rhs.y), ..]`. + fn saturating_sub_unsigned( + _self: Val<bevy::math::I16Vec3>, + rhs: Val<bevy::math::U16Vec3>, + ) -> Val<bevy::math::I16Vec3> { + let output: Val<bevy::math::I16Vec3> = bevy::math::I16Vec3::saturating_sub_unsigned( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Creates a vector from the elements in `if_true` and `if_false`, selecting which to use + /// for each element of `self`. + /// A true element in the mask uses the corresponding element from `if_true`, and false + /// uses the element from `if_false`. + fn select( + mask: Val<bevy::math::BVec3>, + if_true: Val<bevy::math::I16Vec3>, + if_false: Val<bevy::math::I16Vec3>, + ) -> Val<bevy::math::I16Vec3> { + let output: Val<bevy::math::I16Vec3> = bevy::math::I16Vec3::select( + mask.into_inner(), + if_true.into_inner(), + if_false.into_inner(), + ) + .into(); + output + } + /// Returns a vector with elements representing the sign of `self`. + /// - `0` if the number is zero + /// - `1` if the number is positive + /// - `-1` if the number is negative + fn signum(_self: Val<bevy::math::I16Vec3>) -> Val<bevy::math::I16Vec3> { + let output: Val<bevy::math::I16Vec3> = bevy::math::I16Vec3::signum( + _self.into_inner(), + ) + .into(); + output + } + /// Creates a vector with all elements set to `v`. + fn splat(v: i16) -> Val<bevy::math::I16Vec3> { + let output: Val<bevy::math::I16Vec3> = bevy::math::I16Vec3::splat(v).into(); + output + } + /// `[x, y, z]` + fn to_array(_self: Ref<bevy::math::I16Vec3>) -> [i16; 3] { + let output: [i16; 3] = bevy::math::I16Vec3::to_array(&_self).into(); + output + } + /// Creates a 2D vector from the `x` and `y` elements of `self`, discarding `z`. + /// Truncation may also be performed by using [`self.xy()`][crate::swizzles::Vec3Swizzles::xy()]. + fn truncate(_self: Val<bevy::math::I16Vec3>) -> Val<bevy::math::I16Vec2> { + let output: Val<bevy::math::I16Vec2> = bevy::math::I16Vec3::truncate( + _self.into_inner(), + ) + .into(); + output + } + /// Creates a 3D vector from `self` with the given value of `x`. + fn with_x(_self: Val<bevy::math::I16Vec3>, x: i16) -> Val<bevy::math::I16Vec3> { + let output: Val<bevy::math::I16Vec3> = bevy::math::I16Vec3::with_x( + _self.into_inner(), + x, + ) + .into(); + output + } + /// Creates a 3D vector from `self` with the given value of `y`. + fn with_y(_self: Val<bevy::math::I16Vec3>, y: i16) -> Val<bevy::math::I16Vec3> { + let output: Val<bevy::math::I16Vec3> = bevy::math::I16Vec3::with_y( + _self.into_inner(), + y, + ) + .into(); + output + } + /// Creates a 3D vector from `self` with the given value of `z`. + fn with_z(_self: Val<bevy::math::I16Vec3>, z: i16) -> Val<bevy::math::I16Vec3> { + let output: Val<bevy::math::I16Vec3> = bevy::math::I16Vec3::with_z( + _self.into_inner(), + z, + ) + .into(); + output + } + /// Returns a vector containing the wrapping addition of `self` and `rhs`. + /// In other words this computes `[self.x.wrapping_add(rhs.x), self.y.wrapping_add(rhs.y), ..]`. + fn wrapping_add( + _self: Val<bevy::math::I16Vec3>, + rhs: Val<bevy::math::I16Vec3>, + ) -> Val<bevy::math::I16Vec3> { + let output: Val<bevy::math::I16Vec3> = bevy::math::I16Vec3::wrapping_add( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Returns a vector containing the wrapping addition of `self` and unsigned vector `rhs`. + /// In other words this computes `[self.x.wrapping_add_unsigned(rhs.x), self.y.wrapping_add_unsigned(rhs.y), ..]`. + fn wrapping_add_unsigned( + _self: Val<bevy::math::I16Vec3>, + rhs: Val<bevy::math::U16Vec3>, + ) -> Val<bevy::math::I16Vec3> { + let output: Val<bevy::math::I16Vec3> = bevy::math::I16Vec3::wrapping_add_unsigned( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Returns a vector containing the wrapping division of `self` and `rhs`. + /// In other words this computes `[self.x.wrapping_div(rhs.x), self.y.wrapping_div(rhs.y), ..]`. + fn wrapping_div( + _self: Val<bevy::math::I16Vec3>, + rhs: Val<bevy::math::I16Vec3>, + ) -> Val<bevy::math::I16Vec3> { + let output: Val<bevy::math::I16Vec3> = bevy::math::I16Vec3::wrapping_div( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Returns a vector containing the wrapping multiplication of `self` and `rhs`. + /// In other words this computes `[self.x.wrapping_mul(rhs.x), self.y.wrapping_mul(rhs.y), ..]`. + fn wrapping_mul( + _self: Val<bevy::math::I16Vec3>, + rhs: Val<bevy::math::I16Vec3>, + ) -> Val<bevy::math::I16Vec3> { + let output: Val<bevy::math::I16Vec3> = bevy::math::I16Vec3::wrapping_mul( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Returns a vector containing the wrapping subtraction of `self` and `rhs`. + /// In other words this computes `[self.x.wrapping_sub(rhs.x), self.y.wrapping_sub(rhs.y), ..]`. + fn wrapping_sub( + _self: Val<bevy::math::I16Vec3>, + rhs: Val<bevy::math::I16Vec3>, + ) -> Val<bevy::math::I16Vec3> { + let output: Val<bevy::math::I16Vec3> = bevy::math::I16Vec3::wrapping_sub( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Returns a vector containing the wrapping subtraction of `self` and unsigned vector `rhs`. + /// In other words this computes `[self.x.wrapping_sub_unsigned(rhs.x), self.y.wrapping_sub_unsigned(rhs.y), ..]`. + fn wrapping_sub_unsigned( + _self: Val<bevy::math::I16Vec3>, + rhs: Val<bevy::math::U16Vec3>, + ) -> Val<bevy::math::I16Vec3> { + let output: Val<bevy::math::I16Vec3> = bevy::math::I16Vec3::wrapping_sub_unsigned( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } +} +#[script_bindings( + remote, + name = "i_16_vec_4_functions", + bms_core_path = "bevy_mod_scripting_core", + generated +)] +impl bevy::math::I16Vec4 { + /// Returns a vector containing the absolute value of each element of `self`. + fn abs(_self: Val<bevy::math::I16Vec4>) -> Val<bevy::math::I16Vec4> { + let output: Val<bevy::math::I16Vec4> = bevy::math::I16Vec4::abs( + _self.into_inner(), + ) + .into(); + output + } + /// Casts all elements of `self` to `f64`. + fn as_dvec4(_self: Ref<bevy::math::I16Vec4>) -> Val<bevy::math::DVec4> { + let output: Val<bevy::math::DVec4> = bevy::math::I16Vec4::as_dvec4(&_self) + .into(); + output + } + /// Casts all elements of `self` to `i64`. + fn as_i64vec4(_self: Ref<bevy::math::I16Vec4>) -> Val<bevy::math::I64Vec4> { + let output: Val<bevy::math::I64Vec4> = bevy::math::I16Vec4::as_i64vec4(&_self) + .into(); + output + } + /// Casts all elements of `self` to `i8`. + fn as_i8vec4(_self: Ref<bevy::math::I16Vec4>) -> Val<bevy::math::I8Vec4> { + let output: Val<bevy::math::I8Vec4> = bevy::math::I16Vec4::as_i8vec4(&_self) + .into(); + output + } + /// Casts all elements of `self` to `i32`. + fn as_ivec4(_self: Ref<bevy::math::I16Vec4>) -> Val<bevy::math::IVec4> { + let output: Val<bevy::math::IVec4> = bevy::math::I16Vec4::as_ivec4(&_self) + .into(); + output + } + /// Casts all elements of `self` to `u16`. + fn as_u16vec4(_self: Ref<bevy::math::I16Vec4>) -> Val<bevy::math::U16Vec4> { + let output: Val<bevy::math::U16Vec4> = bevy::math::I16Vec4::as_u16vec4(&_self) + .into(); + output + } + /// Casts all elements of `self` to `u64`. + fn as_u64vec4(_self: Ref<bevy::math::I16Vec4>) -> Val<bevy::math::U64Vec4> { + let output: Val<bevy::math::U64Vec4> = bevy::math::I16Vec4::as_u64vec4(&_self) + .into(); + output + } + /// Casts all elements of `self` to `u8`. + fn as_u8vec4(_self: Ref<bevy::math::I16Vec4>) -> Val<bevy::math::U8Vec4> { + let output: Val<bevy::math::U8Vec4> = bevy::math::I16Vec4::as_u8vec4(&_self) + .into(); + output + } + /// Casts all elements of `self` to `u32`. + fn as_uvec4(_self: Ref<bevy::math::I16Vec4>) -> Val<bevy::math::UVec4> { + let output: Val<bevy::math::UVec4> = bevy::math::I16Vec4::as_uvec4(&_self) + .into(); + output + } + /// Casts all elements of `self` to `f32`. + fn as_vec4(_self: Ref<bevy::math::I16Vec4>) -> Val<bevy::math::Vec4> { + let output: Val<bevy::math::Vec4> = bevy::math::I16Vec4::as_vec4(&_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<bevy::math::I16Vec4>, + min: Val<bevy::math::I16Vec4>, + max: Val<bevy::math::I16Vec4>, + ) -> Val<bevy::math::I16Vec4> { + let output: Val<bevy::math::I16Vec4> = bevy::math::I16Vec4::clamp( + _self.into_inner(), + min.into_inner(), + max.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 cmpeq( + _self: Val<bevy::math::I16Vec4>, + rhs: Val<bevy::math::I16Vec4>, + ) -> Val<bevy::math::BVec4> { + let output: Val<bevy::math::BVec4> = bevy::math::I16Vec4::cmpeq( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Returns a vector mask containing the result of a `>=` comparison for each element of + /// `self` and `rhs`. + /// In other words this computes `[self.x >= rhs.x, self.y >= rhs.y, ..]` for all + /// elements. + fn cmpge( + _self: Val<bevy::math::I16Vec4>, + rhs: Val<bevy::math::I16Vec4>, + ) -> Val<bevy::math::BVec4> { + let output: Val<bevy::math::BVec4> = bevy::math::I16Vec4::cmpge( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Returns a vector mask containing the result of a `>` comparison for each element of + /// `self` and `rhs`. + /// In other words this computes `[self.x > rhs.x, self.y > rhs.y, ..]` for all + /// elements. + fn cmpgt( + _self: Val<bevy::math::I16Vec4>, + rhs: Val<bevy::math::I16Vec4>, + ) -> Val<bevy::math::BVec4> { + let output: Val<bevy::math::BVec4> = bevy::math::I16Vec4::cmpgt( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Returns a vector mask containing the result of a `<=` comparison for each element of + /// `self` and `rhs`. + /// In other words this computes `[self.x <= rhs.x, self.y <= rhs.y, ..]` for all + /// elements. + fn cmple( + _self: Val<bevy::math::I16Vec4>, + rhs: Val<bevy::math::I16Vec4>, + ) -> Val<bevy::math::BVec4> { + let output: Val<bevy::math::BVec4> = bevy::math::I16Vec4::cmple( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Returns a vector mask containing the result of a `<` comparison for each element of + /// `self` and `rhs`. + /// In other words this computes `[self.x < rhs.x, self.y < rhs.y, ..]` for all + /// elements. + fn cmplt( + _self: Val<bevy::math::I16Vec4>, + rhs: Val<bevy::math::I16Vec4>, + ) -> Val<bevy::math::BVec4> { + let output: Val<bevy::math::BVec4> = bevy::math::I16Vec4::cmplt( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Returns a vector mask containing the result of a `!=` comparison for each element of + /// `self` and `rhs`. + /// In other words this computes `[self.x != rhs.x, self.y != rhs.y, ..]` for all + /// elements. + fn cmpne( + _self: Val<bevy::math::I16Vec4>, + rhs: Val<bevy::math::I16Vec4>, + ) -> Val<bevy::math::BVec4> { + let output: Val<bevy::math::BVec4> = bevy::math::I16Vec4::cmpne( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Compute the squared euclidean distance between two points in space. + fn distance_squared( + _self: Val<bevy::math::I16Vec4>, + rhs: Val<bevy::math::I16Vec4>, + ) -> i16 { + let output: i16 = bevy::math::I16Vec4::distance_squared( + _self.into_inner(), + rhs.into_inner(), + ) + .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<bevy::math::I16Vec4>, + rhs: Val<bevy::math::I16Vec4>, + ) -> Val<bevy::math::I16Vec4> { + let output: Val<bevy::math::I16Vec4> = bevy::math::I16Vec4::div_euclid( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Computes the dot product of `self` and `rhs`. + fn dot(_self: Val<bevy::math::I16Vec4>, rhs: Val<bevy::math::I16Vec4>) -> i16 { + let output: i16 = bevy::math::I16Vec4::dot(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + /// Returns a vector where every component is the dot product of `self` and `rhs`. + fn dot_into_vec( + _self: Val<bevy::math::I16Vec4>, + rhs: Val<bevy::math::I16Vec4>, + ) -> Val<bevy::math::I16Vec4> { + let output: Val<bevy::math::I16Vec4> = bevy::math::I16Vec4::dot_into_vec( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Returns the product of all elements of `self`. + /// In other words, this computes `self.x * self.y * ..`. + fn element_product(_self: Val<bevy::math::I16Vec4>) -> i16 { + let output: i16 = bevy::math::I16Vec4::element_product(_self.into_inner()) + .into(); + output + } + /// Returns the sum of all elements of `self`. + /// In other words, this computes `self.x + self.y + ..`. + fn element_sum(_self: Val<bevy::math::I16Vec4>) -> i16 { + let output: i16 = bevy::math::I16Vec4::element_sum(_self.into_inner()).into(); + output + } + /// Creates a new vector from an array. + fn from_array(a: [i16; 4]) -> Val<bevy::math::I16Vec4> { + let output: Val<bevy::math::I16Vec4> = bevy::math::I16Vec4::from_array(a).into(); + output + } + /// Returns a bitmask with the lowest 4 bits set to the sign bits from the elements of `self`. + /// A negative element results in a `1` bit and a positive element in a `0` bit. Element `x` goes + /// into the first lowest bit, element `y` into the second, etc. + fn is_negative_bitmask(_self: Val<bevy::math::I16Vec4>) -> u32 { + let output: u32 = bevy::math::I16Vec4::is_negative_bitmask(_self.into_inner()) + .into(); + output + } + /// Computes the squared length of `self`. + fn length_squared(_self: Val<bevy::math::I16Vec4>) -> i16 { + let output: i16 = bevy::math::I16Vec4::length_squared(_self.into_inner()).into(); + output + } + /// Returns a vector containing the maximum values for each element of `self` and `rhs`. + /// In other words this computes `[self.x.max(rhs.x), self.y.max(rhs.y), ..]`. + fn max( + _self: Val<bevy::math::I16Vec4>, + rhs: Val<bevy::math::I16Vec4>, + ) -> Val<bevy::math::I16Vec4> { + let output: Val<bevy::math::I16Vec4> = bevy::math::I16Vec4::max( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Returns the horizontal maximum of `self`. + /// In other words this computes `max(x, y, ..)`. + fn max_element(_self: Val<bevy::math::I16Vec4>) -> i16 { + let output: i16 = bevy::math::I16Vec4::max_element(_self.into_inner()).into(); + output + } + /// Returns a vector containing the minimum values for each element of `self` and `rhs`. + /// In other words this computes `[self.x.min(rhs.x), self.y.min(rhs.y), ..]`. + fn min( + _self: Val<bevy::math::I16Vec4>, + rhs: Val<bevy::math::I16Vec4>, + ) -> Val<bevy::math::I16Vec4> { + let output: Val<bevy::math::I16Vec4> = bevy::math::I16Vec4::min( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Returns the horizontal minimum of `self`. + /// In other words this computes `min(x, y, ..)`. + fn min_element(_self: Val<bevy::math::I16Vec4>) -> i16 { + let output: i16 = bevy::math::I16Vec4::min_element(_self.into_inner()).into(); + output + } + /// Creates a new vector. + fn new(x: i16, y: i16, z: i16, w: i16) -> Val<bevy::math::I16Vec4> { + let output: Val<bevy::math::I16Vec4> = bevy::math::I16Vec4::new(x, y, z, w) + .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<bevy::math::I16Vec4>, + rhs: Val<bevy::math::I16Vec4>, + ) -> Val<bevy::math::I16Vec4> { + let output: Val<bevy::math::I16Vec4> = bevy::math::I16Vec4::rem_euclid( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Returns a vector containing the saturating addition of `self` and `rhs`. + /// In other words this computes `[self.x.saturating_add(rhs.x), self.y.saturating_add(rhs.y), ..]`. + fn saturating_add( + _self: Val<bevy::math::I16Vec4>, + rhs: Val<bevy::math::I16Vec4>, + ) -> Val<bevy::math::I16Vec4> { + let output: Val<bevy::math::I16Vec4> = bevy::math::I16Vec4::saturating_add( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// In other words this computes `[self.x.saturating_add_unsigned(rhs.x), self.y.saturating_add_unsigned(rhs.y), ..]`. + fn saturating_add_unsigned( + _self: Val<bevy::math::I16Vec4>, + rhs: Val<bevy::math::U16Vec4>, + ) -> Val<bevy::math::I16Vec4> { + let output: Val<bevy::math::I16Vec4> = bevy::math::I16Vec4::saturating_add_unsigned( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Returns a vector containing the saturating division of `self` and `rhs`. + /// In other words this computes `[self.x.saturating_div(rhs.x), self.y.saturating_div(rhs.y), ..]`. + fn saturating_div( + _self: Val<bevy::math::I16Vec4>, + rhs: Val<bevy::math::I16Vec4>, + ) -> Val<bevy::math::I16Vec4> { + let output: Val<bevy::math::I16Vec4> = bevy::math::I16Vec4::saturating_div( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Returns a vector containing the saturating multiplication of `self` and `rhs`. + /// In other words this computes `[self.x.saturating_mul(rhs.x), self.y.saturating_mul(rhs.y), ..]`. + fn saturating_mul( + _self: Val<bevy::math::I16Vec4>, + rhs: Val<bevy::math::I16Vec4>, + ) -> Val<bevy::math::I16Vec4> { + let output: Val<bevy::math::I16Vec4> = bevy::math::I16Vec4::saturating_mul( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Returns a vector containing the saturating subtraction of `self` and `rhs`. + /// In other words this computes `[self.x.saturating_sub(rhs.x), self.y.saturating_sub(rhs.y), ..]`. + fn saturating_sub( + _self: Val<bevy::math::I16Vec4>, + rhs: Val<bevy::math::I16Vec4>, + ) -> Val<bevy::math::I16Vec4> { + let output: Val<bevy::math::I16Vec4> = bevy::math::I16Vec4::saturating_sub( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Returns a vector containing the saturating subtraction of `self` and unsigned vector `rhs`. + /// In other words this computes `[self.x.saturating_sub_unsigned(rhs.x), self.y.saturating_sub_unsigned(rhs.y), ..]`. + fn saturating_sub_unsigned( + _self: Val<bevy::math::I16Vec4>, + rhs: Val<bevy::math::U16Vec4>, + ) -> Val<bevy::math::I16Vec4> { + let output: Val<bevy::math::I16Vec4> = bevy::math::I16Vec4::saturating_sub_unsigned( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Creates a vector from the elements in `if_true` and `if_false`, selecting which to use + /// for each element of `self`. + /// A true element in the mask uses the corresponding element from `if_true`, and false + /// uses the element from `if_false`. + fn select( + mask: Val<bevy::math::BVec4>, + if_true: Val<bevy::math::I16Vec4>, + if_false: Val<bevy::math::I16Vec4>, + ) -> Val<bevy::math::I16Vec4> { + let output: Val<bevy::math::I16Vec4> = bevy::math::I16Vec4::select( + mask.into_inner(), + if_true.into_inner(), + if_false.into_inner(), + ) + .into(); + output + } + /// Returns a vector with elements representing the sign of `self`. + /// - `0` if the number is zero + /// - `1` if the number is positive + /// - `-1` if the number is negative + fn signum(_self: Val<bevy::math::I16Vec4>) -> Val<bevy::math::I16Vec4> { + let output: Val<bevy::math::I16Vec4> = bevy::math::I16Vec4::signum( + _self.into_inner(), + ) + .into(); + output + } + /// Creates a vector with all elements set to `v`. + fn splat(v: i16) -> Val<bevy::math::I16Vec4> { + let output: Val<bevy::math::I16Vec4> = bevy::math::I16Vec4::splat(v).into(); + output + } + /// `[x, y, z, w]` + fn to_array(_self: Ref<bevy::math::I16Vec4>) -> [i16; 4] { + let output: [i16; 4] = bevy::math::I16Vec4::to_array(&_self).into(); + output + } + /// Creates a 3D vector from the `x`, `y` and `z` elements of `self`, discarding `w`. + /// Truncation to [`I16Vec3`] may also be performed by using [`self.xyz()`][crate::swizzles::Vec4Swizzles::xyz()]. + fn truncate(_self: Val<bevy::math::I16Vec4>) -> Val<bevy::math::I16Vec3> { + let output: Val<bevy::math::I16Vec3> = bevy::math::I16Vec4::truncate( + _self.into_inner(), + ) + .into(); + output + } + /// Creates a 4D vector from `self` with the given value of `w`. + fn with_w(_self: Val<bevy::math::I16Vec4>, w: i16) -> Val<bevy::math::I16Vec4> { + let output: Val<bevy::math::I16Vec4> = bevy::math::I16Vec4::with_w( + _self.into_inner(), + w, + ) + .into(); + output + } + /// Creates a 4D vector from `self` with the given value of `x`. + fn with_x(_self: Val<bevy::math::I16Vec4>, x: i16) -> Val<bevy::math::I16Vec4> { + let output: Val<bevy::math::I16Vec4> = bevy::math::I16Vec4::with_x( + _self.into_inner(), + x, + ) + .into(); + output + } + /// Creates a 4D vector from `self` with the given value of `y`. + fn with_y(_self: Val<bevy::math::I16Vec4>, y: i16) -> Val<bevy::math::I16Vec4> { + let output: Val<bevy::math::I16Vec4> = bevy::math::I16Vec4::with_y( + _self.into_inner(), + y, + ) + .into(); + output + } + /// Creates a 4D vector from `self` with the given value of `z`. + fn with_z(_self: Val<bevy::math::I16Vec4>, z: i16) -> Val<bevy::math::I16Vec4> { + let output: Val<bevy::math::I16Vec4> = bevy::math::I16Vec4::with_z( + _self.into_inner(), + z, + ) + .into(); + output + } + /// Returns a vector containing the wrapping addition of `self` and `rhs`. + /// In other words this computes `[self.x.wrapping_add(rhs.x), self.y.wrapping_add(rhs.y), ..]`. + fn wrapping_add( + _self: Val<bevy::math::I16Vec4>, + rhs: Val<bevy::math::I16Vec4>, + ) -> Val<bevy::math::I16Vec4> { + let output: Val<bevy::math::I16Vec4> = bevy::math::I16Vec4::wrapping_add( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Returns a vector containing the wrapping addition of `self` and unsigned vector `rhs`. + /// In other words this computes `[self.x.wrapping_add_unsigned(rhs.x), self.y.wrapping_add_unsigned(rhs.y), ..]`. + fn wrapping_add_unsigned( + _self: Val<bevy::math::I16Vec4>, + rhs: Val<bevy::math::U16Vec4>, + ) -> Val<bevy::math::I16Vec4> { + let output: Val<bevy::math::I16Vec4> = bevy::math::I16Vec4::wrapping_add_unsigned( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Returns a vector containing the wrapping division of `self` and `rhs`. + /// In other words this computes `[self.x.wrapping_div(rhs.x), self.y.wrapping_div(rhs.y), ..]`. + fn wrapping_div( + _self: Val<bevy::math::I16Vec4>, + rhs: Val<bevy::math::I16Vec4>, + ) -> Val<bevy::math::I16Vec4> { + let output: Val<bevy::math::I16Vec4> = bevy::math::I16Vec4::wrapping_div( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Returns a vector containing the wrapping multiplication of `self` and `rhs`. + /// In other words this computes `[self.x.wrapping_mul(rhs.x), self.y.wrapping_mul(rhs.y), ..]`. + fn wrapping_mul( + _self: Val<bevy::math::I16Vec4>, + rhs: Val<bevy::math::I16Vec4>, + ) -> Val<bevy::math::I16Vec4> { + let output: Val<bevy::math::I16Vec4> = bevy::math::I16Vec4::wrapping_mul( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Returns a vector containing the wrapping subtraction of `self` and `rhs`. + /// In other words this computes `[self.x.wrapping_sub(rhs.x), self.y.wrapping_sub(rhs.y), ..]`. + fn wrapping_sub( + _self: Val<bevy::math::I16Vec4>, + rhs: Val<bevy::math::I16Vec4>, + ) -> Val<bevy::math::I16Vec4> { + let output: Val<bevy::math::I16Vec4> = bevy::math::I16Vec4::wrapping_sub( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Returns a vector containing the wrapping subtraction of `self` and unsigned vector `rhs`. + /// In other words this computes `[self.x.wrapping_sub_unsigned(rhs.x), self.y.wrapping_sub_unsigned(rhs.y), ..]`. + fn wrapping_sub_unsigned( + _self: Val<bevy::math::I16Vec4>, + rhs: Val<bevy::math::U16Vec4>, + ) -> Val<bevy::math::I16Vec4> { + let output: Val<bevy::math::I16Vec4> = bevy::math::I16Vec4::wrapping_sub_unsigned( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } +} +#[script_bindings( + remote, + name = "i_64_vec_2_functions", + bms_core_path = "bevy_mod_scripting_core", + generated +)] +impl bevy::math::I64Vec2 { + /// Returns a vector containing the absolute value of each element of `self`. + fn abs(_self: Val<bevy::math::I64Vec2>) -> Val<bevy::math::I64Vec2> { + let output: Val<bevy::math::I64Vec2> = bevy::math::I64Vec2::abs( + _self.into_inner(), + ) + .into(); + output + } + /// Casts all elements of `self` to `f64`. + fn as_dvec2(_self: Ref<bevy::math::I64Vec2>) -> Val<bevy::math::DVec2> { + let output: Val<bevy::math::DVec2> = bevy::math::I64Vec2::as_dvec2(&_self) + .into(); + output + } + /// Casts all elements of `self` to `i16`. + fn as_i16vec2(_self: Ref<bevy::math::I64Vec2>) -> Val<bevy::math::I16Vec2> { + let output: Val<bevy::math::I16Vec2> = bevy::math::I64Vec2::as_i16vec2(&_self) + .into(); + output + } + /// Casts all elements of `self` to `i8`. + fn as_i8vec2(_self: Ref<bevy::math::I64Vec2>) -> Val<bevy::math::I8Vec2> { + let output: Val<bevy::math::I8Vec2> = bevy::math::I64Vec2::as_i8vec2(&_self) + .into(); + output + } + /// Casts all elements of `self` to `i32`. + fn as_ivec2(_self: Ref<bevy::math::I64Vec2>) -> Val<bevy::math::IVec2> { + let output: Val<bevy::math::IVec2> = bevy::math::I64Vec2::as_ivec2(&_self) + .into(); + output + } + /// Casts all elements of `self` to `u16`. + fn as_u16vec2(_self: Ref<bevy::math::I64Vec2>) -> Val<bevy::math::U16Vec2> { + let output: Val<bevy::math::U16Vec2> = bevy::math::I64Vec2::as_u16vec2(&_self) + .into(); + output + } + /// Casts all elements of `self` to `u64`. + fn as_u64vec2(_self: Ref<bevy::math::I64Vec2>) -> Val<bevy::math::U64Vec2> { + let output: Val<bevy::math::U64Vec2> = bevy::math::I64Vec2::as_u64vec2(&_self) + .into(); + output + } + /// Casts all elements of `self` to `u8`. + fn as_u8vec2(_self: Ref<bevy::math::I64Vec2>) -> Val<bevy::math::U8Vec2> { + let output: Val<bevy::math::U8Vec2> = bevy::math::I64Vec2::as_u8vec2(&_self) + .into(); + output + } + /// Casts all elements of `self` to `u32`. + fn as_uvec2(_self: Ref<bevy::math::I64Vec2>) -> Val<bevy::math::UVec2> { + let output: Val<bevy::math::UVec2> = bevy::math::I64Vec2::as_uvec2(&_self) + .into(); + output + } + /// Casts all elements of `self` to `f32`. + fn as_vec2(_self: Ref<bevy::math::I64Vec2>) -> Val<bevy::math::Vec2> { + let output: Val<bevy::math::Vec2> = bevy::math::I64Vec2::as_vec2(&_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<bevy::math::I64Vec2>, + min: Val<bevy::math::I64Vec2>, + max: Val<bevy::math::I64Vec2>, + ) -> Val<bevy::math::I64Vec2> { + let output: Val<bevy::math::I64Vec2> = bevy::math::I64Vec2::clamp( + _self.into_inner(), + min.into_inner(), + max.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 cmpeq( + _self: Val<bevy::math::I64Vec2>, + rhs: Val<bevy::math::I64Vec2>, + ) -> Val<bevy::math::BVec2> { + let output: Val<bevy::math::BVec2> = bevy::math::I64Vec2::cmpeq( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Returns a vector mask containing the result of a `>=` comparison for each element of + /// `self` and `rhs`. + /// In other words this computes `[self.x >= rhs.x, self.y >= rhs.y, ..]` for all + /// elements. + fn cmpge( + _self: Val<bevy::math::I64Vec2>, + rhs: Val<bevy::math::I64Vec2>, + ) -> Val<bevy::math::BVec2> { + let output: Val<bevy::math::BVec2> = bevy::math::I64Vec2::cmpge( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Returns a vector mask containing the result of a `>` comparison for each element of + /// `self` and `rhs`. + /// In other words this computes `[self.x > rhs.x, self.y > rhs.y, ..]` for all + /// elements. + fn cmpgt( + _self: Val<bevy::math::I64Vec2>, + rhs: Val<bevy::math::I64Vec2>, + ) -> Val<bevy::math::BVec2> { + let output: Val<bevy::math::BVec2> = bevy::math::I64Vec2::cmpgt( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Returns a vector mask containing the result of a `<=` comparison for each element of + /// `self` and `rhs`. + /// In other words this computes `[self.x <= rhs.x, self.y <= rhs.y, ..]` for all + /// elements. + fn cmple( + _self: Val<bevy::math::I64Vec2>, + rhs: Val<bevy::math::I64Vec2>, + ) -> Val<bevy::math::BVec2> { + let output: Val<bevy::math::BVec2> = bevy::math::I64Vec2::cmple( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Returns a vector mask containing the result of a `<` comparison for each element of + /// `self` and `rhs`. + /// In other words this computes `[self.x < rhs.x, self.y < rhs.y, ..]` for all + /// elements. + fn cmplt( + _self: Val<bevy::math::I64Vec2>, + rhs: Val<bevy::math::I64Vec2>, + ) -> Val<bevy::math::BVec2> { + let output: Val<bevy::math::BVec2> = bevy::math::I64Vec2::cmplt( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Returns a vector mask containing the result of a `!=` comparison for each element of + /// `self` and `rhs`. + /// In other words this computes `[self.x != rhs.x, self.y != rhs.y, ..]` for all + /// elements. + fn cmpne( + _self: Val<bevy::math::I64Vec2>, + rhs: Val<bevy::math::I64Vec2>, + ) -> Val<bevy::math::BVec2> { + let output: Val<bevy::math::BVec2> = bevy::math::I64Vec2::cmpne( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Compute the squared euclidean distance between two points in space. + fn distance_squared( + _self: Val<bevy::math::I64Vec2>, + rhs: Val<bevy::math::I64Vec2>, + ) -> i64 { + let output: i64 = bevy::math::I64Vec2::distance_squared( + _self.into_inner(), + rhs.into_inner(), + ) + .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<bevy::math::I64Vec2>, + rhs: Val<bevy::math::I64Vec2>, + ) -> Val<bevy::math::I64Vec2> { + let output: Val<bevy::math::I64Vec2> = bevy::math::I64Vec2::div_euclid( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Computes the dot product of `self` and `rhs`. + fn dot(_self: Val<bevy::math::I64Vec2>, rhs: Val<bevy::math::I64Vec2>) -> i64 { + let output: i64 = bevy::math::I64Vec2::dot(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + /// Returns a vector where every component is the dot product of `self` and `rhs`. + fn dot_into_vec( + _self: Val<bevy::math::I64Vec2>, + rhs: Val<bevy::math::I64Vec2>, + ) -> Val<bevy::math::I64Vec2> { + let output: Val<bevy::math::I64Vec2> = bevy::math::I64Vec2::dot_into_vec( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Returns the product of all elements of `self`. + /// In other words, this computes `self.x * self.y * ..`. + fn element_product(_self: Val<bevy::math::I64Vec2>) -> i64 { + let output: i64 = bevy::math::I64Vec2::element_product(_self.into_inner()) + .into(); + output + } + /// Returns the sum of all elements of `self`. + /// In other words, this computes `self.x + self.y + ..`. + fn element_sum(_self: Val<bevy::math::I64Vec2>) -> i64 { + let output: i64 = bevy::math::I64Vec2::element_sum(_self.into_inner()).into(); + output + } + /// Creates a 3D vector from `self` and the given `z` value. + fn extend(_self: Val<bevy::math::I64Vec2>, z: i64) -> Val<bevy::math::I64Vec3> { + let output: Val<bevy::math::I64Vec3> = bevy::math::I64Vec2::extend( + _self.into_inner(), + z, + ) + .into(); + output + } + /// Creates a new vector from an array. + fn from_array(a: [i64; 2]) -> Val<bevy::math::I64Vec2> { + let output: Val<bevy::math::I64Vec2> = bevy::math::I64Vec2::from_array(a).into(); + output + } + /// Returns a bitmask with the lowest 2 bits set to the sign bits from the elements of `self`. + /// A negative element results in a `1` bit and a positive element in a `0` bit. Element `x` goes + /// into the first lowest bit, element `y` into the second, etc. + fn is_negative_bitmask(_self: Val<bevy::math::I64Vec2>) -> u32 { + let output: u32 = bevy::math::I64Vec2::is_negative_bitmask(_self.into_inner()) + .into(); + output + } + /// Computes the squared length of `self`. + fn length_squared(_self: Val<bevy::math::I64Vec2>) -> i64 { + let output: i64 = bevy::math::I64Vec2::length_squared(_self.into_inner()).into(); + output + } + /// Returns a vector containing the maximum values for each element of `self` and `rhs`. + /// In other words this computes `[self.x.max(rhs.x), self.y.max(rhs.y), ..]`. + fn max( + _self: Val<bevy::math::I64Vec2>, + rhs: Val<bevy::math::I64Vec2>, + ) -> Val<bevy::math::I64Vec2> { + let output: Val<bevy::math::I64Vec2> = bevy::math::I64Vec2::max( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Returns the horizontal maximum of `self`. + /// In other words this computes `max(x, y, ..)`. + fn max_element(_self: Val<bevy::math::I64Vec2>) -> i64 { + let output: i64 = bevy::math::I64Vec2::max_element(_self.into_inner()).into(); + output + } + /// Returns a vector containing the minimum values for each element of `self` and `rhs`. + /// In other words this computes `[self.x.min(rhs.x), self.y.min(rhs.y), ..]`. + fn min( + _self: Val<bevy::math::I64Vec2>, + rhs: Val<bevy::math::I64Vec2>, + ) -> Val<bevy::math::I64Vec2> { + let output: Val<bevy::math::I64Vec2> = bevy::math::I64Vec2::min( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Returns the horizontal minimum of `self`. + /// In other words this computes `min(x, y, ..)`. + fn min_element(_self: Val<bevy::math::I64Vec2>) -> i64 { + let output: i64 = bevy::math::I64Vec2::min_element(_self.into_inner()).into(); + output + } + /// Creates a new vector. + fn new(x: i64, y: i64) -> Val<bevy::math::I64Vec2> { + let output: Val<bevy::math::I64Vec2> = bevy::math::I64Vec2::new(x, y).into(); + output + } + /// Returns a vector that is equal to `self` rotated by 90 degrees. + fn perp(_self: Val<bevy::math::I64Vec2>) -> Val<bevy::math::I64Vec2> { + let output: Val<bevy::math::I64Vec2> = bevy::math::I64Vec2::perp( + _self.into_inner(), + ) + .into(); + output + } + /// The perpendicular dot product of `self` and `rhs`. + /// Also known as the wedge product, 2D cross product, and determinant. + fn perp_dot(_self: Val<bevy::math::I64Vec2>, rhs: Val<bevy::math::I64Vec2>) -> i64 { + let output: i64 = bevy::math::I64Vec2::perp_dot( + _self.into_inner(), + rhs.into_inner(), + ) + .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<bevy::math::I64Vec2>, + rhs: Val<bevy::math::I64Vec2>, + ) -> Val<bevy::math::I64Vec2> { + let output: Val<bevy::math::I64Vec2> = bevy::math::I64Vec2::rem_euclid( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Returns `rhs` rotated by the angle of `self`. If `self` is normalized, + /// then this just rotation. This is what you usually want. Otherwise, + /// it will be like a rotation with a multiplication by `self`'s length. + fn rotate( + _self: Val<bevy::math::I64Vec2>, + rhs: Val<bevy::math::I64Vec2>, + ) -> Val<bevy::math::I64Vec2> { + let output: Val<bevy::math::I64Vec2> = bevy::math::I64Vec2::rotate( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Returns a vector containing the saturating addition of `self` and `rhs`. + /// In other words this computes `[self.x.saturating_add(rhs.x), self.y.saturating_add(rhs.y), ..]`. + fn saturating_add( + _self: Val<bevy::math::I64Vec2>, + rhs: Val<bevy::math::I64Vec2>, + ) -> Val<bevy::math::I64Vec2> { + let output: Val<bevy::math::I64Vec2> = bevy::math::I64Vec2::saturating_add( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// In other words this computes `[self.x.saturating_add_unsigned(rhs.x), self.y.saturating_add_unsigned(rhs.y), ..]`. + fn saturating_add_unsigned( + _self: Val<bevy::math::I64Vec2>, + rhs: Val<bevy::math::U64Vec2>, + ) -> Val<bevy::math::I64Vec2> { + let output: Val<bevy::math::I64Vec2> = bevy::math::I64Vec2::saturating_add_unsigned( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Returns a vector containing the saturating division of `self` and `rhs`. + /// In other words this computes `[self.x.saturating_div(rhs.x), self.y.saturating_div(rhs.y), ..]`. + fn saturating_div( + _self: Val<bevy::math::I64Vec2>, + rhs: Val<bevy::math::I64Vec2>, + ) -> Val<bevy::math::I64Vec2> { + let output: Val<bevy::math::I64Vec2> = bevy::math::I64Vec2::saturating_div( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Returns a vector containing the saturating multiplication of `self` and `rhs`. + /// In other words this computes `[self.x.saturating_mul(rhs.x), self.y.saturating_mul(rhs.y), ..]`. + fn saturating_mul( + _self: Val<bevy::math::I64Vec2>, + rhs: Val<bevy::math::I64Vec2>, + ) -> Val<bevy::math::I64Vec2> { + let output: Val<bevy::math::I64Vec2> = bevy::math::I64Vec2::saturating_mul( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Returns a vector containing the saturating subtraction of `self` and `rhs`. + /// In other words this computes `[self.x.saturating_sub(rhs.x), self.y.saturating_sub(rhs.y), ..]`. + fn saturating_sub( + _self: Val<bevy::math::I64Vec2>, + rhs: Val<bevy::math::I64Vec2>, + ) -> Val<bevy::math::I64Vec2> { + let output: Val<bevy::math::I64Vec2> = bevy::math::I64Vec2::saturating_sub( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Returns a vector containing the saturating subtraction of `self` and unsigned vector `rhs`. + /// In other words this computes `[self.x.saturating_sub_unsigned(rhs.x), self.y.saturating_sub_unsigned(rhs.y), ..]`. + fn saturating_sub_unsigned( + _self: Val<bevy::math::I64Vec2>, + rhs: Val<bevy::math::U64Vec2>, + ) -> Val<bevy::math::I64Vec2> { + let output: Val<bevy::math::I64Vec2> = bevy::math::I64Vec2::saturating_sub_unsigned( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Creates a vector from the elements in `if_true` and `if_false`, selecting which to use + /// for each element of `self`. + /// A true element in the mask uses the corresponding element from `if_true`, and false + /// uses the element from `if_false`. + fn select( + mask: Val<bevy::math::BVec2>, + if_true: Val<bevy::math::I64Vec2>, + if_false: Val<bevy::math::I64Vec2>, + ) -> Val<bevy::math::I64Vec2> { + let output: Val<bevy::math::I64Vec2> = bevy::math::I64Vec2::select( + mask.into_inner(), + if_true.into_inner(), + if_false.into_inner(), + ) + .into(); + output + } + /// Returns a vector with elements representing the sign of `self`. + /// - `0` if the number is zero + /// - `1` if the number is positive + /// - `-1` if the number is negative + fn signum(_self: Val<bevy::math::I64Vec2>) -> Val<bevy::math::I64Vec2> { + let output: Val<bevy::math::I64Vec2> = bevy::math::I64Vec2::signum( + _self.into_inner(), + ) + .into(); + output + } + /// Creates a vector with all elements set to `v`. + fn splat(v: i64) -> Val<bevy::math::I64Vec2> { + let output: Val<bevy::math::I64Vec2> = bevy::math::I64Vec2::splat(v).into(); + output + } + /// `[x, y]` + fn to_array(_self: Ref<bevy::math::I64Vec2>) -> [i64; 2] { + let output: [i64; 2] = bevy::math::I64Vec2::to_array(&_self).into(); + output + } + /// Creates a 2D vector from `self` with the given value of `x`. + fn with_x(_self: Val<bevy::math::I64Vec2>, x: i64) -> Val<bevy::math::I64Vec2> { + let output: Val<bevy::math::I64Vec2> = bevy::math::I64Vec2::with_x( + _self.into_inner(), + x, + ) + .into(); + output + } + /// Creates a 2D vector from `self` with the given value of `y`. + fn with_y(_self: Val<bevy::math::I64Vec2>, y: i64) -> Val<bevy::math::I64Vec2> { + let output: Val<bevy::math::I64Vec2> = bevy::math::I64Vec2::with_y( + _self.into_inner(), + y, + ) + .into(); + output + } + /// Returns a vector containing the wrapping addition of `self` and `rhs`. + /// In other words this computes `[self.x.wrapping_add(rhs.x), self.y.wrapping_add(rhs.y), ..]`. + fn wrapping_add( + _self: Val<bevy::math::I64Vec2>, + rhs: Val<bevy::math::I64Vec2>, + ) -> Val<bevy::math::I64Vec2> { + let output: Val<bevy::math::I64Vec2> = bevy::math::I64Vec2::wrapping_add( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Returns a vector containing the wrapping addition of `self` and unsigned vector `rhs`. + /// In other words this computes `[self.x.wrapping_add_unsigned(rhs.x), self.y.wrapping_add_unsigned(rhs.y), ..]`. + fn wrapping_add_unsigned( + _self: Val<bevy::math::I64Vec2>, + rhs: Val<bevy::math::U64Vec2>, + ) -> Val<bevy::math::I64Vec2> { + let output: Val<bevy::math::I64Vec2> = bevy::math::I64Vec2::wrapping_add_unsigned( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Returns a vector containing the wrapping division of `self` and `rhs`. + /// In other words this computes `[self.x.wrapping_div(rhs.x), self.y.wrapping_div(rhs.y), ..]`. + fn wrapping_div( + _self: Val<bevy::math::I64Vec2>, + rhs: Val<bevy::math::I64Vec2>, + ) -> Val<bevy::math::I64Vec2> { + let output: Val<bevy::math::I64Vec2> = bevy::math::I64Vec2::wrapping_div( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Returns a vector containing the wrapping multiplication of `self` and `rhs`. + /// In other words this computes `[self.x.wrapping_mul(rhs.x), self.y.wrapping_mul(rhs.y), ..]`. + fn wrapping_mul( + _self: Val<bevy::math::I64Vec2>, + rhs: Val<bevy::math::I64Vec2>, + ) -> Val<bevy::math::I64Vec2> { + let output: Val<bevy::math::I64Vec2> = bevy::math::I64Vec2::wrapping_mul( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Returns a vector containing the wrapping subtraction of `self` and `rhs`. + /// In other words this computes `[self.x.wrapping_sub(rhs.x), self.y.wrapping_sub(rhs.y), ..]`. + fn wrapping_sub( + _self: Val<bevy::math::I64Vec2>, + rhs: Val<bevy::math::I64Vec2>, + ) -> Val<bevy::math::I64Vec2> { + let output: Val<bevy::math::I64Vec2> = bevy::math::I64Vec2::wrapping_sub( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Returns a vector containing the wrapping subtraction of `self` and unsigned vector `rhs`. + /// In other words this computes `[self.x.wrapping_sub_unsigned(rhs.x), self.y.wrapping_sub_unsigned(rhs.y), ..]`. + fn wrapping_sub_unsigned( + _self: Val<bevy::math::I64Vec2>, + rhs: Val<bevy::math::U64Vec2>, + ) -> Val<bevy::math::I64Vec2> { + let output: Val<bevy::math::I64Vec2> = bevy::math::I64Vec2::wrapping_sub_unsigned( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } +} +#[script_bindings( + remote, + name = "i_64_vec_3_functions", + bms_core_path = "bevy_mod_scripting_core", + generated +)] +impl bevy::math::I64Vec3 { + /// Returns a vector containing the absolute value of each element of `self`. + fn abs(_self: Val<bevy::math::I64Vec3>) -> Val<bevy::math::I64Vec3> { + let output: Val<bevy::math::I64Vec3> = bevy::math::I64Vec3::abs( + _self.into_inner(), + ) + .into(); + output + } + /// Casts all elements of `self` to `f64`. + fn as_dvec3(_self: Ref<bevy::math::I64Vec3>) -> Val<bevy::math::DVec3> { + let output: Val<bevy::math::DVec3> = bevy::math::I64Vec3::as_dvec3(&_self) + .into(); + output + } + /// Casts all elements of `self` to `i16`. + fn as_i16vec3(_self: Ref<bevy::math::I64Vec3>) -> Val<bevy::math::I16Vec3> { + let output: Val<bevy::math::I16Vec3> = bevy::math::I64Vec3::as_i16vec3(&_self) + .into(); + output + } + /// Casts all elements of `self` to `i8`. + fn as_i8vec3(_self: Ref<bevy::math::I64Vec3>) -> Val<bevy::math::I8Vec3> { + let output: Val<bevy::math::I8Vec3> = bevy::math::I64Vec3::as_i8vec3(&_self) + .into(); + output + } + /// Casts all elements of `self` to `i32`. + fn as_ivec3(_self: Ref<bevy::math::I64Vec3>) -> Val<bevy::math::IVec3> { + let output: Val<bevy::math::IVec3> = bevy::math::I64Vec3::as_ivec3(&_self) + .into(); + output + } + /// Casts all elements of `self` to `u16`. + fn as_u16vec3(_self: Ref<bevy::math::I64Vec3>) -> Val<bevy::math::U16Vec3> { + let output: Val<bevy::math::U16Vec3> = bevy::math::I64Vec3::as_u16vec3(&_self) + .into(); + output + } + /// Casts all elements of `self` to `u64`. + fn as_u64vec3(_self: Ref<bevy::math::I64Vec3>) -> Val<bevy::math::U64Vec3> { + let output: Val<bevy::math::U64Vec3> = bevy::math::I64Vec3::as_u64vec3(&_self) + .into(); + output + } + /// Casts all elements of `self` to `u8`. + fn as_u8vec3(_self: Ref<bevy::math::I64Vec3>) -> Val<bevy::math::U8Vec3> { + let output: Val<bevy::math::U8Vec3> = bevy::math::I64Vec3::as_u8vec3(&_self) + .into(); + output + } + /// Casts all elements of `self` to `u32`. + fn as_uvec3(_self: Ref<bevy::math::I64Vec3>) -> Val<bevy::math::UVec3> { + let output: Val<bevy::math::UVec3> = bevy::math::I64Vec3::as_uvec3(&_self) + .into(); + output + } + /// Casts all elements of `self` to `f32`. + fn as_vec3(_self: Ref<bevy::math::I64Vec3>) -> Val<bevy::math::Vec3> { + let output: Val<bevy::math::Vec3> = bevy::math::I64Vec3::as_vec3(&_self).into(); + output + } + /// Casts all elements of `self` to `f32`. + fn as_vec3a(_self: Ref<bevy::math::I64Vec3>) -> Val<bevy::math::Vec3A> { + let output: Val<bevy::math::Vec3A> = bevy::math::I64Vec3::as_vec3a(&_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<bevy::math::I64Vec3>, + min: Val<bevy::math::I64Vec3>, + max: Val<bevy::math::I64Vec3>, + ) -> Val<bevy::math::I64Vec3> { + let output: Val<bevy::math::I64Vec3> = bevy::math::I64Vec3::clamp( + _self.into_inner(), + min.into_inner(), + max.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 cmpeq( + _self: Val<bevy::math::I64Vec3>, + rhs: Val<bevy::math::I64Vec3>, + ) -> Val<bevy::math::BVec3> { + let output: Val<bevy::math::BVec3> = bevy::math::I64Vec3::cmpeq( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Returns a vector mask containing the result of a `>=` comparison for each element of + /// `self` and `rhs`. + /// In other words this computes `[self.x >= rhs.x, self.y >= rhs.y, ..]` for all + /// elements. + fn cmpge( + _self: Val<bevy::math::I64Vec3>, + rhs: Val<bevy::math::I64Vec3>, + ) -> Val<bevy::math::BVec3> { + let output: Val<bevy::math::BVec3> = bevy::math::I64Vec3::cmpge( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Returns a vector mask containing the result of a `>` comparison for each element of + /// `self` and `rhs`. + /// In other words this computes `[self.x > rhs.x, self.y > rhs.y, ..]` for all + /// elements. + fn cmpgt( + _self: Val<bevy::math::I64Vec3>, + rhs: Val<bevy::math::I64Vec3>, + ) -> Val<bevy::math::BVec3> { + let output: Val<bevy::math::BVec3> = bevy::math::I64Vec3::cmpgt( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Returns a vector mask containing the result of a `<=` comparison for each element of + /// `self` and `rhs`. + /// In other words this computes `[self.x <= rhs.x, self.y <= rhs.y, ..]` for all + /// elements. + fn cmple( + _self: Val<bevy::math::I64Vec3>, + rhs: Val<bevy::math::I64Vec3>, + ) -> Val<bevy::math::BVec3> { + let output: Val<bevy::math::BVec3> = bevy::math::I64Vec3::cmple( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Returns a vector mask containing the result of a `<` comparison for each element of + /// `self` and `rhs`. + /// In other words this computes `[self.x < rhs.x, self.y < rhs.y, ..]` for all + /// elements. + fn cmplt( + _self: Val<bevy::math::I64Vec3>, + rhs: Val<bevy::math::I64Vec3>, + ) -> Val<bevy::math::BVec3> { + let output: Val<bevy::math::BVec3> = bevy::math::I64Vec3::cmplt( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Returns a vector mask containing the result of a `!=` comparison for each element of + /// `self` and `rhs`. + /// In other words this computes `[self.x != rhs.x, self.y != rhs.y, ..]` for all + /// elements. + fn cmpne( + _self: Val<bevy::math::I64Vec3>, + rhs: Val<bevy::math::I64Vec3>, + ) -> Val<bevy::math::BVec3> { + let output: Val<bevy::math::BVec3> = bevy::math::I64Vec3::cmpne( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Computes the cross product of `self` and `rhs`. + fn cross( + _self: Val<bevy::math::I64Vec3>, + rhs: Val<bevy::math::I64Vec3>, + ) -> Val<bevy::math::I64Vec3> { + let output: Val<bevy::math::I64Vec3> = bevy::math::I64Vec3::cross( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Compute the squared euclidean distance between two points in space. + fn distance_squared( + _self: Val<bevy::math::I64Vec3>, + rhs: Val<bevy::math::I64Vec3>, + ) -> i64 { + let output: i64 = bevy::math::I64Vec3::distance_squared( + _self.into_inner(), + rhs.into_inner(), + ) + .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<bevy::math::I64Vec3>, + rhs: Val<bevy::math::I64Vec3>, + ) -> Val<bevy::math::I64Vec3> { + let output: Val<bevy::math::I64Vec3> = bevy::math::I64Vec3::div_euclid( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Computes the dot product of `self` and `rhs`. + fn dot(_self: Val<bevy::math::I64Vec3>, rhs: Val<bevy::math::I64Vec3>) -> i64 { + let output: i64 = bevy::math::I64Vec3::dot(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + /// Returns a vector where every component is the dot product of `self` and `rhs`. + fn dot_into_vec( + _self: Val<bevy::math::I64Vec3>, + rhs: Val<bevy::math::I64Vec3>, + ) -> Val<bevy::math::I64Vec3> { + let output: Val<bevy::math::I64Vec3> = bevy::math::I64Vec3::dot_into_vec( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Returns the product of all elements of `self`. + /// In other words, this computes `self.x * self.y * ..`. + fn element_product(_self: Val<bevy::math::I64Vec3>) -> i64 { + let output: i64 = bevy::math::I64Vec3::element_product(_self.into_inner()) + .into(); + output + } + /// Returns the sum of all elements of `self`. + /// In other words, this computes `self.x + self.y + ..`. + fn element_sum(_self: Val<bevy::math::I64Vec3>) -> i64 { + let output: i64 = bevy::math::I64Vec3::element_sum(_self.into_inner()).into(); + output + } + /// Creates a 4D vector from `self` and the given `w` value. + fn extend(_self: Val<bevy::math::I64Vec3>, w: i64) -> Val<bevy::math::I64Vec4> { + let output: Val<bevy::math::I64Vec4> = bevy::math::I64Vec3::extend( + _self.into_inner(), + w, + ) + .into(); + output + } + /// Creates a new vector from an array. + fn from_array(a: [i64; 3]) -> Val<bevy::math::I64Vec3> { + let output: Val<bevy::math::I64Vec3> = bevy::math::I64Vec3::from_array(a).into(); + output + } + /// Returns a bitmask with the lowest 3 bits set to the sign bits from the elements of `self`. + /// A negative element results in a `1` bit and a positive element in a `0` bit. Element `x` goes + /// into the first lowest bit, element `y` into the second, etc. + fn is_negative_bitmask(_self: Val<bevy::math::I64Vec3>) -> u32 { + let output: u32 = bevy::math::I64Vec3::is_negative_bitmask(_self.into_inner()) + .into(); + output + } + /// Computes the squared length of `self`. + fn length_squared(_self: Val<bevy::math::I64Vec3>) -> i64 { + let output: i64 = bevy::math::I64Vec3::length_squared(_self.into_inner()).into(); + output + } + /// Returns a vector containing the maximum values for each element of `self` and `rhs`. + /// In other words this computes `[self.x.max(rhs.x), self.y.max(rhs.y), ..]`. + fn max( + _self: Val<bevy::math::I64Vec3>, + rhs: Val<bevy::math::I64Vec3>, + ) -> Val<bevy::math::I64Vec3> { + let output: Val<bevy::math::I64Vec3> = bevy::math::I64Vec3::max( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Returns the horizontal maximum of `self`. + /// In other words this computes `max(x, y, ..)`. + fn max_element(_self: Val<bevy::math::I64Vec3>) -> i64 { + let output: i64 = bevy::math::I64Vec3::max_element(_self.into_inner()).into(); + output + } + /// Returns a vector containing the minimum values for each element of `self` and `rhs`. + /// In other words this computes `[self.x.min(rhs.x), self.y.min(rhs.y), ..]`. + fn min( + _self: Val<bevy::math::I64Vec3>, + rhs: Val<bevy::math::I64Vec3>, + ) -> Val<bevy::math::I64Vec3> { + let output: Val<bevy::math::I64Vec3> = bevy::math::I64Vec3::min( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Returns the horizontal minimum of `self`. + /// In other words this computes `min(x, y, ..)`. + fn min_element(_self: Val<bevy::math::I64Vec3>) -> i64 { + let output: i64 = bevy::math::I64Vec3::min_element(_self.into_inner()).into(); + output + } + /// Creates a new vector. + fn new(x: i64, y: i64, z: i64) -> Val<bevy::math::I64Vec3> { + let output: Val<bevy::math::I64Vec3> = bevy::math::I64Vec3::new(x, y, z).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<bevy::math::I64Vec3>, + rhs: Val<bevy::math::I64Vec3>, + ) -> Val<bevy::math::I64Vec3> { + let output: Val<bevy::math::I64Vec3> = bevy::math::I64Vec3::rem_euclid( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Returns a vector containing the saturating addition of `self` and `rhs`. + /// In other words this computes `[self.x.saturating_add(rhs.x), self.y.saturating_add(rhs.y), ..]`. + fn saturating_add( + _self: Val<bevy::math::I64Vec3>, + rhs: Val<bevy::math::I64Vec3>, + ) -> Val<bevy::math::I64Vec3> { + let output: Val<bevy::math::I64Vec3> = bevy::math::I64Vec3::saturating_add( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// In other words this computes `[self.x.saturating_add_unsigned(rhs.x), self.y.saturating_add_unsigned(rhs.y), ..]`. + fn saturating_add_unsigned( + _self: Val<bevy::math::I64Vec3>, + rhs: Val<bevy::math::U64Vec3>, + ) -> Val<bevy::math::I64Vec3> { + let output: Val<bevy::math::I64Vec3> = bevy::math::I64Vec3::saturating_add_unsigned( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Returns a vector containing the saturating division of `self` and `rhs`. + /// In other words this computes `[self.x.saturating_div(rhs.x), self.y.saturating_div(rhs.y), ..]`. + fn saturating_div( + _self: Val<bevy::math::I64Vec3>, + rhs: Val<bevy::math::I64Vec3>, + ) -> Val<bevy::math::I64Vec3> { + let output: Val<bevy::math::I64Vec3> = bevy::math::I64Vec3::saturating_div( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Returns a vector containing the saturating multiplication of `self` and `rhs`. + /// In other words this computes `[self.x.saturating_mul(rhs.x), self.y.saturating_mul(rhs.y), ..]`. + fn saturating_mul( + _self: Val<bevy::math::I64Vec3>, + rhs: Val<bevy::math::I64Vec3>, + ) -> Val<bevy::math::I64Vec3> { + let output: Val<bevy::math::I64Vec3> = bevy::math::I64Vec3::saturating_mul( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Returns a vector containing the saturating subtraction of `self` and `rhs`. + /// In other words this computes `[self.x.saturating_sub(rhs.x), self.y.saturating_sub(rhs.y), ..]`. + fn saturating_sub( + _self: Val<bevy::math::I64Vec3>, + rhs: Val<bevy::math::I64Vec3>, + ) -> Val<bevy::math::I64Vec3> { + let output: Val<bevy::math::I64Vec3> = bevy::math::I64Vec3::saturating_sub( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Returns a vector containing the saturating subtraction of `self` and unsigned vector `rhs`. + /// In other words this computes `[self.x.saturating_sub_unsigned(rhs.x), self.y.saturating_sub_unsigned(rhs.y), ..]`. + fn saturating_sub_unsigned( + _self: Val<bevy::math::I64Vec3>, + rhs: Val<bevy::math::U64Vec3>, + ) -> Val<bevy::math::I64Vec3> { + let output: Val<bevy::math::I64Vec3> = bevy::math::I64Vec3::saturating_sub_unsigned( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Creates a vector from the elements in `if_true` and `if_false`, selecting which to use + /// for each element of `self`. + /// A true element in the mask uses the corresponding element from `if_true`, and false + /// uses the element from `if_false`. + fn select( + mask: Val<bevy::math::BVec3>, + if_true: Val<bevy::math::I64Vec3>, + if_false: Val<bevy::math::I64Vec3>, + ) -> Val<bevy::math::I64Vec3> { + let output: Val<bevy::math::I64Vec3> = bevy::math::I64Vec3::select( + mask.into_inner(), + if_true.into_inner(), + if_false.into_inner(), + ) + .into(); + output + } + /// Returns a vector with elements representing the sign of `self`. + /// - `0` if the number is zero + /// - `1` if the number is positive + /// - `-1` if the number is negative + fn signum(_self: Val<bevy::math::I64Vec3>) -> Val<bevy::math::I64Vec3> { + let output: Val<bevy::math::I64Vec3> = bevy::math::I64Vec3::signum( + _self.into_inner(), + ) + .into(); + output + } + /// Creates a vector with all elements set to `v`. + fn splat(v: i64) -> Val<bevy::math::I64Vec3> { + let output: Val<bevy::math::I64Vec3> = bevy::math::I64Vec3::splat(v).into(); + output + } + /// `[x, y, z]` + fn to_array(_self: Ref<bevy::math::I64Vec3>) -> [i64; 3] { + let output: [i64; 3] = bevy::math::I64Vec3::to_array(&_self).into(); + output + } + /// Creates a 2D vector from the `x` and `y` elements of `self`, discarding `z`. + /// Truncation may also be performed by using [`self.xy()`][crate::swizzles::Vec3Swizzles::xy()]. + fn truncate(_self: Val<bevy::math::I64Vec3>) -> Val<bevy::math::I64Vec2> { + let output: Val<bevy::math::I64Vec2> = bevy::math::I64Vec3::truncate( + _self.into_inner(), + ) + .into(); + output + } + /// Creates a 3D vector from `self` with the given value of `x`. + fn with_x(_self: Val<bevy::math::I64Vec3>, x: i64) -> Val<bevy::math::I64Vec3> { + let output: Val<bevy::math::I64Vec3> = bevy::math::I64Vec3::with_x( + _self.into_inner(), + x, + ) + .into(); + output + } + /// Creates a 3D vector from `self` with the given value of `y`. + fn with_y(_self: Val<bevy::math::I64Vec3>, y: i64) -> Val<bevy::math::I64Vec3> { + let output: Val<bevy::math::I64Vec3> = bevy::math::I64Vec3::with_y( + _self.into_inner(), + y, + ) + .into(); + output + } + /// Creates a 3D vector from `self` with the given value of `z`. + fn with_z(_self: Val<bevy::math::I64Vec3>, z: i64) -> Val<bevy::math::I64Vec3> { + let output: Val<bevy::math::I64Vec3> = bevy::math::I64Vec3::with_z( + _self.into_inner(), + z, + ) + .into(); + output + } + /// Returns a vector containing the wrapping addition of `self` and `rhs`. + /// In other words this computes `[self.x.wrapping_add(rhs.x), self.y.wrapping_add(rhs.y), ..]`. + fn wrapping_add( + _self: Val<bevy::math::I64Vec3>, + rhs: Val<bevy::math::I64Vec3>, + ) -> Val<bevy::math::I64Vec3> { + let output: Val<bevy::math::I64Vec3> = bevy::math::I64Vec3::wrapping_add( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Returns a vector containing the wrapping addition of `self` and unsigned vector `rhs`. + /// In other words this computes `[self.x.wrapping_add_unsigned(rhs.x), self.y.wrapping_add_unsigned(rhs.y), ..]`. + fn wrapping_add_unsigned( + _self: Val<bevy::math::I64Vec3>, + rhs: Val<bevy::math::U64Vec3>, + ) -> Val<bevy::math::I64Vec3> { + let output: Val<bevy::math::I64Vec3> = bevy::math::I64Vec3::wrapping_add_unsigned( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Returns a vector containing the wrapping division of `self` and `rhs`. + /// In other words this computes `[self.x.wrapping_div(rhs.x), self.y.wrapping_div(rhs.y), ..]`. + fn wrapping_div( + _self: Val<bevy::math::I64Vec3>, + rhs: Val<bevy::math::I64Vec3>, + ) -> Val<bevy::math::I64Vec3> { + let output: Val<bevy::math::I64Vec3> = bevy::math::I64Vec3::wrapping_div( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Returns a vector containing the wrapping multiplication of `self` and `rhs`. + /// In other words this computes `[self.x.wrapping_mul(rhs.x), self.y.wrapping_mul(rhs.y), ..]`. + fn wrapping_mul( + _self: Val<bevy::math::I64Vec3>, + rhs: Val<bevy::math::I64Vec3>, + ) -> Val<bevy::math::I64Vec3> { + let output: Val<bevy::math::I64Vec3> = bevy::math::I64Vec3::wrapping_mul( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Returns a vector containing the wrapping subtraction of `self` and `rhs`. + /// In other words this computes `[self.x.wrapping_sub(rhs.x), self.y.wrapping_sub(rhs.y), ..]`. + fn wrapping_sub( + _self: Val<bevy::math::I64Vec3>, + rhs: Val<bevy::math::I64Vec3>, + ) -> Val<bevy::math::I64Vec3> { + let output: Val<bevy::math::I64Vec3> = bevy::math::I64Vec3::wrapping_sub( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Returns a vector containing the wrapping subtraction of `self` and unsigned vector `rhs`. + /// In other words this computes `[self.x.wrapping_sub_unsigned(rhs.x), self.y.wrapping_sub_unsigned(rhs.y), ..]`. + fn wrapping_sub_unsigned( + _self: Val<bevy::math::I64Vec3>, + rhs: Val<bevy::math::U64Vec3>, + ) -> Val<bevy::math::I64Vec3> { + let output: Val<bevy::math::I64Vec3> = bevy::math::I64Vec3::wrapping_sub_unsigned( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } +} +#[script_bindings( + remote, + name = "i_64_vec_4_functions", + bms_core_path = "bevy_mod_scripting_core", + generated +)] +impl bevy::math::I64Vec4 { + /// Returns a vector containing the absolute value of each element of `self`. + fn abs(_self: Val<bevy::math::I64Vec4>) -> Val<bevy::math::I64Vec4> { + let output: Val<bevy::math::I64Vec4> = bevy::math::I64Vec4::abs( + _self.into_inner(), + ) + .into(); + output + } + /// Casts all elements of `self` to `f64`. + fn as_dvec4(_self: Ref<bevy::math::I64Vec4>) -> Val<bevy::math::DVec4> { + let output: Val<bevy::math::DVec4> = bevy::math::I64Vec4::as_dvec4(&_self) + .into(); + output + } + /// Casts all elements of `self` to `i16`. + fn as_i16vec4(_self: Ref<bevy::math::I64Vec4>) -> Val<bevy::math::I16Vec4> { + let output: Val<bevy::math::I16Vec4> = bevy::math::I64Vec4::as_i16vec4(&_self) + .into(); + output + } + /// Casts all elements of `self` to `i8`. + fn as_i8vec4(_self: Ref<bevy::math::I64Vec4>) -> Val<bevy::math::I8Vec4> { + let output: Val<bevy::math::I8Vec4> = bevy::math::I64Vec4::as_i8vec4(&_self) + .into(); + output + } + /// Casts all elements of `self` to `i32`. + fn as_ivec4(_self: Ref<bevy::math::I64Vec4>) -> Val<bevy::math::IVec4> { + let output: Val<bevy::math::IVec4> = bevy::math::I64Vec4::as_ivec4(&_self) + .into(); + output + } + /// Casts all elements of `self` to `u16`. + fn as_u16vec4(_self: Ref<bevy::math::I64Vec4>) -> Val<bevy::math::U16Vec4> { + let output: Val<bevy::math::U16Vec4> = bevy::math::I64Vec4::as_u16vec4(&_self) + .into(); + output + } + /// Casts all elements of `self` to `u64`. + fn as_u64vec4(_self: Ref<bevy::math::I64Vec4>) -> Val<bevy::math::U64Vec4> { + let output: Val<bevy::math::U64Vec4> = bevy::math::I64Vec4::as_u64vec4(&_self) + .into(); + output + } + /// Casts all elements of `self` to `u8`. + fn as_u8vec4(_self: Ref<bevy::math::I64Vec4>) -> Val<bevy::math::U8Vec4> { + let output: Val<bevy::math::U8Vec4> = bevy::math::I64Vec4::as_u8vec4(&_self) + .into(); + output + } + /// Casts all elements of `self` to `u32`. + fn as_uvec4(_self: Ref<bevy::math::I64Vec4>) -> Val<bevy::math::UVec4> { + let output: Val<bevy::math::UVec4> = bevy::math::I64Vec4::as_uvec4(&_self) + .into(); + output + } + /// Casts all elements of `self` to `f32`. + fn as_vec4(_self: Ref<bevy::math::I64Vec4>) -> Val<bevy::math::Vec4> { + let output: Val<bevy::math::Vec4> = bevy::math::I64Vec4::as_vec4(&_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<bevy::math::I64Vec4>, + min: Val<bevy::math::I64Vec4>, + max: Val<bevy::math::I64Vec4>, + ) -> Val<bevy::math::I64Vec4> { + let output: Val<bevy::math::I64Vec4> = bevy::math::I64Vec4::clamp( + _self.into_inner(), + min.into_inner(), + max.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 cmpeq( + _self: Val<bevy::math::I64Vec4>, + rhs: Val<bevy::math::I64Vec4>, + ) -> Val<bevy::math::BVec4> { + let output: Val<bevy::math::BVec4> = bevy::math::I64Vec4::cmpeq( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Returns a vector mask containing the result of a `>=` comparison for each element of + /// `self` and `rhs`. + /// In other words this computes `[self.x >= rhs.x, self.y >= rhs.y, ..]` for all + /// elements. + fn cmpge( + _self: Val<bevy::math::I64Vec4>, + rhs: Val<bevy::math::I64Vec4>, + ) -> Val<bevy::math::BVec4> { + let output: Val<bevy::math::BVec4> = bevy::math::I64Vec4::cmpge( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Returns a vector mask containing the result of a `>` comparison for each element of + /// `self` and `rhs`. + /// In other words this computes `[self.x > rhs.x, self.y > rhs.y, ..]` for all + /// elements. + fn cmpgt( + _self: Val<bevy::math::I64Vec4>, + rhs: Val<bevy::math::I64Vec4>, + ) -> Val<bevy::math::BVec4> { + let output: Val<bevy::math::BVec4> = bevy::math::I64Vec4::cmpgt( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Returns a vector mask containing the result of a `<=` comparison for each element of + /// `self` and `rhs`. + /// In other words this computes `[self.x <= rhs.x, self.y <= rhs.y, ..]` for all + /// elements. + fn cmple( + _self: Val<bevy::math::I64Vec4>, + rhs: Val<bevy::math::I64Vec4>, + ) -> Val<bevy::math::BVec4> { + let output: Val<bevy::math::BVec4> = bevy::math::I64Vec4::cmple( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Returns a vector mask containing the result of a `<` comparison for each element of + /// `self` and `rhs`. + /// In other words this computes `[self.x < rhs.x, self.y < rhs.y, ..]` for all + /// elements. + fn cmplt( + _self: Val<bevy::math::I64Vec4>, + rhs: Val<bevy::math::I64Vec4>, + ) -> Val<bevy::math::BVec4> { + let output: Val<bevy::math::BVec4> = bevy::math::I64Vec4::cmplt( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Returns a vector mask containing the result of a `!=` comparison for each element of + /// `self` and `rhs`. + /// In other words this computes `[self.x != rhs.x, self.y != rhs.y, ..]` for all + /// elements. + fn cmpne( + _self: Val<bevy::math::I64Vec4>, + rhs: Val<bevy::math::I64Vec4>, + ) -> Val<bevy::math::BVec4> { + let output: Val<bevy::math::BVec4> = bevy::math::I64Vec4::cmpne( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Compute the squared euclidean distance between two points in space. + fn distance_squared( + _self: Val<bevy::math::I64Vec4>, + rhs: Val<bevy::math::I64Vec4>, + ) -> i64 { + let output: i64 = bevy::math::I64Vec4::distance_squared( + _self.into_inner(), + rhs.into_inner(), + ) + .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<bevy::math::I64Vec4>, + rhs: Val<bevy::math::I64Vec4>, + ) -> Val<bevy::math::I64Vec4> { + let output: Val<bevy::math::I64Vec4> = bevy::math::I64Vec4::div_euclid( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Computes the dot product of `self` and `rhs`. + fn dot(_self: Val<bevy::math::I64Vec4>, rhs: Val<bevy::math::I64Vec4>) -> i64 { + let output: i64 = bevy::math::I64Vec4::dot(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + /// Returns a vector where every component is the dot product of `self` and `rhs`. + fn dot_into_vec( + _self: Val<bevy::math::I64Vec4>, + rhs: Val<bevy::math::I64Vec4>, + ) -> Val<bevy::math::I64Vec4> { + let output: Val<bevy::math::I64Vec4> = bevy::math::I64Vec4::dot_into_vec( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Returns the product of all elements of `self`. + /// In other words, this computes `self.x * self.y * ..`. + fn element_product(_self: Val<bevy::math::I64Vec4>) -> i64 { + let output: i64 = bevy::math::I64Vec4::element_product(_self.into_inner()) + .into(); + output + } + /// Returns the sum of all elements of `self`. + /// In other words, this computes `self.x + self.y + ..`. + fn element_sum(_self: Val<bevy::math::I64Vec4>) -> i64 { + let output: i64 = bevy::math::I64Vec4::element_sum(_self.into_inner()).into(); + output + } + /// Creates a new vector from an array. + fn from_array(a: [i64; 4]) -> Val<bevy::math::I64Vec4> { + let output: Val<bevy::math::I64Vec4> = bevy::math::I64Vec4::from_array(a).into(); + output + } + /// Returns a bitmask with the lowest 4 bits set to the sign bits from the elements of `self`. + /// A negative element results in a `1` bit and a positive element in a `0` bit. Element `x` goes + /// into the first lowest bit, element `y` into the second, etc. + fn is_negative_bitmask(_self: Val<bevy::math::I64Vec4>) -> u32 { + let output: u32 = bevy::math::I64Vec4::is_negative_bitmask(_self.into_inner()) + .into(); + output + } + /// Computes the squared length of `self`. + fn length_squared(_self: Val<bevy::math::I64Vec4>) -> i64 { + let output: i64 = bevy::math::I64Vec4::length_squared(_self.into_inner()).into(); + output + } + /// Returns a vector containing the maximum values for each element of `self` and `rhs`. + /// In other words this computes `[self.x.max(rhs.x), self.y.max(rhs.y), ..]`. + fn max( + _self: Val<bevy::math::I64Vec4>, + rhs: Val<bevy::math::I64Vec4>, + ) -> Val<bevy::math::I64Vec4> { + let output: Val<bevy::math::I64Vec4> = bevy::math::I64Vec4::max( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Returns the horizontal maximum of `self`. + /// In other words this computes `max(x, y, ..)`. + fn max_element(_self: Val<bevy::math::I64Vec4>) -> i64 { + let output: i64 = bevy::math::I64Vec4::max_element(_self.into_inner()).into(); + output + } + /// Returns a vector containing the minimum values for each element of `self` and `rhs`. + /// In other words this computes `[self.x.min(rhs.x), self.y.min(rhs.y), ..]`. + fn min( + _self: Val<bevy::math::I64Vec4>, + rhs: Val<bevy::math::I64Vec4>, + ) -> Val<bevy::math::I64Vec4> { + let output: Val<bevy::math::I64Vec4> = bevy::math::I64Vec4::min( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Returns the horizontal minimum of `self`. + /// In other words this computes `min(x, y, ..)`. + fn min_element(_self: Val<bevy::math::I64Vec4>) -> i64 { + let output: i64 = bevy::math::I64Vec4::min_element(_self.into_inner()).into(); + output + } + /// Creates a new vector. + fn new(x: i64, y: i64, z: i64, w: i64) -> Val<bevy::math::I64Vec4> { + let output: Val<bevy::math::I64Vec4> = bevy::math::I64Vec4::new(x, y, z, w) + .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<bevy::math::I64Vec4>, + rhs: Val<bevy::math::I64Vec4>, + ) -> Val<bevy::math::I64Vec4> { + let output: Val<bevy::math::I64Vec4> = bevy::math::I64Vec4::rem_euclid( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Returns a vector containing the saturating addition of `self` and `rhs`. + /// In other words this computes `[self.x.saturating_add(rhs.x), self.y.saturating_add(rhs.y), ..]`. + fn saturating_add( + _self: Val<bevy::math::I64Vec4>, + rhs: Val<bevy::math::I64Vec4>, + ) -> Val<bevy::math::I64Vec4> { + let output: Val<bevy::math::I64Vec4> = bevy::math::I64Vec4::saturating_add( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// In other words this computes `[self.x.saturating_add_unsigned(rhs.x), self.y.saturating_add_unsigned(rhs.y), ..]`. + fn saturating_add_unsigned( + _self: Val<bevy::math::I64Vec4>, + rhs: Val<bevy::math::U64Vec4>, + ) -> Val<bevy::math::I64Vec4> { + let output: Val<bevy::math::I64Vec4> = bevy::math::I64Vec4::saturating_add_unsigned( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Returns a vector containing the saturating division of `self` and `rhs`. + /// In other words this computes `[self.x.saturating_div(rhs.x), self.y.saturating_div(rhs.y), ..]`. + fn saturating_div( + _self: Val<bevy::math::I64Vec4>, + rhs: Val<bevy::math::I64Vec4>, + ) -> Val<bevy::math::I64Vec4> { + let output: Val<bevy::math::I64Vec4> = bevy::math::I64Vec4::saturating_div( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Returns a vector containing the saturating multiplication of `self` and `rhs`. + /// In other words this computes `[self.x.saturating_mul(rhs.x), self.y.saturating_mul(rhs.y), ..]`. + fn saturating_mul( + _self: Val<bevy::math::I64Vec4>, + rhs: Val<bevy::math::I64Vec4>, + ) -> Val<bevy::math::I64Vec4> { + let output: Val<bevy::math::I64Vec4> = bevy::math::I64Vec4::saturating_mul( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Returns a vector containing the saturating subtraction of `self` and `rhs`. + /// In other words this computes `[self.x.saturating_sub(rhs.x), self.y.saturating_sub(rhs.y), ..]`. + fn saturating_sub( + _self: Val<bevy::math::I64Vec4>, + rhs: Val<bevy::math::I64Vec4>, + ) -> Val<bevy::math::I64Vec4> { + let output: Val<bevy::math::I64Vec4> = bevy::math::I64Vec4::saturating_sub( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Returns a vector containing the saturating subtraction of `self` and unsigned vector `rhs`. + /// In other words this computes `[self.x.saturating_sub_unsigned(rhs.x), self.y.saturating_sub_unsigned(rhs.y), ..]`. + fn saturating_sub_unsigned( + _self: Val<bevy::math::I64Vec4>, + rhs: Val<bevy::math::U64Vec4>, + ) -> Val<bevy::math::I64Vec4> { + let output: Val<bevy::math::I64Vec4> = bevy::math::I64Vec4::saturating_sub_unsigned( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Creates a vector from the elements in `if_true` and `if_false`, selecting which to use + /// for each element of `self`. + /// A true element in the mask uses the corresponding element from `if_true`, and false + /// uses the element from `if_false`. + fn select( + mask: Val<bevy::math::BVec4>, + if_true: Val<bevy::math::I64Vec4>, + if_false: Val<bevy::math::I64Vec4>, + ) -> Val<bevy::math::I64Vec4> { + let output: Val<bevy::math::I64Vec4> = bevy::math::I64Vec4::select( + mask.into_inner(), + if_true.into_inner(), + if_false.into_inner(), + ) + .into(); + output + } + /// Returns a vector with elements representing the sign of `self`. + /// - `0` if the number is zero + /// - `1` if the number is positive + /// - `-1` if the number is negative + fn signum(_self: Val<bevy::math::I64Vec4>) -> Val<bevy::math::I64Vec4> { + let output: Val<bevy::math::I64Vec4> = bevy::math::I64Vec4::signum( + _self.into_inner(), + ) + .into(); + output + } + /// Creates a vector with all elements set to `v`. + fn splat(v: i64) -> Val<bevy::math::I64Vec4> { + let output: Val<bevy::math::I64Vec4> = bevy::math::I64Vec4::splat(v).into(); + output + } + /// `[x, y, z, w]` + fn to_array(_self: Ref<bevy::math::I64Vec4>) -> [i64; 4] { + let output: [i64; 4] = bevy::math::I64Vec4::to_array(&_self).into(); + output + } + /// Creates a 3D vector from the `x`, `y` and `z` elements of `self`, discarding `w`. + /// Truncation to [`I64Vec3`] may also be performed by using [`self.xyz()`][crate::swizzles::Vec4Swizzles::xyz()]. + fn truncate(_self: Val<bevy::math::I64Vec4>) -> Val<bevy::math::I64Vec3> { + let output: Val<bevy::math::I64Vec3> = bevy::math::I64Vec4::truncate( + _self.into_inner(), + ) + .into(); + output + } + /// Creates a 4D vector from `self` with the given value of `w`. + fn with_w(_self: Val<bevy::math::I64Vec4>, w: i64) -> Val<bevy::math::I64Vec4> { + let output: Val<bevy::math::I64Vec4> = bevy::math::I64Vec4::with_w( + _self.into_inner(), + w, + ) + .into(); + output + } + /// Creates a 4D vector from `self` with the given value of `x`. + fn with_x(_self: Val<bevy::math::I64Vec4>, x: i64) -> Val<bevy::math::I64Vec4> { + let output: Val<bevy::math::I64Vec4> = bevy::math::I64Vec4::with_x( + _self.into_inner(), + x, + ) + .into(); + output + } + /// Creates a 4D vector from `self` with the given value of `y`. + fn with_y(_self: Val<bevy::math::I64Vec4>, y: i64) -> Val<bevy::math::I64Vec4> { + let output: Val<bevy::math::I64Vec4> = bevy::math::I64Vec4::with_y( + _self.into_inner(), + y, + ) + .into(); + output + } + /// Creates a 4D vector from `self` with the given value of `z`. + fn with_z(_self: Val<bevy::math::I64Vec4>, z: i64) -> Val<bevy::math::I64Vec4> { + let output: Val<bevy::math::I64Vec4> = bevy::math::I64Vec4::with_z( + _self.into_inner(), + z, + ) + .into(); + output + } + /// Returns a vector containing the wrapping addition of `self` and `rhs`. + /// In other words this computes `[self.x.wrapping_add(rhs.x), self.y.wrapping_add(rhs.y), ..]`. + fn wrapping_add( + _self: Val<bevy::math::I64Vec4>, + rhs: Val<bevy::math::I64Vec4>, + ) -> Val<bevy::math::I64Vec4> { + let output: Val<bevy::math::I64Vec4> = bevy::math::I64Vec4::wrapping_add( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Returns a vector containing the wrapping addition of `self` and unsigned vector `rhs`. + /// In other words this computes `[self.x.wrapping_add_unsigned(rhs.x), self.y.wrapping_add_unsigned(rhs.y), ..]`. + fn wrapping_add_unsigned( + _self: Val<bevy::math::I64Vec4>, + rhs: Val<bevy::math::U64Vec4>, + ) -> Val<bevy::math::I64Vec4> { + let output: Val<bevy::math::I64Vec4> = bevy::math::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<bevy::math::I64Vec4>, + rhs: Val<bevy::math::I64Vec4>, + ) -> Val<bevy::math::I64Vec4> { + let output: Val<bevy::math::I64Vec4> = bevy::math::I64Vec4::wrapping_div( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Returns a vector containing the wrapping multiplication of `self` and `rhs`. + /// In other words this computes `[self.x.wrapping_mul(rhs.x), self.y.wrapping_mul(rhs.y), ..]`. + fn wrapping_mul( + _self: Val<bevy::math::I64Vec4>, + rhs: Val<bevy::math::I64Vec4>, + ) -> Val<bevy::math::I64Vec4> { + let output: Val<bevy::math::I64Vec4> = bevy::math::I64Vec4::wrapping_mul( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Returns a vector containing the wrapping subtraction of `self` and `rhs`. + /// In other words this computes `[self.x.wrapping_sub(rhs.x), self.y.wrapping_sub(rhs.y), ..]`. + fn wrapping_sub( + _self: Val<bevy::math::I64Vec4>, + rhs: Val<bevy::math::I64Vec4>, + ) -> Val<bevy::math::I64Vec4> { + let output: Val<bevy::math::I64Vec4> = bevy::math::I64Vec4::wrapping_sub( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Returns a vector containing the wrapping subtraction of `self` and unsigned vector `rhs`. + /// In other words this computes `[self.x.wrapping_sub_unsigned(rhs.x), self.y.wrapping_sub_unsigned(rhs.y), ..]`. + fn wrapping_sub_unsigned( + _self: Val<bevy::math::I64Vec4>, + rhs: Val<bevy::math::U64Vec4>, + ) -> Val<bevy::math::I64Vec4> { + let output: Val<bevy::math::I64Vec4> = bevy::math::I64Vec4::wrapping_sub_unsigned( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } +} +#[script_bindings( + remote, + name = "u_vec_2_functions", + bms_core_path = "bevy_mod_scripting_core", + generated +)] +impl bevy::math::UVec2 { + /// Casts all elements of `self` to `f64`. + fn as_dvec2(_self: Ref<bevy::math::UVec2>) -> Val<bevy::math::DVec2> { + let output: Val<bevy::math::DVec2> = bevy::math::UVec2::as_dvec2(&_self).into(); + output + } + /// Casts all elements of `self` to `i16`. + fn as_i16vec2(_self: Ref<bevy::math::UVec2>) -> Val<bevy::math::I16Vec2> { + let output: Val<bevy::math::I16Vec2> = bevy::math::UVec2::as_i16vec2(&_self) + .into(); + output + } + /// Casts all elements of `self` to `i64`. + fn as_i64vec2(_self: Ref<bevy::math::UVec2>) -> Val<bevy::math::I64Vec2> { + let output: Val<bevy::math::I64Vec2> = bevy::math::UVec2::as_i64vec2(&_self) + .into(); + output + } + /// Casts all elements of `self` to `i8`. + fn as_i8vec2(_self: Ref<bevy::math::UVec2>) -> Val<bevy::math::I8Vec2> { + let output: Val<bevy::math::I8Vec2> = bevy::math::UVec2::as_i8vec2(&_self) + .into(); + output + } + /// Casts all elements of `self` to `i32`. + fn as_ivec2(_self: Ref<bevy::math::UVec2>) -> Val<bevy::math::IVec2> { + let output: Val<bevy::math::IVec2> = bevy::math::UVec2::as_ivec2(&_self).into(); + output + } + /// Casts all elements of `self` to `u16`. + fn as_u16vec2(_self: Ref<bevy::math::UVec2>) -> Val<bevy::math::U16Vec2> { + let output: Val<bevy::math::U16Vec2> = bevy::math::UVec2::as_u16vec2(&_self) + .into(); + output + } + /// Casts all elements of `self` to `u64`. + fn as_u64vec2(_self: Ref<bevy::math::UVec2>) -> Val<bevy::math::U64Vec2> { + let output: Val<bevy::math::U64Vec2> = bevy::math::UVec2::as_u64vec2(&_self) + .into(); + output + } + /// Casts all elements of `self` to `u8`. + fn as_u8vec2(_self: Ref<bevy::math::UVec2>) -> Val<bevy::math::U8Vec2> { + let output: Val<bevy::math::U8Vec2> = bevy::math::UVec2::as_u8vec2(&_self) + .into(); + output + } + /// Casts all elements of `self` to `f32`. + fn as_vec2(_self: Ref<bevy::math::UVec2>) -> Val<bevy::math::Vec2> { + let output: Val<bevy::math::Vec2> = bevy::math::UVec2::as_vec2(&_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<bevy::math::UVec2>, + min: Val<bevy::math::UVec2>, + max: Val<bevy::math::UVec2>, + ) -> Val<bevy::math::UVec2> { + let output: Val<bevy::math::UVec2> = bevy::math::UVec2::clamp( + _self.into_inner(), + min.into_inner(), + max.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 cmpeq( + _self: Val<bevy::math::UVec2>, + rhs: Val<bevy::math::UVec2>, + ) -> Val<bevy::math::BVec2> { + let output: Val<bevy::math::BVec2> = bevy::math::UVec2::cmpeq( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Returns a vector mask containing the result of a `>=` comparison for each element of + /// `self` and `rhs`. + /// In other words this computes `[self.x >= rhs.x, self.y >= rhs.y, ..]` for all + /// elements. + fn cmpge( + _self: Val<bevy::math::UVec2>, + rhs: Val<bevy::math::UVec2>, + ) -> Val<bevy::math::BVec2> { + let output: Val<bevy::math::BVec2> = bevy::math::UVec2::cmpge( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Returns a vector mask containing the result of a `>` comparison for each element of + /// `self` and `rhs`. + /// In other words this computes `[self.x > rhs.x, self.y > rhs.y, ..]` for all + /// elements. + fn cmpgt( + _self: Val<bevy::math::UVec2>, + rhs: Val<bevy::math::UVec2>, + ) -> Val<bevy::math::BVec2> { + let output: Val<bevy::math::BVec2> = bevy::math::UVec2::cmpgt( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Returns a vector mask containing the result of a `<=` comparison for each element of + /// `self` and `rhs`. + /// In other words this computes `[self.x <= rhs.x, self.y <= rhs.y, ..]` for all + /// elements. + fn cmple( + _self: Val<bevy::math::UVec2>, + rhs: Val<bevy::math::UVec2>, + ) -> Val<bevy::math::BVec2> { + let output: Val<bevy::math::BVec2> = bevy::math::UVec2::cmple( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Returns a vector mask containing the result of a `<` comparison for each element of + /// `self` and `rhs`. + /// In other words this computes `[self.x < rhs.x, self.y < rhs.y, ..]` for all + /// elements. + fn cmplt( + _self: Val<bevy::math::UVec2>, + rhs: Val<bevy::math::UVec2>, + ) -> Val<bevy::math::BVec2> { + let output: Val<bevy::math::BVec2> = bevy::math::UVec2::cmplt( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Returns a vector mask containing the result of a `!=` comparison for each element of + /// `self` and `rhs`. + /// In other words this computes `[self.x != rhs.x, self.y != rhs.y, ..]` for all + /// elements. + fn cmpne( + _self: Val<bevy::math::UVec2>, + rhs: Val<bevy::math::UVec2>, + ) -> Val<bevy::math::BVec2> { + let output: Val<bevy::math::BVec2> = bevy::math::UVec2::cmpne( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Computes the dot product of `self` and `rhs`. + fn dot(_self: Val<bevy::math::UVec2>, rhs: Val<bevy::math::UVec2>) -> u32 { + let output: u32 = bevy::math::UVec2::dot(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + /// Returns a vector where every component is the dot product of `self` and `rhs`. + fn dot_into_vec( + _self: Val<bevy::math::UVec2>, + rhs: Val<bevy::math::UVec2>, + ) -> Val<bevy::math::UVec2> { + let output: Val<bevy::math::UVec2> = bevy::math::UVec2::dot_into_vec( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Returns the product of all elements of `self`. + /// In other words, this computes `self.x * self.y * ..`. + fn element_product(_self: Val<bevy::math::UVec2>) -> u32 { + let output: u32 = bevy::math::UVec2::element_product(_self.into_inner()).into(); + output + } + /// Returns the sum of all elements of `self`. + /// In other words, this computes `self.x + self.y + ..`. + fn element_sum(_self: Val<bevy::math::UVec2>) -> u32 { + let output: u32 = bevy::math::UVec2::element_sum(_self.into_inner()).into(); + output + } + /// Creates a 3D vector from `self` and the given `z` value. + fn extend(_self: Val<bevy::math::UVec2>, z: u32) -> Val<bevy::math::UVec3> { + let output: Val<bevy::math::UVec3> = bevy::math::UVec2::extend( + _self.into_inner(), + z, + ) + .into(); + output + } + /// Creates a new vector from an array. + fn from_array(a: [u32; 2]) -> Val<bevy::math::UVec2> { + let output: Val<bevy::math::UVec2> = bevy::math::UVec2::from_array(a).into(); + output + } + /// Computes the squared length of `self`. + fn length_squared(_self: Val<bevy::math::UVec2>) -> u32 { + let output: u32 = bevy::math::UVec2::length_squared(_self.into_inner()).into(); + output + } + /// Returns a vector containing the maximum values for each element of `self` and `rhs`. + /// In other words this computes `[self.x.max(rhs.x), self.y.max(rhs.y), ..]`. + fn max( + _self: Val<bevy::math::UVec2>, + rhs: Val<bevy::math::UVec2>, + ) -> Val<bevy::math::UVec2> { + let output: Val<bevy::math::UVec2> = bevy::math::UVec2::max( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Returns the horizontal maximum of `self`. + /// In other words this computes `max(x, y, ..)`. + fn max_element(_self: Val<bevy::math::UVec2>) -> u32 { + let output: u32 = bevy::math::UVec2::max_element(_self.into_inner()).into(); + output + } + /// Returns a vector containing the minimum values for each element of `self` and `rhs`. + /// In other words this computes `[self.x.min(rhs.x), self.y.min(rhs.y), ..]`. + fn min( + _self: Val<bevy::math::UVec2>, + rhs: Val<bevy::math::UVec2>, + ) -> Val<bevy::math::UVec2> { + let output: Val<bevy::math::UVec2> = bevy::math::UVec2::min( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Returns the horizontal minimum of `self`. + /// In other words this computes `min(x, y, ..)`. + fn min_element(_self: Val<bevy::math::UVec2>) -> u32 { + let output: u32 = bevy::math::UVec2::min_element(_self.into_inner()).into(); + output + } + /// Creates a new vector. + fn new(x: u32, y: u32) -> Val<bevy::math::UVec2> { + let output: Val<bevy::math::UVec2> = bevy::math::UVec2::new(x, y).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<bevy::math::UVec2>, + rhs: Val<bevy::math::UVec2>, + ) -> Val<bevy::math::UVec2> { + let output: Val<bevy::math::UVec2> = bevy::math::UVec2::saturating_add( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Returns a vector containing the saturating addition of `self` and signed vector `rhs`. + /// In other words this computes `[self.x.saturating_add_signed(rhs.x), self.y.saturating_add_signed(rhs.y), ..]`. + fn saturating_add_signed( + _self: Val<bevy::math::UVec2>, + rhs: Val<bevy::math::IVec2>, + ) -> Val<bevy::math::UVec2> { + let output: Val<bevy::math::UVec2> = bevy::math::UVec2::saturating_add_signed( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Returns a vector containing the saturating division of `self` and `rhs`. + /// In other words this computes `[self.x.saturating_div(rhs.x), self.y.saturating_div(rhs.y), ..]`. + fn saturating_div( + _self: Val<bevy::math::UVec2>, + rhs: Val<bevy::math::UVec2>, + ) -> Val<bevy::math::UVec2> { + let output: Val<bevy::math::UVec2> = bevy::math::UVec2::saturating_div( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Returns a vector containing the saturating multiplication of `self` and `rhs`. + /// In other words this computes `[self.x.saturating_mul(rhs.x), self.y.saturating_mul(rhs.y), ..]`. + fn saturating_mul( + _self: Val<bevy::math::UVec2>, + rhs: Val<bevy::math::UVec2>, + ) -> Val<bevy::math::UVec2> { + let output: Val<bevy::math::UVec2> = bevy::math::UVec2::saturating_mul( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Returns a vector containing the saturating subtraction of `self` and `rhs`. + /// In other words this computes `[self.x.saturating_sub(rhs.x), self.y.saturating_sub(rhs.y), ..]`. + fn saturating_sub( + _self: Val<bevy::math::UVec2>, + rhs: Val<bevy::math::UVec2>, + ) -> Val<bevy::math::UVec2> { + let output: Val<bevy::math::UVec2> = bevy::math::UVec2::saturating_sub( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Creates a vector from the elements in `if_true` and `if_false`, selecting which to use + /// for each element of `self`. + /// A true element in the mask uses the corresponding element from `if_true`, and false + /// uses the element from `if_false`. + fn select( + mask: Val<bevy::math::BVec2>, + if_true: Val<bevy::math::UVec2>, + if_false: Val<bevy::math::UVec2>, + ) -> Val<bevy::math::UVec2> { + let output: Val<bevy::math::UVec2> = bevy::math::UVec2::select( + mask.into_inner(), + if_true.into_inner(), + if_false.into_inner(), + ) + .into(); + output + } + /// Creates a vector with all elements set to `v`. + fn splat(v: u32) -> Val<bevy::math::UVec2> { + let output: Val<bevy::math::UVec2> = bevy::math::UVec2::splat(v).into(); + output + } + /// `[x, y]` + fn to_array(_self: Ref<bevy::math::UVec2>) -> [u32; 2] { + let output: [u32; 2] = bevy::math::UVec2::to_array(&_self).into(); + output + } + /// Creates a 2D vector from `self` with the given value of `x`. + fn with_x(_self: Val<bevy::math::UVec2>, x: u32) -> Val<bevy::math::UVec2> { + let output: Val<bevy::math::UVec2> = bevy::math::UVec2::with_x( + _self.into_inner(), + x, + ) + .into(); + output + } + /// Creates a 2D vector from `self` with the given value of `y`. + fn with_y(_self: Val<bevy::math::UVec2>, y: u32) -> Val<bevy::math::UVec2> { + let output: Val<bevy::math::UVec2> = bevy::math::UVec2::with_y( + _self.into_inner(), + y, + ) + .into(); + output + } + /// Returns a vector containing the wrapping addition of `self` and `rhs`. + /// In other words this computes `[self.x.wrapping_add(rhs.x), self.y.wrapping_add(rhs.y), ..]`. + fn wrapping_add( + _self: Val<bevy::math::UVec2>, + rhs: Val<bevy::math::UVec2>, + ) -> Val<bevy::math::UVec2> { + let output: Val<bevy::math::UVec2> = bevy::math::UVec2::wrapping_add( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Returns a vector containing the wrapping addition of `self` and signed vector `rhs`. + /// In other words this computes `[self.x.wrapping_add_signed(rhs.x), self.y.wrapping_add_signed(rhs.y), ..]`. + fn wrapping_add_signed( + _self: Val<bevy::math::UVec2>, + rhs: Val<bevy::math::IVec2>, + ) -> Val<bevy::math::UVec2> { + let output: Val<bevy::math::UVec2> = bevy::math::UVec2::wrapping_add_signed( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Returns a vector containing the wrapping division of `self` and `rhs`. + /// In other words this computes `[self.x.wrapping_div(rhs.x), self.y.wrapping_div(rhs.y), ..]`. + fn wrapping_div( + _self: Val<bevy::math::UVec2>, + rhs: Val<bevy::math::UVec2>, + ) -> Val<bevy::math::UVec2> { + let output: Val<bevy::math::UVec2> = bevy::math::UVec2::wrapping_div( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Returns a vector containing the wrapping multiplication of `self` and `rhs`. + /// In other words this computes `[self.x.wrapping_mul(rhs.x), self.y.wrapping_mul(rhs.y), ..]`. + fn wrapping_mul( + _self: Val<bevy::math::UVec2>, + rhs: Val<bevy::math::UVec2>, + ) -> Val<bevy::math::UVec2> { + let output: Val<bevy::math::UVec2> = bevy::math::UVec2::wrapping_mul( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Returns a vector containing the wrapping subtraction of `self` and `rhs`. + /// In other words this computes `[self.x.wrapping_sub(rhs.x), self.y.wrapping_sub(rhs.y), ..]`. + fn wrapping_sub( + _self: Val<bevy::math::UVec2>, + rhs: Val<bevy::math::UVec2>, + ) -> Val<bevy::math::UVec2> { + let output: Val<bevy::math::UVec2> = bevy::math::UVec2::wrapping_sub( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } +} +#[script_bindings( + remote, + name = "u_vec_3_functions", + bms_core_path = "bevy_mod_scripting_core", + generated +)] +impl bevy::math::UVec3 { + /// Casts all elements of `self` to `f64`. + fn as_dvec3(_self: Ref<bevy::math::UVec3>) -> Val<bevy::math::DVec3> { + let output: Val<bevy::math::DVec3> = bevy::math::UVec3::as_dvec3(&_self).into(); + output + } + /// Casts all elements of `self` to `i16`. + fn as_i16vec3(_self: Ref<bevy::math::UVec3>) -> Val<bevy::math::I16Vec3> { + let output: Val<bevy::math::I16Vec3> = bevy::math::UVec3::as_i16vec3(&_self) + .into(); + output + } + /// Casts all elements of `self` to `i64`. + fn as_i64vec3(_self: Ref<bevy::math::UVec3>) -> Val<bevy::math::I64Vec3> { + let output: Val<bevy::math::I64Vec3> = bevy::math::UVec3::as_i64vec3(&_self) + .into(); + output + } + /// Casts all elements of `self` to `i8`. + fn as_i8vec3(_self: Ref<bevy::math::UVec3>) -> Val<bevy::math::I8Vec3> { + let output: Val<bevy::math::I8Vec3> = bevy::math::UVec3::as_i8vec3(&_self) + .into(); + output + } + /// Casts all elements of `self` to `i32`. + fn as_ivec3(_self: Ref<bevy::math::UVec3>) -> Val<bevy::math::IVec3> { + let output: Val<bevy::math::IVec3> = bevy::math::UVec3::as_ivec3(&_self).into(); + output + } + /// Casts all elements of `self` to `u16`. + fn as_u16vec3(_self: Ref<bevy::math::UVec3>) -> Val<bevy::math::U16Vec3> { + let output: Val<bevy::math::U16Vec3> = bevy::math::UVec3::as_u16vec3(&_self) + .into(); + output + } + /// Casts all elements of `self` to `u64`. + fn as_u64vec3(_self: Ref<bevy::math::UVec3>) -> Val<bevy::math::U64Vec3> { + let output: Val<bevy::math::U64Vec3> = bevy::math::UVec3::as_u64vec3(&_self) + .into(); + output + } + /// Casts all elements of `self` to `u8`. + fn as_u8vec3(_self: Ref<bevy::math::UVec3>) -> Val<bevy::math::U8Vec3> { + let output: Val<bevy::math::U8Vec3> = bevy::math::UVec3::as_u8vec3(&_self) + .into(); + output + } + /// Casts all elements of `self` to `f32`. + fn as_vec3(_self: Ref<bevy::math::UVec3>) -> Val<bevy::math::Vec3> { + let output: Val<bevy::math::Vec3> = bevy::math::UVec3::as_vec3(&_self).into(); + output + } + /// Casts all elements of `self` to `f32`. + fn as_vec3a(_self: Ref<bevy::math::UVec3>) -> Val<bevy::math::Vec3A> { + let output: Val<bevy::math::Vec3A> = bevy::math::UVec3::as_vec3a(&_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<bevy::math::UVec3>, + min: Val<bevy::math::UVec3>, + max: Val<bevy::math::UVec3>, + ) -> Val<bevy::math::UVec3> { + let output: Val<bevy::math::UVec3> = bevy::math::UVec3::clamp( + _self.into_inner(), + min.into_inner(), + max.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 cmpeq( + _self: Val<bevy::math::UVec3>, + rhs: Val<bevy::math::UVec3>, + ) -> Val<bevy::math::BVec3> { + let output: Val<bevy::math::BVec3> = bevy::math::UVec3::cmpeq( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Returns a vector mask containing the result of a `>=` comparison for each element of + /// `self` and `rhs`. + /// In other words this computes `[self.x >= rhs.x, self.y >= rhs.y, ..]` for all + /// elements. + fn cmpge( + _self: Val<bevy::math::UVec3>, + rhs: Val<bevy::math::UVec3>, + ) -> Val<bevy::math::BVec3> { + let output: Val<bevy::math::BVec3> = bevy::math::UVec3::cmpge( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Returns a vector mask containing the result of a `>` comparison for each element of + /// `self` and `rhs`. + /// In other words this computes `[self.x > rhs.x, self.y > rhs.y, ..]` for all + /// elements. + fn cmpgt( + _self: Val<bevy::math::UVec3>, + rhs: Val<bevy::math::UVec3>, + ) -> Val<bevy::math::BVec3> { + let output: Val<bevy::math::BVec3> = bevy::math::UVec3::cmpgt( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Returns a vector mask containing the result of a `<=` comparison for each element of + /// `self` and `rhs`. + /// In other words this computes `[self.x <= rhs.x, self.y <= rhs.y, ..]` for all + /// elements. + fn cmple( + _self: Val<bevy::math::UVec3>, + rhs: Val<bevy::math::UVec3>, + ) -> Val<bevy::math::BVec3> { + let output: Val<bevy::math::BVec3> = bevy::math::UVec3::cmple( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Returns a vector mask containing the result of a `<` comparison for each element of + /// `self` and `rhs`. + /// In other words this computes `[self.x < rhs.x, self.y < rhs.y, ..]` for all + /// elements. + fn cmplt( + _self: Val<bevy::math::UVec3>, + rhs: Val<bevy::math::UVec3>, + ) -> Val<bevy::math::BVec3> { + let output: Val<bevy::math::BVec3> = bevy::math::UVec3::cmplt( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Returns a vector mask containing the result of a `!=` comparison for each element of + /// `self` and `rhs`. + /// In other words this computes `[self.x != rhs.x, self.y != rhs.y, ..]` for all + /// elements. + fn cmpne( + _self: Val<bevy::math::UVec3>, + rhs: Val<bevy::math::UVec3>, + ) -> Val<bevy::math::BVec3> { + let output: Val<bevy::math::BVec3> = bevy::math::UVec3::cmpne( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Computes the cross product of `self` and `rhs`. + fn cross( + _self: Val<bevy::math::UVec3>, + rhs: Val<bevy::math::UVec3>, + ) -> Val<bevy::math::UVec3> { + let output: Val<bevy::math::UVec3> = bevy::math::UVec3::cross( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Computes the dot product of `self` and `rhs`. + fn dot(_self: Val<bevy::math::UVec3>, rhs: Val<bevy::math::UVec3>) -> u32 { + let output: u32 = bevy::math::UVec3::dot(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + /// Returns a vector where every component is the dot product of `self` and `rhs`. + fn dot_into_vec( + _self: Val<bevy::math::UVec3>, + rhs: Val<bevy::math::UVec3>, + ) -> Val<bevy::math::UVec3> { + let output: Val<bevy::math::UVec3> = bevy::math::UVec3::dot_into_vec( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Returns the product of all elements of `self`. + /// In other words, this computes `self.x * self.y * ..`. + fn element_product(_self: Val<bevy::math::UVec3>) -> u32 { + let output: u32 = bevy::math::UVec3::element_product(_self.into_inner()).into(); + output + } + /// Returns the sum of all elements of `self`. + /// In other words, this computes `self.x + self.y + ..`. + fn element_sum(_self: Val<bevy::math::UVec3>) -> u32 { + let output: u32 = bevy::math::UVec3::element_sum(_self.into_inner()).into(); + output + } + /// Creates a 4D vector from `self` and the given `w` value. + fn extend(_self: Val<bevy::math::UVec3>, w: u32) -> Val<bevy::math::UVec4> { + let output: Val<bevy::math::UVec4> = bevy::math::UVec3::extend( + _self.into_inner(), + w, + ) + .into(); + output + } + /// Creates a new vector from an array. + fn from_array(a: [u32; 3]) -> Val<bevy::math::UVec3> { + let output: Val<bevy::math::UVec3> = bevy::math::UVec3::from_array(a).into(); + output + } + /// Computes the squared length of `self`. + fn length_squared(_self: Val<bevy::math::UVec3>) -> u32 { + let output: u32 = bevy::math::UVec3::length_squared(_self.into_inner()).into(); + output + } + /// Returns a vector containing the maximum values for each element of `self` and `rhs`. + /// In other words this computes `[self.x.max(rhs.x), self.y.max(rhs.y), ..]`. + fn max( + _self: Val<bevy::math::UVec3>, + rhs: Val<bevy::math::UVec3>, + ) -> Val<bevy::math::UVec3> { + let output: Val<bevy::math::UVec3> = bevy::math::UVec3::max( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Returns the horizontal maximum of `self`. + /// In other words this computes `max(x, y, ..)`. + fn max_element(_self: Val<bevy::math::UVec3>) -> u32 { + let output: u32 = bevy::math::UVec3::max_element(_self.into_inner()).into(); + output + } + /// Returns a vector containing the minimum values for each element of `self` and `rhs`. + /// In other words this computes `[self.x.min(rhs.x), self.y.min(rhs.y), ..]`. + fn min( + _self: Val<bevy::math::UVec3>, + rhs: Val<bevy::math::UVec3>, + ) -> Val<bevy::math::UVec3> { + let output: Val<bevy::math::UVec3> = bevy::math::UVec3::min( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Returns the horizontal minimum of `self`. + /// In other words this computes `min(x, y, ..)`. + fn min_element(_self: Val<bevy::math::UVec3>) -> u32 { + let output: u32 = bevy::math::UVec3::min_element(_self.into_inner()).into(); + output + } + /// Creates a new vector. + fn new(x: u32, y: u32, z: u32) -> Val<bevy::math::UVec3> { + let output: Val<bevy::math::UVec3> = bevy::math::UVec3::new(x, y, z).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<bevy::math::UVec3>, + rhs: Val<bevy::math::UVec3>, + ) -> Val<bevy::math::UVec3> { + let output: Val<bevy::math::UVec3> = bevy::math::UVec3::saturating_add( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Returns a vector containing the saturating addition of `self` and signed vector `rhs`. + /// In other words this computes `[self.x.saturating_add_signed(rhs.x), self.y.saturating_add_signed(rhs.y), ..]`. + fn saturating_add_signed( + _self: Val<bevy::math::UVec3>, + rhs: Val<bevy::math::IVec3>, + ) -> Val<bevy::math::UVec3> { + let output: Val<bevy::math::UVec3> = bevy::math::UVec3::saturating_add_signed( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Returns a vector containing the saturating division of `self` and `rhs`. + /// In other words this computes `[self.x.saturating_div(rhs.x), self.y.saturating_div(rhs.y), ..]`. + fn saturating_div( + _self: Val<bevy::math::UVec3>, + rhs: Val<bevy::math::UVec3>, + ) -> Val<bevy::math::UVec3> { + let output: Val<bevy::math::UVec3> = bevy::math::UVec3::saturating_div( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Returns a vector containing the saturating multiplication of `self` and `rhs`. + /// In other words this computes `[self.x.saturating_mul(rhs.x), self.y.saturating_mul(rhs.y), ..]`. + fn saturating_mul( + _self: Val<bevy::math::UVec3>, + rhs: Val<bevy::math::UVec3>, + ) -> Val<bevy::math::UVec3> { + let output: Val<bevy::math::UVec3> = bevy::math::UVec3::saturating_mul( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Returns a vector containing the saturating subtraction of `self` and `rhs`. + /// In other words this computes `[self.x.saturating_sub(rhs.x), self.y.saturating_sub(rhs.y), ..]`. + fn saturating_sub( + _self: Val<bevy::math::UVec3>, + rhs: Val<bevy::math::UVec3>, + ) -> Val<bevy::math::UVec3> { + let output: Val<bevy::math::UVec3> = bevy::math::UVec3::saturating_sub( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Creates a vector from the elements in `if_true` and `if_false`, selecting which to use + /// for each element of `self`. + /// A true element in the mask uses the corresponding element from `if_true`, and false + /// uses the element from `if_false`. + fn select( + mask: Val<bevy::math::BVec3>, + if_true: Val<bevy::math::UVec3>, + if_false: Val<bevy::math::UVec3>, + ) -> Val<bevy::math::UVec3> { + let output: Val<bevy::math::UVec3> = bevy::math::UVec3::select( + mask.into_inner(), + if_true.into_inner(), + if_false.into_inner(), + ) + .into(); + output + } + /// Creates a vector with all elements set to `v`. + fn splat(v: u32) -> Val<bevy::math::UVec3> { + let output: Val<bevy::math::UVec3> = bevy::math::UVec3::splat(v).into(); + output + } + /// `[x, y, z]` + fn to_array(_self: Ref<bevy::math::UVec3>) -> [u32; 3] { + let output: [u32; 3] = bevy::math::UVec3::to_array(&_self).into(); + output + } + /// Creates a 2D vector from the `x` and `y` elements of `self`, discarding `z`. + /// Truncation may also be performed by using [`self.xy()`][crate::swizzles::Vec3Swizzles::xy()]. + fn truncate(_self: Val<bevy::math::UVec3>) -> Val<bevy::math::UVec2> { + let output: Val<bevy::math::UVec2> = bevy::math::UVec3::truncate( + _self.into_inner(), + ) + .into(); + output + } + /// Creates a 3D vector from `self` with the given value of `x`. + fn with_x(_self: Val<bevy::math::UVec3>, x: u32) -> Val<bevy::math::UVec3> { + let output: Val<bevy::math::UVec3> = bevy::math::UVec3::with_x( + _self.into_inner(), + x, + ) + .into(); + output + } + /// Creates a 3D vector from `self` with the given value of `y`. + fn with_y(_self: Val<bevy::math::UVec3>, y: u32) -> Val<bevy::math::UVec3> { + let output: Val<bevy::math::UVec3> = bevy::math::UVec3::with_y( + _self.into_inner(), + y, + ) + .into(); + output + } + /// Creates a 3D vector from `self` with the given value of `z`. + fn with_z(_self: Val<bevy::math::UVec3>, z: u32) -> Val<bevy::math::UVec3> { + let output: Val<bevy::math::UVec3> = bevy::math::UVec3::with_z( + _self.into_inner(), + z, + ) + .into(); + output + } + /// Returns a vector containing the wrapping addition of `self` and `rhs`. + /// In other words this computes `[self.x.wrapping_add(rhs.x), self.y.wrapping_add(rhs.y), ..]`. + fn wrapping_add( + _self: Val<bevy::math::UVec3>, + rhs: Val<bevy::math::UVec3>, + ) -> Val<bevy::math::UVec3> { + let output: Val<bevy::math::UVec3> = bevy::math::UVec3::wrapping_add( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Returns a vector containing the wrapping addition of `self` and signed vector `rhs`. + /// In other words this computes `[self.x.wrapping_add_signed(rhs.x), self.y.wrapping_add_signed(rhs.y), ..]`. + fn wrapping_add_signed( + _self: Val<bevy::math::UVec3>, + rhs: Val<bevy::math::IVec3>, + ) -> Val<bevy::math::UVec3> { + let output: Val<bevy::math::UVec3> = bevy::math::UVec3::wrapping_add_signed( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Returns a vector containing the wrapping division of `self` and `rhs`. + /// In other words this computes `[self.x.wrapping_div(rhs.x), self.y.wrapping_div(rhs.y), ..]`. + fn wrapping_div( + _self: Val<bevy::math::UVec3>, + rhs: Val<bevy::math::UVec3>, + ) -> Val<bevy::math::UVec3> { + let output: Val<bevy::math::UVec3> = bevy::math::UVec3::wrapping_div( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Returns a vector containing the wrapping multiplication of `self` and `rhs`. + /// In other words this computes `[self.x.wrapping_mul(rhs.x), self.y.wrapping_mul(rhs.y), ..]`. + fn wrapping_mul( + _self: Val<bevy::math::UVec3>, + rhs: Val<bevy::math::UVec3>, + ) -> Val<bevy::math::UVec3> { + let output: Val<bevy::math::UVec3> = bevy::math::UVec3::wrapping_mul( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Returns a vector containing the wrapping subtraction of `self` and `rhs`. + /// In other words this computes `[self.x.wrapping_sub(rhs.x), self.y.wrapping_sub(rhs.y), ..]`. + fn wrapping_sub( + _self: Val<bevy::math::UVec3>, + rhs: Val<bevy::math::UVec3>, + ) -> Val<bevy::math::UVec3> { + let output: Val<bevy::math::UVec3> = bevy::math::UVec3::wrapping_sub( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } +} +#[script_bindings( + remote, + name = "u_vec_4_functions", + bms_core_path = "bevy_mod_scripting_core", + generated +)] +impl bevy::math::UVec4 { + /// Casts all elements of `self` to `f64`. + fn as_dvec4(_self: Ref<bevy::math::UVec4>) -> Val<bevy::math::DVec4> { + let output: Val<bevy::math::DVec4> = bevy::math::UVec4::as_dvec4(&_self).into(); + output + } + /// Casts all elements of `self` to `i16`. + fn as_i16vec4(_self: Ref<bevy::math::UVec4>) -> Val<bevy::math::I16Vec4> { + let output: Val<bevy::math::I16Vec4> = bevy::math::UVec4::as_i16vec4(&_self) + .into(); + output + } + /// Casts all elements of `self` to `i64`. + fn as_i64vec4(_self: Ref<bevy::math::UVec4>) -> Val<bevy::math::I64Vec4> { + let output: Val<bevy::math::I64Vec4> = bevy::math::UVec4::as_i64vec4(&_self) + .into(); + output + } + /// Casts all elements of `self` to `i8`. + fn as_i8vec4(_self: Ref<bevy::math::UVec4>) -> Val<bevy::math::I8Vec4> { + let output: Val<bevy::math::I8Vec4> = bevy::math::UVec4::as_i8vec4(&_self) + .into(); + output + } + /// Casts all elements of `self` to `i32`. + fn as_ivec4(_self: Ref<bevy::math::UVec4>) -> Val<bevy::math::IVec4> { + let output: Val<bevy::math::IVec4> = bevy::math::UVec4::as_ivec4(&_self).into(); + output + } + /// Casts all elements of `self` to `u16`. + fn as_u16vec4(_self: Ref<bevy::math::UVec4>) -> Val<bevy::math::U16Vec4> { + let output: Val<bevy::math::U16Vec4> = bevy::math::UVec4::as_u16vec4(&_self) + .into(); + output + } + /// Casts all elements of `self` to `u64`. + fn as_u64vec4(_self: Ref<bevy::math::UVec4>) -> Val<bevy::math::U64Vec4> { + let output: Val<bevy::math::U64Vec4> = bevy::math::UVec4::as_u64vec4(&_self) + .into(); + output + } + /// Casts all elements of `self` to `u8`. + fn as_u8vec4(_self: Ref<bevy::math::UVec4>) -> Val<bevy::math::U8Vec4> { + let output: Val<bevy::math::U8Vec4> = bevy::math::UVec4::as_u8vec4(&_self) + .into(); + output + } + /// Casts all elements of `self` to `f32`. + fn as_vec4(_self: Ref<bevy::math::UVec4>) -> Val<bevy::math::Vec4> { + let output: Val<bevy::math::Vec4> = bevy::math::UVec4::as_vec4(&_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<bevy::math::UVec4>, + min: Val<bevy::math::UVec4>, + max: Val<bevy::math::UVec4>, + ) -> Val<bevy::math::UVec4> { + let output: Val<bevy::math::UVec4> = bevy::math::UVec4::clamp( + _self.into_inner(), + min.into_inner(), + max.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 cmpeq( + _self: Val<bevy::math::UVec4>, + rhs: Val<bevy::math::UVec4>, + ) -> Val<bevy::math::BVec4> { + let output: Val<bevy::math::BVec4> = bevy::math::UVec4::cmpeq( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Returns a vector mask containing the result of a `>=` comparison for each element of + /// `self` and `rhs`. + /// In other words this computes `[self.x >= rhs.x, self.y >= rhs.y, ..]` for all + /// elements. + fn cmpge( + _self: Val<bevy::math::UVec4>, + rhs: Val<bevy::math::UVec4>, + ) -> Val<bevy::math::BVec4> { + let output: Val<bevy::math::BVec4> = bevy::math::UVec4::cmpge( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Returns a vector mask containing the result of a `>` comparison for each element of + /// `self` and `rhs`. + /// In other words this computes `[self.x > rhs.x, self.y > rhs.y, ..]` for all + /// elements. + fn cmpgt( + _self: Val<bevy::math::UVec4>, + rhs: Val<bevy::math::UVec4>, + ) -> Val<bevy::math::BVec4> { + let output: Val<bevy::math::BVec4> = bevy::math::UVec4::cmpgt( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Returns a vector mask containing the result of a `<=` comparison for each element of + /// `self` and `rhs`. + /// In other words this computes `[self.x <= rhs.x, self.y <= rhs.y, ..]` for all + /// elements. + fn cmple( + _self: Val<bevy::math::UVec4>, + rhs: Val<bevy::math::UVec4>, + ) -> Val<bevy::math::BVec4> { + let output: Val<bevy::math::BVec4> = bevy::math::UVec4::cmple( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Returns a vector mask containing the result of a `<` comparison for each element of + /// `self` and `rhs`. + /// In other words this computes `[self.x < rhs.x, self.y < rhs.y, ..]` for all + /// elements. + fn cmplt( + _self: Val<bevy::math::UVec4>, + rhs: Val<bevy::math::UVec4>, + ) -> Val<bevy::math::BVec4> { + let output: Val<bevy::math::BVec4> = bevy::math::UVec4::cmplt( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Returns a vector mask containing the result of a `!=` comparison for each element of + /// `self` and `rhs`. + /// In other words this computes `[self.x != rhs.x, self.y != rhs.y, ..]` for all + /// elements. + fn cmpne( + _self: Val<bevy::math::UVec4>, + rhs: Val<bevy::math::UVec4>, + ) -> Val<bevy::math::BVec4> { + let output: Val<bevy::math::BVec4> = bevy::math::UVec4::cmpne( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Computes the dot product of `self` and `rhs`. + fn dot(_self: Val<bevy::math::UVec4>, rhs: Val<bevy::math::UVec4>) -> u32 { + let output: u32 = bevy::math::UVec4::dot(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + /// Returns a vector where every component is the dot product of `self` and `rhs`. + fn dot_into_vec( + _self: Val<bevy::math::UVec4>, + rhs: Val<bevy::math::UVec4>, + ) -> Val<bevy::math::UVec4> { + let output: Val<bevy::math::UVec4> = bevy::math::UVec4::dot_into_vec( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Returns the product of all elements of `self`. + /// In other words, this computes `self.x * self.y * ..`. + fn element_product(_self: Val<bevy::math::UVec4>) -> u32 { + let output: u32 = bevy::math::UVec4::element_product(_self.into_inner()).into(); + output + } + /// Returns the sum of all elements of `self`. + /// In other words, this computes `self.x + self.y + ..`. + fn element_sum(_self: Val<bevy::math::UVec4>) -> u32 { + let output: u32 = bevy::math::UVec4::element_sum(_self.into_inner()).into(); + output + } + /// Creates a new vector from an array. + fn from_array(a: [u32; 4]) -> Val<bevy::math::UVec4> { + let output: Val<bevy::math::UVec4> = bevy::math::UVec4::from_array(a).into(); + output + } + /// Computes the squared length of `self`. + fn length_squared(_self: Val<bevy::math::UVec4>) -> u32 { + let output: u32 = bevy::math::UVec4::length_squared(_self.into_inner()).into(); + output + } + /// Returns a vector containing the maximum values for each element of `self` and `rhs`. + /// In other words this computes `[self.x.max(rhs.x), self.y.max(rhs.y), ..]`. + fn max( + _self: Val<bevy::math::UVec4>, + rhs: Val<bevy::math::UVec4>, + ) -> Val<bevy::math::UVec4> { + let output: Val<bevy::math::UVec4> = bevy::math::UVec4::max( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Returns the horizontal maximum of `self`. + /// In other words this computes `max(x, y, ..)`. + fn max_element(_self: Val<bevy::math::UVec4>) -> u32 { + let output: u32 = bevy::math::UVec4::max_element(_self.into_inner()).into(); + output + } + /// Returns a vector containing the minimum values for each element of `self` and `rhs`. + /// In other words this computes `[self.x.min(rhs.x), self.y.min(rhs.y), ..]`. + fn min( + _self: Val<bevy::math::UVec4>, + rhs: Val<bevy::math::UVec4>, + ) -> Val<bevy::math::UVec4> { + let output: Val<bevy::math::UVec4> = bevy::math::UVec4::min( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Returns the horizontal minimum of `self`. + /// In other words this computes `min(x, y, ..)`. + fn min_element(_self: Val<bevy::math::UVec4>) -> u32 { + let output: u32 = bevy::math::UVec4::min_element(_self.into_inner()).into(); + output + } + /// Creates a new vector. + fn new(x: u32, y: u32, z: u32, w: u32) -> Val<bevy::math::UVec4> { + let output: Val<bevy::math::UVec4> = bevy::math::UVec4::new(x, y, z, w).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<bevy::math::UVec4>, + rhs: Val<bevy::math::UVec4>, + ) -> Val<bevy::math::UVec4> { + let output: Val<bevy::math::UVec4> = bevy::math::UVec4::saturating_add( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Returns a vector containing the saturating addition of `self` and signed vector `rhs`. + /// In other words this computes `[self.x.saturating_add_signed(rhs.x), self.y.saturating_add_signed(rhs.y), ..]`. + fn saturating_add_signed( + _self: Val<bevy::math::UVec4>, + rhs: Val<bevy::math::IVec4>, + ) -> Val<bevy::math::UVec4> { + let output: Val<bevy::math::UVec4> = bevy::math::UVec4::saturating_add_signed( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Returns a vector containing the saturating division of `self` and `rhs`. + /// In other words this computes `[self.x.saturating_div(rhs.x), self.y.saturating_div(rhs.y), ..]`. + fn saturating_div( + _self: Val<bevy::math::UVec4>, + rhs: Val<bevy::math::UVec4>, + ) -> Val<bevy::math::UVec4> { + let output: Val<bevy::math::UVec4> = bevy::math::UVec4::saturating_div( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Returns a vector containing the saturating multiplication of `self` and `rhs`. + /// In other words this computes `[self.x.saturating_mul(rhs.x), self.y.saturating_mul(rhs.y), ..]`. + fn saturating_mul( + _self: Val<bevy::math::UVec4>, + rhs: Val<bevy::math::UVec4>, + ) -> Val<bevy::math::UVec4> { + let output: Val<bevy::math::UVec4> = bevy::math::UVec4::saturating_mul( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Returns a vector containing the saturating subtraction of `self` and `rhs`. + /// In other words this computes `[self.x.saturating_sub(rhs.x), self.y.saturating_sub(rhs.y), ..]`. + fn saturating_sub( + _self: Val<bevy::math::UVec4>, + rhs: Val<bevy::math::UVec4>, + ) -> Val<bevy::math::UVec4> { + let output: Val<bevy::math::UVec4> = bevy::math::UVec4::saturating_sub( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Creates a vector from the elements in `if_true` and `if_false`, selecting which to use + /// for each element of `self`. + /// A true element in the mask uses the corresponding element from `if_true`, and false + /// uses the element from `if_false`. + fn select( + mask: Val<bevy::math::BVec4>, + if_true: Val<bevy::math::UVec4>, + if_false: Val<bevy::math::UVec4>, + ) -> Val<bevy::math::UVec4> { + let output: Val<bevy::math::UVec4> = bevy::math::UVec4::select( + mask.into_inner(), + if_true.into_inner(), + if_false.into_inner(), + ) + .into(); + output + } + /// Creates a vector with all elements set to `v`. + fn splat(v: u32) -> Val<bevy::math::UVec4> { + let output: Val<bevy::math::UVec4> = bevy::math::UVec4::splat(v).into(); + output + } + /// `[x, y, z, w]` + fn to_array(_self: Ref<bevy::math::UVec4>) -> [u32; 4] { + let output: [u32; 4] = bevy::math::UVec4::to_array(&_self).into(); + output + } + /// Creates a 3D vector from the `x`, `y` and `z` elements of `self`, discarding `w`. + /// Truncation to [`UVec3`] may also be performed by using [`self.xyz()`][crate::swizzles::Vec4Swizzles::xyz()]. + fn truncate(_self: Val<bevy::math::UVec4>) -> Val<bevy::math::UVec3> { + let output: Val<bevy::math::UVec3> = bevy::math::UVec4::truncate( + _self.into_inner(), + ) + .into(); + output + } + /// Creates a 4D vector from `self` with the given value of `w`. + fn with_w(_self: Val<bevy::math::UVec4>, w: u32) -> Val<bevy::math::UVec4> { + let output: Val<bevy::math::UVec4> = bevy::math::UVec4::with_w( + _self.into_inner(), + w, + ) + .into(); + output + } + /// Creates a 4D vector from `self` with the given value of `x`. + fn with_x(_self: Val<bevy::math::UVec4>, x: u32) -> Val<bevy::math::UVec4> { + let output: Val<bevy::math::UVec4> = bevy::math::UVec4::with_x( + _self.into_inner(), + x, + ) + .into(); + output + } + /// Creates a 4D vector from `self` with the given value of `y`. + fn with_y(_self: Val<bevy::math::UVec4>, y: u32) -> Val<bevy::math::UVec4> { + let output: Val<bevy::math::UVec4> = bevy::math::UVec4::with_y( + _self.into_inner(), + y, + ) + .into(); + output + } + /// Creates a 4D vector from `self` with the given value of `z`. + fn with_z(_self: Val<bevy::math::UVec4>, z: u32) -> Val<bevy::math::UVec4> { + let output: Val<bevy::math::UVec4> = bevy::math::UVec4::with_z( + _self.into_inner(), + z, + ) + .into(); + output + } + /// Returns a vector containing the wrapping addition of `self` and `rhs`. + /// In other words this computes `[self.x.wrapping_add(rhs.x), self.y.wrapping_add(rhs.y), ..]`. + fn wrapping_add( + _self: Val<bevy::math::UVec4>, + rhs: Val<bevy::math::UVec4>, + ) -> Val<bevy::math::UVec4> { + let output: Val<bevy::math::UVec4> = bevy::math::UVec4::wrapping_add( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Returns a vector containing the wrapping addition of `self` and signed vector `rhs`. + /// In other words this computes `[self.x.wrapping_add_signed(rhs.x), self.y.wrapping_add_signed(rhs.y), ..]`. + fn wrapping_add_signed( + _self: Val<bevy::math::UVec4>, + rhs: Val<bevy::math::IVec4>, + ) -> Val<bevy::math::UVec4> { + let output: Val<bevy::math::UVec4> = bevy::math::UVec4::wrapping_add_signed( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Returns a vector containing the wrapping division of `self` and `rhs`. + /// In other words this computes `[self.x.wrapping_div(rhs.x), self.y.wrapping_div(rhs.y), ..]`. + fn wrapping_div( + _self: Val<bevy::math::UVec4>, + rhs: Val<bevy::math::UVec4>, + ) -> Val<bevy::math::UVec4> { + let output: Val<bevy::math::UVec4> = bevy::math::UVec4::wrapping_div( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Returns a vector containing the wrapping multiplication of `self` and `rhs`. + /// In other words this computes `[self.x.wrapping_mul(rhs.x), self.y.wrapping_mul(rhs.y), ..]`. + fn wrapping_mul( + _self: Val<bevy::math::UVec4>, + rhs: Val<bevy::math::UVec4>, + ) -> Val<bevy::math::UVec4> { + let output: Val<bevy::math::UVec4> = bevy::math::UVec4::wrapping_mul( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Returns a vector containing the wrapping subtraction of `self` and `rhs`. + /// In other words this computes `[self.x.wrapping_sub(rhs.x), self.y.wrapping_sub(rhs.y), ..]`. + fn wrapping_sub( + _self: Val<bevy::math::UVec4>, + rhs: Val<bevy::math::UVec4>, + ) -> Val<bevy::math::UVec4> { + let output: Val<bevy::math::UVec4> = bevy::math::UVec4::wrapping_sub( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } +} +#[script_bindings( + remote, + name = "u_8_vec_2_functions", + bms_core_path = "bevy_mod_scripting_core", + generated +)] +impl bevy::math::U8Vec2 { + /// Casts all elements of `self` to `f64`. + fn as_dvec2(_self: Ref<bevy::math::U8Vec2>) -> Val<bevy::math::DVec2> { + let output: Val<bevy::math::DVec2> = bevy::math::U8Vec2::as_dvec2(&_self).into(); + output + } + /// Casts all elements of `self` to `i16`. + fn as_i16vec2(_self: Ref<bevy::math::U8Vec2>) -> Val<bevy::math::I16Vec2> { + let output: Val<bevy::math::I16Vec2> = bevy::math::U8Vec2::as_i16vec2(&_self) + .into(); + output + } + /// Casts all elements of `self` to `i64`. + fn as_i64vec2(_self: Ref<bevy::math::U8Vec2>) -> Val<bevy::math::I64Vec2> { + let output: Val<bevy::math::I64Vec2> = bevy::math::U8Vec2::as_i64vec2(&_self) + .into(); + output + } + /// Casts all elements of `self` to `i8`. + fn as_i8vec2(_self: Ref<bevy::math::U8Vec2>) -> Val<bevy::math::I8Vec2> { + let output: Val<bevy::math::I8Vec2> = bevy::math::U8Vec2::as_i8vec2(&_self) + .into(); + output + } + /// Casts all elements of `self` to `i32`. + fn as_ivec2(_self: Ref<bevy::math::U8Vec2>) -> Val<bevy::math::IVec2> { + let output: Val<bevy::math::IVec2> = bevy::math::U8Vec2::as_ivec2(&_self).into(); + output + } + /// Casts all elements of `self` to `u16`. + fn as_u16vec2(_self: Ref<bevy::math::U8Vec2>) -> Val<bevy::math::U16Vec2> { + let output: Val<bevy::math::U16Vec2> = bevy::math::U8Vec2::as_u16vec2(&_self) + .into(); + output + } + /// Casts all elements of `self` to `u64`. + fn as_u64vec2(_self: Ref<bevy::math::U8Vec2>) -> Val<bevy::math::U64Vec2> { + let output: Val<bevy::math::U64Vec2> = bevy::math::U8Vec2::as_u64vec2(&_self) + .into(); + output + } + /// Casts all elements of `self` to `u32`. + fn as_uvec2(_self: Ref<bevy::math::U8Vec2>) -> Val<bevy::math::UVec2> { + let output: Val<bevy::math::UVec2> = bevy::math::U8Vec2::as_uvec2(&_self).into(); + output + } + /// Casts all elements of `self` to `f32`. + fn as_vec2(_self: Ref<bevy::math::U8Vec2>) -> Val<bevy::math::Vec2> { + let output: Val<bevy::math::Vec2> = bevy::math::U8Vec2::as_vec2(&_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<bevy::math::U8Vec2>, + min: Val<bevy::math::U8Vec2>, + max: Val<bevy::math::U8Vec2>, + ) -> Val<bevy::math::U8Vec2> { + let output: Val<bevy::math::U8Vec2> = bevy::math::U8Vec2::clamp( + _self.into_inner(), + min.into_inner(), + max.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 cmpeq( + _self: Val<bevy::math::U8Vec2>, + rhs: Val<bevy::math::U8Vec2>, + ) -> Val<bevy::math::BVec2> { + let output: Val<bevy::math::BVec2> = bevy::math::U8Vec2::cmpeq( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Returns a vector mask containing the result of a `>=` comparison for each element of + /// `self` and `rhs`. + /// In other words this computes `[self.x >= rhs.x, self.y >= rhs.y, ..]` for all + /// elements. + fn cmpge( + _self: Val<bevy::math::U8Vec2>, + rhs: Val<bevy::math::U8Vec2>, + ) -> Val<bevy::math::BVec2> { + let output: Val<bevy::math::BVec2> = bevy::math::U8Vec2::cmpge( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Returns a vector mask containing the result of a `>` comparison for each element of + /// `self` and `rhs`. + /// In other words this computes `[self.x > rhs.x, self.y > rhs.y, ..]` for all + /// elements. + fn cmpgt( + _self: Val<bevy::math::U8Vec2>, + rhs: Val<bevy::math::U8Vec2>, + ) -> Val<bevy::math::BVec2> { + let output: Val<bevy::math::BVec2> = bevy::math::U8Vec2::cmpgt( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Returns a vector mask containing the result of a `<=` comparison for each element of + /// `self` and `rhs`. + /// In other words this computes `[self.x <= rhs.x, self.y <= rhs.y, ..]` for all + /// elements. + fn cmple( + _self: Val<bevy::math::U8Vec2>, + rhs: Val<bevy::math::U8Vec2>, + ) -> Val<bevy::math::BVec2> { + let output: Val<bevy::math::BVec2> = bevy::math::U8Vec2::cmple( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Returns a vector mask containing the result of a `<` comparison for each element of + /// `self` and `rhs`. + /// In other words this computes `[self.x < rhs.x, self.y < rhs.y, ..]` for all + /// elements. + fn cmplt( + _self: Val<bevy::math::U8Vec2>, + rhs: Val<bevy::math::U8Vec2>, + ) -> Val<bevy::math::BVec2> { + let output: Val<bevy::math::BVec2> = bevy::math::U8Vec2::cmplt( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Returns a vector mask containing the result of a `!=` comparison for each element of + /// `self` and `rhs`. + /// In other words this computes `[self.x != rhs.x, self.y != rhs.y, ..]` for all + /// elements. + fn cmpne( + _self: Val<bevy::math::U8Vec2>, + rhs: Val<bevy::math::U8Vec2>, + ) -> Val<bevy::math::BVec2> { + let output: Val<bevy::math::BVec2> = bevy::math::U8Vec2::cmpne( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Computes the dot product of `self` and `rhs`. + fn dot(_self: Val<bevy::math::U8Vec2>, rhs: Val<bevy::math::U8Vec2>) -> u8 { + let output: u8 = bevy::math::U8Vec2::dot(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + /// Returns a vector where every component is the dot product of `self` and `rhs`. + fn dot_into_vec( + _self: Val<bevy::math::U8Vec2>, + rhs: Val<bevy::math::U8Vec2>, + ) -> Val<bevy::math::U8Vec2> { + let output: Val<bevy::math::U8Vec2> = bevy::math::U8Vec2::dot_into_vec( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Returns the product of all elements of `self`. + /// In other words, this computes `self.x * self.y * ..`. + fn element_product(_self: Val<bevy::math::U8Vec2>) -> u8 { + let output: u8 = bevy::math::U8Vec2::element_product(_self.into_inner()).into(); + output + } + /// Returns the sum of all elements of `self`. + /// In other words, this computes `self.x + self.y + ..`. + fn element_sum(_self: Val<bevy::math::U8Vec2>) -> u8 { + let output: u8 = bevy::math::U8Vec2::element_sum(_self.into_inner()).into(); + output + } + /// Creates a 3D vector from `self` and the given `z` value. + fn extend(_self: Val<bevy::math::U8Vec2>, z: u8) -> Val<bevy::math::U8Vec3> { + let output: Val<bevy::math::U8Vec3> = bevy::math::U8Vec2::extend( + _self.into_inner(), + z, + ) + .into(); + output + } + /// Creates a new vector from an array. + fn from_array(a: [u8; 2]) -> Val<bevy::math::U8Vec2> { + let output: Val<bevy::math::U8Vec2> = bevy::math::U8Vec2::from_array(a).into(); + output + } + /// Computes the squared length of `self`. + fn length_squared(_self: Val<bevy::math::U8Vec2>) -> u8 { + let output: u8 = bevy::math::U8Vec2::length_squared(_self.into_inner()).into(); + output + } + /// Returns a vector containing the maximum values for each element of `self` and `rhs`. + /// In other words this computes `[self.x.max(rhs.x), self.y.max(rhs.y), ..]`. + fn max( + _self: Val<bevy::math::U8Vec2>, + rhs: Val<bevy::math::U8Vec2>, + ) -> Val<bevy::math::U8Vec2> { + let output: Val<bevy::math::U8Vec2> = bevy::math::U8Vec2::max( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Returns the horizontal maximum of `self`. + /// In other words this computes `max(x, y, ..)`. + fn max_element(_self: Val<bevy::math::U8Vec2>) -> u8 { + let output: u8 = bevy::math::U8Vec2::max_element(_self.into_inner()).into(); + output + } + /// Returns a vector containing the minimum values for each element of `self` and `rhs`. + /// In other words this computes `[self.x.min(rhs.x), self.y.min(rhs.y), ..]`. + fn min( + _self: Val<bevy::math::U8Vec2>, + rhs: Val<bevy::math::U8Vec2>, + ) -> Val<bevy::math::U8Vec2> { + let output: Val<bevy::math::U8Vec2> = bevy::math::U8Vec2::min( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Returns the horizontal minimum of `self`. + /// In other words this computes `min(x, y, ..)`. + fn min_element(_self: Val<bevy::math::U8Vec2>) -> u8 { + let output: u8 = bevy::math::U8Vec2::min_element(_self.into_inner()).into(); + output + } + /// Creates a new vector. + fn new(x: u8, y: u8) -> Val<bevy::math::U8Vec2> { + let output: Val<bevy::math::U8Vec2> = bevy::math::U8Vec2::new(x, y).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<bevy::math::U8Vec2>, + rhs: Val<bevy::math::U8Vec2>, + ) -> Val<bevy::math::U8Vec2> { + let output: Val<bevy::math::U8Vec2> = bevy::math::U8Vec2::saturating_add( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Returns a vector containing the saturating addition of `self` and signed vector `rhs`. + /// In other words this computes `[self.x.saturating_add_signed(rhs.x), self.y.saturating_add_signed(rhs.y), ..]`. + fn saturating_add_signed( + _self: Val<bevy::math::U8Vec2>, + rhs: Val<bevy::math::I8Vec2>, + ) -> Val<bevy::math::U8Vec2> { + let output: Val<bevy::math::U8Vec2> = bevy::math::U8Vec2::saturating_add_signed( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Returns a vector containing the saturating division of `self` and `rhs`. + /// In other words this computes `[self.x.saturating_div(rhs.x), self.y.saturating_div(rhs.y), ..]`. + fn saturating_div( + _self: Val<bevy::math::U8Vec2>, + rhs: Val<bevy::math::U8Vec2>, + ) -> Val<bevy::math::U8Vec2> { + let output: Val<bevy::math::U8Vec2> = bevy::math::U8Vec2::saturating_div( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Returns a vector containing the saturating multiplication of `self` and `rhs`. + /// In other words this computes `[self.x.saturating_mul(rhs.x), self.y.saturating_mul(rhs.y), ..]`. + fn saturating_mul( + _self: Val<bevy::math::U8Vec2>, + rhs: Val<bevy::math::U8Vec2>, + ) -> Val<bevy::math::U8Vec2> { + let output: Val<bevy::math::U8Vec2> = bevy::math::U8Vec2::saturating_mul( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Returns a vector containing the saturating subtraction of `self` and `rhs`. + /// In other words this computes `[self.x.saturating_sub(rhs.x), self.y.saturating_sub(rhs.y), ..]`. + fn saturating_sub( + _self: Val<bevy::math::U8Vec2>, + rhs: Val<bevy::math::U8Vec2>, + ) -> Val<bevy::math::U8Vec2> { + let output: Val<bevy::math::U8Vec2> = bevy::math::U8Vec2::saturating_sub( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Creates a vector from the elements in `if_true` and `if_false`, selecting which to use + /// for each element of `self`. + /// A true element in the mask uses the corresponding element from `if_true`, and false + /// uses the element from `if_false`. + fn select( + mask: Val<bevy::math::BVec2>, + if_true: Val<bevy::math::U8Vec2>, + if_false: Val<bevy::math::U8Vec2>, + ) -> Val<bevy::math::U8Vec2> { + let output: Val<bevy::math::U8Vec2> = bevy::math::U8Vec2::select( + mask.into_inner(), + if_true.into_inner(), + if_false.into_inner(), + ) + .into(); + output + } + /// Creates a vector with all elements set to `v`. + fn splat(v: u8) -> Val<bevy::math::U8Vec2> { + let output: Val<bevy::math::U8Vec2> = bevy::math::U8Vec2::splat(v).into(); + output + } + /// `[x, y]` + fn to_array(_self: Ref<bevy::math::U8Vec2>) -> [u8; 2] { + let output: [u8; 2] = bevy::math::U8Vec2::to_array(&_self).into(); + output + } + /// Creates a 2D vector from `self` with the given value of `x`. + fn with_x(_self: Val<bevy::math::U8Vec2>, x: u8) -> Val<bevy::math::U8Vec2> { + let output: Val<bevy::math::U8Vec2> = bevy::math::U8Vec2::with_x( + _self.into_inner(), + x, + ) + .into(); + output + } + /// Creates a 2D vector from `self` with the given value of `y`. + fn with_y(_self: Val<bevy::math::U8Vec2>, y: u8) -> Val<bevy::math::U8Vec2> { + let output: Val<bevy::math::U8Vec2> = bevy::math::U8Vec2::with_y( + _self.into_inner(), + y, + ) + .into(); + output + } + /// Returns a vector containing the wrapping addition of `self` and `rhs`. + /// In other words this computes `[self.x.wrapping_add(rhs.x), self.y.wrapping_add(rhs.y), ..]`. + fn wrapping_add( + _self: Val<bevy::math::U8Vec2>, + rhs: Val<bevy::math::U8Vec2>, + ) -> Val<bevy::math::U8Vec2> { + let output: Val<bevy::math::U8Vec2> = bevy::math::U8Vec2::wrapping_add( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Returns a vector containing the wrapping addition of `self` and signed vector `rhs`. + /// In other words this computes `[self.x.wrapping_add_signed(rhs.x), self.y.wrapping_add_signed(rhs.y), ..]`. + fn wrapping_add_signed( + _self: Val<bevy::math::U8Vec2>, + rhs: Val<bevy::math::I8Vec2>, + ) -> Val<bevy::math::U8Vec2> { + let output: Val<bevy::math::U8Vec2> = bevy::math::U8Vec2::wrapping_add_signed( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Returns a vector containing the wrapping division of `self` and `rhs`. + /// In other words this computes `[self.x.wrapping_div(rhs.x), self.y.wrapping_div(rhs.y), ..]`. + fn wrapping_div( + _self: Val<bevy::math::U8Vec2>, + rhs: Val<bevy::math::U8Vec2>, + ) -> Val<bevy::math::U8Vec2> { + let output: Val<bevy::math::U8Vec2> = bevy::math::U8Vec2::wrapping_div( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Returns a vector containing the wrapping multiplication of `self` and `rhs`. + /// In other words this computes `[self.x.wrapping_mul(rhs.x), self.y.wrapping_mul(rhs.y), ..]`. + fn wrapping_mul( + _self: Val<bevy::math::U8Vec2>, + rhs: Val<bevy::math::U8Vec2>, + ) -> Val<bevy::math::U8Vec2> { + let output: Val<bevy::math::U8Vec2> = bevy::math::U8Vec2::wrapping_mul( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Returns a vector containing the wrapping subtraction of `self` and `rhs`. + /// In other words this computes `[self.x.wrapping_sub(rhs.x), self.y.wrapping_sub(rhs.y), ..]`. + fn wrapping_sub( + _self: Val<bevy::math::U8Vec2>, + rhs: Val<bevy::math::U8Vec2>, + ) -> Val<bevy::math::U8Vec2> { + let output: Val<bevy::math::U8Vec2> = bevy::math::U8Vec2::wrapping_sub( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } +} +#[script_bindings( + remote, + name = "u_8_vec_3_functions", + bms_core_path = "bevy_mod_scripting_core", + generated +)] +impl bevy::math::U8Vec3 { + /// Casts all elements of `self` to `f64`. + fn as_dvec3(_self: Ref<bevy::math::U8Vec3>) -> Val<bevy::math::DVec3> { + let output: Val<bevy::math::DVec3> = bevy::math::U8Vec3::as_dvec3(&_self).into(); + output + } + /// Casts all elements of `self` to `i16`. + fn as_i16vec3(_self: Ref<bevy::math::U8Vec3>) -> Val<bevy::math::I16Vec3> { + let output: Val<bevy::math::I16Vec3> = bevy::math::U8Vec3::as_i16vec3(&_self) + .into(); + output + } + /// Casts all elements of `self` to `i64`. + fn as_i64vec3(_self: Ref<bevy::math::U8Vec3>) -> Val<bevy::math::I64Vec3> { + let output: Val<bevy::math::I64Vec3> = bevy::math::U8Vec3::as_i64vec3(&_self) + .into(); + output + } + /// Casts all elements of `self` to `i8`. + fn as_i8vec3(_self: Ref<bevy::math::U8Vec3>) -> Val<bevy::math::I8Vec3> { + let output: Val<bevy::math::I8Vec3> = bevy::math::U8Vec3::as_i8vec3(&_self) + .into(); + output + } + /// Casts all elements of `self` to `i32`. + fn as_ivec3(_self: Ref<bevy::math::U8Vec3>) -> Val<bevy::math::IVec3> { + let output: Val<bevy::math::IVec3> = bevy::math::U8Vec3::as_ivec3(&_self).into(); + output + } + /// Casts all elements of `self` to `u16`. + fn as_u16vec3(_self: Ref<bevy::math::U8Vec3>) -> Val<bevy::math::U16Vec3> { + let output: Val<bevy::math::U16Vec3> = bevy::math::U8Vec3::as_u16vec3(&_self) + .into(); + output + } + /// Casts all elements of `self` to `u64`. + fn as_u64vec3(_self: Ref<bevy::math::U8Vec3>) -> Val<bevy::math::U64Vec3> { + let output: Val<bevy::math::U64Vec3> = bevy::math::U8Vec3::as_u64vec3(&_self) + .into(); + output + } + /// Casts all elements of `self` to `u32`. + fn as_uvec3(_self: Ref<bevy::math::U8Vec3>) -> Val<bevy::math::UVec3> { + let output: Val<bevy::math::UVec3> = bevy::math::U8Vec3::as_uvec3(&_self).into(); + output + } + /// Casts all elements of `self` to `f32`. + fn as_vec3(_self: Ref<bevy::math::U8Vec3>) -> Val<bevy::math::Vec3> { + let output: Val<bevy::math::Vec3> = bevy::math::U8Vec3::as_vec3(&_self).into(); + output + } + /// Casts all elements of `self` to `f32`. + fn as_vec3a(_self: Ref<bevy::math::U8Vec3>) -> Val<bevy::math::Vec3A> { + let output: Val<bevy::math::Vec3A> = bevy::math::U8Vec3::as_vec3a(&_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<bevy::math::U8Vec3>, + min: Val<bevy::math::U8Vec3>, + max: Val<bevy::math::U8Vec3>, + ) -> Val<bevy::math::U8Vec3> { + let output: Val<bevy::math::U8Vec3> = bevy::math::U8Vec3::clamp( + _self.into_inner(), + min.into_inner(), + max.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 cmpeq( + _self: Val<bevy::math::U8Vec3>, + rhs: Val<bevy::math::U8Vec3>, + ) -> Val<bevy::math::BVec3> { + let output: Val<bevy::math::BVec3> = bevy::math::U8Vec3::cmpeq( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Returns a vector mask containing the result of a `>=` comparison for each element of + /// `self` and `rhs`. + /// In other words this computes `[self.x >= rhs.x, self.y >= rhs.y, ..]` for all + /// elements. + fn cmpge( + _self: Val<bevy::math::U8Vec3>, + rhs: Val<bevy::math::U8Vec3>, + ) -> Val<bevy::math::BVec3> { + let output: Val<bevy::math::BVec3> = bevy::math::U8Vec3::cmpge( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Returns a vector mask containing the result of a `>` comparison for each element of + /// `self` and `rhs`. + /// In other words this computes `[self.x > rhs.x, self.y > rhs.y, ..]` for all + /// elements. + fn cmpgt( + _self: Val<bevy::math::U8Vec3>, + rhs: Val<bevy::math::U8Vec3>, + ) -> Val<bevy::math::BVec3> { + let output: Val<bevy::math::BVec3> = bevy::math::U8Vec3::cmpgt( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Returns a vector mask containing the result of a `<=` comparison for each element of + /// `self` and `rhs`. + /// In other words this computes `[self.x <= rhs.x, self.y <= rhs.y, ..]` for all + /// elements. + fn cmple( + _self: Val<bevy::math::U8Vec3>, + rhs: Val<bevy::math::U8Vec3>, + ) -> Val<bevy::math::BVec3> { + let output: Val<bevy::math::BVec3> = bevy::math::U8Vec3::cmple( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Returns a vector mask containing the result of a `<` comparison for each element of + /// `self` and `rhs`. + /// In other words this computes `[self.x < rhs.x, self.y < rhs.y, ..]` for all + /// elements. + fn cmplt( + _self: Val<bevy::math::U8Vec3>, + rhs: Val<bevy::math::U8Vec3>, + ) -> Val<bevy::math::BVec3> { + let output: Val<bevy::math::BVec3> = bevy::math::U8Vec3::cmplt( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Returns a vector mask containing the result of a `!=` comparison for each element of + /// `self` and `rhs`. + /// In other words this computes `[self.x != rhs.x, self.y != rhs.y, ..]` for all + /// elements. + fn cmpne( + _self: Val<bevy::math::U8Vec3>, + rhs: Val<bevy::math::U8Vec3>, + ) -> Val<bevy::math::BVec3> { + let output: Val<bevy::math::BVec3> = bevy::math::U8Vec3::cmpne( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Computes the cross product of `self` and `rhs`. + fn cross( + _self: Val<bevy::math::U8Vec3>, + rhs: Val<bevy::math::U8Vec3>, + ) -> Val<bevy::math::U8Vec3> { + let output: Val<bevy::math::U8Vec3> = bevy::math::U8Vec3::cross( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Computes the dot product of `self` and `rhs`. + fn dot(_self: Val<bevy::math::U8Vec3>, rhs: Val<bevy::math::U8Vec3>) -> u8 { + let output: u8 = bevy::math::U8Vec3::dot(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + /// Returns a vector where every component is the dot product of `self` and `rhs`. + fn dot_into_vec( + _self: Val<bevy::math::U8Vec3>, + rhs: Val<bevy::math::U8Vec3>, + ) -> Val<bevy::math::U8Vec3> { + let output: Val<bevy::math::U8Vec3> = bevy::math::U8Vec3::dot_into_vec( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Returns the product of all elements of `self`. + /// In other words, this computes `self.x * self.y * ..`. + fn element_product(_self: Val<bevy::math::U8Vec3>) -> u8 { + let output: u8 = bevy::math::U8Vec3::element_product(_self.into_inner()).into(); + output + } + /// Returns the sum of all elements of `self`. + /// In other words, this computes `self.x + self.y + ..`. + fn element_sum(_self: Val<bevy::math::U8Vec3>) -> u8 { + let output: u8 = bevy::math::U8Vec3::element_sum(_self.into_inner()).into(); + output + } + /// Creates a 4D vector from `self` and the given `w` value. + fn extend(_self: Val<bevy::math::U8Vec3>, w: u8) -> Val<bevy::math::U8Vec4> { + let output: Val<bevy::math::U8Vec4> = bevy::math::U8Vec3::extend( + _self.into_inner(), + w, + ) + .into(); + output + } + /// Creates a new vector from an array. + fn from_array(a: [u8; 3]) -> Val<bevy::math::U8Vec3> { + let output: Val<bevy::math::U8Vec3> = bevy::math::U8Vec3::from_array(a).into(); + output + } + /// Computes the squared length of `self`. + fn length_squared(_self: Val<bevy::math::U8Vec3>) -> u8 { + let output: u8 = bevy::math::U8Vec3::length_squared(_self.into_inner()).into(); + output + } + /// Returns a vector containing the maximum values for each element of `self` and `rhs`. + /// In other words this computes `[self.x.max(rhs.x), self.y.max(rhs.y), ..]`. + fn max( + _self: Val<bevy::math::U8Vec3>, + rhs: Val<bevy::math::U8Vec3>, + ) -> Val<bevy::math::U8Vec3> { + let output: Val<bevy::math::U8Vec3> = bevy::math::U8Vec3::max( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Returns the horizontal maximum of `self`. + /// In other words this computes `max(x, y, ..)`. + fn max_element(_self: Val<bevy::math::U8Vec3>) -> u8 { + let output: u8 = bevy::math::U8Vec3::max_element(_self.into_inner()).into(); + output + } + /// Returns a vector containing the minimum values for each element of `self` and `rhs`. + /// In other words this computes `[self.x.min(rhs.x), self.y.min(rhs.y), ..]`. + fn min( + _self: Val<bevy::math::U8Vec3>, + rhs: Val<bevy::math::U8Vec3>, + ) -> Val<bevy::math::U8Vec3> { + let output: Val<bevy::math::U8Vec3> = bevy::math::U8Vec3::min( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Returns the horizontal minimum of `self`. + /// In other words this computes `min(x, y, ..)`. + fn min_element(_self: Val<bevy::math::U8Vec3>) -> u8 { + let output: u8 = bevy::math::U8Vec3::min_element(_self.into_inner()).into(); + output + } + /// Creates a new vector. + fn new(x: u8, y: u8, z: u8) -> Val<bevy::math::U8Vec3> { + let output: Val<bevy::math::U8Vec3> = bevy::math::U8Vec3::new(x, y, z).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<bevy::math::U8Vec3>, + rhs: Val<bevy::math::U8Vec3>, + ) -> Val<bevy::math::U8Vec3> { + let output: Val<bevy::math::U8Vec3> = bevy::math::U8Vec3::saturating_add( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Returns a vector containing the saturating addition of `self` and signed vector `rhs`. + /// In other words this computes `[self.x.saturating_add_signed(rhs.x), self.y.saturating_add_signed(rhs.y), ..]`. + fn saturating_add_signed( + _self: Val<bevy::math::U8Vec3>, + rhs: Val<bevy::math::I8Vec3>, + ) -> Val<bevy::math::U8Vec3> { + let output: Val<bevy::math::U8Vec3> = bevy::math::U8Vec3::saturating_add_signed( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Returns a vector containing the saturating division of `self` and `rhs`. + /// In other words this computes `[self.x.saturating_div(rhs.x), self.y.saturating_div(rhs.y), ..]`. + fn saturating_div( + _self: Val<bevy::math::U8Vec3>, + rhs: Val<bevy::math::U8Vec3>, + ) -> Val<bevy::math::U8Vec3> { + let output: Val<bevy::math::U8Vec3> = bevy::math::U8Vec3::saturating_div( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Returns a vector containing the saturating multiplication of `self` and `rhs`. + /// In other words this computes `[self.x.saturating_mul(rhs.x), self.y.saturating_mul(rhs.y), ..]`. + fn saturating_mul( + _self: Val<bevy::math::U8Vec3>, + rhs: Val<bevy::math::U8Vec3>, + ) -> Val<bevy::math::U8Vec3> { + let output: Val<bevy::math::U8Vec3> = bevy::math::U8Vec3::saturating_mul( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Returns a vector containing the saturating subtraction of `self` and `rhs`. + /// In other words this computes `[self.x.saturating_sub(rhs.x), self.y.saturating_sub(rhs.y), ..]`. + fn saturating_sub( + _self: Val<bevy::math::U8Vec3>, + rhs: Val<bevy::math::U8Vec3>, + ) -> Val<bevy::math::U8Vec3> { + let output: Val<bevy::math::U8Vec3> = bevy::math::U8Vec3::saturating_sub( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Creates a vector from the elements in `if_true` and `if_false`, selecting which to use + /// for each element of `self`. + /// A true element in the mask uses the corresponding element from `if_true`, and false + /// uses the element from `if_false`. + fn select( + mask: Val<bevy::math::BVec3>, + if_true: Val<bevy::math::U8Vec3>, + if_false: Val<bevy::math::U8Vec3>, + ) -> Val<bevy::math::U8Vec3> { + let output: Val<bevy::math::U8Vec3> = bevy::math::U8Vec3::select( + mask.into_inner(), + if_true.into_inner(), + if_false.into_inner(), + ) + .into(); + output + } + /// Creates a vector with all elements set to `v`. + fn splat(v: u8) -> Val<bevy::math::U8Vec3> { + let output: Val<bevy::math::U8Vec3> = bevy::math::U8Vec3::splat(v).into(); + output + } + /// `[x, y, z]` + fn to_array(_self: Ref<bevy::math::U8Vec3>) -> [u8; 3] { + let output: [u8; 3] = bevy::math::U8Vec3::to_array(&_self).into(); + output + } + /// Creates a 2D vector from the `x` and `y` elements of `self`, discarding `z`. + /// Truncation may also be performed by using [`self.xy()`][crate::swizzles::Vec3Swizzles::xy()]. + fn truncate(_self: Val<bevy::math::U8Vec3>) -> Val<bevy::math::U8Vec2> { + let output: Val<bevy::math::U8Vec2> = bevy::math::U8Vec3::truncate( + _self.into_inner(), + ) + .into(); + output + } + /// Creates a 3D vector from `self` with the given value of `x`. + fn with_x(_self: Val<bevy::math::U8Vec3>, x: u8) -> Val<bevy::math::U8Vec3> { + let output: Val<bevy::math::U8Vec3> = bevy::math::U8Vec3::with_x( + _self.into_inner(), + x, + ) + .into(); + output + } + /// Creates a 3D vector from `self` with the given value of `y`. + fn with_y(_self: Val<bevy::math::U8Vec3>, y: u8) -> Val<bevy::math::U8Vec3> { + let output: Val<bevy::math::U8Vec3> = bevy::math::U8Vec3::with_y( + _self.into_inner(), + y, + ) + .into(); + output + } + /// Creates a 3D vector from `self` with the given value of `z`. + fn with_z(_self: Val<bevy::math::U8Vec3>, z: u8) -> Val<bevy::math::U8Vec3> { + let output: Val<bevy::math::U8Vec3> = bevy::math::U8Vec3::with_z( + _self.into_inner(), + z, + ) + .into(); + output + } + /// Returns a vector containing the wrapping addition of `self` and `rhs`. + /// In other words this computes `[self.x.wrapping_add(rhs.x), self.y.wrapping_add(rhs.y), ..]`. + fn wrapping_add( + _self: Val<bevy::math::U8Vec3>, + rhs: Val<bevy::math::U8Vec3>, + ) -> Val<bevy::math::U8Vec3> { + let output: Val<bevy::math::U8Vec3> = bevy::math::U8Vec3::wrapping_add( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Returns a vector containing the wrapping addition of `self` and signed vector `rhs`. + /// In other words this computes `[self.x.wrapping_add_signed(rhs.x), self.y.wrapping_add_signed(rhs.y), ..]`. + fn wrapping_add_signed( + _self: Val<bevy::math::U8Vec3>, + rhs: Val<bevy::math::I8Vec3>, + ) -> Val<bevy::math::U8Vec3> { + let output: Val<bevy::math::U8Vec3> = bevy::math::U8Vec3::wrapping_add_signed( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Returns a vector containing the wrapping division of `self` and `rhs`. + /// In other words this computes `[self.x.wrapping_div(rhs.x), self.y.wrapping_div(rhs.y), ..]`. + fn wrapping_div( + _self: Val<bevy::math::U8Vec3>, + rhs: Val<bevy::math::U8Vec3>, + ) -> Val<bevy::math::U8Vec3> { + let output: Val<bevy::math::U8Vec3> = bevy::math::U8Vec3::wrapping_div( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Returns a vector containing the wrapping multiplication of `self` and `rhs`. + /// In other words this computes `[self.x.wrapping_mul(rhs.x), self.y.wrapping_mul(rhs.y), ..]`. + fn wrapping_mul( + _self: Val<bevy::math::U8Vec3>, + rhs: Val<bevy::math::U8Vec3>, + ) -> Val<bevy::math::U8Vec3> { + let output: Val<bevy::math::U8Vec3> = bevy::math::U8Vec3::wrapping_mul( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Returns a vector containing the wrapping subtraction of `self` and `rhs`. + /// In other words this computes `[self.x.wrapping_sub(rhs.x), self.y.wrapping_sub(rhs.y), ..]`. + fn wrapping_sub( + _self: Val<bevy::math::U8Vec3>, + rhs: Val<bevy::math::U8Vec3>, + ) -> Val<bevy::math::U8Vec3> { + let output: Val<bevy::math::U8Vec3> = bevy::math::U8Vec3::wrapping_sub( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } +} +#[script_bindings( + remote, + name = "u_8_vec_4_functions", + bms_core_path = "bevy_mod_scripting_core", + generated +)] +impl bevy::math::U8Vec4 { + /// Casts all elements of `self` to `f64`. + fn as_dvec4(_self: Ref<bevy::math::U8Vec4>) -> Val<bevy::math::DVec4> { + let output: Val<bevy::math::DVec4> = bevy::math::U8Vec4::as_dvec4(&_self).into(); + output + } + /// Casts all elements of `self` to `i16`. + fn as_i16vec4(_self: Ref<bevy::math::U8Vec4>) -> Val<bevy::math::I16Vec4> { + let output: Val<bevy::math::I16Vec4> = bevy::math::U8Vec4::as_i16vec4(&_self) + .into(); + output + } + /// Casts all elements of `self` to `i64`. + fn as_i64vec4(_self: Ref<bevy::math::U8Vec4>) -> Val<bevy::math::I64Vec4> { + let output: Val<bevy::math::I64Vec4> = bevy::math::U8Vec4::as_i64vec4(&_self) + .into(); + output + } + /// Casts all elements of `self` to `i8`. + fn as_i8vec4(_self: Ref<bevy::math::U8Vec4>) -> Val<bevy::math::I8Vec4> { + let output: Val<bevy::math::I8Vec4> = bevy::math::U8Vec4::as_i8vec4(&_self) + .into(); + output + } + /// Casts all elements of `self` to `i32`. + fn as_ivec4(_self: Ref<bevy::math::U8Vec4>) -> Val<bevy::math::IVec4> { + let output: Val<bevy::math::IVec4> = bevy::math::U8Vec4::as_ivec4(&_self).into(); + output + } + /// Casts all elements of `self` to `u16`. + fn as_u16vec4(_self: Ref<bevy::math::U8Vec4>) -> Val<bevy::math::U16Vec4> { + let output: Val<bevy::math::U16Vec4> = bevy::math::U8Vec4::as_u16vec4(&_self) + .into(); + output + } + /// Casts all elements of `self` to `u64`. + fn as_u64vec4(_self: Ref<bevy::math::U8Vec4>) -> Val<bevy::math::U64Vec4> { + let output: Val<bevy::math::U64Vec4> = bevy::math::U8Vec4::as_u64vec4(&_self) + .into(); + output + } + /// Casts all elements of `self` to `u32`. + fn as_uvec4(_self: Ref<bevy::math::U8Vec4>) -> Val<bevy::math::UVec4> { + let output: Val<bevy::math::UVec4> = bevy::math::U8Vec4::as_uvec4(&_self).into(); + output + } + /// Casts all elements of `self` to `f32`. + fn as_vec4(_self: Ref<bevy::math::U8Vec4>) -> Val<bevy::math::Vec4> { + let output: Val<bevy::math::Vec4> = bevy::math::U8Vec4::as_vec4(&_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<bevy::math::U8Vec4>, + min: Val<bevy::math::U8Vec4>, + max: Val<bevy::math::U8Vec4>, + ) -> Val<bevy::math::U8Vec4> { + let output: Val<bevy::math::U8Vec4> = bevy::math::U8Vec4::clamp( + _self.into_inner(), + min.into_inner(), + max.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 cmpeq( + _self: Val<bevy::math::U8Vec4>, + rhs: Val<bevy::math::U8Vec4>, + ) -> Val<bevy::math::BVec4> { + let output: Val<bevy::math::BVec4> = bevy::math::U8Vec4::cmpeq( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Returns a vector mask containing the result of a `>=` comparison for each element of + /// `self` and `rhs`. + /// In other words this computes `[self.x >= rhs.x, self.y >= rhs.y, ..]` for all + /// elements. + fn cmpge( + _self: Val<bevy::math::U8Vec4>, + rhs: Val<bevy::math::U8Vec4>, + ) -> Val<bevy::math::BVec4> { + let output: Val<bevy::math::BVec4> = bevy::math::U8Vec4::cmpge( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Returns a vector mask containing the result of a `>` comparison for each element of + /// `self` and `rhs`. + /// In other words this computes `[self.x > rhs.x, self.y > rhs.y, ..]` for all + /// elements. + fn cmpgt( + _self: Val<bevy::math::U8Vec4>, + rhs: Val<bevy::math::U8Vec4>, + ) -> Val<bevy::math::BVec4> { + let output: Val<bevy::math::BVec4> = bevy::math::U8Vec4::cmpgt( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Returns a vector mask containing the result of a `<=` comparison for each element of + /// `self` and `rhs`. + /// In other words this computes `[self.x <= rhs.x, self.y <= rhs.y, ..]` for all + /// elements. + fn cmple( + _self: Val<bevy::math::U8Vec4>, + rhs: Val<bevy::math::U8Vec4>, + ) -> Val<bevy::math::BVec4> { + let output: Val<bevy::math::BVec4> = bevy::math::U8Vec4::cmple( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Returns a vector mask containing the result of a `<` comparison for each element of + /// `self` and `rhs`. + /// In other words this computes `[self.x < rhs.x, self.y < rhs.y, ..]` for all + /// elements. + fn cmplt( + _self: Val<bevy::math::U8Vec4>, + rhs: Val<bevy::math::U8Vec4>, + ) -> Val<bevy::math::BVec4> { + let output: Val<bevy::math::BVec4> = bevy::math::U8Vec4::cmplt( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Returns a vector mask containing the result of a `!=` comparison for each element of + /// `self` and `rhs`. + /// In other words this computes `[self.x != rhs.x, self.y != rhs.y, ..]` for all + /// elements. + fn cmpne( + _self: Val<bevy::math::U8Vec4>, + rhs: Val<bevy::math::U8Vec4>, + ) -> Val<bevy::math::BVec4> { + let output: Val<bevy::math::BVec4> = bevy::math::U8Vec4::cmpne( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Computes the dot product of `self` and `rhs`. + fn dot(_self: Val<bevy::math::U8Vec4>, rhs: Val<bevy::math::U8Vec4>) -> u8 { + let output: u8 = bevy::math::U8Vec4::dot(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + /// Returns a vector where every component is the dot product of `self` and `rhs`. + fn dot_into_vec( + _self: Val<bevy::math::U8Vec4>, + rhs: Val<bevy::math::U8Vec4>, + ) -> Val<bevy::math::U8Vec4> { + let output: Val<bevy::math::U8Vec4> = bevy::math::U8Vec4::dot_into_vec( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Returns the product of all elements of `self`. + /// In other words, this computes `self.x * self.y * ..`. + fn element_product(_self: Val<bevy::math::U8Vec4>) -> u8 { + let output: u8 = bevy::math::U8Vec4::element_product(_self.into_inner()).into(); + output + } + /// Returns the sum of all elements of `self`. + /// In other words, this computes `self.x + self.y + ..`. + fn element_sum(_self: Val<bevy::math::U8Vec4>) -> u8 { + let output: u8 = bevy::math::U8Vec4::element_sum(_self.into_inner()).into(); + output + } + /// Creates a new vector from an array. + fn from_array(a: [u8; 4]) -> Val<bevy::math::U8Vec4> { + let output: Val<bevy::math::U8Vec4> = bevy::math::U8Vec4::from_array(a).into(); + output + } + /// Computes the squared length of `self`. + fn length_squared(_self: Val<bevy::math::U8Vec4>) -> u8 { + let output: u8 = bevy::math::U8Vec4::length_squared(_self.into_inner()).into(); + output + } + /// Returns a vector containing the maximum values for each element of `self` and `rhs`. + /// In other words this computes `[self.x.max(rhs.x), self.y.max(rhs.y), ..]`. + fn max( + _self: Val<bevy::math::U8Vec4>, + rhs: Val<bevy::math::U8Vec4>, + ) -> Val<bevy::math::U8Vec4> { + let output: Val<bevy::math::U8Vec4> = bevy::math::U8Vec4::max( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Returns the horizontal maximum of `self`. + /// In other words this computes `max(x, y, ..)`. + fn max_element(_self: Val<bevy::math::U8Vec4>) -> u8 { + let output: u8 = bevy::math::U8Vec4::max_element(_self.into_inner()).into(); + output + } + /// Returns a vector containing the minimum values for each element of `self` and `rhs`. + /// In other words this computes `[self.x.min(rhs.x), self.y.min(rhs.y), ..]`. + fn min( + _self: Val<bevy::math::U8Vec4>, + rhs: Val<bevy::math::U8Vec4>, + ) -> Val<bevy::math::U8Vec4> { + let output: Val<bevy::math::U8Vec4> = bevy::math::U8Vec4::min( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Returns the horizontal minimum of `self`. + /// In other words this computes `min(x, y, ..)`. + fn min_element(_self: Val<bevy::math::U8Vec4>) -> u8 { + let output: u8 = bevy::math::U8Vec4::min_element(_self.into_inner()).into(); + output + } + /// Creates a new vector. + fn new(x: u8, y: u8, z: u8, w: u8) -> Val<bevy::math::U8Vec4> { + let output: Val<bevy::math::U8Vec4> = bevy::math::U8Vec4::new(x, y, z, w).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<bevy::math::U8Vec4>, + rhs: Val<bevy::math::U8Vec4>, + ) -> Val<bevy::math::U8Vec4> { + let output: Val<bevy::math::U8Vec4> = bevy::math::U8Vec4::saturating_add( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Returns a vector containing the saturating addition of `self` and signed vector `rhs`. + /// In other words this computes `[self.x.saturating_add_signed(rhs.x), self.y.saturating_add_signed(rhs.y), ..]`. + fn saturating_add_signed( + _self: Val<bevy::math::U8Vec4>, + rhs: Val<bevy::math::I8Vec4>, + ) -> Val<bevy::math::U8Vec4> { + let output: Val<bevy::math::U8Vec4> = bevy::math::U8Vec4::saturating_add_signed( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Returns a vector containing the saturating division of `self` and `rhs`. + /// In other words this computes `[self.x.saturating_div(rhs.x), self.y.saturating_div(rhs.y), ..]`. + fn saturating_div( + _self: Val<bevy::math::U8Vec4>, + rhs: Val<bevy::math::U8Vec4>, + ) -> Val<bevy::math::U8Vec4> { + let output: Val<bevy::math::U8Vec4> = bevy::math::U8Vec4::saturating_div( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Returns a vector containing the saturating multiplication of `self` and `rhs`. + /// In other words this computes `[self.x.saturating_mul(rhs.x), self.y.saturating_mul(rhs.y), ..]`. + fn saturating_mul( + _self: Val<bevy::math::U8Vec4>, + rhs: Val<bevy::math::U8Vec4>, + ) -> Val<bevy::math::U8Vec4> { + let output: Val<bevy::math::U8Vec4> = bevy::math::U8Vec4::saturating_mul( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Returns a vector containing the saturating subtraction of `self` and `rhs`. + /// In other words this computes `[self.x.saturating_sub(rhs.x), self.y.saturating_sub(rhs.y), ..]`. + fn saturating_sub( + _self: Val<bevy::math::U8Vec4>, + rhs: Val<bevy::math::U8Vec4>, + ) -> Val<bevy::math::U8Vec4> { + let output: Val<bevy::math::U8Vec4> = bevy::math::U8Vec4::saturating_sub( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Creates a vector from the elements in `if_true` and `if_false`, selecting which to use + /// for each element of `self`. + /// A true element in the mask uses the corresponding element from `if_true`, and false + /// uses the element from `if_false`. + fn select( + mask: Val<bevy::math::BVec4>, + if_true: Val<bevy::math::U8Vec4>, + if_false: Val<bevy::math::U8Vec4>, + ) -> Val<bevy::math::U8Vec4> { + let output: Val<bevy::math::U8Vec4> = bevy::math::U8Vec4::select( + mask.into_inner(), + if_true.into_inner(), + if_false.into_inner(), + ) + .into(); + output + } + /// Creates a vector with all elements set to `v`. + fn splat(v: u8) -> Val<bevy::math::U8Vec4> { + let output: Val<bevy::math::U8Vec4> = bevy::math::U8Vec4::splat(v).into(); + output + } + /// `[x, y, z, w]` + fn to_array(_self: Ref<bevy::math::U8Vec4>) -> [u8; 4] { + let output: [u8; 4] = bevy::math::U8Vec4::to_array(&_self).into(); + output + } + /// Creates a 3D vector from the `x`, `y` and `z` elements of `self`, discarding `w`. + /// Truncation to [`U8Vec3`] may also be performed by using [`self.xyz()`][crate::swizzles::Vec4Swizzles::xyz()]. + fn truncate(_self: Val<bevy::math::U8Vec4>) -> Val<bevy::math::U8Vec3> { + let output: Val<bevy::math::U8Vec3> = bevy::math::U8Vec4::truncate( + _self.into_inner(), + ) + .into(); + output + } + /// Creates a 4D vector from `self` with the given value of `w`. + fn with_w(_self: Val<bevy::math::U8Vec4>, w: u8) -> Val<bevy::math::U8Vec4> { + let output: Val<bevy::math::U8Vec4> = bevy::math::U8Vec4::with_w( + _self.into_inner(), + w, + ) + .into(); + output + } + /// Creates a 4D vector from `self` with the given value of `x`. + fn with_x(_self: Val<bevy::math::U8Vec4>, x: u8) -> Val<bevy::math::U8Vec4> { + let output: Val<bevy::math::U8Vec4> = bevy::math::U8Vec4::with_x( + _self.into_inner(), + x, + ) + .into(); + output + } + /// Creates a 4D vector from `self` with the given value of `y`. + fn with_y(_self: Val<bevy::math::U8Vec4>, y: u8) -> Val<bevy::math::U8Vec4> { + let output: Val<bevy::math::U8Vec4> = bevy::math::U8Vec4::with_y( + _self.into_inner(), + y, + ) + .into(); + output + } + /// Creates a 4D vector from `self` with the given value of `z`. + fn with_z(_self: Val<bevy::math::U8Vec4>, z: u8) -> Val<bevy::math::U8Vec4> { + let output: Val<bevy::math::U8Vec4> = bevy::math::U8Vec4::with_z( + _self.into_inner(), + z, + ) + .into(); + output + } + /// Returns a vector containing the wrapping addition of `self` and `rhs`. + /// In other words this computes `[self.x.wrapping_add(rhs.x), self.y.wrapping_add(rhs.y), ..]`. + fn wrapping_add( + _self: Val<bevy::math::U8Vec4>, + rhs: Val<bevy::math::U8Vec4>, + ) -> Val<bevy::math::U8Vec4> { + let output: Val<bevy::math::U8Vec4> = bevy::math::U8Vec4::wrapping_add( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Returns a vector containing the wrapping addition of `self` and signed vector `rhs`. + /// In other words this computes `[self.x.wrapping_add_signed(rhs.x), self.y.wrapping_add_signed(rhs.y), ..]`. + fn wrapping_add_signed( + _self: Val<bevy::math::U8Vec4>, + rhs: Val<bevy::math::I8Vec4>, + ) -> Val<bevy::math::U8Vec4> { + let output: Val<bevy::math::U8Vec4> = bevy::math::U8Vec4::wrapping_add_signed( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + /// Returns a vector containing the wrapping division of `self` and `rhs`. + /// In other words this computes `[self.x.wrapping_div(rhs.x), self.y.wrapping_div(rhs.y), ..]`. + fn wrapping_div( + _self: Val<bevy::math::U8Vec4>, + rhs: Val<bevy::math::U8Vec4>, + ) -> Val<bevy::math::U8Vec4> { + let output: Val<bevy::math::U8Vec4> = bevy::math::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<bevy::math::U8Vec4>, + rhs: Val<bevy::math::U8Vec4>, + ) -> Val<bevy::math::U8Vec4> { + let output: Val<bevy::math::U8Vec4> = bevy::math::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<bevy::math::U8Vec4>, + rhs: Val<bevy::math::U8Vec4>, + ) -> Val<bevy::math::U8Vec4> { + let output: Val<bevy::math::U8Vec4> = bevy::math::U8Vec4::wrapping_sub( _self.into_inner(), rhs.into_inner(), ) @@ -6788,82 +11671,74 @@ impl bevy::math::I64Vec4 { } #[script_bindings( remote, - name = "u_vec_2_functions", + name = "u_16_vec_2_functions", bms_core_path = "bevy_mod_scripting_core", generated )] -impl bevy::math::UVec2 { - fn add( - _self: Val<bevy::math::UVec2>, - rhs: Ref<bevy::math::UVec2>, - ) -> Val<bevy::math::UVec2> { - let output: Val<bevy::math::UVec2> = <bevy::math::UVec2 as std::ops::Add< - &bevy::math::UVec2, - >>::add(_self.into_inner(), &rhs) +impl bevy::math::U16Vec2 { + /// Casts all elements of `self` to `f64`. + fn as_dvec2(_self: Ref<bevy::math::U16Vec2>) -> Val<bevy::math::DVec2> { + let output: Val<bevy::math::DVec2> = bevy::math::U16Vec2::as_dvec2(&_self) .into(); output } - fn add( - _self: Val<bevy::math::UVec2>, - rhs: Val<bevy::math::UVec2>, - ) -> Val<bevy::math::UVec2> { - let output: Val<bevy::math::UVec2> = <bevy::math::UVec2 as std::ops::Add< - bevy::math::UVec2, - >>::add(_self.into_inner(), rhs.into_inner()) + /// Casts all elements of `self` to `i16`. + fn as_i16vec2(_self: Ref<bevy::math::U16Vec2>) -> Val<bevy::math::I16Vec2> { + let output: Val<bevy::math::I16Vec2> = bevy::math::U16Vec2::as_i16vec2(&_self) .into(); output } - fn add(_self: Val<bevy::math::UVec2>, rhs: u32) -> Val<bevy::math::UVec2> { - let output: Val<bevy::math::UVec2> = <bevy::math::UVec2 as std::ops::Add< - u32, - >>::add(_self.into_inner(), rhs) + /// Casts all elements of `self` to `i64`. + fn as_i64vec2(_self: Ref<bevy::math::U16Vec2>) -> Val<bevy::math::I64Vec2> { + let output: Val<bevy::math::I64Vec2> = bevy::math::U16Vec2::as_i64vec2(&_self) .into(); output } - /// Casts all elements of `self` to `f64`. - fn as_dvec2(_self: Ref<bevy::math::UVec2>) -> Val<bevy::math::DVec2> { - let output: Val<bevy::math::DVec2> = bevy::math::UVec2::as_dvec2(&_self).into(); - output - } - /// Casts all elements of `self` to `i64`. - fn as_i64vec2(_self: Ref<bevy::math::UVec2>) -> Val<bevy::math::I64Vec2> { - let output: Val<bevy::math::I64Vec2> = bevy::math::UVec2::as_i64vec2(&_self) + /// Casts all elements of `self` to `i8`. + fn as_i8vec2(_self: Ref<bevy::math::U16Vec2>) -> Val<bevy::math::I8Vec2> { + let output: Val<bevy::math::I8Vec2> = bevy::math::U16Vec2::as_i8vec2(&_self) .into(); output } /// Casts all elements of `self` to `i32`. - fn as_ivec2(_self: Ref<bevy::math::UVec2>) -> Val<bevy::math::IVec2> { - let output: Val<bevy::math::IVec2> = bevy::math::UVec2::as_ivec2(&_self).into(); + fn as_ivec2(_self: Ref<bevy::math::U16Vec2>) -> Val<bevy::math::IVec2> { + let output: Val<bevy::math::IVec2> = bevy::math::U16Vec2::as_ivec2(&_self) + .into(); output } /// Casts all elements of `self` to `u64`. - fn as_u64vec2(_self: Ref<bevy::math::UVec2>) -> Val<bevy::math::U64Vec2> { - let output: Val<bevy::math::U64Vec2> = bevy::math::UVec2::as_u64vec2(&_self) + fn as_u64vec2(_self: Ref<bevy::math::U16Vec2>) -> Val<bevy::math::U64Vec2> { + let output: Val<bevy::math::U64Vec2> = bevy::math::U16Vec2::as_u64vec2(&_self) .into(); output } - /// Casts all elements of `self` to `f32`. - fn as_vec2(_self: Ref<bevy::math::UVec2>) -> Val<bevy::math::Vec2> { - let output: Val<bevy::math::Vec2> = bevy::math::UVec2::as_vec2(&_self).into(); + /// Casts all elements of `self` to `u8`. + fn as_u8vec2(_self: Ref<bevy::math::U16Vec2>) -> Val<bevy::math::U8Vec2> { + let output: Val<bevy::math::U8Vec2> = bevy::math::U16Vec2::as_u8vec2(&_self) + .into(); output } - fn assert_receiver_is_total_eq(_self: Ref<bevy::math::UVec2>) -> () { - let output: () = <bevy::math::UVec2 as std::cmp::Eq>::assert_receiver_is_total_eq( - &_self, - ) + /// Casts all elements of `self` to `u32`. + fn as_uvec2(_self: Ref<bevy::math::U16Vec2>) -> Val<bevy::math::UVec2> { + let output: Val<bevy::math::UVec2> = bevy::math::U16Vec2::as_uvec2(&_self) .into(); output } - /// Component-wise clamping of values, similar to [`u32::clamp`]. + /// Casts all elements of `self` to `f32`. + fn as_vec2(_self: Ref<bevy::math::U16Vec2>) -> Val<bevy::math::Vec2> { + let output: Val<bevy::math::Vec2> = bevy::math::U16Vec2::as_vec2(&_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<bevy::math::UVec2>, - min: Val<bevy::math::UVec2>, - max: Val<bevy::math::UVec2>, - ) -> Val<bevy::math::UVec2> { - let output: Val<bevy::math::UVec2> = bevy::math::UVec2::clamp( + _self: Val<bevy::math::U16Vec2>, + min: Val<bevy::math::U16Vec2>, + max: Val<bevy::math::U16Vec2>, + ) -> Val<bevy::math::U16Vec2> { + let output: Val<bevy::math::U16Vec2> = bevy::math::U16Vec2::clamp( _self.into_inner(), min.into_inner(), max.into_inner(), @@ -6871,22 +11746,15 @@ impl bevy::math::UVec2 { .into(); output } - fn clone(_self: Ref<bevy::math::UVec2>) -> Val<bevy::math::UVec2> { - let output: Val<bevy::math::UVec2> = <bevy::math::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<bevy::math::UVec2>, - rhs: Val<bevy::math::UVec2>, + _self: Val<bevy::math::U16Vec2>, + rhs: Val<bevy::math::U16Vec2>, ) -> Val<bevy::math::BVec2> { - let output: Val<bevy::math::BVec2> = bevy::math::UVec2::cmpeq( + let output: Val<bevy::math::BVec2> = bevy::math::U16Vec2::cmpeq( _self.into_inner(), rhs.into_inner(), ) @@ -6898,10 +11766,10 @@ impl bevy::math::UVec2 { /// In other words this computes `[self.x >= rhs.x, self.y >= rhs.y, ..]` for all /// elements. fn cmpge( - _self: Val<bevy::math::UVec2>, - rhs: Val<bevy::math::UVec2>, + _self: Val<bevy::math::U16Vec2>, + rhs: Val<bevy::math::U16Vec2>, ) -> Val<bevy::math::BVec2> { - let output: Val<bevy::math::BVec2> = bevy::math::UVec2::cmpge( + let output: Val<bevy::math::BVec2> = bevy::math::U16Vec2::cmpge( _self.into_inner(), rhs.into_inner(), ) @@ -6913,10 +11781,10 @@ impl bevy::math::UVec2 { /// In other words this computes `[self.x > rhs.x, self.y > rhs.y, ..]` for all /// elements. fn cmpgt( - _self: Val<bevy::math::UVec2>, - rhs: Val<bevy::math::UVec2>, + _self: Val<bevy::math::U16Vec2>, + rhs: Val<bevy::math::U16Vec2>, ) -> Val<bevy::math::BVec2> { - let output: Val<bevy::math::BVec2> = bevy::math::UVec2::cmpgt( + let output: Val<bevy::math::BVec2> = bevy::math::U16Vec2::cmpgt( _self.into_inner(), rhs.into_inner(), ) @@ -6928,10 +11796,10 @@ impl bevy::math::UVec2 { /// In other words this computes `[self.x <= rhs.x, self.y <= rhs.y, ..]` for all /// elements. fn cmple( - _self: Val<bevy::math::UVec2>, - rhs: Val<bevy::math::UVec2>, + _self: Val<bevy::math::U16Vec2>, + rhs: Val<bevy::math::U16Vec2>, ) -> Val<bevy::math::BVec2> { - let output: Val<bevy::math::BVec2> = bevy::math::UVec2::cmple( + let output: Val<bevy::math::BVec2> = bevy::math::U16Vec2::cmple( _self.into_inner(), rhs.into_inner(), ) @@ -6943,10 +11811,10 @@ impl bevy::math::UVec2 { /// In other words this computes `[self.x < rhs.x, self.y < rhs.y, ..]` for all /// elements. fn cmplt( - _self: Val<bevy::math::UVec2>, - rhs: Val<bevy::math::UVec2>, + _self: Val<bevy::math::U16Vec2>, + rhs: Val<bevy::math::U16Vec2>, ) -> Val<bevy::math::BVec2> { - let output: Val<bevy::math::BVec2> = bevy::math::UVec2::cmplt( + let output: Val<bevy::math::BVec2> = bevy::math::U16Vec2::cmplt( _self.into_inner(), rhs.into_inner(), ) @@ -6958,55 +11826,28 @@ impl bevy::math::UVec2 { /// In other words this computes `[self.x != rhs.x, self.y != rhs.y, ..]` for all /// elements. fn cmpne( - _self: Val<bevy::math::UVec2>, - rhs: Val<bevy::math::UVec2>, + _self: Val<bevy::math::U16Vec2>, + rhs: Val<bevy::math::U16Vec2>, ) -> Val<bevy::math::BVec2> { - let output: Val<bevy::math::BVec2> = bevy::math::UVec2::cmpne( + let output: Val<bevy::math::BVec2> = bevy::math::U16Vec2::cmpne( _self.into_inner(), rhs.into_inner(), ) .into(); output } - fn div( - _self: Val<bevy::math::UVec2>, - rhs: Ref<bevy::math::UVec2>, - ) -> Val<bevy::math::UVec2> { - let output: Val<bevy::math::UVec2> = <bevy::math::UVec2 as std::ops::Div< - &bevy::math::UVec2, - >>::div(_self.into_inner(), &rhs) - .into(); - output - } - fn div( - _self: Val<bevy::math::UVec2>, - rhs: Val<bevy::math::UVec2>, - ) -> Val<bevy::math::UVec2> { - let output: Val<bevy::math::UVec2> = <bevy::math::UVec2 as std::ops::Div< - bevy::math::UVec2, - >>::div(_self.into_inner(), rhs.into_inner()) - .into(); - output - } - fn div(_self: Val<bevy::math::UVec2>, rhs: u32) -> Val<bevy::math::UVec2> { - let output: Val<bevy::math::UVec2> = <bevy::math::UVec2 as std::ops::Div< - u32, - >>::div(_self.into_inner(), rhs) - .into(); - output - } /// Computes the dot product of `self` and `rhs`. - fn dot(_self: Val<bevy::math::UVec2>, rhs: Val<bevy::math::UVec2>) -> u32 { - let output: u32 = bevy::math::UVec2::dot(_self.into_inner(), rhs.into_inner()) + fn dot(_self: Val<bevy::math::U16Vec2>, rhs: Val<bevy::math::U16Vec2>) -> u16 { + let output: u16 = bevy::math::U16Vec2::dot(_self.into_inner(), rhs.into_inner()) .into(); output } /// Returns a vector where every component is the dot product of `self` and `rhs`. fn dot_into_vec( - _self: Val<bevy::math::UVec2>, - rhs: Val<bevy::math::UVec2>, - ) -> Val<bevy::math::UVec2> { - let output: Val<bevy::math::UVec2> = bevy::math::UVec2::dot_into_vec( + _self: Val<bevy::math::U16Vec2>, + rhs: Val<bevy::math::U16Vec2>, + ) -> Val<bevy::math::U16Vec2> { + let output: Val<bevy::math::U16Vec2> = bevy::math::U16Vec2::dot_into_vec( _self.into_inner(), rhs.into_inner(), ) @@ -7015,26 +11856,20 @@ impl bevy::math::UVec2 { } /// Returns the product of all elements of `self`. /// In other words, this computes `self.x * self.y * ..`. - fn element_product(_self: Val<bevy::math::UVec2>) -> u32 { - let output: u32 = bevy::math::UVec2::element_product(_self.into_inner()).into(); + fn element_product(_self: Val<bevy::math::U16Vec2>) -> u16 { + let output: u16 = bevy::math::U16Vec2::element_product(_self.into_inner()) + .into(); output } /// Returns the sum of all elements of `self`. /// In other words, this computes `self.x + self.y + ..`. - fn element_sum(_self: Val<bevy::math::UVec2>) -> u32 { - let output: u32 = bevy::math::UVec2::element_sum(_self.into_inner()).into(); - output - } - fn eq(_self: Ref<bevy::math::UVec2>, other: Ref<bevy::math::UVec2>) -> bool { - let output: bool = <bevy::math::UVec2 as std::cmp::PartialEq< - bevy::math::UVec2, - >>::eq(&_self, &other) - .into(); + fn element_sum(_self: Val<bevy::math::U16Vec2>) -> u16 { + let output: u16 = bevy::math::U16Vec2::element_sum(_self.into_inner()).into(); output } /// Creates a 3D vector from `self` and the given `z` value. - fn extend(_self: Val<bevy::math::UVec2>, z: u32) -> Val<bevy::math::UVec3> { - let output: Val<bevy::math::UVec3> = bevy::math::UVec2::extend( + fn extend(_self: Val<bevy::math::U16Vec2>, z: u16) -> Val<bevy::math::U16Vec3> { + let output: Val<bevy::math::U16Vec3> = bevy::math::U16Vec2::extend( _self.into_inner(), z, ) @@ -7042,22 +11877,22 @@ impl bevy::math::UVec2 { output } /// Creates a new vector from an array. - fn from_array(a: [u32; 2]) -> Val<bevy::math::UVec2> { - let output: Val<bevy::math::UVec2> = bevy::math::UVec2::from_array(a).into(); + fn from_array(a: [u16; 2]) -> Val<bevy::math::U16Vec2> { + let output: Val<bevy::math::U16Vec2> = bevy::math::U16Vec2::from_array(a).into(); output } /// Computes the squared length of `self`. - fn length_squared(_self: Val<bevy::math::UVec2>) -> u32 { - let output: u32 = bevy::math::UVec2::length_squared(_self.into_inner()).into(); + fn length_squared(_self: Val<bevy::math::U16Vec2>) -> u16 { + let output: u16 = bevy::math::U16Vec2::length_squared(_self.into_inner()).into(); output } /// Returns a vector containing the maximum values for each element of `self` and `rhs`. /// In other words this computes `[self.x.max(rhs.x), self.y.max(rhs.y), ..]`. fn max( - _self: Val<bevy::math::UVec2>, - rhs: Val<bevy::math::UVec2>, - ) -> Val<bevy::math::UVec2> { - let output: Val<bevy::math::UVec2> = bevy::math::UVec2::max( + _self: Val<bevy::math::U16Vec2>, + rhs: Val<bevy::math::U16Vec2>, + ) -> Val<bevy::math::U16Vec2> { + let output: Val<bevy::math::U16Vec2> = bevy::math::U16Vec2::max( _self.into_inner(), rhs.into_inner(), ) @@ -7066,17 +11901,17 @@ impl bevy::math::UVec2 { } /// Returns the horizontal maximum of `self`. /// In other words this computes `max(x, y, ..)`. - fn max_element(_self: Val<bevy::math::UVec2>) -> u32 { - let output: u32 = bevy::math::UVec2::max_element(_self.into_inner()).into(); + fn max_element(_self: Val<bevy::math::U16Vec2>) -> u16 { + let output: u16 = bevy::math::U16Vec2::max_element(_self.into_inner()).into(); output } /// Returns a vector containing the minimum values for each element of `self` and `rhs`. /// In other words this computes `[self.x.min(rhs.x), self.y.min(rhs.y), ..]`. fn min( - _self: Val<bevy::math::UVec2>, - rhs: Val<bevy::math::UVec2>, - ) -> Val<bevy::math::UVec2> { - let output: Val<bevy::math::UVec2> = bevy::math::UVec2::min( + _self: Val<bevy::math::U16Vec2>, + rhs: Val<bevy::math::U16Vec2>, + ) -> Val<bevy::math::U16Vec2> { + let output: Val<bevy::math::U16Vec2> = bevy::math::U16Vec2::min( _self.into_inner(), rhs.into_inner(), ) @@ -7085,76 +11920,22 @@ impl bevy::math::UVec2 { } /// Returns the horizontal minimum of `self`. /// In other words this computes `min(x, y, ..)`. - fn min_element(_self: Val<bevy::math::UVec2>) -> u32 { - let output: u32 = bevy::math::UVec2::min_element(_self.into_inner()).into(); - output - } - fn mul( - _self: Val<bevy::math::UVec2>, - rhs: Ref<bevy::math::UVec2>, - ) -> Val<bevy::math::UVec2> { - let output: Val<bevy::math::UVec2> = <bevy::math::UVec2 as std::ops::Mul< - &bevy::math::UVec2, - >>::mul(_self.into_inner(), &rhs) - .into(); - output - } - fn mul( - _self: Val<bevy::math::UVec2>, - rhs: Val<bevy::math::UVec2>, - ) -> Val<bevy::math::UVec2> { - let output: Val<bevy::math::UVec2> = <bevy::math::UVec2 as std::ops::Mul< - bevy::math::UVec2, - >>::mul(_self.into_inner(), rhs.into_inner()) - .into(); - output - } - fn mul(_self: Val<bevy::math::UVec2>, rhs: u32) -> Val<bevy::math::UVec2> { - let output: Val<bevy::math::UVec2> = <bevy::math::UVec2 as std::ops::Mul< - u32, - >>::mul(_self.into_inner(), rhs) - .into(); + fn min_element(_self: Val<bevy::math::U16Vec2>) -> u16 { + let output: u16 = bevy::math::U16Vec2::min_element(_self.into_inner()).into(); output } /// Creates a new vector. - fn new(x: u32, y: u32) -> Val<bevy::math::UVec2> { - let output: Val<bevy::math::UVec2> = bevy::math::UVec2::new(x, y).into(); - output - } - fn rem( - _self: Val<bevy::math::UVec2>, - rhs: Ref<bevy::math::UVec2>, - ) -> Val<bevy::math::UVec2> { - let output: Val<bevy::math::UVec2> = <bevy::math::UVec2 as std::ops::Rem< - &bevy::math::UVec2, - >>::rem(_self.into_inner(), &rhs) - .into(); - output - } - fn rem( - _self: Val<bevy::math::UVec2>, - rhs: Val<bevy::math::UVec2>, - ) -> Val<bevy::math::UVec2> { - let output: Val<bevy::math::UVec2> = <bevy::math::UVec2 as std::ops::Rem< - bevy::math::UVec2, - >>::rem(_self.into_inner(), rhs.into_inner()) - .into(); - output - } - fn rem(_self: Val<bevy::math::UVec2>, rhs: u32) -> Val<bevy::math::UVec2> { - let output: Val<bevy::math::UVec2> = <bevy::math::UVec2 as std::ops::Rem< - u32, - >>::rem(_self.into_inner(), rhs) - .into(); + fn new(x: u16, y: u16) -> Val<bevy::math::U16Vec2> { + let output: Val<bevy::math::U16Vec2> = bevy::math::U16Vec2::new(x, y).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<bevy::math::UVec2>, - rhs: Val<bevy::math::UVec2>, - ) -> Val<bevy::math::UVec2> { - let output: Val<bevy::math::UVec2> = bevy::math::UVec2::saturating_add( + _self: Val<bevy::math::U16Vec2>, + rhs: Val<bevy::math::U16Vec2>, + ) -> Val<bevy::math::U16Vec2> { + let output: Val<bevy::math::U16Vec2> = bevy::math::U16Vec2::saturating_add( _self.into_inner(), rhs.into_inner(), ) @@ -7164,10 +11945,10 @@ impl bevy::math::UVec2 { /// Returns a vector containing the saturating addition of `self` and signed vector `rhs`. /// In other words this computes `[self.x.saturating_add_signed(rhs.x), self.y.saturating_add_signed(rhs.y), ..]`. fn saturating_add_signed( - _self: Val<bevy::math::UVec2>, - rhs: Val<bevy::math::IVec2>, - ) -> Val<bevy::math::UVec2> { - let output: Val<bevy::math::UVec2> = bevy::math::UVec2::saturating_add_signed( + _self: Val<bevy::math::U16Vec2>, + rhs: Val<bevy::math::I16Vec2>, + ) -> Val<bevy::math::U16Vec2> { + let output: Val<bevy::math::U16Vec2> = bevy::math::U16Vec2::saturating_add_signed( _self.into_inner(), rhs.into_inner(), ) @@ -7177,10 +11958,10 @@ impl bevy::math::UVec2 { /// Returns a vector containing the saturating division of `self` and `rhs`. /// In other words this computes `[self.x.saturating_div(rhs.x), self.y.saturating_div(rhs.y), ..]`. fn saturating_div( - _self: Val<bevy::math::UVec2>, - rhs: Val<bevy::math::UVec2>, - ) -> Val<bevy::math::UVec2> { - let output: Val<bevy::math::UVec2> = bevy::math::UVec2::saturating_div( + _self: Val<bevy::math::U16Vec2>, + rhs: Val<bevy::math::U16Vec2>, + ) -> Val<bevy::math::U16Vec2> { + let output: Val<bevy::math::U16Vec2> = bevy::math::U16Vec2::saturating_div( _self.into_inner(), rhs.into_inner(), ) @@ -7190,10 +11971,10 @@ impl bevy::math::UVec2 { /// Returns a vector containing the saturating multiplication of `self` and `rhs`. /// In other words this computes `[self.x.saturating_mul(rhs.x), self.y.saturating_mul(rhs.y), ..]`. fn saturating_mul( - _self: Val<bevy::math::UVec2>, - rhs: Val<bevy::math::UVec2>, - ) -> Val<bevy::math::UVec2> { - let output: Val<bevy::math::UVec2> = bevy::math::UVec2::saturating_mul( + _self: Val<bevy::math::U16Vec2>, + rhs: Val<bevy::math::U16Vec2>, + ) -> Val<bevy::math::U16Vec2> { + let output: Val<bevy::math::U16Vec2> = bevy::math::U16Vec2::saturating_mul( _self.into_inner(), rhs.into_inner(), ) @@ -7203,10 +11984,10 @@ impl bevy::math::UVec2 { /// Returns a vector containing the saturating subtraction of `self` and `rhs`. /// In other words this computes `[self.x.saturating_sub(rhs.x), self.y.saturating_sub(rhs.y), ..]`. fn saturating_sub( - _self: Val<bevy::math::UVec2>, - rhs: Val<bevy::math::UVec2>, - ) -> Val<bevy::math::UVec2> { - let output: Val<bevy::math::UVec2> = bevy::math::UVec2::saturating_sub( + _self: Val<bevy::math::U16Vec2>, + rhs: Val<bevy::math::U16Vec2>, + ) -> Val<bevy::math::U16Vec2> { + let output: Val<bevy::math::U16Vec2> = bevy::math::U16Vec2::saturating_sub( _self.into_inner(), rhs.into_inner(), ) @@ -7219,10 +12000,10 @@ impl bevy::math::UVec2 { /// uses the element from `if_false`. fn select( mask: Val<bevy::math::BVec2>, - if_true: Val<bevy::math::UVec2>, - if_false: Val<bevy::math::UVec2>, - ) -> Val<bevy::math::UVec2> { - let output: Val<bevy::math::UVec2> = bevy::math::UVec2::select( + if_true: Val<bevy::math::U16Vec2>, + if_false: Val<bevy::math::U16Vec2>, + ) -> Val<bevy::math::U16Vec2> { + let output: Val<bevy::math::U16Vec2> = bevy::math::U16Vec2::select( mask.into_inner(), if_true.into_inner(), if_false.into_inner(), @@ -7231,45 +12012,18 @@ impl bevy::math::UVec2 { output } /// Creates a vector with all elements set to `v`. - fn splat(v: u32) -> Val<bevy::math::UVec2> { - let output: Val<bevy::math::UVec2> = bevy::math::UVec2::splat(v).into(); - output - } - fn sub( - _self: Val<bevy::math::UVec2>, - rhs: Ref<bevy::math::UVec2>, - ) -> Val<bevy::math::UVec2> { - let output: Val<bevy::math::UVec2> = <bevy::math::UVec2 as std::ops::Sub< - &bevy::math::UVec2, - >>::sub(_self.into_inner(), &rhs) - .into(); - output - } - fn sub( - _self: Val<bevy::math::UVec2>, - rhs: Val<bevy::math::UVec2>, - ) -> Val<bevy::math::UVec2> { - let output: Val<bevy::math::UVec2> = <bevy::math::UVec2 as std::ops::Sub< - bevy::math::UVec2, - >>::sub(_self.into_inner(), rhs.into_inner()) - .into(); - output - } - fn sub(_self: Val<bevy::math::UVec2>, rhs: u32) -> Val<bevy::math::UVec2> { - let output: Val<bevy::math::UVec2> = <bevy::math::UVec2 as std::ops::Sub< - u32, - >>::sub(_self.into_inner(), rhs) - .into(); + fn splat(v: u16) -> Val<bevy::math::U16Vec2> { + let output: Val<bevy::math::U16Vec2> = bevy::math::U16Vec2::splat(v).into(); output } /// `[x, y]` - fn to_array(_self: Ref<bevy::math::UVec2>) -> [u32; 2] { - let output: [u32; 2] = bevy::math::UVec2::to_array(&_self).into(); + fn to_array(_self: Ref<bevy::math::U16Vec2>) -> [u16; 2] { + let output: [u16; 2] = bevy::math::U16Vec2::to_array(&_self).into(); output } /// Creates a 2D vector from `self` with the given value of `x`. - fn with_x(_self: Val<bevy::math::UVec2>, x: u32) -> Val<bevy::math::UVec2> { - let output: Val<bevy::math::UVec2> = bevy::math::UVec2::with_x( + fn with_x(_self: Val<bevy::math::U16Vec2>, x: u16) -> Val<bevy::math::U16Vec2> { + let output: Val<bevy::math::U16Vec2> = bevy::math::U16Vec2::with_x( _self.into_inner(), x, ) @@ -7277,8 +12031,8 @@ impl bevy::math::UVec2 { output } /// Creates a 2D vector from `self` with the given value of `y`. - fn with_y(_self: Val<bevy::math::UVec2>, y: u32) -> Val<bevy::math::UVec2> { - let output: Val<bevy::math::UVec2> = bevy::math::UVec2::with_y( + fn with_y(_self: Val<bevy::math::U16Vec2>, y: u16) -> Val<bevy::math::U16Vec2> { + let output: Val<bevy::math::U16Vec2> = bevy::math::U16Vec2::with_y( _self.into_inner(), y, ) @@ -7288,10 +12042,10 @@ impl bevy::math::UVec2 { /// Returns a vector containing the wrapping addition of `self` and `rhs`. /// In other words this computes `[self.x.wrapping_add(rhs.x), self.y.wrapping_add(rhs.y), ..]`. fn wrapping_add( - _self: Val<bevy::math::UVec2>, - rhs: Val<bevy::math::UVec2>, - ) -> Val<bevy::math::UVec2> { - let output: Val<bevy::math::UVec2> = bevy::math::UVec2::wrapping_add( + _self: Val<bevy::math::U16Vec2>, + rhs: Val<bevy::math::U16Vec2>, + ) -> Val<bevy::math::U16Vec2> { + let output: Val<bevy::math::U16Vec2> = bevy::math::U16Vec2::wrapping_add( _self.into_inner(), rhs.into_inner(), ) @@ -7301,10 +12055,10 @@ impl bevy::math::UVec2 { /// Returns a vector containing the wrapping addition of `self` and signed vector `rhs`. /// In other words this computes `[self.x.wrapping_add_signed(rhs.x), self.y.wrapping_add_signed(rhs.y), ..]`. fn wrapping_add_signed( - _self: Val<bevy::math::UVec2>, - rhs: Val<bevy::math::IVec2>, - ) -> Val<bevy::math::UVec2> { - let output: Val<bevy::math::UVec2> = bevy::math::UVec2::wrapping_add_signed( + _self: Val<bevy::math::U16Vec2>, + rhs: Val<bevy::math::I16Vec2>, + ) -> Val<bevy::math::U16Vec2> { + let output: Val<bevy::math::U16Vec2> = bevy::math::U16Vec2::wrapping_add_signed( _self.into_inner(), rhs.into_inner(), ) @@ -7314,10 +12068,10 @@ impl bevy::math::UVec2 { /// Returns a vector containing the wrapping division of `self` and `rhs`. /// In other words this computes `[self.x.wrapping_div(rhs.x), self.y.wrapping_div(rhs.y), ..]`. fn wrapping_div( - _self: Val<bevy::math::UVec2>, - rhs: Val<bevy::math::UVec2>, - ) -> Val<bevy::math::UVec2> { - let output: Val<bevy::math::UVec2> = bevy::math::UVec2::wrapping_div( + _self: Val<bevy::math::U16Vec2>, + rhs: Val<bevy::math::U16Vec2>, + ) -> Val<bevy::math::U16Vec2> { + let output: Val<bevy::math::U16Vec2> = bevy::math::U16Vec2::wrapping_div( _self.into_inner(), rhs.into_inner(), ) @@ -7327,10 +12081,10 @@ impl bevy::math::UVec2 { /// Returns a vector containing the wrapping multiplication of `self` and `rhs`. /// In other words this computes `[self.x.wrapping_mul(rhs.x), self.y.wrapping_mul(rhs.y), ..]`. fn wrapping_mul( - _self: Val<bevy::math::UVec2>, - rhs: Val<bevy::math::UVec2>, - ) -> Val<bevy::math::UVec2> { - let output: Val<bevy::math::UVec2> = bevy::math::UVec2::wrapping_mul( + _self: Val<bevy::math::U16Vec2>, + rhs: Val<bevy::math::U16Vec2>, + ) -> Val<bevy::math::U16Vec2> { + let output: Val<bevy::math::U16Vec2> = bevy::math::U16Vec2::wrapping_mul( _self.into_inner(), rhs.into_inner(), ) @@ -7340,10 +12094,10 @@ impl bevy::math::UVec2 { /// Returns a vector containing the wrapping subtraction of `self` and `rhs`. /// In other words this computes `[self.x.wrapping_sub(rhs.x), self.y.wrapping_sub(rhs.y), ..]`. fn wrapping_sub( - _self: Val<bevy::math::UVec2>, - rhs: Val<bevy::math::UVec2>, - ) -> Val<bevy::math::UVec2> { - let output: Val<bevy::math::UVec2> = bevy::math::UVec2::wrapping_sub( + _self: Val<bevy::math::U16Vec2>, + rhs: Val<bevy::math::U16Vec2>, + ) -> Val<bevy::math::U16Vec2> { + let output: Val<bevy::math::U16Vec2> = bevy::math::U16Vec2::wrapping_sub( _self.into_inner(), rhs.into_inner(), ) @@ -7353,87 +12107,80 @@ impl bevy::math::UVec2 { } #[script_bindings( remote, - name = "u_vec_3_functions", + name = "u_16_vec_3_functions", bms_core_path = "bevy_mod_scripting_core", generated )] -impl bevy::math::UVec3 { - fn add( - _self: Val<bevy::math::UVec3>, - rhs: Ref<bevy::math::UVec3>, - ) -> Val<bevy::math::UVec3> { - let output: Val<bevy::math::UVec3> = <bevy::math::UVec3 as std::ops::Add< - &bevy::math::UVec3, - >>::add(_self.into_inner(), &rhs) +impl bevy::math::U16Vec3 { + /// Casts all elements of `self` to `f64`. + fn as_dvec3(_self: Ref<bevy::math::U16Vec3>) -> Val<bevy::math::DVec3> { + let output: Val<bevy::math::DVec3> = bevy::math::U16Vec3::as_dvec3(&_self) .into(); output } - fn add( - _self: Val<bevy::math::UVec3>, - rhs: Val<bevy::math::UVec3>, - ) -> Val<bevy::math::UVec3> { - let output: Val<bevy::math::UVec3> = <bevy::math::UVec3 as std::ops::Add< - bevy::math::UVec3, - >>::add(_self.into_inner(), rhs.into_inner()) + /// Casts all elements of `self` to `i16`. + fn as_i16vec3(_self: Ref<bevy::math::U16Vec3>) -> Val<bevy::math::I16Vec3> { + let output: Val<bevy::math::I16Vec3> = bevy::math::U16Vec3::as_i16vec3(&_self) .into(); output } - fn add(_self: Val<bevy::math::UVec3>, rhs: u32) -> Val<bevy::math::UVec3> { - let output: Val<bevy::math::UVec3> = <bevy::math::UVec3 as std::ops::Add< - u32, - >>::add(_self.into_inner(), rhs) + /// Casts all elements of `self` to `i64`. + fn as_i64vec3(_self: Ref<bevy::math::U16Vec3>) -> Val<bevy::math::I64Vec3> { + let output: Val<bevy::math::I64Vec3> = bevy::math::U16Vec3::as_i64vec3(&_self) .into(); output } - /// Casts all elements of `self` to `f64`. - fn as_dvec3(_self: Ref<bevy::math::UVec3>) -> Val<bevy::math::DVec3> { - let output: Val<bevy::math::DVec3> = bevy::math::UVec3::as_dvec3(&_self).into(); - output - } - /// Casts all elements of `self` to `i64`. - fn as_i64vec3(_self: Ref<bevy::math::UVec3>) -> Val<bevy::math::I64Vec3> { - let output: Val<bevy::math::I64Vec3> = bevy::math::UVec3::as_i64vec3(&_self) + /// Casts all elements of `self` to `i8`. + fn as_i8vec3(_self: Ref<bevy::math::U16Vec3>) -> Val<bevy::math::I8Vec3> { + let output: Val<bevy::math::I8Vec3> = bevy::math::U16Vec3::as_i8vec3(&_self) .into(); output } /// Casts all elements of `self` to `i32`. - fn as_ivec3(_self: Ref<bevy::math::UVec3>) -> Val<bevy::math::IVec3> { - let output: Val<bevy::math::IVec3> = bevy::math::UVec3::as_ivec3(&_self).into(); + fn as_ivec3(_self: Ref<bevy::math::U16Vec3>) -> Val<bevy::math::IVec3> { + let output: Val<bevy::math::IVec3> = bevy::math::U16Vec3::as_ivec3(&_self) + .into(); output } /// Casts all elements of `self` to `u64`. - fn as_u64vec3(_self: Ref<bevy::math::UVec3>) -> Val<bevy::math::U64Vec3> { - let output: Val<bevy::math::U64Vec3> = bevy::math::UVec3::as_u64vec3(&_self) + fn as_u64vec3(_self: Ref<bevy::math::U16Vec3>) -> Val<bevy::math::U64Vec3> { + let output: Val<bevy::math::U64Vec3> = bevy::math::U16Vec3::as_u64vec3(&_self) .into(); output } - /// Casts all elements of `self` to `f32`. - fn as_vec3(_self: Ref<bevy::math::UVec3>) -> Val<bevy::math::Vec3> { - let output: Val<bevy::math::Vec3> = bevy::math::UVec3::as_vec3(&_self).into(); + /// Casts all elements of `self` to `u8`. + fn as_u8vec3(_self: Ref<bevy::math::U16Vec3>) -> Val<bevy::math::U8Vec3> { + let output: Val<bevy::math::U8Vec3> = bevy::math::U16Vec3::as_u8vec3(&_self) + .into(); + output + } + /// Casts all elements of `self` to `u32`. + fn as_uvec3(_self: Ref<bevy::math::U16Vec3>) -> Val<bevy::math::UVec3> { + let output: Val<bevy::math::UVec3> = bevy::math::U16Vec3::as_uvec3(&_self) + .into(); output } /// Casts all elements of `self` to `f32`. - fn as_vec3a(_self: Ref<bevy::math::UVec3>) -> Val<bevy::math::Vec3A> { - let output: Val<bevy::math::Vec3A> = bevy::math::UVec3::as_vec3a(&_self).into(); + fn as_vec3(_self: Ref<bevy::math::U16Vec3>) -> Val<bevy::math::Vec3> { + let output: Val<bevy::math::Vec3> = bevy::math::U16Vec3::as_vec3(&_self).into(); output } - fn assert_receiver_is_total_eq(_self: Ref<bevy::math::UVec3>) -> () { - let output: () = <bevy::math::UVec3 as std::cmp::Eq>::assert_receiver_is_total_eq( - &_self, - ) + /// Casts all elements of `self` to `f32`. + fn as_vec3a(_self: Ref<bevy::math::U16Vec3>) -> Val<bevy::math::Vec3A> { + let output: Val<bevy::math::Vec3A> = bevy::math::U16Vec3::as_vec3a(&_self) .into(); output } - /// Component-wise clamping of values, similar to [`u32::clamp`]. + /// Component-wise clamping of values, similar to [`u16::clamp`]. /// Each element in `min` must be less-or-equal to the corresponding element in `max`. /// # Panics /// Will panic if `min` is greater than `max` when `glam_assert` is enabled. fn clamp( - _self: Val<bevy::math::UVec3>, - min: Val<bevy::math::UVec3>, - max: Val<bevy::math::UVec3>, - ) -> Val<bevy::math::UVec3> { - let output: Val<bevy::math::UVec3> = bevy::math::UVec3::clamp( + _self: Val<bevy::math::U16Vec3>, + min: Val<bevy::math::U16Vec3>, + max: Val<bevy::math::U16Vec3>, + ) -> Val<bevy::math::U16Vec3> { + let output: Val<bevy::math::U16Vec3> = bevy::math::U16Vec3::clamp( _self.into_inner(), min.into_inner(), max.into_inner(), @@ -7441,22 +12188,15 @@ impl bevy::math::UVec3 { .into(); output } - fn clone(_self: Ref<bevy::math::UVec3>) -> Val<bevy::math::UVec3> { - let output: Val<bevy::math::UVec3> = <bevy::math::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<bevy::math::UVec3>, - rhs: Val<bevy::math::UVec3>, + fn cmpeq( + _self: Val<bevy::math::U16Vec3>, + rhs: Val<bevy::math::U16Vec3>, ) -> Val<bevy::math::BVec3> { - let output: Val<bevy::math::BVec3> = bevy::math::UVec3::cmpeq( + let output: Val<bevy::math::BVec3> = bevy::math::U16Vec3::cmpeq( _self.into_inner(), rhs.into_inner(), ) @@ -7468,10 +12208,10 @@ impl bevy::math::UVec3 { /// In other words this computes `[self.x >= rhs.x, self.y >= rhs.y, ..]` for all /// elements. fn cmpge( - _self: Val<bevy::math::UVec3>, - rhs: Val<bevy::math::UVec3>, + _self: Val<bevy::math::U16Vec3>, + rhs: Val<bevy::math::U16Vec3>, ) -> Val<bevy::math::BVec3> { - let output: Val<bevy::math::BVec3> = bevy::math::UVec3::cmpge( + let output: Val<bevy::math::BVec3> = bevy::math::U16Vec3::cmpge( _self.into_inner(), rhs.into_inner(), ) @@ -7483,10 +12223,10 @@ impl bevy::math::UVec3 { /// In other words this computes `[self.x > rhs.x, self.y > rhs.y, ..]` for all /// elements. fn cmpgt( - _self: Val<bevy::math::UVec3>, - rhs: Val<bevy::math::UVec3>, + _self: Val<bevy::math::U16Vec3>, + rhs: Val<bevy::math::U16Vec3>, ) -> Val<bevy::math::BVec3> { - let output: Val<bevy::math::BVec3> = bevy::math::UVec3::cmpgt( + let output: Val<bevy::math::BVec3> = bevy::math::U16Vec3::cmpgt( _self.into_inner(), rhs.into_inner(), ) @@ -7498,10 +12238,10 @@ impl bevy::math::UVec3 { /// In other words this computes `[self.x <= rhs.x, self.y <= rhs.y, ..]` for all /// elements. fn cmple( - _self: Val<bevy::math::UVec3>, - rhs: Val<bevy::math::UVec3>, + _self: Val<bevy::math::U16Vec3>, + rhs: Val<bevy::math::U16Vec3>, ) -> Val<bevy::math::BVec3> { - let output: Val<bevy::math::BVec3> = bevy::math::UVec3::cmple( + let output: Val<bevy::math::BVec3> = bevy::math::U16Vec3::cmple( _self.into_inner(), rhs.into_inner(), ) @@ -7513,10 +12253,10 @@ impl bevy::math::UVec3 { /// In other words this computes `[self.x < rhs.x, self.y < rhs.y, ..]` for all /// elements. fn cmplt( - _self: Val<bevy::math::UVec3>, - rhs: Val<bevy::math::UVec3>, + _self: Val<bevy::math::U16Vec3>, + rhs: Val<bevy::math::U16Vec3>, ) -> Val<bevy::math::BVec3> { - let output: Val<bevy::math::BVec3> = bevy::math::UVec3::cmplt( + let output: Val<bevy::math::BVec3> = bevy::math::U16Vec3::cmplt( _self.into_inner(), rhs.into_inner(), ) @@ -7528,10 +12268,10 @@ impl bevy::math::UVec3 { /// In other words this computes `[self.x != rhs.x, self.y != rhs.y, ..]` for all /// elements. fn cmpne( - _self: Val<bevy::math::UVec3>, - rhs: Val<bevy::math::UVec3>, + _self: Val<bevy::math::U16Vec3>, + rhs: Val<bevy::math::U16Vec3>, ) -> Val<bevy::math::BVec3> { - let output: Val<bevy::math::BVec3> = bevy::math::UVec3::cmpne( + let output: Val<bevy::math::BVec3> = bevy::math::U16Vec3::cmpne( _self.into_inner(), rhs.into_inner(), ) @@ -7540,55 +12280,28 @@ impl bevy::math::UVec3 { } /// Computes the cross product of `self` and `rhs`. fn cross( - _self: Val<bevy::math::UVec3>, - rhs: Val<bevy::math::UVec3>, - ) -> Val<bevy::math::UVec3> { - let output: Val<bevy::math::UVec3> = bevy::math::UVec3::cross( + _self: Val<bevy::math::U16Vec3>, + rhs: Val<bevy::math::U16Vec3>, + ) -> Val<bevy::math::U16Vec3> { + let output: Val<bevy::math::U16Vec3> = bevy::math::U16Vec3::cross( _self.into_inner(), rhs.into_inner(), ) .into(); output } - fn div( - _self: Val<bevy::math::UVec3>, - rhs: Ref<bevy::math::UVec3>, - ) -> Val<bevy::math::UVec3> { - let output: Val<bevy::math::UVec3> = <bevy::math::UVec3 as std::ops::Div< - &bevy::math::UVec3, - >>::div(_self.into_inner(), &rhs) - .into(); - output - } - fn div( - _self: Val<bevy::math::UVec3>, - rhs: Val<bevy::math::UVec3>, - ) -> Val<bevy::math::UVec3> { - let output: Val<bevy::math::UVec3> = <bevy::math::UVec3 as std::ops::Div< - bevy::math::UVec3, - >>::div(_self.into_inner(), rhs.into_inner()) - .into(); - output - } - fn div(_self: Val<bevy::math::UVec3>, rhs: u32) -> Val<bevy::math::UVec3> { - let output: Val<bevy::math::UVec3> = <bevy::math::UVec3 as std::ops::Div< - u32, - >>::div(_self.into_inner(), rhs) - .into(); - output - } /// Computes the dot product of `self` and `rhs`. - fn dot(_self: Val<bevy::math::UVec3>, rhs: Val<bevy::math::UVec3>) -> u32 { - let output: u32 = bevy::math::UVec3::dot(_self.into_inner(), rhs.into_inner()) + fn dot(_self: Val<bevy::math::U16Vec3>, rhs: Val<bevy::math::U16Vec3>) -> u16 { + let output: u16 = bevy::math::U16Vec3::dot(_self.into_inner(), rhs.into_inner()) .into(); output } /// Returns a vector where every component is the dot product of `self` and `rhs`. fn dot_into_vec( - _self: Val<bevy::math::UVec3>, - rhs: Val<bevy::math::UVec3>, - ) -> Val<bevy::math::UVec3> { - let output: Val<bevy::math::UVec3> = bevy::math::UVec3::dot_into_vec( + _self: Val<bevy::math::U16Vec3>, + rhs: Val<bevy::math::U16Vec3>, + ) -> Val<bevy::math::U16Vec3> { + let output: Val<bevy::math::U16Vec3> = bevy::math::U16Vec3::dot_into_vec( _self.into_inner(), rhs.into_inner(), ) @@ -7597,26 +12310,20 @@ impl bevy::math::UVec3 { } /// Returns the product of all elements of `self`. /// In other words, this computes `self.x * self.y * ..`. - fn element_product(_self: Val<bevy::math::UVec3>) -> u32 { - let output: u32 = bevy::math::UVec3::element_product(_self.into_inner()).into(); + fn element_product(_self: Val<bevy::math::U16Vec3>) -> u16 { + let output: u16 = bevy::math::U16Vec3::element_product(_self.into_inner()) + .into(); output } /// Returns the sum of all elements of `self`. /// In other words, this computes `self.x + self.y + ..`. - fn element_sum(_self: Val<bevy::math::UVec3>) -> u32 { - let output: u32 = bevy::math::UVec3::element_sum(_self.into_inner()).into(); - output - } - fn eq(_self: Ref<bevy::math::UVec3>, other: Ref<bevy::math::UVec3>) -> bool { - let output: bool = <bevy::math::UVec3 as std::cmp::PartialEq< - bevy::math::UVec3, - >>::eq(&_self, &other) - .into(); + fn element_sum(_self: Val<bevy::math::U16Vec3>) -> u16 { + let output: u16 = bevy::math::U16Vec3::element_sum(_self.into_inner()).into(); output } /// Creates a 4D vector from `self` and the given `w` value. - fn extend(_self: Val<bevy::math::UVec3>, w: u32) -> Val<bevy::math::UVec4> { - let output: Val<bevy::math::UVec4> = bevy::math::UVec3::extend( + fn extend(_self: Val<bevy::math::U16Vec3>, w: u16) -> Val<bevy::math::U16Vec4> { + let output: Val<bevy::math::U16Vec4> = bevy::math::U16Vec3::extend( _self.into_inner(), w, ) @@ -7624,22 +12331,22 @@ impl bevy::math::UVec3 { output } /// Creates a new vector from an array. - fn from_array(a: [u32; 3]) -> Val<bevy::math::UVec3> { - let output: Val<bevy::math::UVec3> = bevy::math::UVec3::from_array(a).into(); + fn from_array(a: [u16; 3]) -> Val<bevy::math::U16Vec3> { + let output: Val<bevy::math::U16Vec3> = bevy::math::U16Vec3::from_array(a).into(); output } /// Computes the squared length of `self`. - fn length_squared(_self: Val<bevy::math::UVec3>) -> u32 { - let output: u32 = bevy::math::UVec3::length_squared(_self.into_inner()).into(); + fn length_squared(_self: Val<bevy::math::U16Vec3>) -> u16 { + let output: u16 = bevy::math::U16Vec3::length_squared(_self.into_inner()).into(); output } /// Returns a vector containing the maximum values for each element of `self` and `rhs`. /// In other words this computes `[self.x.max(rhs.x), self.y.max(rhs.y), ..]`. fn max( - _self: Val<bevy::math::UVec3>, - rhs: Val<bevy::math::UVec3>, - ) -> Val<bevy::math::UVec3> { - let output: Val<bevy::math::UVec3> = bevy::math::UVec3::max( + _self: Val<bevy::math::U16Vec3>, + rhs: Val<bevy::math::U16Vec3>, + ) -> Val<bevy::math::U16Vec3> { + let output: Val<bevy::math::U16Vec3> = bevy::math::U16Vec3::max( _self.into_inner(), rhs.into_inner(), ) @@ -7648,17 +12355,17 @@ impl bevy::math::UVec3 { } /// Returns the horizontal maximum of `self`. /// In other words this computes `max(x, y, ..)`. - fn max_element(_self: Val<bevy::math::UVec3>) -> u32 { - let output: u32 = bevy::math::UVec3::max_element(_self.into_inner()).into(); + fn max_element(_self: Val<bevy::math::U16Vec3>) -> u16 { + let output: u16 = bevy::math::U16Vec3::max_element(_self.into_inner()).into(); output } /// Returns a vector containing the minimum values for each element of `self` and `rhs`. /// In other words this computes `[self.x.min(rhs.x), self.y.min(rhs.y), ..]`. fn min( - _self: Val<bevy::math::UVec3>, - rhs: Val<bevy::math::UVec3>, - ) -> Val<bevy::math::UVec3> { - let output: Val<bevy::math::UVec3> = bevy::math::UVec3::min( + _self: Val<bevy::math::U16Vec3>, + rhs: Val<bevy::math::U16Vec3>, + ) -> Val<bevy::math::U16Vec3> { + let output: Val<bevy::math::U16Vec3> = bevy::math::U16Vec3::min( _self.into_inner(), rhs.into_inner(), ) @@ -7667,76 +12374,22 @@ impl bevy::math::UVec3 { } /// Returns the horizontal minimum of `self`. /// In other words this computes `min(x, y, ..)`. - fn min_element(_self: Val<bevy::math::UVec3>) -> u32 { - let output: u32 = bevy::math::UVec3::min_element(_self.into_inner()).into(); - output - } - fn mul( - _self: Val<bevy::math::UVec3>, - rhs: Ref<bevy::math::UVec3>, - ) -> Val<bevy::math::UVec3> { - let output: Val<bevy::math::UVec3> = <bevy::math::UVec3 as std::ops::Mul< - &bevy::math::UVec3, - >>::mul(_self.into_inner(), &rhs) - .into(); - output - } - fn mul( - _self: Val<bevy::math::UVec3>, - rhs: Val<bevy::math::UVec3>, - ) -> Val<bevy::math::UVec3> { - let output: Val<bevy::math::UVec3> = <bevy::math::UVec3 as std::ops::Mul< - bevy::math::UVec3, - >>::mul(_self.into_inner(), rhs.into_inner()) - .into(); - output - } - fn mul(_self: Val<bevy::math::UVec3>, rhs: u32) -> Val<bevy::math::UVec3> { - let output: Val<bevy::math::UVec3> = <bevy::math::UVec3 as std::ops::Mul< - u32, - >>::mul(_self.into_inner(), rhs) - .into(); + fn min_element(_self: Val<bevy::math::U16Vec3>) -> u16 { + let output: u16 = bevy::math::U16Vec3::min_element(_self.into_inner()).into(); output } /// Creates a new vector. - fn new(x: u32, y: u32, z: u32) -> Val<bevy::math::UVec3> { - let output: Val<bevy::math::UVec3> = bevy::math::UVec3::new(x, y, z).into(); - output - } - fn rem( - _self: Val<bevy::math::UVec3>, - rhs: Ref<bevy::math::UVec3>, - ) -> Val<bevy::math::UVec3> { - let output: Val<bevy::math::UVec3> = <bevy::math::UVec3 as std::ops::Rem< - &bevy::math::UVec3, - >>::rem(_self.into_inner(), &rhs) - .into(); - output - } - fn rem( - _self: Val<bevy::math::UVec3>, - rhs: Val<bevy::math::UVec3>, - ) -> Val<bevy::math::UVec3> { - let output: Val<bevy::math::UVec3> = <bevy::math::UVec3 as std::ops::Rem< - bevy::math::UVec3, - >>::rem(_self.into_inner(), rhs.into_inner()) - .into(); - output - } - fn rem(_self: Val<bevy::math::UVec3>, rhs: u32) -> Val<bevy::math::UVec3> { - let output: Val<bevy::math::UVec3> = <bevy::math::UVec3 as std::ops::Rem< - u32, - >>::rem(_self.into_inner(), rhs) - .into(); + fn new(x: u16, y: u16, z: u16) -> Val<bevy::math::U16Vec3> { + let output: Val<bevy::math::U16Vec3> = bevy::math::U16Vec3::new(x, y, z).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<bevy::math::UVec3>, - rhs: Val<bevy::math::UVec3>, - ) -> Val<bevy::math::UVec3> { - let output: Val<bevy::math::UVec3> = bevy::math::UVec3::saturating_add( + _self: Val<bevy::math::U16Vec3>, + rhs: Val<bevy::math::U16Vec3>, + ) -> Val<bevy::math::U16Vec3> { + let output: Val<bevy::math::U16Vec3> = bevy::math::U16Vec3::saturating_add( _self.into_inner(), rhs.into_inner(), ) @@ -7746,10 +12399,10 @@ impl bevy::math::UVec3 { /// Returns a vector containing the saturating addition of `self` and signed vector `rhs`. /// In other words this computes `[self.x.saturating_add_signed(rhs.x), self.y.saturating_add_signed(rhs.y), ..]`. fn saturating_add_signed( - _self: Val<bevy::math::UVec3>, - rhs: Val<bevy::math::IVec3>, - ) -> Val<bevy::math::UVec3> { - let output: Val<bevy::math::UVec3> = bevy::math::UVec3::saturating_add_signed( + _self: Val<bevy::math::U16Vec3>, + rhs: Val<bevy::math::I16Vec3>, + ) -> Val<bevy::math::U16Vec3> { + let output: Val<bevy::math::U16Vec3> = bevy::math::U16Vec3::saturating_add_signed( _self.into_inner(), rhs.into_inner(), ) @@ -7759,10 +12412,10 @@ impl bevy::math::UVec3 { /// Returns a vector containing the saturating division of `self` and `rhs`. /// In other words this computes `[self.x.saturating_div(rhs.x), self.y.saturating_div(rhs.y), ..]`. fn saturating_div( - _self: Val<bevy::math::UVec3>, - rhs: Val<bevy::math::UVec3>, - ) -> Val<bevy::math::UVec3> { - let output: Val<bevy::math::UVec3> = bevy::math::UVec3::saturating_div( + _self: Val<bevy::math::U16Vec3>, + rhs: Val<bevy::math::U16Vec3>, + ) -> Val<bevy::math::U16Vec3> { + let output: Val<bevy::math::U16Vec3> = bevy::math::U16Vec3::saturating_div( _self.into_inner(), rhs.into_inner(), ) @@ -7772,10 +12425,10 @@ impl bevy::math::UVec3 { /// Returns a vector containing the saturating multiplication of `self` and `rhs`. /// In other words this computes `[self.x.saturating_mul(rhs.x), self.y.saturating_mul(rhs.y), ..]`. fn saturating_mul( - _self: Val<bevy::math::UVec3>, - rhs: Val<bevy::math::UVec3>, - ) -> Val<bevy::math::UVec3> { - let output: Val<bevy::math::UVec3> = bevy::math::UVec3::saturating_mul( + _self: Val<bevy::math::U16Vec3>, + rhs: Val<bevy::math::U16Vec3>, + ) -> Val<bevy::math::U16Vec3> { + let output: Val<bevy::math::U16Vec3> = bevy::math::U16Vec3::saturating_mul( _self.into_inner(), rhs.into_inner(), ) @@ -7785,10 +12438,10 @@ impl bevy::math::UVec3 { /// Returns a vector containing the saturating subtraction of `self` and `rhs`. /// In other words this computes `[self.x.saturating_sub(rhs.x), self.y.saturating_sub(rhs.y), ..]`. fn saturating_sub( - _self: Val<bevy::math::UVec3>, - rhs: Val<bevy::math::UVec3>, - ) -> Val<bevy::math::UVec3> { - let output: Val<bevy::math::UVec3> = bevy::math::UVec3::saturating_sub( + _self: Val<bevy::math::U16Vec3>, + rhs: Val<bevy::math::U16Vec3>, + ) -> Val<bevy::math::U16Vec3> { + let output: Val<bevy::math::U16Vec3> = bevy::math::U16Vec3::saturating_sub( _self.into_inner(), rhs.into_inner(), ) @@ -7801,10 +12454,10 @@ impl bevy::math::UVec3 { /// uses the element from `if_false`. fn select( mask: Val<bevy::math::BVec3>, - if_true: Val<bevy::math::UVec3>, - if_false: Val<bevy::math::UVec3>, - ) -> Val<bevy::math::UVec3> { - let output: Val<bevy::math::UVec3> = bevy::math::UVec3::select( + if_true: Val<bevy::math::U16Vec3>, + if_false: Val<bevy::math::U16Vec3>, + ) -> Val<bevy::math::U16Vec3> { + let output: Val<bevy::math::U16Vec3> = bevy::math::U16Vec3::select( mask.into_inner(), if_true.into_inner(), if_false.into_inner(), @@ -7813,54 +12466,27 @@ impl bevy::math::UVec3 { output } /// Creates a vector with all elements set to `v`. - fn splat(v: u32) -> Val<bevy::math::UVec3> { - let output: Val<bevy::math::UVec3> = bevy::math::UVec3::splat(v).into(); - output - } - fn sub( - _self: Val<bevy::math::UVec3>, - rhs: Ref<bevy::math::UVec3>, - ) -> Val<bevy::math::UVec3> { - let output: Val<bevy::math::UVec3> = <bevy::math::UVec3 as std::ops::Sub< - &bevy::math::UVec3, - >>::sub(_self.into_inner(), &rhs) - .into(); - output - } - fn sub( - _self: Val<bevy::math::UVec3>, - rhs: Val<bevy::math::UVec3>, - ) -> Val<bevy::math::UVec3> { - let output: Val<bevy::math::UVec3> = <bevy::math::UVec3 as std::ops::Sub< - bevy::math::UVec3, - >>::sub(_self.into_inner(), rhs.into_inner()) - .into(); - output - } - fn sub(_self: Val<bevy::math::UVec3>, rhs: u32) -> Val<bevy::math::UVec3> { - let output: Val<bevy::math::UVec3> = <bevy::math::UVec3 as std::ops::Sub< - u32, - >>::sub(_self.into_inner(), rhs) - .into(); + fn splat(v: u16) -> Val<bevy::math::U16Vec3> { + let output: Val<bevy::math::U16Vec3> = bevy::math::U16Vec3::splat(v).into(); output } /// `[x, y, z]` - fn to_array(_self: Ref<bevy::math::UVec3>) -> [u32; 3] { - let output: [u32; 3] = bevy::math::UVec3::to_array(&_self).into(); + fn to_array(_self: Ref<bevy::math::U16Vec3>) -> [u16; 3] { + let output: [u16; 3] = bevy::math::U16Vec3::to_array(&_self).into(); output } /// Creates a 2D vector from the `x` and `y` elements of `self`, discarding `z`. /// Truncation may also be performed by using [`self.xy()`][crate::swizzles::Vec3Swizzles::xy()]. - fn truncate(_self: Val<bevy::math::UVec3>) -> Val<bevy::math::UVec2> { - let output: Val<bevy::math::UVec2> = bevy::math::UVec3::truncate( + fn truncate(_self: Val<bevy::math::U16Vec3>) -> Val<bevy::math::U16Vec2> { + let output: Val<bevy::math::U16Vec2> = bevy::math::U16Vec3::truncate( _self.into_inner(), ) .into(); output } /// Creates a 3D vector from `self` with the given value of `x`. - fn with_x(_self: Val<bevy::math::UVec3>, x: u32) -> Val<bevy::math::UVec3> { - let output: Val<bevy::math::UVec3> = bevy::math::UVec3::with_x( + fn with_x(_self: Val<bevy::math::U16Vec3>, x: u16) -> Val<bevy::math::U16Vec3> { + let output: Val<bevy::math::U16Vec3> = bevy::math::U16Vec3::with_x( _self.into_inner(), x, ) @@ -7868,8 +12494,8 @@ impl bevy::math::UVec3 { output } /// Creates a 3D vector from `self` with the given value of `y`. - fn with_y(_self: Val<bevy::math::UVec3>, y: u32) -> Val<bevy::math::UVec3> { - let output: Val<bevy::math::UVec3> = bevy::math::UVec3::with_y( + fn with_y(_self: Val<bevy::math::U16Vec3>, y: u16) -> Val<bevy::math::U16Vec3> { + let output: Val<bevy::math::U16Vec3> = bevy::math::U16Vec3::with_y( _self.into_inner(), y, ) @@ -7877,8 +12503,8 @@ impl bevy::math::UVec3 { output } /// Creates a 3D vector from `self` with the given value of `z`. - fn with_z(_self: Val<bevy::math::UVec3>, z: u32) -> Val<bevy::math::UVec3> { - let output: Val<bevy::math::UVec3> = bevy::math::UVec3::with_z( + fn with_z(_self: Val<bevy::math::U16Vec3>, z: u16) -> Val<bevy::math::U16Vec3> { + let output: Val<bevy::math::U16Vec3> = bevy::math::U16Vec3::with_z( _self.into_inner(), z, ) @@ -7888,10 +12514,10 @@ impl bevy::math::UVec3 { /// Returns a vector containing the wrapping addition of `self` and `rhs`. /// In other words this computes `[self.x.wrapping_add(rhs.x), self.y.wrapping_add(rhs.y), ..]`. fn wrapping_add( - _self: Val<bevy::math::UVec3>, - rhs: Val<bevy::math::UVec3>, - ) -> Val<bevy::math::UVec3> { - let output: Val<bevy::math::UVec3> = bevy::math::UVec3::wrapping_add( + _self: Val<bevy::math::U16Vec3>, + rhs: Val<bevy::math::U16Vec3>, + ) -> Val<bevy::math::U16Vec3> { + let output: Val<bevy::math::U16Vec3> = bevy::math::U16Vec3::wrapping_add( _self.into_inner(), rhs.into_inner(), ) @@ -7901,10 +12527,10 @@ impl bevy::math::UVec3 { /// Returns a vector containing the wrapping addition of `self` and signed vector `rhs`. /// In other words this computes `[self.x.wrapping_add_signed(rhs.x), self.y.wrapping_add_signed(rhs.y), ..]`. fn wrapping_add_signed( - _self: Val<bevy::math::UVec3>, - rhs: Val<bevy::math::IVec3>, - ) -> Val<bevy::math::UVec3> { - let output: Val<bevy::math::UVec3> = bevy::math::UVec3::wrapping_add_signed( + _self: Val<bevy::math::U16Vec3>, + rhs: Val<bevy::math::I16Vec3>, + ) -> Val<bevy::math::U16Vec3> { + let output: Val<bevy::math::U16Vec3> = bevy::math::U16Vec3::wrapping_add_signed( _self.into_inner(), rhs.into_inner(), ) @@ -7914,10 +12540,10 @@ impl bevy::math::UVec3 { /// Returns a vector containing the wrapping division of `self` and `rhs`. /// In other words this computes `[self.x.wrapping_div(rhs.x), self.y.wrapping_div(rhs.y), ..]`. fn wrapping_div( - _self: Val<bevy::math::UVec3>, - rhs: Val<bevy::math::UVec3>, - ) -> Val<bevy::math::UVec3> { - let output: Val<bevy::math::UVec3> = bevy::math::UVec3::wrapping_div( + _self: Val<bevy::math::U16Vec3>, + rhs: Val<bevy::math::U16Vec3>, + ) -> Val<bevy::math::U16Vec3> { + let output: Val<bevy::math::U16Vec3> = bevy::math::U16Vec3::wrapping_div( _self.into_inner(), rhs.into_inner(), ) @@ -7927,10 +12553,10 @@ impl bevy::math::UVec3 { /// Returns a vector containing the wrapping multiplication of `self` and `rhs`. /// In other words this computes `[self.x.wrapping_mul(rhs.x), self.y.wrapping_mul(rhs.y), ..]`. fn wrapping_mul( - _self: Val<bevy::math::UVec3>, - rhs: Val<bevy::math::UVec3>, - ) -> Val<bevy::math::UVec3> { - let output: Val<bevy::math::UVec3> = bevy::math::UVec3::wrapping_mul( + _self: Val<bevy::math::U16Vec3>, + rhs: Val<bevy::math::U16Vec3>, + ) -> Val<bevy::math::U16Vec3> { + let output: Val<bevy::math::U16Vec3> = bevy::math::U16Vec3::wrapping_mul( _self.into_inner(), rhs.into_inner(), ) @@ -7940,10 +12566,10 @@ impl bevy::math::UVec3 { /// Returns a vector containing the wrapping subtraction of `self` and `rhs`. /// In other words this computes `[self.x.wrapping_sub(rhs.x), self.y.wrapping_sub(rhs.y), ..]`. fn wrapping_sub( - _self: Val<bevy::math::UVec3>, - rhs: Val<bevy::math::UVec3>, - ) -> Val<bevy::math::UVec3> { - let output: Val<bevy::math::UVec3> = bevy::math::UVec3::wrapping_sub( + _self: Val<bevy::math::U16Vec3>, + rhs: Val<bevy::math::U16Vec3>, + ) -> Val<bevy::math::U16Vec3> { + let output: Val<bevy::math::U16Vec3> = bevy::math::U16Vec3::wrapping_sub( _self.into_inner(), rhs.into_inner(), ) @@ -7953,82 +12579,74 @@ impl bevy::math::UVec3 { } #[script_bindings( remote, - name = "u_vec_4_functions", + name = "u_16_vec_4_functions", bms_core_path = "bevy_mod_scripting_core", generated )] -impl bevy::math::UVec4 { - fn add( - _self: Val<bevy::math::UVec4>, - rhs: Ref<bevy::math::UVec4>, - ) -> Val<bevy::math::UVec4> { - let output: Val<bevy::math::UVec4> = <bevy::math::UVec4 as std::ops::Add< - &bevy::math::UVec4, - >>::add(_self.into_inner(), &rhs) +impl bevy::math::U16Vec4 { + /// Casts all elements of `self` to `f64`. + fn as_dvec4(_self: Ref<bevy::math::U16Vec4>) -> Val<bevy::math::DVec4> { + let output: Val<bevy::math::DVec4> = bevy::math::U16Vec4::as_dvec4(&_self) .into(); output } - fn add( - _self: Val<bevy::math::UVec4>, - rhs: Val<bevy::math::UVec4>, - ) -> Val<bevy::math::UVec4> { - let output: Val<bevy::math::UVec4> = <bevy::math::UVec4 as std::ops::Add< - bevy::math::UVec4, - >>::add(_self.into_inner(), rhs.into_inner()) + /// Casts all elements of `self` to `i16`. + fn as_i16vec4(_self: Ref<bevy::math::U16Vec4>) -> Val<bevy::math::I16Vec4> { + let output: Val<bevy::math::I16Vec4> = bevy::math::U16Vec4::as_i16vec4(&_self) .into(); output } - fn add(_self: Val<bevy::math::UVec4>, rhs: u32) -> Val<bevy::math::UVec4> { - let output: Val<bevy::math::UVec4> = <bevy::math::UVec4 as std::ops::Add< - u32, - >>::add(_self.into_inner(), rhs) + /// Casts all elements of `self` to `i64`. + fn as_i64vec4(_self: Ref<bevy::math::U16Vec4>) -> Val<bevy::math::I64Vec4> { + let output: Val<bevy::math::I64Vec4> = bevy::math::U16Vec4::as_i64vec4(&_self) .into(); output } - /// Casts all elements of `self` to `f64`. - fn as_dvec4(_self: Ref<bevy::math::UVec4>) -> Val<bevy::math::DVec4> { - let output: Val<bevy::math::DVec4> = bevy::math::UVec4::as_dvec4(&_self).into(); - output - } - /// Casts all elements of `self` to `i64`. - fn as_i64vec4(_self: Ref<bevy::math::UVec4>) -> Val<bevy::math::I64Vec4> { - let output: Val<bevy::math::I64Vec4> = bevy::math::UVec4::as_i64vec4(&_self) + /// Casts all elements of `self` to `i8`. + fn as_i8vec4(_self: Ref<bevy::math::U16Vec4>) -> Val<bevy::math::I8Vec4> { + let output: Val<bevy::math::I8Vec4> = bevy::math::U16Vec4::as_i8vec4(&_self) .into(); output } /// Casts all elements of `self` to `i32`. - fn as_ivec4(_self: Ref<bevy::math::UVec4>) -> Val<bevy::math::IVec4> { - let output: Val<bevy::math::IVec4> = bevy::math::UVec4::as_ivec4(&_self).into(); + fn as_ivec4(_self: Ref<bevy::math::U16Vec4>) -> Val<bevy::math::IVec4> { + let output: Val<bevy::math::IVec4> = bevy::math::U16Vec4::as_ivec4(&_self) + .into(); output } /// Casts all elements of `self` to `u64`. - fn as_u64vec4(_self: Ref<bevy::math::UVec4>) -> Val<bevy::math::U64Vec4> { - let output: Val<bevy::math::U64Vec4> = bevy::math::UVec4::as_u64vec4(&_self) + fn as_u64vec4(_self: Ref<bevy::math::U16Vec4>) -> Val<bevy::math::U64Vec4> { + let output: Val<bevy::math::U64Vec4> = bevy::math::U16Vec4::as_u64vec4(&_self) .into(); output } - /// Casts all elements of `self` to `f32`. - fn as_vec4(_self: Ref<bevy::math::UVec4>) -> Val<bevy::math::Vec4> { - let output: Val<bevy::math::Vec4> = bevy::math::UVec4::as_vec4(&_self).into(); + /// Casts all elements of `self` to `u8`. + fn as_u8vec4(_self: Ref<bevy::math::U16Vec4>) -> Val<bevy::math::U8Vec4> { + let output: Val<bevy::math::U8Vec4> = bevy::math::U16Vec4::as_u8vec4(&_self) + .into(); output } - fn assert_receiver_is_total_eq(_self: Ref<bevy::math::UVec4>) -> () { - let output: () = <bevy::math::UVec4 as std::cmp::Eq>::assert_receiver_is_total_eq( - &_self, - ) + /// Casts all elements of `self` to `u32`. + fn as_uvec4(_self: Ref<bevy::math::U16Vec4>) -> Val<bevy::math::UVec4> { + let output: Val<bevy::math::UVec4> = bevy::math::U16Vec4::as_uvec4(&_self) .into(); output } - /// Component-wise clamping of values, similar to [`u32::clamp`]. + /// Casts all elements of `self` to `f32`. + fn as_vec4(_self: Ref<bevy::math::U16Vec4>) -> Val<bevy::math::Vec4> { + let output: Val<bevy::math::Vec4> = bevy::math::U16Vec4::as_vec4(&_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<bevy::math::UVec4>, - min: Val<bevy::math::UVec4>, - max: Val<bevy::math::UVec4>, - ) -> Val<bevy::math::UVec4> { - let output: Val<bevy::math::UVec4> = bevy::math::UVec4::clamp( + _self: Val<bevy::math::U16Vec4>, + min: Val<bevy::math::U16Vec4>, + max: Val<bevy::math::U16Vec4>, + ) -> Val<bevy::math::U16Vec4> { + let output: Val<bevy::math::U16Vec4> = bevy::math::U16Vec4::clamp( _self.into_inner(), min.into_inner(), max.into_inner(), @@ -8036,22 +12654,15 @@ impl bevy::math::UVec4 { .into(); output } - fn clone(_self: Ref<bevy::math::UVec4>) -> Val<bevy::math::UVec4> { - let output: Val<bevy::math::UVec4> = <bevy::math::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<bevy::math::UVec4>, - rhs: Val<bevy::math::UVec4>, + _self: Val<bevy::math::U16Vec4>, + rhs: Val<bevy::math::U16Vec4>, ) -> Val<bevy::math::BVec4> { - let output: Val<bevy::math::BVec4> = bevy::math::UVec4::cmpeq( + let output: Val<bevy::math::BVec4> = bevy::math::U16Vec4::cmpeq( _self.into_inner(), rhs.into_inner(), ) @@ -8063,10 +12674,10 @@ impl bevy::math::UVec4 { /// In other words this computes `[self.x >= rhs.x, self.y >= rhs.y, ..]` for all /// elements. fn cmpge( - _self: Val<bevy::math::UVec4>, - rhs: Val<bevy::math::UVec4>, + _self: Val<bevy::math::U16Vec4>, + rhs: Val<bevy::math::U16Vec4>, ) -> Val<bevy::math::BVec4> { - let output: Val<bevy::math::BVec4> = bevy::math::UVec4::cmpge( + let output: Val<bevy::math::BVec4> = bevy::math::U16Vec4::cmpge( _self.into_inner(), rhs.into_inner(), ) @@ -8078,10 +12689,10 @@ impl bevy::math::UVec4 { /// In other words this computes `[self.x > rhs.x, self.y > rhs.y, ..]` for all /// elements. fn cmpgt( - _self: Val<bevy::math::UVec4>, - rhs: Val<bevy::math::UVec4>, + _self: Val<bevy::math::U16Vec4>, + rhs: Val<bevy::math::U16Vec4>, ) -> Val<bevy::math::BVec4> { - let output: Val<bevy::math::BVec4> = bevy::math::UVec4::cmpgt( + let output: Val<bevy::math::BVec4> = bevy::math::U16Vec4::cmpgt( _self.into_inner(), rhs.into_inner(), ) @@ -8093,10 +12704,10 @@ impl bevy::math::UVec4 { /// In other words this computes `[self.x <= rhs.x, self.y <= rhs.y, ..]` for all /// elements. fn cmple( - _self: Val<bevy::math::UVec4>, - rhs: Val<bevy::math::UVec4>, + _self: Val<bevy::math::U16Vec4>, + rhs: Val<bevy::math::U16Vec4>, ) -> Val<bevy::math::BVec4> { - let output: Val<bevy::math::BVec4> = bevy::math::UVec4::cmple( + let output: Val<bevy::math::BVec4> = bevy::math::U16Vec4::cmple( _self.into_inner(), rhs.into_inner(), ) @@ -8107,71 +12718,44 @@ impl bevy::math::UVec4 { /// `self` and `rhs`. /// In other words this computes `[self.x < rhs.x, self.y < rhs.y, ..]` for all /// elements. - fn cmplt( - _self: Val<bevy::math::UVec4>, - rhs: Val<bevy::math::UVec4>, - ) -> Val<bevy::math::BVec4> { - let output: Val<bevy::math::BVec4> = bevy::math::UVec4::cmplt( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - /// Returns a vector mask containing the result of a `!=` comparison for each element of - /// `self` and `rhs`. - /// In other words this computes `[self.x != rhs.x, self.y != rhs.y, ..]` for all - /// elements. - fn cmpne( - _self: Val<bevy::math::UVec4>, - rhs: Val<bevy::math::UVec4>, - ) -> Val<bevy::math::BVec4> { - let output: Val<bevy::math::BVec4> = bevy::math::UVec4::cmpne( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - fn div( - _self: Val<bevy::math::UVec4>, - rhs: Ref<bevy::math::UVec4>, - ) -> Val<bevy::math::UVec4> { - let output: Val<bevy::math::UVec4> = <bevy::math::UVec4 as std::ops::Div< - &bevy::math::UVec4, - >>::div(_self.into_inner(), &rhs) - .into(); - output - } - fn div( - _self: Val<bevy::math::UVec4>, - rhs: Val<bevy::math::UVec4>, - ) -> Val<bevy::math::UVec4> { - let output: Val<bevy::math::UVec4> = <bevy::math::UVec4 as std::ops::Div< - bevy::math::UVec4, - >>::div(_self.into_inner(), rhs.into_inner()) + fn cmplt( + _self: Val<bevy::math::U16Vec4>, + rhs: Val<bevy::math::U16Vec4>, + ) -> Val<bevy::math::BVec4> { + let output: Val<bevy::math::BVec4> = bevy::math::U16Vec4::cmplt( + _self.into_inner(), + rhs.into_inner(), + ) .into(); output } - fn div(_self: Val<bevy::math::UVec4>, rhs: u32) -> Val<bevy::math::UVec4> { - let output: Val<bevy::math::UVec4> = <bevy::math::UVec4 as std::ops::Div< - u32, - >>::div(_self.into_inner(), rhs) + /// Returns a vector mask containing the result of a `!=` comparison 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<bevy::math::U16Vec4>, + rhs: Val<bevy::math::U16Vec4>, + ) -> Val<bevy::math::BVec4> { + let output: Val<bevy::math::BVec4> = bevy::math::U16Vec4::cmpne( + _self.into_inner(), + rhs.into_inner(), + ) .into(); output } /// Computes the dot product of `self` and `rhs`. - fn dot(_self: Val<bevy::math::UVec4>, rhs: Val<bevy::math::UVec4>) -> u32 { - let output: u32 = bevy::math::UVec4::dot(_self.into_inner(), rhs.into_inner()) + fn dot(_self: Val<bevy::math::U16Vec4>, rhs: Val<bevy::math::U16Vec4>) -> u16 { + let output: u16 = bevy::math::U16Vec4::dot(_self.into_inner(), rhs.into_inner()) .into(); output } /// Returns a vector where every component is the dot product of `self` and `rhs`. fn dot_into_vec( - _self: Val<bevy::math::UVec4>, - rhs: Val<bevy::math::UVec4>, - ) -> Val<bevy::math::UVec4> { - let output: Val<bevy::math::UVec4> = bevy::math::UVec4::dot_into_vec( + _self: Val<bevy::math::U16Vec4>, + rhs: Val<bevy::math::U16Vec4>, + ) -> Val<bevy::math::U16Vec4> { + let output: Val<bevy::math::U16Vec4> = bevy::math::U16Vec4::dot_into_vec( _self.into_inner(), rhs.into_inner(), ) @@ -8180,40 +12764,34 @@ impl bevy::math::UVec4 { } /// Returns the product of all elements of `self`. /// In other words, this computes `self.x * self.y * ..`. - fn element_product(_self: Val<bevy::math::UVec4>) -> u32 { - let output: u32 = bevy::math::UVec4::element_product(_self.into_inner()).into(); + fn element_product(_self: Val<bevy::math::U16Vec4>) -> u16 { + let output: u16 = bevy::math::U16Vec4::element_product(_self.into_inner()) + .into(); output } /// Returns the sum of all elements of `self`. /// In other words, this computes `self.x + self.y + ..`. - fn element_sum(_self: Val<bevy::math::UVec4>) -> u32 { - let output: u32 = bevy::math::UVec4::element_sum(_self.into_inner()).into(); - output - } - fn eq(_self: Ref<bevy::math::UVec4>, other: Ref<bevy::math::UVec4>) -> bool { - let output: bool = <bevy::math::UVec4 as std::cmp::PartialEq< - bevy::math::UVec4, - >>::eq(&_self, &other) - .into(); + fn element_sum(_self: Val<bevy::math::U16Vec4>) -> u16 { + let output: u16 = bevy::math::U16Vec4::element_sum(_self.into_inner()).into(); output } /// Creates a new vector from an array. - fn from_array(a: [u32; 4]) -> Val<bevy::math::UVec4> { - let output: Val<bevy::math::UVec4> = bevy::math::UVec4::from_array(a).into(); + fn from_array(a: [u16; 4]) -> Val<bevy::math::U16Vec4> { + let output: Val<bevy::math::U16Vec4> = bevy::math::U16Vec4::from_array(a).into(); output } /// Computes the squared length of `self`. - fn length_squared(_self: Val<bevy::math::UVec4>) -> u32 { - let output: u32 = bevy::math::UVec4::length_squared(_self.into_inner()).into(); + fn length_squared(_self: Val<bevy::math::U16Vec4>) -> u16 { + let output: u16 = bevy::math::U16Vec4::length_squared(_self.into_inner()).into(); output } /// Returns a vector containing the maximum values for each element of `self` and `rhs`. /// In other words this computes `[self.x.max(rhs.x), self.y.max(rhs.y), ..]`. fn max( - _self: Val<bevy::math::UVec4>, - rhs: Val<bevy::math::UVec4>, - ) -> Val<bevy::math::UVec4> { - let output: Val<bevy::math::UVec4> = bevy::math::UVec4::max( + _self: Val<bevy::math::U16Vec4>, + rhs: Val<bevy::math::U16Vec4>, + ) -> Val<bevy::math::U16Vec4> { + let output: Val<bevy::math::U16Vec4> = bevy::math::U16Vec4::max( _self.into_inner(), rhs.into_inner(), ) @@ -8222,17 +12800,17 @@ impl bevy::math::UVec4 { } /// Returns the horizontal maximum of `self`. /// In other words this computes `max(x, y, ..)`. - fn max_element(_self: Val<bevy::math::UVec4>) -> u32 { - let output: u32 = bevy::math::UVec4::max_element(_self.into_inner()).into(); + fn max_element(_self: Val<bevy::math::U16Vec4>) -> u16 { + let output: u16 = bevy::math::U16Vec4::max_element(_self.into_inner()).into(); output } /// Returns a vector containing the minimum values for each element of `self` and `rhs`. /// In other words this computes `[self.x.min(rhs.x), self.y.min(rhs.y), ..]`. fn min( - _self: Val<bevy::math::UVec4>, - rhs: Val<bevy::math::UVec4>, - ) -> Val<bevy::math::UVec4> { - let output: Val<bevy::math::UVec4> = bevy::math::UVec4::min( + _self: Val<bevy::math::U16Vec4>, + rhs: Val<bevy::math::U16Vec4>, + ) -> Val<bevy::math::U16Vec4> { + let output: Val<bevy::math::U16Vec4> = bevy::math::U16Vec4::min( _self.into_inner(), rhs.into_inner(), ) @@ -8241,76 +12819,23 @@ impl bevy::math::UVec4 { } /// Returns the horizontal minimum of `self`. /// In other words this computes `min(x, y, ..)`. - fn min_element(_self: Val<bevy::math::UVec4>) -> u32 { - let output: u32 = bevy::math::UVec4::min_element(_self.into_inner()).into(); - output - } - fn mul( - _self: Val<bevy::math::UVec4>, - rhs: Ref<bevy::math::UVec4>, - ) -> Val<bevy::math::UVec4> { - let output: Val<bevy::math::UVec4> = <bevy::math::UVec4 as std::ops::Mul< - &bevy::math::UVec4, - >>::mul(_self.into_inner(), &rhs) - .into(); - output - } - fn mul( - _self: Val<bevy::math::UVec4>, - rhs: Val<bevy::math::UVec4>, - ) -> Val<bevy::math::UVec4> { - let output: Val<bevy::math::UVec4> = <bevy::math::UVec4 as std::ops::Mul< - bevy::math::UVec4, - >>::mul(_self.into_inner(), rhs.into_inner()) - .into(); - output - } - fn mul(_self: Val<bevy::math::UVec4>, rhs: u32) -> Val<bevy::math::UVec4> { - let output: Val<bevy::math::UVec4> = <bevy::math::UVec4 as std::ops::Mul< - u32, - >>::mul(_self.into_inner(), rhs) - .into(); + fn min_element(_self: Val<bevy::math::U16Vec4>) -> u16 { + let output: u16 = bevy::math::U16Vec4::min_element(_self.into_inner()).into(); output } /// Creates a new vector. - fn new(x: u32, y: u32, z: u32, w: u32) -> Val<bevy::math::UVec4> { - let output: Val<bevy::math::UVec4> = bevy::math::UVec4::new(x, y, z, w).into(); - output - } - fn rem( - _self: Val<bevy::math::UVec4>, - rhs: Ref<bevy::math::UVec4>, - ) -> Val<bevy::math::UVec4> { - let output: Val<bevy::math::UVec4> = <bevy::math::UVec4 as std::ops::Rem< - &bevy::math::UVec4, - >>::rem(_self.into_inner(), &rhs) - .into(); - output - } - fn rem( - _self: Val<bevy::math::UVec4>, - rhs: Val<bevy::math::UVec4>, - ) -> Val<bevy::math::UVec4> { - let output: Val<bevy::math::UVec4> = <bevy::math::UVec4 as std::ops::Rem< - bevy::math::UVec4, - >>::rem(_self.into_inner(), rhs.into_inner()) - .into(); - output - } - fn rem(_self: Val<bevy::math::UVec4>, rhs: u32) -> Val<bevy::math::UVec4> { - let output: Val<bevy::math::UVec4> = <bevy::math::UVec4 as std::ops::Rem< - u32, - >>::rem(_self.into_inner(), rhs) + fn new(x: u16, y: u16, z: u16, w: u16) -> Val<bevy::math::U16Vec4> { + let output: Val<bevy::math::U16Vec4> = bevy::math::U16Vec4::new(x, y, z, w) .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<bevy::math::UVec4>, - rhs: Val<bevy::math::UVec4>, - ) -> Val<bevy::math::UVec4> { - let output: Val<bevy::math::UVec4> = bevy::math::UVec4::saturating_add( + _self: Val<bevy::math::U16Vec4>, + rhs: Val<bevy::math::U16Vec4>, + ) -> Val<bevy::math::U16Vec4> { + let output: Val<bevy::math::U16Vec4> = bevy::math::U16Vec4::saturating_add( _self.into_inner(), rhs.into_inner(), ) @@ -8320,10 +12845,10 @@ impl bevy::math::UVec4 { /// Returns a vector containing the saturating addition of `self` and signed vector `rhs`. /// In other words this computes `[self.x.saturating_add_signed(rhs.x), self.y.saturating_add_signed(rhs.y), ..]`. fn saturating_add_signed( - _self: Val<bevy::math::UVec4>, - rhs: Val<bevy::math::IVec4>, - ) -> Val<bevy::math::UVec4> { - let output: Val<bevy::math::UVec4> = bevy::math::UVec4::saturating_add_signed( + _self: Val<bevy::math::U16Vec4>, + rhs: Val<bevy::math::I16Vec4>, + ) -> Val<bevy::math::U16Vec4> { + let output: Val<bevy::math::U16Vec4> = bevy::math::U16Vec4::saturating_add_signed( _self.into_inner(), rhs.into_inner(), ) @@ -8333,10 +12858,10 @@ impl bevy::math::UVec4 { /// Returns a vector containing the saturating division of `self` and `rhs`. /// In other words this computes `[self.x.saturating_div(rhs.x), self.y.saturating_div(rhs.y), ..]`. fn saturating_div( - _self: Val<bevy::math::UVec4>, - rhs: Val<bevy::math::UVec4>, - ) -> Val<bevy::math::UVec4> { - let output: Val<bevy::math::UVec4> = bevy::math::UVec4::saturating_div( + _self: Val<bevy::math::U16Vec4>, + rhs: Val<bevy::math::U16Vec4>, + ) -> Val<bevy::math::U16Vec4> { + let output: Val<bevy::math::U16Vec4> = bevy::math::U16Vec4::saturating_div( _self.into_inner(), rhs.into_inner(), ) @@ -8346,10 +12871,10 @@ impl bevy::math::UVec4 { /// Returns a vector containing the saturating multiplication of `self` and `rhs`. /// In other words this computes `[self.x.saturating_mul(rhs.x), self.y.saturating_mul(rhs.y), ..]`. fn saturating_mul( - _self: Val<bevy::math::UVec4>, - rhs: Val<bevy::math::UVec4>, - ) -> Val<bevy::math::UVec4> { - let output: Val<bevy::math::UVec4> = bevy::math::UVec4::saturating_mul( + _self: Val<bevy::math::U16Vec4>, + rhs: Val<bevy::math::U16Vec4>, + ) -> Val<bevy::math::U16Vec4> { + let output: Val<bevy::math::U16Vec4> = bevy::math::U16Vec4::saturating_mul( _self.into_inner(), rhs.into_inner(), ) @@ -8359,10 +12884,10 @@ impl bevy::math::UVec4 { /// Returns a vector containing the saturating subtraction of `self` and `rhs`. /// In other words this computes `[self.x.saturating_sub(rhs.x), self.y.saturating_sub(rhs.y), ..]`. fn saturating_sub( - _self: Val<bevy::math::UVec4>, - rhs: Val<bevy::math::UVec4>, - ) -> Val<bevy::math::UVec4> { - let output: Val<bevy::math::UVec4> = bevy::math::UVec4::saturating_sub( + _self: Val<bevy::math::U16Vec4>, + rhs: Val<bevy::math::U16Vec4>, + ) -> Val<bevy::math::U16Vec4> { + let output: Val<bevy::math::U16Vec4> = bevy::math::U16Vec4::saturating_sub( _self.into_inner(), rhs.into_inner(), ) @@ -8375,10 +12900,10 @@ impl bevy::math::UVec4 { /// uses the element from `if_false`. fn select( mask: Val<bevy::math::BVec4>, - if_true: Val<bevy::math::UVec4>, - if_false: Val<bevy::math::UVec4>, - ) -> Val<bevy::math::UVec4> { - let output: Val<bevy::math::UVec4> = bevy::math::UVec4::select( + if_true: Val<bevy::math::U16Vec4>, + if_false: Val<bevy::math::U16Vec4>, + ) -> Val<bevy::math::U16Vec4> { + let output: Val<bevy::math::U16Vec4> = bevy::math::U16Vec4::select( mask.into_inner(), if_true.into_inner(), if_false.into_inner(), @@ -8387,54 +12912,27 @@ impl bevy::math::UVec4 { output } /// Creates a vector with all elements set to `v`. - fn splat(v: u32) -> Val<bevy::math::UVec4> { - let output: Val<bevy::math::UVec4> = bevy::math::UVec4::splat(v).into(); - output - } - fn sub( - _self: Val<bevy::math::UVec4>, - rhs: Ref<bevy::math::UVec4>, - ) -> Val<bevy::math::UVec4> { - let output: Val<bevy::math::UVec4> = <bevy::math::UVec4 as std::ops::Sub< - &bevy::math::UVec4, - >>::sub(_self.into_inner(), &rhs) - .into(); - output - } - fn sub( - _self: Val<bevy::math::UVec4>, - rhs: Val<bevy::math::UVec4>, - ) -> Val<bevy::math::UVec4> { - let output: Val<bevy::math::UVec4> = <bevy::math::UVec4 as std::ops::Sub< - bevy::math::UVec4, - >>::sub(_self.into_inner(), rhs.into_inner()) - .into(); - output - } - fn sub(_self: Val<bevy::math::UVec4>, rhs: u32) -> Val<bevy::math::UVec4> { - let output: Val<bevy::math::UVec4> = <bevy::math::UVec4 as std::ops::Sub< - u32, - >>::sub(_self.into_inner(), rhs) - .into(); + fn splat(v: u16) -> Val<bevy::math::U16Vec4> { + let output: Val<bevy::math::U16Vec4> = bevy::math::U16Vec4::splat(v).into(); output } /// `[x, y, z, w]` - fn to_array(_self: Ref<bevy::math::UVec4>) -> [u32; 4] { - let output: [u32; 4] = bevy::math::UVec4::to_array(&_self).into(); + fn to_array(_self: Ref<bevy::math::U16Vec4>) -> [u16; 4] { + let output: [u16; 4] = bevy::math::U16Vec4::to_array(&_self).into(); output } /// Creates a 3D vector from the `x`, `y` and `z` elements of `self`, discarding `w`. - /// Truncation to [`UVec3`] may also be performed by using [`self.xyz()`][crate::swizzles::Vec4Swizzles::xyz()]. - fn truncate(_self: Val<bevy::math::UVec4>) -> Val<bevy::math::UVec3> { - let output: Val<bevy::math::UVec3> = bevy::math::UVec4::truncate( + /// Truncation to [`U16Vec3`] may also be performed by using [`self.xyz()`][crate::swizzles::Vec4Swizzles::xyz()]. + fn truncate(_self: Val<bevy::math::U16Vec4>) -> Val<bevy::math::U16Vec3> { + let output: Val<bevy::math::U16Vec3> = bevy::math::U16Vec4::truncate( _self.into_inner(), ) .into(); output } /// Creates a 4D vector from `self` with the given value of `w`. - fn with_w(_self: Val<bevy::math::UVec4>, w: u32) -> Val<bevy::math::UVec4> { - let output: Val<bevy::math::UVec4> = bevy::math::UVec4::with_w( + fn with_w(_self: Val<bevy::math::U16Vec4>, w: u16) -> Val<bevy::math::U16Vec4> { + let output: Val<bevy::math::U16Vec4> = bevy::math::U16Vec4::with_w( _self.into_inner(), w, ) @@ -8442,8 +12940,8 @@ impl bevy::math::UVec4 { output } /// Creates a 4D vector from `self` with the given value of `x`. - fn with_x(_self: Val<bevy::math::UVec4>, x: u32) -> Val<bevy::math::UVec4> { - let output: Val<bevy::math::UVec4> = bevy::math::UVec4::with_x( + fn with_x(_self: Val<bevy::math::U16Vec4>, x: u16) -> Val<bevy::math::U16Vec4> { + let output: Val<bevy::math::U16Vec4> = bevy::math::U16Vec4::with_x( _self.into_inner(), x, ) @@ -8451,8 +12949,8 @@ impl bevy::math::UVec4 { output } /// Creates a 4D vector from `self` with the given value of `y`. - fn with_y(_self: Val<bevy::math::UVec4>, y: u32) -> Val<bevy::math::UVec4> { - let output: Val<bevy::math::UVec4> = bevy::math::UVec4::with_y( + fn with_y(_self: Val<bevy::math::U16Vec4>, y: u16) -> Val<bevy::math::U16Vec4> { + let output: Val<bevy::math::U16Vec4> = bevy::math::U16Vec4::with_y( _self.into_inner(), y, ) @@ -8460,8 +12958,8 @@ impl bevy::math::UVec4 { output } /// Creates a 4D vector from `self` with the given value of `z`. - fn with_z(_self: Val<bevy::math::UVec4>, z: u32) -> Val<bevy::math::UVec4> { - let output: Val<bevy::math::UVec4> = bevy::math::UVec4::with_z( + fn with_z(_self: Val<bevy::math::U16Vec4>, z: u16) -> Val<bevy::math::U16Vec4> { + let output: Val<bevy::math::U16Vec4> = bevy::math::U16Vec4::with_z( _self.into_inner(), z, ) @@ -8471,10 +12969,10 @@ impl bevy::math::UVec4 { /// Returns a vector containing the wrapping addition of `self` and `rhs`. /// In other words this computes `[self.x.wrapping_add(rhs.x), self.y.wrapping_add(rhs.y), ..]`. fn wrapping_add( - _self: Val<bevy::math::UVec4>, - rhs: Val<bevy::math::UVec4>, - ) -> Val<bevy::math::UVec4> { - let output: Val<bevy::math::UVec4> = bevy::math::UVec4::wrapping_add( + _self: Val<bevy::math::U16Vec4>, + rhs: Val<bevy::math::U16Vec4>, + ) -> Val<bevy::math::U16Vec4> { + let output: Val<bevy::math::U16Vec4> = bevy::math::U16Vec4::wrapping_add( _self.into_inner(), rhs.into_inner(), ) @@ -8484,10 +12982,10 @@ impl bevy::math::UVec4 { /// Returns a vector containing the wrapping addition of `self` and signed vector `rhs`. /// In other words this computes `[self.x.wrapping_add_signed(rhs.x), self.y.wrapping_add_signed(rhs.y), ..]`. fn wrapping_add_signed( - _self: Val<bevy::math::UVec4>, - rhs: Val<bevy::math::IVec4>, - ) -> Val<bevy::math::UVec4> { - let output: Val<bevy::math::UVec4> = bevy::math::UVec4::wrapping_add_signed( + _self: Val<bevy::math::U16Vec4>, + rhs: Val<bevy::math::I16Vec4>, + ) -> Val<bevy::math::U16Vec4> { + let output: Val<bevy::math::U16Vec4> = bevy::math::U16Vec4::wrapping_add_signed( _self.into_inner(), rhs.into_inner(), ) @@ -8497,10 +12995,10 @@ impl bevy::math::UVec4 { /// Returns a vector containing the wrapping division of `self` and `rhs`. /// In other words this computes `[self.x.wrapping_div(rhs.x), self.y.wrapping_div(rhs.y), ..]`. fn wrapping_div( - _self: Val<bevy::math::UVec4>, - rhs: Val<bevy::math::UVec4>, - ) -> Val<bevy::math::UVec4> { - let output: Val<bevy::math::UVec4> = bevy::math::UVec4::wrapping_div( + _self: Val<bevy::math::U16Vec4>, + rhs: Val<bevy::math::U16Vec4>, + ) -> Val<bevy::math::U16Vec4> { + let output: Val<bevy::math::U16Vec4> = bevy::math::U16Vec4::wrapping_div( _self.into_inner(), rhs.into_inner(), ) @@ -8510,10 +13008,10 @@ impl bevy::math::UVec4 { /// Returns a vector containing the wrapping multiplication of `self` and `rhs`. /// In other words this computes `[self.x.wrapping_mul(rhs.x), self.y.wrapping_mul(rhs.y), ..]`. fn wrapping_mul( - _self: Val<bevy::math::UVec4>, - rhs: Val<bevy::math::UVec4>, - ) -> Val<bevy::math::UVec4> { - let output: Val<bevy::math::UVec4> = bevy::math::UVec4::wrapping_mul( + _self: Val<bevy::math::U16Vec4>, + rhs: Val<bevy::math::U16Vec4>, + ) -> Val<bevy::math::U16Vec4> { + let output: Val<bevy::math::U16Vec4> = bevy::math::U16Vec4::wrapping_mul( _self.into_inner(), rhs.into_inner(), ) @@ -8523,10 +13021,10 @@ impl bevy::math::UVec4 { /// Returns a vector containing the wrapping subtraction of `self` and `rhs`. /// In other words this computes `[self.x.wrapping_sub(rhs.x), self.y.wrapping_sub(rhs.y), ..]`. fn wrapping_sub( - _self: Val<bevy::math::UVec4>, - rhs: Val<bevy::math::UVec4>, - ) -> Val<bevy::math::UVec4> { - let output: Val<bevy::math::UVec4> = bevy::math::UVec4::wrapping_sub( + _self: Val<bevy::math::U16Vec4>, + rhs: Val<bevy::math::U16Vec4>, + ) -> Val<bevy::math::U16Vec4> { + let output: Val<bevy::math::U16Vec4> = bevy::math::U16Vec4::wrapping_sub( _self.into_inner(), rhs.into_inner(), ) @@ -8541,51 +13039,48 @@ impl bevy::math::UVec4 { generated )] impl bevy::math::U64Vec2 { - fn add( - _self: Val<bevy::math::U64Vec2>, - rhs: Ref<bevy::math::U64Vec2>, - ) -> Val<bevy::math::U64Vec2> { - let output: Val<bevy::math::U64Vec2> = <bevy::math::U64Vec2 as std::ops::Add< - &bevy::math::U64Vec2, - >>::add(_self.into_inner(), &rhs) - .into(); - output - } - fn add( - _self: Val<bevy::math::U64Vec2>, - rhs: Val<bevy::math::U64Vec2>, - ) -> Val<bevy::math::U64Vec2> { - let output: Val<bevy::math::U64Vec2> = <bevy::math::U64Vec2 as std::ops::Add< - bevy::math::U64Vec2, - >>::add(_self.into_inner(), rhs.into_inner()) - .into(); - output - } - fn add(_self: Val<bevy::math::U64Vec2>, rhs: u64) -> Val<bevy::math::U64Vec2> { - let output: Val<bevy::math::U64Vec2> = <bevy::math::U64Vec2 as std::ops::Add< - u64, - >>::add(_self.into_inner(), rhs) - .into(); - output - } /// Casts all elements of `self` to `f64`. fn as_dvec2(_self: Ref<bevy::math::U64Vec2>) -> Val<bevy::math::DVec2> { let output: Val<bevy::math::DVec2> = bevy::math::U64Vec2::as_dvec2(&_self) .into(); output } + /// Casts all elements of `self` to `i16`. + fn as_i16vec2(_self: Ref<bevy::math::U64Vec2>) -> Val<bevy::math::I16Vec2> { + let output: Val<bevy::math::I16Vec2> = bevy::math::U64Vec2::as_i16vec2(&_self) + .into(); + output + } /// Casts all elements of `self` to `i64`. fn as_i64vec2(_self: Ref<bevy::math::U64Vec2>) -> Val<bevy::math::I64Vec2> { let output: Val<bevy::math::I64Vec2> = bevy::math::U64Vec2::as_i64vec2(&_self) .into(); output } + /// Casts all elements of `self` to `i8`. + fn as_i8vec2(_self: Ref<bevy::math::U64Vec2>) -> Val<bevy::math::I8Vec2> { + let output: Val<bevy::math::I8Vec2> = bevy::math::U64Vec2::as_i8vec2(&_self) + .into(); + output + } /// Casts all elements of `self` to `i32`. fn as_ivec2(_self: Ref<bevy::math::U64Vec2>) -> Val<bevy::math::IVec2> { let output: Val<bevy::math::IVec2> = bevy::math::U64Vec2::as_ivec2(&_self) .into(); output } + /// Casts all elements of `self` to `u16`. + fn as_u16vec2(_self: Ref<bevy::math::U64Vec2>) -> Val<bevy::math::U16Vec2> { + let output: Val<bevy::math::U16Vec2> = bevy::math::U64Vec2::as_u16vec2(&_self) + .into(); + output + } + /// Casts all elements of `self` to `u8`. + fn as_u8vec2(_self: Ref<bevy::math::U64Vec2>) -> Val<bevy::math::U8Vec2> { + let output: Val<bevy::math::U8Vec2> = bevy::math::U64Vec2::as_u8vec2(&_self) + .into(); + output + } /// Casts all elements of `self` to `u32`. fn as_uvec2(_self: Ref<bevy::math::U64Vec2>) -> Val<bevy::math::UVec2> { let output: Val<bevy::math::UVec2> = bevy::math::U64Vec2::as_uvec2(&_self) @@ -8597,13 +13092,6 @@ impl bevy::math::U64Vec2 { let output: Val<bevy::math::Vec2> = bevy::math::U64Vec2::as_vec2(&_self).into(); output } - fn assert_receiver_is_total_eq(_self: Ref<bevy::math::U64Vec2>) -> () { - let output: () = <bevy::math::U64Vec2 as std::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 @@ -8621,13 +13109,6 @@ impl bevy::math::U64Vec2 { .into(); output } - fn clone(_self: Ref<bevy::math::U64Vec2>) -> Val<bevy::math::U64Vec2> { - let output: Val<bevy::math::U64Vec2> = <bevy::math::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 @@ -8718,33 +13199,6 @@ impl bevy::math::U64Vec2 { .into(); output } - fn div( - _self: Val<bevy::math::U64Vec2>, - rhs: Ref<bevy::math::U64Vec2>, - ) -> Val<bevy::math::U64Vec2> { - let output: Val<bevy::math::U64Vec2> = <bevy::math::U64Vec2 as std::ops::Div< - &bevy::math::U64Vec2, - >>::div(_self.into_inner(), &rhs) - .into(); - output - } - fn div( - _self: Val<bevy::math::U64Vec2>, - rhs: Val<bevy::math::U64Vec2>, - ) -> Val<bevy::math::U64Vec2> { - let output: Val<bevy::math::U64Vec2> = <bevy::math::U64Vec2 as std::ops::Div< - bevy::math::U64Vec2, - >>::div(_self.into_inner(), rhs.into_inner()) - .into(); - output - } - fn div(_self: Val<bevy::math::U64Vec2>, rhs: u64) -> Val<bevy::math::U64Vec2> { - let output: Val<bevy::math::U64Vec2> = <bevy::math::U64Vec2 as std::ops::Div< - u64, - >>::div(_self.into_inner(), rhs) - .into(); - output - } /// Computes the dot product of `self` and `rhs`. fn dot(_self: Val<bevy::math::U64Vec2>, rhs: Val<bevy::math::U64Vec2>) -> u64 { let output: u64 = bevy::math::U64Vec2::dot(_self.into_inner(), rhs.into_inner()) @@ -8776,13 +13230,6 @@ impl bevy::math::U64Vec2 { let output: u64 = bevy::math::U64Vec2::element_sum(_self.into_inner()).into(); output } - fn eq(_self: Ref<bevy::math::U64Vec2>, other: Ref<bevy::math::U64Vec2>) -> bool { - let output: bool = <bevy::math::U64Vec2 as std::cmp::PartialEq< - bevy::math::U64Vec2, - >>::eq(&_self, &other) - .into(); - output - } /// Creates a 3D vector from `self` and the given `z` value. fn extend(_self: Val<bevy::math::U64Vec2>, z: u64) -> Val<bevy::math::U64Vec3> { let output: Val<bevy::math::U64Vec3> = bevy::math::U64Vec2::extend( @@ -8840,65 +13287,11 @@ impl bevy::math::U64Vec2 { let output: u64 = bevy::math::U64Vec2::min_element(_self.into_inner()).into(); output } - fn mul( - _self: Val<bevy::math::U64Vec2>, - rhs: Ref<bevy::math::U64Vec2>, - ) -> Val<bevy::math::U64Vec2> { - let output: Val<bevy::math::U64Vec2> = <bevy::math::U64Vec2 as std::ops::Mul< - &bevy::math::U64Vec2, - >>::mul(_self.into_inner(), &rhs) - .into(); - output - } - fn mul( - _self: Val<bevy::math::U64Vec2>, - rhs: Val<bevy::math::U64Vec2>, - ) -> Val<bevy::math::U64Vec2> { - let output: Val<bevy::math::U64Vec2> = <bevy::math::U64Vec2 as std::ops::Mul< - bevy::math::U64Vec2, - >>::mul(_self.into_inner(), rhs.into_inner()) - .into(); - output - } - fn mul(_self: Val<bevy::math::U64Vec2>, rhs: u64) -> Val<bevy::math::U64Vec2> { - let output: Val<bevy::math::U64Vec2> = <bevy::math::U64Vec2 as std::ops::Mul< - u64, - >>::mul(_self.into_inner(), rhs) - .into(); - output - } /// Creates a new vector. fn new(x: u64, y: u64) -> Val<bevy::math::U64Vec2> { let output: Val<bevy::math::U64Vec2> = bevy::math::U64Vec2::new(x, y).into(); output } - fn rem( - _self: Val<bevy::math::U64Vec2>, - rhs: Ref<bevy::math::U64Vec2>, - ) -> Val<bevy::math::U64Vec2> { - let output: Val<bevy::math::U64Vec2> = <bevy::math::U64Vec2 as std::ops::Rem< - &bevy::math::U64Vec2, - >>::rem(_self.into_inner(), &rhs) - .into(); - output - } - fn rem( - _self: Val<bevy::math::U64Vec2>, - rhs: Val<bevy::math::U64Vec2>, - ) -> Val<bevy::math::U64Vec2> { - let output: Val<bevy::math::U64Vec2> = <bevy::math::U64Vec2 as std::ops::Rem< - bevy::math::U64Vec2, - >>::rem(_self.into_inner(), rhs.into_inner()) - .into(); - output - } - fn rem(_self: Val<bevy::math::U64Vec2>, rhs: u64) -> Val<bevy::math::U64Vec2> { - let output: Val<bevy::math::U64Vec2> = <bevy::math::U64Vec2 as std::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( @@ -8986,33 +13379,6 @@ impl bevy::math::U64Vec2 { let output: Val<bevy::math::U64Vec2> = bevy::math::U64Vec2::splat(v).into(); output } - fn sub( - _self: Val<bevy::math::U64Vec2>, - rhs: Ref<bevy::math::U64Vec2>, - ) -> Val<bevy::math::U64Vec2> { - let output: Val<bevy::math::U64Vec2> = <bevy::math::U64Vec2 as std::ops::Sub< - &bevy::math::U64Vec2, - >>::sub(_self.into_inner(), &rhs) - .into(); - output - } - fn sub( - _self: Val<bevy::math::U64Vec2>, - rhs: Val<bevy::math::U64Vec2>, - ) -> Val<bevy::math::U64Vec2> { - let output: Val<bevy::math::U64Vec2> = <bevy::math::U64Vec2 as std::ops::Sub< - bevy::math::U64Vec2, - >>::sub(_self.into_inner(), rhs.into_inner()) - .into(); - output - } - fn sub(_self: Val<bevy::math::U64Vec2>, rhs: u64) -> Val<bevy::math::U64Vec2> { - let output: Val<bevy::math::U64Vec2> = <bevy::math::U64Vec2 as std::ops::Sub< - u64, - >>::sub(_self.into_inner(), rhs) - .into(); - output - } /// `[x, y]` fn to_array(_self: Ref<bevy::math::U64Vec2>) -> [u64; 2] { let output: [u64; 2] = bevy::math::U64Vec2::to_array(&_self).into(); @@ -9108,52 +13474,49 @@ impl bevy::math::U64Vec2 { bms_core_path = "bevy_mod_scripting_core", generated )] -impl bevy::math::U64Vec3 { - fn add( - _self: Val<bevy::math::U64Vec3>, - rhs: Ref<bevy::math::U64Vec3>, - ) -> Val<bevy::math::U64Vec3> { - let output: Val<bevy::math::U64Vec3> = <bevy::math::U64Vec3 as std::ops::Add< - &bevy::math::U64Vec3, - >>::add(_self.into_inner(), &rhs) - .into(); - output - } - fn add( - _self: Val<bevy::math::U64Vec3>, - rhs: Val<bevy::math::U64Vec3>, - ) -> Val<bevy::math::U64Vec3> { - let output: Val<bevy::math::U64Vec3> = <bevy::math::U64Vec3 as std::ops::Add< - bevy::math::U64Vec3, - >>::add(_self.into_inner(), rhs.into_inner()) - .into(); - output - } - fn add(_self: Val<bevy::math::U64Vec3>, rhs: u64) -> Val<bevy::math::U64Vec3> { - let output: Val<bevy::math::U64Vec3> = <bevy::math::U64Vec3 as std::ops::Add< - u64, - >>::add(_self.into_inner(), rhs) - .into(); - output - } +impl bevy::math::U64Vec3 { /// Casts all elements of `self` to `f64`. fn as_dvec3(_self: Ref<bevy::math::U64Vec3>) -> Val<bevy::math::DVec3> { let output: Val<bevy::math::DVec3> = bevy::math::U64Vec3::as_dvec3(&_self) .into(); output } + /// Casts all elements of `self` to `i16`. + fn as_i16vec3(_self: Ref<bevy::math::U64Vec3>) -> Val<bevy::math::I16Vec3> { + let output: Val<bevy::math::I16Vec3> = bevy::math::U64Vec3::as_i16vec3(&_self) + .into(); + output + } /// Casts all elements of `self` to `i64`. fn as_i64vec3(_self: Ref<bevy::math::U64Vec3>) -> Val<bevy::math::I64Vec3> { let output: Val<bevy::math::I64Vec3> = bevy::math::U64Vec3::as_i64vec3(&_self) .into(); output } + /// Casts all elements of `self` to `i8`. + fn as_i8vec3(_self: Ref<bevy::math::U64Vec3>) -> Val<bevy::math::I8Vec3> { + let output: Val<bevy::math::I8Vec3> = bevy::math::U64Vec3::as_i8vec3(&_self) + .into(); + output + } /// Casts all elements of `self` to `i32`. fn as_ivec3(_self: Ref<bevy::math::U64Vec3>) -> Val<bevy::math::IVec3> { let output: Val<bevy::math::IVec3> = bevy::math::U64Vec3::as_ivec3(&_self) .into(); output } + /// Casts all elements of `self` to `u16`. + fn as_u16vec3(_self: Ref<bevy::math::U64Vec3>) -> Val<bevy::math::U16Vec3> { + let output: Val<bevy::math::U16Vec3> = bevy::math::U64Vec3::as_u16vec3(&_self) + .into(); + output + } + /// Casts all elements of `self` to `u8`. + fn as_u8vec3(_self: Ref<bevy::math::U64Vec3>) -> Val<bevy::math::U8Vec3> { + let output: Val<bevy::math::U8Vec3> = bevy::math::U64Vec3::as_u8vec3(&_self) + .into(); + output + } /// Casts all elements of `self` to `u32`. fn as_uvec3(_self: Ref<bevy::math::U64Vec3>) -> Val<bevy::math::UVec3> { let output: Val<bevy::math::UVec3> = bevy::math::U64Vec3::as_uvec3(&_self) @@ -9171,13 +13534,6 @@ impl bevy::math::U64Vec3 { .into(); output } - fn assert_receiver_is_total_eq(_self: Ref<bevy::math::U64Vec3>) -> () { - let output: () = <bevy::math::U64Vec3 as std::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 @@ -9195,13 +13551,6 @@ impl bevy::math::U64Vec3 { .into(); output } - fn clone(_self: Ref<bevy::math::U64Vec3>) -> Val<bevy::math::U64Vec3> { - let output: Val<bevy::math::U64Vec3> = <bevy::math::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 @@ -9304,33 +13653,6 @@ impl bevy::math::U64Vec3 { .into(); output } - fn div( - _self: Val<bevy::math::U64Vec3>, - rhs: Ref<bevy::math::U64Vec3>, - ) -> Val<bevy::math::U64Vec3> { - let output: Val<bevy::math::U64Vec3> = <bevy::math::U64Vec3 as std::ops::Div< - &bevy::math::U64Vec3, - >>::div(_self.into_inner(), &rhs) - .into(); - output - } - fn div( - _self: Val<bevy::math::U64Vec3>, - rhs: Val<bevy::math::U64Vec3>, - ) -> Val<bevy::math::U64Vec3> { - let output: Val<bevy::math::U64Vec3> = <bevy::math::U64Vec3 as std::ops::Div< - bevy::math::U64Vec3, - >>::div(_self.into_inner(), rhs.into_inner()) - .into(); - output - } - fn div(_self: Val<bevy::math::U64Vec3>, rhs: u64) -> Val<bevy::math::U64Vec3> { - let output: Val<bevy::math::U64Vec3> = <bevy::math::U64Vec3 as std::ops::Div< - u64, - >>::div(_self.into_inner(), rhs) - .into(); - output - } /// Computes the dot product of `self` and `rhs`. fn dot(_self: Val<bevy::math::U64Vec3>, rhs: Val<bevy::math::U64Vec3>) -> u64 { let output: u64 = bevy::math::U64Vec3::dot(_self.into_inner(), rhs.into_inner()) @@ -9362,13 +13684,6 @@ impl bevy::math::U64Vec3 { let output: u64 = bevy::math::U64Vec3::element_sum(_self.into_inner()).into(); output } - fn eq(_self: Ref<bevy::math::U64Vec3>, other: Ref<bevy::math::U64Vec3>) -> bool { - let output: bool = <bevy::math::U64Vec3 as std::cmp::PartialEq< - bevy::math::U64Vec3, - >>::eq(&_self, &other) - .into(); - output - } /// Creates a 4D vector from `self` and the given `w` value. fn extend(_self: Val<bevy::math::U64Vec3>, w: u64) -> Val<bevy::math::U64Vec4> { let output: Val<bevy::math::U64Vec4> = bevy::math::U64Vec3::extend( @@ -9426,65 +13741,11 @@ impl bevy::math::U64Vec3 { let output: u64 = bevy::math::U64Vec3::min_element(_self.into_inner()).into(); output } - fn mul( - _self: Val<bevy::math::U64Vec3>, - rhs: Ref<bevy::math::U64Vec3>, - ) -> Val<bevy::math::U64Vec3> { - let output: Val<bevy::math::U64Vec3> = <bevy::math::U64Vec3 as std::ops::Mul< - &bevy::math::U64Vec3, - >>::mul(_self.into_inner(), &rhs) - .into(); - output - } - fn mul( - _self: Val<bevy::math::U64Vec3>, - rhs: Val<bevy::math::U64Vec3>, - ) -> Val<bevy::math::U64Vec3> { - let output: Val<bevy::math::U64Vec3> = <bevy::math::U64Vec3 as std::ops::Mul< - bevy::math::U64Vec3, - >>::mul(_self.into_inner(), rhs.into_inner()) - .into(); - output - } - fn mul(_self: Val<bevy::math::U64Vec3>, rhs: u64) -> Val<bevy::math::U64Vec3> { - let output: Val<bevy::math::U64Vec3> = <bevy::math::U64Vec3 as std::ops::Mul< - u64, - >>::mul(_self.into_inner(), rhs) - .into(); - output - } /// Creates a new vector. fn new(x: u64, y: u64, z: u64) -> Val<bevy::math::U64Vec3> { let output: Val<bevy::math::U64Vec3> = bevy::math::U64Vec3::new(x, y, z).into(); output } - fn rem( - _self: Val<bevy::math::U64Vec3>, - rhs: Ref<bevy::math::U64Vec3>, - ) -> Val<bevy::math::U64Vec3> { - let output: Val<bevy::math::U64Vec3> = <bevy::math::U64Vec3 as std::ops::Rem< - &bevy::math::U64Vec3, - >>::rem(_self.into_inner(), &rhs) - .into(); - output - } - fn rem( - _self: Val<bevy::math::U64Vec3>, - rhs: Val<bevy::math::U64Vec3>, - ) -> Val<bevy::math::U64Vec3> { - let output: Val<bevy::math::U64Vec3> = <bevy::math::U64Vec3 as std::ops::Rem< - bevy::math::U64Vec3, - >>::rem(_self.into_inner(), rhs.into_inner()) - .into(); - output - } - fn rem(_self: Val<bevy::math::U64Vec3>, rhs: u64) -> Val<bevy::math::U64Vec3> { - let output: Val<bevy::math::U64Vec3> = <bevy::math::U64Vec3 as std::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( @@ -9572,33 +13833,6 @@ impl bevy::math::U64Vec3 { let output: Val<bevy::math::U64Vec3> = bevy::math::U64Vec3::splat(v).into(); output } - fn sub( - _self: Val<bevy::math::U64Vec3>, - rhs: Ref<bevy::math::U64Vec3>, - ) -> Val<bevy::math::U64Vec3> { - let output: Val<bevy::math::U64Vec3> = <bevy::math::U64Vec3 as std::ops::Sub< - &bevy::math::U64Vec3, - >>::sub(_self.into_inner(), &rhs) - .into(); - output - } - fn sub( - _self: Val<bevy::math::U64Vec3>, - rhs: Val<bevy::math::U64Vec3>, - ) -> Val<bevy::math::U64Vec3> { - let output: Val<bevy::math::U64Vec3> = <bevy::math::U64Vec3 as std::ops::Sub< - bevy::math::U64Vec3, - >>::sub(_self.into_inner(), rhs.into_inner()) - .into(); - output - } - fn sub(_self: Val<bevy::math::U64Vec3>, rhs: u64) -> Val<bevy::math::U64Vec3> { - let output: Val<bevy::math::U64Vec3> = <bevy::math::U64Vec3 as std::ops::Sub< - u64, - >>::sub(_self.into_inner(), rhs) - .into(); - output - } /// `[x, y, z]` fn to_array(_self: Ref<bevy::math::U64Vec3>) -> [u64; 3] { let output: [u64; 3] = bevy::math::U64Vec3::to_array(&_self).into(); @@ -9713,51 +13947,48 @@ impl bevy::math::U64Vec3 { generated )] impl bevy::math::U64Vec4 { - fn add( - _self: Val<bevy::math::U64Vec4>, - rhs: Ref<bevy::math::U64Vec4>, - ) -> Val<bevy::math::U64Vec4> { - let output: Val<bevy::math::U64Vec4> = <bevy::math::U64Vec4 as std::ops::Add< - &bevy::math::U64Vec4, - >>::add(_self.into_inner(), &rhs) - .into(); - output - } - fn add( - _self: Val<bevy::math::U64Vec4>, - rhs: Val<bevy::math::U64Vec4>, - ) -> Val<bevy::math::U64Vec4> { - let output: Val<bevy::math::U64Vec4> = <bevy::math::U64Vec4 as std::ops::Add< - bevy::math::U64Vec4, - >>::add(_self.into_inner(), rhs.into_inner()) - .into(); - output - } - fn add(_self: Val<bevy::math::U64Vec4>, rhs: u64) -> Val<bevy::math::U64Vec4> { - let output: Val<bevy::math::U64Vec4> = <bevy::math::U64Vec4 as std::ops::Add< - u64, - >>::add(_self.into_inner(), rhs) - .into(); - output - } /// Casts all elements of `self` to `f64`. fn as_dvec4(_self: Ref<bevy::math::U64Vec4>) -> Val<bevy::math::DVec4> { let output: Val<bevy::math::DVec4> = bevy::math::U64Vec4::as_dvec4(&_self) .into(); output } + /// Casts all elements of `self` to `i16`. + fn as_i16vec4(_self: Ref<bevy::math::U64Vec4>) -> Val<bevy::math::I16Vec4> { + let output: Val<bevy::math::I16Vec4> = bevy::math::U64Vec4::as_i16vec4(&_self) + .into(); + output + } /// Casts all elements of `self` to `i64`. fn as_i64vec4(_self: Ref<bevy::math::U64Vec4>) -> Val<bevy::math::I64Vec4> { let output: Val<bevy::math::I64Vec4> = bevy::math::U64Vec4::as_i64vec4(&_self) .into(); output } + /// Casts all elements of `self` to `i8`. + fn as_i8vec4(_self: Ref<bevy::math::U64Vec4>) -> Val<bevy::math::I8Vec4> { + let output: Val<bevy::math::I8Vec4> = bevy::math::U64Vec4::as_i8vec4(&_self) + .into(); + output + } /// Casts all elements of `self` to `i32`. fn as_ivec4(_self: Ref<bevy::math::U64Vec4>) -> Val<bevy::math::IVec4> { let output: Val<bevy::math::IVec4> = bevy::math::U64Vec4::as_ivec4(&_self) .into(); output } + /// Casts all elements of `self` to `u16`. + fn as_u16vec4(_self: Ref<bevy::math::U64Vec4>) -> Val<bevy::math::U16Vec4> { + let output: Val<bevy::math::U16Vec4> = bevy::math::U64Vec4::as_u16vec4(&_self) + .into(); + output + } + /// Casts all elements of `self` to `u8`. + fn as_u8vec4(_self: Ref<bevy::math::U64Vec4>) -> Val<bevy::math::U8Vec4> { + let output: Val<bevy::math::U8Vec4> = bevy::math::U64Vec4::as_u8vec4(&_self) + .into(); + output + } /// Casts all elements of `self` to `u32`. fn as_uvec4(_self: Ref<bevy::math::U64Vec4>) -> Val<bevy::math::UVec4> { let output: Val<bevy::math::UVec4> = bevy::math::U64Vec4::as_uvec4(&_self) @@ -9769,13 +14000,6 @@ impl bevy::math::U64Vec4 { let output: Val<bevy::math::Vec4> = bevy::math::U64Vec4::as_vec4(&_self).into(); output } - fn assert_receiver_is_total_eq(_self: Ref<bevy::math::U64Vec4>) -> () { - let output: () = <bevy::math::U64Vec4 as std::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 @@ -9793,13 +14017,6 @@ impl bevy::math::U64Vec4 { .into(); output } - fn clone(_self: Ref<bevy::math::U64Vec4>) -> Val<bevy::math::U64Vec4> { - let output: Val<bevy::math::U64Vec4> = <bevy::math::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 @@ -9890,33 +14107,6 @@ impl bevy::math::U64Vec4 { .into(); output } - fn div( - _self: Val<bevy::math::U64Vec4>, - rhs: Ref<bevy::math::U64Vec4>, - ) -> Val<bevy::math::U64Vec4> { - let output: Val<bevy::math::U64Vec4> = <bevy::math::U64Vec4 as std::ops::Div< - &bevy::math::U64Vec4, - >>::div(_self.into_inner(), &rhs) - .into(); - output - } - fn div( - _self: Val<bevy::math::U64Vec4>, - rhs: Val<bevy::math::U64Vec4>, - ) -> Val<bevy::math::U64Vec4> { - let output: Val<bevy::math::U64Vec4> = <bevy::math::U64Vec4 as std::ops::Div< - bevy::math::U64Vec4, - >>::div(_self.into_inner(), rhs.into_inner()) - .into(); - output - } - fn div(_self: Val<bevy::math::U64Vec4>, rhs: u64) -> Val<bevy::math::U64Vec4> { - let output: Val<bevy::math::U64Vec4> = <bevy::math::U64Vec4 as std::ops::Div< - u64, - >>::div(_self.into_inner(), rhs) - .into(); - output - } /// Computes the dot product of `self` and `rhs`. fn dot(_self: Val<bevy::math::U64Vec4>, rhs: Val<bevy::math::U64Vec4>) -> u64 { let output: u64 = bevy::math::U64Vec4::dot(_self.into_inner(), rhs.into_inner()) @@ -9948,13 +14138,6 @@ impl bevy::math::U64Vec4 { let output: u64 = bevy::math::U64Vec4::element_sum(_self.into_inner()).into(); output } - fn eq(_self: Ref<bevy::math::U64Vec4>, other: Ref<bevy::math::U64Vec4>) -> bool { - let output: bool = <bevy::math::U64Vec4 as std::cmp::PartialEq< - bevy::math::U64Vec4, - >>::eq(&_self, &other) - .into(); - output - } /// Creates a new vector from an array. fn from_array(a: [u64; 4]) -> Val<bevy::math::U64Vec4> { let output: Val<bevy::math::U64Vec4> = bevy::math::U64Vec4::from_array(a).into(); @@ -10003,66 +14186,12 @@ impl bevy::math::U64Vec4 { let output: u64 = bevy::math::U64Vec4::min_element(_self.into_inner()).into(); output } - fn mul( - _self: Val<bevy::math::U64Vec4>, - rhs: Ref<bevy::math::U64Vec4>, - ) -> Val<bevy::math::U64Vec4> { - let output: Val<bevy::math::U64Vec4> = <bevy::math::U64Vec4 as std::ops::Mul< - &bevy::math::U64Vec4, - >>::mul(_self.into_inner(), &rhs) - .into(); - output - } - fn mul( - _self: Val<bevy::math::U64Vec4>, - rhs: Val<bevy::math::U64Vec4>, - ) -> Val<bevy::math::U64Vec4> { - let output: Val<bevy::math::U64Vec4> = <bevy::math::U64Vec4 as std::ops::Mul< - bevy::math::U64Vec4, - >>::mul(_self.into_inner(), rhs.into_inner()) - .into(); - output - } - fn mul(_self: Val<bevy::math::U64Vec4>, rhs: u64) -> Val<bevy::math::U64Vec4> { - let output: Val<bevy::math::U64Vec4> = <bevy::math::U64Vec4 as std::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<bevy::math::U64Vec4> { let output: Val<bevy::math::U64Vec4> = bevy::math::U64Vec4::new(x, y, z, w) .into(); output } - fn rem( - _self: Val<bevy::math::U64Vec4>, - rhs: Ref<bevy::math::U64Vec4>, - ) -> Val<bevy::math::U64Vec4> { - let output: Val<bevy::math::U64Vec4> = <bevy::math::U64Vec4 as std::ops::Rem< - &bevy::math::U64Vec4, - >>::rem(_self.into_inner(), &rhs) - .into(); - output - } - fn rem( - _self: Val<bevy::math::U64Vec4>, - rhs: Val<bevy::math::U64Vec4>, - ) -> Val<bevy::math::U64Vec4> { - let output: Val<bevy::math::U64Vec4> = <bevy::math::U64Vec4 as std::ops::Rem< - bevy::math::U64Vec4, - >>::rem(_self.into_inner(), rhs.into_inner()) - .into(); - output - } - fn rem(_self: Val<bevy::math::U64Vec4>, rhs: u64) -> Val<bevy::math::U64Vec4> { - let output: Val<bevy::math::U64Vec4> = <bevy::math::U64Vec4 as std::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( @@ -10150,33 +14279,6 @@ impl bevy::math::U64Vec4 { let output: Val<bevy::math::U64Vec4> = bevy::math::U64Vec4::splat(v).into(); output } - fn sub( - _self: Val<bevy::math::U64Vec4>, - rhs: Ref<bevy::math::U64Vec4>, - ) -> Val<bevy::math::U64Vec4> { - let output: Val<bevy::math::U64Vec4> = <bevy::math::U64Vec4 as std::ops::Sub< - &bevy::math::U64Vec4, - >>::sub(_self.into_inner(), &rhs) - .into(); - output - } - fn sub( - _self: Val<bevy::math::U64Vec4>, - rhs: Val<bevy::math::U64Vec4>, - ) -> Val<bevy::math::U64Vec4> { - let output: Val<bevy::math::U64Vec4> = <bevy::math::U64Vec4 as std::ops::Sub< - bevy::math::U64Vec4, - >>::sub(_self.into_inner(), rhs.into_inner()) - .into(); - output - } - fn sub(_self: Val<bevy::math::U64Vec4>, rhs: u64) -> Val<bevy::math::U64Vec4> { - let output: Val<bevy::math::U64Vec4> = <bevy::math::U64Vec4 as std::ops::Sub< - u64, - >>::sub(_self.into_inner(), rhs) - .into(); - output - } /// `[x, y, z, w]` fn to_array(_self: Ref<bevy::math::U64Vec4>) -> [u64; 4] { let output: [u64; 4] = bevy::math::U64Vec4::to_array(&_self).into(); @@ -10326,33 +14428,6 @@ impl bevy::math::Vec2 { .into(); output } - fn add( - _self: Val<bevy::math::Vec2>, - rhs: Ref<bevy::math::Vec2>, - ) -> Val<bevy::math::Vec2> { - let output: Val<bevy::math::Vec2> = <bevy::math::Vec2 as std::ops::Add< - &bevy::math::Vec2, - >>::add(_self.into_inner(), &rhs) - .into(); - output - } - fn add( - _self: Val<bevy::math::Vec2>, - rhs: Val<bevy::math::Vec2>, - ) -> Val<bevy::math::Vec2> { - let output: Val<bevy::math::Vec2> = <bevy::math::Vec2 as std::ops::Add< - bevy::math::Vec2, - >>::add(_self.into_inner(), rhs.into_inner()) - .into(); - output - } - fn add(_self: Val<bevy::math::Vec2>, rhs: f32) -> Val<bevy::math::Vec2> { - let output: Val<bevy::math::Vec2> = <bevy::math::Vec2 as std::ops::Add< - f32, - >>::add(_self.into_inner(), rhs) - .into(); - output - } fn angle_between(_self: Val<bevy::math::Vec2>, rhs: Val<bevy::math::Vec2>) -> f32 { let output: f32 = bevy::math::Vec2::angle_between( _self.into_inner(), @@ -10376,23 +14451,45 @@ impl bevy::math::Vec2 { let output: Val<bevy::math::DVec2> = bevy::math::Vec2::as_dvec2(&_self).into(); output } + /// Casts all elements of `self` to `i16`. + fn as_i16vec2(_self: Ref<bevy::math::Vec2>) -> Val<bevy::math::I16Vec2> { + let output: Val<bevy::math::I16Vec2> = bevy::math::Vec2::as_i16vec2(&_self) + .into(); + output + } /// Casts all elements of `self` to `i64`. fn as_i64vec2(_self: Ref<bevy::math::Vec2>) -> Val<bevy::math::I64Vec2> { let output: Val<bevy::math::I64Vec2> = bevy::math::Vec2::as_i64vec2(&_self) .into(); output } + /// Casts all elements of `self` to `i8`. + fn as_i8vec2(_self: Ref<bevy::math::Vec2>) -> Val<bevy::math::I8Vec2> { + let output: Val<bevy::math::I8Vec2> = bevy::math::Vec2::as_i8vec2(&_self).into(); + output + } /// Casts all elements of `self` to `i32`. fn as_ivec2(_self: Ref<bevy::math::Vec2>) -> Val<bevy::math::IVec2> { let output: Val<bevy::math::IVec2> = bevy::math::Vec2::as_ivec2(&_self).into(); output } + /// Casts all elements of `self` to `u16`. + fn as_u16vec2(_self: Ref<bevy::math::Vec2>) -> Val<bevy::math::U16Vec2> { + let output: Val<bevy::math::U16Vec2> = bevy::math::Vec2::as_u16vec2(&_self) + .into(); + output + } /// Casts all elements of `self` to `u64`. fn as_u64vec2(_self: Ref<bevy::math::Vec2>) -> Val<bevy::math::U64Vec2> { let output: Val<bevy::math::U64Vec2> = bevy::math::Vec2::as_u64vec2(&_self) .into(); output } + /// Casts all elements of `self` to `u8`. + fn as_u8vec2(_self: Ref<bevy::math::Vec2>) -> Val<bevy::math::U8Vec2> { + let output: Val<bevy::math::U8Vec2> = bevy::math::Vec2::as_u8vec2(&_self).into(); + output + } /// Casts all elements of `self` to `u32`. fn as_uvec2(_self: Ref<bevy::math::Vec2>) -> Val<bevy::math::UVec2> { let output: Val<bevy::math::UVec2> = bevy::math::Vec2::as_uvec2(&_self).into(); @@ -10466,13 +14563,6 @@ impl bevy::math::Vec2 { .into(); output } - fn clone(_self: Ref<bevy::math::Vec2>) -> Val<bevy::math::Vec2> { - let output: Val<bevy::math::Vec2> = <bevy::math::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 @@ -10596,33 +14686,6 @@ impl bevy::math::Vec2 { .into(); output } - fn div( - _self: Val<bevy::math::Vec2>, - rhs: Ref<bevy::math::Vec2>, - ) -> Val<bevy::math::Vec2> { - let output: Val<bevy::math::Vec2> = <bevy::math::Vec2 as std::ops::Div< - &bevy::math::Vec2, - >>::div(_self.into_inner(), &rhs) - .into(); - output - } - fn div( - _self: Val<bevy::math::Vec2>, - rhs: Val<bevy::math::Vec2>, - ) -> Val<bevy::math::Vec2> { - let output: Val<bevy::math::Vec2> = <bevy::math::Vec2 as std::ops::Div< - bevy::math::Vec2, - >>::div(_self.into_inner(), rhs.into_inner()) - .into(); - output - } - fn div(_self: Val<bevy::math::Vec2>, rhs: f32) -> Val<bevy::math::Vec2> { - let output: Val<bevy::math::Vec2> = <bevy::math::Vec2 as std::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<bevy::math::Vec2>, @@ -10665,13 +14728,6 @@ impl bevy::math::Vec2 { let output: f32 = bevy::math::Vec2::element_sum(_self.into_inner()).into(); output } - fn eq(_self: Ref<bevy::math::Vec2>, other: Ref<bevy::math::Vec2>) -> bool { - let output: bool = <bevy::math::Vec2 as std::cmp::PartialEq< - bevy::math::Vec2, - >>::eq(&_self, &other) - .into(); - output - } /// Returns a vector containing `e^self` (the exponential function) for each element of /// `self`. fn exp(_self: Val<bevy::math::Vec2>) -> Val<bevy::math::Vec2> { @@ -10874,33 +14930,6 @@ impl bevy::math::Vec2 { .into(); output } - fn mul( - _self: Val<bevy::math::Vec2>, - rhs: Ref<bevy::math::Vec2>, - ) -> Val<bevy::math::Vec2> { - let output: Val<bevy::math::Vec2> = <bevy::math::Vec2 as std::ops::Mul< - &bevy::math::Vec2, - >>::mul(_self.into_inner(), &rhs) - .into(); - output - } - fn mul( - _self: Val<bevy::math::Vec2>, - rhs: Val<bevy::math::Vec2>, - ) -> Val<bevy::math::Vec2> { - let output: Val<bevy::math::Vec2> = <bevy::math::Vec2 as std::ops::Mul< - bevy::math::Vec2, - >>::mul(_self.into_inner(), rhs.into_inner()) - .into(); - output - } - fn mul(_self: Val<bevy::math::Vec2>, rhs: f32) -> Val<bevy::math::Vec2> { - let output: Val<bevy::math::Vec2> = <bevy::math::Vec2 as std::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 @@ -10920,13 +14949,6 @@ impl bevy::math::Vec2 { .into(); output } - fn neg(_self: Val<bevy::math::Vec2>) -> Val<bevy::math::Vec2> { - let output: Val<bevy::math::Vec2> = <bevy::math::Vec2 as std::ops::Neg>::neg( - _self.into_inner(), - ) - .into(); - output - } /// Creates a new vector. fn new(x: f32, y: f32) -> Val<bevy::math::Vec2> { let output: Val<bevy::math::Vec2> = bevy::math::Vec2::new(x, y).into(); @@ -11098,33 +15120,6 @@ impl bevy::math::Vec2 { .into(); output } - fn rem( - _self: Val<bevy::math::Vec2>, - rhs: Ref<bevy::math::Vec2>, - ) -> Val<bevy::math::Vec2> { - let output: Val<bevy::math::Vec2> = <bevy::math::Vec2 as std::ops::Rem< - &bevy::math::Vec2, - >>::rem(_self.into_inner(), &rhs) - .into(); - output - } - fn rem( - _self: Val<bevy::math::Vec2>, - rhs: Val<bevy::math::Vec2>, - ) -> Val<bevy::math::Vec2> { - let output: Val<bevy::math::Vec2> = <bevy::math::Vec2 as std::ops::Rem< - bevy::math::Vec2, - >>::rem(_self.into_inner(), rhs.into_inner()) - .into(); - output - } - fn rem(_self: Val<bevy::math::Vec2>, rhs: f32) -> Val<bevy::math::Vec2> { - let output: Val<bevy::math::Vec2> = <bevy::math::Vec2 as std::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( @@ -11207,33 +15202,6 @@ impl bevy::math::Vec2 { let output: Val<bevy::math::Vec2> = bevy::math::Vec2::splat(v).into(); output } - fn sub( - _self: Val<bevy::math::Vec2>, - rhs: Ref<bevy::math::Vec2>, - ) -> Val<bevy::math::Vec2> { - let output: Val<bevy::math::Vec2> = <bevy::math::Vec2 as std::ops::Sub< - &bevy::math::Vec2, - >>::sub(_self.into_inner(), &rhs) - .into(); - output - } - fn sub( - _self: Val<bevy::math::Vec2>, - rhs: Val<bevy::math::Vec2>, - ) -> Val<bevy::math::Vec2> { - let output: Val<bevy::math::Vec2> = <bevy::math::Vec2 as std::ops::Sub< - bevy::math::Vec2, - >>::sub(_self.into_inner(), rhs.into_inner()) - .into(); - output - } - fn sub(_self: Val<bevy::math::Vec2>, rhs: f32) -> Val<bevy::math::Vec2> { - let output: Val<bevy::math::Vec2> = <bevy::math::Vec2 as std::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<bevy::math::Vec2>) -> f32 { @@ -11304,33 +15272,6 @@ impl bevy::math::Vec3A { .into(); output } - fn add( - _self: Val<bevy::math::Vec3A>, - rhs: Ref<bevy::math::Vec3A>, - ) -> Val<bevy::math::Vec3A> { - let output: Val<bevy::math::Vec3A> = <bevy::math::Vec3A as std::ops::Add< - &bevy::math::Vec3A, - >>::add(_self.into_inner(), &rhs) - .into(); - output - } - fn add( - _self: Val<bevy::math::Vec3A>, - rhs: Val<bevy::math::Vec3A>, - ) -> Val<bevy::math::Vec3A> { - let output: Val<bevy::math::Vec3A> = <bevy::math::Vec3A as std::ops::Add< - bevy::math::Vec3A, - >>::add(_self.into_inner(), rhs.into_inner()) - .into(); - output - } - fn add(_self: Val<bevy::math::Vec3A>, rhs: f32) -> Val<bevy::math::Vec3A> { - let output: Val<bevy::math::Vec3A> = <bevy::math::Vec3A as std::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<bevy::math::Vec3A>, rhs: Val<bevy::math::Vec3A>) -> f32 { @@ -11368,23 +15309,47 @@ impl bevy::math::Vec3A { let output: Val<bevy::math::DVec3> = bevy::math::Vec3A::as_dvec3(&_self).into(); output } + /// Casts all elements of `self` to `i16`. + fn as_i16vec3(_self: Ref<bevy::math::Vec3A>) -> Val<bevy::math::I16Vec3> { + let output: Val<bevy::math::I16Vec3> = bevy::math::Vec3A::as_i16vec3(&_self) + .into(); + output + } /// Casts all elements of `self` to `i64`. fn as_i64vec3(_self: Ref<bevy::math::Vec3A>) -> Val<bevy::math::I64Vec3> { let output: Val<bevy::math::I64Vec3> = bevy::math::Vec3A::as_i64vec3(&_self) .into(); output } + /// Casts all elements of `self` to `i8`. + fn as_i8vec3(_self: Ref<bevy::math::Vec3A>) -> Val<bevy::math::I8Vec3> { + let output: Val<bevy::math::I8Vec3> = bevy::math::Vec3A::as_i8vec3(&_self) + .into(); + output + } /// Casts all elements of `self` to `i32`. fn as_ivec3(_self: Ref<bevy::math::Vec3A>) -> Val<bevy::math::IVec3> { let output: Val<bevy::math::IVec3> = bevy::math::Vec3A::as_ivec3(&_self).into(); output } + /// Casts all elements of `self` to `u16`. + fn as_u16vec3(_self: Ref<bevy::math::Vec3A>) -> Val<bevy::math::U16Vec3> { + let output: Val<bevy::math::U16Vec3> = bevy::math::Vec3A::as_u16vec3(&_self) + .into(); + output + } /// Casts all elements of `self` to `u64`. fn as_u64vec3(_self: Ref<bevy::math::Vec3A>) -> Val<bevy::math::U64Vec3> { let output: Val<bevy::math::U64Vec3> = bevy::math::Vec3A::as_u64vec3(&_self) .into(); output } + /// Casts all elements of `self` to `u8`. + fn as_u8vec3(_self: Ref<bevy::math::Vec3A>) -> Val<bevy::math::U8Vec3> { + let output: Val<bevy::math::U8Vec3> = bevy::math::Vec3A::as_u8vec3(&_self) + .into(); + output + } /// Casts all elements of `self` to `u32`. fn as_uvec3(_self: Ref<bevy::math::Vec3A>) -> Val<bevy::math::UVec3> { let output: Val<bevy::math::UVec3> = bevy::math::Vec3A::as_uvec3(&_self).into(); @@ -11458,13 +15423,6 @@ impl bevy::math::Vec3A { .into(); output } - fn clone(_self: Ref<bevy::math::Vec3A>) -> Val<bevy::math::Vec3A> { - let output: Val<bevy::math::Vec3A> = <bevy::math::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 @@ -11600,33 +15558,6 @@ impl bevy::math::Vec3A { .into(); output } - fn div( - _self: Val<bevy::math::Vec3A>, - rhs: Ref<bevy::math::Vec3A>, - ) -> Val<bevy::math::Vec3A> { - let output: Val<bevy::math::Vec3A> = <bevy::math::Vec3A as std::ops::Div< - &bevy::math::Vec3A, - >>::div(_self.into_inner(), &rhs) - .into(); - output - } - fn div( - _self: Val<bevy::math::Vec3A>, - rhs: Val<bevy::math::Vec3A>, - ) -> Val<bevy::math::Vec3A> { - let output: Val<bevy::math::Vec3A> = <bevy::math::Vec3A as std::ops::Div< - bevy::math::Vec3A, - >>::div(_self.into_inner(), rhs.into_inner()) - .into(); - output - } - fn div(_self: Val<bevy::math::Vec3A>, rhs: f32) -> Val<bevy::math::Vec3A> { - let output: Val<bevy::math::Vec3A> = <bevy::math::Vec3A as std::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<bevy::math::Vec3A>, @@ -11669,13 +15600,6 @@ impl bevy::math::Vec3A { let output: f32 = bevy::math::Vec3A::element_sum(_self.into_inner()).into(); output } - fn eq(_self: Ref<bevy::math::Vec3A>, rhs: Ref<bevy::math::Vec3A>) -> bool { - let output: bool = <bevy::math::Vec3A as std::cmp::PartialEq< - bevy::math::Vec3A, - >>::eq(&_self, &rhs) - .into(); - output - } /// Returns a vector containing `e^self` (the exponential function) for each element of /// `self`. fn exp(_self: Val<bevy::math::Vec3A>) -> Val<bevy::math::Vec3A> { @@ -11877,33 +15801,6 @@ impl bevy::math::Vec3A { .into(); output } - fn mul( - _self: Val<bevy::math::Vec3A>, - rhs: Ref<bevy::math::Vec3A>, - ) -> Val<bevy::math::Vec3A> { - let output: Val<bevy::math::Vec3A> = <bevy::math::Vec3A as std::ops::Mul< - &bevy::math::Vec3A, - >>::mul(_self.into_inner(), &rhs) - .into(); - output - } - fn mul( - _self: Val<bevy::math::Vec3A>, - rhs: Val<bevy::math::Vec3A>, - ) -> Val<bevy::math::Vec3A> { - let output: Val<bevy::math::Vec3A> = <bevy::math::Vec3A as std::ops::Mul< - bevy::math::Vec3A, - >>::mul(_self.into_inner(), rhs.into_inner()) - .into(); - output - } - fn mul(_self: Val<bevy::math::Vec3A>, rhs: f32) -> Val<bevy::math::Vec3A> { - let output: Val<bevy::math::Vec3A> = <bevy::math::Vec3A as std::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 @@ -11923,13 +15820,6 @@ impl bevy::math::Vec3A { .into(); output } - fn neg(_self: Val<bevy::math::Vec3A>) -> Val<bevy::math::Vec3A> { - let output: Val<bevy::math::Vec3A> = <bevy::math::Vec3A as std::ops::Neg>::neg( - _self.into_inner(), - ) - .into(); - output - } /// Creates a new vector. fn new(x: f32, y: f32, z: f32) -> Val<bevy::math::Vec3A> { let output: Val<bevy::math::Vec3A> = bevy::math::Vec3A::new(x, y, z).into(); @@ -12088,33 +15978,6 @@ impl bevy::math::Vec3A { .into(); output } - fn rem( - _self: Val<bevy::math::Vec3A>, - rhs: Ref<bevy::math::Vec3A>, - ) -> Val<bevy::math::Vec3A> { - let output: Val<bevy::math::Vec3A> = <bevy::math::Vec3A as std::ops::Rem< - &bevy::math::Vec3A, - >>::rem(_self.into_inner(), &rhs) - .into(); - output - } - fn rem( - _self: Val<bevy::math::Vec3A>, - rhs: Val<bevy::math::Vec3A>, - ) -> Val<bevy::math::Vec3A> { - let output: Val<bevy::math::Vec3A> = <bevy::math::Vec3A as std::ops::Rem< - bevy::math::Vec3A, - >>::rem(_self.into_inner(), rhs.into_inner()) - .into(); - output - } - fn rem(_self: Val<bevy::math::Vec3A>, rhs: f32) -> Val<bevy::math::Vec3A> { - let output: Val<bevy::math::Vec3A> = <bevy::math::Vec3A as std::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( @@ -12168,33 +16031,6 @@ impl bevy::math::Vec3A { let output: Val<bevy::math::Vec3A> = bevy::math::Vec3A::splat(v).into(); output } - fn sub( - _self: Val<bevy::math::Vec3A>, - rhs: Ref<bevy::math::Vec3A>, - ) -> Val<bevy::math::Vec3A> { - let output: Val<bevy::math::Vec3A> = <bevy::math::Vec3A as std::ops::Sub< - &bevy::math::Vec3A, - >>::sub(_self.into_inner(), &rhs) - .into(); - output - } - fn sub( - _self: Val<bevy::math::Vec3A>, - rhs: Val<bevy::math::Vec3A>, - ) -> Val<bevy::math::Vec3A> { - let output: Val<bevy::math::Vec3A> = <bevy::math::Vec3A as std::ops::Sub< - bevy::math::Vec3A, - >>::sub(_self.into_inner(), rhs.into_inner()) - .into(); - output - } - fn sub(_self: Val<bevy::math::Vec3A>, rhs: f32) -> Val<bevy::math::Vec3A> { - let output: Val<bevy::math::Vec3A> = <bevy::math::Vec3A as std::ops::Sub< - f32, - >>::sub(_self.into_inner(), rhs) - .into(); - output - } /// `[x, y, z]` fn to_array(_self: Ref<bevy::math::Vec3A>) -> [f32; 3] { let output: [f32; 3] = bevy::math::Vec3A::to_array(&_self).into(); @@ -12277,55 +16113,50 @@ impl bevy::math::Vec4 { .into(); output } - fn add( - _self: Val<bevy::math::Vec4>, - rhs: Ref<bevy::math::Vec4>, - ) -> Val<bevy::math::Vec4> { - let output: Val<bevy::math::Vec4> = <bevy::math::Vec4 as std::ops::Add< - &bevy::math::Vec4, - >>::add(_self.into_inner(), &rhs) - .into(); - output - } - fn add( - _self: Val<bevy::math::Vec4>, - rhs: Val<bevy::math::Vec4>, - ) -> Val<bevy::math::Vec4> { - let output: Val<bevy::math::Vec4> = <bevy::math::Vec4 as std::ops::Add< - bevy::math::Vec4, - >>::add(_self.into_inner(), rhs.into_inner()) - .into(); - output - } - fn add(_self: Val<bevy::math::Vec4>, rhs: f32) -> Val<bevy::math::Vec4> { - let output: Val<bevy::math::Vec4> = <bevy::math::Vec4 as std::ops::Add< - f32, - >>::add(_self.into_inner(), rhs) - .into(); - output - } /// Casts all elements of `self` to `f64`. fn as_dvec4(_self: Ref<bevy::math::Vec4>) -> Val<bevy::math::DVec4> { let output: Val<bevy::math::DVec4> = bevy::math::Vec4::as_dvec4(&_self).into(); output } + /// Casts all elements of `self` to `i16`. + fn as_i16vec4(_self: Ref<bevy::math::Vec4>) -> Val<bevy::math::I16Vec4> { + let output: Val<bevy::math::I16Vec4> = bevy::math::Vec4::as_i16vec4(&_self) + .into(); + output + } /// Casts all elements of `self` to `i64`. fn as_i64vec4(_self: Ref<bevy::math::Vec4>) -> Val<bevy::math::I64Vec4> { let output: Val<bevy::math::I64Vec4> = bevy::math::Vec4::as_i64vec4(&_self) .into(); output } + /// Casts all elements of `self` to `i8`. + fn as_i8vec4(_self: Ref<bevy::math::Vec4>) -> Val<bevy::math::I8Vec4> { + let output: Val<bevy::math::I8Vec4> = bevy::math::Vec4::as_i8vec4(&_self).into(); + output + } /// Casts all elements of `self` to `i32`. fn as_ivec4(_self: Ref<bevy::math::Vec4>) -> Val<bevy::math::IVec4> { let output: Val<bevy::math::IVec4> = bevy::math::Vec4::as_ivec4(&_self).into(); output } + /// Casts all elements of `self` to `u16`. + fn as_u16vec4(_self: Ref<bevy::math::Vec4>) -> Val<bevy::math::U16Vec4> { + let output: Val<bevy::math::U16Vec4> = bevy::math::Vec4::as_u16vec4(&_self) + .into(); + output + } /// Casts all elements of `self` to `u64`. fn as_u64vec4(_self: Ref<bevy::math::Vec4>) -> Val<bevy::math::U64Vec4> { let output: Val<bevy::math::U64Vec4> = bevy::math::Vec4::as_u64vec4(&_self) .into(); output } + /// Casts all elements of `self` to `u8`. + fn as_u8vec4(_self: Ref<bevy::math::Vec4>) -> Val<bevy::math::U8Vec4> { + let output: Val<bevy::math::U8Vec4> = bevy::math::Vec4::as_u8vec4(&_self).into(); + output + } /// Casts all elements of `self` to `u32`. fn as_uvec4(_self: Ref<bevy::math::Vec4>) -> Val<bevy::math::UVec4> { let output: Val<bevy::math::UVec4> = bevy::math::Vec4::as_uvec4(&_self).into(); @@ -12399,13 +16230,6 @@ impl bevy::math::Vec4 { .into(); output } - fn clone(_self: Ref<bevy::math::Vec4>) -> Val<bevy::math::Vec4> { - let output: Val<bevy::math::Vec4> = <bevy::math::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 @@ -12529,33 +16353,6 @@ impl bevy::math::Vec4 { .into(); output } - fn div( - _self: Val<bevy::math::Vec4>, - rhs: Ref<bevy::math::Vec4>, - ) -> Val<bevy::math::Vec4> { - let output: Val<bevy::math::Vec4> = <bevy::math::Vec4 as std::ops::Div< - &bevy::math::Vec4, - >>::div(_self.into_inner(), &rhs) - .into(); - output - } - fn div( - _self: Val<bevy::math::Vec4>, - rhs: Val<bevy::math::Vec4>, - ) -> Val<bevy::math::Vec4> { - let output: Val<bevy::math::Vec4> = <bevy::math::Vec4 as std::ops::Div< - bevy::math::Vec4, - >>::div(_self.into_inner(), rhs.into_inner()) - .into(); - output - } - fn div(_self: Val<bevy::math::Vec4>, rhs: f32) -> Val<bevy::math::Vec4> { - let output: Val<bevy::math::Vec4> = <bevy::math::Vec4 as std::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<bevy::math::Vec4>, @@ -12598,13 +16395,6 @@ impl bevy::math::Vec4 { let output: f32 = bevy::math::Vec4::element_sum(_self.into_inner()).into(); output } - fn eq(_self: Ref<bevy::math::Vec4>, rhs: Ref<bevy::math::Vec4>) -> bool { - let output: bool = <bevy::math::Vec4 as std::cmp::PartialEq< - bevy::math::Vec4, - >>::eq(&_self, &rhs) - .into(); - output - } /// Returns a vector containing `e^self` (the exponential function) for each element of /// `self`. fn exp(_self: Val<bevy::math::Vec4>) -> Val<bevy::math::Vec4> { @@ -12790,33 +16580,6 @@ impl bevy::math::Vec4 { .into(); output } - fn mul( - _self: Val<bevy::math::Vec4>, - rhs: Ref<bevy::math::Vec4>, - ) -> Val<bevy::math::Vec4> { - let output: Val<bevy::math::Vec4> = <bevy::math::Vec4 as std::ops::Mul< - &bevy::math::Vec4, - >>::mul(_self.into_inner(), &rhs) - .into(); - output - } - fn mul( - _self: Val<bevy::math::Vec4>, - rhs: Val<bevy::math::Vec4>, - ) -> Val<bevy::math::Vec4> { - let output: Val<bevy::math::Vec4> = <bevy::math::Vec4 as std::ops::Mul< - bevy::math::Vec4, - >>::mul(_self.into_inner(), rhs.into_inner()) - .into(); - output - } - fn mul(_self: Val<bevy::math::Vec4>, rhs: f32) -> Val<bevy::math::Vec4> { - let output: Val<bevy::math::Vec4> = <bevy::math::Vec4 as std::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 @@ -12836,13 +16599,6 @@ impl bevy::math::Vec4 { .into(); output } - fn neg(_self: Val<bevy::math::Vec4>) -> Val<bevy::math::Vec4> { - let output: Val<bevy::math::Vec4> = <bevy::math::Vec4 as std::ops::Neg>::neg( - _self.into_inner(), - ) - .into(); - output - } /// Creates a new vector. fn new(x: f32, y: f32, z: f32, w: f32) -> Val<bevy::math::Vec4> { let output: Val<bevy::math::Vec4> = bevy::math::Vec4::new(x, y, z, w).into(); @@ -12998,33 +16754,6 @@ impl bevy::math::Vec4 { .into(); output } - fn rem( - _self: Val<bevy::math::Vec4>, - rhs: Ref<bevy::math::Vec4>, - ) -> Val<bevy::math::Vec4> { - let output: Val<bevy::math::Vec4> = <bevy::math::Vec4 as std::ops::Rem< - &bevy::math::Vec4, - >>::rem(_self.into_inner(), &rhs) - .into(); - output - } - fn rem( - _self: Val<bevy::math::Vec4>, - rhs: Val<bevy::math::Vec4>, - ) -> Val<bevy::math::Vec4> { - let output: Val<bevy::math::Vec4> = <bevy::math::Vec4 as std::ops::Rem< - bevy::math::Vec4, - >>::rem(_self.into_inner(), rhs.into_inner()) - .into(); - output - } - fn rem(_self: Val<bevy::math::Vec4>, rhs: f32) -> Val<bevy::math::Vec4> { - let output: Val<bevy::math::Vec4> = <bevy::math::Vec4 as std::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( @@ -13076,33 +16805,6 @@ impl bevy::math::Vec4 { let output: Val<bevy::math::Vec4> = bevy::math::Vec4::splat(v).into(); output } - fn sub( - _self: Val<bevy::math::Vec4>, - rhs: Ref<bevy::math::Vec4>, - ) -> Val<bevy::math::Vec4> { - let output: Val<bevy::math::Vec4> = <bevy::math::Vec4 as std::ops::Sub< - &bevy::math::Vec4, - >>::sub(_self.into_inner(), &rhs) - .into(); - output - } - fn sub( - _self: Val<bevy::math::Vec4>, - rhs: Val<bevy::math::Vec4>, - ) -> Val<bevy::math::Vec4> { - let output: Val<bevy::math::Vec4> = <bevy::math::Vec4 as std::ops::Sub< - bevy::math::Vec4, - >>::sub(_self.into_inner(), rhs.into_inner()) - .into(); - output - } - fn sub(_self: Val<bevy::math::Vec4>, rhs: f32) -> Val<bevy::math::Vec4> { - let output: Val<bevy::math::Vec4> = <bevy::math::Vec4 as std::ops::Sub< - f32, - >>::sub(_self.into_inner(), rhs) - .into(); - output - } /// `[x, y, z, w]` fn to_array(_self: Ref<bevy::math::Vec4>) -> [f32; 4] { let output: [f32; 4] = bevy::math::Vec4::to_array(&_self).into(); @@ -13179,13 +16881,6 @@ impl bevy::math::BVec2 { let output: bool = bevy::math::BVec2::any(_self.into_inner()).into(); output } - fn assert_receiver_is_total_eq(_self: Ref<bevy::math::BVec2>) -> () { - let output: () = <bevy::math::BVec2 as std::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. @@ -13193,20 +16888,6 @@ impl bevy::math::BVec2 { let output: u32 = bevy::math::BVec2::bitmask(_self.into_inner()).into(); output } - fn clone(_self: Ref<bevy::math::BVec2>) -> Val<bevy::math::BVec2> { - let output: Val<bevy::math::BVec2> = <bevy::math::BVec2 as bevy::reflect::erased_serde::__private::serde::__private::Clone>::clone( - &_self, - ) - .into(); - output - } - fn eq(_self: Ref<bevy::math::BVec2>, other: Ref<bevy::math::BVec2>) -> bool { - let output: bool = <bevy::math::BVec2 as std::cmp::PartialEq< - bevy::math::BVec2, - >>::eq(&_self, &other) - .into(); - output - } /// Creates a new vector mask from a bool array. fn from_array(a: [bool; 2]) -> Val<bevy::math::BVec2> { let output: Val<bevy::math::BVec2> = bevy::math::BVec2::from_array(a).into(); @@ -13252,13 +16933,6 @@ impl bevy::math::BVec3 { let output: bool = bevy::math::BVec3::any(_self.into_inner()).into(); output } - fn assert_receiver_is_total_eq(_self: Ref<bevy::math::BVec3>) -> () { - let output: () = <bevy::math::BVec3 as std::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. @@ -13266,20 +16940,6 @@ impl bevy::math::BVec3 { let output: u32 = bevy::math::BVec3::bitmask(_self.into_inner()).into(); output } - fn clone(_self: Ref<bevy::math::BVec3>) -> Val<bevy::math::BVec3> { - let output: Val<bevy::math::BVec3> = <bevy::math::BVec3 as bevy::reflect::erased_serde::__private::serde::__private::Clone>::clone( - &_self, - ) - .into(); - output - } - fn eq(_self: Ref<bevy::math::BVec3>, other: Ref<bevy::math::BVec3>) -> bool { - let output: bool = <bevy::math::BVec3 as std::cmp::PartialEq< - bevy::math::BVec3, - >>::eq(&_self, &other) - .into(); - output - } /// Creates a new vector mask from a bool array. fn from_array(a: [bool; 3]) -> Val<bevy::math::BVec3> { let output: Val<bevy::math::BVec3> = bevy::math::BVec3::from_array(a).into(); @@ -13325,13 +16985,6 @@ impl bevy::math::BVec4 { let output: bool = bevy::math::BVec4::any(_self.into_inner()).into(); output } - fn assert_receiver_is_total_eq(_self: Ref<bevy::math::BVec4>) -> () { - let output: () = <bevy::math::BVec4 as std::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. @@ -13339,20 +16992,6 @@ impl bevy::math::BVec4 { let output: u32 = bevy::math::BVec4::bitmask(_self.into_inner()).into(); output } - fn clone(_self: Ref<bevy::math::BVec4>) -> Val<bevy::math::BVec4> { - let output: Val<bevy::math::BVec4> = <bevy::math::BVec4 as bevy::reflect::erased_serde::__private::serde::__private::Clone>::clone( - &_self, - ) - .into(); - output - } - fn eq(_self: Ref<bevy::math::BVec4>, other: Ref<bevy::math::BVec4>) -> bool { - let output: bool = <bevy::math::BVec4 as std::cmp::PartialEq< - bevy::math::BVec4, - >>::eq(&_self, &other) - .into(); - output - } /// Creates a new vector mask from a bool array. fn from_array(a: [bool; 4]) -> Val<bevy::math::BVec4> { let output: Val<bevy::math::BVec4> = bevy::math::BVec4::from_array(a).into(); @@ -13414,33 +17053,6 @@ impl bevy::math::DVec2 { .into(); output } - fn add( - _self: Val<bevy::math::DVec2>, - rhs: Ref<bevy::math::DVec2>, - ) -> Val<bevy::math::DVec2> { - let output: Val<bevy::math::DVec2> = <bevy::math::DVec2 as std::ops::Add< - &bevy::math::DVec2, - >>::add(_self.into_inner(), &rhs) - .into(); - output - } - fn add( - _self: Val<bevy::math::DVec2>, - rhs: Val<bevy::math::DVec2>, - ) -> Val<bevy::math::DVec2> { - let output: Val<bevy::math::DVec2> = <bevy::math::DVec2 as std::ops::Add< - bevy::math::DVec2, - >>::add(_self.into_inner(), rhs.into_inner()) - .into(); - output - } - fn add(_self: Val<bevy::math::DVec2>, rhs: f64) -> Val<bevy::math::DVec2> { - let output: Val<bevy::math::DVec2> = <bevy::math::DVec2 as std::ops::Add< - f64, - >>::add(_self.into_inner(), rhs) - .into(); - output - } fn angle_between(_self: Val<bevy::math::DVec2>, rhs: Val<bevy::math::DVec2>) -> f64 { let output: f64 = bevy::math::DVec2::angle_between( _self.into_inner(), @@ -13459,23 +17071,47 @@ impl bevy::math::DVec2 { .into(); output } + /// Casts all elements of `self` to `i16`. + fn as_i16vec2(_self: Ref<bevy::math::DVec2>) -> Val<bevy::math::I16Vec2> { + let output: Val<bevy::math::I16Vec2> = bevy::math::DVec2::as_i16vec2(&_self) + .into(); + output + } /// Casts all elements of `self` to `i64`. fn as_i64vec2(_self: Ref<bevy::math::DVec2>) -> Val<bevy::math::I64Vec2> { let output: Val<bevy::math::I64Vec2> = bevy::math::DVec2::as_i64vec2(&_self) .into(); output } + /// Casts all elements of `self` to `i8`. + fn as_i8vec2(_self: Ref<bevy::math::DVec2>) -> Val<bevy::math::I8Vec2> { + let output: Val<bevy::math::I8Vec2> = bevy::math::DVec2::as_i8vec2(&_self) + .into(); + output + } /// Casts all elements of `self` to `i32`. fn as_ivec2(_self: Ref<bevy::math::DVec2>) -> Val<bevy::math::IVec2> { let output: Val<bevy::math::IVec2> = bevy::math::DVec2::as_ivec2(&_self).into(); output } + /// Casts all elements of `self` to `u16`. + fn as_u16vec2(_self: Ref<bevy::math::DVec2>) -> Val<bevy::math::U16Vec2> { + let output: Val<bevy::math::U16Vec2> = bevy::math::DVec2::as_u16vec2(&_self) + .into(); + output + } /// Casts all elements of `self` to `u64`. fn as_u64vec2(_self: Ref<bevy::math::DVec2>) -> Val<bevy::math::U64Vec2> { let output: Val<bevy::math::U64Vec2> = bevy::math::DVec2::as_u64vec2(&_self) .into(); output } + /// Casts all elements of `self` to `u8`. + fn as_u8vec2(_self: Ref<bevy::math::DVec2>) -> Val<bevy::math::U8Vec2> { + let output: Val<bevy::math::U8Vec2> = bevy::math::DVec2::as_u8vec2(&_self) + .into(); + output + } /// Casts all elements of `self` to `u32`. fn as_uvec2(_self: Ref<bevy::math::DVec2>) -> Val<bevy::math::UVec2> { let output: Val<bevy::math::UVec2> = bevy::math::DVec2::as_uvec2(&_self).into(); @@ -13554,13 +17190,6 @@ impl bevy::math::DVec2 { .into(); output } - fn clone(_self: Ref<bevy::math::DVec2>) -> Val<bevy::math::DVec2> { - let output: Val<bevy::math::DVec2> = <bevy::math::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 @@ -13684,33 +17313,6 @@ impl bevy::math::DVec2 { .into(); output } - fn div( - _self: Val<bevy::math::DVec2>, - rhs: Ref<bevy::math::DVec2>, - ) -> Val<bevy::math::DVec2> { - let output: Val<bevy::math::DVec2> = <bevy::math::DVec2 as std::ops::Div< - &bevy::math::DVec2, - >>::div(_self.into_inner(), &rhs) - .into(); - output - } - fn div( - _self: Val<bevy::math::DVec2>, - rhs: Val<bevy::math::DVec2>, - ) -> Val<bevy::math::DVec2> { - let output: Val<bevy::math::DVec2> = <bevy::math::DVec2 as std::ops::Div< - bevy::math::DVec2, - >>::div(_self.into_inner(), rhs.into_inner()) - .into(); - output - } - fn div(_self: Val<bevy::math::DVec2>, rhs: f64) -> Val<bevy::math::DVec2> { - let output: Val<bevy::math::DVec2> = <bevy::math::DVec2 as std::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<bevy::math::DVec2>, @@ -13753,13 +17355,6 @@ impl bevy::math::DVec2 { let output: f64 = bevy::math::DVec2::element_sum(_self.into_inner()).into(); output } - fn eq(_self: Ref<bevy::math::DVec2>, other: Ref<bevy::math::DVec2>) -> bool { - let output: bool = <bevy::math::DVec2 as std::cmp::PartialEq< - bevy::math::DVec2, - >>::eq(&_self, &other) - .into(); - output - } /// Returns a vector containing `e^self` (the exponential function) for each element of /// `self`. fn exp(_self: Val<bevy::math::DVec2>) -> Val<bevy::math::DVec2> { @@ -13962,33 +17557,6 @@ impl bevy::math::DVec2 { .into(); output } - fn mul( - _self: Val<bevy::math::DVec2>, - rhs: Ref<bevy::math::DVec2>, - ) -> Val<bevy::math::DVec2> { - let output: Val<bevy::math::DVec2> = <bevy::math::DVec2 as std::ops::Mul< - &bevy::math::DVec2, - >>::mul(_self.into_inner(), &rhs) - .into(); - output - } - fn mul( - _self: Val<bevy::math::DVec2>, - rhs: Val<bevy::math::DVec2>, - ) -> Val<bevy::math::DVec2> { - let output: Val<bevy::math::DVec2> = <bevy::math::DVec2 as std::ops::Mul< - bevy::math::DVec2, - >>::mul(_self.into_inner(), rhs.into_inner()) - .into(); - output - } - fn mul(_self: Val<bevy::math::DVec2>, rhs: f64) -> Val<bevy::math::DVec2> { - let output: Val<bevy::math::DVec2> = <bevy::math::DVec2 as std::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 @@ -14008,13 +17576,6 @@ impl bevy::math::DVec2 { .into(); output } - fn neg(_self: Val<bevy::math::DVec2>) -> Val<bevy::math::DVec2> { - let output: Val<bevy::math::DVec2> = <bevy::math::DVec2 as std::ops::Neg>::neg( - _self.into_inner(), - ) - .into(); - output - } /// Creates a new vector. fn new(x: f64, y: f64) -> Val<bevy::math::DVec2> { let output: Val<bevy::math::DVec2> = bevy::math::DVec2::new(x, y).into(); @@ -14189,33 +17750,6 @@ impl bevy::math::DVec2 { .into(); output } - fn rem( - _self: Val<bevy::math::DVec2>, - rhs: Ref<bevy::math::DVec2>, - ) -> Val<bevy::math::DVec2> { - let output: Val<bevy::math::DVec2> = <bevy::math::DVec2 as std::ops::Rem< - &bevy::math::DVec2, - >>::rem(_self.into_inner(), &rhs) - .into(); - output - } - fn rem( - _self: Val<bevy::math::DVec2>, - rhs: Val<bevy::math::DVec2>, - ) -> Val<bevy::math::DVec2> { - let output: Val<bevy::math::DVec2> = <bevy::math::DVec2 as std::ops::Rem< - bevy::math::DVec2, - >>::rem(_self.into_inner(), rhs.into_inner()) - .into(); - output - } - fn rem(_self: Val<bevy::math::DVec2>, rhs: f64) -> Val<bevy::math::DVec2> { - let output: Val<bevy::math::DVec2> = <bevy::math::DVec2 as std::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( @@ -14300,33 +17834,6 @@ impl bevy::math::DVec2 { let output: Val<bevy::math::DVec2> = bevy::math::DVec2::splat(v).into(); output } - fn sub( - _self: Val<bevy::math::DVec2>, - rhs: Ref<bevy::math::DVec2>, - ) -> Val<bevy::math::DVec2> { - let output: Val<bevy::math::DVec2> = <bevy::math::DVec2 as std::ops::Sub< - &bevy::math::DVec2, - >>::sub(_self.into_inner(), &rhs) - .into(); - output - } - fn sub( - _self: Val<bevy::math::DVec2>, - rhs: Val<bevy::math::DVec2>, - ) -> Val<bevy::math::DVec2> { - let output: Val<bevy::math::DVec2> = <bevy::math::DVec2 as std::ops::Sub< - bevy::math::DVec2, - >>::sub(_self.into_inner(), rhs.into_inner()) - .into(); - output - } - fn sub(_self: Val<bevy::math::DVec2>, rhs: f64) -> Val<bevy::math::DVec2> { - let output: Val<bevy::math::DVec2> = <bevy::math::DVec2 as std::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<bevy::math::DVec2>) -> f64 { @@ -14397,33 +17904,6 @@ impl bevy::math::DVec3 { .into(); output } - fn add( - _self: Val<bevy::math::DVec3>, - rhs: Ref<bevy::math::DVec3>, - ) -> Val<bevy::math::DVec3> { - let output: Val<bevy::math::DVec3> = <bevy::math::DVec3 as std::ops::Add< - &bevy::math::DVec3, - >>::add(_self.into_inner(), &rhs) - .into(); - output - } - fn add( - _self: Val<bevy::math::DVec3>, - rhs: Val<bevy::math::DVec3>, - ) -> Val<bevy::math::DVec3> { - let output: Val<bevy::math::DVec3> = <bevy::math::DVec3 as std::ops::Add< - bevy::math::DVec3, - >>::add(_self.into_inner(), rhs.into_inner()) - .into(); - output - } - fn add(_self: Val<bevy::math::DVec3>, rhs: f64) -> Val<bevy::math::DVec3> { - let output: Val<bevy::math::DVec3> = <bevy::math::DVec3 as std::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<bevy::math::DVec3>, rhs: Val<bevy::math::DVec3>) -> f64 { @@ -14456,23 +17936,47 @@ impl bevy::math::DVec3 { .into(); output } + /// Casts all elements of `self` to `i16`. + fn as_i16vec3(_self: Ref<bevy::math::DVec3>) -> Val<bevy::math::I16Vec3> { + let output: Val<bevy::math::I16Vec3> = bevy::math::DVec3::as_i16vec3(&_self) + .into(); + output + } /// Casts all elements of `self` to `i64`. fn as_i64vec3(_self: Ref<bevy::math::DVec3>) -> Val<bevy::math::I64Vec3> { let output: Val<bevy::math::I64Vec3> = bevy::math::DVec3::as_i64vec3(&_self) .into(); output } + /// Casts all elements of `self` to `i8`. + fn as_i8vec3(_self: Ref<bevy::math::DVec3>) -> Val<bevy::math::I8Vec3> { + let output: Val<bevy::math::I8Vec3> = bevy::math::DVec3::as_i8vec3(&_self) + .into(); + output + } /// Casts all elements of `self` to `i32`. fn as_ivec3(_self: Ref<bevy::math::DVec3>) -> Val<bevy::math::IVec3> { let output: Val<bevy::math::IVec3> = bevy::math::DVec3::as_ivec3(&_self).into(); output } + /// Casts all elements of `self` to `u16`. + fn as_u16vec3(_self: Ref<bevy::math::DVec3>) -> Val<bevy::math::U16Vec3> { + let output: Val<bevy::math::U16Vec3> = bevy::math::DVec3::as_u16vec3(&_self) + .into(); + output + } /// Casts all elements of `self` to `u64`. fn as_u64vec3(_self: Ref<bevy::math::DVec3>) -> Val<bevy::math::U64Vec3> { let output: Val<bevy::math::U64Vec3> = bevy::math::DVec3::as_u64vec3(&_self) .into(); output } + /// Casts all elements of `self` to `u8`. + fn as_u8vec3(_self: Ref<bevy::math::DVec3>) -> Val<bevy::math::U8Vec3> { + let output: Val<bevy::math::U8Vec3> = bevy::math::DVec3::as_u8vec3(&_self) + .into(); + output + } /// Casts all elements of `self` to `u32`. fn as_uvec3(_self: Ref<bevy::math::DVec3>) -> Val<bevy::math::UVec3> { let output: Val<bevy::math::UVec3> = bevy::math::DVec3::as_uvec3(&_self).into(); @@ -14556,13 +18060,6 @@ impl bevy::math::DVec3 { .into(); output } - fn clone(_self: Ref<bevy::math::DVec3>) -> Val<bevy::math::DVec3> { - let output: Val<bevy::math::DVec3> = <bevy::math::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 @@ -14698,33 +18195,6 @@ impl bevy::math::DVec3 { .into(); output } - fn div( - _self: Val<bevy::math::DVec3>, - rhs: Ref<bevy::math::DVec3>, - ) -> Val<bevy::math::DVec3> { - let output: Val<bevy::math::DVec3> = <bevy::math::DVec3 as std::ops::Div< - &bevy::math::DVec3, - >>::div(_self.into_inner(), &rhs) - .into(); - output - } - fn div( - _self: Val<bevy::math::DVec3>, - rhs: Val<bevy::math::DVec3>, - ) -> Val<bevy::math::DVec3> { - let output: Val<bevy::math::DVec3> = <bevy::math::DVec3 as std::ops::Div< - bevy::math::DVec3, - >>::div(_self.into_inner(), rhs.into_inner()) - .into(); - output - } - fn div(_self: Val<bevy::math::DVec3>, rhs: f64) -> Val<bevy::math::DVec3> { - let output: Val<bevy::math::DVec3> = <bevy::math::DVec3 as std::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<bevy::math::DVec3>, @@ -14767,13 +18237,6 @@ impl bevy::math::DVec3 { let output: f64 = bevy::math::DVec3::element_sum(_self.into_inner()).into(); output } - fn eq(_self: Ref<bevy::math::DVec3>, other: Ref<bevy::math::DVec3>) -> bool { - let output: bool = <bevy::math::DVec3 as std::cmp::PartialEq< - bevy::math::DVec3, - >>::eq(&_self, &other) - .into(); - output - } /// Returns a vector containing `e^self` (the exponential function) for each element of /// `self`. fn exp(_self: Val<bevy::math::DVec3>) -> Val<bevy::math::DVec3> { @@ -14968,33 +18431,6 @@ impl bevy::math::DVec3 { .into(); output } - fn mul( - _self: Val<bevy::math::DVec3>, - rhs: Ref<bevy::math::DVec3>, - ) -> Val<bevy::math::DVec3> { - let output: Val<bevy::math::DVec3> = <bevy::math::DVec3 as std::ops::Mul< - &bevy::math::DVec3, - >>::mul(_self.into_inner(), &rhs) - .into(); - output - } - fn mul( - _self: Val<bevy::math::DVec3>, - rhs: Val<bevy::math::DVec3>, - ) -> Val<bevy::math::DVec3> { - let output: Val<bevy::math::DVec3> = <bevy::math::DVec3 as std::ops::Mul< - bevy::math::DVec3, - >>::mul(_self.into_inner(), rhs.into_inner()) - .into(); - output - } - fn mul(_self: Val<bevy::math::DVec3>, rhs: f64) -> Val<bevy::math::DVec3> { - let output: Val<bevy::math::DVec3> = <bevy::math::DVec3 as std::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 @@ -15014,13 +18450,6 @@ impl bevy::math::DVec3 { .into(); output } - fn neg(_self: Val<bevy::math::DVec3>) -> Val<bevy::math::DVec3> { - let output: Val<bevy::math::DVec3> = <bevy::math::DVec3 as std::ops::Neg>::neg( - _self.into_inner(), - ) - .into(); - output - } /// Creates a new vector. fn new(x: f64, y: f64, z: f64) -> Val<bevy::math::DVec3> { let output: Val<bevy::math::DVec3> = bevy::math::DVec3::new(x, y, z).into(); @@ -15179,33 +18608,6 @@ impl bevy::math::DVec3 { .into(); output } - fn rem( - _self: Val<bevy::math::DVec3>, - rhs: Ref<bevy::math::DVec3>, - ) -> Val<bevy::math::DVec3> { - let output: Val<bevy::math::DVec3> = <bevy::math::DVec3 as std::ops::Rem< - &bevy::math::DVec3, - >>::rem(_self.into_inner(), &rhs) - .into(); - output - } - fn rem( - _self: Val<bevy::math::DVec3>, - rhs: Val<bevy::math::DVec3>, - ) -> Val<bevy::math::DVec3> { - let output: Val<bevy::math::DVec3> = <bevy::math::DVec3 as std::ops::Rem< - bevy::math::DVec3, - >>::rem(_self.into_inner(), rhs.into_inner()) - .into(); - output - } - fn rem(_self: Val<bevy::math::DVec3>, rhs: f64) -> Val<bevy::math::DVec3> { - let output: Val<bevy::math::DVec3> = <bevy::math::DVec3 as std::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( @@ -15259,33 +18661,6 @@ impl bevy::math::DVec3 { let output: Val<bevy::math::DVec3> = bevy::math::DVec3::splat(v).into(); output } - fn sub( - _self: Val<bevy::math::DVec3>, - rhs: Ref<bevy::math::DVec3>, - ) -> Val<bevy::math::DVec3> { - let output: Val<bevy::math::DVec3> = <bevy::math::DVec3 as std::ops::Sub< - &bevy::math::DVec3, - >>::sub(_self.into_inner(), &rhs) - .into(); - output - } - fn sub( - _self: Val<bevy::math::DVec3>, - rhs: Val<bevy::math::DVec3>, - ) -> Val<bevy::math::DVec3> { - let output: Val<bevy::math::DVec3> = <bevy::math::DVec3 as std::ops::Sub< - bevy::math::DVec3, - >>::sub(_self.into_inner(), rhs.into_inner()) - .into(); - output - } - fn sub(_self: Val<bevy::math::DVec3>, rhs: f64) -> Val<bevy::math::DVec3> { - let output: Val<bevy::math::DVec3> = <bevy::math::DVec3 as std::ops::Sub< - f64, - >>::sub(_self.into_inner(), rhs) - .into(); - output - } /// `[x, y, z]` fn to_array(_self: Ref<bevy::math::DVec3>) -> [f64; 3] { let output: [f64; 3] = bevy::math::DVec3::to_array(&_self).into(); @@ -15368,30 +18743,9 @@ impl bevy::math::DVec4 { .into(); output } - fn add( - _self: Val<bevy::math::DVec4>, - rhs: Ref<bevy::math::DVec4>, - ) -> Val<bevy::math::DVec4> { - let output: Val<bevy::math::DVec4> = <bevy::math::DVec4 as std::ops::Add< - &bevy::math::DVec4, - >>::add(_self.into_inner(), &rhs) - .into(); - output - } - fn add( - _self: Val<bevy::math::DVec4>, - rhs: Val<bevy::math::DVec4>, - ) -> Val<bevy::math::DVec4> { - let output: Val<bevy::math::DVec4> = <bevy::math::DVec4 as std::ops::Add< - bevy::math::DVec4, - >>::add(_self.into_inner(), rhs.into_inner()) - .into(); - output - } - fn add(_self: Val<bevy::math::DVec4>, rhs: f64) -> Val<bevy::math::DVec4> { - let output: Val<bevy::math::DVec4> = <bevy::math::DVec4 as std::ops::Add< - f64, - >>::add(_self.into_inner(), rhs) + /// Casts all elements of `self` to `i16`. + fn as_i16vec4(_self: Ref<bevy::math::DVec4>) -> Val<bevy::math::I16Vec4> { + let output: Val<bevy::math::I16Vec4> = bevy::math::DVec4::as_i16vec4(&_self) .into(); output } @@ -15401,17 +18755,35 @@ impl bevy::math::DVec4 { .into(); output } + /// Casts all elements of `self` to `i8`. + fn as_i8vec4(_self: Ref<bevy::math::DVec4>) -> Val<bevy::math::I8Vec4> { + let output: Val<bevy::math::I8Vec4> = bevy::math::DVec4::as_i8vec4(&_self) + .into(); + output + } /// Casts all elements of `self` to `i32`. fn as_ivec4(_self: Ref<bevy::math::DVec4>) -> Val<bevy::math::IVec4> { let output: Val<bevy::math::IVec4> = bevy::math::DVec4::as_ivec4(&_self).into(); output } + /// Casts all elements of `self` to `u16`. + fn as_u16vec4(_self: Ref<bevy::math::DVec4>) -> Val<bevy::math::U16Vec4> { + let output: Val<bevy::math::U16Vec4> = bevy::math::DVec4::as_u16vec4(&_self) + .into(); + output + } /// Casts all elements of `self` to `u64`. fn as_u64vec4(_self: Ref<bevy::math::DVec4>) -> Val<bevy::math::U64Vec4> { let output: Val<bevy::math::U64Vec4> = bevy::math::DVec4::as_u64vec4(&_self) .into(); output } + /// Casts all elements of `self` to `u8`. + fn as_u8vec4(_self: Ref<bevy::math::DVec4>) -> Val<bevy::math::U8Vec4> { + let output: Val<bevy::math::U8Vec4> = bevy::math::DVec4::as_u8vec4(&_self) + .into(); + output + } /// Casts all elements of `self` to `u32`. fn as_uvec4(_self: Ref<bevy::math::DVec4>) -> Val<bevy::math::UVec4> { let output: Val<bevy::math::UVec4> = bevy::math::DVec4::as_uvec4(&_self).into(); @@ -15490,13 +18862,6 @@ impl bevy::math::DVec4 { .into(); output } - fn clone(_self: Ref<bevy::math::DVec4>) -> Val<bevy::math::DVec4> { - let output: Val<bevy::math::DVec4> = <bevy::math::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 @@ -15620,33 +18985,6 @@ impl bevy::math::DVec4 { .into(); output } - fn div( - _self: Val<bevy::math::DVec4>, - rhs: Ref<bevy::math::DVec4>, - ) -> Val<bevy::math::DVec4> { - let output: Val<bevy::math::DVec4> = <bevy::math::DVec4 as std::ops::Div< - &bevy::math::DVec4, - >>::div(_self.into_inner(), &rhs) - .into(); - output - } - fn div( - _self: Val<bevy::math::DVec4>, - rhs: Val<bevy::math::DVec4>, - ) -> Val<bevy::math::DVec4> { - let output: Val<bevy::math::DVec4> = <bevy::math::DVec4 as std::ops::Div< - bevy::math::DVec4, - >>::div(_self.into_inner(), rhs.into_inner()) - .into(); - output - } - fn div(_self: Val<bevy::math::DVec4>, rhs: f64) -> Val<bevy::math::DVec4> { - let output: Val<bevy::math::DVec4> = <bevy::math::DVec4 as std::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<bevy::math::DVec4>, @@ -15689,13 +19027,6 @@ impl bevy::math::DVec4 { let output: f64 = bevy::math::DVec4::element_sum(_self.into_inner()).into(); output } - fn eq(_self: Ref<bevy::math::DVec4>, other: Ref<bevy::math::DVec4>) -> bool { - let output: bool = <bevy::math::DVec4 as std::cmp::PartialEq< - bevy::math::DVec4, - >>::eq(&_self, &other) - .into(); - output - } /// Returns a vector containing `e^self` (the exponential function) for each element of /// `self`. fn exp(_self: Val<bevy::math::DVec4>) -> Val<bevy::math::DVec4> { @@ -15881,33 +19212,6 @@ impl bevy::math::DVec4 { .into(); output } - fn mul( - _self: Val<bevy::math::DVec4>, - rhs: Ref<bevy::math::DVec4>, - ) -> Val<bevy::math::DVec4> { - let output: Val<bevy::math::DVec4> = <bevy::math::DVec4 as std::ops::Mul< - &bevy::math::DVec4, - >>::mul(_self.into_inner(), &rhs) - .into(); - output - } - fn mul( - _self: Val<bevy::math::DVec4>, - rhs: Val<bevy::math::DVec4>, - ) -> Val<bevy::math::DVec4> { - let output: Val<bevy::math::DVec4> = <bevy::math::DVec4 as std::ops::Mul< - bevy::math::DVec4, - >>::mul(_self.into_inner(), rhs.into_inner()) - .into(); - output - } - fn mul(_self: Val<bevy::math::DVec4>, rhs: f64) -> Val<bevy::math::DVec4> { - let output: Val<bevy::math::DVec4> = <bevy::math::DVec4 as std::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 @@ -15927,13 +19231,6 @@ impl bevy::math::DVec4 { .into(); output } - fn neg(_self: Val<bevy::math::DVec4>) -> Val<bevy::math::DVec4> { - let output: Val<bevy::math::DVec4> = <bevy::math::DVec4 as std::ops::Neg>::neg( - _self.into_inner(), - ) - .into(); - output - } /// Creates a new vector. fn new(x: f64, y: f64, z: f64, w: f64) -> Val<bevy::math::DVec4> { let output: Val<bevy::math::DVec4> = bevy::math::DVec4::new(x, y, z, w).into(); @@ -16077,45 +19374,18 @@ impl bevy::math::DVec4 { } /// 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<bevy::math::DVec4>, - rhs: Val<bevy::math::DVec4>, - ) -> Val<bevy::math::DVec4> { - let output: Val<bevy::math::DVec4> = bevy::math::DVec4::reject_from_normalized( - _self.into_inner(), - rhs.into_inner(), - ) - .into(); - output - } - fn rem( - _self: Val<bevy::math::DVec4>, - rhs: Ref<bevy::math::DVec4>, - ) -> Val<bevy::math::DVec4> { - let output: Val<bevy::math::DVec4> = <bevy::math::DVec4 as std::ops::Rem< - &bevy::math::DVec4, - >>::rem(_self.into_inner(), &rhs) - .into(); - output - } - fn rem( + /// `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<bevy::math::DVec4>, rhs: Val<bevy::math::DVec4>, ) -> Val<bevy::math::DVec4> { - let output: Val<bevy::math::DVec4> = <bevy::math::DVec4 as std::ops::Rem< - bevy::math::DVec4, - >>::rem(_self.into_inner(), rhs.into_inner()) - .into(); - output - } - fn rem(_self: Val<bevy::math::DVec4>, rhs: f64) -> Val<bevy::math::DVec4> { - let output: Val<bevy::math::DVec4> = <bevy::math::DVec4 as std::ops::Rem< - f64, - >>::rem(_self.into_inner(), rhs) + let output: Val<bevy::math::DVec4> = bevy::math::DVec4::reject_from_normalized( + _self.into_inner(), + rhs.into_inner(), + ) .into(); output } @@ -16172,33 +19442,6 @@ impl bevy::math::DVec4 { let output: Val<bevy::math::DVec4> = bevy::math::DVec4::splat(v).into(); output } - fn sub( - _self: Val<bevy::math::DVec4>, - rhs: Ref<bevy::math::DVec4>, - ) -> Val<bevy::math::DVec4> { - let output: Val<bevy::math::DVec4> = <bevy::math::DVec4 as std::ops::Sub< - &bevy::math::DVec4, - >>::sub(_self.into_inner(), &rhs) - .into(); - output - } - fn sub( - _self: Val<bevy::math::DVec4>, - rhs: Val<bevy::math::DVec4>, - ) -> Val<bevy::math::DVec4> { - let output: Val<bevy::math::DVec4> = <bevy::math::DVec4 as std::ops::Sub< - bevy::math::DVec4, - >>::sub(_self.into_inner(), rhs.into_inner()) - .into(); - output - } - fn sub(_self: Val<bevy::math::DVec4>, rhs: f64) -> Val<bevy::math::DVec4> { - let output: Val<bevy::math::DVec4> = <bevy::math::DVec4 as std::ops::Sub< - f64, - >>::sub(_self.into_inner(), rhs) - .into(); - output - } /// `[x, y, z, w]` fn to_array(_self: Ref<bevy::math::DVec4>) -> [f64; 4] { let output: [f64; 4] = bevy::math::DVec4::to_array(&_self).into(); @@ -16289,16 +19532,6 @@ impl bevy::math::Mat2 { .into(); output } - fn add( - _self: Val<bevy::math::Mat2>, - rhs: Val<bevy::math::Mat2>, - ) -> Val<bevy::math::Mat2> { - let output: Val<bevy::math::Mat2> = <bevy::math::Mat2 as std::ops::Add< - bevy::math::Mat2, - >>::add(_self.into_inner(), rhs.into_inner()) - .into(); - output - } /// Adds two 2x2 matrices. fn add_mat2( _self: Ref<bevy::math::Mat2>, @@ -16312,13 +19545,6 @@ impl bevy::math::Mat2 { let output: Val<bevy::math::DMat2> = bevy::math::Mat2::as_dmat2(&_self).into(); output } - fn clone(_self: Ref<bevy::math::Mat2>) -> Val<bevy::math::Mat2> { - let output: Val<bevy::math::Mat2> = <bevy::math::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. @@ -16331,26 +19557,12 @@ impl bevy::math::Mat2 { let output: f32 = bevy::math::Mat2::determinant(&_self).into(); output } - fn div(_self: Val<bevy::math::Mat2>, rhs: f32) -> Val<bevy::math::Mat2> { - let output: Val<bevy::math::Mat2> = <bevy::math::Mat2 as std::ops::Div< - f32, - >>::div(_self.into_inner(), rhs) - .into(); - output - } /// Divides a 2x2 matrix by a scalar. fn div_scalar(_self: Ref<bevy::math::Mat2>, rhs: f32) -> Val<bevy::math::Mat2> { let output: Val<bevy::math::Mat2> = bevy::math::Mat2::div_scalar(&_self, rhs) .into(); output } - fn eq(_self: Ref<bevy::math::Mat2>, rhs: Ref<bevy::math::Mat2>) -> bool { - let output: bool = <bevy::math::Mat2 as std::cmp::PartialEq< - bevy::math::Mat2, - >>::eq(&_self, &rhs) - .into(); - output - } /// Creates a 2x2 matrix containing a rotation of `angle` (in radians). fn from_angle(angle: f32) -> Val<bevy::math::Mat2> { let output: Val<bevy::math::Mat2> = bevy::math::Mat2::from_angle(angle).into(); @@ -16454,33 +19666,6 @@ impl bevy::math::Mat2 { let output: bool = bevy::math::Mat2::is_nan(&_self).into(); output } - fn mul( - _self: Val<bevy::math::Mat2>, - rhs: Val<bevy::math::Mat2>, - ) -> Val<bevy::math::Mat2> { - let output: Val<bevy::math::Mat2> = <bevy::math::Mat2 as std::ops::Mul< - bevy::math::Mat2, - >>::mul(_self.into_inner(), rhs.into_inner()) - .into(); - output - } - fn mul( - _self: Val<bevy::math::Mat2>, - rhs: Val<bevy::math::Vec2>, - ) -> Val<bevy::math::Vec2> { - let output: Val<bevy::math::Vec2> = <bevy::math::Mat2 as std::ops::Mul< - bevy::math::Vec2, - >>::mul(_self.into_inner(), rhs.into_inner()) - .into(); - output - } - fn mul(_self: Val<bevy::math::Mat2>, rhs: f32) -> Val<bevy::math::Mat2> { - let output: Val<bevy::math::Mat2> = <bevy::math::Mat2 as std::ops::Mul< - f32, - >>::mul(_self.into_inner(), rhs) - .into(); - output - } /// Multiplies two 2x2 matrices. fn mul_mat2( _self: Ref<bevy::math::Mat2>, @@ -16508,13 +19693,6 @@ impl bevy::math::Mat2 { .into(); output } - fn neg(_self: Val<bevy::math::Mat2>) -> Val<bevy::math::Mat2> { - let output: Val<bevy::math::Mat2> = <bevy::math::Mat2 as std::ops::Neg>::neg( - _self.into_inner(), - ) - .into(); - output - } /// Returns the matrix row for the given `index`. /// # Panics /// Panics if `index` is greater than 1. @@ -16522,16 +19700,6 @@ impl bevy::math::Mat2 { let output: Val<bevy::math::Vec2> = bevy::math::Mat2::row(&_self, index).into(); output } - fn sub( - _self: Val<bevy::math::Mat2>, - rhs: Val<bevy::math::Mat2>, - ) -> Val<bevy::math::Mat2> { - let output: Val<bevy::math::Mat2> = <bevy::math::Mat2 as std::ops::Sub< - bevy::math::Mat2, - >>::sub(_self.into_inner(), rhs.into_inner()) - .into(); - output - } /// Subtracts two 2x2 matrices. fn sub_mat2( _self: Ref<bevy::math::Mat2>, @@ -16591,16 +19759,6 @@ impl bevy::math::Mat3 { .into(); output } - fn add( - _self: Val<bevy::math::Mat3>, - rhs: Val<bevy::math::Mat3>, - ) -> Val<bevy::math::Mat3> { - let output: Val<bevy::math::Mat3> = <bevy::math::Mat3 as std::ops::Add< - bevy::math::Mat3, - >>::add(_self.into_inner(), rhs.into_inner()) - .into(); - output - } /// Adds two 3x3 matrices. fn add_mat3( _self: Ref<bevy::math::Mat3>, @@ -16614,13 +19772,6 @@ impl bevy::math::Mat3 { let output: Val<bevy::math::DMat3> = bevy::math::Mat3::as_dmat3(&_self).into(); output } - fn clone(_self: Ref<bevy::math::Mat3>) -> Val<bevy::math::Mat3> { - let output: Val<bevy::math::Mat3> = <bevy::math::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. @@ -16633,26 +19784,12 @@ impl bevy::math::Mat3 { let output: f32 = bevy::math::Mat3::determinant(&_self).into(); output } - fn div(_self: Val<bevy::math::Mat3>, rhs: f32) -> Val<bevy::math::Mat3> { - let output: Val<bevy::math::Mat3> = <bevy::math::Mat3 as std::ops::Div< - f32, - >>::div(_self.into_inner(), rhs) - .into(); - output - } /// Divides a 3x3 matrix by a scalar. fn div_scalar(_self: Ref<bevy::math::Mat3>, rhs: f32) -> Val<bevy::math::Mat3> { let output: Val<bevy::math::Mat3> = bevy::math::Mat3::div_scalar(&_self, rhs) .into(); output } - fn eq(_self: Ref<bevy::math::Mat3>, rhs: Ref<bevy::math::Mat3>) -> bool { - let output: bool = <bevy::math::Mat3 as std::cmp::PartialEq< - bevy::math::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 @@ -16832,53 +19969,6 @@ impl bevy::math::Mat3 { let output: bool = bevy::math::Mat3::is_nan(&_self).into(); output } - fn mul( - _self: Val<bevy::math::Mat3>, - rhs: Val<bevy::math::Affine2>, - ) -> Val<bevy::math::Mat3> { - let output: Val<bevy::math::Mat3> = <bevy::math::Mat3 as std::ops::Mul< - bevy::math::Affine2, - >>::mul(_self.into_inner(), rhs.into_inner()) - .into(); - output - } - fn mul( - _self: Val<bevy::math::Mat3>, - rhs: Val<bevy::math::Mat3>, - ) -> Val<bevy::math::Mat3> { - let output: Val<bevy::math::Mat3> = <bevy::math::Mat3 as std::ops::Mul< - bevy::math::Mat3, - >>::mul(_self.into_inner(), rhs.into_inner()) - .into(); - output - } - fn mul( - _self: Val<bevy::math::Mat3>, - rhs: Val<bevy::math::Vec3>, - ) -> Val<bevy::math::Vec3> { - let output: Val<bevy::math::Vec3> = <bevy::math::Mat3 as std::ops::Mul< - bevy::math::Vec3, - >>::mul(_self.into_inner(), rhs.into_inner()) - .into(); - output - } - fn mul( - _self: Val<bevy::math::Mat3>, - rhs: Val<bevy::math::Vec3A>, - ) -> Val<bevy::math::Vec3A> { - let output: Val<bevy::math::Vec3A> = <bevy::math::Mat3 as std::ops::Mul< - bevy::math::Vec3A, - >>::mul(_self.into_inner(), rhs.into_inner()) - .into(); - output - } - fn mul(_self: Val<bevy::math::Mat3>, rhs: f32) -> Val<bevy::math::Mat3> { - let output: Val<bevy::math::Mat3> = <bevy::math::Mat3 as std::ops::Mul< - f32, - >>::mul(_self.into_inner(), rhs) - .into(); - output - } /// Multiplies two 3x3 matrices. fn mul_mat3( _self: Ref<bevy::math::Mat3>, @@ -16918,13 +20008,6 @@ impl bevy::math::Mat3 { .into(); output } - fn neg(_self: Val<bevy::math::Mat3>) -> Val<bevy::math::Mat3> { - let output: Val<bevy::math::Mat3> = <bevy::math::Mat3 as std::ops::Neg>::neg( - _self.into_inner(), - ) - .into(); - output - } /// Returns the matrix row for the given `index`. /// # Panics /// Panics if `index` is greater than 2. @@ -16932,16 +20015,6 @@ impl bevy::math::Mat3 { let output: Val<bevy::math::Vec3> = bevy::math::Mat3::row(&_self, index).into(); output } - fn sub( - _self: Val<bevy::math::Mat3>, - rhs: Val<bevy::math::Mat3>, - ) -> Val<bevy::math::Mat3> { - let output: Val<bevy::math::Mat3> = <bevy::math::Mat3 as std::ops::Sub< - bevy::math::Mat3, - >>::sub(_self.into_inner(), rhs.into_inner()) - .into(); - output - } /// Subtracts two 3x3 matrices. fn sub_mat3( _self: Ref<bevy::math::Mat3>, @@ -17049,16 +20122,6 @@ impl bevy::math::Mat3A { .into(); output } - fn add( - _self: Val<bevy::math::Mat3A>, - rhs: Val<bevy::math::Mat3A>, - ) -> Val<bevy::math::Mat3A> { - let output: Val<bevy::math::Mat3A> = <bevy::math::Mat3A as std::ops::Add< - bevy::math::Mat3A, - >>::add(_self.into_inner(), rhs.into_inner()) - .into(); - output - } /// Adds two 3x3 matrices. fn add_mat3( _self: Ref<bevy::math::Mat3A>, @@ -17072,13 +20135,6 @@ impl bevy::math::Mat3A { let output: Val<bevy::math::DMat3> = bevy::math::Mat3A::as_dmat3(&_self).into(); output } - fn clone(_self: Ref<bevy::math::Mat3A>) -> Val<bevy::math::Mat3A> { - let output: Val<bevy::math::Mat3A> = <bevy::math::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. @@ -17092,26 +20148,12 @@ impl bevy::math::Mat3A { let output: f32 = bevy::math::Mat3A::determinant(&_self).into(); output } - fn div(_self: Val<bevy::math::Mat3A>, rhs: f32) -> Val<bevy::math::Mat3A> { - let output: Val<bevy::math::Mat3A> = <bevy::math::Mat3A as std::ops::Div< - f32, - >>::div(_self.into_inner(), rhs) - .into(); - output - } /// Divides a 3x3 matrix by a scalar. fn div_scalar(_self: Ref<bevy::math::Mat3A>, rhs: f32) -> Val<bevy::math::Mat3A> { let output: Val<bevy::math::Mat3A> = bevy::math::Mat3A::div_scalar(&_self, rhs) .into(); output } - fn eq(_self: Ref<bevy::math::Mat3A>, rhs: Ref<bevy::math::Mat3A>) -> bool { - let output: bool = <bevy::math::Mat3A as std::cmp::PartialEq< - bevy::math::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 @@ -17291,53 +20333,6 @@ impl bevy::math::Mat3A { let output: bool = bevy::math::Mat3A::is_nan(&_self).into(); output } - fn mul( - _self: Val<bevy::math::Mat3A>, - rhs: Val<bevy::math::Affine2>, - ) -> Val<bevy::math::Mat3A> { - let output: Val<bevy::math::Mat3A> = <bevy::math::Mat3A as std::ops::Mul< - bevy::math::Affine2, - >>::mul(_self.into_inner(), rhs.into_inner()) - .into(); - output - } - fn mul( - _self: Val<bevy::math::Mat3A>, - rhs: Val<bevy::math::Mat3A>, - ) -> Val<bevy::math::Mat3A> { - let output: Val<bevy::math::Mat3A> = <bevy::math::Mat3A as std::ops::Mul< - bevy::math::Mat3A, - >>::mul(_self.into_inner(), rhs.into_inner()) - .into(); - output - } - fn mul( - _self: Val<bevy::math::Mat3A>, - rhs: Val<bevy::math::Vec3>, - ) -> Val<bevy::math::Vec3> { - let output: Val<bevy::math::Vec3> = <bevy::math::Mat3A as std::ops::Mul< - bevy::math::Vec3, - >>::mul(_self.into_inner(), rhs.into_inner()) - .into(); - output - } - fn mul( - _self: Val<bevy::math::Mat3A>, - rhs: Val<bevy::math::Vec3A>, - ) -> Val<bevy::math::Vec3A> { - let output: Val<bevy::math::Vec3A> = <bevy::math::Mat3A as std::ops::Mul< - bevy::math::Vec3A, - >>::mul(_self.into_inner(), rhs.into_inner()) - .into(); - output - } - fn mul(_self: Val<bevy::math::Mat3A>, rhs: f32) -> Val<bevy::math::Mat3A> { - let output: Val<bevy::math::Mat3A> = <bevy::math::Mat3A as std::ops::Mul< - f32, - >>::mul(_self.into_inner(), rhs) - .into(); - output - } /// Multiplies two 3x3 matrices. fn mul_mat3( _self: Ref<bevy::math::Mat3A>, @@ -17377,13 +20372,6 @@ impl bevy::math::Mat3A { .into(); output } - fn neg(_self: Val<bevy::math::Mat3A>) -> Val<bevy::math::Mat3A> { - let output: Val<bevy::math::Mat3A> = <bevy::math::Mat3A as std::ops::Neg>::neg( - _self.into_inner(), - ) - .into(); - output - } /// Returns the matrix row for the given `index`. /// # Panics /// Panics if `index` is greater than 2. @@ -17392,16 +20380,6 @@ impl bevy::math::Mat3A { .into(); output } - fn sub( - _self: Val<bevy::math::Mat3A>, - rhs: Val<bevy::math::Mat3A>, - ) -> Val<bevy::math::Mat3A> { - let output: Val<bevy::math::Mat3A> = <bevy::math::Mat3A as std::ops::Sub< - bevy::math::Mat3A, - >>::sub(_self.into_inner(), rhs.into_inner()) - .into(); - output - } /// Subtracts two 3x3 matrices. fn sub_mat3( _self: Ref<bevy::math::Mat3A>, @@ -17509,16 +20487,6 @@ impl bevy::math::Mat4 { .into(); output } - fn add( - _self: Val<bevy::math::Mat4>, - rhs: Val<bevy::math::Mat4>, - ) -> Val<bevy::math::Mat4> { - let output: Val<bevy::math::Mat4> = <bevy::math::Mat4 as std::ops::Add< - bevy::math::Mat4, - >>::add(_self.into_inner(), rhs.into_inner()) - .into(); - output - } /// Adds two 4x4 matrices. fn add_mat4( _self: Ref<bevy::math::Mat4>, @@ -17532,13 +20500,6 @@ impl bevy::math::Mat4 { let output: Val<bevy::math::DMat4> = bevy::math::Mat4::as_dmat4(&_self).into(); output } - fn clone(_self: Ref<bevy::math::Mat4>) -> Val<bevy::math::Mat4> { - let output: Val<bevy::math::Mat4> = <bevy::math::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. @@ -17551,26 +20512,12 @@ impl bevy::math::Mat4 { let output: f32 = bevy::math::Mat4::determinant(&_self).into(); output } - fn div(_self: Val<bevy::math::Mat4>, rhs: f32) -> Val<bevy::math::Mat4> { - let output: Val<bevy::math::Mat4> = <bevy::math::Mat4 as std::ops::Div< - f32, - >>::div(_self.into_inner(), rhs) - .into(); - output - } /// Divides a 4x4 matrix by a scalar. fn div_scalar(_self: Ref<bevy::math::Mat4>, rhs: f32) -> Val<bevy::math::Mat4> { let output: Val<bevy::math::Mat4> = bevy::math::Mat4::div_scalar(&_self, rhs) .into(); output } - fn eq(_self: Ref<bevy::math::Mat4>, rhs: Ref<bevy::math::Mat4>) -> bool { - let output: bool = <bevy::math::Mat4 as std::cmp::PartialEq< - bevy::math::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 @@ -17832,43 +20779,6 @@ impl bevy::math::Mat4 { .into(); output } - fn mul( - _self: Val<bevy::math::Mat4>, - rhs: Val<bevy::math::Affine3A>, - ) -> Val<bevy::math::Mat4> { - let output: Val<bevy::math::Mat4> = <bevy::math::Mat4 as std::ops::Mul< - bevy::math::Affine3A, - >>::mul(_self.into_inner(), rhs.into_inner()) - .into(); - output - } - fn mul( - _self: Val<bevy::math::Mat4>, - rhs: Val<bevy::math::Mat4>, - ) -> Val<bevy::math::Mat4> { - let output: Val<bevy::math::Mat4> = <bevy::math::Mat4 as std::ops::Mul< - bevy::math::Mat4, - >>::mul(_self.into_inner(), rhs.into_inner()) - .into(); - output - } - fn mul( - _self: Val<bevy::math::Mat4>, - rhs: Val<bevy::math::Vec4>, - ) -> Val<bevy::math::Vec4> { - let output: Val<bevy::math::Vec4> = <bevy::math::Mat4 as std::ops::Mul< - bevy::math::Vec4, - >>::mul(_self.into_inner(), rhs.into_inner()) - .into(); - output - } - fn mul(_self: Val<bevy::math::Mat4>, rhs: f32) -> Val<bevy::math::Mat4> { - let output: Val<bevy::math::Mat4> = <bevy::math::Mat4 as std::ops::Mul< - f32, - >>::mul(_self.into_inner(), rhs) - .into(); - output - } /// Multiplies two 4x4 matrices. fn mul_mat4( _self: Ref<bevy::math::Mat4>, @@ -17896,13 +20806,6 @@ impl bevy::math::Mat4 { .into(); output } - fn neg(_self: Val<bevy::math::Mat4>) -> Val<bevy::math::Mat4> { - let output: Val<bevy::math::Mat4> = <bevy::math::Mat4 as std::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( @@ -18137,16 +21040,6 @@ impl bevy::math::Mat4 { let output: Val<bevy::math::Vec4> = bevy::math::Mat4::row(&_self, index).into(); output } - fn sub( - _self: Val<bevy::math::Mat4>, - rhs: Val<bevy::math::Mat4>, - ) -> Val<bevy::math::Mat4> { - let output: Val<bevy::math::Mat4> = <bevy::math::Mat4 as std::ops::Sub< - bevy::math::Mat4, - >>::sub(_self.into_inner(), rhs.into_inner()) - .into(); - output - } /// Subtracts two 4x4 matrices. fn sub_mat4( _self: Ref<bevy::math::Mat4>, @@ -18285,16 +21178,6 @@ impl bevy::math::DMat2 { .into(); output } - fn add( - _self: Val<bevy::math::DMat2>, - rhs: Val<bevy::math::DMat2>, - ) -> Val<bevy::math::DMat2> { - let output: Val<bevy::math::DMat2> = <bevy::math::DMat2 as std::ops::Add< - bevy::math::DMat2, - >>::add(_self.into_inner(), rhs.into_inner()) - .into(); - output - } /// Adds two 2x2 matrices. fn add_mat2( _self: Ref<bevy::math::DMat2>, @@ -18308,13 +21191,6 @@ impl bevy::math::DMat2 { let output: Val<bevy::math::Mat2> = bevy::math::DMat2::as_mat2(&_self).into(); output } - fn clone(_self: Ref<bevy::math::DMat2>) -> Val<bevy::math::DMat2> { - let output: Val<bevy::math::DMat2> = <bevy::math::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. @@ -18328,26 +21204,12 @@ impl bevy::math::DMat2 { let output: f64 = bevy::math::DMat2::determinant(&_self).into(); output } - fn div(_self: Val<bevy::math::DMat2>, rhs: f64) -> Val<bevy::math::DMat2> { - let output: Val<bevy::math::DMat2> = <bevy::math::DMat2 as std::ops::Div< - f64, - >>::div(_self.into_inner(), rhs) - .into(); - output - } /// Divides a 2x2 matrix by a scalar. fn div_scalar(_self: Ref<bevy::math::DMat2>, rhs: f64) -> Val<bevy::math::DMat2> { let output: Val<bevy::math::DMat2> = bevy::math::DMat2::div_scalar(&_self, rhs) .into(); output } - fn eq(_self: Ref<bevy::math::DMat2>, rhs: Ref<bevy::math::DMat2>) -> bool { - let output: bool = <bevy::math::DMat2 as std::cmp::PartialEq< - bevy::math::DMat2, - >>::eq(&_self, &rhs) - .into(); - output - } /// Creates a 2x2 matrix containing a rotation of `angle` (in radians). fn from_angle(angle: f64) -> Val<bevy::math::DMat2> { let output: Val<bevy::math::DMat2> = bevy::math::DMat2::from_angle(angle).into(); @@ -18428,33 +21290,6 @@ impl bevy::math::DMat2 { let output: bool = bevy::math::DMat2::is_nan(&_self).into(); output } - fn mul( - _self: Val<bevy::math::DMat2>, - rhs: Val<bevy::math::DMat2>, - ) -> Val<bevy::math::DMat2> { - let output: Val<bevy::math::DMat2> = <bevy::math::DMat2 as std::ops::Mul< - bevy::math::DMat2, - >>::mul(_self.into_inner(), rhs.into_inner()) - .into(); - output - } - fn mul( - _self: Val<bevy::math::DMat2>, - rhs: Val<bevy::math::DVec2>, - ) -> Val<bevy::math::DVec2> { - let output: Val<bevy::math::DVec2> = <bevy::math::DMat2 as std::ops::Mul< - bevy::math::DVec2, - >>::mul(_self.into_inner(), rhs.into_inner()) - .into(); - output - } - fn mul(_self: Val<bevy::math::DMat2>, rhs: f64) -> Val<bevy::math::DMat2> { - let output: Val<bevy::math::DMat2> = <bevy::math::DMat2 as std::ops::Mul< - f64, - >>::mul(_self.into_inner(), rhs) - .into(); - output - } /// Multiplies two 2x2 matrices. fn mul_mat2( _self: Ref<bevy::math::DMat2>, @@ -18482,13 +21317,6 @@ impl bevy::math::DMat2 { .into(); output } - fn neg(_self: Val<bevy::math::DMat2>) -> Val<bevy::math::DMat2> { - let output: Val<bevy::math::DMat2> = <bevy::math::DMat2 as std::ops::Neg>::neg( - _self.into_inner(), - ) - .into(); - output - } /// Returns the matrix row for the given `index`. /// # Panics /// Panics if `index` is greater than 1. @@ -18497,16 +21325,6 @@ impl bevy::math::DMat2 { .into(); output } - fn sub( - _self: Val<bevy::math::DMat2>, - rhs: Val<bevy::math::DMat2>, - ) -> Val<bevy::math::DMat2> { - let output: Val<bevy::math::DMat2> = <bevy::math::DMat2 as std::ops::Sub< - bevy::math::DMat2, - >>::sub(_self.into_inner(), rhs.into_inner()) - .into(); - output - } /// Subtracts two 2x2 matrices. fn sub_mat2( _self: Ref<bevy::math::DMat2>, @@ -18566,16 +21384,6 @@ impl bevy::math::DMat3 { .into(); output } - fn add( - _self: Val<bevy::math::DMat3>, - rhs: Val<bevy::math::DMat3>, - ) -> Val<bevy::math::DMat3> { - let output: Val<bevy::math::DMat3> = <bevy::math::DMat3 as std::ops::Add< - bevy::math::DMat3, - >>::add(_self.into_inner(), rhs.into_inner()) - .into(); - output - } /// Adds two 3x3 matrices. fn add_mat3( _self: Ref<bevy::math::DMat3>, @@ -18589,13 +21397,6 @@ impl bevy::math::DMat3 { let output: Val<bevy::math::Mat3> = bevy::math::DMat3::as_mat3(&_self).into(); output } - fn clone(_self: Ref<bevy::math::DMat3>) -> Val<bevy::math::DMat3> { - let output: Val<bevy::math::DMat3> = <bevy::math::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. @@ -18609,26 +21410,12 @@ impl bevy::math::DMat3 { let output: f64 = bevy::math::DMat3::determinant(&_self).into(); output } - fn div(_self: Val<bevy::math::DMat3>, rhs: f64) -> Val<bevy::math::DMat3> { - let output: Val<bevy::math::DMat3> = <bevy::math::DMat3 as std::ops::Div< - f64, - >>::div(_self.into_inner(), rhs) - .into(); - output - } /// Divides a 3x3 matrix by a scalar. fn div_scalar(_self: Ref<bevy::math::DMat3>, rhs: f64) -> Val<bevy::math::DMat3> { let output: Val<bevy::math::DMat3> = bevy::math::DMat3::div_scalar(&_self, rhs) .into(); output } - fn eq(_self: Ref<bevy::math::DMat3>, rhs: Ref<bevy::math::DMat3>) -> bool { - let output: bool = <bevy::math::DMat3 as std::cmp::PartialEq< - bevy::math::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 @@ -18808,43 +21595,6 @@ impl bevy::math::DMat3 { let output: bool = bevy::math::DMat3::is_nan(&_self).into(); output } - fn mul( - _self: Val<bevy::math::DMat3>, - rhs: Val<bevy::math::DAffine2>, - ) -> Val<bevy::math::DMat3> { - let output: Val<bevy::math::DMat3> = <bevy::math::DMat3 as std::ops::Mul< - bevy::math::DAffine2, - >>::mul(_self.into_inner(), rhs.into_inner()) - .into(); - output - } - fn mul( - _self: Val<bevy::math::DMat3>, - rhs: Val<bevy::math::DMat3>, - ) -> Val<bevy::math::DMat3> { - let output: Val<bevy::math::DMat3> = <bevy::math::DMat3 as std::ops::Mul< - bevy::math::DMat3, - >>::mul(_self.into_inner(), rhs.into_inner()) - .into(); - output - } - fn mul( - _self: Val<bevy::math::DMat3>, - rhs: Val<bevy::math::DVec3>, - ) -> Val<bevy::math::DVec3> { - let output: Val<bevy::math::DVec3> = <bevy::math::DMat3 as std::ops::Mul< - bevy::math::DVec3, - >>::mul(_self.into_inner(), rhs.into_inner()) - .into(); - output - } - fn mul(_self: Val<bevy::math::DMat3>, rhs: f64) -> Val<bevy::math::DMat3> { - let output: Val<bevy::math::DMat3> = <bevy::math::DMat3 as std::ops::Mul< - f64, - >>::mul(_self.into_inner(), rhs) - .into(); - output - } /// Multiplies two 3x3 matrices. fn mul_mat3( _self: Ref<bevy::math::DMat3>, @@ -18872,13 +21622,6 @@ impl bevy::math::DMat3 { .into(); output } - fn neg(_self: Val<bevy::math::DMat3>) -> Val<bevy::math::DMat3> { - let output: Val<bevy::math::DMat3> = <bevy::math::DMat3 as std::ops::Neg>::neg( - _self.into_inner(), - ) - .into(); - output - } /// Returns the matrix row for the given `index`. /// # Panics /// Panics if `index` is greater than 2. @@ -18887,16 +21630,6 @@ impl bevy::math::DMat3 { .into(); output } - fn sub( - _self: Val<bevy::math::DMat3>, - rhs: Val<bevy::math::DMat3>, - ) -> Val<bevy::math::DMat3> { - let output: Val<bevy::math::DMat3> = <bevy::math::DMat3 as std::ops::Sub< - bevy::math::DMat3, - >>::sub(_self.into_inner(), rhs.into_inner()) - .into(); - output - } /// Subtracts two 3x3 matrices. fn sub_mat3( _self: Ref<bevy::math::DMat3>, @@ -19004,16 +21737,6 @@ impl bevy::math::DMat4 { .into(); output } - fn add( - _self: Val<bevy::math::DMat4>, - rhs: Val<bevy::math::DMat4>, - ) -> Val<bevy::math::DMat4> { - let output: Val<bevy::math::DMat4> = <bevy::math::DMat4 as std::ops::Add< - bevy::math::DMat4, - >>::add(_self.into_inner(), rhs.into_inner()) - .into(); - output - } /// Adds two 4x4 matrices. fn add_mat4( _self: Ref<bevy::math::DMat4>, @@ -19027,13 +21750,6 @@ impl bevy::math::DMat4 { let output: Val<bevy::math::Mat4> = bevy::math::DMat4::as_mat4(&_self).into(); output } - fn clone(_self: Ref<bevy::math::DMat4>) -> Val<bevy::math::DMat4> { - let output: Val<bevy::math::DMat4> = <bevy::math::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. @@ -19047,26 +21763,12 @@ impl bevy::math::DMat4 { let output: f64 = bevy::math::DMat4::determinant(&_self).into(); output } - fn div(_self: Val<bevy::math::DMat4>, rhs: f64) -> Val<bevy::math::DMat4> { - let output: Val<bevy::math::DMat4> = <bevy::math::DMat4 as std::ops::Div< - f64, - >>::div(_self.into_inner(), rhs) - .into(); - output - } /// Divides a 4x4 matrix by a scalar. fn div_scalar(_self: Ref<bevy::math::DMat4>, rhs: f64) -> Val<bevy::math::DMat4> { let output: Val<bevy::math::DMat4> = bevy::math::DMat4::div_scalar(&_self, rhs) .into(); output } - fn eq(_self: Ref<bevy::math::DMat4>, rhs: Ref<bevy::math::DMat4>) -> bool { - let output: bool = <bevy::math::DMat4 as std::cmp::PartialEq< - bevy::math::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 @@ -19319,43 +22021,6 @@ impl bevy::math::DMat4 { .into(); output } - fn mul( - _self: Val<bevy::math::DMat4>, - rhs: Val<bevy::math::DAffine3>, - ) -> Val<bevy::math::DMat4> { - let output: Val<bevy::math::DMat4> = <bevy::math::DMat4 as std::ops::Mul< - bevy::math::DAffine3, - >>::mul(_self.into_inner(), rhs.into_inner()) - .into(); - output - } - fn mul( - _self: Val<bevy::math::DMat4>, - rhs: Val<bevy::math::DMat4>, - ) -> Val<bevy::math::DMat4> { - let output: Val<bevy::math::DMat4> = <bevy::math::DMat4 as std::ops::Mul< - bevy::math::DMat4, - >>::mul(_self.into_inner(), rhs.into_inner()) - .into(); - output - } - fn mul( - _self: Val<bevy::math::DMat4>, - rhs: Val<bevy::math::DVec4>, - ) -> Val<bevy::math::DVec4> { - let output: Val<bevy::math::DVec4> = <bevy::math::DMat4 as std::ops::Mul< - bevy::math::DVec4, - >>::mul(_self.into_inner(), rhs.into_inner()) - .into(); - output - } - fn mul(_self: Val<bevy::math::DMat4>, rhs: f64) -> Val<bevy::math::DMat4> { - let output: Val<bevy::math::DMat4> = <bevy::math::DMat4 as std::ops::Mul< - f64, - >>::mul(_self.into_inner(), rhs) - .into(); - output - } /// Multiplies two 4x4 matrices. fn mul_mat4( _self: Ref<bevy::math::DMat4>, @@ -19383,13 +22048,6 @@ impl bevy::math::DMat4 { .into(); output } - fn neg(_self: Val<bevy::math::DMat4>) -> Val<bevy::math::DMat4> { - let output: Val<bevy::math::DMat4> = <bevy::math::DMat4 as std::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( @@ -19610,16 +22268,6 @@ impl bevy::math::DMat4 { .into(); output } - fn sub( - _self: Val<bevy::math::DMat4>, - rhs: Val<bevy::math::DMat4>, - ) -> Val<bevy::math::DMat4> { - let output: Val<bevy::math::DMat4> = <bevy::math::DMat4 as std::ops::Sub< - bevy::math::DMat4, - >>::sub(_self.into_inner(), rhs.into_inner()) - .into(); - output - } /// Subtracts two 4x4 matrices. fn sub_mat4( _self: Ref<bevy::math::DMat4>, @@ -19727,20 +22375,6 @@ impl bevy::math::Affine2 { .into(); output } - fn clone(_self: Ref<bevy::math::Affine2>) -> Val<bevy::math::Affine2> { - let output: Val<bevy::math::Affine2> = <bevy::math::Affine2 as bevy::reflect::erased_serde::__private::serde::__private::Clone>::clone( - &_self, - ) - .into(); - output - } - fn eq(_self: Ref<bevy::math::Affine2>, rhs: Ref<bevy::math::Affine2>) -> bool { - let output: bool = <bevy::math::Affine2 as std::cmp::PartialEq< - bevy::math::Affine2, - >>::eq(&_self, &rhs) - .into(); - output - } /// Creates an affine transform from the given rotation `angle`. fn from_angle(angle: f32) -> Val<bevy::math::Affine2> { let output: Val<bevy::math::Affine2> = bevy::math::Affine2::from_angle(angle) @@ -19867,36 +22501,6 @@ impl bevy::math::Affine2 { let output: bool = bevy::math::Affine2::is_nan(&_self).into(); output } - fn mul( - _self: Val<bevy::math::Affine2>, - rhs: Val<bevy::math::Affine2>, - ) -> Val<bevy::math::Affine2> { - let output: Val<bevy::math::Affine2> = <bevy::math::Affine2 as std::ops::Mul< - bevy::math::Affine2, - >>::mul(_self.into_inner(), rhs.into_inner()) - .into(); - output - } - fn mul( - _self: Val<bevy::math::Affine2>, - rhs: Val<bevy::math::Mat3>, - ) -> Val<bevy::math::Mat3> { - let output: Val<bevy::math::Mat3> = <bevy::math::Affine2 as std::ops::Mul< - bevy::math::Mat3, - >>::mul(_self.into_inner(), rhs.into_inner()) - .into(); - output - } - fn mul( - _self: Val<bevy::math::Affine2>, - rhs: Val<bevy::math::Mat3A>, - ) -> Val<bevy::math::Mat3A> { - let output: Val<bevy::math::Mat3A> = <bevy::math::Affine2 as std::ops::Mul< - bevy::math::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<bevy::math::Affine2>) -> [f32; 6] { let output: [f32; 6] = bevy::math::Affine2::to_cols_array(&_self).into(); @@ -19963,20 +22567,6 @@ impl bevy::math::Affine3A { .into(); output } - fn clone(_self: Ref<bevy::math::Affine3A>) -> Val<bevy::math::Affine3A> { - let output: Val<bevy::math::Affine3A> = <bevy::math::Affine3A as bevy::reflect::erased_serde::__private::serde::__private::Clone>::clone( - &_self, - ) - .into(); - output - } - fn eq(_self: Ref<bevy::math::Affine3A>, rhs: Ref<bevy::math::Affine3A>) -> bool { - let output: bool = <bevy::math::Affine3A as std::cmp::PartialEq< - bevy::math::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( @@ -20209,26 +22799,6 @@ impl bevy::math::Affine3A { .into(); output } - fn mul( - _self: Val<bevy::math::Affine3A>, - rhs: Val<bevy::math::Affine3A>, - ) -> Val<bevy::math::Affine3A> { - let output: Val<bevy::math::Affine3A> = <bevy::math::Affine3A as std::ops::Mul< - bevy::math::Affine3A, - >>::mul(_self.into_inner(), rhs.into_inner()) - .into(); - output - } - fn mul( - _self: Val<bevy::math::Affine3A>, - rhs: Val<bevy::math::Mat4>, - ) -> Val<bevy::math::Mat4> { - let output: Val<bevy::math::Mat4> = <bevy::math::Affine3A as std::ops::Mul< - bevy::math::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<bevy::math::Affine3A>) -> [f32; 12] { let output: [f32; 12] = bevy::math::Affine3A::to_cols_array(&_self).into(); @@ -20322,20 +22892,6 @@ impl bevy::math::DAffine2 { .into(); output } - fn clone(_self: Ref<bevy::math::DAffine2>) -> Val<bevy::math::DAffine2> { - let output: Val<bevy::math::DAffine2> = <bevy::math::DAffine2 as bevy::reflect::erased_serde::__private::serde::__private::Clone>::clone( - &_self, - ) - .into(); - output - } - fn eq(_self: Ref<bevy::math::DAffine2>, rhs: Ref<bevy::math::DAffine2>) -> bool { - let output: bool = <bevy::math::DAffine2 as std::cmp::PartialEq< - bevy::math::DAffine2, - >>::eq(&_self, &rhs) - .into(); - output - } /// Creates an affine transform from the given rotation `angle`. fn from_angle(angle: f64) -> Val<bevy::math::DAffine2> { let output: Val<bevy::math::DAffine2> = bevy::math::DAffine2::from_angle(angle) @@ -20456,26 +23012,6 @@ impl bevy::math::DAffine2 { let output: bool = bevy::math::DAffine2::is_nan(&_self).into(); output } - fn mul( - _self: Val<bevy::math::DAffine2>, - rhs: Val<bevy::math::DAffine2>, - ) -> Val<bevy::math::DAffine2> { - let output: Val<bevy::math::DAffine2> = <bevy::math::DAffine2 as std::ops::Mul< - bevy::math::DAffine2, - >>::mul(_self.into_inner(), rhs.into_inner()) - .into(); - output - } - fn mul( - _self: Val<bevy::math::DAffine2>, - rhs: Val<bevy::math::DMat3>, - ) -> Val<bevy::math::DMat3> { - let output: Val<bevy::math::DMat3> = <bevy::math::DAffine2 as std::ops::Mul< - bevy::math::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<bevy::math::DAffine2>) -> [f64; 6] { let output: [f64; 6] = bevy::math::DAffine2::to_cols_array(&_self).into(); @@ -20543,20 +23079,6 @@ impl bevy::math::DAffine3 { .into(); output } - fn clone(_self: Ref<bevy::math::DAffine3>) -> Val<bevy::math::DAffine3> { - let output: Val<bevy::math::DAffine3> = <bevy::math::DAffine3 as bevy::reflect::erased_serde::__private::serde::__private::Clone>::clone( - &_self, - ) - .into(); - output - } - fn eq(_self: Ref<bevy::math::DAffine3>, rhs: Ref<bevy::math::DAffine3>) -> bool { - let output: bool = <bevy::math::DAffine3 as std::cmp::PartialEq< - bevy::math::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( @@ -20789,26 +23311,6 @@ impl bevy::math::DAffine3 { .into(); output } - fn mul( - _self: Val<bevy::math::DAffine3>, - rhs: Val<bevy::math::DAffine3>, - ) -> Val<bevy::math::DAffine3> { - let output: Val<bevy::math::DAffine3> = <bevy::math::DAffine3 as std::ops::Mul< - bevy::math::DAffine3, - >>::mul(_self.into_inner(), rhs.into_inner()) - .into(); - output - } - fn mul( - _self: Val<bevy::math::DAffine3>, - rhs: Val<bevy::math::DMat4>, - ) -> Val<bevy::math::DMat4> { - let output: Val<bevy::math::DMat4> = <bevy::math::DAffine3 as std::ops::Mul< - bevy::math::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<bevy::math::DAffine3>) -> [f64; 12] { let output: [f64; 12] = bevy::math::DAffine3::to_cols_array(&_self).into(); @@ -20876,20 +23378,6 @@ impl bevy::math::DQuat { .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<bevy::math::DQuat>, - rhs: Val<bevy::math::DQuat>, - ) -> Val<bevy::math::DQuat> { - let output: Val<bevy::math::DQuat> = <bevy::math::DQuat as std::ops::Add< - bevy::math::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. @@ -20910,13 +23398,6 @@ impl bevy::math::DQuat { .into(); output } - fn clone(_self: Ref<bevy::math::DQuat>) -> Val<bevy::math::DQuat> { - let output: Val<bevy::math::DQuat> = <bevy::math::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<bevy::math::DQuat>) -> Val<bevy::math::DQuat> { @@ -20926,15 +23407,6 @@ impl bevy::math::DQuat { .into(); output } - /// Divides a quaternion by a scalar value. - /// The quotient is not guaranteed to be normalized. - fn div(_self: Val<bevy::math::DQuat>, rhs: f64) -> Val<bevy::math::DQuat> { - let output: Val<bevy::math::DQuat> = <bevy::math::DQuat as std::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<bevy::math::DQuat>, rhs: Val<bevy::math::DQuat>) -> f64 { @@ -20942,13 +23414,6 @@ impl bevy::math::DQuat { .into(); output } - fn eq(_self: Ref<bevy::math::DQuat>, rhs: Ref<bevy::math::DQuat>) -> bool { - let output: bool = <bevy::math::DQuat as std::cmp::PartialEq< - bevy::math::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. @@ -21196,44 +23661,6 @@ impl bevy::math::DQuat { } /// 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<bevy::math::DQuat>, - rhs: Val<bevy::math::DQuat>, - ) -> Val<bevy::math::DQuat> { - let output: Val<bevy::math::DQuat> = <bevy::math::DQuat as std::ops::Mul< - bevy::math::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<bevy::math::DQuat>, - rhs: Val<bevy::math::DVec3>, - ) -> Val<bevy::math::DVec3> { - let output: Val<bevy::math::DVec3> = <bevy::math::DQuat as std::ops::Mul< - bevy::math::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<bevy::math::DQuat>, rhs: f64) -> Val<bevy::math::DQuat> { - let output: Val<bevy::math::DQuat> = <bevy::math::DQuat as std::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. @@ -21262,13 +23689,6 @@ impl bevy::math::DQuat { .into(); output } - fn neg(_self: Val<bevy::math::DQuat>) -> Val<bevy::math::DQuat> { - let output: Val<bevy::math::DQuat> = <bevy::math::DQuat as std::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 @@ -21319,18 +23739,6 @@ impl bevy::math::DQuat { .into(); output } - /// Subtracts the `rhs` quaternion from `self`. - /// The difference is not guaranteed to be normalized. - fn sub( - _self: Val<bevy::math::DQuat>, - rhs: Val<bevy::math::DQuat>, - ) -> Val<bevy::math::DQuat> { - let output: Val<bevy::math::DQuat> = <bevy::math::DQuat as std::ops::Sub< - bevy::math::DQuat, - >>::sub(_self.into_inner(), rhs.into_inner()) - .into(); - output - } /// `[x, y, z, w]` fn to_array(_self: Ref<bevy::math::DQuat>) -> [f64; 4] { let output: [f64; 4] = bevy::math::DQuat::to_array(&_self).into(); @@ -21369,29 +23777,7 @@ impl bevy::math::DQuat { bms_core_path = "bevy_mod_scripting_core", generated )] -impl bevy::math::EulerRot { - fn assert_receiver_is_total_eq(_self: Ref<bevy::math::EulerRot>) -> () { - let output: () = <bevy::math::EulerRot as std::cmp::Eq>::assert_receiver_is_total_eq( - &_self, - ) - .into(); - output - } - fn clone(_self: Ref<bevy::math::EulerRot>) -> Val<bevy::math::EulerRot> { - let output: Val<bevy::math::EulerRot> = <bevy::math::EulerRot as bevy::reflect::erased_serde::__private::serde::__private::Clone>::clone( - &_self, - ) - .into(); - output - } - fn eq(_self: Ref<bevy::math::EulerRot>, other: Ref<bevy::math::EulerRot>) -> bool { - let output: bool = <bevy::math::EulerRot as std::cmp::PartialEq< - bevy::math::EulerRot, - >>::eq(&_self, &other) - .into(); - output - } -} +impl bevy::math::EulerRot {} #[script_bindings( remote, name = "b_vec_3_a_functions", @@ -21416,20 +23802,6 @@ impl bevy::math::BVec3A { let output: u32 = bevy::math::BVec3A::bitmask(_self.into_inner()).into(); output } - fn clone(_self: Ref<bevy::math::BVec3A>) -> Val<bevy::math::BVec3A> { - let output: Val<bevy::math::BVec3A> = <bevy::math::BVec3A as bevy::reflect::erased_serde::__private::serde::__private::Clone>::clone( - &_self, - ) - .into(); - output - } - fn eq(_self: Ref<bevy::math::BVec3A>, rhs: Ref<bevy::math::BVec3A>) -> bool { - let output: bool = <bevy::math::BVec3A as std::cmp::PartialEq< - bevy::math::BVec3A, - >>::eq(&_self, &rhs) - .into(); - output - } /// Creates a new vector mask from a bool array. fn from_array(a: [bool; 3]) -> Val<bevy::math::BVec3A> { let output: Val<bevy::math::BVec3A> = bevy::math::BVec3A::from_array(a).into(); @@ -21482,20 +23854,6 @@ impl bevy::math::BVec4A { let output: u32 = bevy::math::BVec4A::bitmask(_self.into_inner()).into(); output } - fn clone(_self: Ref<bevy::math::BVec4A>) -> Val<bevy::math::BVec4A> { - let output: Val<bevy::math::BVec4A> = <bevy::math::BVec4A as bevy::reflect::erased_serde::__private::serde::__private::Clone>::clone( - &_self, - ) - .into(); - output - } - fn eq(_self: Ref<bevy::math::BVec4A>, rhs: Ref<bevy::math::BVec4A>) -> bool { - let output: bool = <bevy::math::BVec4A as std::cmp::PartialEq< - bevy::math::BVec4A, - >>::eq(&_self, &rhs) - .into(); - output - } /// Creates a new vector mask from a bool array. fn from_array(a: [bool; 4]) -> Val<bevy::math::BVec4A> { let output: Val<bevy::math::BVec4A> = bevy::math::BVec4A::from_array(a).into(); @@ -21531,20 +23889,6 @@ impl bevy::math::BVec4A { 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 std::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 @@ -21607,20 +23951,6 @@ impl uuid::Uuid { 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 std::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 @@ -21645,13 +23975,6 @@ impl uuid::Uuid { 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 std::cmp::PartialEq< - uuid::Uuid, - >>::eq(&_self, &other) - .into(); - output - } /// Creates a UUID using the supplied bytes. /// # Examples /// Basic usage: @@ -21938,17 +24261,31 @@ impl ::bevy::app::Plugin for BevyReflectScriptingPlugin { register_duration_functions(&mut world); register_instant_functions(&mut world); register_range_full_functions(&mut world); + register_type_id_functions(&mut world); register_quat_functions(&mut world); register_vec_3_functions(&mut world); + register_socket_addr_functions(&mut world); register_i_vec_2_functions(&mut world); register_i_vec_3_functions(&mut world); register_i_vec_4_functions(&mut world); + register_i_8_vec_2_functions(&mut world); + register_i_8_vec_3_functions(&mut world); + register_i_8_vec_4_functions(&mut world); + register_i_16_vec_2_functions(&mut world); + register_i_16_vec_3_functions(&mut world); + register_i_16_vec_4_functions(&mut world); register_i_64_vec_2_functions(&mut world); register_i_64_vec_3_functions(&mut world); register_i_64_vec_4_functions(&mut world); register_u_vec_2_functions(&mut world); register_u_vec_3_functions(&mut world); register_u_vec_4_functions(&mut world); + register_u_8_vec_2_functions(&mut world); + register_u_8_vec_3_functions(&mut world); + register_u_8_vec_4_functions(&mut world); + register_u_16_vec_2_functions(&mut world); + register_u_16_vec_3_functions(&mut world); + register_u_16_vec_4_functions(&mut world); register_u_64_vec_2_functions(&mut world); register_u_64_vec_3_functions(&mut world); register_u_64_vec_4_functions(&mut world); diff --git a/crates/bevy_mod_scripting_functions/src/bevy_bindings/bevy_time.rs b/crates/bevy_mod_scripting_functions/src/bevy_bindings/bevy_time.rs index 2e7a937b67..c13ea6931c 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 @@ -18,30 +18,14 @@ pub struct BevyTimeScriptingPlugin; 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 std::clone::Clone>::clone( - &_self, - ) - .into(); - output - } -} +impl bevy::time::prelude::Fixed {} #[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 std::clone::Clone>::clone( - &_self, - ) - .into(); - output - } -} +impl bevy::time::prelude::Real {} #[script_bindings( remote, name = "timer_functions", @@ -49,20 +33,6 @@ impl bevy::time::prelude::Real { 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 std::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 std::clone::Clone>::clone( - &_self, - ) - .into(); - output - } /// Returns the duration of the timer. /// # Examples /// ``` @@ -71,8 +41,8 @@ impl bevy::time::prelude::Timer { /// let timer = Timer::new(Duration::from_secs(1), TimerMode::Once); /// assert_eq!(timer.duration(), Duration::from_secs(1)); /// ``` - fn duration(_self: Ref<bevy::time::prelude::Timer>) -> Val<std::time::Duration> { - let output: Val<std::time::Duration> = bevy::time::prelude::Timer::duration( + 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(); @@ -89,8 +59,8 @@ impl bevy::time::prelude::Timer { /// timer.tick(Duration::from_secs_f32(0.5)); /// assert_eq!(timer.elapsed(), Duration::from_secs_f32(0.5)); /// ``` - fn elapsed(_self: Ref<bevy::time::prelude::Timer>) -> Val<std::time::Duration> { - let output: Val<std::time::Duration> = bevy::time::prelude::Timer::elapsed( + 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(); @@ -108,16 +78,6 @@ impl bevy::time::prelude::Timer { 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 std::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 @@ -218,7 +178,7 @@ impl bevy::time::prelude::Timer { /// Creates a new timer with a given duration. /// See also [`Timer::from_seconds`](Timer::from_seconds). fn new( - duration: Val<std::time::Duration>, + 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( @@ -268,8 +228,8 @@ impl bevy::time::prelude::Timer { /// timer.tick(Duration::from_secs_f32(0.5)); /// assert_eq!(timer.remaining(), Duration::from_secs_f32(1.5)); /// ``` - fn remaining(_self: Ref<bevy::time::prelude::Timer>) -> Val<std::time::Duration> { - let output: Val<std::time::Duration> = bevy::time::prelude::Timer::remaining( + 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(); @@ -318,7 +278,7 @@ impl bevy::time::prelude::Timer { /// ``` fn set_duration( mut _self: Mut<bevy::time::prelude::Timer>, - duration: Val<std::time::Duration>, + duration: Val<core::time::Duration>, ) -> () { let output: () = bevy::time::prelude::Timer::set_duration( &mut _self, @@ -341,7 +301,7 @@ impl bevy::time::prelude::Timer { /// ``` fn set_elapsed( mut _self: Mut<bevy::time::prelude::Timer>, - time: Val<std::time::Duration>, + time: Val<core::time::Duration>, ) -> () { let output: () = bevy::time::prelude::Timer::set_elapsed( &mut _self, @@ -414,51 +374,14 @@ impl bevy::time::prelude::Timer { 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 std::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 std::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 std::cmp::PartialEq< - bevy::time::prelude::TimerMode, - >>::eq(&_self, &other) - .into(); - output - } -} +impl bevy::time::prelude::TimerMode {} #[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 std::clone::Clone>::clone( - &_self, - ) - .into(); - output - } -} +impl bevy::time::prelude::Virtual {} #[script_bindings( remote, name = "stopwatch_functions", @@ -466,20 +389,6 @@ impl bevy::time::prelude::Virtual { generated )] impl bevy::time::Stopwatch { - fn assert_receiver_is_total_eq(_self: Ref<bevy::time::Stopwatch>) -> () { - let output: () = <bevy::time::Stopwatch as std::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 std::clone::Clone>::clone( - &_self, - ) - .into(); - output - } /// Returns the elapsed time since the last [`reset`](Stopwatch::reset) /// of the stopwatch. /// # Examples @@ -493,8 +402,8 @@ impl bevy::time::Stopwatch { /// # See Also /// [`elapsed_secs`](Stopwatch::elapsed_secs) - if an `f32` value is desirable instead. /// [`elapsed_secs_f64`](Stopwatch::elapsed_secs_f64) - if an `f64` is desirable instead. - fn elapsed(_self: Ref<bevy::time::Stopwatch>) -> Val<std::time::Duration> { - let output: Val<std::time::Duration> = bevy::time::Stopwatch::elapsed(&_self) + fn elapsed(_self: Ref<bevy::time::Stopwatch>) -> Val<core::time::Duration> { + let output: Val<core::time::Duration> = bevy::time::Stopwatch::elapsed(&_self) .into(); output } @@ -524,13 +433,6 @@ impl bevy::time::Stopwatch { 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 std::cmp::PartialEq< - bevy::time::Stopwatch, - >>::eq(&_self, &other) - .into(); - output - } /// Returns `true` if the stopwatch is paused. /// # Examples /// ``` @@ -599,7 +501,7 @@ impl bevy::time::Stopwatch { /// ``` fn set_elapsed( mut _self: Mut<bevy::time::Stopwatch>, - time: Val<std::time::Duration>, + time: Val<core::time::Duration>, ) -> () { let output: () = bevy::time::Stopwatch::set_elapsed( &mut _self, diff --git a/crates/bevy_mod_scripting_functions/src/bevy_bindings/bevy_transform.rs b/crates/bevy_mod_scripting_functions/src/bevy_bindings/bevy_transform.rs index 33f27c9332..bd4bffae85 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 @@ -39,15 +39,6 @@ impl bevy::transform::components::GlobalTransform { .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 std::clone::Clone>::clone( - &_self, - ) - .into(); - output - } /// Returns the 3d affine transformation matrix as a [`Mat4`]. fn compute_matrix( _self: Ref<bevy::transform::components::GlobalTransform>, @@ -80,16 +71,6 @@ impl bevy::transform::components::GlobalTransform { .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 std::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>, @@ -159,36 +140,6 @@ impl bevy::transform::components::GlobalTransform { .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 std::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 std::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 std::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( @@ -222,7 +173,6 @@ impl bevy::transform::components::GlobalTransform { /// ``` /// # use bevy_transform::prelude::{GlobalTransform, Transform}; /// # use bevy_ecs::prelude::{Entity, Query, Component, Commands}; - /// # use bevy_hierarchy::{prelude::Parent, BuildChildren}; /// #[derive(Component)] /// struct ToReparent { /// new_parent: Entity, @@ -394,15 +344,6 @@ impl bevy::transform::components::Transform { .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 std::clone::Clone>::clone( - &_self, - ) - .into(); - output - } /// Returns the 3d affine transformation matrix from this transforms translation, /// rotation, and scale. fn compute_affine( @@ -435,16 +376,6 @@ impl bevy::transform::components::Transform { .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 std::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>, @@ -570,36 +501,6 @@ impl bevy::transform::components::Transform { .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 std::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 std::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 std::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( @@ -656,6 +557,11 @@ impl bevy::transform::components::Transform { } /// Rotates this [`Transform`] around the given `axis` by `angle` (in radians). /// If this [`Transform`] has a parent, the `axis` is relative to the rotation of the parent. + /// # Warning + /// If you pass in an `axis` based on the current rotation (e.g. obtained via [`Transform::local_x`]), + /// floating point errors can accumulate exponentially when applying rotations repeatedly this way. This will + /// result in a denormalized rotation. In this case, it is recommended to normalize the [`Transform::rotation`] after + /// each call to this method. fn rotate_axis( mut _self: Mut<bevy::transform::components::Transform>, axis: Val<bevy::math::Dir3>, @@ -683,6 +589,11 @@ impl bevy::transform::components::Transform { output } /// Rotates this [`Transform`] around its local `axis` by `angle` (in radians). + /// # Warning + /// If you pass in an `axis` based on the current rotation (e.g. obtained via [`Transform::local_x`]), + /// floating point errors can accumulate exponentially when applying rotations repeatedly this way. This will + /// result in a denormalized rotation. In this case, it is recommended to normalize the [`Transform::rotation`] after + /// each call to this method. fn rotate_local_axis( mut _self: Mut<bevy::transform::components::Transform>, axis: Val<bevy::math::Dir3>, @@ -861,10 +772,18 @@ impl bevy::transform::components::Transform { output } } +#[script_bindings( + remote, + name = "transform_tree_changed_functions", + bms_core_path = "bevy_mod_scripting_core", + generated +)] +impl bevy::transform::components::TransformTreeChanged {} impl ::bevy::app::Plugin for BevyTransformScriptingPlugin { fn build(&self, app: &mut ::bevy::prelude::App) { let mut world = app.world_mut(); register_global_transform_functions(&mut world); register_transform_functions(&mut world); + register_transform_tree_changed_functions(&mut world); } } diff --git a/crates/xtask/src/main.rs b/crates/xtask/src/main.rs index cfe7487c5b..ab1d217a96 100644 --- a/crates/xtask/src/main.rs +++ b/crates/xtask/src/main.rs @@ -598,6 +598,13 @@ struct CodegenTemplateArgs { self_is_bms_lua: bool, } +fn fetch_default_bevy_features() -> String { + let path = "codegen_bevy_features.txt"; + std::fs::read_to_string(path) + .with_context(|| format!("Failed to read default bevy features from {path}")) + .unwrap() +} + #[derive(Clone, Debug, PartialEq, Eq, PartialOrd, Ord, clap::Subcommand, strum::AsRefStr)] #[clap( name = "xtask", @@ -677,7 +684,7 @@ enum Xtasks { #[clap( long, - default_value = "bevy_asset,bevy_animation,bevy_core_pipeline,bevy_ui,bevy_pbr,bevy_render,bevy_text,bevy_sprite,file_watcher,multi_threaded", + default_value = fetch_default_bevy_features(), help = "The features to enable for the bevy crate" )] bevy_features: Vec<String>, From 82f8e94ec32655fb8f0b4a23cc5a98954f936912 Mon Sep 17 00:00:00 2001 From: makspll <makspl17@gmail.com> Date: Sat, 5 Jul 2025 12:40:59 +0100 Subject: [PATCH 05/17] small refactor --- .../src/bindings/reference.rs | 46 ++++++++----------- 1 file changed, 19 insertions(+), 27 deletions(-) diff --git a/crates/bevy_mod_scripting_core/src/bindings/reference.rs b/crates/bevy_mod_scripting_core/src/bindings/reference.rs index d573154d7b..ca5091a5b5 100644 --- a/crates/bevy_mod_scripting_core/src/bindings/reference.rs +++ b/crates/bevy_mod_scripting_core/src/bindings/reference.rs @@ -6,19 +6,19 @@ //! we need wrapper types which have owned and ref variants. use super::{access_map::ReflectAccessId, WorldGuard}; use crate::{ - bindings::{with_access_read, with_access_write, ReflectAllocationId}, - error::InteropError, - reflection_extensions::{PartialReflectExt, TypeIdExtensions}, - ReflectAllocator, + bindings::{with_access_read, with_access_write, ReflectAllocationId}, + error::InteropError, + reflection_extensions::{PartialReflectExt, TypeIdExtensions}, + ReflectAllocator, }; 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}, + 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}, }; use std::{any::TypeId, fmt::Debug}; @@ -503,11 +503,7 @@ impl ReflectBase { match self { ReflectBase::Component(entity, component_id) => { // Safety: the caller ensures invariants hold - if let Ok(entity) = world.get_entity(entity) { - entity.get_by_id(component_id) - } else { - None - } + world.get_entity(entity).ok()?.get_by_id(component_id) } ReflectBase::Resource(component_id) => { // Safety: the caller ensures invariants hold @@ -526,11 +522,7 @@ impl ReflectBase { match self { ReflectBase::Component(entity, component_id) => { // Safety: the caller ensures invariants hold - if let Ok(entity) = world.get_entity(entity) { - entity.get_mut_by_id(component_id).ok() - } else { - None - } + world.get_entity(entity).ok()?.get_mut_by_id(component_id) } ReflectBase::Resource(component_id) => { // Safety: the caller ensures invariants hold @@ -646,15 +638,15 @@ impl Iterator for ReflectRefIter { #[cfg(test)] mod test { - use bevy::prelude::{AppTypeRegistry, World}; + use bevy::prelude::{AppTypeRegistry, World}; - use crate::bindings::{ - function::script_function::AppScriptFunctionRegistry, AppReflectAllocator, - }; + use crate::bindings::{ + function::script_function::AppScriptFunctionRegistry, AppReflectAllocator, + }; - use super::*; + use super::*; - #[derive(Reflect, Component, Debug, Clone, PartialEq)] + #[derive(Reflect, Component, Debug, Clone, PartialEq)] struct Component(Vec<String>); #[derive(Reflect, Resource, Debug, Clone, PartialEq)] From 22a41b802c12756acd86479ba9324bba11a534cc Mon Sep 17 00:00:00 2001 From: makspll <makspl17@gmail.com> Date: Sat, 5 Jul 2025 19:10:51 +0100 Subject: [PATCH 06/17] actually skip functions with generics that don't appear as types --- crates/bevy_api_gen/.vscode/settings.json | 3 + crates/bevy_api_gen/Cargo.toml | 6 +- .../src/passes/find_methods_and_fields.rs | 46 +- crates/bevy_api_gen/templates/import.tera | 2 +- .../src/bindings/reference.rs | 6 +- .../src/bindings/script_system.rs | 12 +- .../src/bevy_bindings/bevy_input.rs | 8 +- .../src/bevy_bindings/bevy_math.rs | 40 +- .../src/bevy_bindings/bevy_reflect.rs | 420 +++++++++--------- .../src/bevy_bindings/bevy_time.rs | 24 +- 10 files changed, 309 insertions(+), 258 deletions(-) create mode 100644 crates/bevy_api_gen/.vscode/settings.json diff --git a/crates/bevy_api_gen/.vscode/settings.json b/crates/bevy_api_gen/.vscode/settings.json new file mode 100644 index 0000000000..7380220f6c --- /dev/null +++ b/crates/bevy_api_gen/.vscode/settings.json @@ -0,0 +1,3 @@ +{ + "rust-analyzer.rustc.source": "discover", +} \ No newline at end of file diff --git a/crates/bevy_api_gen/Cargo.toml b/crates/bevy_api_gen/Cargo.toml index 9b0c238847..33ab58b9ae 100644 --- a/crates/bevy_api_gen/Cargo.toml +++ b/crates/bevy_api_gen/Cargo.toml @@ -30,11 +30,9 @@ codegen-units = 8 incremental = false debug = false -# [rust-analyzer.rustc] -# source = "discover" -# [package.metadata.rust-analyzer] -# rustc_private = true +[package.metadata.rust-analyzer] +rustc_private = true [dependencies] log = "0.4" diff --git a/crates/bevy_api_gen/src/passes/find_methods_and_fields.rs b/crates/bevy_api_gen/src/passes/find_methods_and_fields.rs index 7acffc237b..c0a77e05d6 100644 --- a/crates/bevy_api_gen/src/passes/find_methods_and_fields.rs +++ b/crates/bevy_api_gen/src/passes/find_methods_and_fields.rs @@ -6,7 +6,9 @@ use rustc_hir::{ Safety, }; use rustc_infer::infer::TyCtxtInferExt; -use rustc_middle::ty::{AdtKind, AssocKind, FieldDef, FnSig, Ty, TyCtxt, TyKind, TypingEnv}; +use rustc_middle::ty::{ + AdtKind, AssocKind, FieldDef, FnSig, GenericArgs, Ty, TyCtxt, TyKind, TypingEnv, TypingMode, +}; use rustc_span::Symbol; use rustc_trait_selection::infer::InferCtxtExt; @@ -104,6 +106,9 @@ pub(crate) fn find_methods_and_fields(ctxt: &mut BevyCtxt<'_>, _args: &Args) -> return None; } + let inference_ctxt = + ctxt.tcx.infer_ctxt().build(TypingMode::non_body_analysis()); + let trait_did = ctxt .tcx .impl_trait_ref(*impl_did) @@ -112,17 +117,29 @@ pub(crate) fn find_methods_and_fields(ctxt: &mut BevyCtxt<'_>, _args: &Args) -> let fn_name = assoc_item.name.to_ident_string(); let has_self = assoc_item.fn_has_self_parameter; let fn_did = assoc_item.def_id; + trace!( "Processing function: '{fn_name}' on type: `{}`", ctxt.tcx.item_name(def_id) ); - // let param_env = ctxt.tcx.param_env(fn_did); let param_env = TypingEnv::non_body_analysis(ctxt.tcx, def_id); - let sig: FnSig = ctxt.tcx.normalize_erasing_late_bound_regions( - param_env, - ctxt.tcx.fn_sig(fn_did).instantiate_identity(), - ); + let fn_sig = ctxt.tcx.fn_sig(fn_did).instantiate_identity(); + let sig: FnSig = ctxt + .tcx + .normalize_erasing_late_bound_regions(param_env, fn_sig); + + let function_generics = get_function_generics(ctxt.tcx, fn_did, *impl_did); + + if !function_generics.is_empty() { + log::debug!( + "Skipping function: `{}` on type: `{}` as it has generics: {:?}", + assoc_item.name, + ctxt.tcx.item_name(def_id), + function_generics + ); + return None; + } if let Some(unstability) = ctxt.tcx.lookup_stability(fn_did) { if unstability.is_unstable() { @@ -221,6 +238,23 @@ pub(crate) fn find_methods_and_fields(ctxt: &mut BevyCtxt<'_>, _args: &Args) -> true } +fn get_function_generics<'tcx>(tcx: TyCtxt<'tcx>, fn_did: DefId, impl_did: DefId) -> Vec<Ty<'tcx>> { + // the early binder for this fn_sig will contain the generics on the function + // we can't use it to iterate them though, for that we need to get the generics via the identity mapping + // we want to first instantiate the function with any args in the impl, as those don't affect the standalone function signature + + let identity_args = GenericArgs::identity_for_item(tcx, fn_did) + .types() + .collect::<Vec<_>>(); + let identity_args_impl = GenericArgs::identity_for_item(tcx, impl_did) + .types() + .collect::<Vec<_>>(); + identity_args + .into_iter() + .filter(|arg| !identity_args_impl.contains(arg)) + .collect::<Vec<_>>() +} + fn report_fn_arg_not_supported(tcx: TyCtxt, f_did: DefId, type_did: DefId, ty: Ty, reason: &str) { info!( "Ignoring function: `{}` on type: `{}` reason: `{}`, relevant type: `{}`", diff --git a/crates/bevy_api_gen/templates/import.tera b/crates/bevy_api_gen/templates/import.tera index 30d0f37eb4..638bc89bf0 100644 --- a/crates/bevy_api_gen/templates/import.tera +++ b/crates/bevy_api_gen/templates/import.tera @@ -3,5 +3,5 @@ bevy::{{- import | substring(start=5) -}} {%- elif import is starting_with("glam::") -%} bevy::math::{{- import | substring(start=6) -}} {%- else -%} -{{import}} +::{{import}} {%- endif -%} \ No newline at end of file diff --git a/crates/bevy_mod_scripting_core/src/bindings/reference.rs b/crates/bevy_mod_scripting_core/src/bindings/reference.rs index ca5091a5b5..60c4efc3d2 100644 --- a/crates/bevy_mod_scripting_core/src/bindings/reference.rs +++ b/crates/bevy_mod_scripting_core/src/bindings/reference.rs @@ -522,7 +522,11 @@ impl ReflectBase { match self { ReflectBase::Component(entity, component_id) => { // Safety: the caller ensures invariants hold - world.get_entity(entity).ok()?.get_mut_by_id(component_id) + world + .get_entity(entity) + .ok()? + .get_mut_by_id(component_id) + .ok() } ReflectBase::Resource(component_id) => { // Safety: the caller ensures invariants hold diff --git a/crates/bevy_mod_scripting_core/src/bindings/script_system.rs b/crates/bevy_mod_scripting_core/src/bindings/script_system.rs index 1eed73acba..c11332172b 100644 --- a/crates/bevy_mod_scripting_core/src/bindings/script_system.rs +++ b/crates/bevy_mod_scripting_core/src/bindings/script_system.rs @@ -27,14 +27,12 @@ use bevy::{ entity::Entity, query::{Access, FilteredAccess, FilteredAccessSet, QueryState}, reflect::AppTypeRegistry, - schedule::{ - SystemSet, Infallible - }, + schedule::SystemSet, system::{IntoSystem, System, SystemParamValidationError}, world::{unsafe_world_cell::UnsafeWorldCell, World}, }, platform::collections::HashSet, - prelude::{BevyError, IntoScheduleConfigs}, + prelude::IntoScheduleConfigs, reflect::{OffsetAccess, ParsedPath, Reflect}, }; use bevy_system_reflection::{ReflectSchedule, ReflectSystem}; @@ -163,8 +161,10 @@ impl ScriptSystemBuilder { // this is quite important, by default systems are placed in a set defined by their TYPE, i.e. in this case // all script systems would be the same - // let set = ScriptSystemSet::next(); - let mut system_config = <ScriptSystemBuilder as IntoScheduleConfigs<Box<(dyn System<In = (), Out = Result<(), BevyError>> + 'static)>, (Infallible, IsDynamicScriptSystem<P>)>>::into_configs(self); // apply ordering + + let system: DynamicScriptSystem<P> = IntoSystem::into_system(self); + let mut system_config = system.into_configs(); + // let mut system_config = <ScriptSystemBuilder as IntoScheduleConfigs<Box<(dyn System<In = (), Out = Result<(), BevyError>> + 'static)>, (Infallible, IsDynamicScriptSystem<P>)>>::into_configs(self); // apply ordering for (other, is_before) in before_systems .into_iter() .map(|b| (b, true)) 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 20bc13c6a6..bd79805d39 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 @@ -75,8 +75,8 @@ impl bevy::input::gamepad::Gamepad { /// [vendor]: Self::vendor_id fn product_id( _self: Ref<bevy::input::gamepad::Gamepad>, - ) -> core::option::Option<u16> { - let output: core::option::Option<u16> = bevy::input::gamepad::Gamepad::product_id( + ) -> ::core::option::Option<u16> { + let output: ::core::option::Option<u16> = bevy::input::gamepad::Gamepad::product_id( &_self, ) .into(); @@ -93,8 +93,8 @@ impl bevy::input::gamepad::Gamepad { /// 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<u16> { - let output: core::option::Option<u16> = bevy::input::gamepad::Gamepad::vendor_id( + ) -> ::core::option::Option<u16> { + let output: ::core::option::Option<u16> = bevy::input::gamepad::Gamepad::vendor_id( &_self, ) .into(); diff --git a/crates/bevy_mod_scripting_functions/src/bevy_bindings/bevy_math.rs b/crates/bevy_mod_scripting_functions/src/bevy_bindings/bevy_math.rs index c23785c23b..c4b3745ac4 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 @@ -263,8 +263,8 @@ impl bevy::math::Ray2d { _self: Ref<bevy::math::Ray2d>, plane_origin: Val<bevy::math::prelude::Vec2>, plane: Val<bevy::math::primitives::Plane2d>, - ) -> core::option::Option<f32> { - let output: core::option::Option<f32> = bevy::math::Ray2d::intersect_plane( + ) -> ::core::option::Option<f32> { + let output: ::core::option::Option<f32> = bevy::math::Ray2d::intersect_plane( &_self, plane_origin.into_inner(), plane.into_inner(), @@ -309,8 +309,8 @@ impl bevy::math::Ray3d { _self: Ref<bevy::math::Ray3d>, plane_origin: Val<bevy::math::prelude::Vec3>, plane: Val<bevy::math::primitives::InfinitePlane3d>, - ) -> core::option::Option<f32> { - let output: core::option::Option<f32> = bevy::math::Ray3d::intersect_plane( + ) -> ::core::option::Option<f32> { + let output: ::core::option::Option<f32> = bevy::math::Ray3d::intersect_plane( &_self, plane_origin.into_inner(), plane.into_inner(), @@ -3740,8 +3740,8 @@ impl bevy::math::bounding::RayCast2d { fn aabb_intersection_at( _self: Ref<bevy::math::bounding::RayCast2d>, aabb: Ref<bevy::math::bounding::Aabb2d>, - ) -> core::option::Option<f32> { - let output: core::option::Option<f32> = bevy::math::bounding::RayCast2d::aabb_intersection_at( + ) -> ::core::option::Option<f32> { + let output: ::core::option::Option<f32> = bevy::math::bounding::RayCast2d::aabb_intersection_at( &_self, &aabb, ) @@ -3752,8 +3752,8 @@ impl bevy::math::bounding::RayCast2d { fn circle_intersection_at( _self: Ref<bevy::math::bounding::RayCast2d>, circle: Ref<bevy::math::bounding::BoundingCircle>, - ) -> core::option::Option<f32> { - let output: core::option::Option<f32> = bevy::math::bounding::RayCast2d::circle_intersection_at( + ) -> ::core::option::Option<f32> { + let output: ::core::option::Option<f32> = bevy::math::bounding::RayCast2d::circle_intersection_at( &_self, &circle, ) @@ -3808,8 +3808,8 @@ impl bevy::math::bounding::AabbCast2d { fn aabb_collision_at( _self: Ref<bevy::math::bounding::AabbCast2d>, aabb: Val<bevy::math::bounding::Aabb2d>, - ) -> core::option::Option<f32> { - let output: core::option::Option<f32> = bevy::math::bounding::AabbCast2d::aabb_collision_at( + ) -> ::core::option::Option<f32> { + let output: ::core::option::Option<f32> = bevy::math::bounding::AabbCast2d::aabb_collision_at( &_self, aabb.into_inner(), ) @@ -3858,8 +3858,8 @@ impl bevy::math::bounding::BoundingCircleCast { fn circle_collision_at( _self: Ref<bevy::math::bounding::BoundingCircleCast>, circle: Val<bevy::math::bounding::BoundingCircle>, - ) -> core::option::Option<f32> { - let output: core::option::Option<f32> = bevy::math::bounding::BoundingCircleCast::circle_collision_at( + ) -> ::core::option::Option<f32> { + let output: ::core::option::Option<f32> = bevy::math::bounding::BoundingCircleCast::circle_collision_at( &_self, circle.into_inner(), ) @@ -3908,8 +3908,8 @@ impl bevy::math::bounding::RayCast3d { fn aabb_intersection_at( _self: Ref<bevy::math::bounding::RayCast3d>, aabb: Ref<bevy::math::bounding::Aabb3d>, - ) -> core::option::Option<f32> { - let output: core::option::Option<f32> = bevy::math::bounding::RayCast3d::aabb_intersection_at( + ) -> ::core::option::Option<f32> { + let output: ::core::option::Option<f32> = bevy::math::bounding::RayCast3d::aabb_intersection_at( &_self, &aabb, ) @@ -3942,8 +3942,8 @@ impl bevy::math::bounding::RayCast3d { fn sphere_intersection_at( _self: Ref<bevy::math::bounding::RayCast3d>, sphere: Ref<bevy::math::bounding::BoundingSphere>, - ) -> core::option::Option<f32> { - let output: core::option::Option<f32> = bevy::math::bounding::RayCast3d::sphere_intersection_at( + ) -> ::core::option::Option<f32> { + let output: ::core::option::Option<f32> = bevy::math::bounding::RayCast3d::sphere_intersection_at( &_self, &sphere, ) @@ -3962,8 +3962,8 @@ impl bevy::math::bounding::AabbCast3d { fn aabb_collision_at( _self: Ref<bevy::math::bounding::AabbCast3d>, aabb: Val<bevy::math::bounding::Aabb3d>, - ) -> core::option::Option<f32> { - let output: core::option::Option<f32> = bevy::math::bounding::AabbCast3d::aabb_collision_at( + ) -> ::core::option::Option<f32> { + let output: ::core::option::Option<f32> = bevy::math::bounding::AabbCast3d::aabb_collision_at( &_self, aabb.into_inner(), ) @@ -4010,8 +4010,8 @@ impl bevy::math::bounding::BoundingSphereCast { fn sphere_collision_at( _self: Ref<bevy::math::bounding::BoundingSphereCast>, sphere: Val<bevy::math::bounding::BoundingSphere>, - ) -> core::option::Option<f32> { - let output: core::option::Option<f32> = bevy::math::bounding::BoundingSphereCast::sphere_collision_at( + ) -> ::core::option::Option<f32> { + let output: ::core::option::Option<f32> = bevy::math::bounding::BoundingSphereCast::sphere_collision_at( &_self, sphere.into_inner(), ) 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 3751560827..439b7a4e6b 100644 --- a/crates/bevy_mod_scripting_functions/src/bevy_bindings/bevy_reflect.rs +++ b/crates/bevy_mod_scripting_functions/src/bevy_bindings/bevy_reflect.rs @@ -18,7 +18,7 @@ pub struct BevyReflectScriptingPlugin; bms_core_path = "bevy_mod_scripting_core", generated )] -impl core::sync::atomic::AtomicBool { +impl ::core::sync::atomic::AtomicBool { /// Consumes the atomic and returns the contained value. /// This is safe because passing `self` by value guarantees that no other threads are /// concurrently accessing the atomic data. @@ -28,8 +28,10 @@ impl core::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()) + fn into_inner(_self: Val<::core::sync::atomic::AtomicBool>) -> bool { + let output: bool = ::core::sync::atomic::AtomicBool::into_inner( + _self.into_inner(), + ) .into(); output } @@ -40,8 +42,8 @@ impl core::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( + fn new(v: bool) -> Val<::core::sync::atomic::AtomicBool> { + let output: Val<::core::sync::atomic::AtomicBool> = ::core::sync::atomic::AtomicBool::new( v, ) .into(); @@ -54,7 +56,7 @@ impl core::sync::atomic::AtomicBool { bms_core_path = "bevy_mod_scripting_core", generated )] -impl core::sync::atomic::AtomicI16 { +impl ::core::sync::atomic::AtomicI16 { /// Consumes the atomic and returns the contained value. /// This is safe because passing `self` by value guarantees that no other threads are /// concurrently accessing the atomic data. @@ -64,8 +66,8 @@ impl core::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()) + fn into_inner(_self: Val<::core::sync::atomic::AtomicI16>) -> i16 { + let output: i16 = ::core::sync::atomic::AtomicI16::into_inner(_self.into_inner()) .into(); output } @@ -75,8 +77,8 @@ impl core::sync::atomic::AtomicI16 { /// 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( + fn new(v: i16) -> Val<::core::sync::atomic::AtomicI16> { + let output: Val<::core::sync::atomic::AtomicI16> = ::core::sync::atomic::AtomicI16::new( v, ) .into(); @@ -89,7 +91,7 @@ impl core::sync::atomic::AtomicI16 { bms_core_path = "bevy_mod_scripting_core", generated )] -impl core::sync::atomic::AtomicI32 { +impl ::core::sync::atomic::AtomicI32 { /// Consumes the atomic and returns the contained value. /// This is safe because passing `self` by value guarantees that no other threads are /// concurrently accessing the atomic data. @@ -99,8 +101,8 @@ impl core::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()) + fn into_inner(_self: Val<::core::sync::atomic::AtomicI32>) -> i32 { + let output: i32 = ::core::sync::atomic::AtomicI32::into_inner(_self.into_inner()) .into(); output } @@ -110,8 +112,8 @@ impl core::sync::atomic::AtomicI32 { /// 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( + fn new(v: i32) -> Val<::core::sync::atomic::AtomicI32> { + let output: Val<::core::sync::atomic::AtomicI32> = ::core::sync::atomic::AtomicI32::new( v, ) .into(); @@ -124,7 +126,7 @@ impl core::sync::atomic::AtomicI32 { bms_core_path = "bevy_mod_scripting_core", generated )] -impl core::sync::atomic::AtomicI64 { +impl ::core::sync::atomic::AtomicI64 { /// Consumes the atomic and returns the contained value. /// This is safe because passing `self` by value guarantees that no other threads are /// concurrently accessing the atomic data. @@ -134,8 +136,8 @@ impl core::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()) + fn into_inner(_self: Val<::core::sync::atomic::AtomicI64>) -> i64 { + let output: i64 = ::core::sync::atomic::AtomicI64::into_inner(_self.into_inner()) .into(); output } @@ -145,8 +147,8 @@ impl core::sync::atomic::AtomicI64 { /// 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( + fn new(v: i64) -> Val<::core::sync::atomic::AtomicI64> { + let output: Val<::core::sync::atomic::AtomicI64> = ::core::sync::atomic::AtomicI64::new( v, ) .into(); @@ -159,7 +161,7 @@ impl core::sync::atomic::AtomicI64 { bms_core_path = "bevy_mod_scripting_core", generated )] -impl core::sync::atomic::AtomicI8 { +impl ::core::sync::atomic::AtomicI8 { /// Consumes the atomic and returns the contained value. /// This is safe because passing `self` by value guarantees that no other threads are /// concurrently accessing the atomic data. @@ -169,8 +171,8 @@ impl core::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()) + fn into_inner(_self: Val<::core::sync::atomic::AtomicI8>) -> i8 { + let output: i8 = ::core::sync::atomic::AtomicI8::into_inner(_self.into_inner()) .into(); output } @@ -180,8 +182,8 @@ impl core::sync::atomic::AtomicI8 { /// 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( + fn new(v: i8) -> Val<::core::sync::atomic::AtomicI8> { + let output: Val<::core::sync::atomic::AtomicI8> = ::core::sync::atomic::AtomicI8::new( v, ) .into(); @@ -194,7 +196,7 @@ impl core::sync::atomic::AtomicI8 { bms_core_path = "bevy_mod_scripting_core", generated )] -impl core::sync::atomic::AtomicIsize { +impl ::core::sync::atomic::AtomicIsize { /// Consumes the atomic and returns the contained value. /// This is safe because passing `self` by value guarantees that no other threads are /// concurrently accessing the atomic data. @@ -204,8 +206,8 @@ impl core::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( + fn into_inner(_self: Val<::core::sync::atomic::AtomicIsize>) -> isize { + let output: isize = ::core::sync::atomic::AtomicIsize::into_inner( _self.into_inner(), ) .into(); @@ -217,8 +219,8 @@ impl core::sync::atomic::AtomicIsize { /// 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( + fn new(v: isize) -> Val<::core::sync::atomic::AtomicIsize> { + let output: Val<::core::sync::atomic::AtomicIsize> = ::core::sync::atomic::AtomicIsize::new( v, ) .into(); @@ -231,7 +233,7 @@ impl core::sync::atomic::AtomicIsize { bms_core_path = "bevy_mod_scripting_core", generated )] -impl core::sync::atomic::AtomicU16 { +impl ::core::sync::atomic::AtomicU16 { /// Consumes the atomic and returns the contained value. /// This is safe because passing `self` by value guarantees that no other threads are /// concurrently accessing the atomic data. @@ -241,8 +243,8 @@ impl core::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()) + fn into_inner(_self: Val<::core::sync::atomic::AtomicU16>) -> u16 { + let output: u16 = ::core::sync::atomic::AtomicU16::into_inner(_self.into_inner()) .into(); output } @@ -252,8 +254,8 @@ impl core::sync::atomic::AtomicU16 { /// 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( + fn new(v: u16) -> Val<::core::sync::atomic::AtomicU16> { + let output: Val<::core::sync::atomic::AtomicU16> = ::core::sync::atomic::AtomicU16::new( v, ) .into(); @@ -266,7 +268,7 @@ impl core::sync::atomic::AtomicU16 { bms_core_path = "bevy_mod_scripting_core", generated )] -impl core::sync::atomic::AtomicU32 { +impl ::core::sync::atomic::AtomicU32 { /// Consumes the atomic and returns the contained value. /// This is safe because passing `self` by value guarantees that no other threads are /// concurrently accessing the atomic data. @@ -276,8 +278,8 @@ impl core::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()) + fn into_inner(_self: Val<::core::sync::atomic::AtomicU32>) -> u32 { + let output: u32 = ::core::sync::atomic::AtomicU32::into_inner(_self.into_inner()) .into(); output } @@ -287,8 +289,8 @@ impl core::sync::atomic::AtomicU32 { /// 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( + fn new(v: u32) -> Val<::core::sync::atomic::AtomicU32> { + let output: Val<::core::sync::atomic::AtomicU32> = ::core::sync::atomic::AtomicU32::new( v, ) .into(); @@ -301,7 +303,7 @@ impl core::sync::atomic::AtomicU32 { bms_core_path = "bevy_mod_scripting_core", generated )] -impl core::sync::atomic::AtomicU64 { +impl ::core::sync::atomic::AtomicU64 { /// Consumes the atomic and returns the contained value. /// This is safe because passing `self` by value guarantees that no other threads are /// concurrently accessing the atomic data. @@ -311,8 +313,8 @@ impl core::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()) + fn into_inner(_self: Val<::core::sync::atomic::AtomicU64>) -> u64 { + let output: u64 = ::core::sync::atomic::AtomicU64::into_inner(_self.into_inner()) .into(); output } @@ -322,8 +324,8 @@ impl core::sync::atomic::AtomicU64 { /// 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( + fn new(v: u64) -> Val<::core::sync::atomic::AtomicU64> { + let output: Val<::core::sync::atomic::AtomicU64> = ::core::sync::atomic::AtomicU64::new( v, ) .into(); @@ -336,7 +338,7 @@ impl core::sync::atomic::AtomicU64 { bms_core_path = "bevy_mod_scripting_core", generated )] -impl core::sync::atomic::AtomicU8 { +impl ::core::sync::atomic::AtomicU8 { /// Consumes the atomic and returns the contained value. /// This is safe because passing `self` by value guarantees that no other threads are /// concurrently accessing the atomic data. @@ -346,8 +348,8 @@ impl core::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()) + fn into_inner(_self: Val<::core::sync::atomic::AtomicU8>) -> u8 { + let output: u8 = ::core::sync::atomic::AtomicU8::into_inner(_self.into_inner()) .into(); output } @@ -357,8 +359,8 @@ impl core::sync::atomic::AtomicU8 { /// 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( + fn new(v: u8) -> Val<::core::sync::atomic::AtomicU8> { + let output: Val<::core::sync::atomic::AtomicU8> = ::core::sync::atomic::AtomicU8::new( v, ) .into(); @@ -371,7 +373,7 @@ impl core::sync::atomic::AtomicU8 { bms_core_path = "bevy_mod_scripting_core", generated )] -impl core::sync::atomic::AtomicUsize { +impl ::core::sync::atomic::AtomicUsize { /// Consumes the atomic and returns the contained value. /// This is safe because passing `self` by value guarantees that no other threads are /// concurrently accessing the atomic data. @@ -381,8 +383,8 @@ impl core::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( + fn into_inner(_self: Val<::core::sync::atomic::AtomicUsize>) -> usize { + let output: usize = ::core::sync::atomic::AtomicUsize::into_inner( _self.into_inner(), ) .into(); @@ -394,8 +396,8 @@ impl core::sync::atomic::AtomicUsize { /// 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( + fn new(v: usize) -> Val<::core::sync::atomic::AtomicUsize> { + let output: Val<::core::sync::atomic::AtomicUsize> = ::core::sync::atomic::AtomicUsize::new( v, ) .into(); @@ -408,7 +410,7 @@ impl core::sync::atomic::AtomicUsize { bms_core_path = "bevy_mod_scripting_core", generated )] -impl core::time::Duration { +impl ::core::time::Duration { /// Computes the absolute difference between `self` and `other`. /// # Examples /// ``` @@ -417,10 +419,10 @@ impl core::time::Duration { /// assert_eq!(Duration::new(100, 400_000_000).abs_diff(Duration::new(110, 0)), Duration::new(9, 600_000_000)); /// ``` fn abs_diff( - _self: Val<core::time::Duration>, - other: Val<core::time::Duration>, - ) -> Val<core::time::Duration> { - let output: Val<core::time::Duration> = core::time::Duration::abs_diff( + _self: Val<::core::time::Duration>, + other: Val<::core::time::Duration>, + ) -> Val<::core::time::Duration> { + let output: Val<::core::time::Duration> = ::core::time::Duration::abs_diff( _self.into_inner(), other.into_inner(), ) @@ -434,8 +436,8 @@ impl core::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(); + 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`. @@ -445,8 +447,8 @@ impl core::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(); + 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`. @@ -456,8 +458,8 @@ impl core::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(); + 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`. @@ -474,8 +476,8 @@ impl core::time::Duration { /// [`as_secs_f64`]: Duration::as_secs_f64 /// [`as_secs_f32`]: Duration::as_secs_f32 /// [`subsec_nanos`]: Duration::subsec_nanos - fn as_secs(_self: Ref<core::time::Duration>) -> u64 { - let output: u64 = core::time::Duration::as_secs(&_self).into(); + fn as_secs(_self: Ref<::core::time::Duration>) -> u64 { + let output: u64 = ::core::time::Duration::as_secs(&_self).into(); output } /// Returns the number of seconds contained by this `Duration` as `f32`. @@ -486,8 +488,8 @@ impl core::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(); + 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`. @@ -498,8 +500,8 @@ impl core::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(); + fn as_secs_f64(_self: Ref<::core::time::Duration>) -> f64 { + let output: f64 = ::core::time::Duration::as_secs_f64(&_self).into(); output } /// Divides `Duration` by `Duration` and returns `f32`. @@ -511,10 +513,10 @@ impl core::time::Duration { /// assert_eq!(dur1.div_duration_f32(dur2), 0.5); /// ``` fn div_duration_f32( - _self: Val<core::time::Duration>, - rhs: Val<core::time::Duration>, + _self: Val<::core::time::Duration>, + rhs: Val<::core::time::Duration>, ) -> f32 { - let output: f32 = core::time::Duration::div_duration_f32( + let output: f32 = ::core::time::Duration::div_duration_f32( _self.into_inner(), rhs.into_inner(), ) @@ -530,10 +532,10 @@ impl core::time::Duration { /// assert_eq!(dur1.div_duration_f64(dur2), 0.5); /// ``` fn div_duration_f64( - _self: Val<core::time::Duration>, - rhs: Val<core::time::Duration>, + _self: Val<::core::time::Duration>, + rhs: Val<::core::time::Duration>, ) -> f64 { - let output: f64 = core::time::Duration::div_duration_f64( + let output: f64 = ::core::time::Duration::div_duration_f64( _self.into_inner(), rhs.into_inner(), ) @@ -552,8 +554,11 @@ impl core::time::Duration { /// 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( + 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, ) @@ -570,8 +575,11 @@ impl core::time::Duration { /// 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( + 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, ) @@ -586,8 +594,10 @@ impl core::time::Duration { /// 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) + fn from_micros(micros: u64) -> Val<::core::time::Duration> { + let output: Val<::core::time::Duration> = ::core::time::Duration::from_micros( + micros, + ) .into(); output } @@ -599,8 +609,10 @@ impl core::time::Duration { /// 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) + fn from_millis(millis: u64) -> Val<::core::time::Duration> { + let output: Val<::core::time::Duration> = ::core::time::Duration::from_millis( + millis, + ) .into(); output } @@ -616,8 +628,10 @@ impl core::time::Duration { /// 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) + fn from_nanos(nanos: u64) -> Val<::core::time::Duration> { + let output: Val<::core::time::Duration> = ::core::time::Duration::from_nanos( + nanos, + ) .into(); output } @@ -629,8 +643,8 @@ impl core::time::Duration { /// 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) + fn from_secs(secs: u64) -> Val<::core::time::Duration> { + let output: Val<::core::time::Duration> = ::core::time::Duration::from_secs(secs) .into(); output } @@ -658,8 +672,10 @@ impl core::time::Duration { /// 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) + 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 } @@ -687,8 +703,10 @@ impl core::time::Duration { /// 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) + 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 } @@ -704,8 +722,8 @@ impl core::time::Duration { /// 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(); + fn is_zero(_self: Ref<::core::time::Duration>) -> bool { + let output: bool = ::core::time::Duration::is_zero(&_self).into(); output } /// Multiplies `Duration` by `f32`. @@ -718,8 +736,11 @@ impl core::time::Duration { /// 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( + 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, ) @@ -736,8 +757,11 @@ impl core::time::Duration { /// 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( + 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, ) @@ -756,8 +780,11 @@ impl core::time::Duration { /// 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) + fn new(secs: u64, nanos: u32) -> Val<::core::time::Duration> { + let output: Val<::core::time::Duration> = ::core::time::Duration::new( + secs, + nanos, + ) .into(); output } @@ -771,10 +798,10 @@ impl core::time::Duration { /// 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: 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(), ) @@ -791,10 +818,10 @@ impl core::time::Duration { /// assert_eq!(Duration::new(u64::MAX - 1, 0).saturating_mul(2), Duration::MAX); /// ``` fn saturating_mul( - _self: Val<core::time::Duration>, + _self: Val<::core::time::Duration>, rhs: u32, - ) -> Val<core::time::Duration> { - let output: Val<core::time::Duration> = core::time::Duration::saturating_mul( + ) -> Val<::core::time::Duration> { + let output: Val<::core::time::Duration> = ::core::time::Duration::saturating_mul( _self.into_inner(), rhs, ) @@ -810,10 +837,10 @@ impl core::time::Duration { /// 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: 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(), ) @@ -831,8 +858,8 @@ impl core::time::Duration { /// 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(); + 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. @@ -846,8 +873,8 @@ impl core::time::Duration { /// 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(); + 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. @@ -861,8 +888,8 @@ impl core::time::Duration { /// 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(); + fn subsec_nanos(_self: Ref<::core::time::Duration>) -> u32 { + let output: u32 = ::core::time::Duration::subsec_nanos(&_self).into(); output } } @@ -872,7 +899,7 @@ impl core::time::Duration { bms_core_path = "bevy_mod_scripting_core", generated )] -impl std::time::Instant { +impl ::std::time::Instant { /// Returns the amount of time elapsed from another instant to this one, /// or zero duration if that instant is later than this one. /// # Panics @@ -891,10 +918,10 @@ impl std::time::Instant { /// 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: 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(), ) @@ -916,8 +943,8 @@ impl std::time::Instant { /// 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) + fn elapsed(_self: Ref<::std::time::Instant>) -> Val<::core::time::Duration> { + let output: Val<::core::time::Duration> = ::std::time::Instant::elapsed(&_self) .into(); output } @@ -927,8 +954,8 @@ impl std::time::Instant { /// 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(); + 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, @@ -944,10 +971,10 @@ impl std::time::Instant { /// 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: 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(), ) @@ -961,30 +988,14 @@ impl std::time::Instant { bms_core_path = "bevy_mod_scripting_core", generated )] -impl core::ops::RangeFull {} +impl ::core::ops::RangeFull {} #[script_bindings( remote, name = "type_id_functions", bms_core_path = "bevy_mod_scripting_core", generated )] -impl core::any::TypeId { - /// Returns the `TypeId` of the type this generic function has been - /// instantiated with. - /// # Examples - /// ``` - /// use std::any::{Any, TypeId}; - /// fn is_string<T: ?Sized + Any>(_s: &T) -> bool { - /// TypeId::of::<String>() == TypeId::of::<T>() - /// } - /// assert_eq!(is_string(&0), false); - /// assert_eq!(is_string(&"cookie monster".to_string()), true); - /// ``` - fn of() -> Val<core::any::TypeId> { - let output: Val<core::any::TypeId> = core::any::TypeId::of().into(); - output - } -} +impl ::core::any::TypeId {} #[script_bindings( remote, name = "quat_functions", @@ -2256,7 +2267,7 @@ impl bevy::math::Vec3 { bms_core_path = "bevy_mod_scripting_core", generated )] -impl core::net::SocketAddr { +impl ::core::net::SocketAddr { /// Returns [`true`] if the [IP address] in this `SocketAddr` is an /// [`IPv4` address], and [`false`] otherwise. /// [IP address]: IpAddr @@ -2268,8 +2279,8 @@ impl core::net::SocketAddr { /// 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(); + 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 @@ -2283,8 +2294,8 @@ impl core::net::SocketAddr { /// 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(); + 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. @@ -2294,8 +2305,8 @@ impl core::net::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(); + 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. @@ -2306,8 +2317,8 @@ impl core::net::SocketAddr { /// 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(); + 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 } } @@ -23888,21 +23899,22 @@ impl bevy::math::BVec4A { bms_core_path = "bevy_mod_scripting_core", generated )] -impl smol_str::SmolStr { - fn is_empty(_self: Ref<smol_str::SmolStr>) -> bool { - let output: bool = smol_str::SmolStr::is_empty(&_self).into(); +impl ::smol_str::SmolStr { + 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(); + 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(); + 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(); + fn to_string(_self: Ref<::smol_str::SmolStr>) -> ::std::string::String { + let output: ::std::string::String = ::smol_str::SmolStr::to_string(&_self) + .into(); output } } @@ -23912,7 +23924,7 @@ impl smol_str::SmolStr { bms_core_path = "bevy_mod_scripting_core", generated )] -impl uuid::Uuid { +impl ::uuid::Uuid { /// Returns a 128bit value containing the value. /// The bytes in the UUID will be packed directly into a `u128`. /// # Examples @@ -23927,8 +23939,8 @@ impl uuid::Uuid { /// # Ok(()) /// # } /// ``` - fn as_u128(_self: Ref<uuid::Uuid>) -> u128 { - let output: u128 = uuid::Uuid::as_u128(&_self).into(); + fn as_u128(_self: Ref<::uuid::Uuid>) -> u128 { + let output: u128 = ::uuid::Uuid::as_u128(&_self).into(); output } /// Returns two 64bit values containing the value. @@ -23947,8 +23959,8 @@ impl uuid::Uuid { /// # Ok(()) /// # } /// ``` - fn as_u64_pair(_self: Ref<uuid::Uuid>) -> (u64, u64) { - let output: (u64, u64) = uuid::Uuid::as_u64_pair(&_self).into(); + fn as_u64_pair(_self: Ref<::uuid::Uuid>) -> (u64, u64) { + let output: (u64, u64) = ::uuid::Uuid::as_u64_pair(&_self).into(); output } /// A buffer that can be used for `encode_...` calls, that is @@ -23972,7 +23984,7 @@ impl uuid::Uuid { /// ); /// ``` fn encode_buffer() -> [u8; 45] { - let output: [u8; 45] = uuid::Uuid::encode_buffer().into(); + let output: [u8; 45] = ::uuid::Uuid::encode_buffer().into(); output } /// Creates a UUID using the supplied bytes. @@ -23995,8 +24007,8 @@ impl uuid::Uuid { /// # Ok(()) /// # } /// ``` - fn from_bytes(bytes: [u8; 16]) -> Val<uuid::Uuid> { - let output: Val<uuid::Uuid> = uuid::Uuid::from_bytes(bytes).into(); + fn from_bytes(bytes: [u8; 16]) -> Val<::uuid::Uuid> { + let output: Val<::uuid::Uuid> = ::uuid::Uuid::from_bytes(bytes).into(); output } /// Creates a UUID using the supplied bytes in little endian order. @@ -24020,8 +24032,8 @@ impl uuid::Uuid { /// # Ok(()) /// # } /// ``` - fn from_bytes_le(b: [u8; 16]) -> Val<uuid::Uuid> { - let output: Val<uuid::Uuid> = uuid::Uuid::from_bytes_le(b).into(); + fn from_bytes_le(b: [u8; 16]) -> Val<::uuid::Uuid> { + let output: Val<::uuid::Uuid> = ::uuid::Uuid::from_bytes_le(b).into(); output } /// Creates a UUID from a 128bit value. @@ -24036,8 +24048,8 @@ impl uuid::Uuid { /// uuid.hyphenated().to_string(), /// ); /// ``` - fn from_u128(v: u128) -> Val<uuid::Uuid> { - let output: Val<uuid::Uuid> = uuid::Uuid::from_u128(v).into(); + fn from_u128(v: u128) -> Val<::uuid::Uuid> { + let output: Val<::uuid::Uuid> = ::uuid::Uuid::from_u128(v).into(); output } /// Creates a UUID from a 128bit value in little-endian order. @@ -24056,8 +24068,8 @@ impl uuid::Uuid { /// 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(); + 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. @@ -24073,19 +24085,19 @@ impl uuid::Uuid { /// 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) + 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>, + _self: Ref<::uuid::Uuid>, ) -> bevy::reflect::erased_serde::__private::serde::__private::Option<[u8; 6]> { let output: bevy::reflect::erased_serde::__private::serde::__private::Option< [u8; 6], - > = uuid::Uuid::get_node_id(&_self).into(); + > = ::uuid::Uuid::get_node_id(&_self).into(); output } /// Returns the version number of the UUID. @@ -24103,8 +24115,8 @@ impl uuid::Uuid { /// ``` /// # References /// * [Version Field in RFC 9562](https://www.ietf.org/rfc/rfc9562.html#section-4.2) - fn get_version_num(_self: Ref<uuid::Uuid>) -> usize { - let output: usize = uuid::Uuid::get_version_num(&_self).into(); + fn get_version_num(_self: Ref<::uuid::Uuid>) -> usize { + let output: usize = ::uuid::Uuid::get_version_num(&_self).into(); output } /// Consumes self and returns the underlying byte value of the UUID. @@ -24120,18 +24132,18 @@ impl uuid::Uuid { /// 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(); + 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(); + 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(); + fn is_nil(_self: Ref<::uuid::Uuid>) -> bool { + let output: bool = ::uuid::Uuid::is_nil(&_self).into(); output } /// The 'max UUID' (all ones). @@ -24149,8 +24161,8 @@ impl uuid::Uuid { /// uuid.hyphenated().to_string(), /// ); /// ``` - fn max() -> Val<uuid::Uuid> { - let output: Val<uuid::Uuid> = uuid::Uuid::max().into(); + fn max() -> Val<::uuid::Uuid> { + let output: Val<::uuid::Uuid> = ::uuid::Uuid::max().into(); output } /// Creates a random UUID. @@ -24173,8 +24185,8 @@ impl uuid::Uuid { /// * [UUID Version 4 in RFC 9562](https://www.ietf.org/rfc/rfc9562.html#section-5.4) /// [`getrandom`]: https://crates.io/crates/getrandom /// [from_random_bytes]: struct.Builder.html#method.from_random_bytes - fn new_v4() -> Val<uuid::Uuid> { - let output: Val<uuid::Uuid> = uuid::Uuid::new_v4().into(); + fn new_v4() -> Val<::uuid::Uuid> { + let output: Val<::uuid::Uuid> = ::uuid::Uuid::new_v4().into(); output } /// The 'nil UUID' (all zeros). @@ -24192,8 +24204,8 @@ impl uuid::Uuid { /// uuid.hyphenated().to_string(), /// ); /// ``` - fn nil() -> Val<uuid::Uuid> { - let output: Val<uuid::Uuid> = uuid::Uuid::nil().into(); + fn nil() -> Val<::uuid::Uuid> { + let output: Val<::uuid::Uuid> = ::uuid::Uuid::nil().into(); output } /// Returns the bytes of the UUID in little-endian order. @@ -24215,8 +24227,8 @@ impl uuid::Uuid { /// # Ok(()) /// # } /// ``` - fn to_bytes_le(_self: Ref<uuid::Uuid>) -> [u8; 16] { - let output: [u8; 16] = uuid::Uuid::to_bytes_le(&_self).into(); + fn to_bytes_le(_self: Ref<::uuid::Uuid>) -> [u8; 16] { + let output: [u8; 16] = ::uuid::Uuid::to_bytes_le(&_self).into(); output } /// Returns a 128bit little-endian value containing the value. @@ -24239,8 +24251,8 @@ impl uuid::Uuid { /// # Ok(()) /// # } /// ``` - fn to_u128_le(_self: Ref<uuid::Uuid>) -> u128 { - let output: u128 = uuid::Uuid::to_u128_le(&_self).into(); + fn to_u128_le(_self: Ref<::uuid::Uuid>) -> u128 { + let output: u128 = ::uuid::Uuid::to_u128_le(&_self).into(); output } } 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 c13ea6931c..22dfa80414 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 @@ -41,8 +41,8 @@ impl bevy::time::prelude::Timer { /// let timer = Timer::new(Duration::from_secs(1), TimerMode::Once); /// assert_eq!(timer.duration(), Duration::from_secs(1)); /// ``` - fn duration(_self: Ref<bevy::time::prelude::Timer>) -> Val<core::time::Duration> { - let output: Val<core::time::Duration> = bevy::time::prelude::Timer::duration( + 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(); @@ -59,8 +59,8 @@ impl bevy::time::prelude::Timer { /// timer.tick(Duration::from_secs_f32(0.5)); /// assert_eq!(timer.elapsed(), Duration::from_secs_f32(0.5)); /// ``` - fn elapsed(_self: Ref<bevy::time::prelude::Timer>) -> Val<core::time::Duration> { - let output: Val<core::time::Duration> = bevy::time::prelude::Timer::elapsed( + 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(); @@ -178,7 +178,7 @@ impl bevy::time::prelude::Timer { /// Creates a new timer with a given duration. /// See also [`Timer::from_seconds`](Timer::from_seconds). fn new( - duration: Val<core::time::Duration>, + 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( @@ -228,8 +228,8 @@ impl bevy::time::prelude::Timer { /// timer.tick(Duration::from_secs_f32(0.5)); /// assert_eq!(timer.remaining(), Duration::from_secs_f32(1.5)); /// ``` - fn remaining(_self: Ref<bevy::time::prelude::Timer>) -> Val<core::time::Duration> { - let output: Val<core::time::Duration> = bevy::time::prelude::Timer::remaining( + 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(); @@ -278,7 +278,7 @@ impl bevy::time::prelude::Timer { /// ``` fn set_duration( mut _self: Mut<bevy::time::prelude::Timer>, - duration: Val<core::time::Duration>, + duration: Val<::core::time::Duration>, ) -> () { let output: () = bevy::time::prelude::Timer::set_duration( &mut _self, @@ -301,7 +301,7 @@ impl bevy::time::prelude::Timer { /// ``` fn set_elapsed( mut _self: Mut<bevy::time::prelude::Timer>, - time: Val<core::time::Duration>, + time: Val<::core::time::Duration>, ) -> () { let output: () = bevy::time::prelude::Timer::set_elapsed( &mut _self, @@ -402,8 +402,8 @@ impl bevy::time::Stopwatch { /// # See Also /// [`elapsed_secs`](Stopwatch::elapsed_secs) - if an `f32` value is desirable instead. /// [`elapsed_secs_f64`](Stopwatch::elapsed_secs_f64) - if an `f64` is desirable instead. - fn elapsed(_self: Ref<bevy::time::Stopwatch>) -> Val<core::time::Duration> { - let output: Val<core::time::Duration> = bevy::time::Stopwatch::elapsed(&_self) + fn elapsed(_self: Ref<bevy::time::Stopwatch>) -> Val<::core::time::Duration> { + let output: Val<::core::time::Duration> = bevy::time::Stopwatch::elapsed(&_self) .into(); output } @@ -501,7 +501,7 @@ impl bevy::time::Stopwatch { /// ``` fn set_elapsed( mut _self: Mut<bevy::time::Stopwatch>, - time: Val<core::time::Duration>, + time: Val<::core::time::Duration>, ) -> () { let output: () = bevy::time::Stopwatch::set_elapsed( &mut _self, From 6f8a0f31017c4346dd21a9db0118fbee6c6df9c2 Mon Sep 17 00:00:00 2001 From: makspll <makspl17@gmail.com> Date: Sun, 6 Jul 2025 14:34:51 +0100 Subject: [PATCH 07/17] try make xtask work properly again --- check.ps1 | 15 ++++++++++++-- check.sh | 12 ++++++++++- .../src/bindings/world.rs | 13 ++++++------ crates/xtask/src/main.rs | 20 +++++++++++++++++-- 4 files changed, 49 insertions(+), 11 deletions(-) diff --git a/check.ps1 b/check.ps1 index a13d9e24e2..12bc5e2d4b 100644 --- a/check.ps1 +++ b/check.ps1 @@ -1,3 +1,14 @@ #!/usr/bin/env pwsh -Set-Location -Path (Split-Path -Parent $MyInvocation.MyCommand.Definition) -cargo xtask check --ide-mode \ No newline at end of file +$WORKSPACE_DIR = Get-Location + +Set-Location (Split-Path $MyInvocation.MyCommand.Path) + +# dump environment to current ./xtask.log file + +# if the path is in /bevy_api_gen then we run the codegen check + +if ($WORKSPACE_DIR -like "*\bevy_api_gen*") { + cargo xtask check --ide-mode --kind codegen +} else { + cargo xtask check --ide-mode --kind main +} \ No newline at end of file diff --git a/check.sh b/check.sh index 6f8685c45e..c1785ac28c 100755 --- a/check.sh +++ b/check.sh @@ -1,3 +1,13 @@ #!/bin/bash +WORKSPACE_DIR="$PWD" + cd "$(dirname "$0")" -cargo xtask check --ide-mode +# if the path is in /bevy_api_gen then we run the codegen check + +if [[ "$WORKSPACE_DIR" == *"/bevy_api_gen"* ]]; then + cd "$WORKSPACE_DIR" + cargo xtask check --ide-mode --kind codegen +else + cd "$WORKSPACE_DIR" + cargo xtask check --ide-mode --kind main +fi diff --git a/crates/bevy_mod_scripting_core/src/bindings/world.rs b/crates/bevy_mod_scripting_core/src/bindings/world.rs index 7c061d2d19..32a0ec7511 100644 --- a/crates/bevy_mod_scripting_core/src/bindings/world.rs +++ b/crates/bevy_mod_scripting_core/src/bindings/world.rs @@ -448,7 +448,9 @@ impl<'w> WorldAccessGuard<'w> { format!("Could not access component: {}", std::any::type_name::<T>()), { // Safety: we have acquired access for the duration of the closure - f(unsafe { cell.get_entity(entity).map(|e| e.get::<T>()) }.ok().unwrap_or(None)) + f(unsafe { cell.get_entity(entity).map(|e| e.get::<T>()) } + .ok() + .unwrap_or(None)) } ) } @@ -468,7 +470,9 @@ impl<'w> WorldAccessGuard<'w> { format!("Could not access component: {}", std::any::type_name::<T>()), { // Safety: we have acquired access for the duration of the closure - f(unsafe { cell.get_entity(entity).map(|e| e.get_mut::<T>()) }.ok().unwrap_or(None)) + f(unsafe { cell.get_entity(entity).map(|e| e.get_mut::<T>()) } + .ok() + .unwrap_or(None)) } ) } @@ -818,10 +822,7 @@ impl WorldAccessGuard<'_> { // try to construct type from reflect // TODO: it would be nice to have a <dyn PartialReflect>::from_reflect_with_fallback equivalent, that does exactly that // only using this as it's already there and convenient, the clone variant hitting will be confusing to end users - <dyn PartialReflect>::from_reflect_or_clone( - dynamic.as_ref(), - self.clone(), - ) + <dyn PartialReflect>::from_reflect_or_clone(dynamic.as_ref(), self.clone()) } /// Spawns a new entity in the world diff --git a/crates/xtask/src/main.rs b/crates/xtask/src/main.rs index ab1d217a96..ef4049833e 100644 --- a/crates/xtask/src/main.rs +++ b/crates/xtask/src/main.rs @@ -1000,7 +1000,11 @@ impl Xtasks { if ide_mode { clippy_args.push("--message-format=json"); } - clippy_args.extend(vec!["--all-targets", "--", "-D", "warnings"]); + + let keep_going = std::env::var(XTASK_KEEP_GOING).is_ok(); + if !keep_going { + clippy_args.extend(vec!["--all-targets", "--", "-D", "warnings"]); + } Self::run_workspace_command( &app_settings, @@ -1042,7 +1046,11 @@ impl Xtasks { if ide_mode { clippy_args.push("--message-format=json"); } - clippy_args.extend(vec!["--all-targets", "--", "-D", "warnings"]); + + let keep_going = std::env::var(XTASK_KEEP_GOING).is_ok(); + if !keep_going { + clippy_args.extend(vec!["--all-targets", "--", "-D", "warnings"]); + } Self::run_workspace_command( &app_settings, @@ -1218,6 +1226,10 @@ impl Xtasks { } fn check(app_settings: GlobalArgs, ide_mode: bool, kind: CheckKind) -> Result<()> { + if ide_mode && kind == CheckKind::All { + bail!("Ide mode should not be used with 'all' check kind, each workspace needs to have each own individual check, for toolchains to be properly supported"); + } + match kind { CheckKind::All => { let err_main = Self::check_main_workspace(app_settings.clone(), ide_mode); @@ -2024,7 +2036,9 @@ fn try_main() -> Result<()> { pretty_env_logger::formatted_builder() .filter_level(LevelFilter::Info) .init(); + pop_cargo_env()?; + let args = App::try_parse()?; info!( "Default toolchain: {:?}", @@ -2040,6 +2054,8 @@ fn try_main() -> Result<()> { Ok(()) } +const XTASK_KEEP_GOING: &str = "XTASK_KEEP_GOING"; + fn main() { if let Err(e) = try_main() { eprintln!("{e:?}"); From 63c6b01da7d3644f7305374e02a3b840ac070688 Mon Sep 17 00:00:00 2001 From: makspll <makspl17@gmail.com> Date: Sun, 6 Jul 2025 14:36:09 +0100 Subject: [PATCH 08/17] cargo fmt --- crates/bevy_mod_scripting_core/src/context.rs | 5 +- .../bevy_mod_scripting_core/src/extractors.rs | 4 +- .../src/reflection_extensions.rs | 4 +- crates/bevy_mod_scripting_core/src/runtime.rs | 2 +- .../src/derive/mod.rs | 4 +- .../bevy_mod_scripting_functions/src/core.rs | 36 +++++----- crates/bevy_system_reflection/src/lib.rs | 22 +++--- crates/ladfile_builder/src/lib.rs | 72 +++++++++---------- crates/ladfile_builder/src/plugin.rs | 10 +-- .../bevy_mod_scripting_rhai/src/lib.rs | 36 +++++----- .../src/lib.rs | 68 +++++++++--------- .../test_utils/src/test_data.rs | 16 ++--- src/lib.rs | 8 +-- 13 files changed, 141 insertions(+), 146 deletions(-) diff --git a/crates/bevy_mod_scripting_core/src/context.rs b/crates/bevy_mod_scripting_core/src/context.rs index 6d8fe65f6f..b626b759de 100644 --- a/crates/bevy_mod_scripting_core/src/context.rs +++ b/crates/bevy_mod_scripting_core/src/context.rs @@ -6,10 +6,7 @@ use crate::{ script::ScriptId, IntoScriptPluginParams, }; -use bevy::{ - ecs::entity::Entity, - prelude::Resource -}; +use bevy::{ecs::entity::Entity, prelude::Resource}; /// A trait that all script contexts must implement. /// diff --git a/crates/bevy_mod_scripting_core/src/extractors.rs b/crates/bevy_mod_scripting_core/src/extractors.rs index 5b1f0c9d12..41b2281335 100644 --- a/crates/bevy_mod_scripting_core/src/extractors.rs +++ b/crates/bevy_mod_scripting_core/src/extractors.rs @@ -11,10 +11,10 @@ use bevy::{ event::{Event, EventCursor, EventIterator, Events}, query::{Access, AccessConflicts}, storage::SparseSetIndex, - system::{Local, SystemParam, SystemState, SystemParamValidationError}, + system::{Local, SystemParam, SystemParamValidationError, SystemState}, world::World, }, - prelude::Resource + prelude::Resource, }; use fixedbitset::FixedBitSet; diff --git a/crates/bevy_mod_scripting_core/src/reflection_extensions.rs b/crates/bevy_mod_scripting_core/src/reflection_extensions.rs index 1ff32fb425..b1b661b766 100644 --- a/crates/bevy_mod_scripting_core/src/reflection_extensions.rs +++ b/crates/bevy_mod_scripting_core/src/reflection_extensions.rs @@ -4,9 +4,7 @@ use crate::{ bindings::{ReflectReference, WorldGuard}, error::InteropError, }; -use bevy::reflect::{ - PartialReflect, Reflect, ReflectFromReflect, ReflectMut, TypeInfo, -}; +use bevy::reflect::{PartialReflect, Reflect, ReflectFromReflect, ReflectMut, TypeInfo}; use std::{ any::{Any, TypeId}, cmp::max, diff --git a/crates/bevy_mod_scripting_core/src/runtime.rs b/crates/bevy_mod_scripting_core/src/runtime.rs index 0f69158fed..a4d925fbd7 100644 --- a/crates/bevy_mod_scripting_core/src/runtime.rs +++ b/crates/bevy_mod_scripting_core/src/runtime.rs @@ -3,7 +3,7 @@ use crate::{error::ScriptError, IntoScriptPluginParams}; use bevy::{ - ecs::system::{ResMut}, + ecs::system::ResMut, prelude::{Res, Resource}, }; diff --git a/crates/bevy_mod_scripting_derive/src/derive/mod.rs b/crates/bevy_mod_scripting_derive/src/derive/mod.rs index b2b1171376..b0363a2455 100644 --- a/crates/bevy_mod_scripting_derive/src/derive/mod.rs +++ b/crates/bevy_mod_scripting_derive/src/derive/mod.rs @@ -9,8 +9,8 @@ use quote::{quote_spanned, ToTokens}; use syn::{Ident, ImplItemFn, ItemImpl}; pub use self::{ - get_type_dependencies::get_type_dependencies, into_script::into_script, - script_bindings::script_bindings, script_globals::script_globals, typed_through::typed_through, + get_type_dependencies::get_type_dependencies, into_script::into_script, + script_bindings::script_bindings, script_globals::script_globals, typed_through::typed_through, }; pub(crate) fn impl_fn_to_namespace_builder_registration(fun: &ImplItemFn) -> TokenStream { diff --git a/crates/bevy_mod_scripting_functions/src/core.rs b/crates/bevy_mod_scripting_functions/src/core.rs index 82da20e1ad..08963a02d3 100644 --- a/crates/bevy_mod_scripting_functions/src/core.rs +++ b/crates/bevy_mod_scripting_functions/src/core.rs @@ -4,28 +4,28 @@ use std::{collections::HashMap, ops::Deref}; use bevy::prelude::*; use bevy_mod_scripting_core::{ - bindings::{ - function::{ - from::Union, namespace::GlobalNamespace, script_function::DynamicScriptFunctionMut, - }, - script_system::ScriptSystemBuilder, - }, - docgen::info::FunctionInfo, - *, + bindings::{ + function::{ + from::Union, namespace::GlobalNamespace, script_function::DynamicScriptFunctionMut, + }, + script_system::ScriptSystemBuilder, + }, + docgen::info::FunctionInfo, + *, }; use bevy_mod_scripting_derive::script_bindings; use bevy_system_reflection::{ReflectSchedule, ReflectSystem}; use bindings::{ - function::{ - from::{Ref, Val}, - from_ref::FromScriptRef, - into_ref::IntoScriptRef, - script_function::{FunctionCallContext, ScriptFunctionMut}, - }, - pretty_print::DisplayWithWorld, - script_value::ScriptValue, - ReflectReference, ScriptComponentRegistration, ScriptQueryBuilder, ScriptQueryResult, - ScriptResourceRegistration, ScriptTypeRegistration, ThreadWorldContainer, WorldContainer, + function::{ + from::{Ref, Val}, + from_ref::FromScriptRef, + into_ref::IntoScriptRef, + script_function::{FunctionCallContext, ScriptFunctionMut}, + }, + pretty_print::DisplayWithWorld, + script_value::ScriptValue, + ReflectReference, ScriptComponentRegistration, ScriptQueryBuilder, ScriptQueryResult, + ScriptResourceRegistration, ScriptTypeRegistration, ThreadWorldContainer, WorldContainer, }; use error::InteropError; use reflection_extensions::{PartialReflectExt, TypeIdExtensions}; diff --git a/crates/bevy_system_reflection/src/lib.rs b/crates/bevy_system_reflection/src/lib.rs index 473ab74ad6..6184321178 100644 --- a/crates/bevy_system_reflection/src/lib.rs +++ b/crates/bevy_system_reflection/src/lib.rs @@ -2,14 +2,14 @@ use std::{any::TypeId, borrow::Cow, ops::Deref}; use bevy::{ - ecs::{ - schedule::{ - InternedScheduleLabel, InternedSystemSet, NodeId, Schedule, ScheduleLabel, SystemSet, - }, - system::{System, SystemInput}, - }, - platform::collections::{HashMap, HashSet}, - reflect::Reflect, + ecs::{ + schedule::{ + InternedScheduleLabel, InternedSystemSet, NodeId, Schedule, ScheduleLabel, SystemSet, + }, + system::{System, SystemInput}, + }, + platform::collections::{HashMap, HashSet}, + reflect::Reflect, }; use dot_writer::{Attributes, DotWriter}; @@ -469,11 +469,11 @@ pub struct Edge { #[cfg(test)] mod test { - use bevy::{app::Update, ecs::world::World, prelude::IntoScheduleConfigs}; + use bevy::{app::Update, ecs::world::World, prelude::IntoScheduleConfigs}; - use super::*; + use super::*; - fn system_a() {} + fn system_a() {} fn system_b() {} diff --git a/crates/ladfile_builder/src/lib.rs b/crates/ladfile_builder/src/lib.rs index f4e057f7a0..469f249d35 100644 --- a/crates/ladfile_builder/src/lib.rs +++ b/crates/ladfile_builder/src/lib.rs @@ -2,31 +2,31 @@ pub mod plugin; use std::{ - any::TypeId, - borrow::Cow, - cmp::{max, min}, - collections::HashMap, - ffi::OsString, - path::PathBuf, + any::TypeId, + borrow::Cow, + cmp::{max, min}, + collections::HashMap, + ffi::OsString, + path::PathBuf, }; use bevy::{ecs::world::World, platform::collections::HashSet}; use bevy_mod_scripting_core::{ - bindings::{ - function::{ - namespace::Namespace, - script_function::{ - DynamicScriptFunction, DynamicScriptFunctionMut, FunctionCallContext, - }, - }, - ReflectReference, - }, - docgen::{ - info::FunctionInfo, - typed_through::{ThroughTypeInfo, TypedWrapperKind, UntypedWrapperKind}, - TypedThrough, - }, - match_by_type, + bindings::{ + function::{ + namespace::Namespace, + script_function::{ + DynamicScriptFunction, DynamicScriptFunctionMut, FunctionCallContext, + }, + }, + ReflectReference, + }, + docgen::{ + info::FunctionInfo, + typed_through::{ThroughTypeInfo, TypedWrapperKind, UntypedWrapperKind}, + TypedThrough, + }, + match_by_type, }; use bevy_reflect::{NamedField, TypeInfo, TypeRegistry, Typed, UnnamedField}; use ladfile::*; @@ -788,21 +788,21 @@ impl<'t> LadFileBuilder<'t> { #[cfg(test)] mod test { - use bevy_mod_scripting_core::{ - bindings::{ - function::{ - from::Ref, - namespace::{GlobalNamespace, IntoNamespace}, - }, - Union, Val, - }, - docgen::info::GetFunctionInfo, - }; - use bevy_reflect::Reflect; - - use super::*; - - /// normalize line endings etc.. + use bevy_mod_scripting_core::{ + bindings::{ + function::{ + from::Ref, + namespace::{GlobalNamespace, IntoNamespace}, + }, + Union, Val, + }, + docgen::info::GetFunctionInfo, + }; + use bevy_reflect::Reflect; + + use super::*; + + /// normalize line endings etc.. fn normalize_file(file: &mut String) { *file = file.replace("\r\n", "\n"); } diff --git a/crates/ladfile_builder/src/plugin.rs b/crates/ladfile_builder/src/plugin.rs index 89942ae47a..1bc1858b86 100644 --- a/crates/ladfile_builder/src/plugin.rs +++ b/crates/ladfile_builder/src/plugin.rs @@ -3,13 +3,13 @@ use std::path::PathBuf; use bevy::{ - app::{App, Plugin, Startup}, - ecs::{prelude::Resource, reflect::AppTypeRegistry, system::Res, world::World}, + app::{App, Plugin, Startup}, + ecs::{prelude::Resource, reflect::AppTypeRegistry, system::Res, world::World}, }; use bevy_mod_scripting_core::bindings::{ - function::{namespace::Namespace, script_function::AppScriptFunctionRegistry}, - globals::AppScriptGlobalsRegistry, - IntoNamespace, MarkAsCore, MarkAsGenerated, MarkAsSignificant, + function::{namespace::Namespace, script_function::AppScriptFunctionRegistry}, + globals::AppScriptGlobalsRegistry, + IntoNamespace, MarkAsCore, MarkAsGenerated, MarkAsSignificant, }; use ladfile::{default_importance, LadTypeKind}; diff --git a/crates/languages/bevy_mod_scripting_rhai/src/lib.rs b/crates/languages/bevy_mod_scripting_rhai/src/lib.rs index c9dd10bae0..aed318fbf7 100644 --- a/crates/languages/bevy_mod_scripting_rhai/src/lib.rs +++ b/crates/languages/bevy_mod_scripting_rhai/src/lib.rs @@ -3,26 +3,26 @@ use std::ops::Deref; use bevy::{ - app::Plugin, - ecs::{entity::Entity, world::World}, + app::Plugin, + ecs::{entity::Entity, world::World}, }; use bevy_mod_scripting_core::{ - asset::Language, - bindings::{ - function::namespace::Namespace, globals::AppScriptGlobalsRegistry, - script_value::ScriptValue, ThreadWorldContainer, WorldContainer, - }, - context::{ContextBuilder, ContextInitializer, ContextPreHandlingInitializer}, - error::ScriptError, - event::CallbackLabel, - reflection_extensions::PartialReflectExt, - runtime::RuntimeSettings, - script::ScriptId, - IntoScriptPluginParams, ScriptingPlugin, + asset::Language, + bindings::{ + function::namespace::Namespace, globals::AppScriptGlobalsRegistry, + script_value::ScriptValue, ThreadWorldContainer, WorldContainer, + }, + context::{ContextBuilder, ContextInitializer, ContextPreHandlingInitializer}, + error::ScriptError, + event::CallbackLabel, + reflection_extensions::PartialReflectExt, + runtime::RuntimeSettings, + script::ScriptId, + IntoScriptPluginParams, ScriptingPlugin, }; use bindings::{ - reference::{ReservedKeyword, RhaiReflectReference, RhaiStaticReflectReference}, - script_value::{FromDynamic, IntoDynamic}, + reference::{ReservedKeyword, RhaiReflectReference, RhaiStaticReflectReference}, + script_value::{FromDynamic, IntoDynamic}, }; use parking_lot::RwLock; pub use rhai; @@ -300,9 +300,9 @@ pub fn rhai_callback_handler( #[cfg(test)] mod test { - use super::*; + use super::*; - #[test] + #[test] fn test_reload_doesnt_overwrite_old_context() { let runtime = RhaiRuntime::new(Engine::new()); let script_id = ScriptId::from("asd.rhai"); 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 e8fdce8efa..ad08d17d31 100644 --- a/crates/testing_crates/script_integration_test_harness/src/lib.rs +++ b/crates/testing_crates/script_integration_test_harness/src/lib.rs @@ -1,40 +1,40 @@ pub mod test_functions; use std::{ - marker::PhantomData, - path::PathBuf, - time::{Duration, Instant}, + marker::PhantomData, + path::PathBuf, + time::{Duration, Instant}, }; use bevy::{ - app::{Last, Plugin, PostUpdate, Startup, Update}, - asset::{AssetServer, Handle}, - ecs::{ - component::Component, - event::{Event, Events}, - prelude::{Command, Resource}, - schedule::ScheduleConfigs, - system::{BoxedSystem, InfallibleSystemWrapper, IntoSystem, Local, Res, SystemState}, - world::{FromWorld, Mut}, - }, - log::{tracing, tracing::event, Level}, - prelude::{BevyError, Entity, IntoScheduleConfigs, World}, - reflect::{Reflect, TypeRegistry}, + app::{Last, Plugin, PostUpdate, Startup, Update}, + asset::{AssetServer, Handle}, + ecs::{ + component::Component, + event::{Event, Events}, + prelude::{Command, Resource}, + schedule::ScheduleConfigs, + system::{BoxedSystem, InfallibleSystemWrapper, IntoSystem, Local, Res, SystemState}, + world::{FromWorld, Mut}, + }, + log::{tracing, tracing::event, Level}, + prelude::{BevyError, Entity, IntoScheduleConfigs, World}, + reflect::{Reflect, TypeRegistry}, }; use bevy_mod_scripting_core::{ - asset::ScriptAsset, - bindings::{ - pretty_print::DisplayWithWorld, script_value::ScriptValue, CoreScriptGlobalsPlugin, - ReflectAccessId, WorldAccessGuard, WorldGuard, - }, - callback_labels, - commands::CreateOrUpdateScript, - error::{InteropError, ScriptError}, - event::{IntoCallbackLabel, ScriptErrorEvent}, - extractors::{HandlerContext, WithWorldGuard}, - handler::handle_script_errors, - script::ScriptId, - BMSScriptingInfrastructurePlugin, IntoScriptPluginParams, ScriptingPlugin, + asset::ScriptAsset, + bindings::{ + pretty_print::DisplayWithWorld, script_value::ScriptValue, CoreScriptGlobalsPlugin, + ReflectAccessId, WorldAccessGuard, WorldGuard, + }, + callback_labels, + commands::CreateOrUpdateScript, + error::{InteropError, ScriptError}, + event::{IntoCallbackLabel, ScriptErrorEvent}, + extractors::{HandlerContext, WithWorldGuard}, + handler::handle_script_errors, + script::ScriptId, + BMSScriptingInfrastructurePlugin, IntoScriptPluginParams, ScriptingPlugin, }; use bevy_mod_scripting_functions::ScriptFunctionsPlugin; use criterion::{measurement::Measurement, BatchSize}; @@ -133,12 +133,12 @@ pub fn make_test_lua_plugin() -> bevy_mod_scripting_lua::LuaScriptingPlugin { #[cfg(feature = "rhai")] pub fn make_test_rhai_plugin() -> bevy_mod_scripting_rhai::RhaiScriptingPlugin { use bevy_mod_scripting_core::{ - bindings::{ThreadWorldContainer, WorldContainer}, - ConfigureScriptPlugin, + bindings::{ThreadWorldContainer, WorldContainer}, + ConfigureScriptPlugin, }; use bevy_mod_scripting_rhai::{ - rhai::{Dynamic, EvalAltResult, FnPtr, NativeCallContext}, - RhaiScriptingPlugin, + rhai::{Dynamic, EvalAltResult, FnPtr, NativeCallContext}, + RhaiScriptingPlugin, }; RhaiScriptingPlugin::default().add_runtime_initializer(|runtime| { @@ -421,7 +421,7 @@ where F: Fn(&mut P::C, &P::R, &str, &mut criterion::BenchmarkGroup<M>) -> Result<(), String>, { use bevy_mod_scripting_core::bindings::{ - ThreadWorldContainer, WorldAccessGuard, WorldContainer, + ThreadWorldContainer, WorldAccessGuard, WorldContainer, }; let mut app = setup_integration_test(|_, _| {}); diff --git a/crates/testing_crates/test_utils/src/test_data.rs b/crates/testing_crates/test_utils/src/test_data.rs index 6bc5d1eaba..55b4b8daa4 100644 --- a/crates/testing_crates/test_utils/src/test_data.rs +++ b/crates/testing_crates/test_utils/src/test_data.rs @@ -1,12 +1,12 @@ use std::{alloc::Layout, collections::HashMap}; use bevy::{ - asset::AssetPlugin, - diagnostic::DiagnosticsPlugin, - ecs::{component::*, world::World}, - log::LogPlugin, - prelude::*, - reflect::*, + asset::AssetPlugin, + diagnostic::DiagnosticsPlugin, + ecs::{component::*, world::World}, + log::LogPlugin, + prelude::*, + reflect::*, }; /// Test component with Reflect and ReflectComponent registered @@ -360,9 +360,9 @@ pub fn setup_integration_test<F: FnOnce(&mut World, &mut TypeRegistry)>(init: F) #[cfg(test)] mod test { - use super::*; + use super::*; - #[test] + #[test] fn setup_works() { setup_world(|_, _| {}); } diff --git a/src/lib.rs b/src/lib.rs index 5860ae083c..a880540a76 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -1,17 +1,17 @@ #![doc=include_str!("../readme.md")] pub mod core { - pub use bevy_mod_scripting_core::*; + pub use bevy_mod_scripting_core::*; } #[cfg(feature = "lua")] pub mod lua { - pub use bevy_mod_scripting_lua::*; + pub use bevy_mod_scripting_lua::*; } #[cfg(feature = "rhai")] pub mod rhai { - pub use bevy_mod_scripting_rhai::*; + pub use bevy_mod_scripting_rhai::*; } // #[cfg(feature = "rune")] @@ -21,7 +21,7 @@ pub mod rhai { use bevy::app::plugin_group; use bevy_mod_scripting_core::{ - bindings::CoreScriptGlobalsPlugin, BMSScriptingInfrastructurePlugin, + bindings::CoreScriptGlobalsPlugin, BMSScriptingInfrastructurePlugin, }; pub use bevy_mod_scripting_derive::*; pub use bevy_mod_scripting_functions::*; From 2515b5e32edbc80fdf76559d3f0e4afc0cc966f5 Mon Sep 17 00:00:00 2001 From: makspll <makspl17@gmail.com> Date: Sun, 6 Jul 2025 22:26:29 +0100 Subject: [PATCH 09/17] remove xtask changes from PR --- check.ps1 | 22 ++++++++++--------- check.sh | 9 +++++--- {crates/xtask => xtask}/Cargo.toml | 0 {crates/xtask => xtask}/Dockerfile | 0 {crates/xtask => xtask}/chef.Dockerfile | 0 {crates/xtask => xtask}/readme.md | 0 {crates/xtask => xtask}/src/main.rs | 5 +++-- .../templates/settings.json.tera | 7 +++++- 8 files changed, 27 insertions(+), 16 deletions(-) rename {crates/xtask => xtask}/Cargo.toml (100%) rename {crates/xtask => xtask}/Dockerfile (100%) rename {crates/xtask => xtask}/chef.Dockerfile (100%) rename {crates/xtask => xtask}/readme.md (100%) rename {crates/xtask => xtask}/src/main.rs (99%) rename {crates/xtask => xtask}/templates/settings.json.tera (56%) diff --git a/check.ps1 b/check.ps1 index 12bc5e2d4b..d35ceac565 100644 --- a/check.ps1 +++ b/check.ps1 @@ -1,14 +1,16 @@ -#!/usr/bin/env pwsh -$WORKSPACE_DIR = Get-Location - -Set-Location (Split-Path $MyInvocation.MyCommand.Path) - -# dump environment to current ./xtask.log file +#!/bin/bash +WORKSPACE_DIR="$PWD" +cd "$(dirname "$0")" # if the path is in /bevy_api_gen then we run the codegen check -if ($WORKSPACE_DIR -like "*\bevy_api_gen*") { +if [[ "$WORKSPACE_DIR" == *"/bevy_api_gen"* ]]; then + # save output to file as well as stdout and stderr cargo xtask check --ide-mode --kind codegen -} else { - cargo xtask check --ide-mode --kind main -} \ No newline at end of file +elif [[ "$WORKSPACE_DIR" == *"/xtask"* ]]; then + cd "$WORKSPACE_DIR" + cargo clippy --workspace --message-format=json --all-targets -- -D warnings +else + cd "$WORKSPACE_DIR" + cargo xtask check --ide-mode --kind main +fi \ No newline at end of file diff --git a/check.sh b/check.sh index c1785ac28c..fe0c395440 100755 --- a/check.sh +++ b/check.sh @@ -5,9 +5,12 @@ cd "$(dirname "$0")" # if the path is in /bevy_api_gen then we run the codegen check if [[ "$WORKSPACE_DIR" == *"/bevy_api_gen"* ]]; then - cd "$WORKSPACE_DIR" + # save output to file as well as stdout and stderr cargo xtask check --ide-mode --kind codegen -else +elif [[ "$WORKSPACE_DIR" == *"/xtask"* ]]; then + cd "$WORKSPACE_DIR" + cargo check --quiet --workspace --message-format=json --all-targets +else cd "$WORKSPACE_DIR" cargo xtask check --ide-mode --kind main -fi +fi \ No newline at end of file diff --git a/crates/xtask/Cargo.toml b/xtask/Cargo.toml similarity index 100% rename from crates/xtask/Cargo.toml rename to xtask/Cargo.toml diff --git a/crates/xtask/Dockerfile b/xtask/Dockerfile similarity index 100% rename from crates/xtask/Dockerfile rename to xtask/Dockerfile diff --git a/crates/xtask/chef.Dockerfile b/xtask/chef.Dockerfile similarity index 100% rename from crates/xtask/chef.Dockerfile rename to xtask/chef.Dockerfile diff --git a/crates/xtask/readme.md b/xtask/readme.md similarity index 100% rename from crates/xtask/readme.md rename to xtask/readme.md diff --git a/crates/xtask/src/main.rs b/xtask/src/main.rs similarity index 99% rename from crates/xtask/src/main.rs rename to xtask/src/main.rs index ef4049833e..36d2f76e66 100644 --- a/crates/xtask/src/main.rs +++ b/xtask/src/main.rs @@ -821,9 +821,10 @@ impl Xtasks { /// Reads the metadata from the main workspace fn main_workspace_cargo_metadata() -> Result<cargo_metadata::Metadata> { let cargo_manifest_path = std::env::var("MAIN_CARGO_MANIFEST_PATH").unwrap(); - + let path = PathBuf::from(cargo_manifest_path); + let parent_dir = path.parent().unwrap().parent().unwrap().join("Cargo.toml"); let mut cmd = cargo_metadata::MetadataCommand::new(); - cmd.manifest_path(cargo_manifest_path); + cmd.manifest_path(parent_dir.to_string_lossy().to_string()); let out = cmd.exec()?; Ok(out) } diff --git a/crates/xtask/templates/settings.json.tera b/xtask/templates/settings.json.tera similarity index 56% rename from crates/xtask/templates/settings.json.tera rename to xtask/templates/settings.json.tera index e7927a91e7..29f520a33e 100644 --- a/crates/xtask/templates/settings.json.tera +++ b/xtask/templates/settings.json.tera @@ -2,10 +2,15 @@ "rust-analyzer.rustc.source": "discover", "rust-analyzer.linkedProjects": [ "{{ dir }}/crates/bevy_api_gen/Cargo.toml", - "Cargo.toml" + "Cargo.toml", + "xtask/Cargo.toml" ], "rust-analyzer.check.invocationStrategy": "per_workspace", "rust-analyzer.check.overrideCommand": [ "{{ dir }}/check.sh" + ], + "rust-analyzer.cargo.buildScripts.invocationStrategy": "per_workspace", + "rust-analyzer.cargo.buildScripts.overrideCommand": [ + "{{ dir }}/check.sh" ] } \ No newline at end of file From 400cc47b35814ecb14b931f17350c2b97a0f70e4 Mon Sep 17 00:00:00 2001 From: makspll <makspl17@gmail.com> Date: Sun, 6 Jul 2025 22:48:25 +0100 Subject: [PATCH 10/17] clippy --- crates/bevy_api_gen/src/passes/find_methods_and_fields.rs | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/crates/bevy_api_gen/src/passes/find_methods_and_fields.rs b/crates/bevy_api_gen/src/passes/find_methods_and_fields.rs index c0a77e05d6..0d71910d1c 100644 --- a/crates/bevy_api_gen/src/passes/find_methods_and_fields.rs +++ b/crates/bevy_api_gen/src/passes/find_methods_and_fields.rs @@ -7,7 +7,7 @@ use rustc_hir::{ }; use rustc_infer::infer::TyCtxtInferExt; use rustc_middle::ty::{ - AdtKind, AssocKind, FieldDef, FnSig, GenericArgs, Ty, TyCtxt, TyKind, TypingEnv, TypingMode, + AdtKind, AssocKind, FieldDef, FnSig, GenericArgs, Ty, TyCtxt, TyKind, TypingEnv, }; use rustc_span::Symbol; use rustc_trait_selection::infer::InferCtxtExt; @@ -106,9 +106,6 @@ pub(crate) fn find_methods_and_fields(ctxt: &mut BevyCtxt<'_>, _args: &Args) -> return None; } - let inference_ctxt = - ctxt.tcx.infer_ctxt().build(TypingMode::non_body_analysis()); - let trait_did = ctxt .tcx .impl_trait_ref(*impl_did) @@ -238,7 +235,7 @@ pub(crate) fn find_methods_and_fields(ctxt: &mut BevyCtxt<'_>, _args: &Args) -> true } -fn get_function_generics<'tcx>(tcx: TyCtxt<'tcx>, fn_did: DefId, impl_did: DefId) -> Vec<Ty<'tcx>> { +fn get_function_generics(tcx: TyCtxt, fn_did: DefId, impl_did: DefId) -> Vec<Ty> { // the early binder for this fn_sig will contain the generics on the function // we can't use it to iterate them though, for that we need to get the generics via the identity mapping // we want to first instantiate the function with any args in the impl, as those don't affect the standalone function signature From f37f3b20e7e1fe603f700bfd3cabc8e678b1e0f7 Mon Sep 17 00:00:00 2001 From: makspll <makspl17@gmail.com> Date: Mon, 7 Jul 2025 00:18:41 +0100 Subject: [PATCH 11/17] make api gen work with no_std crates better --- crates/bevy_api_gen/.vscode/settings.json | 3 - crates/bevy_api_gen/src/bin/main.rs | 3 + crates/bevy_api_gen/src/context.rs | 52 +- crates/bevy_api_gen/src/feature_graph.rs | 9 +- .../bevy_api_gen/src/passes/cache_traits.rs | 27 +- .../src/passes/find_methods_and_fields.rs | 5 +- .../src/passes/find_trait_impls.rs | 18 +- .../src/bevy_bindings/bevy_ecs.rs | 219 +- .../src/bevy_bindings/bevy_input.rs | 912 ++- .../src/bevy_bindings/bevy_math.rs | 1206 +++- .../src/bevy_bindings/bevy_reflect.rs | 6299 ++++++++++++++++- .../src/bevy_bindings/bevy_time.rs | 106 +- .../src/bevy_bindings/bevy_transform.rs | 120 +- 13 files changed, 8850 insertions(+), 129 deletions(-) delete mode 100644 crates/bevy_api_gen/.vscode/settings.json diff --git a/crates/bevy_api_gen/.vscode/settings.json b/crates/bevy_api_gen/.vscode/settings.json deleted file mode 100644 index 7380220f6c..0000000000 --- a/crates/bevy_api_gen/.vscode/settings.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "rust-analyzer.rustc.source": "discover", -} \ No newline at end of file diff --git a/crates/bevy_api_gen/src/bin/main.rs b/crates/bevy_api_gen/src/bin/main.rs index d435cccb57..62e7427065 100644 --- a/crates/bevy_api_gen/src/bin/main.rs +++ b/crates/bevy_api_gen/src/bin/main.rs @@ -62,6 +62,9 @@ fn main() { .map(|s| s.to_owned()) .collect::<Vec<String>>(); + // log all dependencies + debug!("Enabled dependencies: {}", dependencies.join(",")); + Some(dependencies) } _ => None, diff --git a/crates/bevy_api_gen/src/context.rs b/crates/bevy_api_gen/src/context.rs index 27f8979fda..5d1ab12825 100644 --- a/crates/bevy_api_gen/src/context.rs +++ b/crates/bevy_api_gen/src/context.rs @@ -99,24 +99,25 @@ pub(crate) const DEF_PATHS_GET_TYPE_REGISTRATION: [&str; 2] = [ /// A collection of traits which we search for in the codebase, some are included purely for the methods they provide, /// others are later used for quick lookup of the type "does this type implement Display" etc. -pub(crate) const STD_SOURCE_TRAITS: [&str; 14] = [ +pub(crate) const STD_ONLY_TRAITS: [&str; 1] = ["std::string::ToString"]; + +pub(crate) const STD_OR_CORE_TRAITS: [&str; 13] = [ // PRINTING - "std::fmt::Debug", - "std::fmt::Display", - "std::string::ToString", + "fmt::Debug", + "fmt::Display", // OWNERSHIP - "std::clone::Clone", + "clone::Clone", // OPERATORS - "std::ops::Neg", - "std::ops::Mul", - "std::ops::Add", - "std::ops::Sub", - "std::ops::Div", - "std::ops::Rem", - "std::cmp::Eq", - "std::cmp::PartialEq", - "std::cmp::Ord", // we don't use these fully cuz of the output types not being lua primitives, but keeping it for the future - "std::cmp::PartialOrd", + "ops::Neg", + "ops::Mul", + "ops::Add", + "ops::Sub", + "ops::Div", + "ops::Rem", + "cmp::Eq", + "cmp::PartialEq", + "cmp::Ord", // we don't use these fully cuz of the output types not being lua primitives, but keeping it for the future + "cmp::PartialOrd", ]; /// A collection of common traits stored for quick access. @@ -128,7 +129,8 @@ pub(crate) struct CachedTraits { pub(crate) bevy_reflect_get_type_registration: Option<DefId>, /// Map from def_path_str to DefId of common std traits we work with /// these are the only trait impls from which we generate methods - pub(crate) std_source_traits: HashMap<String, DefId>, + pub(crate) std_only_traits: HashMap<String, DefId>, + pub(crate) std_or_core_traits: HashMap<String, DefId>, } impl CachedTraits { @@ -154,6 +156,24 @@ impl CachedTraits { missing } + pub(crate) fn missing_std_traits(&self) -> Vec<String> { + let mut missing = Vec::new(); + for trait_name in STD_ONLY_TRAITS { + if !self.std_only_traits.contains_key(trait_name) { + missing.push(trait_name.to_owned()); + } + } + for trait_name in STD_OR_CORE_TRAITS { + for prefix in ["std::", "core::"] { + let full_trait_name = format!("{prefix}{trait_name}"); + if !self.std_or_core_traits.contains_key(&full_trait_name) { + missing.push(full_trait_name); + } + } + } + missing + } + // pub(crate) fn has_all_std_source_traits(&self) -> bool { // STD_SOURCE_TRAITS // .iter() diff --git a/crates/bevy_api_gen/src/feature_graph.rs b/crates/bevy_api_gen/src/feature_graph.rs index 4e08c29bf8..e75afd9960 100644 --- a/crates/bevy_api_gen/src/feature_graph.rs +++ b/crates/bevy_api_gen/src/feature_graph.rs @@ -200,7 +200,14 @@ impl FeatureGraph { .workspace_packages() .iter() .map(|p| Self::process_crate(p)) - .collect(); + .collect::<Vec<_>>(); + + // log the workspace crate dependencies + debug!( + "Workspace root: {}, Crates: {}", + workspace_root, + crates.iter().map(|c| format!("{c:?}")).join("\n\n ") + ); Self { workspace_root: workspace_root.to_owned(), diff --git a/crates/bevy_api_gen/src/passes/cache_traits.rs b/crates/bevy_api_gen/src/passes/cache_traits.rs index 8ae7b90ca0..af71b7f4fe 100644 --- a/crates/bevy_api_gen/src/passes/cache_traits.rs +++ b/crates/bevy_api_gen/src/passes/cache_traits.rs @@ -1,11 +1,11 @@ -use log::trace; +use log::{trace, warn}; use rustc_hir::def_id::LOCAL_CRATE; use rustc_middle::ty::TyCtxt; use rustc_span::Symbol; use crate::{ Args, BevyCtxt, DEF_PATHS_BMS_FROM_SCRIPT, DEF_PATHS_BMS_INTO_SCRIPT, - DEF_PATHS_GET_TYPE_REGISTRATION, DEF_PATHS_REFLECT, STD_SOURCE_TRAITS, + DEF_PATHS_GET_TYPE_REGISTRATION, DEF_PATHS_REFLECT, STD_ONLY_TRAITS, STD_OR_CORE_TRAITS, }; fn dump_traits(tcx: &TyCtxt) -> String { @@ -29,11 +29,19 @@ pub(crate) fn cache_traits(ctxt: &mut BevyCtxt<'_>, _args: &Args) -> bool { } else if DEF_PATHS_GET_TYPE_REGISTRATION.contains(&def_path_str.as_str()) { trace!("found GetTypeRegistration trait def id: {trait_did:?}"); ctxt.cached_traits.bevy_reflect_get_type_registration = Some(trait_did); - } else if STD_SOURCE_TRAITS.contains(&def_path_str.as_str()) { - trace!("found misc trait def id: {trait_did:?}"); + } else if STD_ONLY_TRAITS.contains(&def_path_str.as_str()) { + trace!("found std trait def id: {trait_did:?}"); ctxt.cached_traits - .std_source_traits + .std_only_traits .insert(def_path_str.to_string(), trait_did); + } else if let Some(full_name) = STD_OR_CORE_TRAITS.iter().find(|name| { + (Some(**name) == def_path_str.strip_prefix("core::")) + || (Some(**name) == def_path_str.strip_prefix("std::")) + }) { + trace!("found core trait def id: {trait_did:?}"); + ctxt.cached_traits + .std_or_core_traits + .insert(full_name.to_string(), trait_did); } else if DEF_PATHS_BMS_INTO_SCRIPT.contains(&def_path_str.as_str()) { trace!("found IntoScript trait def id: {trait_did:?}"); ctxt.cached_traits.bms_into_script = Some(trait_did); @@ -63,6 +71,15 @@ pub(crate) fn cache_traits(ctxt: &mut BevyCtxt<'_>, _args: &Args) -> bool { ); } + let missing_std_traits = ctxt.cached_traits.missing_std_traits(); + if !missing_std_traits.is_empty() { + warn!( + "Could not find std traits: [{}] in crate: {}, this might lead to missing methods in the generated API.", + missing_std_traits.join(", "), + tcx.crate_name(LOCAL_CRATE), + ); + } + // some crates specifically do not have std in scope via `#![no_std]` which means we do not care about these traits let has_std = tcx .get_attrs_by_path(LOCAL_CRATE.as_def_id(), &[Symbol::intern("no_std")]) diff --git a/crates/bevy_api_gen/src/passes/find_methods_and_fields.rs b/crates/bevy_api_gen/src/passes/find_methods_and_fields.rs index 0d71910d1c..de59f5f973 100644 --- a/crates/bevy_api_gen/src/passes/find_methods_and_fields.rs +++ b/crates/bevy_api_gen/src/passes/find_methods_and_fields.rs @@ -110,13 +110,16 @@ pub(crate) fn find_methods_and_fields(ctxt: &mut BevyCtxt<'_>, _args: &Args) -> .tcx .impl_trait_ref(*impl_did) .map(|tr| tr.skip_binder().def_id); + let trait_name = trait_did + .map(|td| ctxt.tcx.item_name(td).to_ident_string()) + .unwrap_or_else(|| "None".to_string()); let fn_name = assoc_item.name.to_ident_string(); let has_self = assoc_item.fn_has_self_parameter; let fn_did = assoc_item.def_id; trace!( - "Processing function: '{fn_name}' on type: `{}`", + "Processing function: '{fn_name}' on type: `{}` on trait: `{trait_name}`", ctxt.tcx.item_name(def_id) ); diff --git a/crates/bevy_api_gen/src/passes/find_trait_impls.rs b/crates/bevy_api_gen/src/passes/find_trait_impls.rs index 408ba7c667..3913ab8296 100644 --- a/crates/bevy_api_gen/src/passes/find_trait_impls.rs +++ b/crates/bevy_api_gen/src/passes/find_trait_impls.rs @@ -53,11 +53,17 @@ pub(crate) fn find_trait_impls(ctxt: &mut BevyCtxt<'_>, _args: &Args) -> bool { retaining }); + let std_traits = ctxt + .cached_traits + .std_only_traits + .values() + .chain(ctxt.cached_traits.std_or_core_traits.values()) + .collect::<Vec<_>>(); + log::trace!( "Looking for impls of the traits: [{}]", - ctxt.cached_traits - .std_source_traits - .values() + std_traits + .iter() .map(|d| tcx.def_path_str(*d)) .collect::<Vec<_>>() .join(", ") @@ -66,10 +72,10 @@ pub(crate) fn find_trait_impls(ctxt: &mut BevyCtxt<'_>, _args: &Args) -> bool { for (reflect_ty_did, type_ctxt) in ctxt.reflect_types.iter_mut() { let mut impls = Vec::default(); - for trait_did in ctxt.cached_traits.std_source_traits.values() { - let matching_impls = type_impl_of_trait(tcx, *trait_did, reflect_ty_did); + for &&trait_did in &std_traits { + let matching_impls = type_impl_of_trait(tcx, trait_did, reflect_ty_did); if !matching_impls.is_empty() { - impls.push((*trait_did, matching_impls)); + impls.push((trait_did, matching_impls)); } } diff --git a/crates/bevy_mod_scripting_functions/src/bevy_bindings/bevy_ecs.rs b/crates/bevy_mod_scripting_functions/src/bevy_bindings/bevy_ecs.rs index c752fdbf71..ebd8b65a0f 100644 --- a/crates/bevy_mod_scripting_functions/src/bevy_bindings/bevy_ecs.rs +++ b/crates/bevy_mod_scripting_functions/src/bevy_bindings/bevy_ecs.rs @@ -19,6 +19,23 @@ pub struct BevyEcsScriptingPlugin; 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 + } + 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 + } /// 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 @@ -78,6 +95,32 @@ impl bevy::ecs::entity::Entity { 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 + } + 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 + } + 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 + } /// 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( @@ -104,6 +147,23 @@ impl bevy::ecs::hierarchy::ChildOf { 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 + } + 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>, @@ -125,7 +185,22 @@ impl bevy::ecs::hierarchy::Children { bms_core_path = "bevy_mod_scripting_core", generated )] -impl bevy::ecs::name::Name {} +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", @@ -161,6 +236,32 @@ impl bevy::ecs::world::OnReplace {} 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()) @@ -220,6 +321,30 @@ impl bevy::ecs::entity_disabling::DefaultQueryFilters { 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(); @@ -261,6 +386,15 @@ impl bevy::ecs::component::Tick { 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( @@ -331,6 +465,34 @@ impl bevy::ecs::component::ComponentTicks { 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) @@ -369,6 +531,25 @@ impl bevy::ecs::entity::hash_set::EntityHashSet { 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`]. @@ -407,21 +588,51 @@ impl bevy::ecs::identifier::Identifier { bms_core_path = "bevy_mod_scripting_core", generated )] -impl bevy::ecs::entity::EntityHash {} +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 + } +} #[script_bindings( remote, name = "disabled_functions", bms_core_path = "bevy_mod_scripting_core", generated )] -impl bevy::ecs::entity_disabling::Disabled {} +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 + } +} #[script_bindings( remote, name = "removed_component_entity_functions", bms_core_path = "bevy_mod_scripting_core", generated )] -impl bevy::ecs::removal_detection::RemovedComponentEntity {} +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 + } +} #[script_bindings( remote, name = "system_id_marker_functions", 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 bd79805d39..886412123b 100644 --- a/crates/bevy_mod_scripting_functions/src/bevy_bindings/bevy_input.rs +++ b/crates/bevy_mod_scripting_functions/src/bevy_bindings/bevy_input.rs @@ -107,91 +107,398 @@ impl bevy::input::gamepad::Gamepad { bms_core_path = "bevy_mod_scripting_core", generated )] -impl bevy::input::gamepad::GamepadAxis {} +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 {} +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 {} +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 {} +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 {} +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 {} +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 {} +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 {} +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 {} +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 {} +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 {} +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 {} +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 {} +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", @@ -199,6 +506,25 @@ impl bevy::input::mouse::MouseWheel {} 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>, @@ -221,6 +547,25 @@ impl bevy::input::gamepad::GamepadAxisChangedEvent { 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>, @@ -245,6 +590,34 @@ impl bevy::input::gamepad::GamepadButtonChangedEvent { 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>, @@ -266,7 +639,27 @@ impl bevy::input::gamepad::GamepadButtonStateChangedEvent { bms_core_path = "bevy_mod_scripting_core", generated )] -impl bevy::input::gamepad::GamepadConnection {} +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", @@ -274,6 +667,15 @@ impl bevy::input::gamepad::GamepadConnection {} 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( @@ -290,6 +692,16 @@ impl bevy::input::gamepad::GamepadConnectionEvent { .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>, @@ -309,14 +721,63 @@ impl bevy::input::gamepad::GamepadConnectionEvent { bms_core_path = "bevy_mod_scripting_core", generated )] -impl bevy::input::gamepad::GamepadEvent {} +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 {} +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", @@ -324,6 +785,15 @@ impl bevy::input::gamepad::GamepadInput {} 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>, @@ -342,6 +812,25 @@ impl bevy::input::gamepad::GamepadRumbleRequest { 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>, @@ -364,6 +853,25 @@ impl bevy::input::gamepad::RawGamepadAxisChangedEvent { 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>, @@ -385,35 +893,135 @@ impl bevy::input::gamepad::RawGamepadButtonChangedEvent { bms_core_path = "bevy_mod_scripting_core", generated )] -impl bevy::input::gamepad::RawGamepadEvent {} +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 {} +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 {} +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 {} +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 {} +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", @@ -421,6 +1029,30 @@ impl bevy::input::gestures::PanGesture {} 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(); @@ -434,6 +1066,25 @@ impl bevy::input::ButtonState { 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 { @@ -511,6 +1162,15 @@ impl bevy::input::gamepad::AxisSettings { .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) @@ -523,6 +1183,16 @@ impl bevy::input::gamepad::AxisSettings { .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) @@ -621,7 +1291,17 @@ impl bevy::input::gamepad::AxisSettings { bms_core_path = "bevy_mod_scripting_core", generated )] -impl bevy::input::gamepad::ButtonAxisSettings {} +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", @@ -629,6 +1309,25 @@ impl bevy::input::gamepad::ButtonAxisSettings {} 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( @@ -656,42 +1355,199 @@ impl bevy::input::gamepad::GamepadRumbleIntensity { bms_core_path = "bevy_mod_scripting_core", generated )] -impl bevy::input::keyboard::Key {} +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 {} +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 {} +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 {} +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 {} +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 {} +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 ::bevy::app::Plugin for BevyInputScriptingPlugin { fn build(&self, app: &mut ::bevy::prelude::App) { let mut world = app.world_mut(); 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 c4b3745ac4..29c99b82c2 100644 --- a/crates/bevy_mod_scripting_functions/src/bevy_bindings/bevy_math.rs +++ b/crates/bevy_mod_scripting_functions/src/bevy_bindings/bevy_math.rs @@ -19,6 +19,23 @@ pub struct BevyMathScriptingPlugin; 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( @@ -55,6 +72,37 @@ impl bevy::math::AspectRatio { 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( @@ -81,6 +129,39 @@ impl bevy::math::CompassOctant { 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( @@ -107,6 +188,23 @@ impl bevy::math::CompassQuadrant { 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( @@ -166,6 +264,36 @@ impl bevy::math::Isometry2d { .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>, @@ -198,6 +326,23 @@ impl bevy::math::Isometry2d { 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>, @@ -238,6 +383,46 @@ impl bevy::math::Isometry3d { .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, @@ -246,6 +431,20 @@ impl bevy::math::Isometry3d { 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>, @@ -292,6 +491,20 @@ impl bevy::math::Ray2d { 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>, @@ -362,6 +575,13 @@ impl bevy::math::Rot2 { 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. @@ -381,6 +601,13 @@ impl 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. @@ -452,6 +679,38 @@ impl bevy::math::Rot2 { 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`. @@ -598,6 +857,23 @@ impl bevy::math::prelude::Dir2 { .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. @@ -621,6 +897,23 @@ impl bevy::math::prelude::Dir2 { .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`. @@ -737,6 +1030,23 @@ impl bevy::math::prelude::Dir3 { .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 @@ -783,6 +1093,23 @@ impl bevy::math::prelude::Dir3 { .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`. @@ -849,6 +1176,23 @@ impl bevy::math::prelude::Dir3A { .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. @@ -873,6 +1217,23 @@ impl bevy::math::prelude::Dir3A { .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`. @@ -949,6 +1310,13 @@ impl bevy::math::prelude::IRect { .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. @@ -967,6 +1335,13 @@ impl bevy::math::prelude::IRect { .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 /// ``` @@ -987,6 +1362,16 @@ impl bevy::math::prelude::IRect { .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. @@ -1274,6 +1659,13 @@ impl bevy::math::prelude::Rect { .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 /// ``` @@ -1294,6 +1686,16 @@ impl bevy::math::prelude::Rect { .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. @@ -1587,6 +1989,13 @@ impl bevy::math::prelude::URect { .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. @@ -1605,6 +2014,13 @@ impl bevy::math::prelude::URect { .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 /// ``` @@ -1625,6 +2041,16 @@ impl bevy::math::prelude::URect { .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. @@ -1895,6 +2321,15 @@ impl bevy::math::bounding::Aabb2d { .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. @@ -1909,6 +2344,16 @@ impl bevy::math::bounding::Aabb2d { .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>, @@ -1939,9 +2384,18 @@ impl bevy::math::bounding::BoundingCircle { .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 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>, @@ -1953,6 +2407,16 @@ impl bevy::math::bounding::BoundingCircle { .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>, @@ -1978,6 +2442,15 @@ impl bevy::math::bounding::BoundingCircle { 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. @@ -1997,6 +2470,16 @@ impl bevy::math::primitives::Circle { 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( @@ -2013,6 +2496,15 @@ impl bevy::math::primitives::Circle { 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. @@ -2033,6 +2525,16 @@ impl bevy::math::primitives::Annulus { 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, @@ -2086,6 +2588,25 @@ impl bevy::math::primitives::Arc2d { .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( @@ -2192,6 +2713,25 @@ impl bevy::math::primitives::Arc2d { 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( @@ -2254,6 +2794,25 @@ impl bevy::math::primitives::CircularSector { .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, @@ -2369,6 +2928,25 @@ impl bevy::math::primitives::CircularSegment { .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, @@ -2449,6 +3027,15 @@ impl bevy::math::primitives::CircularSegment { 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. @@ -2456,6 +3043,16 @@ impl bevy::math::primitives::Ellipse { 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 { @@ -2500,7 +3097,27 @@ impl bevy::math::primitives::Ellipse { bms_core_path = "bevy_mod_scripting_core", generated )] -impl bevy::math::primitives::Line2d {} +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", @@ -2508,6 +3125,25 @@ impl bevy::math::primitives::Line2d {} 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. @@ -2528,6 +3164,15 @@ impl bevy::math::primitives::Plane2d { 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. @@ -2542,6 +3187,16 @@ impl bevy::math::primitives::Rectangle { .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>, @@ -2607,6 +3262,25 @@ impl bevy::math::primitives::RegularPolygon { .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 @@ -2698,6 +3372,15 @@ impl bevy::math::primitives::Rhombus { 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. @@ -2712,6 +3395,16 @@ impl bevy::math::primitives::Rhombus { .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( @@ -2779,6 +3472,15 @@ impl bevy::math::primitives::Segment2d { .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 @@ -2792,6 +3494,16 @@ impl bevy::math::primitives::Segment2d { .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( @@ -3017,6 +3729,25 @@ impl bevy::math::primitives::Segment2d { 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(); @@ -3083,6 +3814,25 @@ impl bevy::math::bounding::Aabb3d { .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, @@ -3101,6 +3851,25 @@ impl bevy::math::bounding::BoundingSphere { .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(); @@ -3114,6 +3883,15 @@ impl bevy::math::bounding::BoundingSphere { 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. @@ -3133,6 +3911,16 @@ impl bevy::math::primitives::Sphere { 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( @@ -3149,6 +3937,15 @@ impl bevy::math::primitives::Sphere { 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. @@ -3163,6 +3960,16 @@ impl bevy::math::primitives::Cuboid { .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>, @@ -3241,6 +4048,25 @@ impl bevy::math::primitives::Cylinder { 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 { @@ -3264,6 +4090,25 @@ impl bevy::math::primitives::Cylinder { 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( @@ -3307,6 +4152,25 @@ impl bevy::math::primitives::Cone { 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 { @@ -3335,7 +4199,27 @@ impl bevy::math::primitives::Cone { bms_core_path = "bevy_mod_scripting_core", generated )] -impl bevy::math::primitives::ConicalFrustum {} +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", @@ -3343,6 +4227,25 @@ impl bevy::math::primitives::ConicalFrustum {} 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 @@ -3408,7 +4311,27 @@ impl bevy::math::primitives::InfinitePlane3d { bms_core_path = "bevy_mod_scripting_core", generated )] -impl bevy::math::primitives::Line3d {} +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", @@ -3436,6 +4359,15 @@ impl bevy::math::primitives::Segment3d { .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 @@ -3449,6 +4381,16 @@ impl bevy::math::primitives::Segment3d { .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( @@ -3626,6 +4568,25 @@ impl bevy::math::primitives::Segment3d { 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` @@ -3681,6 +4642,25 @@ impl bevy::math::primitives::Triangle3d { .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(); @@ -3760,6 +4740,15 @@ impl bevy::math::bounding::RayCast2d { .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>, @@ -3816,6 +4805,15 @@ impl bevy::math::bounding::AabbCast2d { .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>, @@ -3866,6 +4864,15 @@ impl bevy::math::bounding::BoundingCircleCast { .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>, @@ -3916,6 +4923,15 @@ impl bevy::math::bounding::RayCast3d { .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>, @@ -3970,6 +4986,15 @@ impl bevy::math::bounding::AabbCast3d { .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>, @@ -3992,6 +5017,15 @@ impl bevy::math::bounding::AabbCast3d { 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>, @@ -4035,6 +5069,15 @@ impl bevy::math::curve::interval::Interval { .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( @@ -4063,6 +5106,16 @@ impl bevy::math::curve::interval::Interval { .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( @@ -4111,7 +5164,57 @@ impl bevy::math::curve::interval::Interval { bms_core_path = "bevy_mod_scripting_core", generated )] -impl bevy::math::FloatOrd {} +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", @@ -4119,6 +5222,25 @@ impl bevy::math::FloatOrd {} 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. @@ -4153,6 +5275,25 @@ impl bevy::math::primitives::Tetrahedron { .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>, @@ -4185,14 +5326,61 @@ impl bevy::math::primitives::Tetrahedron { bms_core_path = "bevy_mod_scripting_core", generated )] -impl bevy::math::curve::easing::EaseFunction {} +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 {} +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 ::bevy::app::Plugin for BevyMathScriptingPlugin { fn build(&self, app: &mut ::bevy::prelude::App) { let mut world = app.world_mut(); 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 439b7a4e6b..5db17464fc 100644 --- a/crates/bevy_mod_scripting_functions/src/bevy_bindings/bevy_reflect.rs +++ b/crates/bevy_mod_scripting_functions/src/bevy_bindings/bevy_reflect.rs @@ -429,6 +429,16 @@ impl ::core::time::Duration { .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 /// ``` @@ -504,6 +514,27 @@ impl ::core::time::Duration { 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 /// ``` @@ -586,6 +617,16 @@ impl ::core::time::Duration { .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 /// ``` @@ -726,6 +767,13 @@ impl ::core::time::Duration { 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. @@ -847,6 +895,16 @@ impl ::core::time::Duration { .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 @@ -900,6 +958,33 @@ impl ::core::time::Duration { 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 @@ -948,6 +1033,13 @@ impl ::std::time::Instant { .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 /// ``` @@ -981,6 +1073,33 @@ impl ::std::time::Instant { .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, + >>::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, + >>::sub(_self.into_inner(), other.into_inner()) + .into(); + output + } } #[script_bindings( remote, @@ -988,14 +1107,61 @@ impl ::std::time::Instant { bms_core_path = "bevy_mod_scripting_core", generated )] -impl ::core::ops::RangeFull {} +impl ::core::ops::RangeFull { + fn assert_receiver_is_total_eq(_self: Ref<::core::ops::RangeFull>) -> () { + let output: () = <::core::ops::RangeFull as ::core::cmp::Eq>::assert_receiver_is_total_eq( + &_self, + ) + .into(); + output + } + fn clone(_self: Ref<::core::ops::RangeFull>) -> Val<::core::ops::RangeFull> { + let output: Val<::core::ops::RangeFull> = <::core::ops::RangeFull as bevy::reflect::erased_serde::__private::serde::__private::Clone>::clone( + &_self, + ) + .into(); + output + } + fn eq( + _self: Ref<::core::ops::RangeFull>, + other: Ref<::core::ops::RangeFull>, + ) -> bool { + let output: bool = <::core::ops::RangeFull as ::core::cmp::PartialEq< + ::core::ops::RangeFull, + >>::eq(&_self, &other) + .into(); + output + } +} #[script_bindings( remote, name = "type_id_functions", bms_core_path = "bevy_mod_scripting_core", generated )] -impl ::core::any::TypeId {} +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, + >>::eq(&_self, &other) + .into(); + output + } +} #[script_bindings( remote, name = "quat_functions", @@ -1023,6 +1189,20 @@ impl bevy::math::Quat { .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<bevy::math::Quat>, + rhs: Val<bevy::math::Quat>, + ) -> Val<bevy::math::Quat> { + let output: Val<bevy::math::Quat> = <bevy::math::Quat as ::core::ops::Add< + bevy::math::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. @@ -1043,6 +1223,13 @@ impl bevy::math::Quat { .into(); output } + fn clone(_self: Ref<bevy::math::Quat>) -> Val<bevy::math::Quat> { + let output: Val<bevy::math::Quat> = <bevy::math::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<bevy::math::Quat>) -> Val<bevy::math::Quat> { @@ -1052,6 +1239,15 @@ impl bevy::math::Quat { .into(); output } + /// Divides a quaternion by a scalar value. + /// The quotient is not guaranteed to be normalized. + fn div(_self: Val<bevy::math::Quat>, rhs: f32) -> Val<bevy::math::Quat> { + let output: Val<bevy::math::Quat> = <bevy::math::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<bevy::math::Quat>, rhs: Val<bevy::math::Quat>) -> f32 { @@ -1059,6 +1255,13 @@ impl bevy::math::Quat { .into(); output } + fn eq(_self: Ref<bevy::math::Quat>, rhs: Ref<bevy::math::Quat>) -> bool { + let output: bool = <bevy::math::Quat as ::core::cmp::PartialEq< + bevy::math::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. @@ -1312,6 +1515,54 @@ impl bevy::math::Quat { } /// 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<bevy::math::Quat>, + rhs: Val<bevy::math::Quat>, + ) -> Val<bevy::math::Quat> { + let output: Val<bevy::math::Quat> = <bevy::math::Quat as ::core::ops::Mul< + bevy::math::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<bevy::math::Quat>, + rhs: Val<bevy::math::Vec3>, + ) -> Val<bevy::math::Vec3> { + let output: Val<bevy::math::Vec3> = <bevy::math::Quat as ::core::ops::Mul< + bevy::math::Vec3, + >>::mul(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + fn mul( + _self: Val<bevy::math::Quat>, + rhs: Val<bevy::math::Vec3A>, + ) -> Val<bevy::math::Vec3A> { + let output: Val<bevy::math::Vec3A> = <bevy::math::Quat as ::core::ops::Mul< + bevy::math::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<bevy::math::Quat>, rhs: f32) -> Val<bevy::math::Quat> { + let output: Val<bevy::math::Quat> = <bevy::math::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. @@ -1352,6 +1603,13 @@ impl bevy::math::Quat { .into(); output } + fn neg(_self: Val<bevy::math::Quat>) -> Val<bevy::math::Quat> { + let output: Val<bevy::math::Quat> = <bevy::math::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 @@ -1402,6 +1660,18 @@ impl bevy::math::Quat { .into(); output } + /// Subtracts the `rhs` quaternion from `self`. + /// The difference is not guaranteed to be normalized. + fn sub( + _self: Val<bevy::math::Quat>, + rhs: Val<bevy::math::Quat>, + ) -> Val<bevy::math::Quat> { + let output: Val<bevy::math::Quat> = <bevy::math::Quat as ::core::ops::Sub< + bevy::math::Quat, + >>::sub(_self.into_inner(), rhs.into_inner()) + .into(); + output + } /// `[x, y, z, w]` fn to_array(_self: Ref<bevy::math::Quat>) -> [f32; 4] { let output: [f32; 4] = bevy::math::Quat::to_array(&_self).into(); @@ -1467,6 +1737,33 @@ impl bevy::math::Vec3 { .into(); output } + fn add( + _self: Val<bevy::math::Vec3>, + rhs: Ref<bevy::math::Vec3>, + ) -> Val<bevy::math::Vec3> { + let output: Val<bevy::math::Vec3> = <bevy::math::Vec3 as ::core::ops::Add< + &bevy::math::Vec3, + >>::add(_self.into_inner(), &rhs) + .into(); + output + } + fn add( + _self: Val<bevy::math::Vec3>, + rhs: Val<bevy::math::Vec3>, + ) -> Val<bevy::math::Vec3> { + let output: Val<bevy::math::Vec3> = <bevy::math::Vec3 as ::core::ops::Add< + bevy::math::Vec3, + >>::add(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + fn add(_self: Val<bevy::math::Vec3>, rhs: f32) -> Val<bevy::math::Vec3> { + let output: Val<bevy::math::Vec3> = <bevy::math::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<bevy::math::Vec3>, rhs: Val<bevy::math::Vec3>) -> f32 { @@ -1616,6 +1913,13 @@ impl bevy::math::Vec3 { .into(); output } + fn clone(_self: Ref<bevy::math::Vec3>) -> Val<bevy::math::Vec3> { + let output: Val<bevy::math::Vec3> = <bevy::math::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 @@ -1751,6 +2055,33 @@ impl bevy::math::Vec3 { .into(); output } + fn div( + _self: Val<bevy::math::Vec3>, + rhs: Ref<bevy::math::Vec3>, + ) -> Val<bevy::math::Vec3> { + let output: Val<bevy::math::Vec3> = <bevy::math::Vec3 as ::core::ops::Div< + &bevy::math::Vec3, + >>::div(_self.into_inner(), &rhs) + .into(); + output + } + fn div( + _self: Val<bevy::math::Vec3>, + rhs: Val<bevy::math::Vec3>, + ) -> Val<bevy::math::Vec3> { + let output: Val<bevy::math::Vec3> = <bevy::math::Vec3 as ::core::ops::Div< + bevy::math::Vec3, + >>::div(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + fn div(_self: Val<bevy::math::Vec3>, rhs: f32) -> Val<bevy::math::Vec3> { + let output: Val<bevy::math::Vec3> = <bevy::math::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<bevy::math::Vec3>, @@ -1793,6 +2124,13 @@ impl bevy::math::Vec3 { let output: f32 = bevy::math::Vec3::element_sum(_self.into_inner()).into(); output } + fn eq(_self: Ref<bevy::math::Vec3>, other: Ref<bevy::math::Vec3>) -> bool { + let output: bool = <bevy::math::Vec3 as ::core::cmp::PartialEq< + bevy::math::Vec3, + >>::eq(&_self, &other) + .into(); + output + } /// Returns a vector containing `e^self` (the exponential function) for each element of /// `self`. fn exp(_self: Val<bevy::math::Vec3>) -> Val<bevy::math::Vec3> { @@ -1987,6 +2325,33 @@ impl bevy::math::Vec3 { .into(); output } + fn mul( + _self: Val<bevy::math::Vec3>, + rhs: Ref<bevy::math::Vec3>, + ) -> Val<bevy::math::Vec3> { + let output: Val<bevy::math::Vec3> = <bevy::math::Vec3 as ::core::ops::Mul< + &bevy::math::Vec3, + >>::mul(_self.into_inner(), &rhs) + .into(); + output + } + fn mul( + _self: Val<bevy::math::Vec3>, + rhs: Val<bevy::math::Vec3>, + ) -> Val<bevy::math::Vec3> { + let output: Val<bevy::math::Vec3> = <bevy::math::Vec3 as ::core::ops::Mul< + bevy::math::Vec3, + >>::mul(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + fn mul(_self: Val<bevy::math::Vec3>, rhs: f32) -> Val<bevy::math::Vec3> { + let output: Val<bevy::math::Vec3> = <bevy::math::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 @@ -2006,6 +2371,13 @@ impl bevy::math::Vec3 { .into(); output } + fn neg(_self: Val<bevy::math::Vec3>) -> Val<bevy::math::Vec3> { + let output: Val<bevy::math::Vec3> = <bevy::math::Vec3 as ::core::ops::Neg>::neg( + _self.into_inner(), + ) + .into(); + output + } /// Creates a new vector. fn new(x: f32, y: f32, z: f32) -> Val<bevy::math::Vec3> { let output: Val<bevy::math::Vec3> = bevy::math::Vec3::new(x, y, z).into(); @@ -2161,6 +2533,33 @@ impl bevy::math::Vec3 { .into(); output } + fn rem( + _self: Val<bevy::math::Vec3>, + rhs: Ref<bevy::math::Vec3>, + ) -> Val<bevy::math::Vec3> { + let output: Val<bevy::math::Vec3> = <bevy::math::Vec3 as ::core::ops::Rem< + &bevy::math::Vec3, + >>::rem(_self.into_inner(), &rhs) + .into(); + output + } + fn rem( + _self: Val<bevy::math::Vec3>, + rhs: Val<bevy::math::Vec3>, + ) -> Val<bevy::math::Vec3> { + let output: Val<bevy::math::Vec3> = <bevy::math::Vec3 as ::core::ops::Rem< + bevy::math::Vec3, + >>::rem(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + fn rem(_self: Val<bevy::math::Vec3>, rhs: f32) -> Val<bevy::math::Vec3> { + let output: Val<bevy::math::Vec3> = <bevy::math::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( @@ -2212,6 +2611,33 @@ impl bevy::math::Vec3 { let output: Val<bevy::math::Vec3> = bevy::math::Vec3::splat(v).into(); output } + fn sub( + _self: Val<bevy::math::Vec3>, + rhs: Ref<bevy::math::Vec3>, + ) -> Val<bevy::math::Vec3> { + let output: Val<bevy::math::Vec3> = <bevy::math::Vec3 as ::core::ops::Sub< + &bevy::math::Vec3, + >>::sub(_self.into_inner(), &rhs) + .into(); + output + } + fn sub( + _self: Val<bevy::math::Vec3>, + rhs: Val<bevy::math::Vec3>, + ) -> Val<bevy::math::Vec3> { + let output: Val<bevy::math::Vec3> = <bevy::math::Vec3 as ::core::ops::Sub< + bevy::math::Vec3, + >>::sub(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + fn sub(_self: Val<bevy::math::Vec3>, rhs: f32) -> Val<bevy::math::Vec3> { + let output: Val<bevy::math::Vec3> = <bevy::math::Vec3 as ::core::ops::Sub< + f32, + >>::sub(_self.into_inner(), rhs) + .into(); + output + } /// `[x, y, z]` fn to_array(_self: Ref<bevy::math::Vec3>) -> [f32; 3] { let output: [f32; 3] = bevy::math::Vec3::to_array(&_self).into(); @@ -2268,6 +2694,30 @@ impl bevy::math::Vec3 { generated )] impl ::core::net::SocketAddr { + fn assert_receiver_is_total_eq(_self: Ref<::core::net::SocketAddr>) -> () { + let output: () = <::core::net::SocketAddr as ::core::cmp::Eq>::assert_receiver_is_total_eq( + &_self, + ) + .into(); + output + } + fn clone(_self: Ref<::core::net::SocketAddr>) -> Val<::core::net::SocketAddr> { + let output: Val<::core::net::SocketAddr> = <::core::net::SocketAddr as bevy::reflect::erased_serde::__private::serde::__private::Clone>::clone( + &_self, + ) + .into(); + output + } + fn eq( + _self: Ref<::core::net::SocketAddr>, + other: Ref<::core::net::SocketAddr>, + ) -> bool { + let output: bool = <::core::net::SocketAddr as ::core::cmp::PartialEq< + ::core::net::SocketAddr, + >>::eq(&_self, &other) + .into(); + output + } /// Returns [`true`] if the [IP address] in this `SocketAddr` is an /// [`IPv4` address], and [`false`] otherwise. /// [IP address]: IpAddr @@ -2335,14 +2785,41 @@ impl bevy::math::IVec2 { .into(); output } - /// Casts all elements of `self` to `f64`. - fn as_dvec2(_self: Ref<bevy::math::IVec2>) -> Val<bevy::math::DVec2> { - let output: Val<bevy::math::DVec2> = bevy::math::IVec2::as_dvec2(&_self).into(); - output - } - /// Casts all elements of `self` to `i16`. - fn as_i16vec2(_self: Ref<bevy::math::IVec2>) -> Val<bevy::math::I16Vec2> { - let output: Val<bevy::math::I16Vec2> = bevy::math::IVec2::as_i16vec2(&_self) + fn add( + _self: Val<bevy::math::IVec2>, + rhs: Ref<bevy::math::IVec2>, + ) -> Val<bevy::math::IVec2> { + let output: Val<bevy::math::IVec2> = <bevy::math::IVec2 as ::core::ops::Add< + &bevy::math::IVec2, + >>::add(_self.into_inner(), &rhs) + .into(); + output + } + fn add( + _self: Val<bevy::math::IVec2>, + rhs: Val<bevy::math::IVec2>, + ) -> Val<bevy::math::IVec2> { + let output: Val<bevy::math::IVec2> = <bevy::math::IVec2 as ::core::ops::Add< + bevy::math::IVec2, + >>::add(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + fn add(_self: Val<bevy::math::IVec2>, rhs: i32) -> Val<bevy::math::IVec2> { + let output: Val<bevy::math::IVec2> = <bevy::math::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<bevy::math::IVec2>) -> Val<bevy::math::DVec2> { + let output: Val<bevy::math::DVec2> = bevy::math::IVec2::as_dvec2(&_self).into(); + output + } + /// Casts all elements of `self` to `i16`. + fn as_i16vec2(_self: Ref<bevy::math::IVec2>) -> Val<bevy::math::I16Vec2> { + let output: Val<bevy::math::I16Vec2> = bevy::math::IVec2::as_i16vec2(&_self) .into(); output } @@ -2386,6 +2863,13 @@ impl bevy::math::IVec2 { let output: Val<bevy::math::Vec2> = bevy::math::IVec2::as_vec2(&_self).into(); output } + fn assert_receiver_is_total_eq(_self: Ref<bevy::math::IVec2>) -> () { + let output: () = <bevy::math::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 @@ -2403,6 +2887,13 @@ impl bevy::math::IVec2 { .into(); output } + fn clone(_self: Ref<bevy::math::IVec2>) -> Val<bevy::math::IVec2> { + let output: Val<bevy::math::IVec2> = <bevy::math::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 @@ -2505,6 +2996,33 @@ impl bevy::math::IVec2 { .into(); output } + fn div( + _self: Val<bevy::math::IVec2>, + rhs: Ref<bevy::math::IVec2>, + ) -> Val<bevy::math::IVec2> { + let output: Val<bevy::math::IVec2> = <bevy::math::IVec2 as ::core::ops::Div< + &bevy::math::IVec2, + >>::div(_self.into_inner(), &rhs) + .into(); + output + } + fn div( + _self: Val<bevy::math::IVec2>, + rhs: Val<bevy::math::IVec2>, + ) -> Val<bevy::math::IVec2> { + let output: Val<bevy::math::IVec2> = <bevy::math::IVec2 as ::core::ops::Div< + bevy::math::IVec2, + >>::div(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + fn div(_self: Val<bevy::math::IVec2>, rhs: i32) -> Val<bevy::math::IVec2> { + let output: Val<bevy::math::IVec2> = <bevy::math::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. @@ -2549,6 +3067,13 @@ impl bevy::math::IVec2 { let output: i32 = bevy::math::IVec2::element_sum(_self.into_inner()).into(); output } + fn eq(_self: Ref<bevy::math::IVec2>, other: Ref<bevy::math::IVec2>) -> bool { + let output: bool = <bevy::math::IVec2 as ::core::cmp::PartialEq< + bevy::math::IVec2, + >>::eq(&_self, &other) + .into(); + output + } /// Creates a 3D vector from `self` and the given `z` value. fn extend(_self: Val<bevy::math::IVec2>, z: i32) -> Val<bevy::math::IVec3> { let output: Val<bevy::math::IVec3> = bevy::math::IVec2::extend( @@ -2614,6 +3139,40 @@ impl bevy::math::IVec2 { let output: i32 = bevy::math::IVec2::min_element(_self.into_inner()).into(); output } + fn mul( + _self: Val<bevy::math::IVec2>, + rhs: Ref<bevy::math::IVec2>, + ) -> Val<bevy::math::IVec2> { + let output: Val<bevy::math::IVec2> = <bevy::math::IVec2 as ::core::ops::Mul< + &bevy::math::IVec2, + >>::mul(_self.into_inner(), &rhs) + .into(); + output + } + fn mul( + _self: Val<bevy::math::IVec2>, + rhs: Val<bevy::math::IVec2>, + ) -> Val<bevy::math::IVec2> { + let output: Val<bevy::math::IVec2> = <bevy::math::IVec2 as ::core::ops::Mul< + bevy::math::IVec2, + >>::mul(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + fn mul(_self: Val<bevy::math::IVec2>, rhs: i32) -> Val<bevy::math::IVec2> { + let output: Val<bevy::math::IVec2> = <bevy::math::IVec2 as ::core::ops::Mul< + i32, + >>::mul(_self.into_inner(), rhs) + .into(); + output + } + fn neg(_self: Val<bevy::math::IVec2>) -> Val<bevy::math::IVec2> { + let output: Val<bevy::math::IVec2> = <bevy::math::IVec2 as ::core::ops::Neg>::neg( + _self.into_inner(), + ) + .into(); + output + } /// Creates a new vector. fn new(x: i32, y: i32) -> Val<bevy::math::IVec2> { let output: Val<bevy::math::IVec2> = bevy::math::IVec2::new(x, y).into(); @@ -2635,6 +3194,33 @@ impl bevy::math::IVec2 { .into(); output } + fn rem( + _self: Val<bevy::math::IVec2>, + rhs: Ref<bevy::math::IVec2>, + ) -> Val<bevy::math::IVec2> { + let output: Val<bevy::math::IVec2> = <bevy::math::IVec2 as ::core::ops::Rem< + &bevy::math::IVec2, + >>::rem(_self.into_inner(), &rhs) + .into(); + output + } + fn rem( + _self: Val<bevy::math::IVec2>, + rhs: Val<bevy::math::IVec2>, + ) -> Val<bevy::math::IVec2> { + let output: Val<bevy::math::IVec2> = <bevy::math::IVec2 as ::core::ops::Rem< + bevy::math::IVec2, + >>::rem(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + fn rem(_self: Val<bevy::math::IVec2>, rhs: i32) -> Val<bevy::math::IVec2> { + let output: Val<bevy::math::IVec2> = <bevy::math::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. @@ -2774,6 +3360,33 @@ impl bevy::math::IVec2 { let output: Val<bevy::math::IVec2> = bevy::math::IVec2::splat(v).into(); output } + fn sub( + _self: Val<bevy::math::IVec2>, + rhs: Ref<bevy::math::IVec2>, + ) -> Val<bevy::math::IVec2> { + let output: Val<bevy::math::IVec2> = <bevy::math::IVec2 as ::core::ops::Sub< + &bevy::math::IVec2, + >>::sub(_self.into_inner(), &rhs) + .into(); + output + } + fn sub( + _self: Val<bevy::math::IVec2>, + rhs: Val<bevy::math::IVec2>, + ) -> Val<bevy::math::IVec2> { + let output: Val<bevy::math::IVec2> = <bevy::math::IVec2 as ::core::ops::Sub< + bevy::math::IVec2, + >>::sub(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + fn sub(_self: Val<bevy::math::IVec2>, rhs: i32) -> Val<bevy::math::IVec2> { + let output: Val<bevy::math::IVec2> = <bevy::math::IVec2 as ::core::ops::Sub< + i32, + >>::sub(_self.into_inner(), rhs) + .into(); + output + } /// `[x, y]` fn to_array(_self: Ref<bevy::math::IVec2>) -> [i32; 2] { let output: [i32; 2] = bevy::math::IVec2::to_array(&_self).into(); @@ -2889,6 +3502,33 @@ impl bevy::math::IVec3 { .into(); output } + fn add( + _self: Val<bevy::math::IVec3>, + rhs: Ref<bevy::math::IVec3>, + ) -> Val<bevy::math::IVec3> { + let output: Val<bevy::math::IVec3> = <bevy::math::IVec3 as ::core::ops::Add< + &bevy::math::IVec3, + >>::add(_self.into_inner(), &rhs) + .into(); + output + } + fn add( + _self: Val<bevy::math::IVec3>, + rhs: Val<bevy::math::IVec3>, + ) -> Val<bevy::math::IVec3> { + let output: Val<bevy::math::IVec3> = <bevy::math::IVec3 as ::core::ops::Add< + bevy::math::IVec3, + >>::add(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + fn add(_self: Val<bevy::math::IVec3>, rhs: i32) -> Val<bevy::math::IVec3> { + let output: Val<bevy::math::IVec3> = <bevy::math::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<bevy::math::IVec3>) -> Val<bevy::math::DVec3> { let output: Val<bevy::math::DVec3> = bevy::math::IVec3::as_dvec3(&_self).into(); @@ -2945,6 +3585,13 @@ impl bevy::math::IVec3 { let output: Val<bevy::math::Vec3A> = bevy::math::IVec3::as_vec3a(&_self).into(); output } + fn assert_receiver_is_total_eq(_self: Ref<bevy::math::IVec3>) -> () { + let output: () = <bevy::math::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 @@ -2962,6 +3609,13 @@ impl bevy::math::IVec3 { .into(); output } + fn clone(_self: Ref<bevy::math::IVec3>) -> Val<bevy::math::IVec3> { + let output: Val<bevy::math::IVec3> = <bevy::math::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 @@ -3076,6 +3730,33 @@ impl bevy::math::IVec3 { .into(); output } + fn div( + _self: Val<bevy::math::IVec3>, + rhs: Ref<bevy::math::IVec3>, + ) -> Val<bevy::math::IVec3> { + let output: Val<bevy::math::IVec3> = <bevy::math::IVec3 as ::core::ops::Div< + &bevy::math::IVec3, + >>::div(_self.into_inner(), &rhs) + .into(); + output + } + fn div( + _self: Val<bevy::math::IVec3>, + rhs: Val<bevy::math::IVec3>, + ) -> Val<bevy::math::IVec3> { + let output: Val<bevy::math::IVec3> = <bevy::math::IVec3 as ::core::ops::Div< + bevy::math::IVec3, + >>::div(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + fn div(_self: Val<bevy::math::IVec3>, rhs: i32) -> Val<bevy::math::IVec3> { + let output: Val<bevy::math::IVec3> = <bevy::math::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. @@ -3120,6 +3801,13 @@ impl bevy::math::IVec3 { let output: i32 = bevy::math::IVec3::element_sum(_self.into_inner()).into(); output } + fn eq(_self: Ref<bevy::math::IVec3>, other: Ref<bevy::math::IVec3>) -> bool { + let output: bool = <bevy::math::IVec3 as ::core::cmp::PartialEq< + bevy::math::IVec3, + >>::eq(&_self, &other) + .into(); + output + } /// Creates a 4D vector from `self` and the given `w` value. fn extend(_self: Val<bevy::math::IVec3>, w: i32) -> Val<bevy::math::IVec4> { let output: Val<bevy::math::IVec4> = bevy::math::IVec3::extend( @@ -3185,11 +3873,72 @@ impl bevy::math::IVec3 { let output: i32 = bevy::math::IVec3::min_element(_self.into_inner()).into(); output } + fn mul( + _self: Val<bevy::math::IVec3>, + rhs: Ref<bevy::math::IVec3>, + ) -> Val<bevy::math::IVec3> { + let output: Val<bevy::math::IVec3> = <bevy::math::IVec3 as ::core::ops::Mul< + &bevy::math::IVec3, + >>::mul(_self.into_inner(), &rhs) + .into(); + output + } + fn mul( + _self: Val<bevy::math::IVec3>, + rhs: Val<bevy::math::IVec3>, + ) -> Val<bevy::math::IVec3> { + let output: Val<bevy::math::IVec3> = <bevy::math::IVec3 as ::core::ops::Mul< + bevy::math::IVec3, + >>::mul(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + fn mul(_self: Val<bevy::math::IVec3>, rhs: i32) -> Val<bevy::math::IVec3> { + let output: Val<bevy::math::IVec3> = <bevy::math::IVec3 as ::core::ops::Mul< + i32, + >>::mul(_self.into_inner(), rhs) + .into(); + output + } + fn neg(_self: Val<bevy::math::IVec3>) -> Val<bevy::math::IVec3> { + let output: Val<bevy::math::IVec3> = <bevy::math::IVec3 as ::core::ops::Neg>::neg( + _self.into_inner(), + ) + .into(); + output + } /// Creates a new vector. fn new(x: i32, y: i32, z: i32) -> Val<bevy::math::IVec3> { let output: Val<bevy::math::IVec3> = bevy::math::IVec3::new(x, y, z).into(); output } + fn rem( + _self: Val<bevy::math::IVec3>, + rhs: Ref<bevy::math::IVec3>, + ) -> Val<bevy::math::IVec3> { + let output: Val<bevy::math::IVec3> = <bevy::math::IVec3 as ::core::ops::Rem< + &bevy::math::IVec3, + >>::rem(_self.into_inner(), &rhs) + .into(); + output + } + fn rem( + _self: Val<bevy::math::IVec3>, + rhs: Val<bevy::math::IVec3>, + ) -> Val<bevy::math::IVec3> { + let output: Val<bevy::math::IVec3> = <bevy::math::IVec3 as ::core::ops::Rem< + bevy::math::IVec3, + >>::rem(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + fn rem(_self: Val<bevy::math::IVec3>, rhs: i32) -> Val<bevy::math::IVec3> { + let output: Val<bevy::math::IVec3> = <bevy::math::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. @@ -3315,6 +4064,33 @@ impl bevy::math::IVec3 { let output: Val<bevy::math::IVec3> = bevy::math::IVec3::splat(v).into(); output } + fn sub( + _self: Val<bevy::math::IVec3>, + rhs: Ref<bevy::math::IVec3>, + ) -> Val<bevy::math::IVec3> { + let output: Val<bevy::math::IVec3> = <bevy::math::IVec3 as ::core::ops::Sub< + &bevy::math::IVec3, + >>::sub(_self.into_inner(), &rhs) + .into(); + output + } + fn sub( + _self: Val<bevy::math::IVec3>, + rhs: Val<bevy::math::IVec3>, + ) -> Val<bevy::math::IVec3> { + let output: Val<bevy::math::IVec3> = <bevy::math::IVec3 as ::core::ops::Sub< + bevy::math::IVec3, + >>::sub(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + fn sub(_self: Val<bevy::math::IVec3>, rhs: i32) -> Val<bevy::math::IVec3> { + let output: Val<bevy::math::IVec3> = <bevy::math::IVec3 as ::core::ops::Sub< + i32, + >>::sub(_self.into_inner(), rhs) + .into(); + output + } /// `[x, y, z]` fn to_array(_self: Ref<bevy::math::IVec3>) -> [i32; 3] { let output: [i32; 3] = bevy::math::IVec3::to_array(&_self).into(); @@ -3448,6 +4224,33 @@ impl bevy::math::IVec4 { .into(); output } + fn add( + _self: Val<bevy::math::IVec4>, + rhs: Ref<bevy::math::IVec4>, + ) -> Val<bevy::math::IVec4> { + let output: Val<bevy::math::IVec4> = <bevy::math::IVec4 as ::core::ops::Add< + &bevy::math::IVec4, + >>::add(_self.into_inner(), &rhs) + .into(); + output + } + fn add( + _self: Val<bevy::math::IVec4>, + rhs: Val<bevy::math::IVec4>, + ) -> Val<bevy::math::IVec4> { + let output: Val<bevy::math::IVec4> = <bevy::math::IVec4 as ::core::ops::Add< + bevy::math::IVec4, + >>::add(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + fn add(_self: Val<bevy::math::IVec4>, rhs: i32) -> Val<bevy::math::IVec4> { + let output: Val<bevy::math::IVec4> = <bevy::math::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<bevy::math::IVec4>) -> Val<bevy::math::DVec4> { let output: Val<bevy::math::DVec4> = bevy::math::IVec4::as_dvec4(&_self).into(); @@ -3499,6 +4302,13 @@ impl bevy::math::IVec4 { let output: Val<bevy::math::Vec4> = bevy::math::IVec4::as_vec4(&_self).into(); output } + fn assert_receiver_is_total_eq(_self: Ref<bevy::math::IVec4>) -> () { + let output: () = <bevy::math::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 @@ -3516,6 +4326,13 @@ impl bevy::math::IVec4 { .into(); output } + fn clone(_self: Ref<bevy::math::IVec4>) -> Val<bevy::math::IVec4> { + let output: Val<bevy::math::IVec4> = <bevy::math::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 @@ -3618,6 +4435,33 @@ impl bevy::math::IVec4 { .into(); output } + fn div( + _self: Val<bevy::math::IVec4>, + rhs: Ref<bevy::math::IVec4>, + ) -> Val<bevy::math::IVec4> { + let output: Val<bevy::math::IVec4> = <bevy::math::IVec4 as ::core::ops::Div< + &bevy::math::IVec4, + >>::div(_self.into_inner(), &rhs) + .into(); + output + } + fn div( + _self: Val<bevy::math::IVec4>, + rhs: Val<bevy::math::IVec4>, + ) -> Val<bevy::math::IVec4> { + let output: Val<bevy::math::IVec4> = <bevy::math::IVec4 as ::core::ops::Div< + bevy::math::IVec4, + >>::div(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + fn div(_self: Val<bevy::math::IVec4>, rhs: i32) -> Val<bevy::math::IVec4> { + let output: Val<bevy::math::IVec4> = <bevy::math::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. @@ -3662,6 +4506,13 @@ impl bevy::math::IVec4 { let output: i32 = bevy::math::IVec4::element_sum(_self.into_inner()).into(); output } + fn eq(_self: Ref<bevy::math::IVec4>, other: Ref<bevy::math::IVec4>) -> bool { + let output: bool = <bevy::math::IVec4 as ::core::cmp::PartialEq< + bevy::math::IVec4, + >>::eq(&_self, &other) + .into(); + output + } /// Creates a new vector from an array. fn from_array(a: [i32; 4]) -> Val<bevy::math::IVec4> { let output: Val<bevy::math::IVec4> = bevy::math::IVec4::from_array(a).into(); @@ -3718,11 +4569,72 @@ impl bevy::math::IVec4 { let output: i32 = bevy::math::IVec4::min_element(_self.into_inner()).into(); output } + fn mul( + _self: Val<bevy::math::IVec4>, + rhs: Ref<bevy::math::IVec4>, + ) -> Val<bevy::math::IVec4> { + let output: Val<bevy::math::IVec4> = <bevy::math::IVec4 as ::core::ops::Mul< + &bevy::math::IVec4, + >>::mul(_self.into_inner(), &rhs) + .into(); + output + } + fn mul( + _self: Val<bevy::math::IVec4>, + rhs: Val<bevy::math::IVec4>, + ) -> Val<bevy::math::IVec4> { + let output: Val<bevy::math::IVec4> = <bevy::math::IVec4 as ::core::ops::Mul< + bevy::math::IVec4, + >>::mul(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + fn mul(_self: Val<bevy::math::IVec4>, rhs: i32) -> Val<bevy::math::IVec4> { + let output: Val<bevy::math::IVec4> = <bevy::math::IVec4 as ::core::ops::Mul< + i32, + >>::mul(_self.into_inner(), rhs) + .into(); + output + } + fn neg(_self: Val<bevy::math::IVec4>) -> Val<bevy::math::IVec4> { + let output: Val<bevy::math::IVec4> = <bevy::math::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<bevy::math::IVec4> { let output: Val<bevy::math::IVec4> = bevy::math::IVec4::new(x, y, z, w).into(); output } + fn rem( + _self: Val<bevy::math::IVec4>, + rhs: Ref<bevy::math::IVec4>, + ) -> Val<bevy::math::IVec4> { + let output: Val<bevy::math::IVec4> = <bevy::math::IVec4 as ::core::ops::Rem< + &bevy::math::IVec4, + >>::rem(_self.into_inner(), &rhs) + .into(); + output + } + fn rem( + _self: Val<bevy::math::IVec4>, + rhs: Val<bevy::math::IVec4>, + ) -> Val<bevy::math::IVec4> { + let output: Val<bevy::math::IVec4> = <bevy::math::IVec4 as ::core::ops::Rem< + bevy::math::IVec4, + >>::rem(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + fn rem(_self: Val<bevy::math::IVec4>, rhs: i32) -> Val<bevy::math::IVec4> { + let output: Val<bevy::math::IVec4> = <bevy::math::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. @@ -3848,6 +4760,33 @@ impl bevy::math::IVec4 { let output: Val<bevy::math::IVec4> = bevy::math::IVec4::splat(v).into(); output } + fn sub( + _self: Val<bevy::math::IVec4>, + rhs: Ref<bevy::math::IVec4>, + ) -> Val<bevy::math::IVec4> { + let output: Val<bevy::math::IVec4> = <bevy::math::IVec4 as ::core::ops::Sub< + &bevy::math::IVec4, + >>::sub(_self.into_inner(), &rhs) + .into(); + output + } + fn sub( + _self: Val<bevy::math::IVec4>, + rhs: Val<bevy::math::IVec4>, + ) -> Val<bevy::math::IVec4> { + let output: Val<bevy::math::IVec4> = <bevy::math::IVec4 as ::core::ops::Sub< + bevy::math::IVec4, + >>::sub(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + fn sub(_self: Val<bevy::math::IVec4>, rhs: i32) -> Val<bevy::math::IVec4> { + let output: Val<bevy::math::IVec4> = <bevy::math::IVec4 as ::core::ops::Sub< + i32, + >>::sub(_self.into_inner(), rhs) + .into(); + output + } /// `[x, y, z, w]` fn to_array(_self: Ref<bevy::math::IVec4>) -> [i32; 4] { let output: [i32; 4] = bevy::math::IVec4::to_array(&_self).into(); @@ -3990,6 +4929,33 @@ impl bevy::math::I8Vec2 { .into(); output } + fn add( + _self: Val<bevy::math::I8Vec2>, + rhs: Ref<bevy::math::I8Vec2>, + ) -> Val<bevy::math::I8Vec2> { + let output: Val<bevy::math::I8Vec2> = <bevy::math::I8Vec2 as ::core::ops::Add< + &bevy::math::I8Vec2, + >>::add(_self.into_inner(), &rhs) + .into(); + output + } + fn add( + _self: Val<bevy::math::I8Vec2>, + rhs: Val<bevy::math::I8Vec2>, + ) -> Val<bevy::math::I8Vec2> { + let output: Val<bevy::math::I8Vec2> = <bevy::math::I8Vec2 as ::core::ops::Add< + bevy::math::I8Vec2, + >>::add(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + fn add(_self: Val<bevy::math::I8Vec2>, rhs: i8) -> Val<bevy::math::I8Vec2> { + let output: Val<bevy::math::I8Vec2> = <bevy::math::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<bevy::math::I8Vec2>) -> Val<bevy::math::DVec2> { let output: Val<bevy::math::DVec2> = bevy::math::I8Vec2::as_dvec2(&_self).into(); @@ -4040,6 +5006,13 @@ impl bevy::math::I8Vec2 { let output: Val<bevy::math::Vec2> = bevy::math::I8Vec2::as_vec2(&_self).into(); output } + fn assert_receiver_is_total_eq(_self: Ref<bevy::math::I8Vec2>) -> () { + let output: () = <bevy::math::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 @@ -4057,6 +5030,13 @@ impl bevy::math::I8Vec2 { .into(); output } + fn clone(_self: Ref<bevy::math::I8Vec2>) -> Val<bevy::math::I8Vec2> { + let output: Val<bevy::math::I8Vec2> = <bevy::math::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 @@ -4159,6 +5139,33 @@ impl bevy::math::I8Vec2 { .into(); output } + fn div( + _self: Val<bevy::math::I8Vec2>, + rhs: Ref<bevy::math::I8Vec2>, + ) -> Val<bevy::math::I8Vec2> { + let output: Val<bevy::math::I8Vec2> = <bevy::math::I8Vec2 as ::core::ops::Div< + &bevy::math::I8Vec2, + >>::div(_self.into_inner(), &rhs) + .into(); + output + } + fn div( + _self: Val<bevy::math::I8Vec2>, + rhs: Val<bevy::math::I8Vec2>, + ) -> Val<bevy::math::I8Vec2> { + let output: Val<bevy::math::I8Vec2> = <bevy::math::I8Vec2 as ::core::ops::Div< + bevy::math::I8Vec2, + >>::div(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + fn div(_self: Val<bevy::math::I8Vec2>, rhs: i8) -> Val<bevy::math::I8Vec2> { + let output: Val<bevy::math::I8Vec2> = <bevy::math::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. @@ -4203,6 +5210,13 @@ impl bevy::math::I8Vec2 { let output: i8 = bevy::math::I8Vec2::element_sum(_self.into_inner()).into(); output } + fn eq(_self: Ref<bevy::math::I8Vec2>, other: Ref<bevy::math::I8Vec2>) -> bool { + let output: bool = <bevy::math::I8Vec2 as ::core::cmp::PartialEq< + bevy::math::I8Vec2, + >>::eq(&_self, &other) + .into(); + output + } /// Creates a 3D vector from `self` and the given `z` value. fn extend(_self: Val<bevy::math::I8Vec2>, z: i8) -> Val<bevy::math::I8Vec3> { let output: Val<bevy::math::I8Vec3> = bevy::math::I8Vec2::extend( @@ -4268,6 +5282,40 @@ impl bevy::math::I8Vec2 { let output: i8 = bevy::math::I8Vec2::min_element(_self.into_inner()).into(); output } + fn mul( + _self: Val<bevy::math::I8Vec2>, + rhs: Ref<bevy::math::I8Vec2>, + ) -> Val<bevy::math::I8Vec2> { + let output: Val<bevy::math::I8Vec2> = <bevy::math::I8Vec2 as ::core::ops::Mul< + &bevy::math::I8Vec2, + >>::mul(_self.into_inner(), &rhs) + .into(); + output + } + fn mul( + _self: Val<bevy::math::I8Vec2>, + rhs: Val<bevy::math::I8Vec2>, + ) -> Val<bevy::math::I8Vec2> { + let output: Val<bevy::math::I8Vec2> = <bevy::math::I8Vec2 as ::core::ops::Mul< + bevy::math::I8Vec2, + >>::mul(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + fn mul(_self: Val<bevy::math::I8Vec2>, rhs: i8) -> Val<bevy::math::I8Vec2> { + let output: Val<bevy::math::I8Vec2> = <bevy::math::I8Vec2 as ::core::ops::Mul< + i8, + >>::mul(_self.into_inner(), rhs) + .into(); + output + } + fn neg(_self: Val<bevy::math::I8Vec2>) -> Val<bevy::math::I8Vec2> { + let output: Val<bevy::math::I8Vec2> = <bevy::math::I8Vec2 as ::core::ops::Neg>::neg( + _self.into_inner(), + ) + .into(); + output + } /// Creates a new vector. fn new(x: i8, y: i8) -> Val<bevy::math::I8Vec2> { let output: Val<bevy::math::I8Vec2> = bevy::math::I8Vec2::new(x, y).into(); @@ -4291,6 +5339,33 @@ impl bevy::math::I8Vec2 { .into(); output } + fn rem( + _self: Val<bevy::math::I8Vec2>, + rhs: Ref<bevy::math::I8Vec2>, + ) -> Val<bevy::math::I8Vec2> { + let output: Val<bevy::math::I8Vec2> = <bevy::math::I8Vec2 as ::core::ops::Rem< + &bevy::math::I8Vec2, + >>::rem(_self.into_inner(), &rhs) + .into(); + output + } + fn rem( + _self: Val<bevy::math::I8Vec2>, + rhs: Val<bevy::math::I8Vec2>, + ) -> Val<bevy::math::I8Vec2> { + let output: Val<bevy::math::I8Vec2> = <bevy::math::I8Vec2 as ::core::ops::Rem< + bevy::math::I8Vec2, + >>::rem(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + fn rem(_self: Val<bevy::math::I8Vec2>, rhs: i8) -> Val<bevy::math::I8Vec2> { + let output: Val<bevy::math::I8Vec2> = <bevy::math::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. @@ -4430,6 +5505,33 @@ impl bevy::math::I8Vec2 { let output: Val<bevy::math::I8Vec2> = bevy::math::I8Vec2::splat(v).into(); output } + fn sub( + _self: Val<bevy::math::I8Vec2>, + rhs: Ref<bevy::math::I8Vec2>, + ) -> Val<bevy::math::I8Vec2> { + let output: Val<bevy::math::I8Vec2> = <bevy::math::I8Vec2 as ::core::ops::Sub< + &bevy::math::I8Vec2, + >>::sub(_self.into_inner(), &rhs) + .into(); + output + } + fn sub( + _self: Val<bevy::math::I8Vec2>, + rhs: Val<bevy::math::I8Vec2>, + ) -> Val<bevy::math::I8Vec2> { + let output: Val<bevy::math::I8Vec2> = <bevy::math::I8Vec2 as ::core::ops::Sub< + bevy::math::I8Vec2, + >>::sub(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + fn sub(_self: Val<bevy::math::I8Vec2>, rhs: i8) -> Val<bevy::math::I8Vec2> { + let output: Val<bevy::math::I8Vec2> = <bevy::math::I8Vec2 as ::core::ops::Sub< + i8, + >>::sub(_self.into_inner(), rhs) + .into(); + output + } /// `[x, y]` fn to_array(_self: Ref<bevy::math::I8Vec2>) -> [i8; 2] { let output: [i8; 2] = bevy::math::I8Vec2::to_array(&_self).into(); @@ -4545,6 +5647,33 @@ impl bevy::math::I8Vec3 { .into(); output } + fn add( + _self: Val<bevy::math::I8Vec3>, + rhs: Ref<bevy::math::I8Vec3>, + ) -> Val<bevy::math::I8Vec3> { + let output: Val<bevy::math::I8Vec3> = <bevy::math::I8Vec3 as ::core::ops::Add< + &bevy::math::I8Vec3, + >>::add(_self.into_inner(), &rhs) + .into(); + output + } + fn add( + _self: Val<bevy::math::I8Vec3>, + rhs: Val<bevy::math::I8Vec3>, + ) -> Val<bevy::math::I8Vec3> { + let output: Val<bevy::math::I8Vec3> = <bevy::math::I8Vec3 as ::core::ops::Add< + bevy::math::I8Vec3, + >>::add(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + fn add(_self: Val<bevy::math::I8Vec3>, rhs: i8) -> Val<bevy::math::I8Vec3> { + let output: Val<bevy::math::I8Vec3> = <bevy::math::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<bevy::math::I8Vec3>) -> Val<bevy::math::DVec3> { let output: Val<bevy::math::DVec3> = bevy::math::I8Vec3::as_dvec3(&_self).into(); @@ -4600,6 +5729,13 @@ impl bevy::math::I8Vec3 { let output: Val<bevy::math::Vec3A> = bevy::math::I8Vec3::as_vec3a(&_self).into(); output } + fn assert_receiver_is_total_eq(_self: Ref<bevy::math::I8Vec3>) -> () { + let output: () = <bevy::math::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 @@ -4617,6 +5753,13 @@ impl bevy::math::I8Vec3 { .into(); output } + fn clone(_self: Ref<bevy::math::I8Vec3>) -> Val<bevy::math::I8Vec3> { + let output: Val<bevy::math::I8Vec3> = <bevy::math::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 @@ -4731,6 +5874,33 @@ impl bevy::math::I8Vec3 { .into(); output } + fn div( + _self: Val<bevy::math::I8Vec3>, + rhs: Ref<bevy::math::I8Vec3>, + ) -> Val<bevy::math::I8Vec3> { + let output: Val<bevy::math::I8Vec3> = <bevy::math::I8Vec3 as ::core::ops::Div< + &bevy::math::I8Vec3, + >>::div(_self.into_inner(), &rhs) + .into(); + output + } + fn div( + _self: Val<bevy::math::I8Vec3>, + rhs: Val<bevy::math::I8Vec3>, + ) -> Val<bevy::math::I8Vec3> { + let output: Val<bevy::math::I8Vec3> = <bevy::math::I8Vec3 as ::core::ops::Div< + bevy::math::I8Vec3, + >>::div(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + fn div(_self: Val<bevy::math::I8Vec3>, rhs: i8) -> Val<bevy::math::I8Vec3> { + let output: Val<bevy::math::I8Vec3> = <bevy::math::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. @@ -4775,6 +5945,13 @@ impl bevy::math::I8Vec3 { let output: i8 = bevy::math::I8Vec3::element_sum(_self.into_inner()).into(); output } + fn eq(_self: Ref<bevy::math::I8Vec3>, other: Ref<bevy::math::I8Vec3>) -> bool { + let output: bool = <bevy::math::I8Vec3 as ::core::cmp::PartialEq< + bevy::math::I8Vec3, + >>::eq(&_self, &other) + .into(); + output + } /// Creates a 4D vector from `self` and the given `w` value. fn extend(_self: Val<bevy::math::I8Vec3>, w: i8) -> Val<bevy::math::I8Vec4> { let output: Val<bevy::math::I8Vec4> = bevy::math::I8Vec3::extend( @@ -4840,11 +6017,72 @@ impl bevy::math::I8Vec3 { let output: i8 = bevy::math::I8Vec3::min_element(_self.into_inner()).into(); output } + fn mul( + _self: Val<bevy::math::I8Vec3>, + rhs: Ref<bevy::math::I8Vec3>, + ) -> Val<bevy::math::I8Vec3> { + let output: Val<bevy::math::I8Vec3> = <bevy::math::I8Vec3 as ::core::ops::Mul< + &bevy::math::I8Vec3, + >>::mul(_self.into_inner(), &rhs) + .into(); + output + } + fn mul( + _self: Val<bevy::math::I8Vec3>, + rhs: Val<bevy::math::I8Vec3>, + ) -> Val<bevy::math::I8Vec3> { + let output: Val<bevy::math::I8Vec3> = <bevy::math::I8Vec3 as ::core::ops::Mul< + bevy::math::I8Vec3, + >>::mul(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + fn mul(_self: Val<bevy::math::I8Vec3>, rhs: i8) -> Val<bevy::math::I8Vec3> { + let output: Val<bevy::math::I8Vec3> = <bevy::math::I8Vec3 as ::core::ops::Mul< + i8, + >>::mul(_self.into_inner(), rhs) + .into(); + output + } + fn neg(_self: Val<bevy::math::I8Vec3>) -> Val<bevy::math::I8Vec3> { + let output: Val<bevy::math::I8Vec3> = <bevy::math::I8Vec3 as ::core::ops::Neg>::neg( + _self.into_inner(), + ) + .into(); + output + } /// Creates a new vector. fn new(x: i8, y: i8, z: i8) -> Val<bevy::math::I8Vec3> { let output: Val<bevy::math::I8Vec3> = bevy::math::I8Vec3::new(x, y, z).into(); output } + fn rem( + _self: Val<bevy::math::I8Vec3>, + rhs: Ref<bevy::math::I8Vec3>, + ) -> Val<bevy::math::I8Vec3> { + let output: Val<bevy::math::I8Vec3> = <bevy::math::I8Vec3 as ::core::ops::Rem< + &bevy::math::I8Vec3, + >>::rem(_self.into_inner(), &rhs) + .into(); + output + } + fn rem( + _self: Val<bevy::math::I8Vec3>, + rhs: Val<bevy::math::I8Vec3>, + ) -> Val<bevy::math::I8Vec3> { + let output: Val<bevy::math::I8Vec3> = <bevy::math::I8Vec3 as ::core::ops::Rem< + bevy::math::I8Vec3, + >>::rem(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + fn rem(_self: Val<bevy::math::I8Vec3>, rhs: i8) -> Val<bevy::math::I8Vec3> { + let output: Val<bevy::math::I8Vec3> = <bevy::math::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. @@ -4970,6 +6208,33 @@ impl bevy::math::I8Vec3 { let output: Val<bevy::math::I8Vec3> = bevy::math::I8Vec3::splat(v).into(); output } + fn sub( + _self: Val<bevy::math::I8Vec3>, + rhs: Ref<bevy::math::I8Vec3>, + ) -> Val<bevy::math::I8Vec3> { + let output: Val<bevy::math::I8Vec3> = <bevy::math::I8Vec3 as ::core::ops::Sub< + &bevy::math::I8Vec3, + >>::sub(_self.into_inner(), &rhs) + .into(); + output + } + fn sub( + _self: Val<bevy::math::I8Vec3>, + rhs: Val<bevy::math::I8Vec3>, + ) -> Val<bevy::math::I8Vec3> { + let output: Val<bevy::math::I8Vec3> = <bevy::math::I8Vec3 as ::core::ops::Sub< + bevy::math::I8Vec3, + >>::sub(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + fn sub(_self: Val<bevy::math::I8Vec3>, rhs: i8) -> Val<bevy::math::I8Vec3> { + let output: Val<bevy::math::I8Vec3> = <bevy::math::I8Vec3 as ::core::ops::Sub< + i8, + >>::sub(_self.into_inner(), rhs) + .into(); + output + } /// `[x, y, z]` fn to_array(_self: Ref<bevy::math::I8Vec3>) -> [i8; 3] { let output: [i8; 3] = bevy::math::I8Vec3::to_array(&_self).into(); @@ -5103,6 +6368,33 @@ impl bevy::math::I8Vec4 { .into(); output } + fn add( + _self: Val<bevy::math::I8Vec4>, + rhs: Ref<bevy::math::I8Vec4>, + ) -> Val<bevy::math::I8Vec4> { + let output: Val<bevy::math::I8Vec4> = <bevy::math::I8Vec4 as ::core::ops::Add< + &bevy::math::I8Vec4, + >>::add(_self.into_inner(), &rhs) + .into(); + output + } + fn add( + _self: Val<bevy::math::I8Vec4>, + rhs: Val<bevy::math::I8Vec4>, + ) -> Val<bevy::math::I8Vec4> { + let output: Val<bevy::math::I8Vec4> = <bevy::math::I8Vec4 as ::core::ops::Add< + bevy::math::I8Vec4, + >>::add(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + fn add(_self: Val<bevy::math::I8Vec4>, rhs: i8) -> Val<bevy::math::I8Vec4> { + let output: Val<bevy::math::I8Vec4> = <bevy::math::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<bevy::math::I8Vec4>) -> Val<bevy::math::DVec4> { let output: Val<bevy::math::DVec4> = bevy::math::I8Vec4::as_dvec4(&_self).into(); @@ -5153,6 +6445,13 @@ impl bevy::math::I8Vec4 { let output: Val<bevy::math::Vec4> = bevy::math::I8Vec4::as_vec4(&_self).into(); output } + fn assert_receiver_is_total_eq(_self: Ref<bevy::math::I8Vec4>) -> () { + let output: () = <bevy::math::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 @@ -5170,6 +6469,13 @@ impl bevy::math::I8Vec4 { .into(); output } + fn clone(_self: Ref<bevy::math::I8Vec4>) -> Val<bevy::math::I8Vec4> { + let output: Val<bevy::math::I8Vec4> = <bevy::math::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 @@ -5272,6 +6578,33 @@ impl bevy::math::I8Vec4 { .into(); output } + fn div( + _self: Val<bevy::math::I8Vec4>, + rhs: Ref<bevy::math::I8Vec4>, + ) -> Val<bevy::math::I8Vec4> { + let output: Val<bevy::math::I8Vec4> = <bevy::math::I8Vec4 as ::core::ops::Div< + &bevy::math::I8Vec4, + >>::div(_self.into_inner(), &rhs) + .into(); + output + } + fn div( + _self: Val<bevy::math::I8Vec4>, + rhs: Val<bevy::math::I8Vec4>, + ) -> Val<bevy::math::I8Vec4> { + let output: Val<bevy::math::I8Vec4> = <bevy::math::I8Vec4 as ::core::ops::Div< + bevy::math::I8Vec4, + >>::div(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + fn div(_self: Val<bevy::math::I8Vec4>, rhs: i8) -> Val<bevy::math::I8Vec4> { + let output: Val<bevy::math::I8Vec4> = <bevy::math::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. @@ -5316,6 +6649,13 @@ impl bevy::math::I8Vec4 { let output: i8 = bevy::math::I8Vec4::element_sum(_self.into_inner()).into(); output } + fn eq(_self: Ref<bevy::math::I8Vec4>, other: Ref<bevy::math::I8Vec4>) -> bool { + let output: bool = <bevy::math::I8Vec4 as ::core::cmp::PartialEq< + bevy::math::I8Vec4, + >>::eq(&_self, &other) + .into(); + output + } /// Creates a new vector from an array. fn from_array(a: [i8; 4]) -> Val<bevy::math::I8Vec4> { let output: Val<bevy::math::I8Vec4> = bevy::math::I8Vec4::from_array(a).into(); @@ -5372,42 +6712,103 @@ impl bevy::math::I8Vec4 { let output: i8 = bevy::math::I8Vec4::min_element(_self.into_inner()).into(); output } - /// Creates a new vector. - fn new(x: i8, y: i8, z: i8, w: i8) -> Val<bevy::math::I8Vec4> { - let output: Val<bevy::math::I8Vec4> = bevy::math::I8Vec4::new(x, y, z, w).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( + fn mul( _self: Val<bevy::math::I8Vec4>, - rhs: Val<bevy::math::I8Vec4>, + rhs: Ref<bevy::math::I8Vec4>, ) -> Val<bevy::math::I8Vec4> { - let output: Val<bevy::math::I8Vec4> = bevy::math::I8Vec4::rem_euclid( - _self.into_inner(), - rhs.into_inner(), - ) + let output: Val<bevy::math::I8Vec4> = <bevy::math::I8Vec4 as ::core::ops::Mul< + &bevy::math::I8Vec4, + >>::mul(_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( + fn mul( _self: Val<bevy::math::I8Vec4>, rhs: Val<bevy::math::I8Vec4>, ) -> Val<bevy::math::I8Vec4> { - let output: Val<bevy::math::I8Vec4> = bevy::math::I8Vec4::saturating_add( - _self.into_inner(), - rhs.into_inner(), - ) + let output: Val<bevy::math::I8Vec4> = <bevy::math::I8Vec4 as ::core::ops::Mul< + bevy::math::I8Vec4, + >>::mul(_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<bevy::math::I8Vec4>, + fn mul(_self: Val<bevy::math::I8Vec4>, rhs: i8) -> Val<bevy::math::I8Vec4> { + let output: Val<bevy::math::I8Vec4> = <bevy::math::I8Vec4 as ::core::ops::Mul< + i8, + >>::mul(_self.into_inner(), rhs) + .into(); + output + } + fn neg(_self: Val<bevy::math::I8Vec4>) -> Val<bevy::math::I8Vec4> { + let output: Val<bevy::math::I8Vec4> = <bevy::math::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<bevy::math::I8Vec4> { + let output: Val<bevy::math::I8Vec4> = bevy::math::I8Vec4::new(x, y, z, w).into(); + output + } + fn rem( + _self: Val<bevy::math::I8Vec4>, + rhs: Ref<bevy::math::I8Vec4>, + ) -> Val<bevy::math::I8Vec4> { + let output: Val<bevy::math::I8Vec4> = <bevy::math::I8Vec4 as ::core::ops::Rem< + &bevy::math::I8Vec4, + >>::rem(_self.into_inner(), &rhs) + .into(); + output + } + fn rem( + _self: Val<bevy::math::I8Vec4>, + rhs: Val<bevy::math::I8Vec4>, + ) -> Val<bevy::math::I8Vec4> { + let output: Val<bevy::math::I8Vec4> = <bevy::math::I8Vec4 as ::core::ops::Rem< + bevy::math::I8Vec4, + >>::rem(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + fn rem(_self: Val<bevy::math::I8Vec4>, rhs: i8) -> Val<bevy::math::I8Vec4> { + let output: Val<bevy::math::I8Vec4> = <bevy::math::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<bevy::math::I8Vec4>, + rhs: Val<bevy::math::I8Vec4>, + ) -> Val<bevy::math::I8Vec4> { + let output: Val<bevy::math::I8Vec4> = bevy::math::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<bevy::math::I8Vec4>, + rhs: Val<bevy::math::I8Vec4>, + ) -> Val<bevy::math::I8Vec4> { + let output: Val<bevy::math::I8Vec4> = bevy::math::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<bevy::math::I8Vec4>, rhs: Val<bevy::math::U8Vec4>, ) -> Val<bevy::math::I8Vec4> { let output: Val<bevy::math::I8Vec4> = bevy::math::I8Vec4::saturating_add_unsigned( @@ -5502,6 +6903,33 @@ impl bevy::math::I8Vec4 { let output: Val<bevy::math::I8Vec4> = bevy::math::I8Vec4::splat(v).into(); output } + fn sub( + _self: Val<bevy::math::I8Vec4>, + rhs: Ref<bevy::math::I8Vec4>, + ) -> Val<bevy::math::I8Vec4> { + let output: Val<bevy::math::I8Vec4> = <bevy::math::I8Vec4 as ::core::ops::Sub< + &bevy::math::I8Vec4, + >>::sub(_self.into_inner(), &rhs) + .into(); + output + } + fn sub( + _self: Val<bevy::math::I8Vec4>, + rhs: Val<bevy::math::I8Vec4>, + ) -> Val<bevy::math::I8Vec4> { + let output: Val<bevy::math::I8Vec4> = <bevy::math::I8Vec4 as ::core::ops::Sub< + bevy::math::I8Vec4, + >>::sub(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + fn sub(_self: Val<bevy::math::I8Vec4>, rhs: i8) -> Val<bevy::math::I8Vec4> { + let output: Val<bevy::math::I8Vec4> = <bevy::math::I8Vec4 as ::core::ops::Sub< + i8, + >>::sub(_self.into_inner(), rhs) + .into(); + output + } /// `[x, y, z, w]` fn to_array(_self: Ref<bevy::math::I8Vec4>) -> [i8; 4] { let output: [i8; 4] = bevy::math::I8Vec4::to_array(&_self).into(); @@ -5646,6 +7074,33 @@ impl bevy::math::I16Vec2 { .into(); output } + fn add( + _self: Val<bevy::math::I16Vec2>, + rhs: Ref<bevy::math::I16Vec2>, + ) -> Val<bevy::math::I16Vec2> { + let output: Val<bevy::math::I16Vec2> = <bevy::math::I16Vec2 as ::core::ops::Add< + &bevy::math::I16Vec2, + >>::add(_self.into_inner(), &rhs) + .into(); + output + } + fn add( + _self: Val<bevy::math::I16Vec2>, + rhs: Val<bevy::math::I16Vec2>, + ) -> Val<bevy::math::I16Vec2> { + let output: Val<bevy::math::I16Vec2> = <bevy::math::I16Vec2 as ::core::ops::Add< + bevy::math::I16Vec2, + >>::add(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + fn add(_self: Val<bevy::math::I16Vec2>, rhs: i16) -> Val<bevy::math::I16Vec2> { + let output: Val<bevy::math::I16Vec2> = <bevy::math::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<bevy::math::I16Vec2>) -> Val<bevy::math::DVec2> { let output: Val<bevy::math::DVec2> = bevy::math::I16Vec2::as_dvec2(&_self) @@ -5699,6 +7154,13 @@ impl bevy::math::I16Vec2 { let output: Val<bevy::math::Vec2> = bevy::math::I16Vec2::as_vec2(&_self).into(); output } + fn assert_receiver_is_total_eq(_self: Ref<bevy::math::I16Vec2>) -> () { + let output: () = <bevy::math::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 @@ -5716,6 +7178,13 @@ impl bevy::math::I16Vec2 { .into(); output } + fn clone(_self: Ref<bevy::math::I16Vec2>) -> Val<bevy::math::I16Vec2> { + let output: Val<bevy::math::I16Vec2> = <bevy::math::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 @@ -5818,6 +7287,33 @@ impl bevy::math::I16Vec2 { .into(); output } + fn div( + _self: Val<bevy::math::I16Vec2>, + rhs: Ref<bevy::math::I16Vec2>, + ) -> Val<bevy::math::I16Vec2> { + let output: Val<bevy::math::I16Vec2> = <bevy::math::I16Vec2 as ::core::ops::Div< + &bevy::math::I16Vec2, + >>::div(_self.into_inner(), &rhs) + .into(); + output + } + fn div( + _self: Val<bevy::math::I16Vec2>, + rhs: Val<bevy::math::I16Vec2>, + ) -> Val<bevy::math::I16Vec2> { + let output: Val<bevy::math::I16Vec2> = <bevy::math::I16Vec2 as ::core::ops::Div< + bevy::math::I16Vec2, + >>::div(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + fn div(_self: Val<bevy::math::I16Vec2>, rhs: i16) -> Val<bevy::math::I16Vec2> { + let output: Val<bevy::math::I16Vec2> = <bevy::math::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. @@ -5863,6 +7359,13 @@ impl bevy::math::I16Vec2 { let output: i16 = bevy::math::I16Vec2::element_sum(_self.into_inner()).into(); output } + fn eq(_self: Ref<bevy::math::I16Vec2>, other: Ref<bevy::math::I16Vec2>) -> bool { + let output: bool = <bevy::math::I16Vec2 as ::core::cmp::PartialEq< + bevy::math::I16Vec2, + >>::eq(&_self, &other) + .into(); + output + } /// Creates a 3D vector from `self` and the given `z` value. fn extend(_self: Val<bevy::math::I16Vec2>, z: i16) -> Val<bevy::math::I16Vec3> { let output: Val<bevy::math::I16Vec3> = bevy::math::I16Vec2::extend( @@ -5928,6 +7431,40 @@ impl bevy::math::I16Vec2 { let output: i16 = bevy::math::I16Vec2::min_element(_self.into_inner()).into(); output } + fn mul( + _self: Val<bevy::math::I16Vec2>, + rhs: Ref<bevy::math::I16Vec2>, + ) -> Val<bevy::math::I16Vec2> { + let output: Val<bevy::math::I16Vec2> = <bevy::math::I16Vec2 as ::core::ops::Mul< + &bevy::math::I16Vec2, + >>::mul(_self.into_inner(), &rhs) + .into(); + output + } + fn mul( + _self: Val<bevy::math::I16Vec2>, + rhs: Val<bevy::math::I16Vec2>, + ) -> Val<bevy::math::I16Vec2> { + let output: Val<bevy::math::I16Vec2> = <bevy::math::I16Vec2 as ::core::ops::Mul< + bevy::math::I16Vec2, + >>::mul(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + fn mul(_self: Val<bevy::math::I16Vec2>, rhs: i16) -> Val<bevy::math::I16Vec2> { + let output: Val<bevy::math::I16Vec2> = <bevy::math::I16Vec2 as ::core::ops::Mul< + i16, + >>::mul(_self.into_inner(), rhs) + .into(); + output + } + fn neg(_self: Val<bevy::math::I16Vec2>) -> Val<bevy::math::I16Vec2> { + let output: Val<bevy::math::I16Vec2> = <bevy::math::I16Vec2 as ::core::ops::Neg>::neg( + _self.into_inner(), + ) + .into(); + output + } /// Creates a new vector. fn new(x: i16, y: i16) -> Val<bevy::math::I16Vec2> { let output: Val<bevy::math::I16Vec2> = bevy::math::I16Vec2::new(x, y).into(); @@ -5951,6 +7488,33 @@ impl bevy::math::I16Vec2 { .into(); output } + fn rem( + _self: Val<bevy::math::I16Vec2>, + rhs: Ref<bevy::math::I16Vec2>, + ) -> Val<bevy::math::I16Vec2> { + let output: Val<bevy::math::I16Vec2> = <bevy::math::I16Vec2 as ::core::ops::Rem< + &bevy::math::I16Vec2, + >>::rem(_self.into_inner(), &rhs) + .into(); + output + } + fn rem( + _self: Val<bevy::math::I16Vec2>, + rhs: Val<bevy::math::I16Vec2>, + ) -> Val<bevy::math::I16Vec2> { + let output: Val<bevy::math::I16Vec2> = <bevy::math::I16Vec2 as ::core::ops::Rem< + bevy::math::I16Vec2, + >>::rem(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + fn rem(_self: Val<bevy::math::I16Vec2>, rhs: i16) -> Val<bevy::math::I16Vec2> { + let output: Val<bevy::math::I16Vec2> = <bevy::math::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. @@ -6090,6 +7654,33 @@ impl bevy::math::I16Vec2 { let output: Val<bevy::math::I16Vec2> = bevy::math::I16Vec2::splat(v).into(); output } + fn sub( + _self: Val<bevy::math::I16Vec2>, + rhs: Ref<bevy::math::I16Vec2>, + ) -> Val<bevy::math::I16Vec2> { + let output: Val<bevy::math::I16Vec2> = <bevy::math::I16Vec2 as ::core::ops::Sub< + &bevy::math::I16Vec2, + >>::sub(_self.into_inner(), &rhs) + .into(); + output + } + fn sub( + _self: Val<bevy::math::I16Vec2>, + rhs: Val<bevy::math::I16Vec2>, + ) -> Val<bevy::math::I16Vec2> { + let output: Val<bevy::math::I16Vec2> = <bevy::math::I16Vec2 as ::core::ops::Sub< + bevy::math::I16Vec2, + >>::sub(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + fn sub(_self: Val<bevy::math::I16Vec2>, rhs: i16) -> Val<bevy::math::I16Vec2> { + let output: Val<bevy::math::I16Vec2> = <bevy::math::I16Vec2 as ::core::ops::Sub< + i16, + >>::sub(_self.into_inner(), rhs) + .into(); + output + } /// `[x, y]` fn to_array(_self: Ref<bevy::math::I16Vec2>) -> [i16; 2] { let output: [i16; 2] = bevy::math::I16Vec2::to_array(&_self).into(); @@ -6207,6 +7798,33 @@ impl bevy::math::I16Vec3 { .into(); output } + fn add( + _self: Val<bevy::math::I16Vec3>, + rhs: Ref<bevy::math::I16Vec3>, + ) -> Val<bevy::math::I16Vec3> { + let output: Val<bevy::math::I16Vec3> = <bevy::math::I16Vec3 as ::core::ops::Add< + &bevy::math::I16Vec3, + >>::add(_self.into_inner(), &rhs) + .into(); + output + } + fn add( + _self: Val<bevy::math::I16Vec3>, + rhs: Val<bevy::math::I16Vec3>, + ) -> Val<bevy::math::I16Vec3> { + let output: Val<bevy::math::I16Vec3> = <bevy::math::I16Vec3 as ::core::ops::Add< + bevy::math::I16Vec3, + >>::add(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + fn add(_self: Val<bevy::math::I16Vec3>, rhs: i16) -> Val<bevy::math::I16Vec3> { + let output: Val<bevy::math::I16Vec3> = <bevy::math::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<bevy::math::I16Vec3>) -> Val<bevy::math::DVec3> { let output: Val<bevy::math::DVec3> = bevy::math::I16Vec3::as_dvec3(&_self) @@ -6266,6 +7884,13 @@ impl bevy::math::I16Vec3 { .into(); output } + fn assert_receiver_is_total_eq(_self: Ref<bevy::math::I16Vec3>) -> () { + let output: () = <bevy::math::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 @@ -6283,6 +7908,13 @@ impl bevy::math::I16Vec3 { .into(); output } + fn clone(_self: Ref<bevy::math::I16Vec3>) -> Val<bevy::math::I16Vec3> { + let output: Val<bevy::math::I16Vec3> = <bevy::math::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 @@ -6397,6 +8029,33 @@ impl bevy::math::I16Vec3 { .into(); output } + fn div( + _self: Val<bevy::math::I16Vec3>, + rhs: Ref<bevy::math::I16Vec3>, + ) -> Val<bevy::math::I16Vec3> { + let output: Val<bevy::math::I16Vec3> = <bevy::math::I16Vec3 as ::core::ops::Div< + &bevy::math::I16Vec3, + >>::div(_self.into_inner(), &rhs) + .into(); + output + } + fn div( + _self: Val<bevy::math::I16Vec3>, + rhs: Val<bevy::math::I16Vec3>, + ) -> Val<bevy::math::I16Vec3> { + let output: Val<bevy::math::I16Vec3> = <bevy::math::I16Vec3 as ::core::ops::Div< + bevy::math::I16Vec3, + >>::div(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + fn div(_self: Val<bevy::math::I16Vec3>, rhs: i16) -> Val<bevy::math::I16Vec3> { + let output: Val<bevy::math::I16Vec3> = <bevy::math::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. @@ -6442,6 +8101,13 @@ impl bevy::math::I16Vec3 { let output: i16 = bevy::math::I16Vec3::element_sum(_self.into_inner()).into(); output } + fn eq(_self: Ref<bevy::math::I16Vec3>, other: Ref<bevy::math::I16Vec3>) -> bool { + let output: bool = <bevy::math::I16Vec3 as ::core::cmp::PartialEq< + bevy::math::I16Vec3, + >>::eq(&_self, &other) + .into(); + output + } /// Creates a 4D vector from `self` and the given `w` value. fn extend(_self: Val<bevy::math::I16Vec3>, w: i16) -> Val<bevy::math::I16Vec4> { let output: Val<bevy::math::I16Vec4> = bevy::math::I16Vec3::extend( @@ -6507,11 +8173,72 @@ impl bevy::math::I16Vec3 { let output: i16 = bevy::math::I16Vec3::min_element(_self.into_inner()).into(); output } + fn mul( + _self: Val<bevy::math::I16Vec3>, + rhs: Ref<bevy::math::I16Vec3>, + ) -> Val<bevy::math::I16Vec3> { + let output: Val<bevy::math::I16Vec3> = <bevy::math::I16Vec3 as ::core::ops::Mul< + &bevy::math::I16Vec3, + >>::mul(_self.into_inner(), &rhs) + .into(); + output + } + fn mul( + _self: Val<bevy::math::I16Vec3>, + rhs: Val<bevy::math::I16Vec3>, + ) -> Val<bevy::math::I16Vec3> { + let output: Val<bevy::math::I16Vec3> = <bevy::math::I16Vec3 as ::core::ops::Mul< + bevy::math::I16Vec3, + >>::mul(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + fn mul(_self: Val<bevy::math::I16Vec3>, rhs: i16) -> Val<bevy::math::I16Vec3> { + let output: Val<bevy::math::I16Vec3> = <bevy::math::I16Vec3 as ::core::ops::Mul< + i16, + >>::mul(_self.into_inner(), rhs) + .into(); + output + } + fn neg(_self: Val<bevy::math::I16Vec3>) -> Val<bevy::math::I16Vec3> { + let output: Val<bevy::math::I16Vec3> = <bevy::math::I16Vec3 as ::core::ops::Neg>::neg( + _self.into_inner(), + ) + .into(); + output + } /// Creates a new vector. fn new(x: i16, y: i16, z: i16) -> Val<bevy::math::I16Vec3> { let output: Val<bevy::math::I16Vec3> = bevy::math::I16Vec3::new(x, y, z).into(); output } + fn rem( + _self: Val<bevy::math::I16Vec3>, + rhs: Ref<bevy::math::I16Vec3>, + ) -> Val<bevy::math::I16Vec3> { + let output: Val<bevy::math::I16Vec3> = <bevy::math::I16Vec3 as ::core::ops::Rem< + &bevy::math::I16Vec3, + >>::rem(_self.into_inner(), &rhs) + .into(); + output + } + fn rem( + _self: Val<bevy::math::I16Vec3>, + rhs: Val<bevy::math::I16Vec3>, + ) -> Val<bevy::math::I16Vec3> { + let output: Val<bevy::math::I16Vec3> = <bevy::math::I16Vec3 as ::core::ops::Rem< + bevy::math::I16Vec3, + >>::rem(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + fn rem(_self: Val<bevy::math::I16Vec3>, rhs: i16) -> Val<bevy::math::I16Vec3> { + let output: Val<bevy::math::I16Vec3> = <bevy::math::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. @@ -6637,6 +8364,33 @@ impl bevy::math::I16Vec3 { let output: Val<bevy::math::I16Vec3> = bevy::math::I16Vec3::splat(v).into(); output } + fn sub( + _self: Val<bevy::math::I16Vec3>, + rhs: Ref<bevy::math::I16Vec3>, + ) -> Val<bevy::math::I16Vec3> { + let output: Val<bevy::math::I16Vec3> = <bevy::math::I16Vec3 as ::core::ops::Sub< + &bevy::math::I16Vec3, + >>::sub(_self.into_inner(), &rhs) + .into(); + output + } + fn sub( + _self: Val<bevy::math::I16Vec3>, + rhs: Val<bevy::math::I16Vec3>, + ) -> Val<bevy::math::I16Vec3> { + let output: Val<bevy::math::I16Vec3> = <bevy::math::I16Vec3 as ::core::ops::Sub< + bevy::math::I16Vec3, + >>::sub(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + fn sub(_self: Val<bevy::math::I16Vec3>, rhs: i16) -> Val<bevy::math::I16Vec3> { + let output: Val<bevy::math::I16Vec3> = <bevy::math::I16Vec3 as ::core::ops::Sub< + i16, + >>::sub(_self.into_inner(), rhs) + .into(); + output + } /// `[x, y, z]` fn to_array(_self: Ref<bevy::math::I16Vec3>) -> [i16; 3] { let output: [i16; 3] = bevy::math::I16Vec3::to_array(&_self).into(); @@ -6772,15 +8526,42 @@ impl bevy::math::I16Vec4 { .into(); output } - /// Casts all elements of `self` to `f64`. - fn as_dvec4(_self: Ref<bevy::math::I16Vec4>) -> Val<bevy::math::DVec4> { - let output: Val<bevy::math::DVec4> = bevy::math::I16Vec4::as_dvec4(&_self) + fn add( + _self: Val<bevy::math::I16Vec4>, + rhs: Ref<bevy::math::I16Vec4>, + ) -> Val<bevy::math::I16Vec4> { + let output: Val<bevy::math::I16Vec4> = <bevy::math::I16Vec4 as ::core::ops::Add< + &bevy::math::I16Vec4, + >>::add(_self.into_inner(), &rhs) .into(); output } - /// Casts all elements of `self` to `i64`. - fn as_i64vec4(_self: Ref<bevy::math::I16Vec4>) -> Val<bevy::math::I64Vec4> { - let output: Val<bevy::math::I64Vec4> = bevy::math::I16Vec4::as_i64vec4(&_self) + fn add( + _self: Val<bevy::math::I16Vec4>, + rhs: Val<bevy::math::I16Vec4>, + ) -> Val<bevy::math::I16Vec4> { + let output: Val<bevy::math::I16Vec4> = <bevy::math::I16Vec4 as ::core::ops::Add< + bevy::math::I16Vec4, + >>::add(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + fn add(_self: Val<bevy::math::I16Vec4>, rhs: i16) -> Val<bevy::math::I16Vec4> { + let output: Val<bevy::math::I16Vec4> = <bevy::math::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<bevy::math::I16Vec4>) -> Val<bevy::math::DVec4> { + let output: Val<bevy::math::DVec4> = bevy::math::I16Vec4::as_dvec4(&_self) + .into(); + output + } + /// Casts all elements of `self` to `i64`. + fn as_i64vec4(_self: Ref<bevy::math::I16Vec4>) -> Val<bevy::math::I64Vec4> { + let output: Val<bevy::math::I64Vec4> = bevy::math::I16Vec4::as_i64vec4(&_self) .into(); output } @@ -6825,6 +8606,13 @@ impl bevy::math::I16Vec4 { let output: Val<bevy::math::Vec4> = bevy::math::I16Vec4::as_vec4(&_self).into(); output } + fn assert_receiver_is_total_eq(_self: Ref<bevy::math::I16Vec4>) -> () { + let output: () = <bevy::math::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 @@ -6842,6 +8630,13 @@ impl bevy::math::I16Vec4 { .into(); output } + fn clone(_self: Ref<bevy::math::I16Vec4>) -> Val<bevy::math::I16Vec4> { + let output: Val<bevy::math::I16Vec4> = <bevy::math::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 @@ -6944,6 +8739,33 @@ impl bevy::math::I16Vec4 { .into(); output } + fn div( + _self: Val<bevy::math::I16Vec4>, + rhs: Ref<bevy::math::I16Vec4>, + ) -> Val<bevy::math::I16Vec4> { + let output: Val<bevy::math::I16Vec4> = <bevy::math::I16Vec4 as ::core::ops::Div< + &bevy::math::I16Vec4, + >>::div(_self.into_inner(), &rhs) + .into(); + output + } + fn div( + _self: Val<bevy::math::I16Vec4>, + rhs: Val<bevy::math::I16Vec4>, + ) -> Val<bevy::math::I16Vec4> { + let output: Val<bevy::math::I16Vec4> = <bevy::math::I16Vec4 as ::core::ops::Div< + bevy::math::I16Vec4, + >>::div(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + fn div(_self: Val<bevy::math::I16Vec4>, rhs: i16) -> Val<bevy::math::I16Vec4> { + let output: Val<bevy::math::I16Vec4> = <bevy::math::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. @@ -6989,6 +8811,13 @@ impl bevy::math::I16Vec4 { let output: i16 = bevy::math::I16Vec4::element_sum(_self.into_inner()).into(); output } + fn eq(_self: Ref<bevy::math::I16Vec4>, other: Ref<bevy::math::I16Vec4>) -> bool { + let output: bool = <bevy::math::I16Vec4 as ::core::cmp::PartialEq< + bevy::math::I16Vec4, + >>::eq(&_self, &other) + .into(); + output + } /// Creates a new vector from an array. fn from_array(a: [i16; 4]) -> Val<bevy::math::I16Vec4> { let output: Val<bevy::math::I16Vec4> = bevy::math::I16Vec4::from_array(a).into(); @@ -7045,12 +8874,73 @@ impl bevy::math::I16Vec4 { let output: i16 = bevy::math::I16Vec4::min_element(_self.into_inner()).into(); output } + fn mul( + _self: Val<bevy::math::I16Vec4>, + rhs: Ref<bevy::math::I16Vec4>, + ) -> Val<bevy::math::I16Vec4> { + let output: Val<bevy::math::I16Vec4> = <bevy::math::I16Vec4 as ::core::ops::Mul< + &bevy::math::I16Vec4, + >>::mul(_self.into_inner(), &rhs) + .into(); + output + } + fn mul( + _self: Val<bevy::math::I16Vec4>, + rhs: Val<bevy::math::I16Vec4>, + ) -> Val<bevy::math::I16Vec4> { + let output: Val<bevy::math::I16Vec4> = <bevy::math::I16Vec4 as ::core::ops::Mul< + bevy::math::I16Vec4, + >>::mul(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + fn mul(_self: Val<bevy::math::I16Vec4>, rhs: i16) -> Val<bevy::math::I16Vec4> { + let output: Val<bevy::math::I16Vec4> = <bevy::math::I16Vec4 as ::core::ops::Mul< + i16, + >>::mul(_self.into_inner(), rhs) + .into(); + output + } + fn neg(_self: Val<bevy::math::I16Vec4>) -> Val<bevy::math::I16Vec4> { + let output: Val<bevy::math::I16Vec4> = <bevy::math::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<bevy::math::I16Vec4> { let output: Val<bevy::math::I16Vec4> = bevy::math::I16Vec4::new(x, y, z, w) .into(); output } + fn rem( + _self: Val<bevy::math::I16Vec4>, + rhs: Ref<bevy::math::I16Vec4>, + ) -> Val<bevy::math::I16Vec4> { + let output: Val<bevy::math::I16Vec4> = <bevy::math::I16Vec4 as ::core::ops::Rem< + &bevy::math::I16Vec4, + >>::rem(_self.into_inner(), &rhs) + .into(); + output + } + fn rem( + _self: Val<bevy::math::I16Vec4>, + rhs: Val<bevy::math::I16Vec4>, + ) -> Val<bevy::math::I16Vec4> { + let output: Val<bevy::math::I16Vec4> = <bevy::math::I16Vec4 as ::core::ops::Rem< + bevy::math::I16Vec4, + >>::rem(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + fn rem(_self: Val<bevy::math::I16Vec4>, rhs: i16) -> Val<bevy::math::I16Vec4> { + let output: Val<bevy::math::I16Vec4> = <bevy::math::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. @@ -7176,6 +9066,33 @@ impl bevy::math::I16Vec4 { let output: Val<bevy::math::I16Vec4> = bevy::math::I16Vec4::splat(v).into(); output } + fn sub( + _self: Val<bevy::math::I16Vec4>, + rhs: Ref<bevy::math::I16Vec4>, + ) -> Val<bevy::math::I16Vec4> { + let output: Val<bevy::math::I16Vec4> = <bevy::math::I16Vec4 as ::core::ops::Sub< + &bevy::math::I16Vec4, + >>::sub(_self.into_inner(), &rhs) + .into(); + output + } + fn sub( + _self: Val<bevy::math::I16Vec4>, + rhs: Val<bevy::math::I16Vec4>, + ) -> Val<bevy::math::I16Vec4> { + let output: Val<bevy::math::I16Vec4> = <bevy::math::I16Vec4 as ::core::ops::Sub< + bevy::math::I16Vec4, + >>::sub(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + fn sub(_self: Val<bevy::math::I16Vec4>, rhs: i16) -> Val<bevy::math::I16Vec4> { + let output: Val<bevy::math::I16Vec4> = <bevy::math::I16Vec4 as ::core::ops::Sub< + i16, + >>::sub(_self.into_inner(), rhs) + .into(); + output + } /// `[x, y, z, w]` fn to_array(_self: Ref<bevy::math::I16Vec4>) -> [i16; 4] { let output: [i16; 4] = bevy::math::I16Vec4::to_array(&_self).into(); @@ -7320,6 +9237,33 @@ impl bevy::math::I64Vec2 { .into(); output } + fn add( + _self: Val<bevy::math::I64Vec2>, + rhs: Ref<bevy::math::I64Vec2>, + ) -> Val<bevy::math::I64Vec2> { + let output: Val<bevy::math::I64Vec2> = <bevy::math::I64Vec2 as ::core::ops::Add< + &bevy::math::I64Vec2, + >>::add(_self.into_inner(), &rhs) + .into(); + output + } + fn add( + _self: Val<bevy::math::I64Vec2>, + rhs: Val<bevy::math::I64Vec2>, + ) -> Val<bevy::math::I64Vec2> { + let output: Val<bevy::math::I64Vec2> = <bevy::math::I64Vec2 as ::core::ops::Add< + bevy::math::I64Vec2, + >>::add(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + fn add(_self: Val<bevy::math::I64Vec2>, rhs: i64) -> Val<bevy::math::I64Vec2> { + let output: Val<bevy::math::I64Vec2> = <bevy::math::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<bevy::math::I64Vec2>) -> Val<bevy::math::DVec2> { let output: Val<bevy::math::DVec2> = bevy::math::I64Vec2::as_dvec2(&_self) @@ -7373,6 +9317,13 @@ impl bevy::math::I64Vec2 { let output: Val<bevy::math::Vec2> = bevy::math::I64Vec2::as_vec2(&_self).into(); output } + fn assert_receiver_is_total_eq(_self: Ref<bevy::math::I64Vec2>) -> () { + let output: () = <bevy::math::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 @@ -7390,6 +9341,13 @@ impl bevy::math::I64Vec2 { .into(); output } + fn clone(_self: Ref<bevy::math::I64Vec2>) -> Val<bevy::math::I64Vec2> { + let output: Val<bevy::math::I64Vec2> = <bevy::math::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 @@ -7492,6 +9450,33 @@ impl bevy::math::I64Vec2 { .into(); output } + fn div( + _self: Val<bevy::math::I64Vec2>, + rhs: Ref<bevy::math::I64Vec2>, + ) -> Val<bevy::math::I64Vec2> { + let output: Val<bevy::math::I64Vec2> = <bevy::math::I64Vec2 as ::core::ops::Div< + &bevy::math::I64Vec2, + >>::div(_self.into_inner(), &rhs) + .into(); + output + } + fn div( + _self: Val<bevy::math::I64Vec2>, + rhs: Val<bevy::math::I64Vec2>, + ) -> Val<bevy::math::I64Vec2> { + let output: Val<bevy::math::I64Vec2> = <bevy::math::I64Vec2 as ::core::ops::Div< + bevy::math::I64Vec2, + >>::div(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + fn div(_self: Val<bevy::math::I64Vec2>, rhs: i64) -> Val<bevy::math::I64Vec2> { + let output: Val<bevy::math::I64Vec2> = <bevy::math::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. @@ -7537,6 +9522,13 @@ impl bevy::math::I64Vec2 { let output: i64 = bevy::math::I64Vec2::element_sum(_self.into_inner()).into(); output } + fn eq(_self: Ref<bevy::math::I64Vec2>, other: Ref<bevy::math::I64Vec2>) -> bool { + let output: bool = <bevy::math::I64Vec2 as ::core::cmp::PartialEq< + bevy::math::I64Vec2, + >>::eq(&_self, &other) + .into(); + output + } /// Creates a 3D vector from `self` and the given `z` value. fn extend(_self: Val<bevy::math::I64Vec2>, z: i64) -> Val<bevy::math::I64Vec3> { let output: Val<bevy::math::I64Vec3> = bevy::math::I64Vec2::extend( @@ -7602,6 +9594,40 @@ impl bevy::math::I64Vec2 { let output: i64 = bevy::math::I64Vec2::min_element(_self.into_inner()).into(); output } + fn mul( + _self: Val<bevy::math::I64Vec2>, + rhs: Ref<bevy::math::I64Vec2>, + ) -> Val<bevy::math::I64Vec2> { + let output: Val<bevy::math::I64Vec2> = <bevy::math::I64Vec2 as ::core::ops::Mul< + &bevy::math::I64Vec2, + >>::mul(_self.into_inner(), &rhs) + .into(); + output + } + fn mul( + _self: Val<bevy::math::I64Vec2>, + rhs: Val<bevy::math::I64Vec2>, + ) -> Val<bevy::math::I64Vec2> { + let output: Val<bevy::math::I64Vec2> = <bevy::math::I64Vec2 as ::core::ops::Mul< + bevy::math::I64Vec2, + >>::mul(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + fn mul(_self: Val<bevy::math::I64Vec2>, rhs: i64) -> Val<bevy::math::I64Vec2> { + let output: Val<bevy::math::I64Vec2> = <bevy::math::I64Vec2 as ::core::ops::Mul< + i64, + >>::mul(_self.into_inner(), rhs) + .into(); + output + } + fn neg(_self: Val<bevy::math::I64Vec2>) -> Val<bevy::math::I64Vec2> { + let output: Val<bevy::math::I64Vec2> = <bevy::math::I64Vec2 as ::core::ops::Neg>::neg( + _self.into_inner(), + ) + .into(); + output + } /// Creates a new vector. fn new(x: i64, y: i64) -> Val<bevy::math::I64Vec2> { let output: Val<bevy::math::I64Vec2> = bevy::math::I64Vec2::new(x, y).into(); @@ -7625,6 +9651,33 @@ impl bevy::math::I64Vec2 { .into(); output } + fn rem( + _self: Val<bevy::math::I64Vec2>, + rhs: Ref<bevy::math::I64Vec2>, + ) -> Val<bevy::math::I64Vec2> { + let output: Val<bevy::math::I64Vec2> = <bevy::math::I64Vec2 as ::core::ops::Rem< + &bevy::math::I64Vec2, + >>::rem(_self.into_inner(), &rhs) + .into(); + output + } + fn rem( + _self: Val<bevy::math::I64Vec2>, + rhs: Val<bevy::math::I64Vec2>, + ) -> Val<bevy::math::I64Vec2> { + let output: Val<bevy::math::I64Vec2> = <bevy::math::I64Vec2 as ::core::ops::Rem< + bevy::math::I64Vec2, + >>::rem(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + fn rem(_self: Val<bevy::math::I64Vec2>, rhs: i64) -> Val<bevy::math::I64Vec2> { + let output: Val<bevy::math::I64Vec2> = <bevy::math::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. @@ -7764,6 +9817,33 @@ impl bevy::math::I64Vec2 { let output: Val<bevy::math::I64Vec2> = bevy::math::I64Vec2::splat(v).into(); output } + fn sub( + _self: Val<bevy::math::I64Vec2>, + rhs: Ref<bevy::math::I64Vec2>, + ) -> Val<bevy::math::I64Vec2> { + let output: Val<bevy::math::I64Vec2> = <bevy::math::I64Vec2 as ::core::ops::Sub< + &bevy::math::I64Vec2, + >>::sub(_self.into_inner(), &rhs) + .into(); + output + } + fn sub( + _self: Val<bevy::math::I64Vec2>, + rhs: Val<bevy::math::I64Vec2>, + ) -> Val<bevy::math::I64Vec2> { + let output: Val<bevy::math::I64Vec2> = <bevy::math::I64Vec2 as ::core::ops::Sub< + bevy::math::I64Vec2, + >>::sub(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + fn sub(_self: Val<bevy::math::I64Vec2>, rhs: i64) -> Val<bevy::math::I64Vec2> { + let output: Val<bevy::math::I64Vec2> = <bevy::math::I64Vec2 as ::core::ops::Sub< + i64, + >>::sub(_self.into_inner(), rhs) + .into(); + output + } /// `[x, y]` fn to_array(_self: Ref<bevy::math::I64Vec2>) -> [i64; 2] { let output: [i64; 2] = bevy::math::I64Vec2::to_array(&_self).into(); @@ -7881,6 +9961,33 @@ impl bevy::math::I64Vec3 { .into(); output } + fn add( + _self: Val<bevy::math::I64Vec3>, + rhs: Ref<bevy::math::I64Vec3>, + ) -> Val<bevy::math::I64Vec3> { + let output: Val<bevy::math::I64Vec3> = <bevy::math::I64Vec3 as ::core::ops::Add< + &bevy::math::I64Vec3, + >>::add(_self.into_inner(), &rhs) + .into(); + output + } + fn add( + _self: Val<bevy::math::I64Vec3>, + rhs: Val<bevy::math::I64Vec3>, + ) -> Val<bevy::math::I64Vec3> { + let output: Val<bevy::math::I64Vec3> = <bevy::math::I64Vec3 as ::core::ops::Add< + bevy::math::I64Vec3, + >>::add(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + fn add(_self: Val<bevy::math::I64Vec3>, rhs: i64) -> Val<bevy::math::I64Vec3> { + let output: Val<bevy::math::I64Vec3> = <bevy::math::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<bevy::math::I64Vec3>) -> Val<bevy::math::DVec3> { let output: Val<bevy::math::DVec3> = bevy::math::I64Vec3::as_dvec3(&_self) @@ -7940,6 +10047,13 @@ impl bevy::math::I64Vec3 { .into(); output } + fn assert_receiver_is_total_eq(_self: Ref<bevy::math::I64Vec3>) -> () { + let output: () = <bevy::math::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 @@ -7957,6 +10071,13 @@ impl bevy::math::I64Vec3 { .into(); output } + fn clone(_self: Ref<bevy::math::I64Vec3>) -> Val<bevy::math::I64Vec3> { + let output: Val<bevy::math::I64Vec3> = <bevy::math::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 @@ -8071,6 +10192,33 @@ impl bevy::math::I64Vec3 { .into(); output } + fn div( + _self: Val<bevy::math::I64Vec3>, + rhs: Ref<bevy::math::I64Vec3>, + ) -> Val<bevy::math::I64Vec3> { + let output: Val<bevy::math::I64Vec3> = <bevy::math::I64Vec3 as ::core::ops::Div< + &bevy::math::I64Vec3, + >>::div(_self.into_inner(), &rhs) + .into(); + output + } + fn div( + _self: Val<bevy::math::I64Vec3>, + rhs: Val<bevy::math::I64Vec3>, + ) -> Val<bevy::math::I64Vec3> { + let output: Val<bevy::math::I64Vec3> = <bevy::math::I64Vec3 as ::core::ops::Div< + bevy::math::I64Vec3, + >>::div(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + fn div(_self: Val<bevy::math::I64Vec3>, rhs: i64) -> Val<bevy::math::I64Vec3> { + let output: Val<bevy::math::I64Vec3> = <bevy::math::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. @@ -8116,6 +10264,13 @@ impl bevy::math::I64Vec3 { let output: i64 = bevy::math::I64Vec3::element_sum(_self.into_inner()).into(); output } + fn eq(_self: Ref<bevy::math::I64Vec3>, other: Ref<bevy::math::I64Vec3>) -> bool { + let output: bool = <bevy::math::I64Vec3 as ::core::cmp::PartialEq< + bevy::math::I64Vec3, + >>::eq(&_self, &other) + .into(); + output + } /// Creates a 4D vector from `self` and the given `w` value. fn extend(_self: Val<bevy::math::I64Vec3>, w: i64) -> Val<bevy::math::I64Vec4> { let output: Val<bevy::math::I64Vec4> = bevy::math::I64Vec3::extend( @@ -8181,11 +10336,72 @@ impl bevy::math::I64Vec3 { let output: i64 = bevy::math::I64Vec3::min_element(_self.into_inner()).into(); output } + fn mul( + _self: Val<bevy::math::I64Vec3>, + rhs: Ref<bevy::math::I64Vec3>, + ) -> Val<bevy::math::I64Vec3> { + let output: Val<bevy::math::I64Vec3> = <bevy::math::I64Vec3 as ::core::ops::Mul< + &bevy::math::I64Vec3, + >>::mul(_self.into_inner(), &rhs) + .into(); + output + } + fn mul( + _self: Val<bevy::math::I64Vec3>, + rhs: Val<bevy::math::I64Vec3>, + ) -> Val<bevy::math::I64Vec3> { + let output: Val<bevy::math::I64Vec3> = <bevy::math::I64Vec3 as ::core::ops::Mul< + bevy::math::I64Vec3, + >>::mul(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + fn mul(_self: Val<bevy::math::I64Vec3>, rhs: i64) -> Val<bevy::math::I64Vec3> { + let output: Val<bevy::math::I64Vec3> = <bevy::math::I64Vec3 as ::core::ops::Mul< + i64, + >>::mul(_self.into_inner(), rhs) + .into(); + output + } + fn neg(_self: Val<bevy::math::I64Vec3>) -> Val<bevy::math::I64Vec3> { + let output: Val<bevy::math::I64Vec3> = <bevy::math::I64Vec3 as ::core::ops::Neg>::neg( + _self.into_inner(), + ) + .into(); + output + } /// Creates a new vector. fn new(x: i64, y: i64, z: i64) -> Val<bevy::math::I64Vec3> { let output: Val<bevy::math::I64Vec3> = bevy::math::I64Vec3::new(x, y, z).into(); output } + fn rem( + _self: Val<bevy::math::I64Vec3>, + rhs: Ref<bevy::math::I64Vec3>, + ) -> Val<bevy::math::I64Vec3> { + let output: Val<bevy::math::I64Vec3> = <bevy::math::I64Vec3 as ::core::ops::Rem< + &bevy::math::I64Vec3, + >>::rem(_self.into_inner(), &rhs) + .into(); + output + } + fn rem( + _self: Val<bevy::math::I64Vec3>, + rhs: Val<bevy::math::I64Vec3>, + ) -> Val<bevy::math::I64Vec3> { + let output: Val<bevy::math::I64Vec3> = <bevy::math::I64Vec3 as ::core::ops::Rem< + bevy::math::I64Vec3, + >>::rem(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + fn rem(_self: Val<bevy::math::I64Vec3>, rhs: i64) -> Val<bevy::math::I64Vec3> { + let output: Val<bevy::math::I64Vec3> = <bevy::math::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. @@ -8311,8 +10527,35 @@ impl bevy::math::I64Vec3 { let output: Val<bevy::math::I64Vec3> = bevy::math::I64Vec3::splat(v).into(); output } - /// `[x, y, z]` - fn to_array(_self: Ref<bevy::math::I64Vec3>) -> [i64; 3] { + fn sub( + _self: Val<bevy::math::I64Vec3>, + rhs: Ref<bevy::math::I64Vec3>, + ) -> Val<bevy::math::I64Vec3> { + let output: Val<bevy::math::I64Vec3> = <bevy::math::I64Vec3 as ::core::ops::Sub< + &bevy::math::I64Vec3, + >>::sub(_self.into_inner(), &rhs) + .into(); + output + } + fn sub( + _self: Val<bevy::math::I64Vec3>, + rhs: Val<bevy::math::I64Vec3>, + ) -> Val<bevy::math::I64Vec3> { + let output: Val<bevy::math::I64Vec3> = <bevy::math::I64Vec3 as ::core::ops::Sub< + bevy::math::I64Vec3, + >>::sub(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + fn sub(_self: Val<bevy::math::I64Vec3>, rhs: i64) -> Val<bevy::math::I64Vec3> { + let output: Val<bevy::math::I64Vec3> = <bevy::math::I64Vec3 as ::core::ops::Sub< + i64, + >>::sub(_self.into_inner(), rhs) + .into(); + output + } + /// `[x, y, z]` + fn to_array(_self: Ref<bevy::math::I64Vec3>) -> [i64; 3] { let output: [i64; 3] = bevy::math::I64Vec3::to_array(&_self).into(); output } @@ -8446,6 +10689,33 @@ impl bevy::math::I64Vec4 { .into(); output } + fn add( + _self: Val<bevy::math::I64Vec4>, + rhs: Ref<bevy::math::I64Vec4>, + ) -> Val<bevy::math::I64Vec4> { + let output: Val<bevy::math::I64Vec4> = <bevy::math::I64Vec4 as ::core::ops::Add< + &bevy::math::I64Vec4, + >>::add(_self.into_inner(), &rhs) + .into(); + output + } + fn add( + _self: Val<bevy::math::I64Vec4>, + rhs: Val<bevy::math::I64Vec4>, + ) -> Val<bevy::math::I64Vec4> { + let output: Val<bevy::math::I64Vec4> = <bevy::math::I64Vec4 as ::core::ops::Add< + bevy::math::I64Vec4, + >>::add(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + fn add(_self: Val<bevy::math::I64Vec4>, rhs: i64) -> Val<bevy::math::I64Vec4> { + let output: Val<bevy::math::I64Vec4> = <bevy::math::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<bevy::math::I64Vec4>) -> Val<bevy::math::DVec4> { let output: Val<bevy::math::DVec4> = bevy::math::I64Vec4::as_dvec4(&_self) @@ -8499,6 +10769,13 @@ impl bevy::math::I64Vec4 { let output: Val<bevy::math::Vec4> = bevy::math::I64Vec4::as_vec4(&_self).into(); output } + fn assert_receiver_is_total_eq(_self: Ref<bevy::math::I64Vec4>) -> () { + let output: () = <bevy::math::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 @@ -8516,6 +10793,13 @@ impl bevy::math::I64Vec4 { .into(); output } + fn clone(_self: Ref<bevy::math::I64Vec4>) -> Val<bevy::math::I64Vec4> { + let output: Val<bevy::math::I64Vec4> = <bevy::math::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 @@ -8618,6 +10902,33 @@ impl bevy::math::I64Vec4 { .into(); output } + fn div( + _self: Val<bevy::math::I64Vec4>, + rhs: Ref<bevy::math::I64Vec4>, + ) -> Val<bevy::math::I64Vec4> { + let output: Val<bevy::math::I64Vec4> = <bevy::math::I64Vec4 as ::core::ops::Div< + &bevy::math::I64Vec4, + >>::div(_self.into_inner(), &rhs) + .into(); + output + } + fn div( + _self: Val<bevy::math::I64Vec4>, + rhs: Val<bevy::math::I64Vec4>, + ) -> Val<bevy::math::I64Vec4> { + let output: Val<bevy::math::I64Vec4> = <bevy::math::I64Vec4 as ::core::ops::Div< + bevy::math::I64Vec4, + >>::div(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + fn div(_self: Val<bevy::math::I64Vec4>, rhs: i64) -> Val<bevy::math::I64Vec4> { + let output: Val<bevy::math::I64Vec4> = <bevy::math::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. @@ -8663,6 +10974,13 @@ impl bevy::math::I64Vec4 { let output: i64 = bevy::math::I64Vec4::element_sum(_self.into_inner()).into(); output } + fn eq(_self: Ref<bevy::math::I64Vec4>, other: Ref<bevy::math::I64Vec4>) -> bool { + let output: bool = <bevy::math::I64Vec4 as ::core::cmp::PartialEq< + bevy::math::I64Vec4, + >>::eq(&_self, &other) + .into(); + output + } /// Creates a new vector from an array. fn from_array(a: [i64; 4]) -> Val<bevy::math::I64Vec4> { let output: Val<bevy::math::I64Vec4> = bevy::math::I64Vec4::from_array(a).into(); @@ -8719,12 +11037,73 @@ impl bevy::math::I64Vec4 { let output: i64 = bevy::math::I64Vec4::min_element(_self.into_inner()).into(); output } + fn mul( + _self: Val<bevy::math::I64Vec4>, + rhs: Ref<bevy::math::I64Vec4>, + ) -> Val<bevy::math::I64Vec4> { + let output: Val<bevy::math::I64Vec4> = <bevy::math::I64Vec4 as ::core::ops::Mul< + &bevy::math::I64Vec4, + >>::mul(_self.into_inner(), &rhs) + .into(); + output + } + fn mul( + _self: Val<bevy::math::I64Vec4>, + rhs: Val<bevy::math::I64Vec4>, + ) -> Val<bevy::math::I64Vec4> { + let output: Val<bevy::math::I64Vec4> = <bevy::math::I64Vec4 as ::core::ops::Mul< + bevy::math::I64Vec4, + >>::mul(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + fn mul(_self: Val<bevy::math::I64Vec4>, rhs: i64) -> Val<bevy::math::I64Vec4> { + let output: Val<bevy::math::I64Vec4> = <bevy::math::I64Vec4 as ::core::ops::Mul< + i64, + >>::mul(_self.into_inner(), rhs) + .into(); + output + } + fn neg(_self: Val<bevy::math::I64Vec4>) -> Val<bevy::math::I64Vec4> { + let output: Val<bevy::math::I64Vec4> = <bevy::math::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<bevy::math::I64Vec4> { let output: Val<bevy::math::I64Vec4> = bevy::math::I64Vec4::new(x, y, z, w) .into(); output } + fn rem( + _self: Val<bevy::math::I64Vec4>, + rhs: Ref<bevy::math::I64Vec4>, + ) -> Val<bevy::math::I64Vec4> { + let output: Val<bevy::math::I64Vec4> = <bevy::math::I64Vec4 as ::core::ops::Rem< + &bevy::math::I64Vec4, + >>::rem(_self.into_inner(), &rhs) + .into(); + output + } + fn rem( + _self: Val<bevy::math::I64Vec4>, + rhs: Val<bevy::math::I64Vec4>, + ) -> Val<bevy::math::I64Vec4> { + let output: Val<bevy::math::I64Vec4> = <bevy::math::I64Vec4 as ::core::ops::Rem< + bevy::math::I64Vec4, + >>::rem(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + fn rem(_self: Val<bevy::math::I64Vec4>, rhs: i64) -> Val<bevy::math::I64Vec4> { + let output: Val<bevy::math::I64Vec4> = <bevy::math::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. @@ -8850,6 +11229,33 @@ impl bevy::math::I64Vec4 { let output: Val<bevy::math::I64Vec4> = bevy::math::I64Vec4::splat(v).into(); output } + fn sub( + _self: Val<bevy::math::I64Vec4>, + rhs: Ref<bevy::math::I64Vec4>, + ) -> Val<bevy::math::I64Vec4> { + let output: Val<bevy::math::I64Vec4> = <bevy::math::I64Vec4 as ::core::ops::Sub< + &bevy::math::I64Vec4, + >>::sub(_self.into_inner(), &rhs) + .into(); + output + } + fn sub( + _self: Val<bevy::math::I64Vec4>, + rhs: Val<bevy::math::I64Vec4>, + ) -> Val<bevy::math::I64Vec4> { + let output: Val<bevy::math::I64Vec4> = <bevy::math::I64Vec4 as ::core::ops::Sub< + bevy::math::I64Vec4, + >>::sub(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + fn sub(_self: Val<bevy::math::I64Vec4>, rhs: i64) -> Val<bevy::math::I64Vec4> { + let output: Val<bevy::math::I64Vec4> = <bevy::math::I64Vec4 as ::core::ops::Sub< + i64, + >>::sub(_self.into_inner(), rhs) + .into(); + output + } /// `[x, y, z, w]` fn to_array(_self: Ref<bevy::math::I64Vec4>) -> [i64; 4] { let output: [i64; 4] = bevy::math::I64Vec4::to_array(&_self).into(); @@ -8986,6 +11392,33 @@ impl bevy::math::I64Vec4 { generated )] impl bevy::math::UVec2 { + fn add( + _self: Val<bevy::math::UVec2>, + rhs: Ref<bevy::math::UVec2>, + ) -> Val<bevy::math::UVec2> { + let output: Val<bevy::math::UVec2> = <bevy::math::UVec2 as ::core::ops::Add< + &bevy::math::UVec2, + >>::add(_self.into_inner(), &rhs) + .into(); + output + } + fn add( + _self: Val<bevy::math::UVec2>, + rhs: Val<bevy::math::UVec2>, + ) -> Val<bevy::math::UVec2> { + let output: Val<bevy::math::UVec2> = <bevy::math::UVec2 as ::core::ops::Add< + bevy::math::UVec2, + >>::add(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + fn add(_self: Val<bevy::math::UVec2>, rhs: u32) -> Val<bevy::math::UVec2> { + let output: Val<bevy::math::UVec2> = <bevy::math::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<bevy::math::UVec2>) -> Val<bevy::math::DVec2> { let output: Val<bevy::math::DVec2> = bevy::math::UVec2::as_dvec2(&_self).into(); @@ -9037,6 +11470,13 @@ impl bevy::math::UVec2 { let output: Val<bevy::math::Vec2> = bevy::math::UVec2::as_vec2(&_self).into(); output } + fn assert_receiver_is_total_eq(_self: Ref<bevy::math::UVec2>) -> () { + let output: () = <bevy::math::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 @@ -9054,6 +11494,13 @@ impl bevy::math::UVec2 { .into(); output } + fn clone(_self: Ref<bevy::math::UVec2>) -> Val<bevy::math::UVec2> { + let output: Val<bevy::math::UVec2> = <bevy::math::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 @@ -9144,6 +11591,33 @@ impl bevy::math::UVec2 { .into(); output } + fn div( + _self: Val<bevy::math::UVec2>, + rhs: Ref<bevy::math::UVec2>, + ) -> Val<bevy::math::UVec2> { + let output: Val<bevy::math::UVec2> = <bevy::math::UVec2 as ::core::ops::Div< + &bevy::math::UVec2, + >>::div(_self.into_inner(), &rhs) + .into(); + output + } + fn div( + _self: Val<bevy::math::UVec2>, + rhs: Val<bevy::math::UVec2>, + ) -> Val<bevy::math::UVec2> { + let output: Val<bevy::math::UVec2> = <bevy::math::UVec2 as ::core::ops::Div< + bevy::math::UVec2, + >>::div(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + fn div(_self: Val<bevy::math::UVec2>, rhs: u32) -> Val<bevy::math::UVec2> { + let output: Val<bevy::math::UVec2> = <bevy::math::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<bevy::math::UVec2>, rhs: Val<bevy::math::UVec2>) -> u32 { let output: u32 = bevy::math::UVec2::dot(_self.into_inner(), rhs.into_inner()) @@ -9174,6 +11648,13 @@ impl bevy::math::UVec2 { let output: u32 = bevy::math::UVec2::element_sum(_self.into_inner()).into(); output } + fn eq(_self: Ref<bevy::math::UVec2>, other: Ref<bevy::math::UVec2>) -> bool { + let output: bool = <bevy::math::UVec2 as ::core::cmp::PartialEq< + bevy::math::UVec2, + >>::eq(&_self, &other) + .into(); + output + } /// Creates a 3D vector from `self` and the given `z` value. fn extend(_self: Val<bevy::math::UVec2>, z: u32) -> Val<bevy::math::UVec3> { let output: Val<bevy::math::UVec3> = bevy::math::UVec2::extend( @@ -9231,11 +11712,65 @@ impl bevy::math::UVec2 { let output: u32 = bevy::math::UVec2::min_element(_self.into_inner()).into(); output } + fn mul( + _self: Val<bevy::math::UVec2>, + rhs: Ref<bevy::math::UVec2>, + ) -> Val<bevy::math::UVec2> { + let output: Val<bevy::math::UVec2> = <bevy::math::UVec2 as ::core::ops::Mul< + &bevy::math::UVec2, + >>::mul(_self.into_inner(), &rhs) + .into(); + output + } + fn mul( + _self: Val<bevy::math::UVec2>, + rhs: Val<bevy::math::UVec2>, + ) -> Val<bevy::math::UVec2> { + let output: Val<bevy::math::UVec2> = <bevy::math::UVec2 as ::core::ops::Mul< + bevy::math::UVec2, + >>::mul(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + fn mul(_self: Val<bevy::math::UVec2>, rhs: u32) -> Val<bevy::math::UVec2> { + let output: Val<bevy::math::UVec2> = <bevy::math::UVec2 as ::core::ops::Mul< + u32, + >>::mul(_self.into_inner(), rhs) + .into(); + output + } /// Creates a new vector. fn new(x: u32, y: u32) -> Val<bevy::math::UVec2> { let output: Val<bevy::math::UVec2> = bevy::math::UVec2::new(x, y).into(); output } + fn rem( + _self: Val<bevy::math::UVec2>, + rhs: Ref<bevy::math::UVec2>, + ) -> Val<bevy::math::UVec2> { + let output: Val<bevy::math::UVec2> = <bevy::math::UVec2 as ::core::ops::Rem< + &bevy::math::UVec2, + >>::rem(_self.into_inner(), &rhs) + .into(); + output + } + fn rem( + _self: Val<bevy::math::UVec2>, + rhs: Val<bevy::math::UVec2>, + ) -> Val<bevy::math::UVec2> { + let output: Val<bevy::math::UVec2> = <bevy::math::UVec2 as ::core::ops::Rem< + bevy::math::UVec2, + >>::rem(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + fn rem(_self: Val<bevy::math::UVec2>, rhs: u32) -> Val<bevy::math::UVec2> { + let output: Val<bevy::math::UVec2> = <bevy::math::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( @@ -9323,6 +11858,33 @@ impl bevy::math::UVec2 { let output: Val<bevy::math::UVec2> = bevy::math::UVec2::splat(v).into(); output } + fn sub( + _self: Val<bevy::math::UVec2>, + rhs: Ref<bevy::math::UVec2>, + ) -> Val<bevy::math::UVec2> { + let output: Val<bevy::math::UVec2> = <bevy::math::UVec2 as ::core::ops::Sub< + &bevy::math::UVec2, + >>::sub(_self.into_inner(), &rhs) + .into(); + output + } + fn sub( + _self: Val<bevy::math::UVec2>, + rhs: Val<bevy::math::UVec2>, + ) -> Val<bevy::math::UVec2> { + let output: Val<bevy::math::UVec2> = <bevy::math::UVec2 as ::core::ops::Sub< + bevy::math::UVec2, + >>::sub(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + fn sub(_self: Val<bevy::math::UVec2>, rhs: u32) -> Val<bevy::math::UVec2> { + let output: Val<bevy::math::UVec2> = <bevy::math::UVec2 as ::core::ops::Sub< + u32, + >>::sub(_self.into_inner(), rhs) + .into(); + output + } /// `[x, y]` fn to_array(_self: Ref<bevy::math::UVec2>) -> [u32; 2] { let output: [u32; 2] = bevy::math::UVec2::to_array(&_self).into(); @@ -9419,6 +11981,33 @@ impl bevy::math::UVec2 { generated )] impl bevy::math::UVec3 { + fn add( + _self: Val<bevy::math::UVec3>, + rhs: Ref<bevy::math::UVec3>, + ) -> Val<bevy::math::UVec3> { + let output: Val<bevy::math::UVec3> = <bevy::math::UVec3 as ::core::ops::Add< + &bevy::math::UVec3, + >>::add(_self.into_inner(), &rhs) + .into(); + output + } + fn add( + _self: Val<bevy::math::UVec3>, + rhs: Val<bevy::math::UVec3>, + ) -> Val<bevy::math::UVec3> { + let output: Val<bevy::math::UVec3> = <bevy::math::UVec3 as ::core::ops::Add< + bevy::math::UVec3, + >>::add(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + fn add(_self: Val<bevy::math::UVec3>, rhs: u32) -> Val<bevy::math::UVec3> { + let output: Val<bevy::math::UVec3> = <bevy::math::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<bevy::math::UVec3>) -> Val<bevy::math::DVec3> { let output: Val<bevy::math::DVec3> = bevy::math::UVec3::as_dvec3(&_self).into(); @@ -9475,6 +12064,13 @@ impl bevy::math::UVec3 { let output: Val<bevy::math::Vec3A> = bevy::math::UVec3::as_vec3a(&_self).into(); output } + fn assert_receiver_is_total_eq(_self: Ref<bevy::math::UVec3>) -> () { + let output: () = <bevy::math::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 @@ -9492,6 +12088,13 @@ impl bevy::math::UVec3 { .into(); output } + fn clone(_self: Ref<bevy::math::UVec3>) -> Val<bevy::math::UVec3> { + let output: Val<bevy::math::UVec3> = <bevy::math::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 @@ -9594,6 +12197,33 @@ impl bevy::math::UVec3 { .into(); output } + fn div( + _self: Val<bevy::math::UVec3>, + rhs: Ref<bevy::math::UVec3>, + ) -> Val<bevy::math::UVec3> { + let output: Val<bevy::math::UVec3> = <bevy::math::UVec3 as ::core::ops::Div< + &bevy::math::UVec3, + >>::div(_self.into_inner(), &rhs) + .into(); + output + } + fn div( + _self: Val<bevy::math::UVec3>, + rhs: Val<bevy::math::UVec3>, + ) -> Val<bevy::math::UVec3> { + let output: Val<bevy::math::UVec3> = <bevy::math::UVec3 as ::core::ops::Div< + bevy::math::UVec3, + >>::div(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + fn div(_self: Val<bevy::math::UVec3>, rhs: u32) -> Val<bevy::math::UVec3> { + let output: Val<bevy::math::UVec3> = <bevy::math::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<bevy::math::UVec3>, rhs: Val<bevy::math::UVec3>) -> u32 { let output: u32 = bevy::math::UVec3::dot(_self.into_inner(), rhs.into_inner()) @@ -9624,6 +12254,13 @@ impl bevy::math::UVec3 { let output: u32 = bevy::math::UVec3::element_sum(_self.into_inner()).into(); output } + fn eq(_self: Ref<bevy::math::UVec3>, other: Ref<bevy::math::UVec3>) -> bool { + let output: bool = <bevy::math::UVec3 as ::core::cmp::PartialEq< + bevy::math::UVec3, + >>::eq(&_self, &other) + .into(); + output + } /// Creates a 4D vector from `self` and the given `w` value. fn extend(_self: Val<bevy::math::UVec3>, w: u32) -> Val<bevy::math::UVec4> { let output: Val<bevy::math::UVec4> = bevy::math::UVec3::extend( @@ -9681,11 +12318,65 @@ impl bevy::math::UVec3 { let output: u32 = bevy::math::UVec3::min_element(_self.into_inner()).into(); output } + fn mul( + _self: Val<bevy::math::UVec3>, + rhs: Ref<bevy::math::UVec3>, + ) -> Val<bevy::math::UVec3> { + let output: Val<bevy::math::UVec3> = <bevy::math::UVec3 as ::core::ops::Mul< + &bevy::math::UVec3, + >>::mul(_self.into_inner(), &rhs) + .into(); + output + } + fn mul( + _self: Val<bevy::math::UVec3>, + rhs: Val<bevy::math::UVec3>, + ) -> Val<bevy::math::UVec3> { + let output: Val<bevy::math::UVec3> = <bevy::math::UVec3 as ::core::ops::Mul< + bevy::math::UVec3, + >>::mul(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + fn mul(_self: Val<bevy::math::UVec3>, rhs: u32) -> Val<bevy::math::UVec3> { + let output: Val<bevy::math::UVec3> = <bevy::math::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<bevy::math::UVec3> { let output: Val<bevy::math::UVec3> = bevy::math::UVec3::new(x, y, z).into(); output } + fn rem( + _self: Val<bevy::math::UVec3>, + rhs: Ref<bevy::math::UVec3>, + ) -> Val<bevy::math::UVec3> { + let output: Val<bevy::math::UVec3> = <bevy::math::UVec3 as ::core::ops::Rem< + &bevy::math::UVec3, + >>::rem(_self.into_inner(), &rhs) + .into(); + output + } + fn rem( + _self: Val<bevy::math::UVec3>, + rhs: Val<bevy::math::UVec3>, + ) -> Val<bevy::math::UVec3> { + let output: Val<bevy::math::UVec3> = <bevy::math::UVec3 as ::core::ops::Rem< + bevy::math::UVec3, + >>::rem(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + fn rem(_self: Val<bevy::math::UVec3>, rhs: u32) -> Val<bevy::math::UVec3> { + let output: Val<bevy::math::UVec3> = <bevy::math::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( @@ -9773,6 +12464,33 @@ impl bevy::math::UVec3 { let output: Val<bevy::math::UVec3> = bevy::math::UVec3::splat(v).into(); output } + fn sub( + _self: Val<bevy::math::UVec3>, + rhs: Ref<bevy::math::UVec3>, + ) -> Val<bevy::math::UVec3> { + let output: Val<bevy::math::UVec3> = <bevy::math::UVec3 as ::core::ops::Sub< + &bevy::math::UVec3, + >>::sub(_self.into_inner(), &rhs) + .into(); + output + } + fn sub( + _self: Val<bevy::math::UVec3>, + rhs: Val<bevy::math::UVec3>, + ) -> Val<bevy::math::UVec3> { + let output: Val<bevy::math::UVec3> = <bevy::math::UVec3 as ::core::ops::Sub< + bevy::math::UVec3, + >>::sub(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + fn sub(_self: Val<bevy::math::UVec3>, rhs: u32) -> Val<bevy::math::UVec3> { + let output: Val<bevy::math::UVec3> = <bevy::math::UVec3 as ::core::ops::Sub< + u32, + >>::sub(_self.into_inner(), rhs) + .into(); + output + } /// `[x, y, z]` fn to_array(_self: Ref<bevy::math::UVec3>) -> [u32; 3] { let output: [u32; 3] = bevy::math::UVec3::to_array(&_self).into(); @@ -9887,6 +12605,33 @@ impl bevy::math::UVec3 { generated )] impl bevy::math::UVec4 { + fn add( + _self: Val<bevy::math::UVec4>, + rhs: Ref<bevy::math::UVec4>, + ) -> Val<bevy::math::UVec4> { + let output: Val<bevy::math::UVec4> = <bevy::math::UVec4 as ::core::ops::Add< + &bevy::math::UVec4, + >>::add(_self.into_inner(), &rhs) + .into(); + output + } + fn add( + _self: Val<bevy::math::UVec4>, + rhs: Val<bevy::math::UVec4>, + ) -> Val<bevy::math::UVec4> { + let output: Val<bevy::math::UVec4> = <bevy::math::UVec4 as ::core::ops::Add< + bevy::math::UVec4, + >>::add(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + fn add(_self: Val<bevy::math::UVec4>, rhs: u32) -> Val<bevy::math::UVec4> { + let output: Val<bevy::math::UVec4> = <bevy::math::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<bevy::math::UVec4>) -> Val<bevy::math::DVec4> { let output: Val<bevy::math::DVec4> = bevy::math::UVec4::as_dvec4(&_self).into(); @@ -9938,6 +12683,13 @@ impl bevy::math::UVec4 { let output: Val<bevy::math::Vec4> = bevy::math::UVec4::as_vec4(&_self).into(); output } + fn assert_receiver_is_total_eq(_self: Ref<bevy::math::UVec4>) -> () { + let output: () = <bevy::math::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 @@ -9955,6 +12707,13 @@ impl bevy::math::UVec4 { .into(); output } + fn clone(_self: Ref<bevy::math::UVec4>) -> Val<bevy::math::UVec4> { + let output: Val<bevy::math::UVec4> = <bevy::math::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 @@ -10045,6 +12804,33 @@ impl bevy::math::UVec4 { .into(); output } + fn div( + _self: Val<bevy::math::UVec4>, + rhs: Ref<bevy::math::UVec4>, + ) -> Val<bevy::math::UVec4> { + let output: Val<bevy::math::UVec4> = <bevy::math::UVec4 as ::core::ops::Div< + &bevy::math::UVec4, + >>::div(_self.into_inner(), &rhs) + .into(); + output + } + fn div( + _self: Val<bevy::math::UVec4>, + rhs: Val<bevy::math::UVec4>, + ) -> Val<bevy::math::UVec4> { + let output: Val<bevy::math::UVec4> = <bevy::math::UVec4 as ::core::ops::Div< + bevy::math::UVec4, + >>::div(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + fn div(_self: Val<bevy::math::UVec4>, rhs: u32) -> Val<bevy::math::UVec4> { + let output: Val<bevy::math::UVec4> = <bevy::math::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<bevy::math::UVec4>, rhs: Val<bevy::math::UVec4>) -> u32 { let output: u32 = bevy::math::UVec4::dot(_self.into_inner(), rhs.into_inner()) @@ -10075,6 +12861,13 @@ impl bevy::math::UVec4 { let output: u32 = bevy::math::UVec4::element_sum(_self.into_inner()).into(); output } + fn eq(_self: Ref<bevy::math::UVec4>, other: Ref<bevy::math::UVec4>) -> bool { + let output: bool = <bevy::math::UVec4 as ::core::cmp::PartialEq< + bevy::math::UVec4, + >>::eq(&_self, &other) + .into(); + output + } /// Creates a new vector from an array. fn from_array(a: [u32; 4]) -> Val<bevy::math::UVec4> { let output: Val<bevy::math::UVec4> = bevy::math::UVec4::from_array(a).into(); @@ -10123,11 +12916,65 @@ impl bevy::math::UVec4 { let output: u32 = bevy::math::UVec4::min_element(_self.into_inner()).into(); output } + fn mul( + _self: Val<bevy::math::UVec4>, + rhs: Ref<bevy::math::UVec4>, + ) -> Val<bevy::math::UVec4> { + let output: Val<bevy::math::UVec4> = <bevy::math::UVec4 as ::core::ops::Mul< + &bevy::math::UVec4, + >>::mul(_self.into_inner(), &rhs) + .into(); + output + } + fn mul( + _self: Val<bevy::math::UVec4>, + rhs: Val<bevy::math::UVec4>, + ) -> Val<bevy::math::UVec4> { + let output: Val<bevy::math::UVec4> = <bevy::math::UVec4 as ::core::ops::Mul< + bevy::math::UVec4, + >>::mul(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + fn mul(_self: Val<bevy::math::UVec4>, rhs: u32) -> Val<bevy::math::UVec4> { + let output: Val<bevy::math::UVec4> = <bevy::math::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<bevy::math::UVec4> { let output: Val<bevy::math::UVec4> = bevy::math::UVec4::new(x, y, z, w).into(); output } + fn rem( + _self: Val<bevy::math::UVec4>, + rhs: Ref<bevy::math::UVec4>, + ) -> Val<bevy::math::UVec4> { + let output: Val<bevy::math::UVec4> = <bevy::math::UVec4 as ::core::ops::Rem< + &bevy::math::UVec4, + >>::rem(_self.into_inner(), &rhs) + .into(); + output + } + fn rem( + _self: Val<bevy::math::UVec4>, + rhs: Val<bevy::math::UVec4>, + ) -> Val<bevy::math::UVec4> { + let output: Val<bevy::math::UVec4> = <bevy::math::UVec4 as ::core::ops::Rem< + bevy::math::UVec4, + >>::rem(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + fn rem(_self: Val<bevy::math::UVec4>, rhs: u32) -> Val<bevy::math::UVec4> { + let output: Val<bevy::math::UVec4> = <bevy::math::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( @@ -10215,6 +13062,33 @@ impl bevy::math::UVec4 { let output: Val<bevy::math::UVec4> = bevy::math::UVec4::splat(v).into(); output } + fn sub( + _self: Val<bevy::math::UVec4>, + rhs: Ref<bevy::math::UVec4>, + ) -> Val<bevy::math::UVec4> { + let output: Val<bevy::math::UVec4> = <bevy::math::UVec4 as ::core::ops::Sub< + &bevy::math::UVec4, + >>::sub(_self.into_inner(), &rhs) + .into(); + output + } + fn sub( + _self: Val<bevy::math::UVec4>, + rhs: Val<bevy::math::UVec4>, + ) -> Val<bevy::math::UVec4> { + let output: Val<bevy::math::UVec4> = <bevy::math::UVec4 as ::core::ops::Sub< + bevy::math::UVec4, + >>::sub(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + fn sub(_self: Val<bevy::math::UVec4>, rhs: u32) -> Val<bevy::math::UVec4> { + let output: Val<bevy::math::UVec4> = <bevy::math::UVec4 as ::core::ops::Sub< + u32, + >>::sub(_self.into_inner(), rhs) + .into(); + output + } /// `[x, y, z, w]` fn to_array(_self: Ref<bevy::math::UVec4>) -> [u32; 4] { let output: [u32; 4] = bevy::math::UVec4::to_array(&_self).into(); @@ -10338,6 +13212,33 @@ impl bevy::math::UVec4 { generated )] impl bevy::math::U8Vec2 { + fn add( + _self: Val<bevy::math::U8Vec2>, + rhs: Ref<bevy::math::U8Vec2>, + ) -> Val<bevy::math::U8Vec2> { + let output: Val<bevy::math::U8Vec2> = <bevy::math::U8Vec2 as ::core::ops::Add< + &bevy::math::U8Vec2, + >>::add(_self.into_inner(), &rhs) + .into(); + output + } + fn add( + _self: Val<bevy::math::U8Vec2>, + rhs: Val<bevy::math::U8Vec2>, + ) -> Val<bevy::math::U8Vec2> { + let output: Val<bevy::math::U8Vec2> = <bevy::math::U8Vec2 as ::core::ops::Add< + bevy::math::U8Vec2, + >>::add(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + fn add(_self: Val<bevy::math::U8Vec2>, rhs: u8) -> Val<bevy::math::U8Vec2> { + let output: Val<bevy::math::U8Vec2> = <bevy::math::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<bevy::math::U8Vec2>) -> Val<bevy::math::DVec2> { let output: Val<bevy::math::DVec2> = bevy::math::U8Vec2::as_dvec2(&_self).into(); @@ -10388,6 +13289,13 @@ impl bevy::math::U8Vec2 { let output: Val<bevy::math::Vec2> = bevy::math::U8Vec2::as_vec2(&_self).into(); output } + fn assert_receiver_is_total_eq(_self: Ref<bevy::math::U8Vec2>) -> () { + let output: () = <bevy::math::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 @@ -10405,6 +13313,13 @@ impl bevy::math::U8Vec2 { .into(); output } + fn clone(_self: Ref<bevy::math::U8Vec2>) -> Val<bevy::math::U8Vec2> { + let output: Val<bevy::math::U8Vec2> = <bevy::math::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 @@ -10495,6 +13410,33 @@ impl bevy::math::U8Vec2 { .into(); output } + fn div( + _self: Val<bevy::math::U8Vec2>, + rhs: Ref<bevy::math::U8Vec2>, + ) -> Val<bevy::math::U8Vec2> { + let output: Val<bevy::math::U8Vec2> = <bevy::math::U8Vec2 as ::core::ops::Div< + &bevy::math::U8Vec2, + >>::div(_self.into_inner(), &rhs) + .into(); + output + } + fn div( + _self: Val<bevy::math::U8Vec2>, + rhs: Val<bevy::math::U8Vec2>, + ) -> Val<bevy::math::U8Vec2> { + let output: Val<bevy::math::U8Vec2> = <bevy::math::U8Vec2 as ::core::ops::Div< + bevy::math::U8Vec2, + >>::div(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + fn div(_self: Val<bevy::math::U8Vec2>, rhs: u8) -> Val<bevy::math::U8Vec2> { + let output: Val<bevy::math::U8Vec2> = <bevy::math::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<bevy::math::U8Vec2>, rhs: Val<bevy::math::U8Vec2>) -> u8 { let output: u8 = bevy::math::U8Vec2::dot(_self.into_inner(), rhs.into_inner()) @@ -10525,6 +13467,13 @@ impl bevy::math::U8Vec2 { let output: u8 = bevy::math::U8Vec2::element_sum(_self.into_inner()).into(); output } + fn eq(_self: Ref<bevy::math::U8Vec2>, other: Ref<bevy::math::U8Vec2>) -> bool { + let output: bool = <bevy::math::U8Vec2 as ::core::cmp::PartialEq< + bevy::math::U8Vec2, + >>::eq(&_self, &other) + .into(); + output + } /// Creates a 3D vector from `self` and the given `z` value. fn extend(_self: Val<bevy::math::U8Vec2>, z: u8) -> Val<bevy::math::U8Vec3> { let output: Val<bevy::math::U8Vec3> = bevy::math::U8Vec2::extend( @@ -10582,11 +13531,65 @@ impl bevy::math::U8Vec2 { let output: u8 = bevy::math::U8Vec2::min_element(_self.into_inner()).into(); output } + fn mul( + _self: Val<bevy::math::U8Vec2>, + rhs: Ref<bevy::math::U8Vec2>, + ) -> Val<bevy::math::U8Vec2> { + let output: Val<bevy::math::U8Vec2> = <bevy::math::U8Vec2 as ::core::ops::Mul< + &bevy::math::U8Vec2, + >>::mul(_self.into_inner(), &rhs) + .into(); + output + } + fn mul( + _self: Val<bevy::math::U8Vec2>, + rhs: Val<bevy::math::U8Vec2>, + ) -> Val<bevy::math::U8Vec2> { + let output: Val<bevy::math::U8Vec2> = <bevy::math::U8Vec2 as ::core::ops::Mul< + bevy::math::U8Vec2, + >>::mul(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + fn mul(_self: Val<bevy::math::U8Vec2>, rhs: u8) -> Val<bevy::math::U8Vec2> { + let output: Val<bevy::math::U8Vec2> = <bevy::math::U8Vec2 as ::core::ops::Mul< + u8, + >>::mul(_self.into_inner(), rhs) + .into(); + output + } /// Creates a new vector. fn new(x: u8, y: u8) -> Val<bevy::math::U8Vec2> { let output: Val<bevy::math::U8Vec2> = bevy::math::U8Vec2::new(x, y).into(); output } + fn rem( + _self: Val<bevy::math::U8Vec2>, + rhs: Ref<bevy::math::U8Vec2>, + ) -> Val<bevy::math::U8Vec2> { + let output: Val<bevy::math::U8Vec2> = <bevy::math::U8Vec2 as ::core::ops::Rem< + &bevy::math::U8Vec2, + >>::rem(_self.into_inner(), &rhs) + .into(); + output + } + fn rem( + _self: Val<bevy::math::U8Vec2>, + rhs: Val<bevy::math::U8Vec2>, + ) -> Val<bevy::math::U8Vec2> { + let output: Val<bevy::math::U8Vec2> = <bevy::math::U8Vec2 as ::core::ops::Rem< + bevy::math::U8Vec2, + >>::rem(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + fn rem(_self: Val<bevy::math::U8Vec2>, rhs: u8) -> Val<bevy::math::U8Vec2> { + let output: Val<bevy::math::U8Vec2> = <bevy::math::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( @@ -10674,6 +13677,33 @@ impl bevy::math::U8Vec2 { let output: Val<bevy::math::U8Vec2> = bevy::math::U8Vec2::splat(v).into(); output } + fn sub( + _self: Val<bevy::math::U8Vec2>, + rhs: Ref<bevy::math::U8Vec2>, + ) -> Val<bevy::math::U8Vec2> { + let output: Val<bevy::math::U8Vec2> = <bevy::math::U8Vec2 as ::core::ops::Sub< + &bevy::math::U8Vec2, + >>::sub(_self.into_inner(), &rhs) + .into(); + output + } + fn sub( + _self: Val<bevy::math::U8Vec2>, + rhs: Val<bevy::math::U8Vec2>, + ) -> Val<bevy::math::U8Vec2> { + let output: Val<bevy::math::U8Vec2> = <bevy::math::U8Vec2 as ::core::ops::Sub< + bevy::math::U8Vec2, + >>::sub(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + fn sub(_self: Val<bevy::math::U8Vec2>, rhs: u8) -> Val<bevy::math::U8Vec2> { + let output: Val<bevy::math::U8Vec2> = <bevy::math::U8Vec2 as ::core::ops::Sub< + u8, + >>::sub(_self.into_inner(), rhs) + .into(); + output + } /// `[x, y]` fn to_array(_self: Ref<bevy::math::U8Vec2>) -> [u8; 2] { let output: [u8; 2] = bevy::math::U8Vec2::to_array(&_self).into(); @@ -10770,6 +13800,33 @@ impl bevy::math::U8Vec2 { generated )] impl bevy::math::U8Vec3 { + fn add( + _self: Val<bevy::math::U8Vec3>, + rhs: Ref<bevy::math::U8Vec3>, + ) -> Val<bevy::math::U8Vec3> { + let output: Val<bevy::math::U8Vec3> = <bevy::math::U8Vec3 as ::core::ops::Add< + &bevy::math::U8Vec3, + >>::add(_self.into_inner(), &rhs) + .into(); + output + } + fn add( + _self: Val<bevy::math::U8Vec3>, + rhs: Val<bevy::math::U8Vec3>, + ) -> Val<bevy::math::U8Vec3> { + let output: Val<bevy::math::U8Vec3> = <bevy::math::U8Vec3 as ::core::ops::Add< + bevy::math::U8Vec3, + >>::add(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + fn add(_self: Val<bevy::math::U8Vec3>, rhs: u8) -> Val<bevy::math::U8Vec3> { + let output: Val<bevy::math::U8Vec3> = <bevy::math::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<bevy::math::U8Vec3>) -> Val<bevy::math::DVec3> { let output: Val<bevy::math::DVec3> = bevy::math::U8Vec3::as_dvec3(&_self).into(); @@ -10825,6 +13882,13 @@ impl bevy::math::U8Vec3 { let output: Val<bevy::math::Vec3A> = bevy::math::U8Vec3::as_vec3a(&_self).into(); output } + fn assert_receiver_is_total_eq(_self: Ref<bevy::math::U8Vec3>) -> () { + let output: () = <bevy::math::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 @@ -10842,6 +13906,13 @@ impl bevy::math::U8Vec3 { .into(); output } + fn clone(_self: Ref<bevy::math::U8Vec3>) -> Val<bevy::math::U8Vec3> { + let output: Val<bevy::math::U8Vec3> = <bevy::math::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 @@ -10944,6 +14015,33 @@ impl bevy::math::U8Vec3 { .into(); output } + fn div( + _self: Val<bevy::math::U8Vec3>, + rhs: Ref<bevy::math::U8Vec3>, + ) -> Val<bevy::math::U8Vec3> { + let output: Val<bevy::math::U8Vec3> = <bevy::math::U8Vec3 as ::core::ops::Div< + &bevy::math::U8Vec3, + >>::div(_self.into_inner(), &rhs) + .into(); + output + } + fn div( + _self: Val<bevy::math::U8Vec3>, + rhs: Val<bevy::math::U8Vec3>, + ) -> Val<bevy::math::U8Vec3> { + let output: Val<bevy::math::U8Vec3> = <bevy::math::U8Vec3 as ::core::ops::Div< + bevy::math::U8Vec3, + >>::div(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + fn div(_self: Val<bevy::math::U8Vec3>, rhs: u8) -> Val<bevy::math::U8Vec3> { + let output: Val<bevy::math::U8Vec3> = <bevy::math::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<bevy::math::U8Vec3>, rhs: Val<bevy::math::U8Vec3>) -> u8 { let output: u8 = bevy::math::U8Vec3::dot(_self.into_inner(), rhs.into_inner()) @@ -10974,6 +14072,13 @@ impl bevy::math::U8Vec3 { let output: u8 = bevy::math::U8Vec3::element_sum(_self.into_inner()).into(); output } + fn eq(_self: Ref<bevy::math::U8Vec3>, other: Ref<bevy::math::U8Vec3>) -> bool { + let output: bool = <bevy::math::U8Vec3 as ::core::cmp::PartialEq< + bevy::math::U8Vec3, + >>::eq(&_self, &other) + .into(); + output + } /// Creates a 4D vector from `self` and the given `w` value. fn extend(_self: Val<bevy::math::U8Vec3>, w: u8) -> Val<bevy::math::U8Vec4> { let output: Val<bevy::math::U8Vec4> = bevy::math::U8Vec3::extend( @@ -11031,11 +14136,65 @@ impl bevy::math::U8Vec3 { let output: u8 = bevy::math::U8Vec3::min_element(_self.into_inner()).into(); output } + fn mul( + _self: Val<bevy::math::U8Vec3>, + rhs: Ref<bevy::math::U8Vec3>, + ) -> Val<bevy::math::U8Vec3> { + let output: Val<bevy::math::U8Vec3> = <bevy::math::U8Vec3 as ::core::ops::Mul< + &bevy::math::U8Vec3, + >>::mul(_self.into_inner(), &rhs) + .into(); + output + } + fn mul( + _self: Val<bevy::math::U8Vec3>, + rhs: Val<bevy::math::U8Vec3>, + ) -> Val<bevy::math::U8Vec3> { + let output: Val<bevy::math::U8Vec3> = <bevy::math::U8Vec3 as ::core::ops::Mul< + bevy::math::U8Vec3, + >>::mul(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + fn mul(_self: Val<bevy::math::U8Vec3>, rhs: u8) -> Val<bevy::math::U8Vec3> { + let output: Val<bevy::math::U8Vec3> = <bevy::math::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<bevy::math::U8Vec3> { let output: Val<bevy::math::U8Vec3> = bevy::math::U8Vec3::new(x, y, z).into(); output } + fn rem( + _self: Val<bevy::math::U8Vec3>, + rhs: Ref<bevy::math::U8Vec3>, + ) -> Val<bevy::math::U8Vec3> { + let output: Val<bevy::math::U8Vec3> = <bevy::math::U8Vec3 as ::core::ops::Rem< + &bevy::math::U8Vec3, + >>::rem(_self.into_inner(), &rhs) + .into(); + output + } + fn rem( + _self: Val<bevy::math::U8Vec3>, + rhs: Val<bevy::math::U8Vec3>, + ) -> Val<bevy::math::U8Vec3> { + let output: Val<bevy::math::U8Vec3> = <bevy::math::U8Vec3 as ::core::ops::Rem< + bevy::math::U8Vec3, + >>::rem(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + fn rem(_self: Val<bevy::math::U8Vec3>, rhs: u8) -> Val<bevy::math::U8Vec3> { + let output: Val<bevy::math::U8Vec3> = <bevy::math::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( @@ -11123,6 +14282,33 @@ impl bevy::math::U8Vec3 { let output: Val<bevy::math::U8Vec3> = bevy::math::U8Vec3::splat(v).into(); output } + fn sub( + _self: Val<bevy::math::U8Vec3>, + rhs: Ref<bevy::math::U8Vec3>, + ) -> Val<bevy::math::U8Vec3> { + let output: Val<bevy::math::U8Vec3> = <bevy::math::U8Vec3 as ::core::ops::Sub< + &bevy::math::U8Vec3, + >>::sub(_self.into_inner(), &rhs) + .into(); + output + } + fn sub( + _self: Val<bevy::math::U8Vec3>, + rhs: Val<bevy::math::U8Vec3>, + ) -> Val<bevy::math::U8Vec3> { + let output: Val<bevy::math::U8Vec3> = <bevy::math::U8Vec3 as ::core::ops::Sub< + bevy::math::U8Vec3, + >>::sub(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + fn sub(_self: Val<bevy::math::U8Vec3>, rhs: u8) -> Val<bevy::math::U8Vec3> { + let output: Val<bevy::math::U8Vec3> = <bevy::math::U8Vec3 as ::core::ops::Sub< + u8, + >>::sub(_self.into_inner(), rhs) + .into(); + output + } /// `[x, y, z]` fn to_array(_self: Ref<bevy::math::U8Vec3>) -> [u8; 3] { let output: [u8; 3] = bevy::math::U8Vec3::to_array(&_self).into(); @@ -11237,6 +14423,33 @@ impl bevy::math::U8Vec3 { generated )] impl bevy::math::U8Vec4 { + fn add( + _self: Val<bevy::math::U8Vec4>, + rhs: Ref<bevy::math::U8Vec4>, + ) -> Val<bevy::math::U8Vec4> { + let output: Val<bevy::math::U8Vec4> = <bevy::math::U8Vec4 as ::core::ops::Add< + &bevy::math::U8Vec4, + >>::add(_self.into_inner(), &rhs) + .into(); + output + } + fn add( + _self: Val<bevy::math::U8Vec4>, + rhs: Val<bevy::math::U8Vec4>, + ) -> Val<bevy::math::U8Vec4> { + let output: Val<bevy::math::U8Vec4> = <bevy::math::U8Vec4 as ::core::ops::Add< + bevy::math::U8Vec4, + >>::add(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + fn add(_self: Val<bevy::math::U8Vec4>, rhs: u8) -> Val<bevy::math::U8Vec4> { + let output: Val<bevy::math::U8Vec4> = <bevy::math::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<bevy::math::U8Vec4>) -> Val<bevy::math::DVec4> { let output: Val<bevy::math::DVec4> = bevy::math::U8Vec4::as_dvec4(&_self).into(); @@ -11287,6 +14500,13 @@ impl bevy::math::U8Vec4 { let output: Val<bevy::math::Vec4> = bevy::math::U8Vec4::as_vec4(&_self).into(); output } + fn assert_receiver_is_total_eq(_self: Ref<bevy::math::U8Vec4>) -> () { + let output: () = <bevy::math::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 @@ -11304,6 +14524,13 @@ impl bevy::math::U8Vec4 { .into(); output } + fn clone(_self: Ref<bevy::math::U8Vec4>) -> Val<bevy::math::U8Vec4> { + let output: Val<bevy::math::U8Vec4> = <bevy::math::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 @@ -11394,6 +14621,33 @@ impl bevy::math::U8Vec4 { .into(); output } + fn div( + _self: Val<bevy::math::U8Vec4>, + rhs: Ref<bevy::math::U8Vec4>, + ) -> Val<bevy::math::U8Vec4> { + let output: Val<bevy::math::U8Vec4> = <bevy::math::U8Vec4 as ::core::ops::Div< + &bevy::math::U8Vec4, + >>::div(_self.into_inner(), &rhs) + .into(); + output + } + fn div( + _self: Val<bevy::math::U8Vec4>, + rhs: Val<bevy::math::U8Vec4>, + ) -> Val<bevy::math::U8Vec4> { + let output: Val<bevy::math::U8Vec4> = <bevy::math::U8Vec4 as ::core::ops::Div< + bevy::math::U8Vec4, + >>::div(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + fn div(_self: Val<bevy::math::U8Vec4>, rhs: u8) -> Val<bevy::math::U8Vec4> { + let output: Val<bevy::math::U8Vec4> = <bevy::math::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<bevy::math::U8Vec4>, rhs: Val<bevy::math::U8Vec4>) -> u8 { let output: u8 = bevy::math::U8Vec4::dot(_self.into_inner(), rhs.into_inner()) @@ -11424,6 +14678,13 @@ impl bevy::math::U8Vec4 { let output: u8 = bevy::math::U8Vec4::element_sum(_self.into_inner()).into(); output } + fn eq(_self: Ref<bevy::math::U8Vec4>, other: Ref<bevy::math::U8Vec4>) -> bool { + let output: bool = <bevy::math::U8Vec4 as ::core::cmp::PartialEq< + bevy::math::U8Vec4, + >>::eq(&_self, &other) + .into(); + output + } /// Creates a new vector from an array. fn from_array(a: [u8; 4]) -> Val<bevy::math::U8Vec4> { let output: Val<bevy::math::U8Vec4> = bevy::math::U8Vec4::from_array(a).into(); @@ -11472,11 +14733,65 @@ impl bevy::math::U8Vec4 { let output: u8 = bevy::math::U8Vec4::min_element(_self.into_inner()).into(); output } + fn mul( + _self: Val<bevy::math::U8Vec4>, + rhs: Ref<bevy::math::U8Vec4>, + ) -> Val<bevy::math::U8Vec4> { + let output: Val<bevy::math::U8Vec4> = <bevy::math::U8Vec4 as ::core::ops::Mul< + &bevy::math::U8Vec4, + >>::mul(_self.into_inner(), &rhs) + .into(); + output + } + fn mul( + _self: Val<bevy::math::U8Vec4>, + rhs: Val<bevy::math::U8Vec4>, + ) -> Val<bevy::math::U8Vec4> { + let output: Val<bevy::math::U8Vec4> = <bevy::math::U8Vec4 as ::core::ops::Mul< + bevy::math::U8Vec4, + >>::mul(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + fn mul(_self: Val<bevy::math::U8Vec4>, rhs: u8) -> Val<bevy::math::U8Vec4> { + let output: Val<bevy::math::U8Vec4> = <bevy::math::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<bevy::math::U8Vec4> { let output: Val<bevy::math::U8Vec4> = bevy::math::U8Vec4::new(x, y, z, w).into(); output } + fn rem( + _self: Val<bevy::math::U8Vec4>, + rhs: Ref<bevy::math::U8Vec4>, + ) -> Val<bevy::math::U8Vec4> { + let output: Val<bevy::math::U8Vec4> = <bevy::math::U8Vec4 as ::core::ops::Rem< + &bevy::math::U8Vec4, + >>::rem(_self.into_inner(), &rhs) + .into(); + output + } + fn rem( + _self: Val<bevy::math::U8Vec4>, + rhs: Val<bevy::math::U8Vec4>, + ) -> Val<bevy::math::U8Vec4> { + let output: Val<bevy::math::U8Vec4> = <bevy::math::U8Vec4 as ::core::ops::Rem< + bevy::math::U8Vec4, + >>::rem(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + fn rem(_self: Val<bevy::math::U8Vec4>, rhs: u8) -> Val<bevy::math::U8Vec4> { + let output: Val<bevy::math::U8Vec4> = <bevy::math::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( @@ -11559,9 +14874,36 @@ impl bevy::math::U8Vec4 { .into(); output } - /// Creates a vector with all elements set to `v`. - fn splat(v: u8) -> Val<bevy::math::U8Vec4> { - let output: Val<bevy::math::U8Vec4> = bevy::math::U8Vec4::splat(v).into(); + /// Creates a vector with all elements set to `v`. + fn splat(v: u8) -> Val<bevy::math::U8Vec4> { + let output: Val<bevy::math::U8Vec4> = bevy::math::U8Vec4::splat(v).into(); + output + } + fn sub( + _self: Val<bevy::math::U8Vec4>, + rhs: Ref<bevy::math::U8Vec4>, + ) -> Val<bevy::math::U8Vec4> { + let output: Val<bevy::math::U8Vec4> = <bevy::math::U8Vec4 as ::core::ops::Sub< + &bevy::math::U8Vec4, + >>::sub(_self.into_inner(), &rhs) + .into(); + output + } + fn sub( + _self: Val<bevy::math::U8Vec4>, + rhs: Val<bevy::math::U8Vec4>, + ) -> Val<bevy::math::U8Vec4> { + let output: Val<bevy::math::U8Vec4> = <bevy::math::U8Vec4 as ::core::ops::Sub< + bevy::math::U8Vec4, + >>::sub(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + fn sub(_self: Val<bevy::math::U8Vec4>, rhs: u8) -> Val<bevy::math::U8Vec4> { + let output: Val<bevy::math::U8Vec4> = <bevy::math::U8Vec4 as ::core::ops::Sub< + u8, + >>::sub(_self.into_inner(), rhs) + .into(); output } /// `[x, y, z, w]` @@ -11687,6 +15029,33 @@ impl bevy::math::U8Vec4 { generated )] impl bevy::math::U16Vec2 { + fn add( + _self: Val<bevy::math::U16Vec2>, + rhs: Ref<bevy::math::U16Vec2>, + ) -> Val<bevy::math::U16Vec2> { + let output: Val<bevy::math::U16Vec2> = <bevy::math::U16Vec2 as ::core::ops::Add< + &bevy::math::U16Vec2, + >>::add(_self.into_inner(), &rhs) + .into(); + output + } + fn add( + _self: Val<bevy::math::U16Vec2>, + rhs: Val<bevy::math::U16Vec2>, + ) -> Val<bevy::math::U16Vec2> { + let output: Val<bevy::math::U16Vec2> = <bevy::math::U16Vec2 as ::core::ops::Add< + bevy::math::U16Vec2, + >>::add(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + fn add(_self: Val<bevy::math::U16Vec2>, rhs: u16) -> Val<bevy::math::U16Vec2> { + let output: Val<bevy::math::U16Vec2> = <bevy::math::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<bevy::math::U16Vec2>) -> Val<bevy::math::DVec2> { let output: Val<bevy::math::DVec2> = bevy::math::U16Vec2::as_dvec2(&_self) @@ -11740,6 +15109,13 @@ impl bevy::math::U16Vec2 { let output: Val<bevy::math::Vec2> = bevy::math::U16Vec2::as_vec2(&_self).into(); output } + fn assert_receiver_is_total_eq(_self: Ref<bevy::math::U16Vec2>) -> () { + let output: () = <bevy::math::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 @@ -11757,6 +15133,13 @@ impl bevy::math::U16Vec2 { .into(); output } + fn clone(_self: Ref<bevy::math::U16Vec2>) -> Val<bevy::math::U16Vec2> { + let output: Val<bevy::math::U16Vec2> = <bevy::math::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 @@ -11847,6 +15230,33 @@ impl bevy::math::U16Vec2 { .into(); output } + fn div( + _self: Val<bevy::math::U16Vec2>, + rhs: Ref<bevy::math::U16Vec2>, + ) -> Val<bevy::math::U16Vec2> { + let output: Val<bevy::math::U16Vec2> = <bevy::math::U16Vec2 as ::core::ops::Div< + &bevy::math::U16Vec2, + >>::div(_self.into_inner(), &rhs) + .into(); + output + } + fn div( + _self: Val<bevy::math::U16Vec2>, + rhs: Val<bevy::math::U16Vec2>, + ) -> Val<bevy::math::U16Vec2> { + let output: Val<bevy::math::U16Vec2> = <bevy::math::U16Vec2 as ::core::ops::Div< + bevy::math::U16Vec2, + >>::div(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + fn div(_self: Val<bevy::math::U16Vec2>, rhs: u16) -> Val<bevy::math::U16Vec2> { + let output: Val<bevy::math::U16Vec2> = <bevy::math::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<bevy::math::U16Vec2>, rhs: Val<bevy::math::U16Vec2>) -> u16 { let output: u16 = bevy::math::U16Vec2::dot(_self.into_inner(), rhs.into_inner()) @@ -11878,6 +15288,13 @@ impl bevy::math::U16Vec2 { let output: u16 = bevy::math::U16Vec2::element_sum(_self.into_inner()).into(); output } + fn eq(_self: Ref<bevy::math::U16Vec2>, other: Ref<bevy::math::U16Vec2>) -> bool { + let output: bool = <bevy::math::U16Vec2 as ::core::cmp::PartialEq< + bevy::math::U16Vec2, + >>::eq(&_self, &other) + .into(); + output + } /// Creates a 3D vector from `self` and the given `z` value. fn extend(_self: Val<bevy::math::U16Vec2>, z: u16) -> Val<bevy::math::U16Vec3> { let output: Val<bevy::math::U16Vec3> = bevy::math::U16Vec2::extend( @@ -11935,11 +15352,65 @@ impl bevy::math::U16Vec2 { let output: u16 = bevy::math::U16Vec2::min_element(_self.into_inner()).into(); output } + fn mul( + _self: Val<bevy::math::U16Vec2>, + rhs: Ref<bevy::math::U16Vec2>, + ) -> Val<bevy::math::U16Vec2> { + let output: Val<bevy::math::U16Vec2> = <bevy::math::U16Vec2 as ::core::ops::Mul< + &bevy::math::U16Vec2, + >>::mul(_self.into_inner(), &rhs) + .into(); + output + } + fn mul( + _self: Val<bevy::math::U16Vec2>, + rhs: Val<bevy::math::U16Vec2>, + ) -> Val<bevy::math::U16Vec2> { + let output: Val<bevy::math::U16Vec2> = <bevy::math::U16Vec2 as ::core::ops::Mul< + bevy::math::U16Vec2, + >>::mul(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + fn mul(_self: Val<bevy::math::U16Vec2>, rhs: u16) -> Val<bevy::math::U16Vec2> { + let output: Val<bevy::math::U16Vec2> = <bevy::math::U16Vec2 as ::core::ops::Mul< + u16, + >>::mul(_self.into_inner(), rhs) + .into(); + output + } /// Creates a new vector. fn new(x: u16, y: u16) -> Val<bevy::math::U16Vec2> { let output: Val<bevy::math::U16Vec2> = bevy::math::U16Vec2::new(x, y).into(); output } + fn rem( + _self: Val<bevy::math::U16Vec2>, + rhs: Ref<bevy::math::U16Vec2>, + ) -> Val<bevy::math::U16Vec2> { + let output: Val<bevy::math::U16Vec2> = <bevy::math::U16Vec2 as ::core::ops::Rem< + &bevy::math::U16Vec2, + >>::rem(_self.into_inner(), &rhs) + .into(); + output + } + fn rem( + _self: Val<bevy::math::U16Vec2>, + rhs: Val<bevy::math::U16Vec2>, + ) -> Val<bevy::math::U16Vec2> { + let output: Val<bevy::math::U16Vec2> = <bevy::math::U16Vec2 as ::core::ops::Rem< + bevy::math::U16Vec2, + >>::rem(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + fn rem(_self: Val<bevy::math::U16Vec2>, rhs: u16) -> Val<bevy::math::U16Vec2> { + let output: Val<bevy::math::U16Vec2> = <bevy::math::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( @@ -12027,6 +15498,33 @@ impl bevy::math::U16Vec2 { let output: Val<bevy::math::U16Vec2> = bevy::math::U16Vec2::splat(v).into(); output } + fn sub( + _self: Val<bevy::math::U16Vec2>, + rhs: Ref<bevy::math::U16Vec2>, + ) -> Val<bevy::math::U16Vec2> { + let output: Val<bevy::math::U16Vec2> = <bevy::math::U16Vec2 as ::core::ops::Sub< + &bevy::math::U16Vec2, + >>::sub(_self.into_inner(), &rhs) + .into(); + output + } + fn sub( + _self: Val<bevy::math::U16Vec2>, + rhs: Val<bevy::math::U16Vec2>, + ) -> Val<bevy::math::U16Vec2> { + let output: Val<bevy::math::U16Vec2> = <bevy::math::U16Vec2 as ::core::ops::Sub< + bevy::math::U16Vec2, + >>::sub(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + fn sub(_self: Val<bevy::math::U16Vec2>, rhs: u16) -> Val<bevy::math::U16Vec2> { + let output: Val<bevy::math::U16Vec2> = <bevy::math::U16Vec2 as ::core::ops::Sub< + u16, + >>::sub(_self.into_inner(), rhs) + .into(); + output + } /// `[x, y]` fn to_array(_self: Ref<bevy::math::U16Vec2>) -> [u16; 2] { let output: [u16; 2] = bevy::math::U16Vec2::to_array(&_self).into(); @@ -12123,6 +15621,33 @@ impl bevy::math::U16Vec2 { generated )] impl bevy::math::U16Vec3 { + fn add( + _self: Val<bevy::math::U16Vec3>, + rhs: Ref<bevy::math::U16Vec3>, + ) -> Val<bevy::math::U16Vec3> { + let output: Val<bevy::math::U16Vec3> = <bevy::math::U16Vec3 as ::core::ops::Add< + &bevy::math::U16Vec3, + >>::add(_self.into_inner(), &rhs) + .into(); + output + } + fn add( + _self: Val<bevy::math::U16Vec3>, + rhs: Val<bevy::math::U16Vec3>, + ) -> Val<bevy::math::U16Vec3> { + let output: Val<bevy::math::U16Vec3> = <bevy::math::U16Vec3 as ::core::ops::Add< + bevy::math::U16Vec3, + >>::add(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + fn add(_self: Val<bevy::math::U16Vec3>, rhs: u16) -> Val<bevy::math::U16Vec3> { + let output: Val<bevy::math::U16Vec3> = <bevy::math::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<bevy::math::U16Vec3>) -> Val<bevy::math::DVec3> { let output: Val<bevy::math::DVec3> = bevy::math::U16Vec3::as_dvec3(&_self) @@ -12182,6 +15707,13 @@ impl bevy::math::U16Vec3 { .into(); output } + fn assert_receiver_is_total_eq(_self: Ref<bevy::math::U16Vec3>) -> () { + let output: () = <bevy::math::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 @@ -12199,6 +15731,13 @@ impl bevy::math::U16Vec3 { .into(); output } + fn clone(_self: Ref<bevy::math::U16Vec3>) -> Val<bevy::math::U16Vec3> { + let output: Val<bevy::math::U16Vec3> = <bevy::math::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 @@ -12301,6 +15840,33 @@ impl bevy::math::U16Vec3 { .into(); output } + fn div( + _self: Val<bevy::math::U16Vec3>, + rhs: Ref<bevy::math::U16Vec3>, + ) -> Val<bevy::math::U16Vec3> { + let output: Val<bevy::math::U16Vec3> = <bevy::math::U16Vec3 as ::core::ops::Div< + &bevy::math::U16Vec3, + >>::div(_self.into_inner(), &rhs) + .into(); + output + } + fn div( + _self: Val<bevy::math::U16Vec3>, + rhs: Val<bevy::math::U16Vec3>, + ) -> Val<bevy::math::U16Vec3> { + let output: Val<bevy::math::U16Vec3> = <bevy::math::U16Vec3 as ::core::ops::Div< + bevy::math::U16Vec3, + >>::div(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + fn div(_self: Val<bevy::math::U16Vec3>, rhs: u16) -> Val<bevy::math::U16Vec3> { + let output: Val<bevy::math::U16Vec3> = <bevy::math::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<bevy::math::U16Vec3>, rhs: Val<bevy::math::U16Vec3>) -> u16 { let output: u16 = bevy::math::U16Vec3::dot(_self.into_inner(), rhs.into_inner()) @@ -12332,6 +15898,13 @@ impl bevy::math::U16Vec3 { let output: u16 = bevy::math::U16Vec3::element_sum(_self.into_inner()).into(); output } + fn eq(_self: Ref<bevy::math::U16Vec3>, other: Ref<bevy::math::U16Vec3>) -> bool { + let output: bool = <bevy::math::U16Vec3 as ::core::cmp::PartialEq< + bevy::math::U16Vec3, + >>::eq(&_self, &other) + .into(); + output + } /// Creates a 4D vector from `self` and the given `w` value. fn extend(_self: Val<bevy::math::U16Vec3>, w: u16) -> Val<bevy::math::U16Vec4> { let output: Val<bevy::math::U16Vec4> = bevy::math::U16Vec3::extend( @@ -12389,11 +15962,65 @@ impl bevy::math::U16Vec3 { let output: u16 = bevy::math::U16Vec3::min_element(_self.into_inner()).into(); output } + fn mul( + _self: Val<bevy::math::U16Vec3>, + rhs: Ref<bevy::math::U16Vec3>, + ) -> Val<bevy::math::U16Vec3> { + let output: Val<bevy::math::U16Vec3> = <bevy::math::U16Vec3 as ::core::ops::Mul< + &bevy::math::U16Vec3, + >>::mul(_self.into_inner(), &rhs) + .into(); + output + } + fn mul( + _self: Val<bevy::math::U16Vec3>, + rhs: Val<bevy::math::U16Vec3>, + ) -> Val<bevy::math::U16Vec3> { + let output: Val<bevy::math::U16Vec3> = <bevy::math::U16Vec3 as ::core::ops::Mul< + bevy::math::U16Vec3, + >>::mul(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + fn mul(_self: Val<bevy::math::U16Vec3>, rhs: u16) -> Val<bevy::math::U16Vec3> { + let output: Val<bevy::math::U16Vec3> = <bevy::math::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<bevy::math::U16Vec3> { let output: Val<bevy::math::U16Vec3> = bevy::math::U16Vec3::new(x, y, z).into(); output } + fn rem( + _self: Val<bevy::math::U16Vec3>, + rhs: Ref<bevy::math::U16Vec3>, + ) -> Val<bevy::math::U16Vec3> { + let output: Val<bevy::math::U16Vec3> = <bevy::math::U16Vec3 as ::core::ops::Rem< + &bevy::math::U16Vec3, + >>::rem(_self.into_inner(), &rhs) + .into(); + output + } + fn rem( + _self: Val<bevy::math::U16Vec3>, + rhs: Val<bevy::math::U16Vec3>, + ) -> Val<bevy::math::U16Vec3> { + let output: Val<bevy::math::U16Vec3> = <bevy::math::U16Vec3 as ::core::ops::Rem< + bevy::math::U16Vec3, + >>::rem(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + fn rem(_self: Val<bevy::math::U16Vec3>, rhs: u16) -> Val<bevy::math::U16Vec3> { + let output: Val<bevy::math::U16Vec3> = <bevy::math::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( @@ -12481,6 +16108,33 @@ impl bevy::math::U16Vec3 { let output: Val<bevy::math::U16Vec3> = bevy::math::U16Vec3::splat(v).into(); output } + fn sub( + _self: Val<bevy::math::U16Vec3>, + rhs: Ref<bevy::math::U16Vec3>, + ) -> Val<bevy::math::U16Vec3> { + let output: Val<bevy::math::U16Vec3> = <bevy::math::U16Vec3 as ::core::ops::Sub< + &bevy::math::U16Vec3, + >>::sub(_self.into_inner(), &rhs) + .into(); + output + } + fn sub( + _self: Val<bevy::math::U16Vec3>, + rhs: Val<bevy::math::U16Vec3>, + ) -> Val<bevy::math::U16Vec3> { + let output: Val<bevy::math::U16Vec3> = <bevy::math::U16Vec3 as ::core::ops::Sub< + bevy::math::U16Vec3, + >>::sub(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + fn sub(_self: Val<bevy::math::U16Vec3>, rhs: u16) -> Val<bevy::math::U16Vec3> { + let output: Val<bevy::math::U16Vec3> = <bevy::math::U16Vec3 as ::core::ops::Sub< + u16, + >>::sub(_self.into_inner(), rhs) + .into(); + output + } /// `[x, y, z]` fn to_array(_self: Ref<bevy::math::U16Vec3>) -> [u16; 3] { let output: [u16; 3] = bevy::math::U16Vec3::to_array(&_self).into(); @@ -12595,6 +16249,33 @@ impl bevy::math::U16Vec3 { generated )] impl bevy::math::U16Vec4 { + fn add( + _self: Val<bevy::math::U16Vec4>, + rhs: Ref<bevy::math::U16Vec4>, + ) -> Val<bevy::math::U16Vec4> { + let output: Val<bevy::math::U16Vec4> = <bevy::math::U16Vec4 as ::core::ops::Add< + &bevy::math::U16Vec4, + >>::add(_self.into_inner(), &rhs) + .into(); + output + } + fn add( + _self: Val<bevy::math::U16Vec4>, + rhs: Val<bevy::math::U16Vec4>, + ) -> Val<bevy::math::U16Vec4> { + let output: Val<bevy::math::U16Vec4> = <bevy::math::U16Vec4 as ::core::ops::Add< + bevy::math::U16Vec4, + >>::add(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + fn add(_self: Val<bevy::math::U16Vec4>, rhs: u16) -> Val<bevy::math::U16Vec4> { + let output: Val<bevy::math::U16Vec4> = <bevy::math::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<bevy::math::U16Vec4>) -> Val<bevy::math::DVec4> { let output: Val<bevy::math::DVec4> = bevy::math::U16Vec4::as_dvec4(&_self) @@ -12648,6 +16329,13 @@ impl bevy::math::U16Vec4 { let output: Val<bevy::math::Vec4> = bevy::math::U16Vec4::as_vec4(&_self).into(); output } + fn assert_receiver_is_total_eq(_self: Ref<bevy::math::U16Vec4>) -> () { + let output: () = <bevy::math::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 @@ -12665,6 +16353,13 @@ impl bevy::math::U16Vec4 { .into(); output } + fn clone(_self: Ref<bevy::math::U16Vec4>) -> Val<bevy::math::U16Vec4> { + let output: Val<bevy::math::U16Vec4> = <bevy::math::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 @@ -12755,6 +16450,33 @@ impl bevy::math::U16Vec4 { .into(); output } + fn div( + _self: Val<bevy::math::U16Vec4>, + rhs: Ref<bevy::math::U16Vec4>, + ) -> Val<bevy::math::U16Vec4> { + let output: Val<bevy::math::U16Vec4> = <bevy::math::U16Vec4 as ::core::ops::Div< + &bevy::math::U16Vec4, + >>::div(_self.into_inner(), &rhs) + .into(); + output + } + fn div( + _self: Val<bevy::math::U16Vec4>, + rhs: Val<bevy::math::U16Vec4>, + ) -> Val<bevy::math::U16Vec4> { + let output: Val<bevy::math::U16Vec4> = <bevy::math::U16Vec4 as ::core::ops::Div< + bevy::math::U16Vec4, + >>::div(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + fn div(_self: Val<bevy::math::U16Vec4>, rhs: u16) -> Val<bevy::math::U16Vec4> { + let output: Val<bevy::math::U16Vec4> = <bevy::math::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<bevy::math::U16Vec4>, rhs: Val<bevy::math::U16Vec4>) -> u16 { let output: u16 = bevy::math::U16Vec4::dot(_self.into_inner(), rhs.into_inner()) @@ -12786,6 +16508,13 @@ impl bevy::math::U16Vec4 { let output: u16 = bevy::math::U16Vec4::element_sum(_self.into_inner()).into(); output } + fn eq(_self: Ref<bevy::math::U16Vec4>, other: Ref<bevy::math::U16Vec4>) -> bool { + let output: bool = <bevy::math::U16Vec4 as ::core::cmp::PartialEq< + bevy::math::U16Vec4, + >>::eq(&_self, &other) + .into(); + output + } /// Creates a new vector from an array. fn from_array(a: [u16; 4]) -> Val<bevy::math::U16Vec4> { let output: Val<bevy::math::U16Vec4> = bevy::math::U16Vec4::from_array(a).into(); @@ -12834,12 +16563,66 @@ impl bevy::math::U16Vec4 { let output: u16 = bevy::math::U16Vec4::min_element(_self.into_inner()).into(); output } + fn mul( + _self: Val<bevy::math::U16Vec4>, + rhs: Ref<bevy::math::U16Vec4>, + ) -> Val<bevy::math::U16Vec4> { + let output: Val<bevy::math::U16Vec4> = <bevy::math::U16Vec4 as ::core::ops::Mul< + &bevy::math::U16Vec4, + >>::mul(_self.into_inner(), &rhs) + .into(); + output + } + fn mul( + _self: Val<bevy::math::U16Vec4>, + rhs: Val<bevy::math::U16Vec4>, + ) -> Val<bevy::math::U16Vec4> { + let output: Val<bevy::math::U16Vec4> = <bevy::math::U16Vec4 as ::core::ops::Mul< + bevy::math::U16Vec4, + >>::mul(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + fn mul(_self: Val<bevy::math::U16Vec4>, rhs: u16) -> Val<bevy::math::U16Vec4> { + let output: Val<bevy::math::U16Vec4> = <bevy::math::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<bevy::math::U16Vec4> { let output: Val<bevy::math::U16Vec4> = bevy::math::U16Vec4::new(x, y, z, w) .into(); output } + fn rem( + _self: Val<bevy::math::U16Vec4>, + rhs: Ref<bevy::math::U16Vec4>, + ) -> Val<bevy::math::U16Vec4> { + let output: Val<bevy::math::U16Vec4> = <bevy::math::U16Vec4 as ::core::ops::Rem< + &bevy::math::U16Vec4, + >>::rem(_self.into_inner(), &rhs) + .into(); + output + } + fn rem( + _self: Val<bevy::math::U16Vec4>, + rhs: Val<bevy::math::U16Vec4>, + ) -> Val<bevy::math::U16Vec4> { + let output: Val<bevy::math::U16Vec4> = <bevy::math::U16Vec4 as ::core::ops::Rem< + bevy::math::U16Vec4, + >>::rem(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + fn rem(_self: Val<bevy::math::U16Vec4>, rhs: u16) -> Val<bevy::math::U16Vec4> { + let output: Val<bevy::math::U16Vec4> = <bevy::math::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( @@ -12927,6 +16710,33 @@ impl bevy::math::U16Vec4 { let output: Val<bevy::math::U16Vec4> = bevy::math::U16Vec4::splat(v).into(); output } + fn sub( + _self: Val<bevy::math::U16Vec4>, + rhs: Ref<bevy::math::U16Vec4>, + ) -> Val<bevy::math::U16Vec4> { + let output: Val<bevy::math::U16Vec4> = <bevy::math::U16Vec4 as ::core::ops::Sub< + &bevy::math::U16Vec4, + >>::sub(_self.into_inner(), &rhs) + .into(); + output + } + fn sub( + _self: Val<bevy::math::U16Vec4>, + rhs: Val<bevy::math::U16Vec4>, + ) -> Val<bevy::math::U16Vec4> { + let output: Val<bevy::math::U16Vec4> = <bevy::math::U16Vec4 as ::core::ops::Sub< + bevy::math::U16Vec4, + >>::sub(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + fn sub(_self: Val<bevy::math::U16Vec4>, rhs: u16) -> Val<bevy::math::U16Vec4> { + let output: Val<bevy::math::U16Vec4> = <bevy::math::U16Vec4 as ::core::ops::Sub< + u16, + >>::sub(_self.into_inner(), rhs) + .into(); + output + } /// `[x, y, z, w]` fn to_array(_self: Ref<bevy::math::U16Vec4>) -> [u16; 4] { let output: [u16; 4] = bevy::math::U16Vec4::to_array(&_self).into(); @@ -13050,6 +16860,33 @@ impl bevy::math::U16Vec4 { generated )] impl bevy::math::U64Vec2 { + fn add( + _self: Val<bevy::math::U64Vec2>, + rhs: Ref<bevy::math::U64Vec2>, + ) -> Val<bevy::math::U64Vec2> { + let output: Val<bevy::math::U64Vec2> = <bevy::math::U64Vec2 as ::core::ops::Add< + &bevy::math::U64Vec2, + >>::add(_self.into_inner(), &rhs) + .into(); + output + } + fn add( + _self: Val<bevy::math::U64Vec2>, + rhs: Val<bevy::math::U64Vec2>, + ) -> Val<bevy::math::U64Vec2> { + let output: Val<bevy::math::U64Vec2> = <bevy::math::U64Vec2 as ::core::ops::Add< + bevy::math::U64Vec2, + >>::add(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + fn add(_self: Val<bevy::math::U64Vec2>, rhs: u64) -> Val<bevy::math::U64Vec2> { + let output: Val<bevy::math::U64Vec2> = <bevy::math::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<bevy::math::U64Vec2>) -> Val<bevy::math::DVec2> { let output: Val<bevy::math::DVec2> = bevy::math::U64Vec2::as_dvec2(&_self) @@ -13103,6 +16940,13 @@ impl bevy::math::U64Vec2 { let output: Val<bevy::math::Vec2> = bevy::math::U64Vec2::as_vec2(&_self).into(); output } + fn assert_receiver_is_total_eq(_self: Ref<bevy::math::U64Vec2>) -> () { + let output: () = <bevy::math::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 @@ -13120,6 +16964,13 @@ impl bevy::math::U64Vec2 { .into(); output } + fn clone(_self: Ref<bevy::math::U64Vec2>) -> Val<bevy::math::U64Vec2> { + let output: Val<bevy::math::U64Vec2> = <bevy::math::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 @@ -13210,6 +17061,33 @@ impl bevy::math::U64Vec2 { .into(); output } + fn div( + _self: Val<bevy::math::U64Vec2>, + rhs: Ref<bevy::math::U64Vec2>, + ) -> Val<bevy::math::U64Vec2> { + let output: Val<bevy::math::U64Vec2> = <bevy::math::U64Vec2 as ::core::ops::Div< + &bevy::math::U64Vec2, + >>::div(_self.into_inner(), &rhs) + .into(); + output + } + fn div( + _self: Val<bevy::math::U64Vec2>, + rhs: Val<bevy::math::U64Vec2>, + ) -> Val<bevy::math::U64Vec2> { + let output: Val<bevy::math::U64Vec2> = <bevy::math::U64Vec2 as ::core::ops::Div< + bevy::math::U64Vec2, + >>::div(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + fn div(_self: Val<bevy::math::U64Vec2>, rhs: u64) -> Val<bevy::math::U64Vec2> { + let output: Val<bevy::math::U64Vec2> = <bevy::math::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<bevy::math::U64Vec2>, rhs: Val<bevy::math::U64Vec2>) -> u64 { let output: u64 = bevy::math::U64Vec2::dot(_self.into_inner(), rhs.into_inner()) @@ -13241,6 +17119,13 @@ impl bevy::math::U64Vec2 { let output: u64 = bevy::math::U64Vec2::element_sum(_self.into_inner()).into(); output } + fn eq(_self: Ref<bevy::math::U64Vec2>, other: Ref<bevy::math::U64Vec2>) -> bool { + let output: bool = <bevy::math::U64Vec2 as ::core::cmp::PartialEq< + bevy::math::U64Vec2, + >>::eq(&_self, &other) + .into(); + output + } /// Creates a 3D vector from `self` and the given `z` value. fn extend(_self: Val<bevy::math::U64Vec2>, z: u64) -> Val<bevy::math::U64Vec3> { let output: Val<bevy::math::U64Vec3> = bevy::math::U64Vec2::extend( @@ -13298,11 +17183,65 @@ impl bevy::math::U64Vec2 { let output: u64 = bevy::math::U64Vec2::min_element(_self.into_inner()).into(); output } + fn mul( + _self: Val<bevy::math::U64Vec2>, + rhs: Ref<bevy::math::U64Vec2>, + ) -> Val<bevy::math::U64Vec2> { + let output: Val<bevy::math::U64Vec2> = <bevy::math::U64Vec2 as ::core::ops::Mul< + &bevy::math::U64Vec2, + >>::mul(_self.into_inner(), &rhs) + .into(); + output + } + fn mul( + _self: Val<bevy::math::U64Vec2>, + rhs: Val<bevy::math::U64Vec2>, + ) -> Val<bevy::math::U64Vec2> { + let output: Val<bevy::math::U64Vec2> = <bevy::math::U64Vec2 as ::core::ops::Mul< + bevy::math::U64Vec2, + >>::mul(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + fn mul(_self: Val<bevy::math::U64Vec2>, rhs: u64) -> Val<bevy::math::U64Vec2> { + let output: Val<bevy::math::U64Vec2> = <bevy::math::U64Vec2 as ::core::ops::Mul< + u64, + >>::mul(_self.into_inner(), rhs) + .into(); + output + } /// Creates a new vector. fn new(x: u64, y: u64) -> Val<bevy::math::U64Vec2> { let output: Val<bevy::math::U64Vec2> = bevy::math::U64Vec2::new(x, y).into(); output } + fn rem( + _self: Val<bevy::math::U64Vec2>, + rhs: Ref<bevy::math::U64Vec2>, + ) -> Val<bevy::math::U64Vec2> { + let output: Val<bevy::math::U64Vec2> = <bevy::math::U64Vec2 as ::core::ops::Rem< + &bevy::math::U64Vec2, + >>::rem(_self.into_inner(), &rhs) + .into(); + output + } + fn rem( + _self: Val<bevy::math::U64Vec2>, + rhs: Val<bevy::math::U64Vec2>, + ) -> Val<bevy::math::U64Vec2> { + let output: Val<bevy::math::U64Vec2> = <bevy::math::U64Vec2 as ::core::ops::Rem< + bevy::math::U64Vec2, + >>::rem(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + fn rem(_self: Val<bevy::math::U64Vec2>, rhs: u64) -> Val<bevy::math::U64Vec2> { + let output: Val<bevy::math::U64Vec2> = <bevy::math::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( @@ -13390,6 +17329,33 @@ impl bevy::math::U64Vec2 { let output: Val<bevy::math::U64Vec2> = bevy::math::U64Vec2::splat(v).into(); output } + fn sub( + _self: Val<bevy::math::U64Vec2>, + rhs: Ref<bevy::math::U64Vec2>, + ) -> Val<bevy::math::U64Vec2> { + let output: Val<bevy::math::U64Vec2> = <bevy::math::U64Vec2 as ::core::ops::Sub< + &bevy::math::U64Vec2, + >>::sub(_self.into_inner(), &rhs) + .into(); + output + } + fn sub( + _self: Val<bevy::math::U64Vec2>, + rhs: Val<bevy::math::U64Vec2>, + ) -> Val<bevy::math::U64Vec2> { + let output: Val<bevy::math::U64Vec2> = <bevy::math::U64Vec2 as ::core::ops::Sub< + bevy::math::U64Vec2, + >>::sub(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + fn sub(_self: Val<bevy::math::U64Vec2>, rhs: u64) -> Val<bevy::math::U64Vec2> { + let output: Val<bevy::math::U64Vec2> = <bevy::math::U64Vec2 as ::core::ops::Sub< + u64, + >>::sub(_self.into_inner(), rhs) + .into(); + output + } /// `[x, y]` fn to_array(_self: Ref<bevy::math::U64Vec2>) -> [u64; 2] { let output: [u64; 2] = bevy::math::U64Vec2::to_array(&_self).into(); @@ -13486,6 +17452,33 @@ impl bevy::math::U64Vec2 { generated )] impl bevy::math::U64Vec3 { + fn add( + _self: Val<bevy::math::U64Vec3>, + rhs: Ref<bevy::math::U64Vec3>, + ) -> Val<bevy::math::U64Vec3> { + let output: Val<bevy::math::U64Vec3> = <bevy::math::U64Vec3 as ::core::ops::Add< + &bevy::math::U64Vec3, + >>::add(_self.into_inner(), &rhs) + .into(); + output + } + fn add( + _self: Val<bevy::math::U64Vec3>, + rhs: Val<bevy::math::U64Vec3>, + ) -> Val<bevy::math::U64Vec3> { + let output: Val<bevy::math::U64Vec3> = <bevy::math::U64Vec3 as ::core::ops::Add< + bevy::math::U64Vec3, + >>::add(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + fn add(_self: Val<bevy::math::U64Vec3>, rhs: u64) -> Val<bevy::math::U64Vec3> { + let output: Val<bevy::math::U64Vec3> = <bevy::math::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<bevy::math::U64Vec3>) -> Val<bevy::math::DVec3> { let output: Val<bevy::math::DVec3> = bevy::math::U64Vec3::as_dvec3(&_self) @@ -13545,6 +17538,13 @@ impl bevy::math::U64Vec3 { .into(); output } + fn assert_receiver_is_total_eq(_self: Ref<bevy::math::U64Vec3>) -> () { + let output: () = <bevy::math::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 @@ -13562,6 +17562,13 @@ impl bevy::math::U64Vec3 { .into(); output } + fn clone(_self: Ref<bevy::math::U64Vec3>) -> Val<bevy::math::U64Vec3> { + let output: Val<bevy::math::U64Vec3> = <bevy::math::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 @@ -13664,6 +17671,33 @@ impl bevy::math::U64Vec3 { .into(); output } + fn div( + _self: Val<bevy::math::U64Vec3>, + rhs: Ref<bevy::math::U64Vec3>, + ) -> Val<bevy::math::U64Vec3> { + let output: Val<bevy::math::U64Vec3> = <bevy::math::U64Vec3 as ::core::ops::Div< + &bevy::math::U64Vec3, + >>::div(_self.into_inner(), &rhs) + .into(); + output + } + fn div( + _self: Val<bevy::math::U64Vec3>, + rhs: Val<bevy::math::U64Vec3>, + ) -> Val<bevy::math::U64Vec3> { + let output: Val<bevy::math::U64Vec3> = <bevy::math::U64Vec3 as ::core::ops::Div< + bevy::math::U64Vec3, + >>::div(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + fn div(_self: Val<bevy::math::U64Vec3>, rhs: u64) -> Val<bevy::math::U64Vec3> { + let output: Val<bevy::math::U64Vec3> = <bevy::math::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<bevy::math::U64Vec3>, rhs: Val<bevy::math::U64Vec3>) -> u64 { let output: u64 = bevy::math::U64Vec3::dot(_self.into_inner(), rhs.into_inner()) @@ -13695,6 +17729,13 @@ impl bevy::math::U64Vec3 { let output: u64 = bevy::math::U64Vec3::element_sum(_self.into_inner()).into(); output } + fn eq(_self: Ref<bevy::math::U64Vec3>, other: Ref<bevy::math::U64Vec3>) -> bool { + let output: bool = <bevy::math::U64Vec3 as ::core::cmp::PartialEq< + bevy::math::U64Vec3, + >>::eq(&_self, &other) + .into(); + output + } /// Creates a 4D vector from `self` and the given `w` value. fn extend(_self: Val<bevy::math::U64Vec3>, w: u64) -> Val<bevy::math::U64Vec4> { let output: Val<bevy::math::U64Vec4> = bevy::math::U64Vec3::extend( @@ -13752,11 +17793,65 @@ impl bevy::math::U64Vec3 { let output: u64 = bevy::math::U64Vec3::min_element(_self.into_inner()).into(); output } + fn mul( + _self: Val<bevy::math::U64Vec3>, + rhs: Ref<bevy::math::U64Vec3>, + ) -> Val<bevy::math::U64Vec3> { + let output: Val<bevy::math::U64Vec3> = <bevy::math::U64Vec3 as ::core::ops::Mul< + &bevy::math::U64Vec3, + >>::mul(_self.into_inner(), &rhs) + .into(); + output + } + fn mul( + _self: Val<bevy::math::U64Vec3>, + rhs: Val<bevy::math::U64Vec3>, + ) -> Val<bevy::math::U64Vec3> { + let output: Val<bevy::math::U64Vec3> = <bevy::math::U64Vec3 as ::core::ops::Mul< + bevy::math::U64Vec3, + >>::mul(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + fn mul(_self: Val<bevy::math::U64Vec3>, rhs: u64) -> Val<bevy::math::U64Vec3> { + let output: Val<bevy::math::U64Vec3> = <bevy::math::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<bevy::math::U64Vec3> { let output: Val<bevy::math::U64Vec3> = bevy::math::U64Vec3::new(x, y, z).into(); output } + fn rem( + _self: Val<bevy::math::U64Vec3>, + rhs: Ref<bevy::math::U64Vec3>, + ) -> Val<bevy::math::U64Vec3> { + let output: Val<bevy::math::U64Vec3> = <bevy::math::U64Vec3 as ::core::ops::Rem< + &bevy::math::U64Vec3, + >>::rem(_self.into_inner(), &rhs) + .into(); + output + } + fn rem( + _self: Val<bevy::math::U64Vec3>, + rhs: Val<bevy::math::U64Vec3>, + ) -> Val<bevy::math::U64Vec3> { + let output: Val<bevy::math::U64Vec3> = <bevy::math::U64Vec3 as ::core::ops::Rem< + bevy::math::U64Vec3, + >>::rem(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + fn rem(_self: Val<bevy::math::U64Vec3>, rhs: u64) -> Val<bevy::math::U64Vec3> { + let output: Val<bevy::math::U64Vec3> = <bevy::math::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( @@ -13844,6 +17939,33 @@ impl bevy::math::U64Vec3 { let output: Val<bevy::math::U64Vec3> = bevy::math::U64Vec3::splat(v).into(); output } + fn sub( + _self: Val<bevy::math::U64Vec3>, + rhs: Ref<bevy::math::U64Vec3>, + ) -> Val<bevy::math::U64Vec3> { + let output: Val<bevy::math::U64Vec3> = <bevy::math::U64Vec3 as ::core::ops::Sub< + &bevy::math::U64Vec3, + >>::sub(_self.into_inner(), &rhs) + .into(); + output + } + fn sub( + _self: Val<bevy::math::U64Vec3>, + rhs: Val<bevy::math::U64Vec3>, + ) -> Val<bevy::math::U64Vec3> { + let output: Val<bevy::math::U64Vec3> = <bevy::math::U64Vec3 as ::core::ops::Sub< + bevy::math::U64Vec3, + >>::sub(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + fn sub(_self: Val<bevy::math::U64Vec3>, rhs: u64) -> Val<bevy::math::U64Vec3> { + let output: Val<bevy::math::U64Vec3> = <bevy::math::U64Vec3 as ::core::ops::Sub< + u64, + >>::sub(_self.into_inner(), rhs) + .into(); + output + } /// `[x, y, z]` fn to_array(_self: Ref<bevy::math::U64Vec3>) -> [u64; 3] { let output: [u64; 3] = bevy::math::U64Vec3::to_array(&_self).into(); @@ -13958,6 +18080,33 @@ impl bevy::math::U64Vec3 { generated )] impl bevy::math::U64Vec4 { + fn add( + _self: Val<bevy::math::U64Vec4>, + rhs: Ref<bevy::math::U64Vec4>, + ) -> Val<bevy::math::U64Vec4> { + let output: Val<bevy::math::U64Vec4> = <bevy::math::U64Vec4 as ::core::ops::Add< + &bevy::math::U64Vec4, + >>::add(_self.into_inner(), &rhs) + .into(); + output + } + fn add( + _self: Val<bevy::math::U64Vec4>, + rhs: Val<bevy::math::U64Vec4>, + ) -> Val<bevy::math::U64Vec4> { + let output: Val<bevy::math::U64Vec4> = <bevy::math::U64Vec4 as ::core::ops::Add< + bevy::math::U64Vec4, + >>::add(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + fn add(_self: Val<bevy::math::U64Vec4>, rhs: u64) -> Val<bevy::math::U64Vec4> { + let output: Val<bevy::math::U64Vec4> = <bevy::math::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<bevy::math::U64Vec4>) -> Val<bevy::math::DVec4> { let output: Val<bevy::math::DVec4> = bevy::math::U64Vec4::as_dvec4(&_self) @@ -14011,6 +18160,13 @@ impl bevy::math::U64Vec4 { let output: Val<bevy::math::Vec4> = bevy::math::U64Vec4::as_vec4(&_self).into(); output } + fn assert_receiver_is_total_eq(_self: Ref<bevy::math::U64Vec4>) -> () { + let output: () = <bevy::math::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 @@ -14028,6 +18184,13 @@ impl bevy::math::U64Vec4 { .into(); output } + fn clone(_self: Ref<bevy::math::U64Vec4>) -> Val<bevy::math::U64Vec4> { + let output: Val<bevy::math::U64Vec4> = <bevy::math::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 @@ -14118,6 +18281,33 @@ impl bevy::math::U64Vec4 { .into(); output } + fn div( + _self: Val<bevy::math::U64Vec4>, + rhs: Ref<bevy::math::U64Vec4>, + ) -> Val<bevy::math::U64Vec4> { + let output: Val<bevy::math::U64Vec4> = <bevy::math::U64Vec4 as ::core::ops::Div< + &bevy::math::U64Vec4, + >>::div(_self.into_inner(), &rhs) + .into(); + output + } + fn div( + _self: Val<bevy::math::U64Vec4>, + rhs: Val<bevy::math::U64Vec4>, + ) -> Val<bevy::math::U64Vec4> { + let output: Val<bevy::math::U64Vec4> = <bevy::math::U64Vec4 as ::core::ops::Div< + bevy::math::U64Vec4, + >>::div(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + fn div(_self: Val<bevy::math::U64Vec4>, rhs: u64) -> Val<bevy::math::U64Vec4> { + let output: Val<bevy::math::U64Vec4> = <bevy::math::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<bevy::math::U64Vec4>, rhs: Val<bevy::math::U64Vec4>) -> u64 { let output: u64 = bevy::math::U64Vec4::dot(_self.into_inner(), rhs.into_inner()) @@ -14149,6 +18339,13 @@ impl bevy::math::U64Vec4 { let output: u64 = bevy::math::U64Vec4::element_sum(_self.into_inner()).into(); output } + fn eq(_self: Ref<bevy::math::U64Vec4>, other: Ref<bevy::math::U64Vec4>) -> bool { + let output: bool = <bevy::math::U64Vec4 as ::core::cmp::PartialEq< + bevy::math::U64Vec4, + >>::eq(&_self, &other) + .into(); + output + } /// Creates a new vector from an array. fn from_array(a: [u64; 4]) -> Val<bevy::math::U64Vec4> { let output: Val<bevy::math::U64Vec4> = bevy::math::U64Vec4::from_array(a).into(); @@ -14197,12 +18394,66 @@ impl bevy::math::U64Vec4 { let output: u64 = bevy::math::U64Vec4::min_element(_self.into_inner()).into(); output } + fn mul( + _self: Val<bevy::math::U64Vec4>, + rhs: Ref<bevy::math::U64Vec4>, + ) -> Val<bevy::math::U64Vec4> { + let output: Val<bevy::math::U64Vec4> = <bevy::math::U64Vec4 as ::core::ops::Mul< + &bevy::math::U64Vec4, + >>::mul(_self.into_inner(), &rhs) + .into(); + output + } + fn mul( + _self: Val<bevy::math::U64Vec4>, + rhs: Val<bevy::math::U64Vec4>, + ) -> Val<bevy::math::U64Vec4> { + let output: Val<bevy::math::U64Vec4> = <bevy::math::U64Vec4 as ::core::ops::Mul< + bevy::math::U64Vec4, + >>::mul(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + fn mul(_self: Val<bevy::math::U64Vec4>, rhs: u64) -> Val<bevy::math::U64Vec4> { + let output: Val<bevy::math::U64Vec4> = <bevy::math::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<bevy::math::U64Vec4> { let output: Val<bevy::math::U64Vec4> = bevy::math::U64Vec4::new(x, y, z, w) .into(); output } + fn rem( + _self: Val<bevy::math::U64Vec4>, + rhs: Ref<bevy::math::U64Vec4>, + ) -> Val<bevy::math::U64Vec4> { + let output: Val<bevy::math::U64Vec4> = <bevy::math::U64Vec4 as ::core::ops::Rem< + &bevy::math::U64Vec4, + >>::rem(_self.into_inner(), &rhs) + .into(); + output + } + fn rem( + _self: Val<bevy::math::U64Vec4>, + rhs: Val<bevy::math::U64Vec4>, + ) -> Val<bevy::math::U64Vec4> { + let output: Val<bevy::math::U64Vec4> = <bevy::math::U64Vec4 as ::core::ops::Rem< + bevy::math::U64Vec4, + >>::rem(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + fn rem(_self: Val<bevy::math::U64Vec4>, rhs: u64) -> Val<bevy::math::U64Vec4> { + let output: Val<bevy::math::U64Vec4> = <bevy::math::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( @@ -14290,6 +18541,33 @@ impl bevy::math::U64Vec4 { let output: Val<bevy::math::U64Vec4> = bevy::math::U64Vec4::splat(v).into(); output } + fn sub( + _self: Val<bevy::math::U64Vec4>, + rhs: Ref<bevy::math::U64Vec4>, + ) -> Val<bevy::math::U64Vec4> { + let output: Val<bevy::math::U64Vec4> = <bevy::math::U64Vec4 as ::core::ops::Sub< + &bevy::math::U64Vec4, + >>::sub(_self.into_inner(), &rhs) + .into(); + output + } + fn sub( + _self: Val<bevy::math::U64Vec4>, + rhs: Val<bevy::math::U64Vec4>, + ) -> Val<bevy::math::U64Vec4> { + let output: Val<bevy::math::U64Vec4> = <bevy::math::U64Vec4 as ::core::ops::Sub< + bevy::math::U64Vec4, + >>::sub(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + fn sub(_self: Val<bevy::math::U64Vec4>, rhs: u64) -> Val<bevy::math::U64Vec4> { + let output: Val<bevy::math::U64Vec4> = <bevy::math::U64Vec4 as ::core::ops::Sub< + u64, + >>::sub(_self.into_inner(), rhs) + .into(); + output + } /// `[x, y, z, w]` fn to_array(_self: Ref<bevy::math::U64Vec4>) -> [u64; 4] { let output: [u64; 4] = bevy::math::U64Vec4::to_array(&_self).into(); @@ -14439,6 +18717,33 @@ impl bevy::math::Vec2 { .into(); output } + fn add( + _self: Val<bevy::math::Vec2>, + rhs: Ref<bevy::math::Vec2>, + ) -> Val<bevy::math::Vec2> { + let output: Val<bevy::math::Vec2> = <bevy::math::Vec2 as ::core::ops::Add< + &bevy::math::Vec2, + >>::add(_self.into_inner(), &rhs) + .into(); + output + } + fn add( + _self: Val<bevy::math::Vec2>, + rhs: Val<bevy::math::Vec2>, + ) -> Val<bevy::math::Vec2> { + let output: Val<bevy::math::Vec2> = <bevy::math::Vec2 as ::core::ops::Add< + bevy::math::Vec2, + >>::add(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + fn add(_self: Val<bevy::math::Vec2>, rhs: f32) -> Val<bevy::math::Vec2> { + let output: Val<bevy::math::Vec2> = <bevy::math::Vec2 as ::core::ops::Add< + f32, + >>::add(_self.into_inner(), rhs) + .into(); + output + } fn angle_between(_self: Val<bevy::math::Vec2>, rhs: Val<bevy::math::Vec2>) -> f32 { let output: f32 = bevy::math::Vec2::angle_between( _self.into_inner(), @@ -14574,6 +18879,13 @@ impl bevy::math::Vec2 { .into(); output } + fn clone(_self: Ref<bevy::math::Vec2>) -> Val<bevy::math::Vec2> { + let output: Val<bevy::math::Vec2> = <bevy::math::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 @@ -14697,6 +19009,33 @@ impl bevy::math::Vec2 { .into(); output } + fn div( + _self: Val<bevy::math::Vec2>, + rhs: Ref<bevy::math::Vec2>, + ) -> Val<bevy::math::Vec2> { + let output: Val<bevy::math::Vec2> = <bevy::math::Vec2 as ::core::ops::Div< + &bevy::math::Vec2, + >>::div(_self.into_inner(), &rhs) + .into(); + output + } + fn div( + _self: Val<bevy::math::Vec2>, + rhs: Val<bevy::math::Vec2>, + ) -> Val<bevy::math::Vec2> { + let output: Val<bevy::math::Vec2> = <bevy::math::Vec2 as ::core::ops::Div< + bevy::math::Vec2, + >>::div(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + fn div(_self: Val<bevy::math::Vec2>, rhs: f32) -> Val<bevy::math::Vec2> { + let output: Val<bevy::math::Vec2> = <bevy::math::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<bevy::math::Vec2>, @@ -14739,6 +19078,13 @@ impl bevy::math::Vec2 { let output: f32 = bevy::math::Vec2::element_sum(_self.into_inner()).into(); output } + fn eq(_self: Ref<bevy::math::Vec2>, other: Ref<bevy::math::Vec2>) -> bool { + let output: bool = <bevy::math::Vec2 as ::core::cmp::PartialEq< + bevy::math::Vec2, + >>::eq(&_self, &other) + .into(); + output + } /// Returns a vector containing `e^self` (the exponential function) for each element of /// `self`. fn exp(_self: Val<bevy::math::Vec2>) -> Val<bevy::math::Vec2> { @@ -14941,6 +19287,33 @@ impl bevy::math::Vec2 { .into(); output } + fn mul( + _self: Val<bevy::math::Vec2>, + rhs: Ref<bevy::math::Vec2>, + ) -> Val<bevy::math::Vec2> { + let output: Val<bevy::math::Vec2> = <bevy::math::Vec2 as ::core::ops::Mul< + &bevy::math::Vec2, + >>::mul(_self.into_inner(), &rhs) + .into(); + output + } + fn mul( + _self: Val<bevy::math::Vec2>, + rhs: Val<bevy::math::Vec2>, + ) -> Val<bevy::math::Vec2> { + let output: Val<bevy::math::Vec2> = <bevy::math::Vec2 as ::core::ops::Mul< + bevy::math::Vec2, + >>::mul(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + fn mul(_self: Val<bevy::math::Vec2>, rhs: f32) -> Val<bevy::math::Vec2> { + let output: Val<bevy::math::Vec2> = <bevy::math::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 @@ -14960,6 +19333,13 @@ impl bevy::math::Vec2 { .into(); output } + fn neg(_self: Val<bevy::math::Vec2>) -> Val<bevy::math::Vec2> { + let output: Val<bevy::math::Vec2> = <bevy::math::Vec2 as ::core::ops::Neg>::neg( + _self.into_inner(), + ) + .into(); + output + } /// Creates a new vector. fn new(x: f32, y: f32) -> Val<bevy::math::Vec2> { let output: Val<bevy::math::Vec2> = bevy::math::Vec2::new(x, y).into(); @@ -15131,6 +19511,33 @@ impl bevy::math::Vec2 { .into(); output } + fn rem( + _self: Val<bevy::math::Vec2>, + rhs: Ref<bevy::math::Vec2>, + ) -> Val<bevy::math::Vec2> { + let output: Val<bevy::math::Vec2> = <bevy::math::Vec2 as ::core::ops::Rem< + &bevy::math::Vec2, + >>::rem(_self.into_inner(), &rhs) + .into(); + output + } + fn rem( + _self: Val<bevy::math::Vec2>, + rhs: Val<bevy::math::Vec2>, + ) -> Val<bevy::math::Vec2> { + let output: Val<bevy::math::Vec2> = <bevy::math::Vec2 as ::core::ops::Rem< + bevy::math::Vec2, + >>::rem(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + fn rem(_self: Val<bevy::math::Vec2>, rhs: f32) -> Val<bevy::math::Vec2> { + let output: Val<bevy::math::Vec2> = <bevy::math::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( @@ -15213,6 +19620,33 @@ impl bevy::math::Vec2 { let output: Val<bevy::math::Vec2> = bevy::math::Vec2::splat(v).into(); output } + fn sub( + _self: Val<bevy::math::Vec2>, + rhs: Ref<bevy::math::Vec2>, + ) -> Val<bevy::math::Vec2> { + let output: Val<bevy::math::Vec2> = <bevy::math::Vec2 as ::core::ops::Sub< + &bevy::math::Vec2, + >>::sub(_self.into_inner(), &rhs) + .into(); + output + } + fn sub( + _self: Val<bevy::math::Vec2>, + rhs: Val<bevy::math::Vec2>, + ) -> Val<bevy::math::Vec2> { + let output: Val<bevy::math::Vec2> = <bevy::math::Vec2 as ::core::ops::Sub< + bevy::math::Vec2, + >>::sub(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + fn sub(_self: Val<bevy::math::Vec2>, rhs: f32) -> Val<bevy::math::Vec2> { + let output: Val<bevy::math::Vec2> = <bevy::math::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<bevy::math::Vec2>) -> f32 { @@ -15283,6 +19717,33 @@ impl bevy::math::Vec3A { .into(); output } + fn add( + _self: Val<bevy::math::Vec3A>, + rhs: Ref<bevy::math::Vec3A>, + ) -> Val<bevy::math::Vec3A> { + let output: Val<bevy::math::Vec3A> = <bevy::math::Vec3A as ::core::ops::Add< + &bevy::math::Vec3A, + >>::add(_self.into_inner(), &rhs) + .into(); + output + } + fn add( + _self: Val<bevy::math::Vec3A>, + rhs: Val<bevy::math::Vec3A>, + ) -> Val<bevy::math::Vec3A> { + let output: Val<bevy::math::Vec3A> = <bevy::math::Vec3A as ::core::ops::Add< + bevy::math::Vec3A, + >>::add(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + fn add(_self: Val<bevy::math::Vec3A>, rhs: f32) -> Val<bevy::math::Vec3A> { + let output: Val<bevy::math::Vec3A> = <bevy::math::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<bevy::math::Vec3A>, rhs: Val<bevy::math::Vec3A>) -> f32 { @@ -15434,6 +19895,13 @@ impl bevy::math::Vec3A { .into(); output } + fn clone(_self: Ref<bevy::math::Vec3A>) -> Val<bevy::math::Vec3A> { + let output: Val<bevy::math::Vec3A> = <bevy::math::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 @@ -15569,6 +20037,33 @@ impl bevy::math::Vec3A { .into(); output } + fn div( + _self: Val<bevy::math::Vec3A>, + rhs: Ref<bevy::math::Vec3A>, + ) -> Val<bevy::math::Vec3A> { + let output: Val<bevy::math::Vec3A> = <bevy::math::Vec3A as ::core::ops::Div< + &bevy::math::Vec3A, + >>::div(_self.into_inner(), &rhs) + .into(); + output + } + fn div( + _self: Val<bevy::math::Vec3A>, + rhs: Val<bevy::math::Vec3A>, + ) -> Val<bevy::math::Vec3A> { + let output: Val<bevy::math::Vec3A> = <bevy::math::Vec3A as ::core::ops::Div< + bevy::math::Vec3A, + >>::div(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + fn div(_self: Val<bevy::math::Vec3A>, rhs: f32) -> Val<bevy::math::Vec3A> { + let output: Val<bevy::math::Vec3A> = <bevy::math::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<bevy::math::Vec3A>, @@ -15611,6 +20106,13 @@ impl bevy::math::Vec3A { let output: f32 = bevy::math::Vec3A::element_sum(_self.into_inner()).into(); output } + fn eq(_self: Ref<bevy::math::Vec3A>, rhs: Ref<bevy::math::Vec3A>) -> bool { + let output: bool = <bevy::math::Vec3A as ::core::cmp::PartialEq< + bevy::math::Vec3A, + >>::eq(&_self, &rhs) + .into(); + output + } /// Returns a vector containing `e^self` (the exponential function) for each element of /// `self`. fn exp(_self: Val<bevy::math::Vec3A>) -> Val<bevy::math::Vec3A> { @@ -15812,6 +20314,33 @@ impl bevy::math::Vec3A { .into(); output } + fn mul( + _self: Val<bevy::math::Vec3A>, + rhs: Ref<bevy::math::Vec3A>, + ) -> Val<bevy::math::Vec3A> { + let output: Val<bevy::math::Vec3A> = <bevy::math::Vec3A as ::core::ops::Mul< + &bevy::math::Vec3A, + >>::mul(_self.into_inner(), &rhs) + .into(); + output + } + fn mul( + _self: Val<bevy::math::Vec3A>, + rhs: Val<bevy::math::Vec3A>, + ) -> Val<bevy::math::Vec3A> { + let output: Val<bevy::math::Vec3A> = <bevy::math::Vec3A as ::core::ops::Mul< + bevy::math::Vec3A, + >>::mul(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + fn mul(_self: Val<bevy::math::Vec3A>, rhs: f32) -> Val<bevy::math::Vec3A> { + let output: Val<bevy::math::Vec3A> = <bevy::math::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 @@ -15831,6 +20360,13 @@ impl bevy::math::Vec3A { .into(); output } + fn neg(_self: Val<bevy::math::Vec3A>) -> Val<bevy::math::Vec3A> { + let output: Val<bevy::math::Vec3A> = <bevy::math::Vec3A as ::core::ops::Neg>::neg( + _self.into_inner(), + ) + .into(); + output + } /// Creates a new vector. fn new(x: f32, y: f32, z: f32) -> Val<bevy::math::Vec3A> { let output: Val<bevy::math::Vec3A> = bevy::math::Vec3A::new(x, y, z).into(); @@ -15989,6 +20525,33 @@ impl bevy::math::Vec3A { .into(); output } + fn rem( + _self: Val<bevy::math::Vec3A>, + rhs: Ref<bevy::math::Vec3A>, + ) -> Val<bevy::math::Vec3A> { + let output: Val<bevy::math::Vec3A> = <bevy::math::Vec3A as ::core::ops::Rem< + &bevy::math::Vec3A, + >>::rem(_self.into_inner(), &rhs) + .into(); + output + } + fn rem( + _self: Val<bevy::math::Vec3A>, + rhs: Val<bevy::math::Vec3A>, + ) -> Val<bevy::math::Vec3A> { + let output: Val<bevy::math::Vec3A> = <bevy::math::Vec3A as ::core::ops::Rem< + bevy::math::Vec3A, + >>::rem(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + fn rem(_self: Val<bevy::math::Vec3A>, rhs: f32) -> Val<bevy::math::Vec3A> { + let output: Val<bevy::math::Vec3A> = <bevy::math::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( @@ -16042,6 +20605,33 @@ impl bevy::math::Vec3A { let output: Val<bevy::math::Vec3A> = bevy::math::Vec3A::splat(v).into(); output } + fn sub( + _self: Val<bevy::math::Vec3A>, + rhs: Ref<bevy::math::Vec3A>, + ) -> Val<bevy::math::Vec3A> { + let output: Val<bevy::math::Vec3A> = <bevy::math::Vec3A as ::core::ops::Sub< + &bevy::math::Vec3A, + >>::sub(_self.into_inner(), &rhs) + .into(); + output + } + fn sub( + _self: Val<bevy::math::Vec3A>, + rhs: Val<bevy::math::Vec3A>, + ) -> Val<bevy::math::Vec3A> { + let output: Val<bevy::math::Vec3A> = <bevy::math::Vec3A as ::core::ops::Sub< + bevy::math::Vec3A, + >>::sub(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + fn sub(_self: Val<bevy::math::Vec3A>, rhs: f32) -> Val<bevy::math::Vec3A> { + let output: Val<bevy::math::Vec3A> = <bevy::math::Vec3A as ::core::ops::Sub< + f32, + >>::sub(_self.into_inner(), rhs) + .into(); + output + } /// `[x, y, z]` fn to_array(_self: Ref<bevy::math::Vec3A>) -> [f32; 3] { let output: [f32; 3] = bevy::math::Vec3A::to_array(&_self).into(); @@ -16124,6 +20714,33 @@ impl bevy::math::Vec4 { .into(); output } + fn add( + _self: Val<bevy::math::Vec4>, + rhs: Ref<bevy::math::Vec4>, + ) -> Val<bevy::math::Vec4> { + let output: Val<bevy::math::Vec4> = <bevy::math::Vec4 as ::core::ops::Add< + &bevy::math::Vec4, + >>::add(_self.into_inner(), &rhs) + .into(); + output + } + fn add( + _self: Val<bevy::math::Vec4>, + rhs: Val<bevy::math::Vec4>, + ) -> Val<bevy::math::Vec4> { + let output: Val<bevy::math::Vec4> = <bevy::math::Vec4 as ::core::ops::Add< + bevy::math::Vec4, + >>::add(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + fn add(_self: Val<bevy::math::Vec4>, rhs: f32) -> Val<bevy::math::Vec4> { + let output: Val<bevy::math::Vec4> = <bevy::math::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<bevy::math::Vec4>) -> Val<bevy::math::DVec4> { let output: Val<bevy::math::DVec4> = bevy::math::Vec4::as_dvec4(&_self).into(); @@ -16241,6 +20858,13 @@ impl bevy::math::Vec4 { .into(); output } + fn clone(_self: Ref<bevy::math::Vec4>) -> Val<bevy::math::Vec4> { + let output: Val<bevy::math::Vec4> = <bevy::math::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 @@ -16364,6 +20988,33 @@ impl bevy::math::Vec4 { .into(); output } + fn div( + _self: Val<bevy::math::Vec4>, + rhs: Ref<bevy::math::Vec4>, + ) -> Val<bevy::math::Vec4> { + let output: Val<bevy::math::Vec4> = <bevy::math::Vec4 as ::core::ops::Div< + &bevy::math::Vec4, + >>::div(_self.into_inner(), &rhs) + .into(); + output + } + fn div( + _self: Val<bevy::math::Vec4>, + rhs: Val<bevy::math::Vec4>, + ) -> Val<bevy::math::Vec4> { + let output: Val<bevy::math::Vec4> = <bevy::math::Vec4 as ::core::ops::Div< + bevy::math::Vec4, + >>::div(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + fn div(_self: Val<bevy::math::Vec4>, rhs: f32) -> Val<bevy::math::Vec4> { + let output: Val<bevy::math::Vec4> = <bevy::math::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<bevy::math::Vec4>, @@ -16406,6 +21057,13 @@ impl bevy::math::Vec4 { let output: f32 = bevy::math::Vec4::element_sum(_self.into_inner()).into(); output } + fn eq(_self: Ref<bevy::math::Vec4>, rhs: Ref<bevy::math::Vec4>) -> bool { + let output: bool = <bevy::math::Vec4 as ::core::cmp::PartialEq< + bevy::math::Vec4, + >>::eq(&_self, &rhs) + .into(); + output + } /// Returns a vector containing `e^self` (the exponential function) for each element of /// `self`. fn exp(_self: Val<bevy::math::Vec4>) -> Val<bevy::math::Vec4> { @@ -16591,6 +21249,33 @@ impl bevy::math::Vec4 { .into(); output } + fn mul( + _self: Val<bevy::math::Vec4>, + rhs: Ref<bevy::math::Vec4>, + ) -> Val<bevy::math::Vec4> { + let output: Val<bevy::math::Vec4> = <bevy::math::Vec4 as ::core::ops::Mul< + &bevy::math::Vec4, + >>::mul(_self.into_inner(), &rhs) + .into(); + output + } + fn mul( + _self: Val<bevy::math::Vec4>, + rhs: Val<bevy::math::Vec4>, + ) -> Val<bevy::math::Vec4> { + let output: Val<bevy::math::Vec4> = <bevy::math::Vec4 as ::core::ops::Mul< + bevy::math::Vec4, + >>::mul(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + fn mul(_self: Val<bevy::math::Vec4>, rhs: f32) -> Val<bevy::math::Vec4> { + let output: Val<bevy::math::Vec4> = <bevy::math::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 @@ -16610,6 +21295,13 @@ impl bevy::math::Vec4 { .into(); output } + fn neg(_self: Val<bevy::math::Vec4>) -> Val<bevy::math::Vec4> { + let output: Val<bevy::math::Vec4> = <bevy::math::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<bevy::math::Vec4> { let output: Val<bevy::math::Vec4> = bevy::math::Vec4::new(x, y, z, w).into(); @@ -16765,6 +21457,33 @@ impl bevy::math::Vec4 { .into(); output } + fn rem( + _self: Val<bevy::math::Vec4>, + rhs: Ref<bevy::math::Vec4>, + ) -> Val<bevy::math::Vec4> { + let output: Val<bevy::math::Vec4> = <bevy::math::Vec4 as ::core::ops::Rem< + &bevy::math::Vec4, + >>::rem(_self.into_inner(), &rhs) + .into(); + output + } + fn rem( + _self: Val<bevy::math::Vec4>, + rhs: Val<bevy::math::Vec4>, + ) -> Val<bevy::math::Vec4> { + let output: Val<bevy::math::Vec4> = <bevy::math::Vec4 as ::core::ops::Rem< + bevy::math::Vec4, + >>::rem(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + fn rem(_self: Val<bevy::math::Vec4>, rhs: f32) -> Val<bevy::math::Vec4> { + let output: Val<bevy::math::Vec4> = <bevy::math::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( @@ -16816,6 +21535,33 @@ impl bevy::math::Vec4 { let output: Val<bevy::math::Vec4> = bevy::math::Vec4::splat(v).into(); output } + fn sub( + _self: Val<bevy::math::Vec4>, + rhs: Ref<bevy::math::Vec4>, + ) -> Val<bevy::math::Vec4> { + let output: Val<bevy::math::Vec4> = <bevy::math::Vec4 as ::core::ops::Sub< + &bevy::math::Vec4, + >>::sub(_self.into_inner(), &rhs) + .into(); + output + } + fn sub( + _self: Val<bevy::math::Vec4>, + rhs: Val<bevy::math::Vec4>, + ) -> Val<bevy::math::Vec4> { + let output: Val<bevy::math::Vec4> = <bevy::math::Vec4 as ::core::ops::Sub< + bevy::math::Vec4, + >>::sub(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + fn sub(_self: Val<bevy::math::Vec4>, rhs: f32) -> Val<bevy::math::Vec4> { + let output: Val<bevy::math::Vec4> = <bevy::math::Vec4 as ::core::ops::Sub< + f32, + >>::sub(_self.into_inner(), rhs) + .into(); + output + } /// `[x, y, z, w]` fn to_array(_self: Ref<bevy::math::Vec4>) -> [f32; 4] { let output: [f32; 4] = bevy::math::Vec4::to_array(&_self).into(); @@ -16892,6 +21638,13 @@ impl bevy::math::BVec2 { let output: bool = bevy::math::BVec2::any(_self.into_inner()).into(); output } + fn assert_receiver_is_total_eq(_self: Ref<bevy::math::BVec2>) -> () { + let output: () = <bevy::math::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. @@ -16899,6 +21652,20 @@ impl bevy::math::BVec2 { let output: u32 = bevy::math::BVec2::bitmask(_self.into_inner()).into(); output } + fn clone(_self: Ref<bevy::math::BVec2>) -> Val<bevy::math::BVec2> { + let output: Val<bevy::math::BVec2> = <bevy::math::BVec2 as bevy::reflect::erased_serde::__private::serde::__private::Clone>::clone( + &_self, + ) + .into(); + output + } + fn eq(_self: Ref<bevy::math::BVec2>, other: Ref<bevy::math::BVec2>) -> bool { + let output: bool = <bevy::math::BVec2 as ::core::cmp::PartialEq< + bevy::math::BVec2, + >>::eq(&_self, &other) + .into(); + output + } /// Creates a new vector mask from a bool array. fn from_array(a: [bool; 2]) -> Val<bevy::math::BVec2> { let output: Val<bevy::math::BVec2> = bevy::math::BVec2::from_array(a).into(); @@ -16944,6 +21711,13 @@ impl bevy::math::BVec3 { let output: bool = bevy::math::BVec3::any(_self.into_inner()).into(); output } + fn assert_receiver_is_total_eq(_self: Ref<bevy::math::BVec3>) -> () { + let output: () = <bevy::math::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. @@ -16951,6 +21725,20 @@ impl bevy::math::BVec3 { let output: u32 = bevy::math::BVec3::bitmask(_self.into_inner()).into(); output } + fn clone(_self: Ref<bevy::math::BVec3>) -> Val<bevy::math::BVec3> { + let output: Val<bevy::math::BVec3> = <bevy::math::BVec3 as bevy::reflect::erased_serde::__private::serde::__private::Clone>::clone( + &_self, + ) + .into(); + output + } + fn eq(_self: Ref<bevy::math::BVec3>, other: Ref<bevy::math::BVec3>) -> bool { + let output: bool = <bevy::math::BVec3 as ::core::cmp::PartialEq< + bevy::math::BVec3, + >>::eq(&_self, &other) + .into(); + output + } /// Creates a new vector mask from a bool array. fn from_array(a: [bool; 3]) -> Val<bevy::math::BVec3> { let output: Val<bevy::math::BVec3> = bevy::math::BVec3::from_array(a).into(); @@ -16996,6 +21784,13 @@ impl bevy::math::BVec4 { let output: bool = bevy::math::BVec4::any(_self.into_inner()).into(); output } + fn assert_receiver_is_total_eq(_self: Ref<bevy::math::BVec4>) -> () { + let output: () = <bevy::math::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. @@ -17003,6 +21798,20 @@ impl bevy::math::BVec4 { let output: u32 = bevy::math::BVec4::bitmask(_self.into_inner()).into(); output } + fn clone(_self: Ref<bevy::math::BVec4>) -> Val<bevy::math::BVec4> { + let output: Val<bevy::math::BVec4> = <bevy::math::BVec4 as bevy::reflect::erased_serde::__private::serde::__private::Clone>::clone( + &_self, + ) + .into(); + output + } + fn eq(_self: Ref<bevy::math::BVec4>, other: Ref<bevy::math::BVec4>) -> bool { + let output: bool = <bevy::math::BVec4 as ::core::cmp::PartialEq< + bevy::math::BVec4, + >>::eq(&_self, &other) + .into(); + output + } /// Creates a new vector mask from a bool array. fn from_array(a: [bool; 4]) -> Val<bevy::math::BVec4> { let output: Val<bevy::math::BVec4> = bevy::math::BVec4::from_array(a).into(); @@ -17064,6 +21873,33 @@ impl bevy::math::DVec2 { .into(); output } + fn add( + _self: Val<bevy::math::DVec2>, + rhs: Ref<bevy::math::DVec2>, + ) -> Val<bevy::math::DVec2> { + let output: Val<bevy::math::DVec2> = <bevy::math::DVec2 as ::core::ops::Add< + &bevy::math::DVec2, + >>::add(_self.into_inner(), &rhs) + .into(); + output + } + fn add( + _self: Val<bevy::math::DVec2>, + rhs: Val<bevy::math::DVec2>, + ) -> Val<bevy::math::DVec2> { + let output: Val<bevy::math::DVec2> = <bevy::math::DVec2 as ::core::ops::Add< + bevy::math::DVec2, + >>::add(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + fn add(_self: Val<bevy::math::DVec2>, rhs: f64) -> Val<bevy::math::DVec2> { + let output: Val<bevy::math::DVec2> = <bevy::math::DVec2 as ::core::ops::Add< + f64, + >>::add(_self.into_inner(), rhs) + .into(); + output + } fn angle_between(_self: Val<bevy::math::DVec2>, rhs: Val<bevy::math::DVec2>) -> f64 { let output: f64 = bevy::math::DVec2::angle_between( _self.into_inner(), @@ -17201,6 +22037,13 @@ impl bevy::math::DVec2 { .into(); output } + fn clone(_self: Ref<bevy::math::DVec2>) -> Val<bevy::math::DVec2> { + let output: Val<bevy::math::DVec2> = <bevy::math::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 @@ -17324,6 +22167,33 @@ impl bevy::math::DVec2 { .into(); output } + fn div( + _self: Val<bevy::math::DVec2>, + rhs: Ref<bevy::math::DVec2>, + ) -> Val<bevy::math::DVec2> { + let output: Val<bevy::math::DVec2> = <bevy::math::DVec2 as ::core::ops::Div< + &bevy::math::DVec2, + >>::div(_self.into_inner(), &rhs) + .into(); + output + } + fn div( + _self: Val<bevy::math::DVec2>, + rhs: Val<bevy::math::DVec2>, + ) -> Val<bevy::math::DVec2> { + let output: Val<bevy::math::DVec2> = <bevy::math::DVec2 as ::core::ops::Div< + bevy::math::DVec2, + >>::div(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + fn div(_self: Val<bevy::math::DVec2>, rhs: f64) -> Val<bevy::math::DVec2> { + let output: Val<bevy::math::DVec2> = <bevy::math::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<bevy::math::DVec2>, @@ -17366,6 +22236,13 @@ impl bevy::math::DVec2 { let output: f64 = bevy::math::DVec2::element_sum(_self.into_inner()).into(); output } + fn eq(_self: Ref<bevy::math::DVec2>, other: Ref<bevy::math::DVec2>) -> bool { + let output: bool = <bevy::math::DVec2 as ::core::cmp::PartialEq< + bevy::math::DVec2, + >>::eq(&_self, &other) + .into(); + output + } /// Returns a vector containing `e^self` (the exponential function) for each element of /// `self`. fn exp(_self: Val<bevy::math::DVec2>) -> Val<bevy::math::DVec2> { @@ -17568,6 +22445,33 @@ impl bevy::math::DVec2 { .into(); output } + fn mul( + _self: Val<bevy::math::DVec2>, + rhs: Ref<bevy::math::DVec2>, + ) -> Val<bevy::math::DVec2> { + let output: Val<bevy::math::DVec2> = <bevy::math::DVec2 as ::core::ops::Mul< + &bevy::math::DVec2, + >>::mul(_self.into_inner(), &rhs) + .into(); + output + } + fn mul( + _self: Val<bevy::math::DVec2>, + rhs: Val<bevy::math::DVec2>, + ) -> Val<bevy::math::DVec2> { + let output: Val<bevy::math::DVec2> = <bevy::math::DVec2 as ::core::ops::Mul< + bevy::math::DVec2, + >>::mul(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + fn mul(_self: Val<bevy::math::DVec2>, rhs: f64) -> Val<bevy::math::DVec2> { + let output: Val<bevy::math::DVec2> = <bevy::math::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 @@ -17587,6 +22491,13 @@ impl bevy::math::DVec2 { .into(); output } + fn neg(_self: Val<bevy::math::DVec2>) -> Val<bevy::math::DVec2> { + let output: Val<bevy::math::DVec2> = <bevy::math::DVec2 as ::core::ops::Neg>::neg( + _self.into_inner(), + ) + .into(); + output + } /// Creates a new vector. fn new(x: f64, y: f64) -> Val<bevy::math::DVec2> { let output: Val<bevy::math::DVec2> = bevy::math::DVec2::new(x, y).into(); @@ -17761,6 +22672,33 @@ impl bevy::math::DVec2 { .into(); output } + fn rem( + _self: Val<bevy::math::DVec2>, + rhs: Ref<bevy::math::DVec2>, + ) -> Val<bevy::math::DVec2> { + let output: Val<bevy::math::DVec2> = <bevy::math::DVec2 as ::core::ops::Rem< + &bevy::math::DVec2, + >>::rem(_self.into_inner(), &rhs) + .into(); + output + } + fn rem( + _self: Val<bevy::math::DVec2>, + rhs: Val<bevy::math::DVec2>, + ) -> Val<bevy::math::DVec2> { + let output: Val<bevy::math::DVec2> = <bevy::math::DVec2 as ::core::ops::Rem< + bevy::math::DVec2, + >>::rem(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + fn rem(_self: Val<bevy::math::DVec2>, rhs: f64) -> Val<bevy::math::DVec2> { + let output: Val<bevy::math::DVec2> = <bevy::math::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( @@ -17845,6 +22783,33 @@ impl bevy::math::DVec2 { let output: Val<bevy::math::DVec2> = bevy::math::DVec2::splat(v).into(); output } + fn sub( + _self: Val<bevy::math::DVec2>, + rhs: Ref<bevy::math::DVec2>, + ) -> Val<bevy::math::DVec2> { + let output: Val<bevy::math::DVec2> = <bevy::math::DVec2 as ::core::ops::Sub< + &bevy::math::DVec2, + >>::sub(_self.into_inner(), &rhs) + .into(); + output + } + fn sub( + _self: Val<bevy::math::DVec2>, + rhs: Val<bevy::math::DVec2>, + ) -> Val<bevy::math::DVec2> { + let output: Val<bevy::math::DVec2> = <bevy::math::DVec2 as ::core::ops::Sub< + bevy::math::DVec2, + >>::sub(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + fn sub(_self: Val<bevy::math::DVec2>, rhs: f64) -> Val<bevy::math::DVec2> { + let output: Val<bevy::math::DVec2> = <bevy::math::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<bevy::math::DVec2>) -> f64 { @@ -17915,6 +22880,33 @@ impl bevy::math::DVec3 { .into(); output } + fn add( + _self: Val<bevy::math::DVec3>, + rhs: Ref<bevy::math::DVec3>, + ) -> Val<bevy::math::DVec3> { + let output: Val<bevy::math::DVec3> = <bevy::math::DVec3 as ::core::ops::Add< + &bevy::math::DVec3, + >>::add(_self.into_inner(), &rhs) + .into(); + output + } + fn add( + _self: Val<bevy::math::DVec3>, + rhs: Val<bevy::math::DVec3>, + ) -> Val<bevy::math::DVec3> { + let output: Val<bevy::math::DVec3> = <bevy::math::DVec3 as ::core::ops::Add< + bevy::math::DVec3, + >>::add(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + fn add(_self: Val<bevy::math::DVec3>, rhs: f64) -> Val<bevy::math::DVec3> { + let output: Val<bevy::math::DVec3> = <bevy::math::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<bevy::math::DVec3>, rhs: Val<bevy::math::DVec3>) -> f64 { @@ -18071,6 +23063,13 @@ impl bevy::math::DVec3 { .into(); output } + fn clone(_self: Ref<bevy::math::DVec3>) -> Val<bevy::math::DVec3> { + let output: Val<bevy::math::DVec3> = <bevy::math::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 @@ -18206,6 +23205,33 @@ impl bevy::math::DVec3 { .into(); output } + fn div( + _self: Val<bevy::math::DVec3>, + rhs: Ref<bevy::math::DVec3>, + ) -> Val<bevy::math::DVec3> { + let output: Val<bevy::math::DVec3> = <bevy::math::DVec3 as ::core::ops::Div< + &bevy::math::DVec3, + >>::div(_self.into_inner(), &rhs) + .into(); + output + } + fn div( + _self: Val<bevy::math::DVec3>, + rhs: Val<bevy::math::DVec3>, + ) -> Val<bevy::math::DVec3> { + let output: Val<bevy::math::DVec3> = <bevy::math::DVec3 as ::core::ops::Div< + bevy::math::DVec3, + >>::div(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + fn div(_self: Val<bevy::math::DVec3>, rhs: f64) -> Val<bevy::math::DVec3> { + let output: Val<bevy::math::DVec3> = <bevy::math::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<bevy::math::DVec3>, @@ -18248,6 +23274,13 @@ impl bevy::math::DVec3 { let output: f64 = bevy::math::DVec3::element_sum(_self.into_inner()).into(); output } + fn eq(_self: Ref<bevy::math::DVec3>, other: Ref<bevy::math::DVec3>) -> bool { + let output: bool = <bevy::math::DVec3 as ::core::cmp::PartialEq< + bevy::math::DVec3, + >>::eq(&_self, &other) + .into(); + output + } /// Returns a vector containing `e^self` (the exponential function) for each element of /// `self`. fn exp(_self: Val<bevy::math::DVec3>) -> Val<bevy::math::DVec3> { @@ -18442,6 +23475,33 @@ impl bevy::math::DVec3 { .into(); output } + fn mul( + _self: Val<bevy::math::DVec3>, + rhs: Ref<bevy::math::DVec3>, + ) -> Val<bevy::math::DVec3> { + let output: Val<bevy::math::DVec3> = <bevy::math::DVec3 as ::core::ops::Mul< + &bevy::math::DVec3, + >>::mul(_self.into_inner(), &rhs) + .into(); + output + } + fn mul( + _self: Val<bevy::math::DVec3>, + rhs: Val<bevy::math::DVec3>, + ) -> Val<bevy::math::DVec3> { + let output: Val<bevy::math::DVec3> = <bevy::math::DVec3 as ::core::ops::Mul< + bevy::math::DVec3, + >>::mul(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + fn mul(_self: Val<bevy::math::DVec3>, rhs: f64) -> Val<bevy::math::DVec3> { + let output: Val<bevy::math::DVec3> = <bevy::math::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 @@ -18461,6 +23521,13 @@ impl bevy::math::DVec3 { .into(); output } + fn neg(_self: Val<bevy::math::DVec3>) -> Val<bevy::math::DVec3> { + let output: Val<bevy::math::DVec3> = <bevy::math::DVec3 as ::core::ops::Neg>::neg( + _self.into_inner(), + ) + .into(); + output + } /// Creates a new vector. fn new(x: f64, y: f64, z: f64) -> Val<bevy::math::DVec3> { let output: Val<bevy::math::DVec3> = bevy::math::DVec3::new(x, y, z).into(); @@ -18619,6 +23686,33 @@ impl bevy::math::DVec3 { .into(); output } + fn rem( + _self: Val<bevy::math::DVec3>, + rhs: Ref<bevy::math::DVec3>, + ) -> Val<bevy::math::DVec3> { + let output: Val<bevy::math::DVec3> = <bevy::math::DVec3 as ::core::ops::Rem< + &bevy::math::DVec3, + >>::rem(_self.into_inner(), &rhs) + .into(); + output + } + fn rem( + _self: Val<bevy::math::DVec3>, + rhs: Val<bevy::math::DVec3>, + ) -> Val<bevy::math::DVec3> { + let output: Val<bevy::math::DVec3> = <bevy::math::DVec3 as ::core::ops::Rem< + bevy::math::DVec3, + >>::rem(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + fn rem(_self: Val<bevy::math::DVec3>, rhs: f64) -> Val<bevy::math::DVec3> { + let output: Val<bevy::math::DVec3> = <bevy::math::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( @@ -18672,6 +23766,33 @@ impl bevy::math::DVec3 { let output: Val<bevy::math::DVec3> = bevy::math::DVec3::splat(v).into(); output } + fn sub( + _self: Val<bevy::math::DVec3>, + rhs: Ref<bevy::math::DVec3>, + ) -> Val<bevy::math::DVec3> { + let output: Val<bevy::math::DVec3> = <bevy::math::DVec3 as ::core::ops::Sub< + &bevy::math::DVec3, + >>::sub(_self.into_inner(), &rhs) + .into(); + output + } + fn sub( + _self: Val<bevy::math::DVec3>, + rhs: Val<bevy::math::DVec3>, + ) -> Val<bevy::math::DVec3> { + let output: Val<bevy::math::DVec3> = <bevy::math::DVec3 as ::core::ops::Sub< + bevy::math::DVec3, + >>::sub(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + fn sub(_self: Val<bevy::math::DVec3>, rhs: f64) -> Val<bevy::math::DVec3> { + let output: Val<bevy::math::DVec3> = <bevy::math::DVec3 as ::core::ops::Sub< + f64, + >>::sub(_self.into_inner(), rhs) + .into(); + output + } /// `[x, y, z]` fn to_array(_self: Ref<bevy::math::DVec3>) -> [f64; 3] { let output: [f64; 3] = bevy::math::DVec3::to_array(&_self).into(); @@ -18754,6 +23875,33 @@ impl bevy::math::DVec4 { .into(); output } + fn add( + _self: Val<bevy::math::DVec4>, + rhs: Ref<bevy::math::DVec4>, + ) -> Val<bevy::math::DVec4> { + let output: Val<bevy::math::DVec4> = <bevy::math::DVec4 as ::core::ops::Add< + &bevy::math::DVec4, + >>::add(_self.into_inner(), &rhs) + .into(); + output + } + fn add( + _self: Val<bevy::math::DVec4>, + rhs: Val<bevy::math::DVec4>, + ) -> Val<bevy::math::DVec4> { + let output: Val<bevy::math::DVec4> = <bevy::math::DVec4 as ::core::ops::Add< + bevy::math::DVec4, + >>::add(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + fn add(_self: Val<bevy::math::DVec4>, rhs: f64) -> Val<bevy::math::DVec4> { + let output: Val<bevy::math::DVec4> = <bevy::math::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<bevy::math::DVec4>) -> Val<bevy::math::I16Vec4> { let output: Val<bevy::math::I16Vec4> = bevy::math::DVec4::as_i16vec4(&_self) @@ -18873,6 +24021,13 @@ impl bevy::math::DVec4 { .into(); output } + fn clone(_self: Ref<bevy::math::DVec4>) -> Val<bevy::math::DVec4> { + let output: Val<bevy::math::DVec4> = <bevy::math::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 @@ -18996,6 +24151,33 @@ impl bevy::math::DVec4 { .into(); output } + fn div( + _self: Val<bevy::math::DVec4>, + rhs: Ref<bevy::math::DVec4>, + ) -> Val<bevy::math::DVec4> { + let output: Val<bevy::math::DVec4> = <bevy::math::DVec4 as ::core::ops::Div< + &bevy::math::DVec4, + >>::div(_self.into_inner(), &rhs) + .into(); + output + } + fn div( + _self: Val<bevy::math::DVec4>, + rhs: Val<bevy::math::DVec4>, + ) -> Val<bevy::math::DVec4> { + let output: Val<bevy::math::DVec4> = <bevy::math::DVec4 as ::core::ops::Div< + bevy::math::DVec4, + >>::div(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + fn div(_self: Val<bevy::math::DVec4>, rhs: f64) -> Val<bevy::math::DVec4> { + let output: Val<bevy::math::DVec4> = <bevy::math::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<bevy::math::DVec4>, @@ -19038,6 +24220,13 @@ impl bevy::math::DVec4 { let output: f64 = bevy::math::DVec4::element_sum(_self.into_inner()).into(); output } + fn eq(_self: Ref<bevy::math::DVec4>, other: Ref<bevy::math::DVec4>) -> bool { + let output: bool = <bevy::math::DVec4 as ::core::cmp::PartialEq< + bevy::math::DVec4, + >>::eq(&_self, &other) + .into(); + output + } /// Returns a vector containing `e^self` (the exponential function) for each element of /// `self`. fn exp(_self: Val<bevy::math::DVec4>) -> Val<bevy::math::DVec4> { @@ -19223,6 +24412,33 @@ impl bevy::math::DVec4 { .into(); output } + fn mul( + _self: Val<bevy::math::DVec4>, + rhs: Ref<bevy::math::DVec4>, + ) -> Val<bevy::math::DVec4> { + let output: Val<bevy::math::DVec4> = <bevy::math::DVec4 as ::core::ops::Mul< + &bevy::math::DVec4, + >>::mul(_self.into_inner(), &rhs) + .into(); + output + } + fn mul( + _self: Val<bevy::math::DVec4>, + rhs: Val<bevy::math::DVec4>, + ) -> Val<bevy::math::DVec4> { + let output: Val<bevy::math::DVec4> = <bevy::math::DVec4 as ::core::ops::Mul< + bevy::math::DVec4, + >>::mul(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + fn mul(_self: Val<bevy::math::DVec4>, rhs: f64) -> Val<bevy::math::DVec4> { + let output: Val<bevy::math::DVec4> = <bevy::math::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 @@ -19242,6 +24458,13 @@ impl bevy::math::DVec4 { .into(); output } + fn neg(_self: Val<bevy::math::DVec4>) -> Val<bevy::math::DVec4> { + let output: Val<bevy::math::DVec4> = <bevy::math::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<bevy::math::DVec4> { let output: Val<bevy::math::DVec4> = bevy::math::DVec4::new(x, y, z, w).into(); @@ -19393,10 +24616,37 @@ impl bevy::math::DVec4 { _self: Val<bevy::math::DVec4>, rhs: Val<bevy::math::DVec4>, ) -> Val<bevy::math::DVec4> { - let output: Val<bevy::math::DVec4> = bevy::math::DVec4::reject_from_normalized( - _self.into_inner(), - rhs.into_inner(), - ) + let output: Val<bevy::math::DVec4> = bevy::math::DVec4::reject_from_normalized( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + fn rem( + _self: Val<bevy::math::DVec4>, + rhs: Ref<bevy::math::DVec4>, + ) -> Val<bevy::math::DVec4> { + let output: Val<bevy::math::DVec4> = <bevy::math::DVec4 as ::core::ops::Rem< + &bevy::math::DVec4, + >>::rem(_self.into_inner(), &rhs) + .into(); + output + } + fn rem( + _self: Val<bevy::math::DVec4>, + rhs: Val<bevy::math::DVec4>, + ) -> Val<bevy::math::DVec4> { + let output: Val<bevy::math::DVec4> = <bevy::math::DVec4 as ::core::ops::Rem< + bevy::math::DVec4, + >>::rem(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + fn rem(_self: Val<bevy::math::DVec4>, rhs: f64) -> Val<bevy::math::DVec4> { + let output: Val<bevy::math::DVec4> = <bevy::math::DVec4 as ::core::ops::Rem< + f64, + >>::rem(_self.into_inner(), rhs) .into(); output } @@ -19453,6 +24703,33 @@ impl bevy::math::DVec4 { let output: Val<bevy::math::DVec4> = bevy::math::DVec4::splat(v).into(); output } + fn sub( + _self: Val<bevy::math::DVec4>, + rhs: Ref<bevy::math::DVec4>, + ) -> Val<bevy::math::DVec4> { + let output: Val<bevy::math::DVec4> = <bevy::math::DVec4 as ::core::ops::Sub< + &bevy::math::DVec4, + >>::sub(_self.into_inner(), &rhs) + .into(); + output + } + fn sub( + _self: Val<bevy::math::DVec4>, + rhs: Val<bevy::math::DVec4>, + ) -> Val<bevy::math::DVec4> { + let output: Val<bevy::math::DVec4> = <bevy::math::DVec4 as ::core::ops::Sub< + bevy::math::DVec4, + >>::sub(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + fn sub(_self: Val<bevy::math::DVec4>, rhs: f64) -> Val<bevy::math::DVec4> { + let output: Val<bevy::math::DVec4> = <bevy::math::DVec4 as ::core::ops::Sub< + f64, + >>::sub(_self.into_inner(), rhs) + .into(); + output + } /// `[x, y, z, w]` fn to_array(_self: Ref<bevy::math::DVec4>) -> [f64; 4] { let output: [f64; 4] = bevy::math::DVec4::to_array(&_self).into(); @@ -19543,6 +24820,16 @@ impl bevy::math::Mat2 { .into(); output } + fn add( + _self: Val<bevy::math::Mat2>, + rhs: Val<bevy::math::Mat2>, + ) -> Val<bevy::math::Mat2> { + let output: Val<bevy::math::Mat2> = <bevy::math::Mat2 as ::core::ops::Add< + bevy::math::Mat2, + >>::add(_self.into_inner(), rhs.into_inner()) + .into(); + output + } /// Adds two 2x2 matrices. fn add_mat2( _self: Ref<bevy::math::Mat2>, @@ -19556,6 +24843,13 @@ impl bevy::math::Mat2 { let output: Val<bevy::math::DMat2> = bevy::math::Mat2::as_dmat2(&_self).into(); output } + fn clone(_self: Ref<bevy::math::Mat2>) -> Val<bevy::math::Mat2> { + let output: Val<bevy::math::Mat2> = <bevy::math::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. @@ -19568,12 +24862,26 @@ impl bevy::math::Mat2 { let output: f32 = bevy::math::Mat2::determinant(&_self).into(); output } + fn div(_self: Val<bevy::math::Mat2>, rhs: f32) -> Val<bevy::math::Mat2> { + let output: Val<bevy::math::Mat2> = <bevy::math::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<bevy::math::Mat2>, rhs: f32) -> Val<bevy::math::Mat2> { let output: Val<bevy::math::Mat2> = bevy::math::Mat2::div_scalar(&_self, rhs) .into(); output } + fn eq(_self: Ref<bevy::math::Mat2>, rhs: Ref<bevy::math::Mat2>) -> bool { + let output: bool = <bevy::math::Mat2 as ::core::cmp::PartialEq< + bevy::math::Mat2, + >>::eq(&_self, &rhs) + .into(); + output + } /// Creates a 2x2 matrix containing a rotation of `angle` (in radians). fn from_angle(angle: f32) -> Val<bevy::math::Mat2> { let output: Val<bevy::math::Mat2> = bevy::math::Mat2::from_angle(angle).into(); @@ -19677,6 +24985,33 @@ impl bevy::math::Mat2 { let output: bool = bevy::math::Mat2::is_nan(&_self).into(); output } + fn mul( + _self: Val<bevy::math::Mat2>, + rhs: Val<bevy::math::Mat2>, + ) -> Val<bevy::math::Mat2> { + let output: Val<bevy::math::Mat2> = <bevy::math::Mat2 as ::core::ops::Mul< + bevy::math::Mat2, + >>::mul(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + fn mul( + _self: Val<bevy::math::Mat2>, + rhs: Val<bevy::math::Vec2>, + ) -> Val<bevy::math::Vec2> { + let output: Val<bevy::math::Vec2> = <bevy::math::Mat2 as ::core::ops::Mul< + bevy::math::Vec2, + >>::mul(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + fn mul(_self: Val<bevy::math::Mat2>, rhs: f32) -> Val<bevy::math::Mat2> { + let output: Val<bevy::math::Mat2> = <bevy::math::Mat2 as ::core::ops::Mul< + f32, + >>::mul(_self.into_inner(), rhs) + .into(); + output + } /// Multiplies two 2x2 matrices. fn mul_mat2( _self: Ref<bevy::math::Mat2>, @@ -19704,6 +25039,13 @@ impl bevy::math::Mat2 { .into(); output } + fn neg(_self: Val<bevy::math::Mat2>) -> Val<bevy::math::Mat2> { + let output: Val<bevy::math::Mat2> = <bevy::math::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. @@ -19711,6 +25053,16 @@ impl bevy::math::Mat2 { let output: Val<bevy::math::Vec2> = bevy::math::Mat2::row(&_self, index).into(); output } + fn sub( + _self: Val<bevy::math::Mat2>, + rhs: Val<bevy::math::Mat2>, + ) -> Val<bevy::math::Mat2> { + let output: Val<bevy::math::Mat2> = <bevy::math::Mat2 as ::core::ops::Sub< + bevy::math::Mat2, + >>::sub(_self.into_inner(), rhs.into_inner()) + .into(); + output + } /// Subtracts two 2x2 matrices. fn sub_mat2( _self: Ref<bevy::math::Mat2>, @@ -19770,6 +25122,16 @@ impl bevy::math::Mat3 { .into(); output } + fn add( + _self: Val<bevy::math::Mat3>, + rhs: Val<bevy::math::Mat3>, + ) -> Val<bevy::math::Mat3> { + let output: Val<bevy::math::Mat3> = <bevy::math::Mat3 as ::core::ops::Add< + bevy::math::Mat3, + >>::add(_self.into_inner(), rhs.into_inner()) + .into(); + output + } /// Adds two 3x3 matrices. fn add_mat3( _self: Ref<bevy::math::Mat3>, @@ -19783,6 +25145,13 @@ impl bevy::math::Mat3 { let output: Val<bevy::math::DMat3> = bevy::math::Mat3::as_dmat3(&_self).into(); output } + fn clone(_self: Ref<bevy::math::Mat3>) -> Val<bevy::math::Mat3> { + let output: Val<bevy::math::Mat3> = <bevy::math::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. @@ -19795,12 +25164,26 @@ impl bevy::math::Mat3 { let output: f32 = bevy::math::Mat3::determinant(&_self).into(); output } + fn div(_self: Val<bevy::math::Mat3>, rhs: f32) -> Val<bevy::math::Mat3> { + let output: Val<bevy::math::Mat3> = <bevy::math::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<bevy::math::Mat3>, rhs: f32) -> Val<bevy::math::Mat3> { let output: Val<bevy::math::Mat3> = bevy::math::Mat3::div_scalar(&_self, rhs) .into(); output } + fn eq(_self: Ref<bevy::math::Mat3>, rhs: Ref<bevy::math::Mat3>) -> bool { + let output: bool = <bevy::math::Mat3 as ::core::cmp::PartialEq< + bevy::math::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 @@ -19980,6 +25363,53 @@ impl bevy::math::Mat3 { let output: bool = bevy::math::Mat3::is_nan(&_self).into(); output } + fn mul( + _self: Val<bevy::math::Mat3>, + rhs: Val<bevy::math::Affine2>, + ) -> Val<bevy::math::Mat3> { + let output: Val<bevy::math::Mat3> = <bevy::math::Mat3 as ::core::ops::Mul< + bevy::math::Affine2, + >>::mul(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + fn mul( + _self: Val<bevy::math::Mat3>, + rhs: Val<bevy::math::Mat3>, + ) -> Val<bevy::math::Mat3> { + let output: Val<bevy::math::Mat3> = <bevy::math::Mat3 as ::core::ops::Mul< + bevy::math::Mat3, + >>::mul(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + fn mul( + _self: Val<bevy::math::Mat3>, + rhs: Val<bevy::math::Vec3>, + ) -> Val<bevy::math::Vec3> { + let output: Val<bevy::math::Vec3> = <bevy::math::Mat3 as ::core::ops::Mul< + bevy::math::Vec3, + >>::mul(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + fn mul( + _self: Val<bevy::math::Mat3>, + rhs: Val<bevy::math::Vec3A>, + ) -> Val<bevy::math::Vec3A> { + let output: Val<bevy::math::Vec3A> = <bevy::math::Mat3 as ::core::ops::Mul< + bevy::math::Vec3A, + >>::mul(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + fn mul(_self: Val<bevy::math::Mat3>, rhs: f32) -> Val<bevy::math::Mat3> { + let output: Val<bevy::math::Mat3> = <bevy::math::Mat3 as ::core::ops::Mul< + f32, + >>::mul(_self.into_inner(), rhs) + .into(); + output + } /// Multiplies two 3x3 matrices. fn mul_mat3( _self: Ref<bevy::math::Mat3>, @@ -20019,6 +25449,13 @@ impl bevy::math::Mat3 { .into(); output } + fn neg(_self: Val<bevy::math::Mat3>) -> Val<bevy::math::Mat3> { + let output: Val<bevy::math::Mat3> = <bevy::math::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. @@ -20026,6 +25463,16 @@ impl bevy::math::Mat3 { let output: Val<bevy::math::Vec3> = bevy::math::Mat3::row(&_self, index).into(); output } + fn sub( + _self: Val<bevy::math::Mat3>, + rhs: Val<bevy::math::Mat3>, + ) -> Val<bevy::math::Mat3> { + let output: Val<bevy::math::Mat3> = <bevy::math::Mat3 as ::core::ops::Sub< + bevy::math::Mat3, + >>::sub(_self.into_inner(), rhs.into_inner()) + .into(); + output + } /// Subtracts two 3x3 matrices. fn sub_mat3( _self: Ref<bevy::math::Mat3>, @@ -20133,6 +25580,16 @@ impl bevy::math::Mat3A { .into(); output } + fn add( + _self: Val<bevy::math::Mat3A>, + rhs: Val<bevy::math::Mat3A>, + ) -> Val<bevy::math::Mat3A> { + let output: Val<bevy::math::Mat3A> = <bevy::math::Mat3A as ::core::ops::Add< + bevy::math::Mat3A, + >>::add(_self.into_inner(), rhs.into_inner()) + .into(); + output + } /// Adds two 3x3 matrices. fn add_mat3( _self: Ref<bevy::math::Mat3A>, @@ -20146,6 +25603,13 @@ impl bevy::math::Mat3A { let output: Val<bevy::math::DMat3> = bevy::math::Mat3A::as_dmat3(&_self).into(); output } + fn clone(_self: Ref<bevy::math::Mat3A>) -> Val<bevy::math::Mat3A> { + let output: Val<bevy::math::Mat3A> = <bevy::math::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. @@ -20159,12 +25623,26 @@ impl bevy::math::Mat3A { let output: f32 = bevy::math::Mat3A::determinant(&_self).into(); output } + fn div(_self: Val<bevy::math::Mat3A>, rhs: f32) -> Val<bevy::math::Mat3A> { + let output: Val<bevy::math::Mat3A> = <bevy::math::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<bevy::math::Mat3A>, rhs: f32) -> Val<bevy::math::Mat3A> { let output: Val<bevy::math::Mat3A> = bevy::math::Mat3A::div_scalar(&_self, rhs) .into(); output } + fn eq(_self: Ref<bevy::math::Mat3A>, rhs: Ref<bevy::math::Mat3A>) -> bool { + let output: bool = <bevy::math::Mat3A as ::core::cmp::PartialEq< + bevy::math::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 @@ -20344,6 +25822,53 @@ impl bevy::math::Mat3A { let output: bool = bevy::math::Mat3A::is_nan(&_self).into(); output } + fn mul( + _self: Val<bevy::math::Mat3A>, + rhs: Val<bevy::math::Affine2>, + ) -> Val<bevy::math::Mat3A> { + let output: Val<bevy::math::Mat3A> = <bevy::math::Mat3A as ::core::ops::Mul< + bevy::math::Affine2, + >>::mul(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + fn mul( + _self: Val<bevy::math::Mat3A>, + rhs: Val<bevy::math::Mat3A>, + ) -> Val<bevy::math::Mat3A> { + let output: Val<bevy::math::Mat3A> = <bevy::math::Mat3A as ::core::ops::Mul< + bevy::math::Mat3A, + >>::mul(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + fn mul( + _self: Val<bevy::math::Mat3A>, + rhs: Val<bevy::math::Vec3>, + ) -> Val<bevy::math::Vec3> { + let output: Val<bevy::math::Vec3> = <bevy::math::Mat3A as ::core::ops::Mul< + bevy::math::Vec3, + >>::mul(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + fn mul( + _self: Val<bevy::math::Mat3A>, + rhs: Val<bevy::math::Vec3A>, + ) -> Val<bevy::math::Vec3A> { + let output: Val<bevy::math::Vec3A> = <bevy::math::Mat3A as ::core::ops::Mul< + bevy::math::Vec3A, + >>::mul(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + fn mul(_self: Val<bevy::math::Mat3A>, rhs: f32) -> Val<bevy::math::Mat3A> { + let output: Val<bevy::math::Mat3A> = <bevy::math::Mat3A as ::core::ops::Mul< + f32, + >>::mul(_self.into_inner(), rhs) + .into(); + output + } /// Multiplies two 3x3 matrices. fn mul_mat3( _self: Ref<bevy::math::Mat3A>, @@ -20383,6 +25908,13 @@ impl bevy::math::Mat3A { .into(); output } + fn neg(_self: Val<bevy::math::Mat3A>) -> Val<bevy::math::Mat3A> { + let output: Val<bevy::math::Mat3A> = <bevy::math::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. @@ -20391,6 +25923,16 @@ impl bevy::math::Mat3A { .into(); output } + fn sub( + _self: Val<bevy::math::Mat3A>, + rhs: Val<bevy::math::Mat3A>, + ) -> Val<bevy::math::Mat3A> { + let output: Val<bevy::math::Mat3A> = <bevy::math::Mat3A as ::core::ops::Sub< + bevy::math::Mat3A, + >>::sub(_self.into_inner(), rhs.into_inner()) + .into(); + output + } /// Subtracts two 3x3 matrices. fn sub_mat3( _self: Ref<bevy::math::Mat3A>, @@ -20498,6 +26040,16 @@ impl bevy::math::Mat4 { .into(); output } + fn add( + _self: Val<bevy::math::Mat4>, + rhs: Val<bevy::math::Mat4>, + ) -> Val<bevy::math::Mat4> { + let output: Val<bevy::math::Mat4> = <bevy::math::Mat4 as ::core::ops::Add< + bevy::math::Mat4, + >>::add(_self.into_inner(), rhs.into_inner()) + .into(); + output + } /// Adds two 4x4 matrices. fn add_mat4( _self: Ref<bevy::math::Mat4>, @@ -20511,6 +26063,13 @@ impl bevy::math::Mat4 { let output: Val<bevy::math::DMat4> = bevy::math::Mat4::as_dmat4(&_self).into(); output } + fn clone(_self: Ref<bevy::math::Mat4>) -> Val<bevy::math::Mat4> { + let output: Val<bevy::math::Mat4> = <bevy::math::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. @@ -20523,12 +26082,26 @@ impl bevy::math::Mat4 { let output: f32 = bevy::math::Mat4::determinant(&_self).into(); output } + fn div(_self: Val<bevy::math::Mat4>, rhs: f32) -> Val<bevy::math::Mat4> { + let output: Val<bevy::math::Mat4> = <bevy::math::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<bevy::math::Mat4>, rhs: f32) -> Val<bevy::math::Mat4> { let output: Val<bevy::math::Mat4> = bevy::math::Mat4::div_scalar(&_self, rhs) .into(); output } + fn eq(_self: Ref<bevy::math::Mat4>, rhs: Ref<bevy::math::Mat4>) -> bool { + let output: bool = <bevy::math::Mat4 as ::core::cmp::PartialEq< + bevy::math::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 @@ -20790,6 +26363,43 @@ impl bevy::math::Mat4 { .into(); output } + fn mul( + _self: Val<bevy::math::Mat4>, + rhs: Val<bevy::math::Affine3A>, + ) -> Val<bevy::math::Mat4> { + let output: Val<bevy::math::Mat4> = <bevy::math::Mat4 as ::core::ops::Mul< + bevy::math::Affine3A, + >>::mul(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + fn mul( + _self: Val<bevy::math::Mat4>, + rhs: Val<bevy::math::Mat4>, + ) -> Val<bevy::math::Mat4> { + let output: Val<bevy::math::Mat4> = <bevy::math::Mat4 as ::core::ops::Mul< + bevy::math::Mat4, + >>::mul(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + fn mul( + _self: Val<bevy::math::Mat4>, + rhs: Val<bevy::math::Vec4>, + ) -> Val<bevy::math::Vec4> { + let output: Val<bevy::math::Vec4> = <bevy::math::Mat4 as ::core::ops::Mul< + bevy::math::Vec4, + >>::mul(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + fn mul(_self: Val<bevy::math::Mat4>, rhs: f32) -> Val<bevy::math::Mat4> { + let output: Val<bevy::math::Mat4> = <bevy::math::Mat4 as ::core::ops::Mul< + f32, + >>::mul(_self.into_inner(), rhs) + .into(); + output + } /// Multiplies two 4x4 matrices. fn mul_mat4( _self: Ref<bevy::math::Mat4>, @@ -20817,6 +26427,13 @@ impl bevy::math::Mat4 { .into(); output } + fn neg(_self: Val<bevy::math::Mat4>) -> Val<bevy::math::Mat4> { + let output: Val<bevy::math::Mat4> = <bevy::math::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( @@ -21051,6 +26668,16 @@ impl bevy::math::Mat4 { let output: Val<bevy::math::Vec4> = bevy::math::Mat4::row(&_self, index).into(); output } + fn sub( + _self: Val<bevy::math::Mat4>, + rhs: Val<bevy::math::Mat4>, + ) -> Val<bevy::math::Mat4> { + let output: Val<bevy::math::Mat4> = <bevy::math::Mat4 as ::core::ops::Sub< + bevy::math::Mat4, + >>::sub(_self.into_inner(), rhs.into_inner()) + .into(); + output + } /// Subtracts two 4x4 matrices. fn sub_mat4( _self: Ref<bevy::math::Mat4>, @@ -21189,6 +26816,16 @@ impl bevy::math::DMat2 { .into(); output } + fn add( + _self: Val<bevy::math::DMat2>, + rhs: Val<bevy::math::DMat2>, + ) -> Val<bevy::math::DMat2> { + let output: Val<bevy::math::DMat2> = <bevy::math::DMat2 as ::core::ops::Add< + bevy::math::DMat2, + >>::add(_self.into_inner(), rhs.into_inner()) + .into(); + output + } /// Adds two 2x2 matrices. fn add_mat2( _self: Ref<bevy::math::DMat2>, @@ -21202,6 +26839,13 @@ impl bevy::math::DMat2 { let output: Val<bevy::math::Mat2> = bevy::math::DMat2::as_mat2(&_self).into(); output } + fn clone(_self: Ref<bevy::math::DMat2>) -> Val<bevy::math::DMat2> { + let output: Val<bevy::math::DMat2> = <bevy::math::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. @@ -21215,12 +26859,26 @@ impl bevy::math::DMat2 { let output: f64 = bevy::math::DMat2::determinant(&_self).into(); output } + fn div(_self: Val<bevy::math::DMat2>, rhs: f64) -> Val<bevy::math::DMat2> { + let output: Val<bevy::math::DMat2> = <bevy::math::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<bevy::math::DMat2>, rhs: f64) -> Val<bevy::math::DMat2> { let output: Val<bevy::math::DMat2> = bevy::math::DMat2::div_scalar(&_self, rhs) .into(); output } + fn eq(_self: Ref<bevy::math::DMat2>, rhs: Ref<bevy::math::DMat2>) -> bool { + let output: bool = <bevy::math::DMat2 as ::core::cmp::PartialEq< + bevy::math::DMat2, + >>::eq(&_self, &rhs) + .into(); + output + } /// Creates a 2x2 matrix containing a rotation of `angle` (in radians). fn from_angle(angle: f64) -> Val<bevy::math::DMat2> { let output: Val<bevy::math::DMat2> = bevy::math::DMat2::from_angle(angle).into(); @@ -21301,6 +26959,33 @@ impl bevy::math::DMat2 { let output: bool = bevy::math::DMat2::is_nan(&_self).into(); output } + fn mul( + _self: Val<bevy::math::DMat2>, + rhs: Val<bevy::math::DMat2>, + ) -> Val<bevy::math::DMat2> { + let output: Val<bevy::math::DMat2> = <bevy::math::DMat2 as ::core::ops::Mul< + bevy::math::DMat2, + >>::mul(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + fn mul( + _self: Val<bevy::math::DMat2>, + rhs: Val<bevy::math::DVec2>, + ) -> Val<bevy::math::DVec2> { + let output: Val<bevy::math::DVec2> = <bevy::math::DMat2 as ::core::ops::Mul< + bevy::math::DVec2, + >>::mul(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + fn mul(_self: Val<bevy::math::DMat2>, rhs: f64) -> Val<bevy::math::DMat2> { + let output: Val<bevy::math::DMat2> = <bevy::math::DMat2 as ::core::ops::Mul< + f64, + >>::mul(_self.into_inner(), rhs) + .into(); + output + } /// Multiplies two 2x2 matrices. fn mul_mat2( _self: Ref<bevy::math::DMat2>, @@ -21328,6 +27013,13 @@ impl bevy::math::DMat2 { .into(); output } + fn neg(_self: Val<bevy::math::DMat2>) -> Val<bevy::math::DMat2> { + let output: Val<bevy::math::DMat2> = <bevy::math::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. @@ -21336,6 +27028,16 @@ impl bevy::math::DMat2 { .into(); output } + fn sub( + _self: Val<bevy::math::DMat2>, + rhs: Val<bevy::math::DMat2>, + ) -> Val<bevy::math::DMat2> { + let output: Val<bevy::math::DMat2> = <bevy::math::DMat2 as ::core::ops::Sub< + bevy::math::DMat2, + >>::sub(_self.into_inner(), rhs.into_inner()) + .into(); + output + } /// Subtracts two 2x2 matrices. fn sub_mat2( _self: Ref<bevy::math::DMat2>, @@ -21395,6 +27097,16 @@ impl bevy::math::DMat3 { .into(); output } + fn add( + _self: Val<bevy::math::DMat3>, + rhs: Val<bevy::math::DMat3>, + ) -> Val<bevy::math::DMat3> { + let output: Val<bevy::math::DMat3> = <bevy::math::DMat3 as ::core::ops::Add< + bevy::math::DMat3, + >>::add(_self.into_inner(), rhs.into_inner()) + .into(); + output + } /// Adds two 3x3 matrices. fn add_mat3( _self: Ref<bevy::math::DMat3>, @@ -21408,6 +27120,13 @@ impl bevy::math::DMat3 { let output: Val<bevy::math::Mat3> = bevy::math::DMat3::as_mat3(&_self).into(); output } + fn clone(_self: Ref<bevy::math::DMat3>) -> Val<bevy::math::DMat3> { + let output: Val<bevy::math::DMat3> = <bevy::math::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. @@ -21421,12 +27140,26 @@ impl bevy::math::DMat3 { let output: f64 = bevy::math::DMat3::determinant(&_self).into(); output } + fn div(_self: Val<bevy::math::DMat3>, rhs: f64) -> Val<bevy::math::DMat3> { + let output: Val<bevy::math::DMat3> = <bevy::math::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<bevy::math::DMat3>, rhs: f64) -> Val<bevy::math::DMat3> { let output: Val<bevy::math::DMat3> = bevy::math::DMat3::div_scalar(&_self, rhs) .into(); output } + fn eq(_self: Ref<bevy::math::DMat3>, rhs: Ref<bevy::math::DMat3>) -> bool { + let output: bool = <bevy::math::DMat3 as ::core::cmp::PartialEq< + bevy::math::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 @@ -21606,6 +27339,43 @@ impl bevy::math::DMat3 { let output: bool = bevy::math::DMat3::is_nan(&_self).into(); output } + fn mul( + _self: Val<bevy::math::DMat3>, + rhs: Val<bevy::math::DAffine2>, + ) -> Val<bevy::math::DMat3> { + let output: Val<bevy::math::DMat3> = <bevy::math::DMat3 as ::core::ops::Mul< + bevy::math::DAffine2, + >>::mul(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + fn mul( + _self: Val<bevy::math::DMat3>, + rhs: Val<bevy::math::DMat3>, + ) -> Val<bevy::math::DMat3> { + let output: Val<bevy::math::DMat3> = <bevy::math::DMat3 as ::core::ops::Mul< + bevy::math::DMat3, + >>::mul(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + fn mul( + _self: Val<bevy::math::DMat3>, + rhs: Val<bevy::math::DVec3>, + ) -> Val<bevy::math::DVec3> { + let output: Val<bevy::math::DVec3> = <bevy::math::DMat3 as ::core::ops::Mul< + bevy::math::DVec3, + >>::mul(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + fn mul(_self: Val<bevy::math::DMat3>, rhs: f64) -> Val<bevy::math::DMat3> { + let output: Val<bevy::math::DMat3> = <bevy::math::DMat3 as ::core::ops::Mul< + f64, + >>::mul(_self.into_inner(), rhs) + .into(); + output + } /// Multiplies two 3x3 matrices. fn mul_mat3( _self: Ref<bevy::math::DMat3>, @@ -21633,6 +27403,13 @@ impl bevy::math::DMat3 { .into(); output } + fn neg(_self: Val<bevy::math::DMat3>) -> Val<bevy::math::DMat3> { + let output: Val<bevy::math::DMat3> = <bevy::math::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. @@ -21641,6 +27418,16 @@ impl bevy::math::DMat3 { .into(); output } + fn sub( + _self: Val<bevy::math::DMat3>, + rhs: Val<bevy::math::DMat3>, + ) -> Val<bevy::math::DMat3> { + let output: Val<bevy::math::DMat3> = <bevy::math::DMat3 as ::core::ops::Sub< + bevy::math::DMat3, + >>::sub(_self.into_inner(), rhs.into_inner()) + .into(); + output + } /// Subtracts two 3x3 matrices. fn sub_mat3( _self: Ref<bevy::math::DMat3>, @@ -21748,6 +27535,16 @@ impl bevy::math::DMat4 { .into(); output } + fn add( + _self: Val<bevy::math::DMat4>, + rhs: Val<bevy::math::DMat4>, + ) -> Val<bevy::math::DMat4> { + let output: Val<bevy::math::DMat4> = <bevy::math::DMat4 as ::core::ops::Add< + bevy::math::DMat4, + >>::add(_self.into_inner(), rhs.into_inner()) + .into(); + output + } /// Adds two 4x4 matrices. fn add_mat4( _self: Ref<bevy::math::DMat4>, @@ -21761,6 +27558,13 @@ impl bevy::math::DMat4 { let output: Val<bevy::math::Mat4> = bevy::math::DMat4::as_mat4(&_self).into(); output } + fn clone(_self: Ref<bevy::math::DMat4>) -> Val<bevy::math::DMat4> { + let output: Val<bevy::math::DMat4> = <bevy::math::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. @@ -21774,12 +27578,26 @@ impl bevy::math::DMat4 { let output: f64 = bevy::math::DMat4::determinant(&_self).into(); output } + fn div(_self: Val<bevy::math::DMat4>, rhs: f64) -> Val<bevy::math::DMat4> { + let output: Val<bevy::math::DMat4> = <bevy::math::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<bevy::math::DMat4>, rhs: f64) -> Val<bevy::math::DMat4> { let output: Val<bevy::math::DMat4> = bevy::math::DMat4::div_scalar(&_self, rhs) .into(); output } + fn eq(_self: Ref<bevy::math::DMat4>, rhs: Ref<bevy::math::DMat4>) -> bool { + let output: bool = <bevy::math::DMat4 as ::core::cmp::PartialEq< + bevy::math::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 @@ -22032,6 +27850,43 @@ impl bevy::math::DMat4 { .into(); output } + fn mul( + _self: Val<bevy::math::DMat4>, + rhs: Val<bevy::math::DAffine3>, + ) -> Val<bevy::math::DMat4> { + let output: Val<bevy::math::DMat4> = <bevy::math::DMat4 as ::core::ops::Mul< + bevy::math::DAffine3, + >>::mul(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + fn mul( + _self: Val<bevy::math::DMat4>, + rhs: Val<bevy::math::DMat4>, + ) -> Val<bevy::math::DMat4> { + let output: Val<bevy::math::DMat4> = <bevy::math::DMat4 as ::core::ops::Mul< + bevy::math::DMat4, + >>::mul(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + fn mul( + _self: Val<bevy::math::DMat4>, + rhs: Val<bevy::math::DVec4>, + ) -> Val<bevy::math::DVec4> { + let output: Val<bevy::math::DVec4> = <bevy::math::DMat4 as ::core::ops::Mul< + bevy::math::DVec4, + >>::mul(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + fn mul(_self: Val<bevy::math::DMat4>, rhs: f64) -> Val<bevy::math::DMat4> { + let output: Val<bevy::math::DMat4> = <bevy::math::DMat4 as ::core::ops::Mul< + f64, + >>::mul(_self.into_inner(), rhs) + .into(); + output + } /// Multiplies two 4x4 matrices. fn mul_mat4( _self: Ref<bevy::math::DMat4>, @@ -22059,6 +27914,13 @@ impl bevy::math::DMat4 { .into(); output } + fn neg(_self: Val<bevy::math::DMat4>) -> Val<bevy::math::DMat4> { + let output: Val<bevy::math::DMat4> = <bevy::math::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( @@ -22279,6 +28141,16 @@ impl bevy::math::DMat4 { .into(); output } + fn sub( + _self: Val<bevy::math::DMat4>, + rhs: Val<bevy::math::DMat4>, + ) -> Val<bevy::math::DMat4> { + let output: Val<bevy::math::DMat4> = <bevy::math::DMat4 as ::core::ops::Sub< + bevy::math::DMat4, + >>::sub(_self.into_inner(), rhs.into_inner()) + .into(); + output + } /// Subtracts two 4x4 matrices. fn sub_mat4( _self: Ref<bevy::math::DMat4>, @@ -22386,6 +28258,20 @@ impl bevy::math::Affine2 { .into(); output } + fn clone(_self: Ref<bevy::math::Affine2>) -> Val<bevy::math::Affine2> { + let output: Val<bevy::math::Affine2> = <bevy::math::Affine2 as bevy::reflect::erased_serde::__private::serde::__private::Clone>::clone( + &_self, + ) + .into(); + output + } + fn eq(_self: Ref<bevy::math::Affine2>, rhs: Ref<bevy::math::Affine2>) -> bool { + let output: bool = <bevy::math::Affine2 as ::core::cmp::PartialEq< + bevy::math::Affine2, + >>::eq(&_self, &rhs) + .into(); + output + } /// Creates an affine transform from the given rotation `angle`. fn from_angle(angle: f32) -> Val<bevy::math::Affine2> { let output: Val<bevy::math::Affine2> = bevy::math::Affine2::from_angle(angle) @@ -22512,6 +28398,36 @@ impl bevy::math::Affine2 { let output: bool = bevy::math::Affine2::is_nan(&_self).into(); output } + fn mul( + _self: Val<bevy::math::Affine2>, + rhs: Val<bevy::math::Affine2>, + ) -> Val<bevy::math::Affine2> { + let output: Val<bevy::math::Affine2> = <bevy::math::Affine2 as ::core::ops::Mul< + bevy::math::Affine2, + >>::mul(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + fn mul( + _self: Val<bevy::math::Affine2>, + rhs: Val<bevy::math::Mat3>, + ) -> Val<bevy::math::Mat3> { + let output: Val<bevy::math::Mat3> = <bevy::math::Affine2 as ::core::ops::Mul< + bevy::math::Mat3, + >>::mul(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + fn mul( + _self: Val<bevy::math::Affine2>, + rhs: Val<bevy::math::Mat3A>, + ) -> Val<bevy::math::Mat3A> { + let output: Val<bevy::math::Mat3A> = <bevy::math::Affine2 as ::core::ops::Mul< + bevy::math::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<bevy::math::Affine2>) -> [f32; 6] { let output: [f32; 6] = bevy::math::Affine2::to_cols_array(&_self).into(); @@ -22578,6 +28494,20 @@ impl bevy::math::Affine3A { .into(); output } + fn clone(_self: Ref<bevy::math::Affine3A>) -> Val<bevy::math::Affine3A> { + let output: Val<bevy::math::Affine3A> = <bevy::math::Affine3A as bevy::reflect::erased_serde::__private::serde::__private::Clone>::clone( + &_self, + ) + .into(); + output + } + fn eq(_self: Ref<bevy::math::Affine3A>, rhs: Ref<bevy::math::Affine3A>) -> bool { + let output: bool = <bevy::math::Affine3A as ::core::cmp::PartialEq< + bevy::math::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( @@ -22810,6 +28740,26 @@ impl bevy::math::Affine3A { .into(); output } + fn mul( + _self: Val<bevy::math::Affine3A>, + rhs: Val<bevy::math::Affine3A>, + ) -> Val<bevy::math::Affine3A> { + let output: Val<bevy::math::Affine3A> = <bevy::math::Affine3A as ::core::ops::Mul< + bevy::math::Affine3A, + >>::mul(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + fn mul( + _self: Val<bevy::math::Affine3A>, + rhs: Val<bevy::math::Mat4>, + ) -> Val<bevy::math::Mat4> { + let output: Val<bevy::math::Mat4> = <bevy::math::Affine3A as ::core::ops::Mul< + bevy::math::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<bevy::math::Affine3A>) -> [f32; 12] { let output: [f32; 12] = bevy::math::Affine3A::to_cols_array(&_self).into(); @@ -22903,6 +28853,20 @@ impl bevy::math::DAffine2 { .into(); output } + fn clone(_self: Ref<bevy::math::DAffine2>) -> Val<bevy::math::DAffine2> { + let output: Val<bevy::math::DAffine2> = <bevy::math::DAffine2 as bevy::reflect::erased_serde::__private::serde::__private::Clone>::clone( + &_self, + ) + .into(); + output + } + fn eq(_self: Ref<bevy::math::DAffine2>, rhs: Ref<bevy::math::DAffine2>) -> bool { + let output: bool = <bevy::math::DAffine2 as ::core::cmp::PartialEq< + bevy::math::DAffine2, + >>::eq(&_self, &rhs) + .into(); + output + } /// Creates an affine transform from the given rotation `angle`. fn from_angle(angle: f64) -> Val<bevy::math::DAffine2> { let output: Val<bevy::math::DAffine2> = bevy::math::DAffine2::from_angle(angle) @@ -23023,6 +28987,26 @@ impl bevy::math::DAffine2 { let output: bool = bevy::math::DAffine2::is_nan(&_self).into(); output } + fn mul( + _self: Val<bevy::math::DAffine2>, + rhs: Val<bevy::math::DAffine2>, + ) -> Val<bevy::math::DAffine2> { + let output: Val<bevy::math::DAffine2> = <bevy::math::DAffine2 as ::core::ops::Mul< + bevy::math::DAffine2, + >>::mul(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + fn mul( + _self: Val<bevy::math::DAffine2>, + rhs: Val<bevy::math::DMat3>, + ) -> Val<bevy::math::DMat3> { + let output: Val<bevy::math::DMat3> = <bevy::math::DAffine2 as ::core::ops::Mul< + bevy::math::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<bevy::math::DAffine2>) -> [f64; 6] { let output: [f64; 6] = bevy::math::DAffine2::to_cols_array(&_self).into(); @@ -23090,6 +29074,20 @@ impl bevy::math::DAffine3 { .into(); output } + fn clone(_self: Ref<bevy::math::DAffine3>) -> Val<bevy::math::DAffine3> { + let output: Val<bevy::math::DAffine3> = <bevy::math::DAffine3 as bevy::reflect::erased_serde::__private::serde::__private::Clone>::clone( + &_self, + ) + .into(); + output + } + fn eq(_self: Ref<bevy::math::DAffine3>, rhs: Ref<bevy::math::DAffine3>) -> bool { + let output: bool = <bevy::math::DAffine3 as ::core::cmp::PartialEq< + bevy::math::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( @@ -23322,6 +29320,26 @@ impl bevy::math::DAffine3 { .into(); output } + fn mul( + _self: Val<bevy::math::DAffine3>, + rhs: Val<bevy::math::DAffine3>, + ) -> Val<bevy::math::DAffine3> { + let output: Val<bevy::math::DAffine3> = <bevy::math::DAffine3 as ::core::ops::Mul< + bevy::math::DAffine3, + >>::mul(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + fn mul( + _self: Val<bevy::math::DAffine3>, + rhs: Val<bevy::math::DMat4>, + ) -> Val<bevy::math::DMat4> { + let output: Val<bevy::math::DMat4> = <bevy::math::DAffine3 as ::core::ops::Mul< + bevy::math::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<bevy::math::DAffine3>) -> [f64; 12] { let output: [f64; 12] = bevy::math::DAffine3::to_cols_array(&_self).into(); @@ -23389,6 +29407,20 @@ impl bevy::math::DQuat { .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<bevy::math::DQuat>, + rhs: Val<bevy::math::DQuat>, + ) -> Val<bevy::math::DQuat> { + let output: Val<bevy::math::DQuat> = <bevy::math::DQuat as ::core::ops::Add< + bevy::math::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. @@ -23409,6 +29441,13 @@ impl bevy::math::DQuat { .into(); output } + fn clone(_self: Ref<bevy::math::DQuat>) -> Val<bevy::math::DQuat> { + let output: Val<bevy::math::DQuat> = <bevy::math::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<bevy::math::DQuat>) -> Val<bevy::math::DQuat> { @@ -23418,6 +29457,15 @@ impl bevy::math::DQuat { .into(); output } + /// Divides a quaternion by a scalar value. + /// The quotient is not guaranteed to be normalized. + fn div(_self: Val<bevy::math::DQuat>, rhs: f64) -> Val<bevy::math::DQuat> { + let output: Val<bevy::math::DQuat> = <bevy::math::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<bevy::math::DQuat>, rhs: Val<bevy::math::DQuat>) -> f64 { @@ -23425,6 +29473,13 @@ impl bevy::math::DQuat { .into(); output } + fn eq(_self: Ref<bevy::math::DQuat>, rhs: Ref<bevy::math::DQuat>) -> bool { + let output: bool = <bevy::math::DQuat as ::core::cmp::PartialEq< + bevy::math::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. @@ -23672,6 +29727,44 @@ impl bevy::math::DQuat { } /// 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<bevy::math::DQuat>, + rhs: Val<bevy::math::DQuat>, + ) -> Val<bevy::math::DQuat> { + let output: Val<bevy::math::DQuat> = <bevy::math::DQuat as ::core::ops::Mul< + bevy::math::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<bevy::math::DQuat>, + rhs: Val<bevy::math::DVec3>, + ) -> Val<bevy::math::DVec3> { + let output: Val<bevy::math::DVec3> = <bevy::math::DQuat as ::core::ops::Mul< + bevy::math::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<bevy::math::DQuat>, rhs: f64) -> Val<bevy::math::DQuat> { + let output: Val<bevy::math::DQuat> = <bevy::math::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. @@ -23700,6 +29793,13 @@ impl bevy::math::DQuat { .into(); output } + fn neg(_self: Val<bevy::math::DQuat>) -> Val<bevy::math::DQuat> { + let output: Val<bevy::math::DQuat> = <bevy::math::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 @@ -23750,6 +29850,18 @@ impl bevy::math::DQuat { .into(); output } + /// Subtracts the `rhs` quaternion from `self`. + /// The difference is not guaranteed to be normalized. + fn sub( + _self: Val<bevy::math::DQuat>, + rhs: Val<bevy::math::DQuat>, + ) -> Val<bevy::math::DQuat> { + let output: Val<bevy::math::DQuat> = <bevy::math::DQuat as ::core::ops::Sub< + bevy::math::DQuat, + >>::sub(_self.into_inner(), rhs.into_inner()) + .into(); + output + } /// `[x, y, z, w]` fn to_array(_self: Ref<bevy::math::DQuat>) -> [f64; 4] { let output: [f64; 4] = bevy::math::DQuat::to_array(&_self).into(); @@ -23788,7 +29900,29 @@ impl bevy::math::DQuat { bms_core_path = "bevy_mod_scripting_core", generated )] -impl bevy::math::EulerRot {} +impl bevy::math::EulerRot { + fn assert_receiver_is_total_eq(_self: Ref<bevy::math::EulerRot>) -> () { + let output: () = <bevy::math::EulerRot as ::core::cmp::Eq>::assert_receiver_is_total_eq( + &_self, + ) + .into(); + output + } + fn clone(_self: Ref<bevy::math::EulerRot>) -> Val<bevy::math::EulerRot> { + let output: Val<bevy::math::EulerRot> = <bevy::math::EulerRot as bevy::reflect::erased_serde::__private::serde::__private::Clone>::clone( + &_self, + ) + .into(); + output + } + fn eq(_self: Ref<bevy::math::EulerRot>, other: Ref<bevy::math::EulerRot>) -> bool { + let output: bool = <bevy::math::EulerRot as ::core::cmp::PartialEq< + bevy::math::EulerRot, + >>::eq(&_self, &other) + .into(); + output + } +} #[script_bindings( remote, name = "b_vec_3_a_functions", @@ -23813,6 +29947,20 @@ impl bevy::math::BVec3A { let output: u32 = bevy::math::BVec3A::bitmask(_self.into_inner()).into(); output } + fn clone(_self: Ref<bevy::math::BVec3A>) -> Val<bevy::math::BVec3A> { + let output: Val<bevy::math::BVec3A> = <bevy::math::BVec3A as bevy::reflect::erased_serde::__private::serde::__private::Clone>::clone( + &_self, + ) + .into(); + output + } + fn eq(_self: Ref<bevy::math::BVec3A>, rhs: Ref<bevy::math::BVec3A>) -> bool { + let output: bool = <bevy::math::BVec3A as ::core::cmp::PartialEq< + bevy::math::BVec3A, + >>::eq(&_self, &rhs) + .into(); + output + } /// Creates a new vector mask from a bool array. fn from_array(a: [bool; 3]) -> Val<bevy::math::BVec3A> { let output: Val<bevy::math::BVec3A> = bevy::math::BVec3A::from_array(a).into(); @@ -23865,6 +30013,20 @@ impl bevy::math::BVec4A { let output: u32 = bevy::math::BVec4A::bitmask(_self.into_inner()).into(); output } + fn clone(_self: Ref<bevy::math::BVec4A>) -> Val<bevy::math::BVec4A> { + let output: Val<bevy::math::BVec4A> = <bevy::math::BVec4A as bevy::reflect::erased_serde::__private::serde::__private::Clone>::clone( + &_self, + ) + .into(); + output + } + fn eq(_self: Ref<bevy::math::BVec4A>, rhs: Ref<bevy::math::BVec4A>) -> bool { + let output: bool = <bevy::math::BVec4A as ::core::cmp::PartialEq< + bevy::math::BVec4A, + >>::eq(&_self, &rhs) + .into(); + output + } /// Creates a new vector mask from a bool array. fn from_array(a: [bool; 4]) -> Val<bevy::math::BVec4A> { let output: Val<bevy::math::BVec4A> = bevy::math::BVec4A::from_array(a).into(); @@ -23900,6 +30062,20 @@ impl bevy::math::BVec4A { 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 @@ -23963,6 +30139,20 @@ impl ::uuid::Uuid { 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 @@ -23987,6 +30177,13 @@ impl ::uuid::Uuid { 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: 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 22dfa80414..49b603f93c 100644 --- a/crates/bevy_mod_scripting_functions/src/bevy_bindings/bevy_time.rs +++ b/crates/bevy_mod_scripting_functions/src/bevy_bindings/bevy_time.rs @@ -18,14 +18,30 @@ pub struct BevyTimeScriptingPlugin; bms_core_path = "bevy_mod_scripting_core", generated )] -impl bevy::time::prelude::Fixed {} +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 {} +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", @@ -33,6 +49,20 @@ impl bevy::time::prelude::Real {} 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 /// ``` @@ -78,6 +108,16 @@ impl bevy::time::prelude::Timer { 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 @@ -374,14 +414,51 @@ impl bevy::time::prelude::Timer { bms_core_path = "bevy_mod_scripting_core", generated )] -impl bevy::time::prelude::TimerMode {} +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 {} +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", @@ -389,6 +466,20 @@ impl bevy::time::prelude::Virtual {} 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, + ) + .into(); + output + } /// Returns the elapsed time since the last [`reset`](Stopwatch::reset) /// of the stopwatch. /// # Examples @@ -433,6 +524,13 @@ impl bevy::time::Stopwatch { 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 /// ``` 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 bd4bffae85..f52d646031 100644 --- a/crates/bevy_mod_scripting_functions/src/bevy_bindings/bevy_transform.rs +++ b/crates/bevy_mod_scripting_functions/src/bevy_bindings/bevy_transform.rs @@ -39,6 +39,15 @@ impl bevy::transform::components::GlobalTransform { .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>, @@ -71,6 +80,16 @@ impl bevy::transform::components::GlobalTransform { .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>, @@ -140,6 +159,36 @@ impl bevy::transform::components::GlobalTransform { .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( @@ -344,6 +393,15 @@ impl bevy::transform::components::Transform { .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( @@ -376,6 +434,16 @@ impl bevy::transform::components::Transform { .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>, @@ -501,6 +569,36 @@ impl bevy::transform::components::Transform { .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( @@ -778,7 +876,27 @@ impl bevy::transform::components::Transform { bms_core_path = "bevy_mod_scripting_core", generated )] -impl bevy::transform::components::TransformTreeChanged {} +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 ::bevy::app::Plugin for BevyTransformScriptingPlugin { fn build(&self, app: &mut ::bevy::prelude::App) { let mut world = app.world_mut(); From 0b383705222badf263eb2b73583e2096e8def95a Mon Sep 17 00:00:00 2001 From: makspll <makspl17@gmail.com> Date: Mon, 7 Jul 2025 20:32:01 +0100 Subject: [PATCH 12/17] correct collection code not to try to collect old crates --- crates/bevy_api_gen/src/bin/main.rs | 51 ++++++------ crates/bevy_api_gen/src/meta.rs | 29 ++++++- crates/bevy_api_gen/src/passes/write_meta.rs | 1 + .../bevy_mod_scripting_functions/Cargo.toml | 2 - .../src/bevy_bindings/bevy_core.rs | 38 --------- .../src/bevy_bindings/bevy_hierarchy.rs | 78 ------------------- .../src/bevy_bindings/mod.rs | 4 - .../bevy_mod_scripting_functions/src/core.rs | 4 - 8 files changed, 56 insertions(+), 151 deletions(-) delete mode 100644 crates/bevy_mod_scripting_functions/src/bevy_bindings/bevy_core.rs delete mode 100644 crates/bevy_mod_scripting_functions/src/bevy_bindings/bevy_hierarchy.rs diff --git a/crates/bevy_api_gen/src/bin/main.rs b/crates/bevy_api_gen/src/bin/main.rs index 62e7427065..202102ad10 100644 --- a/crates/bevy_api_gen/src/bin/main.rs +++ b/crates/bevy_api_gen/src/bin/main.rs @@ -113,36 +113,34 @@ fn main() { if !output.is_dir() { panic!("Output is not a directory"); } - let crates = std::fs::read_dir(&output) - .expect("Could not read output directory") - .filter_map(|d| { - let entry = d.expect("Could not read entry in output directory"); - let path = entry.path(); - if path.extension().is_some_and(|ext| ext == "rs") - && path.file_stem().is_some_and(|s| s != "mod") - { - Some(path.file_stem().unwrap().to_owned()) - } else { - None - } - }); + let meta_loader = MetaLoader::new(vec![output.to_owned()], workspace_meta); - let mut crates: Vec<_> = crates - .map(|c| { - let name = c.to_str().unwrap().to_owned(); - log::info!("Collecting crate: {}", name); - let meta = meta_loader - .meta_for(&name) - .expect("Could not find meta file for crate"); - Crate { name, meta } + let mut crates = meta_loader + .iter_meta() + .filter_map(|m| { + log::debug!( + "Processing crate: {}, will generate: {}", + m.crate_name(), + m.will_generate() + ); + m.will_generate().then_some(Crate { + name: m.crate_name().to_owned(), + meta: m, + }) }) - .collect(); + .collect::<Vec<_>>(); crates.sort_by(|a, b| a.name.cmp(&b.name)); - let context = Collect { crates, api_name }; + let json = serde_json::to_string_pretty( + &crates.iter().map(|c| c.name.clone()).collect::<Vec<_>>(), + ) + .unwrap(); + + let collect = Collect { crates, api_name }; + let mut context = - Context::from_serialize(context).expect("Could not create template context"); + Context::from_serialize(collect).expect("Could not create template context"); extend_context_with_args(args.template_args.as_deref(), &mut context); @@ -151,6 +149,11 @@ fn main() { .expect("Failed to render mod.rs"); file.flush().unwrap(); log::info!("Succesfully generated mod.rs"); + + // put json of Collect context into stdout + std::io::stdout() + .write_all(json.as_bytes()) + .expect("Failed to write Collect context to stdout"); return; } _ => {} diff --git a/crates/bevy_api_gen/src/meta.rs b/crates/bevy_api_gen/src/meta.rs index 87e7074703..6492f4f9e5 100644 --- a/crates/bevy_api_gen/src/meta.rs +++ b/crates/bevy_api_gen/src/meta.rs @@ -21,6 +21,7 @@ pub(crate) const META_VERSION: &str = "1"; /// between crates to be able to properly identify links between crates #[derive(Serialize, Deserialize, Clone)] pub struct Meta { + pub(crate) crate_name: String, /// The local proxies generated after analysis pub(crate) proxies: Vec<ProxyMeta>, /// False if no files are going to be generated for this crate @@ -51,12 +52,20 @@ where impl Meta { /// Returns true if the crate generated a proxy with the given DefPathHash (for the ADT) - pub(crate) fn contains_def_path_hash(&self, did: DefPathHash) -> bool { + pub fn contains_def_path_hash(&self, did: DefPathHash) -> bool { self.proxies.iter().any(|meta| { meta.stable_crate_id == did.stable_crate_id().as_u64() && meta.local_hash_id == did.local_hash().as_u64() }) } + + pub fn will_generate(&self) -> bool { + self.will_generate + } + + pub fn crate_name(&self) -> &str { + &self.crate_name + } } #[derive(Serialize, Deserialize, Clone, Debug)] @@ -83,6 +92,24 @@ impl MetaLoader { } } + /// iterates over the meta files in the meta directories and returns an iterator over the meta files + pub fn iter_meta(&self) -> impl Iterator<Item = Meta> + '_ { + self.meta_dirs.iter().flat_map(|dir| { + dir.read_dir() + .unwrap_or_else(|_| panic!("Could not read meta directory: {}", dir)) + .filter_map(|entry| { + let entry = entry.unwrap(); + if entry.path().extension().is_some_and(|ext| ext == "json") { + return Self::opt_load_meta( + Utf8PathBuf::from_path_buf(entry.path()) + .expect("Invalid meta file in meta directory"), + ); + } + None + }) + }) + } + /// Retrieves the meta for the provided crate, returns 'Some(meta)' if it exists and 'None' otherwise pub fn meta_for(&self, crate_name: &str) -> Option<Meta> { self.meta_for_retry(crate_name, 3) diff --git a/crates/bevy_api_gen/src/passes/write_meta.rs b/crates/bevy_api_gen/src/passes/write_meta.rs index e21d60a962..38df6b31e4 100644 --- a/crates/bevy_api_gen/src/passes/write_meta.rs +++ b/crates/bevy_api_gen/src/passes/write_meta.rs @@ -17,6 +17,7 @@ pub(crate) fn write_meta(ctxt: &mut BevyCtxt<'_>, _args: &Args) -> bool { } let will_generate = !proxies.is_empty(); let meta = Meta { + crate_name: tcx.crate_name(LOCAL_CRATE).to_string(), proxies, will_generate, meta_version: META_VERSION.to_string(), diff --git a/crates/bevy_mod_scripting_functions/Cargo.toml b/crates/bevy_mod_scripting_functions/Cargo.toml index 35453b5802..e4e2bfe6c3 100644 --- a/crates/bevy_mod_scripting_functions/Cargo.toml +++ b/crates/bevy_mod_scripting_functions/Cargo.toml @@ -12,9 +12,7 @@ categories = ["game-development"] readme = "readme.md" [features] -bevy_core = [] bevy_ecs = [] -bevy_hierarchy = [] bevy_input = [] bevy_math = [] bevy_reflect = [] diff --git a/crates/bevy_mod_scripting_functions/src/bevy_bindings/bevy_core.rs b/crates/bevy_mod_scripting_functions/src/bevy_bindings/bevy_core.rs deleted file mode 100644 index f6466929c0..0000000000 --- a/crates/bevy_mod_scripting_functions/src/bevy_bindings/bevy_core.rs +++ /dev/null @@ -1,38 +0,0 @@ -// @generated by cargo bevy-api-gen generate, modify the templates not this file -#![allow(clippy::all)] -#![allow(unused, deprecated, dead_code)] -#![cfg_attr(rustfmt, rustfmt_skip)] -use bevy_mod_scripting_core::bindings::function::from::{Ref, Val}; -use bevy_mod_scripting_derive::script_bindings; -pub struct BevyCoreScriptingPlugin; -#[script_bindings( - remote, - name = "name_functions", - bms_core_path = "bevy_mod_scripting_core", - generated -)] -impl bevy::prelude::Name { - fn clone(_self: Ref<bevy::prelude::Name>) -> Val<bevy::prelude::Name> { - let output: Val<bevy::prelude::Name> = <bevy::prelude::Name as std::clone::Clone>::clone( - &_self, - ) - .into(); - output - } - fn eq( - _self: Ref<bevy::prelude::Name>, - other: Ref<bevy::prelude::Name>, - ) -> bool { - let output: bool = <bevy::prelude::Name as std::cmp::PartialEq< - bevy::prelude::Name, - >>::eq(&_self, &other) - .into(); - output - } -} -impl ::bevy::app::Plugin for BevyCoreScriptingPlugin { - fn build(&self, app: &mut ::bevy::prelude::App) { - let mut world = app.world_mut(); - register_name_functions(&mut world); - } -} diff --git a/crates/bevy_mod_scripting_functions/src/bevy_bindings/bevy_hierarchy.rs b/crates/bevy_mod_scripting_functions/src/bevy_bindings/bevy_hierarchy.rs deleted file mode 100644 index 373bff58bc..0000000000 --- a/crates/bevy_mod_scripting_functions/src/bevy_bindings/bevy_hierarchy.rs +++ /dev/null @@ -1,78 +0,0 @@ -// @generated by cargo bevy-api-gen generate, modify the templates not this file -#![allow(clippy::all)] -#![allow(unused, deprecated, dead_code)] -#![cfg_attr(rustfmt, rustfmt_skip)] -use bevy_mod_scripting_core::bindings::{ - ReflectReference, - function::{ - from::{Ref, Mut, Val}, - namespace::NamespaceBuilder, - }, -}; -use bevy_mod_scripting_derive::script_bindings; -use crate::*; -pub struct BevyHierarchyScriptingPlugin; -#[script_bindings( - remote, - name = "children_functions", - bms_core_path = "bevy_mod_scripting_core", - generated -)] -impl bevy::prelude::Children { - /// Swaps the child at `a_index` with the child at `b_index`. - fn swap( - mut _self: Mut<bevy::prelude::Children>, - a_index: usize, - b_index: usize, - ) -> () { - let output: () = bevy::prelude::Children::swap( - &mut _self, - a_index, - b_index, - ) - .into(); - output - } -} -#[script_bindings( - remote, - name = "parent_functions", - bms_core_path = "bevy_mod_scripting_core", - generated -)] -impl bevy::prelude::ChildOf { - fn assert_receiver_is_total_eq(_self: Ref<bevy::prelude::ChildOf>) -> () { - let output: () = <bevy::prelude::ChildOf as std::cmp::Eq>::assert_receiver_is_total_eq( - &_self, - ) - .into(); - output - } - fn eq( - _self: Ref<bevy::prelude::ChildOf>, - other: Ref<bevy::prelude::ChildOf>, - ) -> bool { - let output: bool = <bevy::prelude::ChildOf as std::cmp::PartialEq< - bevy::prelude::ChildOf, - >>::eq(&_self, &other) - .into(); - output - } - /// Gets the [`Entity`] ID of the parent. - fn get( - _self: Ref<bevy::prelude::ChildOf>, - ) -> Val<bevy::ecs::entity::Entity> { - let output: Val<bevy::ecs::entity::Entity> = bevy::prelude::ChildOf::get( - &_self, - ) - .into(); - output - } -} -impl ::bevy::app::Plugin for BevyHierarchyScriptingPlugin { - fn build(&self, app: &mut ::bevy::prelude::App) { - let mut world = app.world_mut(); - register_children_functions(&mut world); - register_parent_functions(&mut world); - } -} diff --git a/crates/bevy_mod_scripting_functions/src/bevy_bindings/mod.rs b/crates/bevy_mod_scripting_functions/src/bevy_bindings/mod.rs index 73d25afbce..dcb10bc937 100644 --- a/crates/bevy_mod_scripting_functions/src/bevy_bindings/mod.rs +++ b/crates/bevy_mod_scripting_functions/src/bevy_bindings/mod.rs @@ -2,12 +2,8 @@ #![allow(clippy::all)] #![allow(unused, deprecated, dead_code)] #![cfg_attr(rustfmt, rustfmt_skip)] -#[cfg(feature = "bevy_core")] -pub mod bevy_core; #[cfg(feature = "bevy_ecs")] pub mod bevy_ecs; -#[cfg(feature = "bevy_hierarchy")] -pub mod bevy_hierarchy; #[cfg(feature = "bevy_input")] pub mod bevy_input; #[cfg(feature = "bevy_math")] diff --git a/crates/bevy_mod_scripting_functions/src/core.rs b/crates/bevy_mod_scripting_functions/src/core.rs index 08963a02d3..0cd5fbc969 100644 --- a/crates/bevy_mod_scripting_functions/src/core.rs +++ b/crates/bevy_mod_scripting_functions/src/core.rs @@ -32,12 +32,8 @@ use reflection_extensions::{PartialReflectExt, TypeIdExtensions}; #[allow(unused_variables, reason = "feature flags")] pub fn register_bevy_bindings(app: &mut App) { - #[cfg(feature = "bevy_core")] - app.add_plugins(crate::bevy_bindings::bevy_core::BevyCoreScriptingPlugin); #[cfg(feature = "bevy_ecs")] app.add_plugins(crate::bevy_bindings::bevy_ecs::BevyEcsScriptingPlugin); - #[cfg(feature = "bevy_hierarchy")] - app.add_plugins(crate::bevy_bindings::bevy_hierarchy::BevyHierarchyScriptingPlugin); #[cfg(feature = "bevy_input")] app.add_plugins(crate::bevy_bindings::bevy_input::BevyInputScriptingPlugin); #[cfg(feature = "bevy_math")] From ecd35502cccd813ab97b9a3dcd84c67f92f8417a Mon Sep 17 00:00:00 2001 From: makspll <makspl17@gmail.com> Date: Mon, 7 Jul 2025 20:43:52 +0100 Subject: [PATCH 13/17] remove deprecated bindings flags --- Cargo.toml | 2 -- 1 file changed, 2 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index d2eead8aa9..b5db0d20ec 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -48,9 +48,7 @@ luau = ["bevy_mod_scripting_lua/luau", "lua"] # bindings core_functions = ["bevy_mod_scripting_functions/core_functions"] -bevy_core_bindings = ["bevy_mod_scripting_functions/bevy_core"] bevy_ecs_bindings = ["bevy_mod_scripting_functions/bevy_ecs"] -bevy_hierarchy_bindings = ["bevy_mod_scripting_functions/bevy_hierarchy"] bevy_input_bindings = ["bevy_mod_scripting_functions/bevy_input"] bevy_math_bindings = ["bevy_mod_scripting_functions/bevy_math"] bevy_reflect_bindings = ["bevy_mod_scripting_functions/bevy_reflect"] From 716c5b07bd2cff09883d4ff3d135a68699582853 Mon Sep 17 00:00:00 2001 From: makspll <makspl17@gmail.com> Date: Mon, 7 Jul 2025 20:44:47 +0100 Subject: [PATCH 14/17] remove leftover references --- Cargo.toml | 2 -- 1 file changed, 2 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index b5db0d20ec..278578db01 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -23,9 +23,7 @@ features = ["lua54", "rhai"] [features] default = [ "core_functions", - "bevy_core_bindings", "bevy_ecs_bindings", - "bevy_hierarchy_bindings", "bevy_input_bindings", "bevy_math_bindings", "bevy_reflect_bindings", From c5903bd7b8ffd5f84d81b13b7ee04f173a2c5af0 Mon Sep 17 00:00:00 2001 From: makspll <makspl17@gmail.com> Date: Mon, 7 Jul 2025 20:46:44 +0100 Subject: [PATCH 15/17] fix xtask --- xtask/src/main.rs | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/xtask/src/main.rs b/xtask/src/main.rs index 36d2f76e66..9a43771d62 100644 --- a/xtask/src/main.rs +++ b/xtask/src/main.rs @@ -33,9 +33,7 @@ use strum::{IntoEnumIterator, VariantNames}; enum Feature { // bindings CoreFunctions, - BevyCoreBindings, BevyEcsBindings, - BevyHierarchyBindings, BevyInputBindings, BevyMathBindings, BevyReflectBindings, @@ -111,9 +109,7 @@ impl IntoFeatureGroup for Feature { | Feature::MluaMacros | Feature::MluaSerialize | Feature::UnsafeLuaModules => FeatureGroup::ForExternalCrate, - Feature::BevyCoreBindings - | Feature::BevyEcsBindings - | Feature::BevyHierarchyBindings + Feature::BevyEcsBindings | Feature::BevyInputBindings | Feature::BevyMathBindings | Feature::BevyReflectBindings @@ -133,9 +129,7 @@ impl Default for Features { Features::new(vec![ Feature::Lua54, Feature::CoreFunctions, - Feature::BevyCoreBindings, Feature::BevyEcsBindings, - Feature::BevyHierarchyBindings, Feature::BevyInputBindings, Feature::BevyMathBindings, Feature::BevyReflectBindings, From ae956baa1cf464cbd5e9d861f0cdfbd146caed9a Mon Sep 17 00:00:00 2001 From: makspll <makspl17@gmail.com> Date: Mon, 7 Jul 2025 23:22:11 +0100 Subject: [PATCH 16/17] remove unneeded imports --- Cargo.toml | 3 --- crates/bevy_mod_scripting_functions/Cargo.toml | 3 --- 2 files changed, 6 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 278578db01..cdc2fc0f68 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -80,9 +80,6 @@ bevy_mod_scripting_derive = { workspace = true } [workspace.dependencies] profiling = { version = "1.0" } -bevy_math = { version = "0.16.0", default-features = false } -bevy_reflect = { version = "0.16.0", default-features = false } -bevy_input = { version = "0.16.0", default-features = false } bevy = { version = "0.16.0", default-features = false } bevy_mod_scripting_core = { path = "crates/bevy_mod_scripting_core", version = "0.13.0" } bevy_mod_scripting_functions = { path = "crates/bevy_mod_scripting_functions", version = "0.13.0", default-features = false } diff --git a/crates/bevy_mod_scripting_functions/Cargo.toml b/crates/bevy_mod_scripting_functions/Cargo.toml index e4e2bfe6c3..0580de48b5 100644 --- a/crates/bevy_mod_scripting_functions/Cargo.toml +++ b/crates/bevy_mod_scripting_functions/Cargo.toml @@ -26,9 +26,6 @@ rhai_bindings = ["bevy_mod_scripting_rhai"] [dependencies] bevy = { workspace = true } -bevy_math = { workspace = true, features = ["curve"] } -bevy_reflect = { workspace = true, features = ["smol_str"] } -bevy_input = { workspace = true, features = ["smol_str"] } profiling = { workspace = true } uuid = "1.11" smol_str = "0.2.2" From 7b77f93a775a2f7291f6bcb9f9c975e9c029b7ec Mon Sep 17 00:00:00 2001 From: makspll <makspl17@gmail.com> Date: Tue, 8 Jul 2025 20:00:38 +0100 Subject: [PATCH 17/17] they were in fact needed --- Cargo.toml | 4 ++++ crates/bevy_mod_scripting_functions/Cargo.toml | 10 +++++++--- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index cdc2fc0f68..1fe434c74a 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -71,6 +71,8 @@ profile_with_tracy = ["bevy/trace_tracy"] [dependencies] bevy = { workspace = true } +bevy_math = { workspace = true } +bevy_reflect = { workspace = true } bevy_mod_scripting_core = { workspace = true } bevy_mod_scripting_lua = { path = "crates/languages/bevy_mod_scripting_lua", version = "0.13.0", optional = true } bevy_mod_scripting_rhai = { path = "crates/languages/bevy_mod_scripting_rhai", version = "0.13.0", optional = true } @@ -81,6 +83,8 @@ 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.13.0" } bevy_mod_scripting_functions = { path = "crates/bevy_mod_scripting_functions", version = "0.13.0", default-features = false } bevy_mod_scripting_derive = { path = "crates/bevy_mod_scripting_derive", version = "0.13.0" } diff --git a/crates/bevy_mod_scripting_functions/Cargo.toml b/crates/bevy_mod_scripting_functions/Cargo.toml index 0580de48b5..7a8120f2b4 100644 --- a/crates/bevy_mod_scripting_functions/Cargo.toml +++ b/crates/bevy_mod_scripting_functions/Cargo.toml @@ -14,8 +14,8 @@ readme = "readme.md" [features] bevy_ecs = [] bevy_input = [] -bevy_math = [] -bevy_reflect = [] +bevy_math = ["bevy_math/curve"] +bevy_reflect = ["bevy_reflect/smol_str"] bevy_time = [] bevy_transform = [] @@ -26,9 +26,13 @@ rhai_bindings = ["bevy_mod_scripting_rhai"] [dependencies] bevy = { workspace = true } +# required since curve has no top level bevy features for these +bevy_math = { workspace = true } +bevy_reflect = { workspace = true } + profiling = { workspace = true } uuid = "1.11" -smol_str = "0.2.2" +smol_str = "0.2.0" bevy_mod_scripting_core = { workspace = true } bevy_mod_scripting_derive = { workspace = true } bevy_mod_scripting_lua = { path = "../languages/bevy_mod_scripting_lua", optional = true, version = "0.13.0" }