From 166c7e73e6e3ac8ca3b0c6f16cfc50f4239a7a1e Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Sat, 28 Dec 2024 00:21:12 +0000 Subject: [PATCH] chore(codegen): update bevy bindings --- .../src/bevy/bevy_core.rs | 36 + .../src/bevy/bevy_ecs.rs | 319 + .../src/bevy/bevy_hierarchy.rs | 77 + .../src/bevy/bevy_input.rs | 1174 ++ .../src/bevy/bevy_math.rs | 2977 +++ .../src/bevy/bevy_reflect.rs | 17248 ++++++++++++++++ .../src/bevy/bevy_time.rs | 285 + .../src/bevy/bevy_transform.rs | 243 + .../src/bevy/mod.rs | 25 + 9 files changed, 22384 insertions(+) create mode 100644 crates/bevy_mod_scripting_functions/src/bevy/bevy_core.rs create mode 100644 crates/bevy_mod_scripting_functions/src/bevy/bevy_ecs.rs create mode 100644 crates/bevy_mod_scripting_functions/src/bevy/bevy_hierarchy.rs create mode 100644 crates/bevy_mod_scripting_functions/src/bevy/bevy_input.rs create mode 100644 crates/bevy_mod_scripting_functions/src/bevy/bevy_math.rs create mode 100644 crates/bevy_mod_scripting_functions/src/bevy/bevy_reflect.rs create mode 100644 crates/bevy_mod_scripting_functions/src/bevy/bevy_time.rs create mode 100644 crates/bevy_mod_scripting_functions/src/bevy/bevy_transform.rs create mode 100644 crates/bevy_mod_scripting_functions/src/bevy/mod.rs diff --git a/crates/bevy_mod_scripting_functions/src/bevy/bevy_core.rs b/crates/bevy_mod_scripting_functions/src/bevy/bevy_core.rs new file mode 100644 index 0000000000..8a6dbf6656 --- /dev/null +++ b/crates/bevy_mod_scripting_functions/src/bevy/bevy_core.rs @@ -0,0 +1,36 @@ +// @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 super::bevy_ecs::*; +use super::bevy_reflect::*; +use bevy_mod_scripting_core::{ + AddContextInitializer, StoreDocumentation, bindings::ReflectReference, +}; +use bevy_mod_scripting_functions::RegisterScriptFunction; +use crate::*; +pub struct BevyCoreScriptingPlugin; +impl bevy::app::Plugin for BevyCoreScriptingPlugin { + fn build(&self, app: &mut bevy::prelude::App) { + let mut world = app.world_mut(); + NamespaceBuilder::::new(world) + .overwrite_script_function( + "eq", + | + _self: Ref, + other: Ref| + { + let output: bool = Name::eq(_self, other).into(); + output + }, + ) + .overwrite_script_function( + "clone", + |_self: Ref| { + let output: Val = Name::clone(_self) + .into(); + output + }, + ); + } +} diff --git a/crates/bevy_mod_scripting_functions/src/bevy/bevy_ecs.rs b/crates/bevy_mod_scripting_functions/src/bevy/bevy_ecs.rs new file mode 100644 index 0000000000..18232a843b --- /dev/null +++ b/crates/bevy_mod_scripting_functions/src/bevy/bevy_ecs.rs @@ -0,0 +1,319 @@ +// @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 super::bevy_reflect::*; +use bevy_mod_scripting_core::{ + AddContextInitializer, StoreDocumentation, bindings::ReflectReference, +}; +use bevy_mod_scripting_functions::RegisterScriptFunction; +use crate::*; +pub struct BevyEcsScriptingPlugin; +impl bevy::app::Plugin for BevyEcsScriptingPlugin { + fn build(&self, app: &mut bevy::prelude::App) { + let mut world = app.world_mut(); + NamespaceBuilder::::new(world) + .overwrite_script_function( + "from_raw", + |index: u32| { + let output: Val = Entity::from_raw(index) + .into(); + output + }, + ) + .overwrite_script_function( + "to_bits", + |_self: Val| { + let output: u64 = Entity::to_bits(_self).into(); + output + }, + ) + .overwrite_script_function( + "from_bits", + |bits: u64| { + let output: Val = Entity::from_bits(bits) + .into(); + output + }, + ) + .overwrite_script_function( + "index", + |_self: Val| { + let output: u32 = Entity::index(_self).into(); + output + }, + ) + .overwrite_script_function( + "generation", + |_self: Val| { + let output: u32 = Entity::generation(_self).into(); + output + }, + ) + .overwrite_script_function( + "eq", + | + _self: Ref, + other: Ref| + { + let output: bool = Entity::eq(_self, other).into(); + output + }, + ) + .overwrite_script_function( + "clone", + |_self: Ref| { + let output: Val = Entity::clone(_self) + .into(); + output + }, + ); + NamespaceBuilder::::new(world); + NamespaceBuilder::::new(world); + NamespaceBuilder::::new(world); + NamespaceBuilder::::new(world); + NamespaceBuilder::::new(world) + .overwrite_script_function( + "eq", + | + _self: Ref, + other: Ref| + { + let output: bool = ComponentId::eq(_self, other).into(); + output + }, + ) + .overwrite_script_function( + "clone", + |_self: Ref| { + let output: Val = ComponentId::clone( + _self, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "new", + |index: usize| { + let output: Val = ComponentId::new( + index, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "index", + |_self: Val| { + let output: usize = ComponentId::index(_self).into(); + output + }, + ) + .overwrite_script_function( + "assert_receiver_is_total_eq", + |_self: Ref| { + let output: () = ComponentId::assert_receiver_is_total_eq(_self) + .into(); + output + }, + ); + NamespaceBuilder::::new(world) + .overwrite_script_function( + "assert_receiver_is_total_eq", + |_self: Ref| { + let output: () = Tick::assert_receiver_is_total_eq(_self).into(); + output + }, + ) + .overwrite_script_function( + "eq", + | + _self: Ref, + other: Ref| + { + let output: bool = Tick::eq(_self, other).into(); + output + }, + ) + .overwrite_script_function( + "clone", + |_self: Ref| { + let output: Val = Tick::clone(_self) + .into(); + output + }, + ) + .overwrite_script_function( + "new", + |tick: u32| { + let output: Val = Tick::new(tick).into(); + output + }, + ) + .overwrite_script_function( + "get", + |_self: Val| { + let output: u32 = Tick::get(_self).into(); + output + }, + ) + .overwrite_script_function( + "set", + |_self: Mut, tick: u32| { + let output: () = Tick::set(_self, tick).into(); + output + }, + ) + .overwrite_script_function( + "is_newer_than", + | + _self: Val, + last_run: Val, + this_run: Val| + { + let output: bool = Tick::is_newer_than(_self, last_run, this_run) + .into(); + output + }, + ); + NamespaceBuilder::::new(world) + .overwrite_script_function( + "clone", + |_self: Ref| { + let output: Val = ComponentTicks::clone( + _self, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "is_added", + | + _self: Ref, + last_run: Val, + this_run: Val| + { + let output: bool = ComponentTicks::is_added( + _self, + last_run, + this_run, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "is_changed", + | + _self: Ref, + last_run: Val, + this_run: Val| + { + let output: bool = ComponentTicks::is_changed( + _self, + last_run, + this_run, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "new", + |change_tick: Val| { + let output: Val = ComponentTicks::new( + change_tick, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "set_changed", + | + _self: Mut, + change_tick: Val| + { + let output: () = ComponentTicks::set_changed(_self, change_tick) + .into(); + output + }, + ); + NamespaceBuilder::::new(world) + .overwrite_script_function( + "clone", + |_self: Ref| { + let output: Val = Identifier::clone( + _self, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "low", + |_self: Val| { + let output: u32 = Identifier::low(_self).into(); + output + }, + ) + .overwrite_script_function( + "masked_high", + |_self: Val| { + let output: u32 = Identifier::masked_high(_self).into(); + output + }, + ) + .overwrite_script_function( + "to_bits", + |_self: Val| { + let output: u64 = Identifier::to_bits(_self).into(); + output + }, + ) + .overwrite_script_function( + "from_bits", + |value: u64| { + let output: Val = Identifier::from_bits( + value, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "eq", + | + _self: Ref, + other: Ref| + { + let output: bool = Identifier::eq(_self, other).into(); + output + }, + ); + NamespaceBuilder::::new(world) + .overwrite_script_function( + "clone", + |_self: Ref| { + let output: Val = EntityHash::clone( + _self, + ) + .into(); + output + }, + ); + NamespaceBuilder::::new(world) + .overwrite_script_function( + "clone", + |_self: Ref| { + let output: Val< + bevy::ecs::removal_detection::RemovedComponentEntity, + > = RemovedComponentEntity::clone(_self).into(); + output + }, + ); + NamespaceBuilder::::new(world); + } +} diff --git a/crates/bevy_mod_scripting_functions/src/bevy/bevy_hierarchy.rs b/crates/bevy_mod_scripting_functions/src/bevy/bevy_hierarchy.rs new file mode 100644 index 0000000000..7c7e0da299 --- /dev/null +++ b/crates/bevy_mod_scripting_functions/src/bevy/bevy_hierarchy.rs @@ -0,0 +1,77 @@ +// @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 super::bevy_ecs::*; +use super::bevy_reflect::*; +use super::bevy_core::*; +use bevy_mod_scripting_core::{ + AddContextInitializer, StoreDocumentation, bindings::ReflectReference, +}; +use bevy_mod_scripting_functions::RegisterScriptFunction; +use crate::*; +pub struct BevyHierarchyScriptingPlugin; +impl bevy::app::Plugin for BevyHierarchyScriptingPlugin { + fn build(&self, app: &mut bevy::prelude::App) { + let mut world = app.world_mut(); + NamespaceBuilder::::new(world) + .overwrite_script_function( + "swap", + | + _self: Mut, + a_index: usize, + b_index: usize| + { + let output: () = Children::swap(_self, a_index, b_index).into(); + output + }, + ); + NamespaceBuilder::::new(world) + .overwrite_script_function( + "assert_receiver_is_total_eq", + |_self: Ref| { + let output: () = Parent::assert_receiver_is_total_eq(_self).into(); + output + }, + ) + .overwrite_script_function( + "eq", + | + _self: Ref, + other: Ref| + { + let output: bool = Parent::eq(_self, other).into(); + output + }, + ); + NamespaceBuilder::::new(world) + .overwrite_script_function( + "clone", + |_self: Ref| { + let output: Val = HierarchyEvent::clone( + _self, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "eq", + | + _self: Ref, + other: Ref| + { + let output: bool = HierarchyEvent::eq(_self, other).into(); + output + }, + ) + .overwrite_script_function( + "assert_receiver_is_total_eq", + |_self: Ref| { + let output: () = HierarchyEvent::assert_receiver_is_total_eq(_self) + .into(); + output + }, + ); + } +} diff --git a/crates/bevy_mod_scripting_functions/src/bevy/bevy_input.rs b/crates/bevy_mod_scripting_functions/src/bevy/bevy_input.rs new file mode 100644 index 0000000000..b69275f5a6 --- /dev/null +++ b/crates/bevy_mod_scripting_functions/src/bevy/bevy_input.rs @@ -0,0 +1,1174 @@ +// @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 super::bevy_ecs::*; +use super::bevy_reflect::*; +use super::bevy_core::*; +use super::bevy_math::*; +use bevy_mod_scripting_core::{ + AddContextInitializer, StoreDocumentation, bindings::ReflectReference, +}; +use bevy_mod_scripting_functions::RegisterScriptFunction; +use crate::*; +pub struct BevyInputScriptingPlugin; +impl bevy::app::Plugin for BevyInputScriptingPlugin { + fn build(&self, app: &mut bevy::prelude::App) { + let mut world = app.world_mut(); + NamespaceBuilder::::new(world) + .overwrite_script_function( + "vendor_id", + |_self: Ref| { + let output: std::option::Option = Gamepad::vendor_id(_self) + .into(); + output + }, + ) + .overwrite_script_function( + "product_id", + |_self: Ref| { + let output: std::option::Option = Gamepad::product_id(_self) + .into(); + output + }, + ) + .overwrite_script_function( + "pressed", + | + _self: Ref, + button_type: Val| + { + let output: bool = Gamepad::pressed(_self, button_type).into(); + output + }, + ) + .overwrite_script_function( + "just_pressed", + | + _self: Ref, + button_type: Val| + { + let output: bool = Gamepad::just_pressed(_self, button_type).into(); + output + }, + ) + .overwrite_script_function( + "just_released", + | + _self: Ref, + button_type: Val| + { + let output: bool = Gamepad::just_released(_self, button_type).into(); + output + }, + ); + NamespaceBuilder::::new(world) + .overwrite_script_function( + "assert_receiver_is_total_eq", + |_self: Ref| { + let output: () = GamepadAxis::assert_receiver_is_total_eq(_self) + .into(); + output + }, + ) + .overwrite_script_function( + "eq", + | + _self: Ref, + other: Ref| + { + let output: bool = GamepadAxis::eq(_self, other).into(); + output + }, + ) + .overwrite_script_function( + "clone", + |_self: Ref| { + let output: Val = GamepadAxis::clone( + _self, + ) + .into(); + output + }, + ); + NamespaceBuilder::::new(world) + .overwrite_script_function( + "eq", + | + _self: Ref, + other: Ref| + { + let output: bool = GamepadButton::eq(_self, other).into(); + output + }, + ) + .overwrite_script_function( + "clone", + |_self: Ref| { + let output: Val = GamepadButton::clone( + _self, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "assert_receiver_is_total_eq", + |_self: Ref| { + let output: () = GamepadButton::assert_receiver_is_total_eq(_self) + .into(); + output + }, + ); + NamespaceBuilder::::new(world) + .overwrite_script_function( + "clone", + |_self: Ref| { + let output: Val = GamepadSettings::clone( + _self, + ) + .into(); + output + }, + ); + NamespaceBuilder::::new(world) + .overwrite_script_function( + "eq", + | + _self: Ref, + other: Ref| + { + let output: bool = KeyCode::eq(_self, other).into(); + output + }, + ) + .overwrite_script_function( + "clone", + |_self: Ref| { + let output: Val = KeyCode::clone( + _self, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "assert_receiver_is_total_eq", + |_self: Ref| { + let output: () = KeyCode::assert_receiver_is_total_eq(_self).into(); + output + }, + ); + NamespaceBuilder::::new(world) + .overwrite_script_function( + "assert_receiver_is_total_eq", + |_self: Ref| { + let output: () = MouseButton::assert_receiver_is_total_eq(_self) + .into(); + output + }, + ) + .overwrite_script_function( + "eq", + | + _self: Ref, + other: Ref| + { + let output: bool = MouseButton::eq(_self, other).into(); + output + }, + ) + .overwrite_script_function( + "clone", + |_self: Ref| { + let output: Val = MouseButton::clone( + _self, + ) + .into(); + output + }, + ); + NamespaceBuilder::::new(world) + .overwrite_script_function( + "clone", + |_self: Ref| { + let output: Val = TouchInput::clone( + _self, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "eq", + | + _self: Ref, + other: Ref| + { + let output: bool = TouchInput::eq(_self, other).into(); + output + }, + ); + NamespaceBuilder::::new(world) + .overwrite_script_function( + "clone", + |_self: Ref| { + let output: Val = KeyboardFocusLost::clone( + _self, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "assert_receiver_is_total_eq", + |_self: Ref| { + let output: () = KeyboardFocusLost::assert_receiver_is_total_eq( + _self, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "eq", + | + _self: Ref, + other: Ref| + { + let output: bool = KeyboardFocusLost::eq(_self, other).into(); + output + }, + ); + NamespaceBuilder::::new(world) + .overwrite_script_function( + "eq", + | + _self: Ref, + other: Ref| + { + let output: bool = KeyboardInput::eq(_self, other).into(); + output + }, + ) + .overwrite_script_function( + "clone", + |_self: Ref| { + let output: Val = KeyboardInput::clone( + _self, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "assert_receiver_is_total_eq", + |_self: Ref| { + let output: () = KeyboardInput::assert_receiver_is_total_eq(_self) + .into(); + output + }, + ); + NamespaceBuilder::::new(world) + .overwrite_script_function( + "eq", + | + _self: Ref, + other: Ref| + { + let output: bool = AccumulatedMouseMotion::eq(_self, other).into(); + output + }, + ) + .overwrite_script_function( + "clone", + |_self: Ref| { + let output: Val = AccumulatedMouseMotion::clone( + _self, + ) + .into(); + output + }, + ); + NamespaceBuilder::::new(world) + .overwrite_script_function( + "clone", + |_self: Ref| { + let output: Val = AccumulatedMouseScroll::clone( + _self, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "eq", + | + _self: Ref, + other: Ref| + { + let output: bool = AccumulatedMouseScroll::eq(_self, other).into(); + output + }, + ); + NamespaceBuilder::::new(world) + .overwrite_script_function( + "eq", + | + _self: Ref, + other: Ref| + { + let output: bool = MouseButtonInput::eq(_self, other).into(); + output + }, + ) + .overwrite_script_function( + "clone", + |_self: Ref| { + let output: Val = MouseButtonInput::clone( + _self, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "assert_receiver_is_total_eq", + |_self: Ref| { + let output: () = MouseButtonInput::assert_receiver_is_total_eq(_self) + .into(); + output + }, + ); + NamespaceBuilder::::new(world) + .overwrite_script_function( + "eq", + | + _self: Ref, + other: Ref| + { + let output: bool = MouseMotion::eq(_self, other).into(); + output + }, + ) + .overwrite_script_function( + "clone", + |_self: Ref| { + let output: Val = MouseMotion::clone( + _self, + ) + .into(); + output + }, + ); + NamespaceBuilder::::new(world) + .overwrite_script_function( + "clone", + |_self: Ref| { + let output: Val = MouseWheel::clone( + _self, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "eq", + | + _self: Ref, + other: Ref| + { + let output: bool = MouseWheel::eq(_self, other).into(); + output + }, + ); + NamespaceBuilder::::new(world) + .overwrite_script_function( + "clone", + |_self: Ref| { + let output: Val = GamepadAxisChangedEvent::clone( + _self, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "eq", + | + _self: Ref, + other: Ref| + { + let output: bool = GamepadAxisChangedEvent::eq(_self, other).into(); + output + }, + ); + NamespaceBuilder::::new(world) + .overwrite_script_function( + "clone", + |_self: Ref| { + let output: Val = GamepadButtonChangedEvent::clone( + _self, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "eq", + | + _self: Ref, + other: Ref| + { + let output: bool = GamepadButtonChangedEvent::eq(_self, other) + .into(); + output + }, + ); + NamespaceBuilder::::new(world) + .overwrite_script_function( + "clone", + |_self: Ref| { + let output: Val< + bevy::input::gamepad::GamepadButtonStateChangedEvent, + > = GamepadButtonStateChangedEvent::clone(_self).into(); + output + }, + ) + .overwrite_script_function( + "eq", + | + _self: Ref, + other: Ref| + { + let output: bool = GamepadButtonStateChangedEvent::eq(_self, other) + .into(); + output + }, + ) + .overwrite_script_function( + "assert_receiver_is_total_eq", + |_self: Ref| { + let output: () = GamepadButtonStateChangedEvent::assert_receiver_is_total_eq( + _self, + ) + .into(); + output + }, + ); + NamespaceBuilder::::new(world) + .overwrite_script_function( + "eq", + | + _self: Ref, + other: Ref| + { + let output: bool = GamepadConnection::eq(_self, other).into(); + output + }, + ) + .overwrite_script_function( + "clone", + |_self: Ref| { + let output: Val = GamepadConnection::clone( + _self, + ) + .into(); + output + }, + ); + NamespaceBuilder::::new(world) + .overwrite_script_function( + "connected", + |_self: Ref| { + let output: bool = GamepadConnectionEvent::connected(_self).into(); + output + }, + ) + .overwrite_script_function( + "disconnected", + |_self: Ref| { + let output: bool = GamepadConnectionEvent::disconnected(_self) + .into(); + output + }, + ) + .overwrite_script_function( + "eq", + | + _self: Ref, + other: Ref| + { + let output: bool = GamepadConnectionEvent::eq(_self, other).into(); + output + }, + ) + .overwrite_script_function( + "clone", + |_self: Ref| { + let output: Val = GamepadConnectionEvent::clone( + _self, + ) + .into(); + output + }, + ); + NamespaceBuilder::::new(world) + .overwrite_script_function( + "eq", + | + _self: Ref, + other: Ref| + { + let output: bool = GamepadEvent::eq(_self, other).into(); + output + }, + ) + .overwrite_script_function( + "clone", + |_self: Ref| { + let output: Val = GamepadEvent::clone( + _self, + ) + .into(); + output + }, + ); + NamespaceBuilder::::new(world) + .overwrite_script_function( + "assert_receiver_is_total_eq", + |_self: Ref| { + let output: () = GamepadInput::assert_receiver_is_total_eq(_self) + .into(); + output + }, + ) + .overwrite_script_function( + "clone", + |_self: Ref| { + let output: Val = GamepadInput::clone( + _self, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "eq", + | + _self: Ref, + other: Ref| + { + let output: bool = GamepadInput::eq(_self, other).into(); + output + }, + ); + NamespaceBuilder::::new(world) + .overwrite_script_function( + "clone", + |_self: Ref| { + let output: Val = GamepadRumbleRequest::clone( + _self, + ) + .into(); + output + }, + ); + NamespaceBuilder::::new(world) + .overwrite_script_function( + "eq", + | + _self: Ref, + other: Ref| + { + let output: bool = RawGamepadAxisChangedEvent::eq(_self, other) + .into(); + output + }, + ) + .overwrite_script_function( + "clone", + |_self: Ref| { + let output: Val = RawGamepadAxisChangedEvent::clone( + _self, + ) + .into(); + output + }, + ); + NamespaceBuilder::::new(world) + .overwrite_script_function( + "clone", + |_self: Ref| { + let output: Val< + bevy::input::gamepad::RawGamepadButtonChangedEvent, + > = RawGamepadButtonChangedEvent::clone(_self).into(); + output + }, + ) + .overwrite_script_function( + "eq", + | + _self: Ref, + other: Ref| + { + let output: bool = RawGamepadButtonChangedEvent::eq(_self, other) + .into(); + output + }, + ); + NamespaceBuilder::::new(world) + .overwrite_script_function( + "clone", + |_self: Ref| { + let output: Val = RawGamepadEvent::clone( + _self, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "eq", + | + _self: Ref, + other: Ref| + { + let output: bool = RawGamepadEvent::eq(_self, other).into(); + output + }, + ); + NamespaceBuilder::::new(world) + .overwrite_script_function( + "clone", + |_self: Ref| { + let output: Val = PinchGesture::clone( + _self, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "eq", + | + _self: Ref, + other: Ref| + { + let output: bool = PinchGesture::eq(_self, other).into(); + output + }, + ); + NamespaceBuilder::::new(world) + .overwrite_script_function( + "clone", + |_self: Ref| { + let output: Val = RotationGesture::clone( + _self, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "eq", + | + _self: Ref, + other: Ref| + { + let output: bool = RotationGesture::eq(_self, other).into(); + output + }, + ); + NamespaceBuilder::::new(world) + .overwrite_script_function( + "eq", + | + _self: Ref, + other: Ref| + { + let output: bool = DoubleTapGesture::eq(_self, other).into(); + output + }, + ) + .overwrite_script_function( + "clone", + |_self: Ref| { + let output: Val = DoubleTapGesture::clone( + _self, + ) + .into(); + output + }, + ); + NamespaceBuilder::::new(world) + .overwrite_script_function( + "clone", + |_self: Ref| { + let output: Val = PanGesture::clone( + _self, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "eq", + | + _self: Ref, + other: Ref| + { + let output: bool = PanGesture::eq(_self, other).into(); + output + }, + ); + NamespaceBuilder::::new(world) + .overwrite_script_function( + "eq", + | + _self: Ref, + other: Ref| + { + let output: bool = ButtonState::eq(_self, other).into(); + output + }, + ) + .overwrite_script_function( + "is_pressed", + |_self: Ref| { + let output: bool = ButtonState::is_pressed(_self).into(); + output + }, + ) + .overwrite_script_function( + "assert_receiver_is_total_eq", + |_self: Ref| { + let output: () = ButtonState::assert_receiver_is_total_eq(_self) + .into(); + output + }, + ) + .overwrite_script_function( + "clone", + |_self: Ref| { + let output: Val = ButtonState::clone(_self) + .into(); + output + }, + ); + NamespaceBuilder::::new(world) + .overwrite_script_function( + "eq", + | + _self: Ref, + other: Ref| + { + let output: bool = ButtonSettings::eq(_self, other).into(); + output + }, + ) + .overwrite_script_function( + "clone", + |_self: Ref| { + let output: Val = ButtonSettings::clone( + _self, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "is_pressed", + |_self: Ref, value: f32| { + let output: bool = ButtonSettings::is_pressed(_self, value).into(); + output + }, + ) + .overwrite_script_function( + "is_released", + |_self: Ref, value: f32| { + let output: bool = ButtonSettings::is_released(_self, value).into(); + output + }, + ) + .overwrite_script_function( + "press_threshold", + |_self: Ref| { + let output: f32 = ButtonSettings::press_threshold(_self).into(); + output + }, + ) + .overwrite_script_function( + "set_press_threshold", + |_self: Mut, value: f32| { + let output: f32 = ButtonSettings::set_press_threshold(_self, value) + .into(); + output + }, + ) + .overwrite_script_function( + "release_threshold", + |_self: Ref| { + let output: f32 = ButtonSettings::release_threshold(_self).into(); + output + }, + ) + .overwrite_script_function( + "set_release_threshold", + |_self: Mut, value: f32| { + let output: f32 = ButtonSettings::set_release_threshold(_self, value) + .into(); + output + }, + ); + NamespaceBuilder::::new(world) + .overwrite_script_function( + "eq", + | + _self: Ref, + other: Ref| + { + let output: bool = AxisSettings::eq(_self, other).into(); + output + }, + ) + .overwrite_script_function( + "livezone_upperbound", + |_self: Ref| { + let output: f32 = AxisSettings::livezone_upperbound(_self).into(); + output + }, + ) + .overwrite_script_function( + "set_livezone_upperbound", + |_self: Mut, value: f32| { + let output: f32 = AxisSettings::set_livezone_upperbound(_self, value) + .into(); + output + }, + ) + .overwrite_script_function( + "deadzone_upperbound", + |_self: Ref| { + let output: f32 = AxisSettings::deadzone_upperbound(_self).into(); + output + }, + ) + .overwrite_script_function( + "set_deadzone_upperbound", + |_self: Mut, value: f32| { + let output: f32 = AxisSettings::set_deadzone_upperbound(_self, value) + .into(); + output + }, + ) + .overwrite_script_function( + "livezone_lowerbound", + |_self: Ref| { + let output: f32 = AxisSettings::livezone_lowerbound(_self).into(); + output + }, + ) + .overwrite_script_function( + "set_livezone_lowerbound", + |_self: Mut, value: f32| { + let output: f32 = AxisSettings::set_livezone_lowerbound(_self, value) + .into(); + output + }, + ) + .overwrite_script_function( + "deadzone_lowerbound", + |_self: Ref| { + let output: f32 = AxisSettings::deadzone_lowerbound(_self).into(); + output + }, + ) + .overwrite_script_function( + "set_deadzone_lowerbound", + |_self: Mut, value: f32| { + let output: f32 = AxisSettings::set_deadzone_lowerbound(_self, value) + .into(); + output + }, + ) + .overwrite_script_function( + "threshold", + |_self: Ref| { + let output: f32 = AxisSettings::threshold(_self).into(); + output + }, + ) + .overwrite_script_function( + "set_threshold", + |_self: Mut, value: f32| { + let output: f32 = AxisSettings::set_threshold(_self, value).into(); + output + }, + ) + .overwrite_script_function( + "clamp", + |_self: Ref, new_value: f32| { + let output: f32 = AxisSettings::clamp(_self, new_value).into(); + output + }, + ) + .overwrite_script_function( + "filter", + | + _self: Ref, + new_value: f32, + old_value: std::option::Option| + { + let output: std::option::Option = AxisSettings::filter( + _self, + new_value, + old_value, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "clone", + |_self: Ref| { + let output: Val = AxisSettings::clone( + _self, + ) + .into(); + output + }, + ); + NamespaceBuilder::::new(world) + .overwrite_script_function( + "filter", + | + _self: Ref, + new_value: f32, + old_value: std::option::Option| + { + let output: std::option::Option = ButtonAxisSettings::filter( + _self, + new_value, + old_value, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "clone", + |_self: Ref| { + let output: Val = ButtonAxisSettings::clone( + _self, + ) + .into(); + output + }, + ); + NamespaceBuilder::::new(world) + .overwrite_script_function( + "weak_motor", + |intensity: f32| { + let output: Val = GamepadRumbleIntensity::weak_motor( + intensity, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "strong_motor", + |intensity: f32| { + let output: Val = GamepadRumbleIntensity::strong_motor( + intensity, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "clone", + |_self: Ref| { + let output: Val = GamepadRumbleIntensity::clone( + _self, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "eq", + | + _self: Ref, + other: Ref| + { + let output: bool = GamepadRumbleIntensity::eq(_self, other).into(); + output + }, + ); + NamespaceBuilder::::new(world) + .overwrite_script_function( + "assert_receiver_is_total_eq", + |_self: Ref| { + let output: () = Key::assert_receiver_is_total_eq(_self).into(); + output + }, + ) + .overwrite_script_function( + "clone", + |_self: Ref| { + let output: Val = Key::clone(_self) + .into(); + output + }, + ) + .overwrite_script_function( + "eq", + | + _self: Ref, + other: Ref| + { + let output: bool = Key::eq(_self, other).into(); + output + }, + ); + NamespaceBuilder::::new(world) + .overwrite_script_function( + "eq", + | + _self: Ref, + other: Ref| + { + let output: bool = NativeKeyCode::eq(_self, other).into(); + output + }, + ) + .overwrite_script_function( + "clone", + |_self: Ref| { + let output: Val = NativeKeyCode::clone( + _self, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "assert_receiver_is_total_eq", + |_self: Ref| { + let output: () = NativeKeyCode::assert_receiver_is_total_eq(_self) + .into(); + output + }, + ); + NamespaceBuilder::::new(world) + .overwrite_script_function( + "eq", + | + _self: Ref, + other: Ref| + { + let output: bool = NativeKey::eq(_self, other).into(); + output + }, + ) + .overwrite_script_function( + "assert_receiver_is_total_eq", + |_self: Ref| { + let output: () = NativeKey::assert_receiver_is_total_eq(_self) + .into(); + output + }, + ) + .overwrite_script_function( + "clone", + |_self: Ref| { + let output: Val = NativeKey::clone( + _self, + ) + .into(); + output + }, + ); + NamespaceBuilder::::new(world) + .overwrite_script_function( + "clone", + |_self: Ref| { + let output: Val = MouseScrollUnit::clone( + _self, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "assert_receiver_is_total_eq", + |_self: Ref| { + let output: () = MouseScrollUnit::assert_receiver_is_total_eq(_self) + .into(); + output + }, + ) + .overwrite_script_function( + "eq", + | + _self: Ref, + other: Ref| + { + let output: bool = MouseScrollUnit::eq(_self, other).into(); + output + }, + ); + NamespaceBuilder::::new(world) + .overwrite_script_function( + "assert_receiver_is_total_eq", + |_self: Ref| { + let output: () = TouchPhase::assert_receiver_is_total_eq(_self) + .into(); + output + }, + ) + .overwrite_script_function( + "eq", + | + _self: Ref, + other: Ref| + { + let output: bool = TouchPhase::eq(_self, other).into(); + output + }, + ) + .overwrite_script_function( + "clone", + |_self: Ref| { + let output: Val = TouchPhase::clone( + _self, + ) + .into(); + output + }, + ); + NamespaceBuilder::::new(world) + .overwrite_script_function( + "clone", + |_self: Ref| { + let output: Val = ForceTouch::clone( + _self, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "eq", + | + _self: Ref, + other: Ref| + { + let output: bool = ForceTouch::eq(_self, other).into(); + output + }, + ); + } +} diff --git a/crates/bevy_mod_scripting_functions/src/bevy/bevy_math.rs b/crates/bevy_mod_scripting_functions/src/bevy/bevy_math.rs new file mode 100644 index 0000000000..8135ba028d --- /dev/null +++ b/crates/bevy_mod_scripting_functions/src/bevy/bevy_math.rs @@ -0,0 +1,2977 @@ +// @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 super::bevy_reflect::*; +use bevy_mod_scripting_core::{ + AddContextInitializer, StoreDocumentation, bindings::ReflectReference, +}; +use bevy_mod_scripting_functions::RegisterScriptFunction; +use crate::*; +pub struct BevyMathScriptingPlugin; +impl bevy::app::Plugin for BevyMathScriptingPlugin { + fn build(&self, app: &mut bevy::prelude::App) { + let mut world = app.world_mut(); + NamespaceBuilder::::new(world) + .overwrite_script_function( + "eq", + | + _self: Ref, + other: Ref| + { + let output: bool = AspectRatio::eq(_self, other).into(); + output + }, + ) + .overwrite_script_function( + "ratio", + |_self: Ref| { + let output: f32 = AspectRatio::ratio(_self).into(); + output + }, + ) + .overwrite_script_function( + "inverse", + |_self: Ref| { + let output: Val = AspectRatio::inverse( + _self, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "is_landscape", + |_self: Ref| { + let output: bool = AspectRatio::is_landscape(_self).into(); + output + }, + ) + .overwrite_script_function( + "is_portrait", + |_self: Ref| { + let output: bool = AspectRatio::is_portrait(_self).into(); + output + }, + ) + .overwrite_script_function( + "is_square", + |_self: Ref| { + let output: bool = AspectRatio::is_square(_self).into(); + output + }, + ) + .overwrite_script_function( + "clone", + |_self: Ref| { + let output: Val = AspectRatio::clone(_self) + .into(); + output + }, + ); + NamespaceBuilder::::new(world) + .overwrite_script_function( + "assert_receiver_is_total_eq", + |_self: Ref| { + let output: () = CompassOctant::assert_receiver_is_total_eq(_self) + .into(); + output + }, + ) + .overwrite_script_function( + "clone", + |_self: Ref| { + let output: Val = CompassOctant::clone( + _self, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "eq", + | + _self: Ref, + other: Ref| + { + let output: bool = CompassOctant::eq(_self, other).into(); + output + }, + ); + NamespaceBuilder::::new(world) + .overwrite_script_function( + "assert_receiver_is_total_eq", + |_self: Ref| { + let output: () = CompassQuadrant::assert_receiver_is_total_eq(_self) + .into(); + output + }, + ) + .overwrite_script_function( + "eq", + | + _self: Ref, + other: Ref| + { + let output: bool = CompassQuadrant::eq(_self, other).into(); + output + }, + ) + .overwrite_script_function( + "clone", + |_self: Ref| { + let output: Val = CompassQuadrant::clone( + _self, + ) + .into(); + output + }, + ); + NamespaceBuilder::::new(world) + .overwrite_script_function( + "mul", + | + _self: Val, + rhs: Val| + { + let output: Val = Isometry2d::mul( + _self, + rhs, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "from_rotation", + |rotation: Val| { + let output: Val = Isometry2d::from_rotation( + rotation, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "from_xy", + |x: f32, y: f32| { + let output: Val = Isometry2d::from_xy(x, y) + .into(); + output + }, + ) + .overwrite_script_function( + "inverse", + |_self: Ref| { + let output: Val = Isometry2d::inverse(_self) + .into(); + output + }, + ) + .overwrite_script_function( + "inverse_mul", + |_self: Ref, rhs: Val| { + let output: Val = Isometry2d::inverse_mul( + _self, + rhs, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "clone", + |_self: Ref| { + let output: Val = Isometry2d::clone(_self) + .into(); + output + }, + ) + .overwrite_script_function( + "mul", + |_self: Val, rhs: Val| { + let output: Val = Isometry2d::mul(_self, rhs) + .into(); + output + }, + ) + .overwrite_script_function( + "eq", + |_self: Ref, other: Ref| { + let output: bool = Isometry2d::eq(_self, other).into(); + output + }, + ); + NamespaceBuilder::::new(world) + .overwrite_script_function( + "from_xyz", + |x: f32, y: f32, z: f32| { + let output: Val = Isometry3d::from_xyz( + x, + y, + z, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "inverse", + |_self: Ref| { + let output: Val = Isometry3d::inverse(_self) + .into(); + output + }, + ) + .overwrite_script_function( + "inverse_mul", + |_self: Ref, rhs: Val| { + let output: Val = Isometry3d::inverse_mul( + _self, + rhs, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "clone", + |_self: Ref| { + let output: Val = Isometry3d::clone(_self) + .into(); + output + }, + ) + .overwrite_script_function( + "mul", + |_self: Val, rhs: Val| { + let output: Val = Isometry3d::mul(_self, rhs) + .into(); + output + }, + ) + .overwrite_script_function( + "mul", + | + _self: Val, + rhs: Val| + { + let output: Val = Isometry3d::mul( + _self, + rhs, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "eq", + |_self: Ref, other: Ref| { + let output: bool = Isometry3d::eq(_self, other).into(); + output + }, + ); + NamespaceBuilder::::new(world) + .overwrite_script_function( + "clone", + |_self: Ref| { + let output: Val = Ray2d::clone(_self).into(); + output + }, + ) + .overwrite_script_function( + "eq", + |_self: Ref, other: Ref| { + let output: bool = Ray2d::eq(_self, other).into(); + output + }, + ); + NamespaceBuilder::::new(world) + .overwrite_script_function( + "eq", + |_self: Ref, other: Ref| { + let output: bool = Ray3d::eq(_self, other).into(); + output + }, + ) + .overwrite_script_function( + "clone", + |_self: Ref| { + let output: Val = Ray3d::clone(_self).into(); + output + }, + ); + NamespaceBuilder::::new(world) + .overwrite_script_function( + "mul", + |_self: Val, rhs: Val| { + let output: Val = Rot2::mul(_self, rhs).into(); + output + }, + ) + .overwrite_script_function( + "radians", + |radians: f32| { + let output: Val = Rot2::radians(radians).into(); + output + }, + ) + .overwrite_script_function( + "degrees", + |degrees: f32| { + let output: Val = Rot2::degrees(degrees).into(); + output + }, + ) + .overwrite_script_function( + "turn_fraction", + |fraction: f32| { + let output: Val = Rot2::turn_fraction(fraction) + .into(); + output + }, + ) + .overwrite_script_function( + "from_sin_cos", + |sin: f32, cos: f32| { + let output: Val = Rot2::from_sin_cos(sin, cos) + .into(); + output + }, + ) + .overwrite_script_function( + "as_radians", + |_self: Val| { + let output: f32 = Rot2::as_radians(_self).into(); + output + }, + ) + .overwrite_script_function( + "as_degrees", + |_self: Val| { + let output: f32 = Rot2::as_degrees(_self).into(); + output + }, + ) + .overwrite_script_function( + "as_turn_fraction", + |_self: Val| { + let output: f32 = Rot2::as_turn_fraction(_self).into(); + output + }, + ) + .overwrite_script_function( + "sin_cos", + |_self: Val| { + let output: (f32, f32) = Rot2::sin_cos(_self).into(); + output + }, + ) + .overwrite_script_function( + "length", + |_self: Val| { + let output: f32 = Rot2::length(_self).into(); + output + }, + ) + .overwrite_script_function( + "length_squared", + |_self: Val| { + let output: f32 = Rot2::length_squared(_self).into(); + output + }, + ) + .overwrite_script_function( + "length_recip", + |_self: Val| { + let output: f32 = Rot2::length_recip(_self).into(); + output + }, + ) + .overwrite_script_function( + "normalize", + |_self: Val| { + let output: Val = Rot2::normalize(_self).into(); + output + }, + ) + .overwrite_script_function( + "fast_renormalize", + |_self: Val| { + let output: Val = Rot2::fast_renormalize(_self) + .into(); + output + }, + ) + .overwrite_script_function( + "is_finite", + |_self: Val| { + let output: bool = Rot2::is_finite(_self).into(); + output + }, + ) + .overwrite_script_function( + "is_nan", + |_self: Val| { + let output: bool = Rot2::is_nan(_self).into(); + output + }, + ) + .overwrite_script_function( + "is_normalized", + |_self: Val| { + let output: bool = Rot2::is_normalized(_self).into(); + output + }, + ) + .overwrite_script_function( + "is_near_identity", + |_self: Val| { + let output: bool = Rot2::is_near_identity(_self).into(); + output + }, + ) + .overwrite_script_function( + "angle_between", + |_self: Val, other: Val| { + let output: f32 = Rot2::angle_between(_self, other).into(); + output + }, + ) + .overwrite_script_function( + "angle_to", + |_self: Val, other: Val| { + let output: f32 = Rot2::angle_to(_self, other).into(); + output + }, + ) + .overwrite_script_function( + "inverse", + |_self: Val| { + let output: Val = Rot2::inverse(_self).into(); + output + }, + ) + .overwrite_script_function( + "nlerp", + |_self: Val, end: Val, s: f32| { + let output: Val = Rot2::nlerp(_self, end, s) + .into(); + output + }, + ) + .overwrite_script_function( + "slerp", + |_self: Val, end: Val, s: f32| { + let output: Val = Rot2::slerp(_self, end, s) + .into(); + output + }, + ) + .overwrite_script_function( + "mul", + | + _self: Val, + direction: Val| + { + let output: Val = Rot2::mul( + _self, + direction, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "eq", + |_self: Ref, other: Ref| { + let output: bool = Rot2::eq(_self, other).into(); + output + }, + ) + .overwrite_script_function( + "clone", + |_self: Ref| { + let output: Val = Rot2::clone(_self).into(); + output + }, + ); + NamespaceBuilder::::new(world) + .overwrite_script_function( + "clone", + |_self: Ref| { + let output: Val = Dir2::clone(_self) + .into(); + output + }, + ) + .overwrite_script_function( + "from_xy_unchecked", + |x: f32, y: f32| { + let output: Val = Dir2::from_xy_unchecked( + x, + y, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "slerp", + | + _self: Val, + rhs: Val, + s: f32| + { + let output: Val = Dir2::slerp( + _self, + rhs, + s, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "rotation_to", + | + _self: Val, + other: Val| + { + let output: Val = Dir2::rotation_to(_self, other) + .into(); + output + }, + ) + .overwrite_script_function( + "rotation_from", + | + _self: Val, + other: Val| + { + let output: Val = Dir2::rotation_from(_self, other) + .into(); + output + }, + ) + .overwrite_script_function( + "rotation_from_x", + |_self: Val| { + let output: Val = Dir2::rotation_from_x(_self) + .into(); + output + }, + ) + .overwrite_script_function( + "rotation_to_x", + |_self: Val| { + let output: Val = Dir2::rotation_to_x(_self) + .into(); + output + }, + ) + .overwrite_script_function( + "rotation_from_y", + |_self: Val| { + let output: Val = Dir2::rotation_from_y(_self) + .into(); + output + }, + ) + .overwrite_script_function( + "rotation_to_y", + |_self: Val| { + let output: Val = Dir2::rotation_to_y(_self) + .into(); + output + }, + ) + .overwrite_script_function( + "fast_renormalize", + |_self: Val| { + let output: Val = Dir2::fast_renormalize( + _self, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "eq", + | + _self: Ref, + other: Ref| + { + let output: bool = Dir2::eq(_self, other).into(); + output + }, + ) + .overwrite_script_function( + "neg", + |_self: Val| { + let output: Val = Dir2::neg(_self).into(); + output + }, + ); + NamespaceBuilder::::new(world) + .overwrite_script_function( + "neg", + |_self: Val| { + let output: Val = Dir3::neg(_self).into(); + output + }, + ) + .overwrite_script_function( + "clone", + |_self: Ref| { + let output: Val = Dir3::clone(_self) + .into(); + output + }, + ) + .overwrite_script_function( + "eq", + | + _self: Ref, + other: Ref| + { + let output: bool = Dir3::eq(_self, other).into(); + output + }, + ) + .overwrite_script_function( + "from_xyz_unchecked", + |x: f32, y: f32, z: f32| { + let output: Val = Dir3::from_xyz_unchecked( + x, + y, + z, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "slerp", + | + _self: Val, + rhs: Val, + s: f32| + { + let output: Val = Dir3::slerp( + _self, + rhs, + s, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "fast_renormalize", + |_self: Val| { + let output: Val = Dir3::fast_renormalize( + _self, + ) + .into(); + output + }, + ); + NamespaceBuilder::::new(world) + .overwrite_script_function( + "clone", + |_self: Ref| { + let output: Val = Dir3A::clone(_self) + .into(); + output + }, + ) + .overwrite_script_function( + "neg", + |_self: Val| { + let output: Val = Dir3A::neg(_self) + .into(); + output + }, + ) + .overwrite_script_function( + "eq", + | + _self: Ref, + other: Ref| + { + let output: bool = Dir3A::eq(_self, other).into(); + output + }, + ) + .overwrite_script_function( + "from_xyz_unchecked", + |x: f32, y: f32, z: f32| { + let output: Val = Dir3A::from_xyz_unchecked( + x, + y, + z, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "slerp", + | + _self: Val, + rhs: Val, + s: f32| + { + let output: Val = Dir3A::slerp( + _self, + rhs, + s, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "fast_renormalize", + |_self: Val| { + let output: Val = Dir3A::fast_renormalize( + _self, + ) + .into(); + output + }, + ); + NamespaceBuilder::::new(world) + .overwrite_script_function( + "eq", + | + _self: Ref, + other: Ref| + { + let output: bool = IRect::eq(_self, other).into(); + output + }, + ) + .overwrite_script_function( + "assert_receiver_is_total_eq", + |_self: Ref| { + let output: () = IRect::assert_receiver_is_total_eq(_self).into(); + output + }, + ) + .overwrite_script_function( + "clone", + |_self: Ref| { + let output: Val = IRect::clone(_self) + .into(); + output + }, + ) + .overwrite_script_function( + "new", + |x0: i32, y0: i32, x1: i32, y1: i32| { + let output: Val = IRect::new( + x0, + y0, + x1, + y1, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "is_empty", + |_self: Ref| { + let output: bool = IRect::is_empty(_self).into(); + output + }, + ) + .overwrite_script_function( + "width", + |_self: Ref| { + let output: i32 = IRect::width(_self).into(); + output + }, + ) + .overwrite_script_function( + "height", + |_self: Ref| { + let output: i32 = IRect::height(_self).into(); + output + }, + ) + .overwrite_script_function( + "union", + | + _self: Ref, + other: Val| + { + let output: Val = IRect::union( + _self, + other, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "intersect", + | + _self: Ref, + other: Val| + { + let output: Val = IRect::intersect( + _self, + other, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "inflate", + |_self: Ref, expansion: i32| { + let output: Val = IRect::inflate( + _self, + expansion, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "as_rect", + |_self: Ref| { + let output: Val = IRect::as_rect(_self) + .into(); + output + }, + ) + .overwrite_script_function( + "as_urect", + |_self: Ref| { + let output: Val = IRect::as_urect(_self) + .into(); + output + }, + ); + NamespaceBuilder::::new(world) + .overwrite_script_function( + "eq", + | + _self: Ref, + other: Ref| + { + let output: bool = Rect::eq(_self, other).into(); + output + }, + ) + .overwrite_script_function( + "new", + |x0: f32, y0: f32, x1: f32, y1: f32| { + let output: Val = Rect::new( + x0, + y0, + x1, + y1, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "is_empty", + |_self: Ref| { + let output: bool = Rect::is_empty(_self).into(); + output + }, + ) + .overwrite_script_function( + "width", + |_self: Ref| { + let output: f32 = Rect::width(_self).into(); + output + }, + ) + .overwrite_script_function( + "height", + |_self: Ref| { + let output: f32 = Rect::height(_self).into(); + output + }, + ) + .overwrite_script_function( + "union", + | + _self: Ref, + other: Val| + { + let output: Val = Rect::union( + _self, + other, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "intersect", + | + _self: Ref, + other: Val| + { + let output: Val = Rect::intersect( + _self, + other, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "inflate", + |_self: Ref, expansion: f32| { + let output: Val = Rect::inflate( + _self, + expansion, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "normalize", + | + _self: Ref, + other: Val| + { + let output: Val = Rect::normalize( + _self, + other, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "as_irect", + |_self: Ref| { + let output: Val = Rect::as_irect(_self) + .into(); + output + }, + ) + .overwrite_script_function( + "as_urect", + |_self: Ref| { + let output: Val = Rect::as_urect(_self) + .into(); + output + }, + ) + .overwrite_script_function( + "clone", + |_self: Ref| { + let output: Val = Rect::clone(_self) + .into(); + output + }, + ); + NamespaceBuilder::::new(world) + .overwrite_script_function( + "eq", + | + _self: Ref, + other: Ref| + { + let output: bool = URect::eq(_self, other).into(); + output + }, + ) + .overwrite_script_function( + "new", + |x0: u32, y0: u32, x1: u32, y1: u32| { + let output: Val = URect::new( + x0, + y0, + x1, + y1, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "is_empty", + |_self: Ref| { + let output: bool = URect::is_empty(_self).into(); + output + }, + ) + .overwrite_script_function( + "width", + |_self: Ref| { + let output: u32 = URect::width(_self).into(); + output + }, + ) + .overwrite_script_function( + "height", + |_self: Ref| { + let output: u32 = URect::height(_self).into(); + output + }, + ) + .overwrite_script_function( + "union", + | + _self: Ref, + other: Val| + { + let output: Val = URect::union( + _self, + other, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "intersect", + | + _self: Ref, + other: Val| + { + let output: Val = URect::intersect( + _self, + other, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "inflate", + |_self: Ref, expansion: i32| { + let output: Val = URect::inflate( + _self, + expansion, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "as_rect", + |_self: Ref| { + let output: Val = URect::as_rect(_self) + .into(); + output + }, + ) + .overwrite_script_function( + "as_irect", + |_self: Ref| { + let output: Val = URect::as_irect(_self) + .into(); + output + }, + ) + .overwrite_script_function( + "clone", + |_self: Ref| { + let output: Val = URect::clone(_self) + .into(); + output + }, + ) + .overwrite_script_function( + "assert_receiver_is_total_eq", + |_self: Ref| { + let output: () = URect::assert_receiver_is_total_eq(_self).into(); + output + }, + ); + NamespaceBuilder::::new(world); + NamespaceBuilder::::new(world) + .overwrite_script_function( + "bounding_circle", + |_self: Ref| { + let output: Val = Aabb2d::bounding_circle( + _self, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "clone", + |_self: Ref| { + let output: Val = Aabb2d::clone(_self) + .into(); + output + }, + ); + NamespaceBuilder::::new(world) + .overwrite_script_function( + "radius", + |_self: Ref| { + let output: f32 = BoundingCircle::radius(_self).into(); + output + }, + ) + .overwrite_script_function( + "aabb_2d", + |_self: Ref| { + let output: Val = BoundingCircle::aabb_2d( + _self, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "clone", + |_self: Ref| { + let output: Val = BoundingCircle::clone( + _self, + ) + .into(); + output + }, + ); + NamespaceBuilder::::new(world) + .overwrite_script_function( + "eq", + | + _self: Ref, + other: Ref| + { + let output: bool = Circle::eq(_self, other).into(); + output + }, + ) + .overwrite_script_function( + "new", + |radius: f32| { + let output: Val = Circle::new(radius) + .into(); + output + }, + ) + .overwrite_script_function( + "diameter", + |_self: Ref| { + let output: f32 = Circle::diameter(_self).into(); + output + }, + ) + .overwrite_script_function( + "clone", + |_self: Ref| { + let output: Val = Circle::clone( + _self, + ) + .into(); + output + }, + ); + NamespaceBuilder::::new(world) + .overwrite_script_function( + "clone", + |_self: Ref| { + let output: Val = Annulus::clone( + _self, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "eq", + | + _self: Ref, + other: Ref| + { + let output: bool = Annulus::eq(_self, other).into(); + output + }, + ) + .overwrite_script_function( + "new", + |inner_radius: f32, outer_radius: f32| { + let output: Val = Annulus::new( + inner_radius, + outer_radius, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "diameter", + |_self: Ref| { + let output: f32 = Annulus::diameter(_self).into(); + output + }, + ) + .overwrite_script_function( + "thickness", + |_self: Ref| { + let output: f32 = Annulus::thickness(_self).into(); + output + }, + ); + NamespaceBuilder::::new(world) + .overwrite_script_function( + "new", + |radius: f32, half_angle: f32| { + let output: Val = Arc2d::new( + radius, + half_angle, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "from_radians", + |radius: f32, angle: f32| { + let output: Val = Arc2d::from_radians( + radius, + angle, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "from_degrees", + |radius: f32, angle: f32| { + let output: Val = Arc2d::from_degrees( + radius, + angle, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "from_turns", + |radius: f32, fraction: f32| { + let output: Val = Arc2d::from_turns( + radius, + fraction, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "angle", + |_self: Ref| { + let output: f32 = Arc2d::angle(_self).into(); + output + }, + ) + .overwrite_script_function( + "length", + |_self: Ref| { + let output: f32 = Arc2d::length(_self).into(); + output + }, + ) + .overwrite_script_function( + "half_chord_length", + |_self: Ref| { + let output: f32 = Arc2d::half_chord_length(_self).into(); + output + }, + ) + .overwrite_script_function( + "chord_length", + |_self: Ref| { + let output: f32 = Arc2d::chord_length(_self).into(); + output + }, + ) + .overwrite_script_function( + "apothem", + |_self: Ref| { + let output: f32 = Arc2d::apothem(_self).into(); + output + }, + ) + .overwrite_script_function( + "sagitta", + |_self: Ref| { + let output: f32 = Arc2d::sagitta(_self).into(); + output + }, + ) + .overwrite_script_function( + "is_minor", + |_self: Ref| { + let output: bool = Arc2d::is_minor(_self).into(); + output + }, + ) + .overwrite_script_function( + "is_major", + |_self: Ref| { + let output: bool = Arc2d::is_major(_self).into(); + output + }, + ) + .overwrite_script_function( + "clone", + |_self: Ref| { + let output: Val = Arc2d::clone(_self) + .into(); + output + }, + ) + .overwrite_script_function( + "eq", + | + _self: Ref, + other: Ref| + { + let output: bool = Arc2d::eq(_self, other).into(); + output + }, + ); + NamespaceBuilder::::new(world) + .overwrite_script_function( + "new", + |radius: f32, length: f32| { + let output: Val = Capsule2d::new( + radius, + length, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "to_inner_rectangle", + |_self: Ref| { + let output: Val = Capsule2d::to_inner_rectangle( + _self, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "eq", + | + _self: Ref, + other: Ref| + { + let output: bool = Capsule2d::eq(_self, other).into(); + output + }, + ) + .overwrite_script_function( + "clone", + |_self: Ref| { + let output: Val = Capsule2d::clone( + _self, + ) + .into(); + output + }, + ); + NamespaceBuilder::::new(world) + .overwrite_script_function( + "eq", + | + _self: Ref, + other: Ref| + { + let output: bool = CircularSector::eq(_self, other).into(); + output + }, + ) + .overwrite_script_function( + "new", + |radius: f32, angle: f32| { + let output: Val = CircularSector::new( + radius, + angle, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "from_radians", + |radius: f32, angle: f32| { + let output: Val = CircularSector::from_radians( + radius, + angle, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "from_degrees", + |radius: f32, angle: f32| { + let output: Val = CircularSector::from_degrees( + radius, + angle, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "from_turns", + |radius: f32, fraction: f32| { + let output: Val = CircularSector::from_turns( + radius, + fraction, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "half_angle", + |_self: Ref| { + let output: f32 = CircularSector::half_angle(_self).into(); + output + }, + ) + .overwrite_script_function( + "angle", + |_self: Ref| { + let output: f32 = CircularSector::angle(_self).into(); + output + }, + ) + .overwrite_script_function( + "radius", + |_self: Ref| { + let output: f32 = CircularSector::radius(_self).into(); + output + }, + ) + .overwrite_script_function( + "arc_length", + |_self: Ref| { + let output: f32 = CircularSector::arc_length(_self).into(); + output + }, + ) + .overwrite_script_function( + "half_chord_length", + |_self: Ref| { + let output: f32 = CircularSector::half_chord_length(_self).into(); + output + }, + ) + .overwrite_script_function( + "chord_length", + |_self: Ref| { + let output: f32 = CircularSector::chord_length(_self).into(); + output + }, + ) + .overwrite_script_function( + "apothem", + |_self: Ref| { + let output: f32 = CircularSector::apothem(_self).into(); + output + }, + ) + .overwrite_script_function( + "sagitta", + |_self: Ref| { + let output: f32 = CircularSector::sagitta(_self).into(); + output + }, + ) + .overwrite_script_function( + "clone", + |_self: Ref| { + let output: Val = CircularSector::clone( + _self, + ) + .into(); + output + }, + ); + NamespaceBuilder::::new(world) + .overwrite_script_function( + "new", + |radius: f32, angle: f32| { + let output: Val = CircularSegment::new( + radius, + angle, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "from_radians", + |radius: f32, angle: f32| { + let output: Val = CircularSegment::from_radians( + radius, + angle, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "from_degrees", + |radius: f32, angle: f32| { + let output: Val = CircularSegment::from_degrees( + radius, + angle, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "from_turns", + |radius: f32, fraction: f32| { + let output: Val = CircularSegment::from_turns( + radius, + fraction, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "half_angle", + |_self: Ref| { + let output: f32 = CircularSegment::half_angle(_self).into(); + output + }, + ) + .overwrite_script_function( + "angle", + |_self: Ref| { + let output: f32 = CircularSegment::angle(_self).into(); + output + }, + ) + .overwrite_script_function( + "radius", + |_self: Ref| { + let output: f32 = CircularSegment::radius(_self).into(); + output + }, + ) + .overwrite_script_function( + "arc_length", + |_self: Ref| { + let output: f32 = CircularSegment::arc_length(_self).into(); + output + }, + ) + .overwrite_script_function( + "half_chord_length", + |_self: Ref| { + let output: f32 = CircularSegment::half_chord_length(_self).into(); + output + }, + ) + .overwrite_script_function( + "chord_length", + |_self: Ref| { + let output: f32 = CircularSegment::chord_length(_self).into(); + output + }, + ) + .overwrite_script_function( + "apothem", + |_self: Ref| { + let output: f32 = CircularSegment::apothem(_self).into(); + output + }, + ) + .overwrite_script_function( + "sagitta", + |_self: Ref| { + let output: f32 = CircularSegment::sagitta(_self).into(); + output + }, + ) + .overwrite_script_function( + "clone", + |_self: Ref| { + let output: Val = CircularSegment::clone( + _self, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "eq", + | + _self: Ref, + other: Ref| + { + let output: bool = CircularSegment::eq(_self, other).into(); + output + }, + ); + NamespaceBuilder::::new(world) + .overwrite_script_function( + "eq", + | + _self: Ref, + other: Ref| + { + let output: bool = Ellipse::eq(_self, other).into(); + output + }, + ) + .overwrite_script_function( + "new", + |half_width: f32, half_height: f32| { + let output: Val = Ellipse::new( + half_width, + half_height, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "eccentricity", + |_self: Ref| { + let output: f32 = Ellipse::eccentricity(_self).into(); + output + }, + ) + .overwrite_script_function( + "focal_length", + |_self: Ref| { + let output: f32 = Ellipse::focal_length(_self).into(); + output + }, + ) + .overwrite_script_function( + "semi_major", + |_self: Ref| { + let output: f32 = Ellipse::semi_major(_self).into(); + output + }, + ) + .overwrite_script_function( + "semi_minor", + |_self: Ref| { + let output: f32 = Ellipse::semi_minor(_self).into(); + output + }, + ) + .overwrite_script_function( + "clone", + |_self: Ref| { + let output: Val = Ellipse::clone( + _self, + ) + .into(); + output + }, + ); + NamespaceBuilder::::new(world) + .overwrite_script_function( + "clone", + |_self: Ref| { + let output: Val = Line2d::clone( + _self, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "eq", + | + _self: Ref, + other: Ref| + { + let output: bool = Line2d::eq(_self, other).into(); + output + }, + ); + NamespaceBuilder::::new(world) + .overwrite_script_function( + "clone", + |_self: Ref| { + let output: Val = Plane2d::clone( + _self, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "eq", + | + _self: Ref, + other: Ref| + { + let output: bool = Plane2d::eq(_self, other).into(); + output + }, + ); + NamespaceBuilder::::new(world) + .overwrite_script_function( + "eq", + | + _self: Ref, + other: Ref| + { + let output: bool = Rectangle::eq(_self, other).into(); + output + }, + ) + .overwrite_script_function( + "new", + |width: f32, height: f32| { + let output: Val = Rectangle::new( + width, + height, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "from_length", + |length: f32| { + let output: Val = Rectangle::from_length( + length, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "clone", + |_self: Ref| { + let output: Val = Rectangle::clone( + _self, + ) + .into(); + output + }, + ); + NamespaceBuilder::::new(world) + .overwrite_script_function( + "clone", + |_self: Ref| { + let output: Val = RegularPolygon::clone( + _self, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "new", + |circumradius: f32, sides: u32| { + let output: Val = RegularPolygon::new( + circumradius, + sides, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "circumradius", + |_self: Ref| { + let output: f32 = RegularPolygon::circumradius(_self).into(); + output + }, + ) + .overwrite_script_function( + "inradius", + |_self: Ref| { + let output: f32 = RegularPolygon::inradius(_self).into(); + output + }, + ) + .overwrite_script_function( + "side_length", + |_self: Ref| { + let output: f32 = RegularPolygon::side_length(_self).into(); + output + }, + ) + .overwrite_script_function( + "internal_angle_degrees", + |_self: Ref| { + let output: f32 = RegularPolygon::internal_angle_degrees(_self) + .into(); + output + }, + ) + .overwrite_script_function( + "internal_angle_radians", + |_self: Ref| { + let output: f32 = RegularPolygon::internal_angle_radians(_self) + .into(); + output + }, + ) + .overwrite_script_function( + "external_angle_degrees", + |_self: Ref| { + let output: f32 = RegularPolygon::external_angle_degrees(_self) + .into(); + output + }, + ) + .overwrite_script_function( + "external_angle_radians", + |_self: Ref| { + let output: f32 = RegularPolygon::external_angle_radians(_self) + .into(); + output + }, + ) + .overwrite_script_function( + "eq", + | + _self: Ref, + other: Ref| + { + let output: bool = RegularPolygon::eq(_self, other).into(); + output + }, + ); + NamespaceBuilder::::new(world) + .overwrite_script_function( + "eq", + | + _self: Ref, + other: Ref| + { + let output: bool = Rhombus::eq(_self, other).into(); + output + }, + ) + .overwrite_script_function( + "new", + |horizontal_diagonal: f32, vertical_diagonal: f32| { + let output: Val = Rhombus::new( + horizontal_diagonal, + vertical_diagonal, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "from_side", + |side: f32| { + let output: Val = Rhombus::from_side( + side, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "from_inradius", + |inradius: f32| { + let output: Val = Rhombus::from_inradius( + inradius, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "side", + |_self: Ref| { + let output: f32 = Rhombus::side(_self).into(); + output + }, + ) + .overwrite_script_function( + "circumradius", + |_self: Ref| { + let output: f32 = Rhombus::circumradius(_self).into(); + output + }, + ) + .overwrite_script_function( + "inradius", + |_self: Ref| { + let output: f32 = Rhombus::inradius(_self).into(); + output + }, + ) + .overwrite_script_function( + "clone", + |_self: Ref| { + let output: Val = Rhombus::clone( + _self, + ) + .into(); + output + }, + ); + NamespaceBuilder::::new(world) + .overwrite_script_function( + "eq", + | + _self: Ref, + other: Ref| + { + let output: bool = Segment2d::eq(_self, other).into(); + output + }, + ) + .overwrite_script_function( + "new", + |direction: Val, length: f32| { + let output: Val = Segment2d::new( + direction, + length, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "clone", + |_self: Ref| { + let output: Val = Segment2d::clone( + _self, + ) + .into(); + output + }, + ); + NamespaceBuilder::::new(world) + .overwrite_script_function( + "is_degenerate", + |_self: Ref| { + let output: bool = Triangle2d::is_degenerate(_self).into(); + output + }, + ) + .overwrite_script_function( + "is_acute", + |_self: Ref| { + let output: bool = Triangle2d::is_acute(_self).into(); + output + }, + ) + .overwrite_script_function( + "is_obtuse", + |_self: Ref| { + let output: bool = Triangle2d::is_obtuse(_self).into(); + output + }, + ) + .overwrite_script_function( + "reverse", + |_self: Mut| { + let output: () = Triangle2d::reverse(_self).into(); + output + }, + ) + .overwrite_script_function( + "reversed", + |_self: Val| { + let output: Val = Triangle2d::reversed( + _self, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "clone", + |_self: Ref| { + let output: Val = Triangle2d::clone( + _self, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "eq", + | + _self: Ref, + other: Ref| + { + let output: bool = Triangle2d::eq(_self, other).into(); + output + }, + ); + NamespaceBuilder::::new(world) + .overwrite_script_function( + "clone", + |_self: Ref| { + let output: Val = Aabb3d::clone(_self) + .into(); + output + }, + ) + .overwrite_script_function( + "bounding_sphere", + |_self: Ref| { + let output: Val = Aabb3d::bounding_sphere( + _self, + ) + .into(); + output + }, + ); + NamespaceBuilder::::new(world) + .overwrite_script_function( + "radius", + |_self: Ref| { + let output: f32 = BoundingSphere::radius(_self).into(); + output + }, + ) + .overwrite_script_function( + "aabb_3d", + |_self: Ref| { + let output: Val = BoundingSphere::aabb_3d( + _self, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "clone", + |_self: Ref| { + let output: Val = BoundingSphere::clone( + _self, + ) + .into(); + output + }, + ); + NamespaceBuilder::::new(world) + .overwrite_script_function( + "eq", + | + _self: Ref, + other: Ref| + { + let output: bool = Sphere::eq(_self, other).into(); + output + }, + ) + .overwrite_script_function( + "clone", + |_self: Ref| { + let output: Val = Sphere::clone( + _self, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "new", + |radius: f32| { + let output: Val = Sphere::new(radius) + .into(); + output + }, + ) + .overwrite_script_function( + "diameter", + |_self: Ref| { + let output: f32 = Sphere::diameter(_self).into(); + output + }, + ); + NamespaceBuilder::::new(world) + .overwrite_script_function( + "clone", + |_self: Ref| { + let output: Val = Cuboid::clone( + _self, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "eq", + | + _self: Ref, + other: Ref| + { + let output: bool = Cuboid::eq(_self, other).into(); + output + }, + ) + .overwrite_script_function( + "new", + |x_length: f32, y_length: f32, z_length: f32| { + let output: Val = Cuboid::new( + x_length, + y_length, + z_length, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "from_length", + |length: f32| { + let output: Val = Cuboid::from_length( + length, + ) + .into(); + output + }, + ); + NamespaceBuilder::::new(world) + .overwrite_script_function( + "clone", + |_self: Ref| { + let output: Val = Cylinder::clone( + _self, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "eq", + | + _self: Ref, + other: Ref| + { + let output: bool = Cylinder::eq(_self, other).into(); + output + }, + ) + .overwrite_script_function( + "new", + |radius: f32, height: f32| { + let output: Val = Cylinder::new( + radius, + height, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "base", + |_self: Ref| { + let output: Val = Cylinder::base( + _self, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "lateral_area", + |_self: Ref| { + let output: f32 = Cylinder::lateral_area(_self).into(); + output + }, + ) + .overwrite_script_function( + "base_area", + |_self: Ref| { + let output: f32 = Cylinder::base_area(_self).into(); + output + }, + ); + NamespaceBuilder::::new(world) + .overwrite_script_function( + "clone", + |_self: Ref| { + let output: Val = Capsule3d::clone( + _self, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "eq", + | + _self: Ref, + other: Ref| + { + let output: bool = Capsule3d::eq(_self, other).into(); + output + }, + ) + .overwrite_script_function( + "new", + |radius: f32, length: f32| { + let output: Val = Capsule3d::new( + radius, + length, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "to_cylinder", + |_self: Ref| { + let output: Val = Capsule3d::to_cylinder( + _self, + ) + .into(); + output + }, + ); + NamespaceBuilder::::new(world) + .overwrite_script_function( + "new", + |radius: f32, height: f32| { + let output: Val = Cone::new( + radius, + height, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "base", + |_self: Ref| { + let output: Val = Cone::base(_self) + .into(); + output + }, + ) + .overwrite_script_function( + "slant_height", + |_self: Ref| { + let output: f32 = Cone::slant_height(_self).into(); + output + }, + ) + .overwrite_script_function( + "lateral_area", + |_self: Ref| { + let output: f32 = Cone::lateral_area(_self).into(); + output + }, + ) + .overwrite_script_function( + "base_area", + |_self: Ref| { + let output: f32 = Cone::base_area(_self).into(); + output + }, + ) + .overwrite_script_function( + "clone", + |_self: Ref| { + let output: Val = Cone::clone(_self) + .into(); + output + }, + ) + .overwrite_script_function( + "eq", + | + _self: Ref, + other: Ref| + { + let output: bool = Cone::eq(_self, other).into(); + output + }, + ); + NamespaceBuilder::::new(world) + .overwrite_script_function( + "eq", + | + _self: Ref, + other: Ref| + { + let output: bool = ConicalFrustum::eq(_self, other).into(); + output + }, + ) + .overwrite_script_function( + "clone", + |_self: Ref| { + let output: Val = ConicalFrustum::clone( + _self, + ) + .into(); + output + }, + ); + NamespaceBuilder::::new(world) + .overwrite_script_function( + "clone", + |_self: Ref| { + let output: Val = InfinitePlane3d::clone( + _self, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "eq", + | + _self: Ref, + other: Ref| + { + let output: bool = InfinitePlane3d::eq(_self, other).into(); + output + }, + ); + NamespaceBuilder::::new(world) + .overwrite_script_function( + "clone", + |_self: Ref| { + let output: Val = Line3d::clone( + _self, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "eq", + | + _self: Ref, + other: Ref| + { + let output: bool = Line3d::eq(_self, other).into(); + output + }, + ); + NamespaceBuilder::::new(world) + .overwrite_script_function( + "new", + |direction: Val, length: f32| { + let output: Val = Segment3d::new( + direction, + length, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "eq", + | + _self: Ref, + other: Ref| + { + let output: bool = Segment3d::eq(_self, other).into(); + output + }, + ) + .overwrite_script_function( + "clone", + |_self: Ref| { + let output: Val = Segment3d::clone( + _self, + ) + .into(); + output + }, + ); + NamespaceBuilder::::new(world) + .overwrite_script_function( + "clone", + |_self: Ref| { + let output: Val = Torus::clone(_self) + .into(); + output + }, + ) + .overwrite_script_function( + "eq", + | + _self: Ref, + other: Ref| + { + let output: bool = Torus::eq(_self, other).into(); + output + }, + ) + .overwrite_script_function( + "new", + |inner_radius: f32, outer_radius: f32| { + let output: Val = Torus::new( + inner_radius, + outer_radius, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "inner_radius", + |_self: Ref| { + let output: f32 = Torus::inner_radius(_self).into(); + output + }, + ) + .overwrite_script_function( + "outer_radius", + |_self: Ref| { + let output: f32 = Torus::outer_radius(_self).into(); + output + }, + ); + NamespaceBuilder::::new(world) + .overwrite_script_function( + "eq", + | + _self: Ref, + other: Ref| + { + let output: bool = Triangle3d::eq(_self, other).into(); + output + }, + ) + .overwrite_script_function( + "is_degenerate", + |_self: Ref| { + let output: bool = Triangle3d::is_degenerate(_self).into(); + output + }, + ) + .overwrite_script_function( + "is_acute", + |_self: Ref| { + let output: bool = Triangle3d::is_acute(_self).into(); + output + }, + ) + .overwrite_script_function( + "is_obtuse", + |_self: Ref| { + let output: bool = Triangle3d::is_obtuse(_self).into(); + output + }, + ) + .overwrite_script_function( + "reverse", + |_self: Mut| { + let output: () = Triangle3d::reverse(_self).into(); + output + }, + ) + .overwrite_script_function( + "reversed", + |_self: Val| { + let output: Val = Triangle3d::reversed( + _self, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "clone", + |_self: Ref| { + let output: Val = Triangle3d::clone( + _self, + ) + .into(); + output + }, + ); + NamespaceBuilder::::new(world) + .overwrite_script_function( + "clone", + |_self: Ref| { + let output: Val = RayCast2d::clone( + _self, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "from_ray", + |ray: Val, max: f32| { + let output: Val = RayCast2d::from_ray( + ray, + max, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "aabb_intersection_at", + | + _self: Ref, + aabb: Ref| + { + let output: std::option::Option = RayCast2d::aabb_intersection_at( + _self, + aabb, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "circle_intersection_at", + | + _self: Ref, + circle: Ref| + { + let output: std::option::Option = RayCast2d::circle_intersection_at( + _self, + circle, + ) + .into(); + output + }, + ); + NamespaceBuilder::::new(world) + .overwrite_script_function( + "from_ray", + | + aabb: Val, + ray: Val, + max: f32| + { + let output: Val = AabbCast2d::from_ray( + aabb, + ray, + max, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "aabb_collision_at", + | + _self: Ref, + aabb: Val| + { + let output: std::option::Option = AabbCast2d::aabb_collision_at( + _self, + aabb, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "clone", + |_self: Ref| { + let output: Val = AabbCast2d::clone( + _self, + ) + .into(); + output + }, + ); + NamespaceBuilder::::new(world) + .overwrite_script_function( + "from_ray", + | + circle: Val, + ray: Val, + max: f32| + { + let output: Val = BoundingCircleCast::from_ray( + circle, + ray, + max, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "circle_collision_at", + | + _self: Ref, + circle: Val| + { + let output: std::option::Option = BoundingCircleCast::circle_collision_at( + _self, + circle, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "clone", + |_self: Ref| { + let output: Val = BoundingCircleCast::clone( + _self, + ) + .into(); + output + }, + ); + NamespaceBuilder::::new(world) + .overwrite_script_function( + "clone", + |_self: Ref| { + let output: Val = RayCast3d::clone( + _self, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "from_ray", + |ray: Val, max: f32| { + let output: Val = RayCast3d::from_ray( + ray, + max, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "aabb_intersection_at", + | + _self: Ref, + aabb: Ref| + { + let output: std::option::Option = RayCast3d::aabb_intersection_at( + _self, + aabb, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "sphere_intersection_at", + | + _self: Ref, + sphere: Ref| + { + let output: std::option::Option = RayCast3d::sphere_intersection_at( + _self, + sphere, + ) + .into(); + output + }, + ); + NamespaceBuilder::::new(world) + .overwrite_script_function( + "from_ray", + | + aabb: Val, + ray: Val, + max: f32| + { + let output: Val = AabbCast3d::from_ray( + aabb, + ray, + max, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "aabb_collision_at", + | + _self: Ref, + aabb: Val| + { + let output: std::option::Option = AabbCast3d::aabb_collision_at( + _self, + aabb, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "clone", + |_self: Ref| { + let output: Val = AabbCast3d::clone( + _self, + ) + .into(); + output + }, + ); + NamespaceBuilder::::new(world) + .overwrite_script_function( + "from_ray", + | + sphere: Val, + ray: Val, + max: f32| + { + let output: Val = BoundingSphereCast::from_ray( + sphere, + ray, + max, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "sphere_collision_at", + | + _self: Ref, + sphere: Val| + { + let output: std::option::Option = BoundingSphereCast::sphere_collision_at( + _self, + sphere, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "clone", + |_self: Ref| { + let output: Val = BoundingSphereCast::clone( + _self, + ) + .into(); + output + }, + ); + NamespaceBuilder::::new(world) + .overwrite_script_function( + "eq", + | + _self: Ref, + other: Ref| + { + let output: bool = Interval::eq(_self, other).into(); + output + }, + ) + .overwrite_script_function( + "start", + |_self: Val| { + let output: f32 = Interval::start(_self).into(); + output + }, + ) + .overwrite_script_function( + "end", + |_self: Val| { + let output: f32 = Interval::end(_self).into(); + output + }, + ) + .overwrite_script_function( + "length", + |_self: Val| { + let output: f32 = Interval::length(_self).into(); + output + }, + ) + .overwrite_script_function( + "is_bounded", + |_self: Val| { + let output: bool = Interval::is_bounded(_self).into(); + output + }, + ) + .overwrite_script_function( + "has_finite_start", + |_self: Val| { + let output: bool = Interval::has_finite_start(_self).into(); + output + }, + ) + .overwrite_script_function( + "has_finite_end", + |_self: Val| { + let output: bool = Interval::has_finite_end(_self).into(); + output + }, + ) + .overwrite_script_function( + "contains", + |_self: Val, item: f32| { + let output: bool = Interval::contains(_self, item).into(); + output + }, + ) + .overwrite_script_function( + "contains_interval", + | + _self: Val, + other: Val| + { + let output: bool = Interval::contains_interval(_self, other).into(); + output + }, + ) + .overwrite_script_function( + "clamp", + |_self: Val, value: f32| { + let output: f32 = Interval::clamp(_self, value).into(); + output + }, + ) + .overwrite_script_function( + "clone", + |_self: Ref| { + let output: Val = Interval::clone( + _self, + ) + .into(); + output + }, + ); + NamespaceBuilder::::new(world) + .overwrite_script_function( + "neg", + |_self: Val| { + let output: Val = FloatOrd::neg(_self).into(); + output + }, + ) + .overwrite_script_function( + "clone", + |_self: Ref| { + let output: Val = FloatOrd::clone(_self) + .into(); + output + }, + ) + .overwrite_script_function( + "eq", + |_self: Ref, other: Ref| { + let output: bool = FloatOrd::eq(_self, other).into(); + output + }, + ) + .overwrite_script_function( + "lt", + |_self: Ref, other: Ref| { + let output: bool = FloatOrd::lt(_self, other).into(); + output + }, + ) + .overwrite_script_function( + "le", + |_self: Ref, other: Ref| { + let output: bool = FloatOrd::le(_self, other).into(); + output + }, + ) + .overwrite_script_function( + "gt", + |_self: Ref, other: Ref| { + let output: bool = FloatOrd::gt(_self, other).into(); + output + }, + ) + .overwrite_script_function( + "ge", + |_self: Ref, other: Ref| { + let output: bool = FloatOrd::ge(_self, other).into(); + output + }, + ); + NamespaceBuilder::::new(world) + .overwrite_script_function( + "clone", + |_self: Ref| { + let output: Val = Plane3d::clone( + _self, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "eq", + | + _self: Ref, + other: Ref| + { + let output: bool = Plane3d::eq(_self, other).into(); + output + }, + ); + NamespaceBuilder::::new(world) + .overwrite_script_function( + "signed_volume", + |_self: Ref| { + let output: f32 = Tetrahedron::signed_volume(_self).into(); + output + }, + ) + .overwrite_script_function( + "eq", + | + _self: Ref, + other: Ref| + { + let output: bool = Tetrahedron::eq(_self, other).into(); + output + }, + ) + .overwrite_script_function( + "clone", + |_self: Ref| { + let output: Val = Tetrahedron::clone( + _self, + ) + .into(); + output + }, + ); + NamespaceBuilder::::new(world) + .overwrite_script_function( + "clone", + |_self: Ref| { + let output: Val = EaseFunction::clone( + _self, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "eq", + | + _self: Ref, + other: Ref| + { + let output: bool = EaseFunction::eq(_self, other).into(); + output + }, + ); + } +} diff --git a/crates/bevy_mod_scripting_functions/src/bevy/bevy_reflect.rs b/crates/bevy_mod_scripting_functions/src/bevy/bevy_reflect.rs new file mode 100644 index 0000000000..0f8da2a073 --- /dev/null +++ b/crates/bevy_mod_scripting_functions/src/bevy/bevy_reflect.rs @@ -0,0 +1,17248 @@ +// @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::{ + AddContextInitializer, StoreDocumentation, bindings::ReflectReference, +}; +use bevy_mod_scripting_functions::RegisterScriptFunction; +use crate::*; +pub struct BevyReflectScriptingPlugin; +impl bevy::app::Plugin for BevyReflectScriptingPlugin { + fn build(&self, app: &mut bevy::prelude::App) { + let mut world = app.world_mut(); + NamespaceBuilder::::new(world) + .overwrite_script_function( + "new", + |v: bool| { + let output: Val = AtomicBool::new(v) + .into(); + output + }, + ) + .overwrite_script_function( + "into_inner", + |_self: Val| { + let output: bool = AtomicBool::into_inner(_self).into(); + output + }, + ); + NamespaceBuilder::::new(world) + .overwrite_script_function( + "new", + |v: i16| { + let output: Val = AtomicI16::new(v) + .into(); + output + }, + ) + .overwrite_script_function( + "into_inner", + |_self: Val| { + let output: i16 = AtomicI16::into_inner(_self).into(); + output + }, + ); + NamespaceBuilder::::new(world) + .overwrite_script_function( + "new", + |v: i32| { + let output: Val = AtomicI32::new(v) + .into(); + output + }, + ) + .overwrite_script_function( + "into_inner", + |_self: Val| { + let output: i32 = AtomicI32::into_inner(_self).into(); + output + }, + ); + NamespaceBuilder::::new(world) + .overwrite_script_function( + "new", + |v: i64| { + let output: Val = AtomicI64::new(v) + .into(); + output + }, + ) + .overwrite_script_function( + "into_inner", + |_self: Val| { + let output: i64 = AtomicI64::into_inner(_self).into(); + output + }, + ); + NamespaceBuilder::::new(world) + .overwrite_script_function( + "new", + |v: i8| { + let output: Val = AtomicI8::new(v) + .into(); + output + }, + ) + .overwrite_script_function( + "into_inner", + |_self: Val| { + let output: i8 = AtomicI8::into_inner(_self).into(); + output + }, + ); + NamespaceBuilder::::new(world) + .overwrite_script_function( + "new", + |v: isize| { + let output: Val = AtomicIsize::new(v) + .into(); + output + }, + ) + .overwrite_script_function( + "into_inner", + |_self: Val| { + let output: isize = AtomicIsize::into_inner(_self).into(); + output + }, + ); + NamespaceBuilder::::new(world) + .overwrite_script_function( + "new", + |v: u16| { + let output: Val = AtomicU16::new(v) + .into(); + output + }, + ) + .overwrite_script_function( + "into_inner", + |_self: Val| { + let output: u16 = AtomicU16::into_inner(_self).into(); + output + }, + ); + NamespaceBuilder::::new(world) + .overwrite_script_function( + "new", + |v: u32| { + let output: Val = AtomicU32::new(v) + .into(); + output + }, + ) + .overwrite_script_function( + "into_inner", + |_self: Val| { + let output: u32 = AtomicU32::into_inner(_self).into(); + output + }, + ); + NamespaceBuilder::::new(world) + .overwrite_script_function( + "new", + |v: u64| { + let output: Val = AtomicU64::new(v) + .into(); + output + }, + ) + .overwrite_script_function( + "into_inner", + |_self: Val| { + let output: u64 = AtomicU64::into_inner(_self).into(); + output + }, + ); + NamespaceBuilder::::new(world) + .overwrite_script_function( + "new", + |v: u8| { + let output: Val = AtomicU8::new(v) + .into(); + output + }, + ) + .overwrite_script_function( + "into_inner", + |_self: Val| { + let output: u8 = AtomicU8::into_inner(_self).into(); + output + }, + ); + NamespaceBuilder::::new(world) + .overwrite_script_function( + "new", + |v: usize| { + let output: Val = AtomicUsize::new(v) + .into(); + output + }, + ) + .overwrite_script_function( + "into_inner", + |_self: Val| { + let output: usize = AtomicUsize::into_inner(_self).into(); + output + }, + ); + NamespaceBuilder::::new(world) + .overwrite_script_function( + "mul", + |_self: Val, rhs: u32| { + let output: Val = Duration::mul(_self, rhs) + .into(); + output + }, + ) + .overwrite_script_function( + "assert_receiver_is_total_eq", + |_self: Ref| { + let output: () = Duration::assert_receiver_is_total_eq(_self).into(); + output + }, + ) + .overwrite_script_function( + "clone", + |_self: Ref| { + let output: Val = Duration::clone(_self) + .into(); + output + }, + ) + .overwrite_script_function( + "sub", + |_self: Val, rhs: Val| { + let output: Val = Duration::sub(_self, rhs) + .into(); + output + }, + ) + .overwrite_script_function( + "add", + |_self: Val, rhs: Val| { + let output: Val = Duration::add(_self, rhs) + .into(); + output + }, + ) + .overwrite_script_function( + "eq", + |_self: Ref, other: Ref| { + let output: bool = Duration::eq(_self, other).into(); + output + }, + ) + .overwrite_script_function( + "div", + |_self: Val, rhs: u32| { + let output: Val = Duration::div(_self, rhs) + .into(); + output + }, + ) + .overwrite_script_function( + "new", + |secs: u64, nanos: u32| { + let output: Val = Duration::new(secs, nanos) + .into(); + output + }, + ) + .overwrite_script_function( + "from_secs", + |secs: u64| { + let output: Val = Duration::from_secs(secs) + .into(); + output + }, + ) + .overwrite_script_function( + "from_millis", + |millis: u64| { + let output: Val = Duration::from_millis( + millis, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "from_micros", + |micros: u64| { + let output: Val = Duration::from_micros( + micros, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "from_nanos", + |nanos: u64| { + let output: Val = Duration::from_nanos(nanos) + .into(); + output + }, + ) + .overwrite_script_function( + "is_zero", + |_self: Ref| { + let output: bool = Duration::is_zero(_self).into(); + output + }, + ) + .overwrite_script_function( + "as_secs", + |_self: Ref| { + let output: u64 = Duration::as_secs(_self).into(); + output + }, + ) + .overwrite_script_function( + "subsec_millis", + |_self: Ref| { + let output: u32 = Duration::subsec_millis(_self).into(); + output + }, + ) + .overwrite_script_function( + "subsec_micros", + |_self: Ref| { + let output: u32 = Duration::subsec_micros(_self).into(); + output + }, + ) + .overwrite_script_function( + "subsec_nanos", + |_self: Ref| { + let output: u32 = Duration::subsec_nanos(_self).into(); + output + }, + ) + .overwrite_script_function( + "as_millis", + |_self: Ref| { + let output: u128 = Duration::as_millis(_self).into(); + output + }, + ) + .overwrite_script_function( + "as_micros", + |_self: Ref| { + let output: u128 = Duration::as_micros(_self).into(); + output + }, + ) + .overwrite_script_function( + "as_nanos", + |_self: Ref| { + let output: u128 = Duration::as_nanos(_self).into(); + output + }, + ) + .overwrite_script_function( + "abs_diff", + |_self: Val, other: Val| { + let output: Val = Duration::abs_diff( + _self, + other, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "saturating_add", + |_self: Val, rhs: Val| { + let output: Val = Duration::saturating_add( + _self, + rhs, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "saturating_sub", + |_self: Val, rhs: Val| { + let output: Val = Duration::saturating_sub( + _self, + rhs, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "saturating_mul", + |_self: Val, rhs: u32| { + let output: Val = Duration::saturating_mul( + _self, + rhs, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "as_secs_f64", + |_self: Ref| { + let output: f64 = Duration::as_secs_f64(_self).into(); + output + }, + ) + .overwrite_script_function( + "as_secs_f32", + |_self: Ref| { + let output: f32 = Duration::as_secs_f32(_self).into(); + output + }, + ) + .overwrite_script_function( + "from_secs_f64", + |secs: f64| { + let output: Val = Duration::from_secs_f64( + secs, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "from_secs_f32", + |secs: f32| { + let output: Val = Duration::from_secs_f32( + secs, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "mul_f64", + |_self: Val, rhs: f64| { + let output: Val = Duration::mul_f64( + _self, + rhs, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "mul_f32", + |_self: Val, rhs: f32| { + let output: Val = Duration::mul_f32( + _self, + rhs, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "div_f64", + |_self: Val, rhs: f64| { + let output: Val = Duration::div_f64( + _self, + rhs, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "div_f32", + |_self: Val, rhs: f32| { + let output: Val = Duration::div_f32( + _self, + rhs, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "div_duration_f64", + |_self: Val, rhs: Val| { + let output: f64 = Duration::div_duration_f64(_self, rhs).into(); + output + }, + ) + .overwrite_script_function( + "div_duration_f32", + |_self: Val, rhs: Val| { + let output: f32 = Duration::div_duration_f32(_self, rhs).into(); + output + }, + ); + NamespaceBuilder::::new(world) + .overwrite_script_function( + "assert_receiver_is_total_eq", + |_self: Ref| { + let output: () = Instant::assert_receiver_is_total_eq(_self).into(); + output + }, + ) + .overwrite_script_function( + "eq", + |_self: Ref, other: Ref| { + let output: bool = Instant::eq(_self, other).into(); + output + }, + ) + .overwrite_script_function( + "sub", + |_self: Val, other: Val| { + let output: Val = Instant::sub(_self, other) + .into(); + output + }, + ) + .overwrite_script_function( + "sub", + |_self: Val, other: Val| { + let output: Val = Instant::sub(_self, other) + .into(); + output + }, + ) + .overwrite_script_function( + "now", + || { + let output: Val = Instant::now().into(); + output + }, + ) + .overwrite_script_function( + "duration_since", + |_self: Ref, earlier: Val| { + let output: Val = Instant::duration_since( + _self, + earlier, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "saturating_duration_since", + |_self: Ref, earlier: Val| { + let output: Val = Instant::saturating_duration_since( + _self, + earlier, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "elapsed", + |_self: Ref| { + let output: Val = Instant::elapsed(_self) + .into(); + output + }, + ) + .overwrite_script_function( + "clone", + |_self: Ref| { + let output: Val = Instant::clone(_self).into(); + output + }, + ) + .overwrite_script_function( + "add", + |_self: Val, other: Val| { + let output: Val = Instant::add(_self, other) + .into(); + output + }, + ); + NamespaceBuilder::::new(world) + .overwrite_script_function( + "clone", + |_self: Ref| { + let output: Val = RangeFull::clone(_self) + .into(); + output + }, + ) + .overwrite_script_function( + "assert_receiver_is_total_eq", + |_self: Ref| { + let output: () = RangeFull::assert_receiver_is_total_eq(_self) + .into(); + output + }, + ) + .overwrite_script_function( + "eq", + |_self: Ref, other: Ref| { + let output: bool = RangeFull::eq(_self, other).into(); + output + }, + ); + NamespaceBuilder::::new(world) + .overwrite_script_function( + "mul", + |_self: Val, rhs: f32| { + let output: Val = Quat::mul(_self, rhs).into(); + output + }, + ) + .overwrite_script_function( + "sub", + |_self: Val, rhs: Val| { + let output: Val = Quat::sub(_self, rhs).into(); + output + }, + ) + .overwrite_script_function( + "neg", + |_self: Val| { + let output: Val = Quat::neg(_self).into(); + output + }, + ) + .overwrite_script_function( + "mul", + |_self: Val, rhs: Val| { + let output: Val = Quat::mul(_self, rhs).into(); + output + }, + ) + .overwrite_script_function( + "clone", + |_self: Ref| { + let output: Val = Quat::clone(_self).into(); + output + }, + ) + .overwrite_script_function( + "from_xyzw", + |x: f32, y: f32, z: f32, w: f32| { + let output: Val = Quat::from_xyzw(x, y, z, w) + .into(); + output + }, + ) + .overwrite_script_function( + "from_array", + |a: [f32; 4]| { + let output: Val = Quat::from_array(a).into(); + output + }, + ) + .overwrite_script_function( + "from_vec4", + |v: Val| { + let output: Val = Quat::from_vec4(v).into(); + output + }, + ) + .overwrite_script_function( + "from_axis_angle", + |axis: Val, angle: f32| { + let output: Val = Quat::from_axis_angle( + axis, + angle, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "from_scaled_axis", + |v: Val| { + let output: Val = Quat::from_scaled_axis(v).into(); + output + }, + ) + .overwrite_script_function( + "from_rotation_x", + |angle: f32| { + let output: Val = Quat::from_rotation_x(angle) + .into(); + output + }, + ) + .overwrite_script_function( + "from_rotation_y", + |angle: f32| { + let output: Val = Quat::from_rotation_y(angle) + .into(); + output + }, + ) + .overwrite_script_function( + "from_rotation_z", + |angle: f32| { + let output: Val = Quat::from_rotation_z(angle) + .into(); + output + }, + ) + .overwrite_script_function( + "from_euler", + |euler: Val, a: f32, b: f32, c: f32| { + let output: Val = Quat::from_euler(euler, a, b, c) + .into(); + output + }, + ) + .overwrite_script_function( + "from_mat3", + |mat: Ref| { + let output: Val = Quat::from_mat3(mat).into(); + output + }, + ) + .overwrite_script_function( + "from_mat3a", + |mat: Ref| { + let output: Val = Quat::from_mat3a(mat).into(); + output + }, + ) + .overwrite_script_function( + "from_mat4", + |mat: Ref| { + let output: Val = Quat::from_mat4(mat).into(); + output + }, + ) + .overwrite_script_function( + "from_rotation_arc", + |from: Val, to: Val| { + let output: Val = Quat::from_rotation_arc(from, to) + .into(); + output + }, + ) + .overwrite_script_function( + "from_rotation_arc_colinear", + |from: Val, to: Val| { + let output: Val = Quat::from_rotation_arc_colinear( + from, + to, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "from_rotation_arc_2d", + |from: Val, to: Val| { + let output: Val = Quat::from_rotation_arc_2d( + from, + to, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "to_scaled_axis", + |_self: Val| { + let output: Val = Quat::to_scaled_axis(_self) + .into(); + output + }, + ) + .overwrite_script_function( + "to_euler", + |_self: Val, order: Val| { + let output: (f32, f32, f32) = Quat::to_euler(_self, order).into(); + output + }, + ) + .overwrite_script_function( + "to_array", + |_self: Ref| { + let output: [f32; 4] = Quat::to_array(_self).into(); + output + }, + ) + .overwrite_script_function( + "xyz", + |_self: Val| { + let output: Val = Quat::xyz(_self).into(); + output + }, + ) + .overwrite_script_function( + "conjugate", + |_self: Val| { + let output: Val = Quat::conjugate(_self).into(); + output + }, + ) + .overwrite_script_function( + "inverse", + |_self: Val| { + let output: Val = Quat::inverse(_self).into(); + output + }, + ) + .overwrite_script_function( + "dot", + |_self: Val, rhs: Val| { + let output: f32 = Quat::dot(_self, rhs).into(); + output + }, + ) + .overwrite_script_function( + "length", + |_self: Val| { + let output: f32 = Quat::length(_self).into(); + output + }, + ) + .overwrite_script_function( + "length_squared", + |_self: Val| { + let output: f32 = Quat::length_squared(_self).into(); + output + }, + ) + .overwrite_script_function( + "length_recip", + |_self: Val| { + let output: f32 = Quat::length_recip(_self).into(); + output + }, + ) + .overwrite_script_function( + "normalize", + |_self: Val| { + let output: Val = Quat::normalize(_self).into(); + output + }, + ) + .overwrite_script_function( + "is_finite", + |_self: Val| { + let output: bool = Quat::is_finite(_self).into(); + output + }, + ) + .overwrite_script_function( + "is_nan", + |_self: Val| { + let output: bool = Quat::is_nan(_self).into(); + output + }, + ) + .overwrite_script_function( + "is_normalized", + |_self: Val| { + let output: bool = Quat::is_normalized(_self).into(); + output + }, + ) + .overwrite_script_function( + "is_near_identity", + |_self: Val| { + let output: bool = Quat::is_near_identity(_self).into(); + output + }, + ) + .overwrite_script_function( + "angle_between", + |_self: Val, rhs: Val| { + let output: f32 = Quat::angle_between(_self, rhs).into(); + output + }, + ) + .overwrite_script_function( + "rotate_towards", + | + _self: Ref, + rhs: Val, + max_angle: f32| + { + let output: Val = Quat::rotate_towards( + _self, + rhs, + max_angle, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "abs_diff_eq", + | + _self: Val, + rhs: Val, + max_abs_diff: f32| + { + let output: bool = Quat::abs_diff_eq(_self, rhs, max_abs_diff) + .into(); + output + }, + ) + .overwrite_script_function( + "lerp", + |_self: Val, end: Val, s: f32| { + let output: Val = Quat::lerp(_self, end, s).into(); + output + }, + ) + .overwrite_script_function( + "slerp", + |_self: Val, end: Val, s: f32| { + let output: Val = Quat::slerp(_self, end, s) + .into(); + output + }, + ) + .overwrite_script_function( + "mul_vec3", + |_self: Val, rhs: Val| { + let output: Val = Quat::mul_vec3(_self, rhs) + .into(); + output + }, + ) + .overwrite_script_function( + "mul_quat", + |_self: Val, rhs: Val| { + let output: Val = Quat::mul_quat(_self, rhs) + .into(); + output + }, + ) + .overwrite_script_function( + "from_affine3", + |a: Ref| { + let output: Val = Quat::from_affine3(a).into(); + output + }, + ) + .overwrite_script_function( + "mul_vec3a", + |_self: Val, rhs: Val| { + let output: Val = Quat::mul_vec3a(_self, rhs) + .into(); + output + }, + ) + .overwrite_script_function( + "as_dquat", + |_self: Val| { + let output: Val = Quat::as_dquat(_self).into(); + output + }, + ) + .overwrite_script_function( + "eq", + |_self: Ref, rhs: Ref| { + let output: bool = Quat::eq(_self, rhs).into(); + output + }, + ) + .overwrite_script_function( + "mul", + |_self: Val, rhs: Val| { + let output: Val = Quat::mul(_self, rhs).into(); + output + }, + ) + .overwrite_script_function( + "mul", + |_self: Val, rhs: Val| { + let output: Val = Quat::mul(_self, rhs).into(); + output + }, + ) + .overwrite_script_function( + "div", + |_self: Val, rhs: f32| { + let output: Val = Quat::div(_self, rhs).into(); + output + }, + ) + .overwrite_script_function( + "add", + |_self: Val, rhs: Val| { + let output: Val = Quat::add(_self, rhs).into(); + output + }, + ); + NamespaceBuilder::::new(world) + .overwrite_script_function( + "mul", + |_self: Val, rhs: Ref| { + let output: Val = Vec3::mul(_self, rhs).into(); + output + }, + ) + .overwrite_script_function( + "div", + |_self: Val, rhs: Ref| { + let output: Val = Vec3::div(_self, rhs).into(); + output + }, + ) + .overwrite_script_function( + "mul", + |_self: Val, rhs: Val| { + let output: Val = Vec3::mul(_self, rhs).into(); + output + }, + ) + .overwrite_script_function( + "add", + |_self: Val, rhs: Val| { + let output: Val = Vec3::add(_self, rhs).into(); + output + }, + ) + .overwrite_script_function( + "clone", + |_self: Ref| { + let output: Val = Vec3::clone(_self).into(); + output + }, + ) + .overwrite_script_function( + "sub", + |_self: Val, rhs: f32| { + let output: Val = Vec3::sub(_self, rhs).into(); + output + }, + ) + .overwrite_script_function( + "rem", + |_self: Val, rhs: Val| { + let output: Val = Vec3::rem(_self, rhs).into(); + output + }, + ) + .overwrite_script_function( + "neg", + |_self: Val| { + let output: Val = Vec3::neg(_self).into(); + output + }, + ) + .overwrite_script_function( + "mul", + |_self: Val, rhs: f32| { + let output: Val = Vec3::mul(_self, rhs).into(); + output + }, + ) + .overwrite_script_function( + "sub", + |_self: Val, rhs: Ref| { + let output: Val = Vec3::sub(_self, rhs).into(); + output + }, + ) + .overwrite_script_function( + "div", + |_self: Val, rhs: Val| { + let output: Val = Vec3::div(_self, rhs).into(); + output + }, + ) + .overwrite_script_function( + "add", + |_self: Val, rhs: Ref| { + let output: Val = Vec3::add(_self, rhs).into(); + output + }, + ) + .overwrite_script_function( + "rem", + |_self: Val, rhs: Ref| { + let output: Val = Vec3::rem(_self, rhs).into(); + output + }, + ) + .overwrite_script_function( + "rem", + |_self: Val, rhs: f32| { + let output: Val = Vec3::rem(_self, rhs).into(); + output + }, + ) + .overwrite_script_function( + "div", + |_self: Val, rhs: f32| { + let output: Val = Vec3::div(_self, rhs).into(); + output + }, + ) + .overwrite_script_function( + "new", + |x: f32, y: f32, z: f32| { + let output: Val = Vec3::new(x, y, z).into(); + output + }, + ) + .overwrite_script_function( + "splat", + |v: f32| { + let output: Val = Vec3::splat(v).into(); + output + }, + ) + .overwrite_script_function( + "select", + | + mask: Val, + if_true: Val, + if_false: Val| + { + let output: Val = Vec3::select( + mask, + if_true, + if_false, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "from_array", + |a: [f32; 3]| { + let output: Val = Vec3::from_array(a).into(); + output + }, + ) + .overwrite_script_function( + "to_array", + |_self: Ref| { + let output: [f32; 3] = Vec3::to_array(_self).into(); + output + }, + ) + .overwrite_script_function( + "extend", + |_self: Val, w: f32| { + let output: Val = Vec3::extend(_self, w).into(); + output + }, + ) + .overwrite_script_function( + "truncate", + |_self: Val| { + let output: Val = Vec3::truncate(_self).into(); + output + }, + ) + .overwrite_script_function( + "with_x", + |_self: Val, x: f32| { + let output: Val = Vec3::with_x(_self, x).into(); + output + }, + ) + .overwrite_script_function( + "with_y", + |_self: Val, y: f32| { + let output: Val = Vec3::with_y(_self, y).into(); + output + }, + ) + .overwrite_script_function( + "with_z", + |_self: Val, z: f32| { + let output: Val = Vec3::with_z(_self, z).into(); + output + }, + ) + .overwrite_script_function( + "dot", + |_self: Val, rhs: Val| { + let output: f32 = Vec3::dot(_self, rhs).into(); + output + }, + ) + .overwrite_script_function( + "dot_into_vec", + |_self: Val, rhs: Val| { + let output: Val = Vec3::dot_into_vec(_self, rhs) + .into(); + output + }, + ) + .overwrite_script_function( + "cross", + |_self: Val, rhs: Val| { + let output: Val = Vec3::cross(_self, rhs).into(); + output + }, + ) + .overwrite_script_function( + "min", + |_self: Val, rhs: Val| { + let output: Val = Vec3::min(_self, rhs).into(); + output + }, + ) + .overwrite_script_function( + "max", + |_self: Val, rhs: Val| { + let output: Val = Vec3::max(_self, rhs).into(); + output + }, + ) + .overwrite_script_function( + "clamp", + | + _self: Val, + min: Val, + max: Val| + { + let output: Val = Vec3::clamp(_self, min, max) + .into(); + output + }, + ) + .overwrite_script_function( + "min_element", + |_self: Val| { + let output: f32 = Vec3::min_element(_self).into(); + output + }, + ) + .overwrite_script_function( + "max_element", + |_self: Val| { + let output: f32 = Vec3::max_element(_self).into(); + output + }, + ) + .overwrite_script_function( + "element_sum", + |_self: Val| { + let output: f32 = Vec3::element_sum(_self).into(); + output + }, + ) + .overwrite_script_function( + "element_product", + |_self: Val| { + let output: f32 = Vec3::element_product(_self).into(); + output + }, + ) + .overwrite_script_function( + "cmpeq", + |_self: Val, rhs: Val| { + let output: Val = Vec3::cmpeq(_self, rhs).into(); + output + }, + ) + .overwrite_script_function( + "cmpne", + |_self: Val, rhs: Val| { + let output: Val = Vec3::cmpne(_self, rhs).into(); + output + }, + ) + .overwrite_script_function( + "cmpge", + |_self: Val, rhs: Val| { + let output: Val = Vec3::cmpge(_self, rhs).into(); + output + }, + ) + .overwrite_script_function( + "cmpgt", + |_self: Val, rhs: Val| { + let output: Val = Vec3::cmpgt(_self, rhs).into(); + output + }, + ) + .overwrite_script_function( + "cmple", + |_self: Val, rhs: Val| { + let output: Val = Vec3::cmple(_self, rhs).into(); + output + }, + ) + .overwrite_script_function( + "cmplt", + |_self: Val, rhs: Val| { + let output: Val = Vec3::cmplt(_self, rhs).into(); + output + }, + ) + .overwrite_script_function( + "abs", + |_self: Val| { + let output: Val = Vec3::abs(_self).into(); + output + }, + ) + .overwrite_script_function( + "signum", + |_self: Val| { + let output: Val = Vec3::signum(_self).into(); + output + }, + ) + .overwrite_script_function( + "copysign", + |_self: Val, rhs: Val| { + let output: Val = Vec3::copysign(_self, rhs) + .into(); + output + }, + ) + .overwrite_script_function( + "is_negative_bitmask", + |_self: Val| { + let output: u32 = Vec3::is_negative_bitmask(_self).into(); + output + }, + ) + .overwrite_script_function( + "is_finite", + |_self: Val| { + let output: bool = Vec3::is_finite(_self).into(); + output + }, + ) + .overwrite_script_function( + "is_finite_mask", + |_self: Val| { + let output: Val = Vec3::is_finite_mask(_self) + .into(); + output + }, + ) + .overwrite_script_function( + "is_nan", + |_self: Val| { + let output: bool = Vec3::is_nan(_self).into(); + output + }, + ) + .overwrite_script_function( + "is_nan_mask", + |_self: Val| { + let output: Val = Vec3::is_nan_mask(_self).into(); + output + }, + ) + .overwrite_script_function( + "length", + |_self: Val| { + let output: f32 = Vec3::length(_self).into(); + output + }, + ) + .overwrite_script_function( + "length_squared", + |_self: Val| { + let output: f32 = Vec3::length_squared(_self).into(); + output + }, + ) + .overwrite_script_function( + "length_recip", + |_self: Val| { + let output: f32 = Vec3::length_recip(_self).into(); + output + }, + ) + .overwrite_script_function( + "distance", + |_self: Val, rhs: Val| { + let output: f32 = Vec3::distance(_self, rhs).into(); + output + }, + ) + .overwrite_script_function( + "distance_squared", + |_self: Val, rhs: Val| { + let output: f32 = Vec3::distance_squared(_self, rhs).into(); + output + }, + ) + .overwrite_script_function( + "div_euclid", + |_self: Val, rhs: Val| { + let output: Val = Vec3::div_euclid(_self, rhs) + .into(); + output + }, + ) + .overwrite_script_function( + "rem_euclid", + |_self: Val, rhs: Val| { + let output: Val = Vec3::rem_euclid(_self, rhs) + .into(); + output + }, + ) + .overwrite_script_function( + "normalize", + |_self: Val| { + let output: Val = Vec3::normalize(_self).into(); + output + }, + ) + .overwrite_script_function( + "normalize_or", + |_self: Val, fallback: Val| { + let output: Val = Vec3::normalize_or( + _self, + fallback, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "normalize_or_zero", + |_self: Val| { + let output: Val = Vec3::normalize_or_zero(_self) + .into(); + output + }, + ) + .overwrite_script_function( + "is_normalized", + |_self: Val| { + let output: bool = Vec3::is_normalized(_self).into(); + output + }, + ) + .overwrite_script_function( + "project_onto", + |_self: Val, rhs: Val| { + let output: Val = Vec3::project_onto(_self, rhs) + .into(); + output + }, + ) + .overwrite_script_function( + "reject_from", + |_self: Val, rhs: Val| { + let output: Val = Vec3::reject_from(_self, rhs) + .into(); + output + }, + ) + .overwrite_script_function( + "project_onto_normalized", + |_self: Val, rhs: Val| { + let output: Val = Vec3::project_onto_normalized( + _self, + rhs, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "reject_from_normalized", + |_self: Val, rhs: Val| { + let output: Val = Vec3::reject_from_normalized( + _self, + rhs, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "round", + |_self: Val| { + let output: Val = Vec3::round(_self).into(); + output + }, + ) + .overwrite_script_function( + "floor", + |_self: Val| { + let output: Val = Vec3::floor(_self).into(); + output + }, + ) + .overwrite_script_function( + "ceil", + |_self: Val| { + let output: Val = Vec3::ceil(_self).into(); + output + }, + ) + .overwrite_script_function( + "trunc", + |_self: Val| { + let output: Val = Vec3::trunc(_self).into(); + output + }, + ) + .overwrite_script_function( + "fract", + |_self: Val| { + let output: Val = Vec3::fract(_self).into(); + output + }, + ) + .overwrite_script_function( + "fract_gl", + |_self: Val| { + let output: Val = Vec3::fract_gl(_self).into(); + output + }, + ) + .overwrite_script_function( + "exp", + |_self: Val| { + let output: Val = Vec3::exp(_self).into(); + output + }, + ) + .overwrite_script_function( + "powf", + |_self: Val, n: f32| { + let output: Val = Vec3::powf(_self, n).into(); + output + }, + ) + .overwrite_script_function( + "recip", + |_self: Val| { + let output: Val = Vec3::recip(_self).into(); + output + }, + ) + .overwrite_script_function( + "lerp", + |_self: Val, rhs: Val, s: f32| { + let output: Val = Vec3::lerp(_self, rhs, s).into(); + output + }, + ) + .overwrite_script_function( + "move_towards", + |_self: Ref, rhs: Val, d: f32| { + let output: Val = Vec3::move_towards(_self, rhs, d) + .into(); + output + }, + ) + .overwrite_script_function( + "midpoint", + |_self: Val, rhs: Val| { + let output: Val = Vec3::midpoint(_self, rhs) + .into(); + output + }, + ) + .overwrite_script_function( + "abs_diff_eq", + | + _self: Val, + rhs: Val, + max_abs_diff: f32| + { + let output: bool = Vec3::abs_diff_eq(_self, rhs, max_abs_diff) + .into(); + output + }, + ) + .overwrite_script_function( + "clamp_length", + |_self: Val, min: f32, max: f32| { + let output: Val = Vec3::clamp_length( + _self, + min, + max, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "clamp_length_max", + |_self: Val, max: f32| { + let output: Val = Vec3::clamp_length_max( + _self, + max, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "clamp_length_min", + |_self: Val, min: f32| { + let output: Val = Vec3::clamp_length_min( + _self, + min, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "mul_add", + | + _self: Val, + a: Val, + b: Val| + { + let output: Val = Vec3::mul_add(_self, a, b) + .into(); + output + }, + ) + .overwrite_script_function( + "reflect", + |_self: Val, normal: Val| { + let output: Val = Vec3::reflect(_self, normal) + .into(); + output + }, + ) + .overwrite_script_function( + "refract", + |_self: Val, normal: Val, eta: f32| { + let output: Val = Vec3::refract(_self, normal, eta) + .into(); + output + }, + ) + .overwrite_script_function( + "angle_between", + |_self: Val, rhs: Val| { + let output: f32 = Vec3::angle_between(_self, rhs).into(); + output + }, + ) + .overwrite_script_function( + "any_orthogonal_vector", + |_self: Ref| { + let output: Val = Vec3::any_orthogonal_vector( + _self, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "any_orthonormal_vector", + |_self: Ref| { + let output: Val = Vec3::any_orthonormal_vector( + _self, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "as_dvec3", + |_self: Ref| { + let output: Val = Vec3::as_dvec3(_self).into(); + output + }, + ) + .overwrite_script_function( + "as_ivec3", + |_self: Ref| { + let output: Val = Vec3::as_ivec3(_self).into(); + output + }, + ) + .overwrite_script_function( + "as_uvec3", + |_self: Ref| { + let output: Val = Vec3::as_uvec3(_self).into(); + output + }, + ) + .overwrite_script_function( + "as_i64vec3", + |_self: Ref| { + let output: Val = Vec3::as_i64vec3(_self) + .into(); + output + }, + ) + .overwrite_script_function( + "as_u64vec3", + |_self: Ref| { + let output: Val = Vec3::as_u64vec3(_self) + .into(); + output + }, + ) + .overwrite_script_function( + "eq", + |_self: Ref, other: Ref| { + let output: bool = Vec3::eq(_self, other).into(); + output + }, + ) + .overwrite_script_function( + "add", + |_self: Val, rhs: f32| { + let output: Val = Vec3::add(_self, rhs).into(); + output + }, + ) + .overwrite_script_function( + "sub", + |_self: Val, rhs: Val| { + let output: Val = Vec3::sub(_self, rhs).into(); + output + }, + ); + NamespaceBuilder::::new(world) + .overwrite_script_function( + "sub", + |_self: Val, rhs: Ref| { + let output: Val = IVec2::sub(_self, rhs).into(); + output + }, + ) + .overwrite_script_function( + "add", + |_self: Val, rhs: Ref| { + let output: Val = IVec2::add(_self, rhs).into(); + output + }, + ) + .overwrite_script_function( + "sub", + |_self: Val, rhs: Val| { + let output: Val = IVec2::sub(_self, rhs).into(); + output + }, + ) + .overwrite_script_function( + "add", + |_self: Val, rhs: i32| { + let output: Val = IVec2::add(_self, rhs).into(); + output + }, + ) + .overwrite_script_function( + "rem", + |_self: Val, rhs: Val| { + let output: Val = IVec2::rem(_self, rhs).into(); + output + }, + ) + .overwrite_script_function( + "mul", + |_self: Val, rhs: Ref| { + let output: Val = IVec2::mul(_self, rhs).into(); + output + }, + ) + .overwrite_script_function( + "rem", + |_self: Val, rhs: i32| { + let output: Val = IVec2::rem(_self, rhs).into(); + output + }, + ) + .overwrite_script_function( + "mul", + |_self: Val, rhs: Val| { + let output: Val = IVec2::mul(_self, rhs).into(); + output + }, + ) + .overwrite_script_function( + "rem", + |_self: Val, rhs: Ref| { + let output: Val = IVec2::rem(_self, rhs).into(); + output + }, + ) + .overwrite_script_function( + "div", + |_self: Val, rhs: Val| { + let output: Val = IVec2::div(_self, rhs).into(); + output + }, + ) + .overwrite_script_function( + "assert_receiver_is_total_eq", + |_self: Ref| { + let output: () = IVec2::assert_receiver_is_total_eq(_self).into(); + output + }, + ) + .overwrite_script_function( + "mul", + |_self: Val, rhs: i32| { + let output: Val = IVec2::mul(_self, rhs).into(); + output + }, + ) + .overwrite_script_function( + "add", + |_self: Val, rhs: Val| { + let output: Val = IVec2::add(_self, rhs).into(); + output + }, + ) + .overwrite_script_function( + "div", + |_self: Val, rhs: Ref| { + let output: Val = IVec2::div(_self, rhs).into(); + output + }, + ) + .overwrite_script_function( + "eq", + |_self: Ref, other: Ref| { + let output: bool = IVec2::eq(_self, other).into(); + output + }, + ) + .overwrite_script_function( + "div", + |_self: Val, rhs: i32| { + let output: Val = IVec2::div(_self, rhs).into(); + output + }, + ) + .overwrite_script_function( + "sub", + |_self: Val, rhs: i32| { + let output: Val = IVec2::sub(_self, rhs).into(); + output + }, + ) + .overwrite_script_function( + "new", + |x: i32, y: i32| { + let output: Val = IVec2::new(x, y).into(); + output + }, + ) + .overwrite_script_function( + "splat", + |v: i32| { + let output: Val = IVec2::splat(v).into(); + output + }, + ) + .overwrite_script_function( + "select", + | + mask: Val, + if_true: Val, + if_false: Val| + { + let output: Val = IVec2::select( + mask, + if_true, + if_false, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "from_array", + |a: [i32; 2]| { + let output: Val = IVec2::from_array(a).into(); + output + }, + ) + .overwrite_script_function( + "to_array", + |_self: Ref| { + let output: [i32; 2] = IVec2::to_array(_self).into(); + output + }, + ) + .overwrite_script_function( + "extend", + |_self: Val, z: i32| { + let output: Val = IVec2::extend(_self, z).into(); + output + }, + ) + .overwrite_script_function( + "with_x", + |_self: Val, x: i32| { + let output: Val = IVec2::with_x(_self, x).into(); + output + }, + ) + .overwrite_script_function( + "with_y", + |_self: Val, y: i32| { + let output: Val = IVec2::with_y(_self, y).into(); + output + }, + ) + .overwrite_script_function( + "dot", + |_self: Val, rhs: Val| { + let output: i32 = IVec2::dot(_self, rhs).into(); + output + }, + ) + .overwrite_script_function( + "dot_into_vec", + |_self: Val, rhs: Val| { + let output: Val = IVec2::dot_into_vec(_self, rhs) + .into(); + output + }, + ) + .overwrite_script_function( + "min", + |_self: Val, rhs: Val| { + let output: Val = IVec2::min(_self, rhs).into(); + output + }, + ) + .overwrite_script_function( + "max", + |_self: Val, rhs: Val| { + let output: Val = IVec2::max(_self, rhs).into(); + output + }, + ) + .overwrite_script_function( + "clamp", + | + _self: Val, + min: Val, + max: Val| + { + let output: Val = IVec2::clamp(_self, min, max) + .into(); + output + }, + ) + .overwrite_script_function( + "min_element", + |_self: Val| { + let output: i32 = IVec2::min_element(_self).into(); + output + }, + ) + .overwrite_script_function( + "max_element", + |_self: Val| { + let output: i32 = IVec2::max_element(_self).into(); + output + }, + ) + .overwrite_script_function( + "element_sum", + |_self: Val| { + let output: i32 = IVec2::element_sum(_self).into(); + output + }, + ) + .overwrite_script_function( + "element_product", + |_self: Val| { + let output: i32 = IVec2::element_product(_self).into(); + output + }, + ) + .overwrite_script_function( + "cmpeq", + |_self: Val, rhs: Val| { + let output: Val = IVec2::cmpeq(_self, rhs).into(); + output + }, + ) + .overwrite_script_function( + "cmpne", + |_self: Val, rhs: Val| { + let output: Val = IVec2::cmpne(_self, rhs).into(); + output + }, + ) + .overwrite_script_function( + "cmpge", + |_self: Val, rhs: Val| { + let output: Val = IVec2::cmpge(_self, rhs).into(); + output + }, + ) + .overwrite_script_function( + "cmpgt", + |_self: Val, rhs: Val| { + let output: Val = IVec2::cmpgt(_self, rhs).into(); + output + }, + ) + .overwrite_script_function( + "cmple", + |_self: Val, rhs: Val| { + let output: Val = IVec2::cmple(_self, rhs).into(); + output + }, + ) + .overwrite_script_function( + "cmplt", + |_self: Val, rhs: Val| { + let output: Val = IVec2::cmplt(_self, rhs).into(); + output + }, + ) + .overwrite_script_function( + "abs", + |_self: Val| { + let output: Val = IVec2::abs(_self).into(); + output + }, + ) + .overwrite_script_function( + "signum", + |_self: Val| { + let output: Val = IVec2::signum(_self).into(); + output + }, + ) + .overwrite_script_function( + "is_negative_bitmask", + |_self: Val| { + let output: u32 = IVec2::is_negative_bitmask(_self).into(); + output + }, + ) + .overwrite_script_function( + "length_squared", + |_self: Val| { + let output: i32 = IVec2::length_squared(_self).into(); + output + }, + ) + .overwrite_script_function( + "distance_squared", + |_self: Val, rhs: Val| { + let output: i32 = IVec2::distance_squared(_self, rhs).into(); + output + }, + ) + .overwrite_script_function( + "div_euclid", + |_self: Val, rhs: Val| { + let output: Val = IVec2::div_euclid(_self, rhs) + .into(); + output + }, + ) + .overwrite_script_function( + "rem_euclid", + |_self: Val, rhs: Val| { + let output: Val = IVec2::rem_euclid(_self, rhs) + .into(); + output + }, + ) + .overwrite_script_function( + "perp", + |_self: Val| { + let output: Val = IVec2::perp(_self).into(); + output + }, + ) + .overwrite_script_function( + "perp_dot", + |_self: Val, rhs: Val| { + let output: i32 = IVec2::perp_dot(_self, rhs).into(); + output + }, + ) + .overwrite_script_function( + "rotate", + |_self: Val, rhs: Val| { + let output: Val = IVec2::rotate(_self, rhs) + .into(); + output + }, + ) + .overwrite_script_function( + "as_vec2", + |_self: Ref| { + let output: Val = IVec2::as_vec2(_self).into(); + output + }, + ) + .overwrite_script_function( + "as_dvec2", + |_self: Ref| { + let output: Val = IVec2::as_dvec2(_self).into(); + output + }, + ) + .overwrite_script_function( + "as_uvec2", + |_self: Ref| { + let output: Val = IVec2::as_uvec2(_self).into(); + output + }, + ) + .overwrite_script_function( + "as_i64vec2", + |_self: Ref| { + let output: Val = IVec2::as_i64vec2(_self) + .into(); + output + }, + ) + .overwrite_script_function( + "as_u64vec2", + |_self: Ref| { + let output: Val = IVec2::as_u64vec2(_self) + .into(); + output + }, + ) + .overwrite_script_function( + "wrapping_add", + |_self: Val, rhs: Val| { + let output: Val = IVec2::wrapping_add(_self, rhs) + .into(); + output + }, + ) + .overwrite_script_function( + "wrapping_sub", + |_self: Val, rhs: Val| { + let output: Val = IVec2::wrapping_sub(_self, rhs) + .into(); + output + }, + ) + .overwrite_script_function( + "wrapping_mul", + |_self: Val, rhs: Val| { + let output: Val = IVec2::wrapping_mul(_self, rhs) + .into(); + output + }, + ) + .overwrite_script_function( + "wrapping_div", + |_self: Val, rhs: Val| { + let output: Val = IVec2::wrapping_div(_self, rhs) + .into(); + output + }, + ) + .overwrite_script_function( + "saturating_add", + |_self: Val, rhs: Val| { + let output: Val = IVec2::saturating_add( + _self, + rhs, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "saturating_sub", + |_self: Val, rhs: Val| { + let output: Val = IVec2::saturating_sub( + _self, + rhs, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "saturating_mul", + |_self: Val, rhs: Val| { + let output: Val = IVec2::saturating_mul( + _self, + rhs, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "saturating_div", + |_self: Val, rhs: Val| { + let output: Val = IVec2::saturating_div( + _self, + rhs, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "wrapping_add_unsigned", + |_self: Val, rhs: Val| { + let output: Val = IVec2::wrapping_add_unsigned( + _self, + rhs, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "wrapping_sub_unsigned", + |_self: Val, rhs: Val| { + let output: Val = IVec2::wrapping_sub_unsigned( + _self, + rhs, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "saturating_add_unsigned", + |_self: Val, rhs: Val| { + let output: Val = IVec2::saturating_add_unsigned( + _self, + rhs, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "saturating_sub_unsigned", + |_self: Val, rhs: Val| { + let output: Val = IVec2::saturating_sub_unsigned( + _self, + rhs, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "neg", + |_self: Val| { + let output: Val = IVec2::neg(_self).into(); + output + }, + ) + .overwrite_script_function( + "clone", + |_self: Ref| { + let output: Val = IVec2::clone(_self).into(); + output + }, + ); + NamespaceBuilder::::new(world) + .overwrite_script_function( + "rem", + |_self: Val, rhs: i32| { + let output: Val = IVec3::rem(_self, rhs).into(); + output + }, + ) + .overwrite_script_function( + "div", + |_self: Val, rhs: Val| { + let output: Val = IVec3::div(_self, rhs).into(); + output + }, + ) + .overwrite_script_function( + "assert_receiver_is_total_eq", + |_self: Ref| { + let output: () = IVec3::assert_receiver_is_total_eq(_self).into(); + output + }, + ) + .overwrite_script_function( + "sub", + |_self: Val, rhs: Val| { + let output: Val = IVec3::sub(_self, rhs).into(); + output + }, + ) + .overwrite_script_function( + "new", + |x: i32, y: i32, z: i32| { + let output: Val = IVec3::new(x, y, z).into(); + output + }, + ) + .overwrite_script_function( + "splat", + |v: i32| { + let output: Val = IVec3::splat(v).into(); + output + }, + ) + .overwrite_script_function( + "select", + | + mask: Val, + if_true: Val, + if_false: Val| + { + let output: Val = IVec3::select( + mask, + if_true, + if_false, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "from_array", + |a: [i32; 3]| { + let output: Val = IVec3::from_array(a).into(); + output + }, + ) + .overwrite_script_function( + "to_array", + |_self: Ref| { + let output: [i32; 3] = IVec3::to_array(_self).into(); + output + }, + ) + .overwrite_script_function( + "extend", + |_self: Val, w: i32| { + let output: Val = IVec3::extend(_self, w).into(); + output + }, + ) + .overwrite_script_function( + "truncate", + |_self: Val| { + let output: Val = IVec3::truncate(_self).into(); + output + }, + ) + .overwrite_script_function( + "with_x", + |_self: Val, x: i32| { + let output: Val = IVec3::with_x(_self, x).into(); + output + }, + ) + .overwrite_script_function( + "with_y", + |_self: Val, y: i32| { + let output: Val = IVec3::with_y(_self, y).into(); + output + }, + ) + .overwrite_script_function( + "with_z", + |_self: Val, z: i32| { + let output: Val = IVec3::with_z(_self, z).into(); + output + }, + ) + .overwrite_script_function( + "dot", + |_self: Val, rhs: Val| { + let output: i32 = IVec3::dot(_self, rhs).into(); + output + }, + ) + .overwrite_script_function( + "dot_into_vec", + |_self: Val, rhs: Val| { + let output: Val = IVec3::dot_into_vec(_self, rhs) + .into(); + output + }, + ) + .overwrite_script_function( + "cross", + |_self: Val, rhs: Val| { + let output: Val = IVec3::cross(_self, rhs).into(); + output + }, + ) + .overwrite_script_function( + "min", + |_self: Val, rhs: Val| { + let output: Val = IVec3::min(_self, rhs).into(); + output + }, + ) + .overwrite_script_function( + "max", + |_self: Val, rhs: Val| { + let output: Val = IVec3::max(_self, rhs).into(); + output + }, + ) + .overwrite_script_function( + "clamp", + | + _self: Val, + min: Val, + max: Val| + { + let output: Val = IVec3::clamp(_self, min, max) + .into(); + output + }, + ) + .overwrite_script_function( + "min_element", + |_self: Val| { + let output: i32 = IVec3::min_element(_self).into(); + output + }, + ) + .overwrite_script_function( + "max_element", + |_self: Val| { + let output: i32 = IVec3::max_element(_self).into(); + output + }, + ) + .overwrite_script_function( + "element_sum", + |_self: Val| { + let output: i32 = IVec3::element_sum(_self).into(); + output + }, + ) + .overwrite_script_function( + "element_product", + |_self: Val| { + let output: i32 = IVec3::element_product(_self).into(); + output + }, + ) + .overwrite_script_function( + "cmpeq", + |_self: Val, rhs: Val| { + let output: Val = IVec3::cmpeq(_self, rhs).into(); + output + }, + ) + .overwrite_script_function( + "cmpne", + |_self: Val, rhs: Val| { + let output: Val = IVec3::cmpne(_self, rhs).into(); + output + }, + ) + .overwrite_script_function( + "cmpge", + |_self: Val, rhs: Val| { + let output: Val = IVec3::cmpge(_self, rhs).into(); + output + }, + ) + .overwrite_script_function( + "cmpgt", + |_self: Val, rhs: Val| { + let output: Val = IVec3::cmpgt(_self, rhs).into(); + output + }, + ) + .overwrite_script_function( + "cmple", + |_self: Val, rhs: Val| { + let output: Val = IVec3::cmple(_self, rhs).into(); + output + }, + ) + .overwrite_script_function( + "cmplt", + |_self: Val, rhs: Val| { + let output: Val = IVec3::cmplt(_self, rhs).into(); + output + }, + ) + .overwrite_script_function( + "abs", + |_self: Val| { + let output: Val = IVec3::abs(_self).into(); + output + }, + ) + .overwrite_script_function( + "signum", + |_self: Val| { + let output: Val = IVec3::signum(_self).into(); + output + }, + ) + .overwrite_script_function( + "is_negative_bitmask", + |_self: Val| { + let output: u32 = IVec3::is_negative_bitmask(_self).into(); + output + }, + ) + .overwrite_script_function( + "length_squared", + |_self: Val| { + let output: i32 = IVec3::length_squared(_self).into(); + output + }, + ) + .overwrite_script_function( + "distance_squared", + |_self: Val, rhs: Val| { + let output: i32 = IVec3::distance_squared(_self, rhs).into(); + output + }, + ) + .overwrite_script_function( + "div_euclid", + |_self: Val, rhs: Val| { + let output: Val = IVec3::div_euclid(_self, rhs) + .into(); + output + }, + ) + .overwrite_script_function( + "rem_euclid", + |_self: Val, rhs: Val| { + let output: Val = IVec3::rem_euclid(_self, rhs) + .into(); + output + }, + ) + .overwrite_script_function( + "as_vec3", + |_self: Ref| { + let output: Val = IVec3::as_vec3(_self).into(); + output + }, + ) + .overwrite_script_function( + "as_vec3a", + |_self: Ref| { + let output: Val = IVec3::as_vec3a(_self).into(); + output + }, + ) + .overwrite_script_function( + "as_dvec3", + |_self: Ref| { + let output: Val = IVec3::as_dvec3(_self).into(); + output + }, + ) + .overwrite_script_function( + "as_uvec3", + |_self: Ref| { + let output: Val = IVec3::as_uvec3(_self).into(); + output + }, + ) + .overwrite_script_function( + "as_i64vec3", + |_self: Ref| { + let output: Val = IVec3::as_i64vec3(_self) + .into(); + output + }, + ) + .overwrite_script_function( + "as_u64vec3", + |_self: Ref| { + let output: Val = IVec3::as_u64vec3(_self) + .into(); + output + }, + ) + .overwrite_script_function( + "wrapping_add", + |_self: Val, rhs: Val| { + let output: Val = IVec3::wrapping_add(_self, rhs) + .into(); + output + }, + ) + .overwrite_script_function( + "wrapping_sub", + |_self: Val, rhs: Val| { + let output: Val = IVec3::wrapping_sub(_self, rhs) + .into(); + output + }, + ) + .overwrite_script_function( + "wrapping_mul", + |_self: Val, rhs: Val| { + let output: Val = IVec3::wrapping_mul(_self, rhs) + .into(); + output + }, + ) + .overwrite_script_function( + "wrapping_div", + |_self: Val, rhs: Val| { + let output: Val = IVec3::wrapping_div(_self, rhs) + .into(); + output + }, + ) + .overwrite_script_function( + "saturating_add", + |_self: Val, rhs: Val| { + let output: Val = IVec3::saturating_add( + _self, + rhs, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "saturating_sub", + |_self: Val, rhs: Val| { + let output: Val = IVec3::saturating_sub( + _self, + rhs, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "saturating_mul", + |_self: Val, rhs: Val| { + let output: Val = IVec3::saturating_mul( + _self, + rhs, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "saturating_div", + |_self: Val, rhs: Val| { + let output: Val = IVec3::saturating_div( + _self, + rhs, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "wrapping_add_unsigned", + |_self: Val, rhs: Val| { + let output: Val = IVec3::wrapping_add_unsigned( + _self, + rhs, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "wrapping_sub_unsigned", + |_self: Val, rhs: Val| { + let output: Val = IVec3::wrapping_sub_unsigned( + _self, + rhs, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "saturating_add_unsigned", + |_self: Val, rhs: Val| { + let output: Val = IVec3::saturating_add_unsigned( + _self, + rhs, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "saturating_sub_unsigned", + |_self: Val, rhs: Val| { + let output: Val = IVec3::saturating_sub_unsigned( + _self, + rhs, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "div", + |_self: Val, rhs: Ref| { + let output: Val = IVec3::div(_self, rhs).into(); + output + }, + ) + .overwrite_script_function( + "mul", + |_self: Val, rhs: i32| { + let output: Val = IVec3::mul(_self, rhs).into(); + output + }, + ) + .overwrite_script_function( + "add", + |_self: Val, rhs: Ref| { + let output: Val = IVec3::add(_self, rhs).into(); + output + }, + ) + .overwrite_script_function( + "div", + |_self: Val, rhs: i32| { + let output: Val = IVec3::div(_self, rhs).into(); + output + }, + ) + .overwrite_script_function( + "mul", + |_self: Val, rhs: Ref| { + let output: Val = IVec3::mul(_self, rhs).into(); + output + }, + ) + .overwrite_script_function( + "add", + |_self: Val, rhs: i32| { + let output: Val = IVec3::add(_self, rhs).into(); + output + }, + ) + .overwrite_script_function( + "neg", + |_self: Val| { + let output: Val = IVec3::neg(_self).into(); + output + }, + ) + .overwrite_script_function( + "clone", + |_self: Ref| { + let output: Val = IVec3::clone(_self).into(); + output + }, + ) + .overwrite_script_function( + "eq", + |_self: Ref, other: Ref| { + let output: bool = IVec3::eq(_self, other).into(); + output + }, + ) + .overwrite_script_function( + "mul", + |_self: Val, rhs: Val| { + let output: Val = IVec3::mul(_self, rhs).into(); + output + }, + ) + .overwrite_script_function( + "sub", + |_self: Val, rhs: Ref| { + let output: Val = IVec3::sub(_self, rhs).into(); + output + }, + ) + .overwrite_script_function( + "add", + |_self: Val, rhs: Val| { + let output: Val = IVec3::add(_self, rhs).into(); + output + }, + ) + .overwrite_script_function( + "rem", + |_self: Val, rhs: Ref| { + let output: Val = IVec3::rem(_self, rhs).into(); + output + }, + ) + .overwrite_script_function( + "sub", + |_self: Val, rhs: i32| { + let output: Val = IVec3::sub(_self, rhs).into(); + output + }, + ) + .overwrite_script_function( + "rem", + |_self: Val, rhs: Val| { + let output: Val = IVec3::rem(_self, rhs).into(); + output + }, + ); + NamespaceBuilder::::new(world) + .overwrite_script_function( + "add", + |_self: Val, rhs: i32| { + let output: Val = IVec4::add(_self, rhs).into(); + output + }, + ) + .overwrite_script_function( + "add", + |_self: Val, rhs: Val| { + let output: Val = IVec4::add(_self, rhs).into(); + output + }, + ) + .overwrite_script_function( + "sub", + |_self: Val, rhs: Ref| { + let output: Val = IVec4::sub(_self, rhs).into(); + output + }, + ) + .overwrite_script_function( + "mul", + |_self: Val, rhs: Ref| { + let output: Val = IVec4::mul(_self, rhs).into(); + output + }, + ) + .overwrite_script_function( + "new", + |x: i32, y: i32, z: i32, w: i32| { + let output: Val = IVec4::new(x, y, z, w).into(); + output + }, + ) + .overwrite_script_function( + "splat", + |v: i32| { + let output: Val = IVec4::splat(v).into(); + output + }, + ) + .overwrite_script_function( + "select", + | + mask: Val, + if_true: Val, + if_false: Val| + { + let output: Val = IVec4::select( + mask, + if_true, + if_false, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "from_array", + |a: [i32; 4]| { + let output: Val = IVec4::from_array(a).into(); + output + }, + ) + .overwrite_script_function( + "to_array", + |_self: Ref| { + let output: [i32; 4] = IVec4::to_array(_self).into(); + output + }, + ) + .overwrite_script_function( + "truncate", + |_self: Val| { + let output: Val = IVec4::truncate(_self).into(); + output + }, + ) + .overwrite_script_function( + "with_x", + |_self: Val, x: i32| { + let output: Val = IVec4::with_x(_self, x).into(); + output + }, + ) + .overwrite_script_function( + "with_y", + |_self: Val, y: i32| { + let output: Val = IVec4::with_y(_self, y).into(); + output + }, + ) + .overwrite_script_function( + "with_z", + |_self: Val, z: i32| { + let output: Val = IVec4::with_z(_self, z).into(); + output + }, + ) + .overwrite_script_function( + "with_w", + |_self: Val, w: i32| { + let output: Val = IVec4::with_w(_self, w).into(); + output + }, + ) + .overwrite_script_function( + "dot", + |_self: Val, rhs: Val| { + let output: i32 = IVec4::dot(_self, rhs).into(); + output + }, + ) + .overwrite_script_function( + "dot_into_vec", + |_self: Val, rhs: Val| { + let output: Val = IVec4::dot_into_vec(_self, rhs) + .into(); + output + }, + ) + .overwrite_script_function( + "min", + |_self: Val, rhs: Val| { + let output: Val = IVec4::min(_self, rhs).into(); + output + }, + ) + .overwrite_script_function( + "max", + |_self: Val, rhs: Val| { + let output: Val = IVec4::max(_self, rhs).into(); + output + }, + ) + .overwrite_script_function( + "clamp", + | + _self: Val, + min: Val, + max: Val| + { + let output: Val = IVec4::clamp(_self, min, max) + .into(); + output + }, + ) + .overwrite_script_function( + "min_element", + |_self: Val| { + let output: i32 = IVec4::min_element(_self).into(); + output + }, + ) + .overwrite_script_function( + "max_element", + |_self: Val| { + let output: i32 = IVec4::max_element(_self).into(); + output + }, + ) + .overwrite_script_function( + "element_sum", + |_self: Val| { + let output: i32 = IVec4::element_sum(_self).into(); + output + }, + ) + .overwrite_script_function( + "element_product", + |_self: Val| { + let output: i32 = IVec4::element_product(_self).into(); + output + }, + ) + .overwrite_script_function( + "cmpeq", + |_self: Val, rhs: Val| { + let output: Val = IVec4::cmpeq(_self, rhs).into(); + output + }, + ) + .overwrite_script_function( + "cmpne", + |_self: Val, rhs: Val| { + let output: Val = IVec4::cmpne(_self, rhs).into(); + output + }, + ) + .overwrite_script_function( + "cmpge", + |_self: Val, rhs: Val| { + let output: Val = IVec4::cmpge(_self, rhs).into(); + output + }, + ) + .overwrite_script_function( + "cmpgt", + |_self: Val, rhs: Val| { + let output: Val = IVec4::cmpgt(_self, rhs).into(); + output + }, + ) + .overwrite_script_function( + "cmple", + |_self: Val, rhs: Val| { + let output: Val = IVec4::cmple(_self, rhs).into(); + output + }, + ) + .overwrite_script_function( + "cmplt", + |_self: Val, rhs: Val| { + let output: Val = IVec4::cmplt(_self, rhs).into(); + output + }, + ) + .overwrite_script_function( + "abs", + |_self: Val| { + let output: Val = IVec4::abs(_self).into(); + output + }, + ) + .overwrite_script_function( + "signum", + |_self: Val| { + let output: Val = IVec4::signum(_self).into(); + output + }, + ) + .overwrite_script_function( + "is_negative_bitmask", + |_self: Val| { + let output: u32 = IVec4::is_negative_bitmask(_self).into(); + output + }, + ) + .overwrite_script_function( + "length_squared", + |_self: Val| { + let output: i32 = IVec4::length_squared(_self).into(); + output + }, + ) + .overwrite_script_function( + "distance_squared", + |_self: Val, rhs: Val| { + let output: i32 = IVec4::distance_squared(_self, rhs).into(); + output + }, + ) + .overwrite_script_function( + "div_euclid", + |_self: Val, rhs: Val| { + let output: Val = IVec4::div_euclid(_self, rhs) + .into(); + output + }, + ) + .overwrite_script_function( + "rem_euclid", + |_self: Val, rhs: Val| { + let output: Val = IVec4::rem_euclid(_self, rhs) + .into(); + output + }, + ) + .overwrite_script_function( + "as_vec4", + |_self: Ref| { + let output: Val = IVec4::as_vec4(_self).into(); + output + }, + ) + .overwrite_script_function( + "as_dvec4", + |_self: Ref| { + let output: Val = IVec4::as_dvec4(_self).into(); + output + }, + ) + .overwrite_script_function( + "as_uvec4", + |_self: Ref| { + let output: Val = IVec4::as_uvec4(_self).into(); + output + }, + ) + .overwrite_script_function( + "as_i64vec4", + |_self: Ref| { + let output: Val = IVec4::as_i64vec4(_self) + .into(); + output + }, + ) + .overwrite_script_function( + "as_u64vec4", + |_self: Ref| { + let output: Val = IVec4::as_u64vec4(_self) + .into(); + output + }, + ) + .overwrite_script_function( + "wrapping_add", + |_self: Val, rhs: Val| { + let output: Val = IVec4::wrapping_add(_self, rhs) + .into(); + output + }, + ) + .overwrite_script_function( + "wrapping_sub", + |_self: Val, rhs: Val| { + let output: Val = IVec4::wrapping_sub(_self, rhs) + .into(); + output + }, + ) + .overwrite_script_function( + "wrapping_mul", + |_self: Val, rhs: Val| { + let output: Val = IVec4::wrapping_mul(_self, rhs) + .into(); + output + }, + ) + .overwrite_script_function( + "wrapping_div", + |_self: Val, rhs: Val| { + let output: Val = IVec4::wrapping_div(_self, rhs) + .into(); + output + }, + ) + .overwrite_script_function( + "saturating_add", + |_self: Val, rhs: Val| { + let output: Val = IVec4::saturating_add( + _self, + rhs, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "saturating_sub", + |_self: Val, rhs: Val| { + let output: Val = IVec4::saturating_sub( + _self, + rhs, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "saturating_mul", + |_self: Val, rhs: Val| { + let output: Val = IVec4::saturating_mul( + _self, + rhs, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "saturating_div", + |_self: Val, rhs: Val| { + let output: Val = IVec4::saturating_div( + _self, + rhs, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "wrapping_add_unsigned", + |_self: Val, rhs: Val| { + let output: Val = IVec4::wrapping_add_unsigned( + _self, + rhs, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "wrapping_sub_unsigned", + |_self: Val, rhs: Val| { + let output: Val = IVec4::wrapping_sub_unsigned( + _self, + rhs, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "saturating_add_unsigned", + |_self: Val, rhs: Val| { + let output: Val = IVec4::saturating_add_unsigned( + _self, + rhs, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "saturating_sub_unsigned", + |_self: Val, rhs: Val| { + let output: Val = IVec4::saturating_sub_unsigned( + _self, + rhs, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "add", + |_self: Val, rhs: Ref| { + let output: Val = IVec4::add(_self, rhs).into(); + output + }, + ) + .overwrite_script_function( + "div", + |_self: Val, rhs: i32| { + let output: Val = IVec4::div(_self, rhs).into(); + output + }, + ) + .overwrite_script_function( + "eq", + |_self: Ref, other: Ref| { + let output: bool = IVec4::eq(_self, other).into(); + output + }, + ) + .overwrite_script_function( + "div", + |_self: Val, rhs: Ref| { + let output: Val = IVec4::div(_self, rhs).into(); + output + }, + ) + .overwrite_script_function( + "rem", + |_self: Val, rhs: Val| { + let output: Val = IVec4::rem(_self, rhs).into(); + output + }, + ) + .overwrite_script_function( + "rem", + |_self: Val, rhs: Ref| { + let output: Val = IVec4::rem(_self, rhs).into(); + output + }, + ) + .overwrite_script_function( + "mul", + |_self: Val, rhs: i32| { + let output: Val = IVec4::mul(_self, rhs).into(); + output + }, + ) + .overwrite_script_function( + "clone", + |_self: Ref| { + let output: Val = IVec4::clone(_self).into(); + output + }, + ) + .overwrite_script_function( + "mul", + |_self: Val, rhs: Val| { + let output: Val = IVec4::mul(_self, rhs).into(); + output + }, + ) + .overwrite_script_function( + "sub", + |_self: Val, rhs: Val| { + let output: Val = IVec4::sub(_self, rhs).into(); + output + }, + ) + .overwrite_script_function( + "sub", + |_self: Val, rhs: i32| { + let output: Val = IVec4::sub(_self, rhs).into(); + output + }, + ) + .overwrite_script_function( + "neg", + |_self: Val| { + let output: Val = IVec4::neg(_self).into(); + output + }, + ) + .overwrite_script_function( + "div", + |_self: Val, rhs: Val| { + let output: Val = IVec4::div(_self, rhs).into(); + output + }, + ) + .overwrite_script_function( + "assert_receiver_is_total_eq", + |_self: Ref| { + let output: () = IVec4::assert_receiver_is_total_eq(_self).into(); + output + }, + ) + .overwrite_script_function( + "rem", + |_self: Val, rhs: i32| { + let output: Val = IVec4::rem(_self, rhs).into(); + output + }, + ); + NamespaceBuilder::::new(world) + .overwrite_script_function( + "neg", + |_self: Val| { + let output: Val = I64Vec2::neg(_self).into(); + output + }, + ) + .overwrite_script_function( + "rem", + |_self: Val, rhs: i64| { + let output: Val = I64Vec2::rem(_self, rhs) + .into(); + output + }, + ) + .overwrite_script_function( + "div", + |_self: Val, rhs: Val| { + let output: Val = I64Vec2::div(_self, rhs) + .into(); + output + }, + ) + .overwrite_script_function( + "rem", + |_self: Val, rhs: Ref| { + let output: Val = I64Vec2::rem(_self, rhs) + .into(); + output + }, + ) + .overwrite_script_function( + "sub", + |_self: Val, rhs: i64| { + let output: Val = I64Vec2::sub(_self, rhs) + .into(); + output + }, + ) + .overwrite_script_function( + "sub", + |_self: Val, rhs: Ref| { + let output: Val = I64Vec2::sub(_self, rhs) + .into(); + output + }, + ) + .overwrite_script_function( + "eq", + |_self: Ref, other: Ref| { + let output: bool = I64Vec2::eq(_self, other).into(); + output + }, + ) + .overwrite_script_function( + "rem", + |_self: Val, rhs: Val| { + let output: Val = I64Vec2::rem(_self, rhs) + .into(); + output + }, + ) + .overwrite_script_function( + "assert_receiver_is_total_eq", + |_self: Ref| { + let output: () = I64Vec2::assert_receiver_is_total_eq(_self).into(); + output + }, + ) + .overwrite_script_function( + "add", + |_self: Val, rhs: Ref| { + let output: Val = I64Vec2::add(_self, rhs) + .into(); + output + }, + ) + .overwrite_script_function( + "add", + |_self: Val, rhs: i64| { + let output: Val = I64Vec2::add(_self, rhs) + .into(); + output + }, + ) + .overwrite_script_function( + "clone", + |_self: Ref| { + let output: Val = I64Vec2::clone(_self).into(); + output + }, + ) + .overwrite_script_function( + "add", + |_self: Val, rhs: Val| { + let output: Val = I64Vec2::add(_self, rhs) + .into(); + output + }, + ) + .overwrite_script_function( + "mul", + |_self: Val, rhs: Val| { + let output: Val = I64Vec2::mul(_self, rhs) + .into(); + output + }, + ) + .overwrite_script_function( + "new", + |x: i64, y: i64| { + let output: Val = I64Vec2::new(x, y).into(); + output + }, + ) + .overwrite_script_function( + "splat", + |v: i64| { + let output: Val = I64Vec2::splat(v).into(); + output + }, + ) + .overwrite_script_function( + "select", + | + mask: Val, + if_true: Val, + if_false: Val| + { + let output: Val = I64Vec2::select( + mask, + if_true, + if_false, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "from_array", + |a: [i64; 2]| { + let output: Val = I64Vec2::from_array(a).into(); + output + }, + ) + .overwrite_script_function( + "to_array", + |_self: Ref| { + let output: [i64; 2] = I64Vec2::to_array(_self).into(); + output + }, + ) + .overwrite_script_function( + "extend", + |_self: Val, z: i64| { + let output: Val = I64Vec2::extend(_self, z) + .into(); + output + }, + ) + .overwrite_script_function( + "with_x", + |_self: Val, x: i64| { + let output: Val = I64Vec2::with_x(_self, x) + .into(); + output + }, + ) + .overwrite_script_function( + "with_y", + |_self: Val, y: i64| { + let output: Val = I64Vec2::with_y(_self, y) + .into(); + output + }, + ) + .overwrite_script_function( + "dot", + |_self: Val, rhs: Val| { + let output: i64 = I64Vec2::dot(_self, rhs).into(); + output + }, + ) + .overwrite_script_function( + "dot_into_vec", + |_self: Val, rhs: Val| { + let output: Val = I64Vec2::dot_into_vec( + _self, + rhs, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "min", + |_self: Val, rhs: Val| { + let output: Val = I64Vec2::min(_self, rhs) + .into(); + output + }, + ) + .overwrite_script_function( + "max", + |_self: Val, rhs: Val| { + let output: Val = I64Vec2::max(_self, rhs) + .into(); + output + }, + ) + .overwrite_script_function( + "clamp", + | + _self: Val, + min: Val, + max: Val| + { + let output: Val = I64Vec2::clamp( + _self, + min, + max, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "min_element", + |_self: Val| { + let output: i64 = I64Vec2::min_element(_self).into(); + output + }, + ) + .overwrite_script_function( + "max_element", + |_self: Val| { + let output: i64 = I64Vec2::max_element(_self).into(); + output + }, + ) + .overwrite_script_function( + "element_sum", + |_self: Val| { + let output: i64 = I64Vec2::element_sum(_self).into(); + output + }, + ) + .overwrite_script_function( + "element_product", + |_self: Val| { + let output: i64 = I64Vec2::element_product(_self).into(); + output + }, + ) + .overwrite_script_function( + "cmpeq", + |_self: Val, rhs: Val| { + let output: Val = I64Vec2::cmpeq(_self, rhs) + .into(); + output + }, + ) + .overwrite_script_function( + "cmpne", + |_self: Val, rhs: Val| { + let output: Val = I64Vec2::cmpne(_self, rhs) + .into(); + output + }, + ) + .overwrite_script_function( + "cmpge", + |_self: Val, rhs: Val| { + let output: Val = I64Vec2::cmpge(_self, rhs) + .into(); + output + }, + ) + .overwrite_script_function( + "cmpgt", + |_self: Val, rhs: Val| { + let output: Val = I64Vec2::cmpgt(_self, rhs) + .into(); + output + }, + ) + .overwrite_script_function( + "cmple", + |_self: Val, rhs: Val| { + let output: Val = I64Vec2::cmple(_self, rhs) + .into(); + output + }, + ) + .overwrite_script_function( + "cmplt", + |_self: Val, rhs: Val| { + let output: Val = I64Vec2::cmplt(_self, rhs) + .into(); + output + }, + ) + .overwrite_script_function( + "abs", + |_self: Val| { + let output: Val = I64Vec2::abs(_self).into(); + output + }, + ) + .overwrite_script_function( + "signum", + |_self: Val| { + let output: Val = I64Vec2::signum(_self).into(); + output + }, + ) + .overwrite_script_function( + "is_negative_bitmask", + |_self: Val| { + let output: u32 = I64Vec2::is_negative_bitmask(_self).into(); + output + }, + ) + .overwrite_script_function( + "length_squared", + |_self: Val| { + let output: i64 = I64Vec2::length_squared(_self).into(); + output + }, + ) + .overwrite_script_function( + "distance_squared", + |_self: Val, rhs: Val| { + let output: i64 = I64Vec2::distance_squared(_self, rhs).into(); + output + }, + ) + .overwrite_script_function( + "div_euclid", + |_self: Val, rhs: Val| { + let output: Val = I64Vec2::div_euclid( + _self, + rhs, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "rem_euclid", + |_self: Val, rhs: Val| { + let output: Val = I64Vec2::rem_euclid( + _self, + rhs, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "perp", + |_self: Val| { + let output: Val = I64Vec2::perp(_self).into(); + output + }, + ) + .overwrite_script_function( + "perp_dot", + |_self: Val, rhs: Val| { + let output: i64 = I64Vec2::perp_dot(_self, rhs).into(); + output + }, + ) + .overwrite_script_function( + "rotate", + |_self: Val, rhs: Val| { + let output: Val = I64Vec2::rotate(_self, rhs) + .into(); + output + }, + ) + .overwrite_script_function( + "as_vec2", + |_self: Ref| { + let output: Val = I64Vec2::as_vec2(_self).into(); + output + }, + ) + .overwrite_script_function( + "as_dvec2", + |_self: Ref| { + let output: Val = I64Vec2::as_dvec2(_self).into(); + output + }, + ) + .overwrite_script_function( + "as_ivec2", + |_self: Ref| { + let output: Val = I64Vec2::as_ivec2(_self).into(); + output + }, + ) + .overwrite_script_function( + "as_uvec2", + |_self: Ref| { + let output: Val = I64Vec2::as_uvec2(_self).into(); + output + }, + ) + .overwrite_script_function( + "as_u64vec2", + |_self: Ref| { + let output: Val = I64Vec2::as_u64vec2(_self) + .into(); + output + }, + ) + .overwrite_script_function( + "wrapping_add", + |_self: Val, rhs: Val| { + let output: Val = I64Vec2::wrapping_add( + _self, + rhs, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "wrapping_sub", + |_self: Val, rhs: Val| { + let output: Val = I64Vec2::wrapping_sub( + _self, + rhs, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "wrapping_mul", + |_self: Val, rhs: Val| { + let output: Val = I64Vec2::wrapping_mul( + _self, + rhs, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "wrapping_div", + |_self: Val, rhs: Val| { + let output: Val = I64Vec2::wrapping_div( + _self, + rhs, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "saturating_add", + |_self: Val, rhs: Val| { + let output: Val = I64Vec2::saturating_add( + _self, + rhs, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "saturating_sub", + |_self: Val, rhs: Val| { + let output: Val = I64Vec2::saturating_sub( + _self, + rhs, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "saturating_mul", + |_self: Val, rhs: Val| { + let output: Val = I64Vec2::saturating_mul( + _self, + rhs, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "saturating_div", + |_self: Val, rhs: Val| { + let output: Val = I64Vec2::saturating_div( + _self, + rhs, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "wrapping_add_unsigned", + |_self: Val, rhs: Val| { + let output: Val = I64Vec2::wrapping_add_unsigned( + _self, + rhs, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "wrapping_sub_unsigned", + |_self: Val, rhs: Val| { + let output: Val = I64Vec2::wrapping_sub_unsigned( + _self, + rhs, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "saturating_add_unsigned", + |_self: Val, rhs: Val| { + let output: Val = I64Vec2::saturating_add_unsigned( + _self, + rhs, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "saturating_sub_unsigned", + |_self: Val, rhs: Val| { + let output: Val = I64Vec2::saturating_sub_unsigned( + _self, + rhs, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "div", + |_self: Val, rhs: i64| { + let output: Val = I64Vec2::div(_self, rhs) + .into(); + output + }, + ) + .overwrite_script_function( + "mul", + |_self: Val, rhs: Ref| { + let output: Val = I64Vec2::mul(_self, rhs) + .into(); + output + }, + ) + .overwrite_script_function( + "mul", + |_self: Val, rhs: i64| { + let output: Val = I64Vec2::mul(_self, rhs) + .into(); + output + }, + ) + .overwrite_script_function( + "sub", + |_self: Val, rhs: Val| { + let output: Val = I64Vec2::sub(_self, rhs) + .into(); + output + }, + ) + .overwrite_script_function( + "div", + |_self: Val, rhs: Ref| { + let output: Val = I64Vec2::div(_self, rhs) + .into(); + output + }, + ); + NamespaceBuilder::::new(world) + .overwrite_script_function( + "add", + |_self: Val, rhs: Ref| { + let output: Val = I64Vec3::add(_self, rhs) + .into(); + output + }, + ) + .overwrite_script_function( + "div", + |_self: Val, rhs: Ref| { + let output: Val = I64Vec3::div(_self, rhs) + .into(); + output + }, + ) + .overwrite_script_function( + "div", + |_self: Val, rhs: Val| { + let output: Val = I64Vec3::div(_self, rhs) + .into(); + output + }, + ) + .overwrite_script_function( + "add", + |_self: Val, rhs: Val| { + let output: Val = I64Vec3::add(_self, rhs) + .into(); + output + }, + ) + .overwrite_script_function( + "neg", + |_self: Val| { + let output: Val = I64Vec3::neg(_self).into(); + output + }, + ) + .overwrite_script_function( + "assert_receiver_is_total_eq", + |_self: Ref| { + let output: () = I64Vec3::assert_receiver_is_total_eq(_self).into(); + output + }, + ) + .overwrite_script_function( + "mul", + |_self: Val, rhs: i64| { + let output: Val = I64Vec3::mul(_self, rhs) + .into(); + output + }, + ) + .overwrite_script_function( + "eq", + |_self: Ref, other: Ref| { + let output: bool = I64Vec3::eq(_self, other).into(); + output + }, + ) + .overwrite_script_function( + "rem", + |_self: Val, rhs: Ref| { + let output: Val = I64Vec3::rem(_self, rhs) + .into(); + output + }, + ) + .overwrite_script_function( + "mul", + |_self: Val, rhs: Ref| { + let output: Val = I64Vec3::mul(_self, rhs) + .into(); + output + }, + ) + .overwrite_script_function( + "sub", + |_self: Val, rhs: Val| { + let output: Val = I64Vec3::sub(_self, rhs) + .into(); + output + }, + ) + .overwrite_script_function( + "rem", + |_self: Val, rhs: i64| { + let output: Val = I64Vec3::rem(_self, rhs) + .into(); + output + }, + ) + .overwrite_script_function( + "rem", + |_self: Val, rhs: Val| { + let output: Val = I64Vec3::rem(_self, rhs) + .into(); + output + }, + ) + .overwrite_script_function( + "add", + |_self: Val, rhs: i64| { + let output: Val = I64Vec3::add(_self, rhs) + .into(); + output + }, + ) + .overwrite_script_function( + "sub", + |_self: Val, rhs: i64| { + let output: Val = I64Vec3::sub(_self, rhs) + .into(); + output + }, + ) + .overwrite_script_function( + "div", + |_self: Val, rhs: i64| { + let output: Val = I64Vec3::div(_self, rhs) + .into(); + output + }, + ) + .overwrite_script_function( + "mul", + |_self: Val, rhs: Val| { + let output: Val = I64Vec3::mul(_self, rhs) + .into(); + output + }, + ) + .overwrite_script_function( + "new", + |x: i64, y: i64, z: i64| { + let output: Val = I64Vec3::new(x, y, z).into(); + output + }, + ) + .overwrite_script_function( + "splat", + |v: i64| { + let output: Val = I64Vec3::splat(v).into(); + output + }, + ) + .overwrite_script_function( + "select", + | + mask: Val, + if_true: Val, + if_false: Val| + { + let output: Val = I64Vec3::select( + mask, + if_true, + if_false, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "from_array", + |a: [i64; 3]| { + let output: Val = I64Vec3::from_array(a).into(); + output + }, + ) + .overwrite_script_function( + "to_array", + |_self: Ref| { + let output: [i64; 3] = I64Vec3::to_array(_self).into(); + output + }, + ) + .overwrite_script_function( + "extend", + |_self: Val, w: i64| { + let output: Val = I64Vec3::extend(_self, w) + .into(); + output + }, + ) + .overwrite_script_function( + "truncate", + |_self: Val| { + let output: Val = I64Vec3::truncate(_self) + .into(); + output + }, + ) + .overwrite_script_function( + "with_x", + |_self: Val, x: i64| { + let output: Val = I64Vec3::with_x(_self, x) + .into(); + output + }, + ) + .overwrite_script_function( + "with_y", + |_self: Val, y: i64| { + let output: Val = I64Vec3::with_y(_self, y) + .into(); + output + }, + ) + .overwrite_script_function( + "with_z", + |_self: Val, z: i64| { + let output: Val = I64Vec3::with_z(_self, z) + .into(); + output + }, + ) + .overwrite_script_function( + "dot", + |_self: Val, rhs: Val| { + let output: i64 = I64Vec3::dot(_self, rhs).into(); + output + }, + ) + .overwrite_script_function( + "dot_into_vec", + |_self: Val, rhs: Val| { + let output: Val = I64Vec3::dot_into_vec( + _self, + rhs, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "cross", + |_self: Val, rhs: Val| { + let output: Val = I64Vec3::cross(_self, rhs) + .into(); + output + }, + ) + .overwrite_script_function( + "min", + |_self: Val, rhs: Val| { + let output: Val = I64Vec3::min(_self, rhs) + .into(); + output + }, + ) + .overwrite_script_function( + "max", + |_self: Val, rhs: Val| { + let output: Val = I64Vec3::max(_self, rhs) + .into(); + output + }, + ) + .overwrite_script_function( + "clamp", + | + _self: Val, + min: Val, + max: Val| + { + let output: Val = I64Vec3::clamp( + _self, + min, + max, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "min_element", + |_self: Val| { + let output: i64 = I64Vec3::min_element(_self).into(); + output + }, + ) + .overwrite_script_function( + "max_element", + |_self: Val| { + let output: i64 = I64Vec3::max_element(_self).into(); + output + }, + ) + .overwrite_script_function( + "element_sum", + |_self: Val| { + let output: i64 = I64Vec3::element_sum(_self).into(); + output + }, + ) + .overwrite_script_function( + "element_product", + |_self: Val| { + let output: i64 = I64Vec3::element_product(_self).into(); + output + }, + ) + .overwrite_script_function( + "cmpeq", + |_self: Val, rhs: Val| { + let output: Val = I64Vec3::cmpeq(_self, rhs) + .into(); + output + }, + ) + .overwrite_script_function( + "cmpne", + |_self: Val, rhs: Val| { + let output: Val = I64Vec3::cmpne(_self, rhs) + .into(); + output + }, + ) + .overwrite_script_function( + "cmpge", + |_self: Val, rhs: Val| { + let output: Val = I64Vec3::cmpge(_self, rhs) + .into(); + output + }, + ) + .overwrite_script_function( + "cmpgt", + |_self: Val, rhs: Val| { + let output: Val = I64Vec3::cmpgt(_self, rhs) + .into(); + output + }, + ) + .overwrite_script_function( + "cmple", + |_self: Val, rhs: Val| { + let output: Val = I64Vec3::cmple(_self, rhs) + .into(); + output + }, + ) + .overwrite_script_function( + "cmplt", + |_self: Val, rhs: Val| { + let output: Val = I64Vec3::cmplt(_self, rhs) + .into(); + output + }, + ) + .overwrite_script_function( + "abs", + |_self: Val| { + let output: Val = I64Vec3::abs(_self).into(); + output + }, + ) + .overwrite_script_function( + "signum", + |_self: Val| { + let output: Val = I64Vec3::signum(_self).into(); + output + }, + ) + .overwrite_script_function( + "is_negative_bitmask", + |_self: Val| { + let output: u32 = I64Vec3::is_negative_bitmask(_self).into(); + output + }, + ) + .overwrite_script_function( + "length_squared", + |_self: Val| { + let output: i64 = I64Vec3::length_squared(_self).into(); + output + }, + ) + .overwrite_script_function( + "distance_squared", + |_self: Val, rhs: Val| { + let output: i64 = I64Vec3::distance_squared(_self, rhs).into(); + output + }, + ) + .overwrite_script_function( + "div_euclid", + |_self: Val, rhs: Val| { + let output: Val = I64Vec3::div_euclid( + _self, + rhs, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "rem_euclid", + |_self: Val, rhs: Val| { + let output: Val = I64Vec3::rem_euclid( + _self, + rhs, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "as_vec3", + |_self: Ref| { + let output: Val = I64Vec3::as_vec3(_self).into(); + output + }, + ) + .overwrite_script_function( + "as_vec3a", + |_self: Ref| { + let output: Val = I64Vec3::as_vec3a(_self).into(); + output + }, + ) + .overwrite_script_function( + "as_dvec3", + |_self: Ref| { + let output: Val = I64Vec3::as_dvec3(_self).into(); + output + }, + ) + .overwrite_script_function( + "as_ivec3", + |_self: Ref| { + let output: Val = I64Vec3::as_ivec3(_self).into(); + output + }, + ) + .overwrite_script_function( + "as_uvec3", + |_self: Ref| { + let output: Val = I64Vec3::as_uvec3(_self).into(); + output + }, + ) + .overwrite_script_function( + "as_u64vec3", + |_self: Ref| { + let output: Val = I64Vec3::as_u64vec3(_self) + .into(); + output + }, + ) + .overwrite_script_function( + "wrapping_add", + |_self: Val, rhs: Val| { + let output: Val = I64Vec3::wrapping_add( + _self, + rhs, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "wrapping_sub", + |_self: Val, rhs: Val| { + let output: Val = I64Vec3::wrapping_sub( + _self, + rhs, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "wrapping_mul", + |_self: Val, rhs: Val| { + let output: Val = I64Vec3::wrapping_mul( + _self, + rhs, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "wrapping_div", + |_self: Val, rhs: Val| { + let output: Val = I64Vec3::wrapping_div( + _self, + rhs, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "saturating_add", + |_self: Val, rhs: Val| { + let output: Val = I64Vec3::saturating_add( + _self, + rhs, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "saturating_sub", + |_self: Val, rhs: Val| { + let output: Val = I64Vec3::saturating_sub( + _self, + rhs, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "saturating_mul", + |_self: Val, rhs: Val| { + let output: Val = I64Vec3::saturating_mul( + _self, + rhs, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "saturating_div", + |_self: Val, rhs: Val| { + let output: Val = I64Vec3::saturating_div( + _self, + rhs, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "wrapping_add_unsigned", + |_self: Val, rhs: Val| { + let output: Val = I64Vec3::wrapping_add_unsigned( + _self, + rhs, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "wrapping_sub_unsigned", + |_self: Val, rhs: Val| { + let output: Val = I64Vec3::wrapping_sub_unsigned( + _self, + rhs, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "saturating_add_unsigned", + |_self: Val, rhs: Val| { + let output: Val = I64Vec3::saturating_add_unsigned( + _self, + rhs, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "saturating_sub_unsigned", + |_self: Val, rhs: Val| { + let output: Val = I64Vec3::saturating_sub_unsigned( + _self, + rhs, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "sub", + |_self: Val, rhs: Ref| { + let output: Val = I64Vec3::sub(_self, rhs) + .into(); + output + }, + ) + .overwrite_script_function( + "clone", + |_self: Ref| { + let output: Val = I64Vec3::clone(_self).into(); + output + }, + ); + NamespaceBuilder::::new(world) + .overwrite_script_function( + "sub", + |_self: Val, rhs: Ref| { + let output: Val = I64Vec4::sub(_self, rhs) + .into(); + output + }, + ) + .overwrite_script_function( + "assert_receiver_is_total_eq", + |_self: Ref| { + let output: () = I64Vec4::assert_receiver_is_total_eq(_self).into(); + output + }, + ) + .overwrite_script_function( + "add", + |_self: Val, rhs: Ref| { + let output: Val = I64Vec4::add(_self, rhs) + .into(); + output + }, + ) + .overwrite_script_function( + "rem", + |_self: Val, rhs: Ref| { + let output: Val = I64Vec4::rem(_self, rhs) + .into(); + output + }, + ) + .overwrite_script_function( + "add", + |_self: Val, rhs: Val| { + let output: Val = I64Vec4::add(_self, rhs) + .into(); + output + }, + ) + .overwrite_script_function( + "clone", + |_self: Ref| { + let output: Val = I64Vec4::clone(_self).into(); + output + }, + ) + .overwrite_script_function( + "div", + |_self: Val, rhs: Ref| { + let output: Val = I64Vec4::div(_self, rhs) + .into(); + output + }, + ) + .overwrite_script_function( + "sub", + |_self: Val, rhs: i64| { + let output: Val = I64Vec4::sub(_self, rhs) + .into(); + output + }, + ) + .overwrite_script_function( + "div", + |_self: Val, rhs: Val| { + let output: Val = I64Vec4::div(_self, rhs) + .into(); + output + }, + ) + .overwrite_script_function( + "add", + |_self: Val, rhs: i64| { + let output: Val = I64Vec4::add(_self, rhs) + .into(); + output + }, + ) + .overwrite_script_function( + "eq", + |_self: Ref, other: Ref| { + let output: bool = I64Vec4::eq(_self, other).into(); + output + }, + ) + .overwrite_script_function( + "mul", + |_self: Val, rhs: Ref| { + let output: Val = I64Vec4::mul(_self, rhs) + .into(); + output + }, + ) + .overwrite_script_function( + "mul", + |_self: Val, rhs: i64| { + let output: Val = I64Vec4::mul(_self, rhs) + .into(); + output + }, + ) + .overwrite_script_function( + "mul", + |_self: Val, rhs: Val| { + let output: Val = I64Vec4::mul(_self, rhs) + .into(); + output + }, + ) + .overwrite_script_function( + "rem", + |_self: Val, rhs: i64| { + let output: Val = I64Vec4::rem(_self, rhs) + .into(); + output + }, + ) + .overwrite_script_function( + "rem", + |_self: Val, rhs: Val| { + let output: Val = I64Vec4::rem(_self, rhs) + .into(); + output + }, + ) + .overwrite_script_function( + "new", + |x: i64, y: i64, z: i64, w: i64| { + let output: Val = I64Vec4::new(x, y, z, w) + .into(); + output + }, + ) + .overwrite_script_function( + "splat", + |v: i64| { + let output: Val = I64Vec4::splat(v).into(); + output + }, + ) + .overwrite_script_function( + "select", + | + mask: Val, + if_true: Val, + if_false: Val| + { + let output: Val = I64Vec4::select( + mask, + if_true, + if_false, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "from_array", + |a: [i64; 4]| { + let output: Val = I64Vec4::from_array(a).into(); + output + }, + ) + .overwrite_script_function( + "to_array", + |_self: Ref| { + let output: [i64; 4] = I64Vec4::to_array(_self).into(); + output + }, + ) + .overwrite_script_function( + "truncate", + |_self: Val| { + let output: Val = I64Vec4::truncate(_self) + .into(); + output + }, + ) + .overwrite_script_function( + "with_x", + |_self: Val, x: i64| { + let output: Val = I64Vec4::with_x(_self, x) + .into(); + output + }, + ) + .overwrite_script_function( + "with_y", + |_self: Val, y: i64| { + let output: Val = I64Vec4::with_y(_self, y) + .into(); + output + }, + ) + .overwrite_script_function( + "with_z", + |_self: Val, z: i64| { + let output: Val = I64Vec4::with_z(_self, z) + .into(); + output + }, + ) + .overwrite_script_function( + "with_w", + |_self: Val, w: i64| { + let output: Val = I64Vec4::with_w(_self, w) + .into(); + output + }, + ) + .overwrite_script_function( + "dot", + |_self: Val, rhs: Val| { + let output: i64 = I64Vec4::dot(_self, rhs).into(); + output + }, + ) + .overwrite_script_function( + "dot_into_vec", + |_self: Val, rhs: Val| { + let output: Val = I64Vec4::dot_into_vec( + _self, + rhs, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "min", + |_self: Val, rhs: Val| { + let output: Val = I64Vec4::min(_self, rhs) + .into(); + output + }, + ) + .overwrite_script_function( + "max", + |_self: Val, rhs: Val| { + let output: Val = I64Vec4::max(_self, rhs) + .into(); + output + }, + ) + .overwrite_script_function( + "clamp", + | + _self: Val, + min: Val, + max: Val| + { + let output: Val = I64Vec4::clamp( + _self, + min, + max, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "min_element", + |_self: Val| { + let output: i64 = I64Vec4::min_element(_self).into(); + output + }, + ) + .overwrite_script_function( + "max_element", + |_self: Val| { + let output: i64 = I64Vec4::max_element(_self).into(); + output + }, + ) + .overwrite_script_function( + "element_sum", + |_self: Val| { + let output: i64 = I64Vec4::element_sum(_self).into(); + output + }, + ) + .overwrite_script_function( + "element_product", + |_self: Val| { + let output: i64 = I64Vec4::element_product(_self).into(); + output + }, + ) + .overwrite_script_function( + "cmpeq", + |_self: Val, rhs: Val| { + let output: Val = I64Vec4::cmpeq(_self, rhs) + .into(); + output + }, + ) + .overwrite_script_function( + "cmpne", + |_self: Val, rhs: Val| { + let output: Val = I64Vec4::cmpne(_self, rhs) + .into(); + output + }, + ) + .overwrite_script_function( + "cmpge", + |_self: Val, rhs: Val| { + let output: Val = I64Vec4::cmpge(_self, rhs) + .into(); + output + }, + ) + .overwrite_script_function( + "cmpgt", + |_self: Val, rhs: Val| { + let output: Val = I64Vec4::cmpgt(_self, rhs) + .into(); + output + }, + ) + .overwrite_script_function( + "cmple", + |_self: Val, rhs: Val| { + let output: Val = I64Vec4::cmple(_self, rhs) + .into(); + output + }, + ) + .overwrite_script_function( + "cmplt", + |_self: Val, rhs: Val| { + let output: Val = I64Vec4::cmplt(_self, rhs) + .into(); + output + }, + ) + .overwrite_script_function( + "abs", + |_self: Val| { + let output: Val = I64Vec4::abs(_self).into(); + output + }, + ) + .overwrite_script_function( + "signum", + |_self: Val| { + let output: Val = I64Vec4::signum(_self).into(); + output + }, + ) + .overwrite_script_function( + "is_negative_bitmask", + |_self: Val| { + let output: u32 = I64Vec4::is_negative_bitmask(_self).into(); + output + }, + ) + .overwrite_script_function( + "length_squared", + |_self: Val| { + let output: i64 = I64Vec4::length_squared(_self).into(); + output + }, + ) + .overwrite_script_function( + "distance_squared", + |_self: Val, rhs: Val| { + let output: i64 = I64Vec4::distance_squared(_self, rhs).into(); + output + }, + ) + .overwrite_script_function( + "div_euclid", + |_self: Val, rhs: Val| { + let output: Val = I64Vec4::div_euclid( + _self, + rhs, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "rem_euclid", + |_self: Val, rhs: Val| { + let output: Val = I64Vec4::rem_euclid( + _self, + rhs, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "as_vec4", + |_self: Ref| { + let output: Val = I64Vec4::as_vec4(_self).into(); + output + }, + ) + .overwrite_script_function( + "as_dvec4", + |_self: Ref| { + let output: Val = I64Vec4::as_dvec4(_self).into(); + output + }, + ) + .overwrite_script_function( + "as_ivec4", + |_self: Ref| { + let output: Val = I64Vec4::as_ivec4(_self).into(); + output + }, + ) + .overwrite_script_function( + "as_uvec4", + |_self: Ref| { + let output: Val = I64Vec4::as_uvec4(_self).into(); + output + }, + ) + .overwrite_script_function( + "as_u64vec4", + |_self: Ref| { + let output: Val = I64Vec4::as_u64vec4(_self) + .into(); + output + }, + ) + .overwrite_script_function( + "wrapping_add", + |_self: Val, rhs: Val| { + let output: Val = I64Vec4::wrapping_add( + _self, + rhs, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "wrapping_sub", + |_self: Val, rhs: Val| { + let output: Val = I64Vec4::wrapping_sub( + _self, + rhs, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "wrapping_mul", + |_self: Val, rhs: Val| { + let output: Val = I64Vec4::wrapping_mul( + _self, + rhs, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "wrapping_div", + |_self: Val, rhs: Val| { + let output: Val = I64Vec4::wrapping_div( + _self, + rhs, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "saturating_add", + |_self: Val, rhs: Val| { + let output: Val = I64Vec4::saturating_add( + _self, + rhs, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "saturating_sub", + |_self: Val, rhs: Val| { + let output: Val = I64Vec4::saturating_sub( + _self, + rhs, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "saturating_mul", + |_self: Val, rhs: Val| { + let output: Val = I64Vec4::saturating_mul( + _self, + rhs, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "saturating_div", + |_self: Val, rhs: Val| { + let output: Val = I64Vec4::saturating_div( + _self, + rhs, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "wrapping_add_unsigned", + |_self: Val, rhs: Val| { + let output: Val = I64Vec4::wrapping_add_unsigned( + _self, + rhs, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "wrapping_sub_unsigned", + |_self: Val, rhs: Val| { + let output: Val = I64Vec4::wrapping_sub_unsigned( + _self, + rhs, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "saturating_add_unsigned", + |_self: Val, rhs: Val| { + let output: Val = I64Vec4::saturating_add_unsigned( + _self, + rhs, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "saturating_sub_unsigned", + |_self: Val, rhs: Val| { + let output: Val = I64Vec4::saturating_sub_unsigned( + _self, + rhs, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "neg", + |_self: Val| { + let output: Val = I64Vec4::neg(_self).into(); + output + }, + ) + .overwrite_script_function( + "sub", + |_self: Val, rhs: Val| { + let output: Val = I64Vec4::sub(_self, rhs) + .into(); + output + }, + ) + .overwrite_script_function( + "div", + |_self: Val, rhs: i64| { + let output: Val = I64Vec4::div(_self, rhs) + .into(); + output + }, + ); + NamespaceBuilder::::new(world) + .overwrite_script_function( + "div", + |_self: Val, rhs: Val| { + let output: Val = UVec2::div(_self, rhs).into(); + output + }, + ) + .overwrite_script_function( + "add", + |_self: Val, rhs: Val| { + let output: Val = UVec2::add(_self, rhs).into(); + output + }, + ) + .overwrite_script_function( + "div", + |_self: Val, rhs: Ref| { + let output: Val = UVec2::div(_self, rhs).into(); + output + }, + ) + .overwrite_script_function( + "add", + |_self: Val, rhs: Ref| { + let output: Val = UVec2::add(_self, rhs).into(); + output + }, + ) + .overwrite_script_function( + "add", + |_self: Val, rhs: u32| { + let output: Val = UVec2::add(_self, rhs).into(); + output + }, + ) + .overwrite_script_function( + "rem", + |_self: Val, rhs: Val| { + let output: Val = UVec2::rem(_self, rhs).into(); + output + }, + ) + .overwrite_script_function( + "rem", + |_self: Val, rhs: u32| { + let output: Val = UVec2::rem(_self, rhs).into(); + output + }, + ) + .overwrite_script_function( + "div", + |_self: Val, rhs: u32| { + let output: Val = UVec2::div(_self, rhs).into(); + output + }, + ) + .overwrite_script_function( + "assert_receiver_is_total_eq", + |_self: Ref| { + let output: () = UVec2::assert_receiver_is_total_eq(_self).into(); + output + }, + ) + .overwrite_script_function( + "eq", + |_self: Ref, other: Ref| { + let output: bool = UVec2::eq(_self, other).into(); + output + }, + ) + .overwrite_script_function( + "new", + |x: u32, y: u32| { + let output: Val = UVec2::new(x, y).into(); + output + }, + ) + .overwrite_script_function( + "splat", + |v: u32| { + let output: Val = UVec2::splat(v).into(); + output + }, + ) + .overwrite_script_function( + "select", + | + mask: Val, + if_true: Val, + if_false: Val| + { + let output: Val = UVec2::select( + mask, + if_true, + if_false, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "from_array", + |a: [u32; 2]| { + let output: Val = UVec2::from_array(a).into(); + output + }, + ) + .overwrite_script_function( + "to_array", + |_self: Ref| { + let output: [u32; 2] = UVec2::to_array(_self).into(); + output + }, + ) + .overwrite_script_function( + "extend", + |_self: Val, z: u32| { + let output: Val = UVec2::extend(_self, z).into(); + output + }, + ) + .overwrite_script_function( + "with_x", + |_self: Val, x: u32| { + let output: Val = UVec2::with_x(_self, x).into(); + output + }, + ) + .overwrite_script_function( + "with_y", + |_self: Val, y: u32| { + let output: Val = UVec2::with_y(_self, y).into(); + output + }, + ) + .overwrite_script_function( + "dot", + |_self: Val, rhs: Val| { + let output: u32 = UVec2::dot(_self, rhs).into(); + output + }, + ) + .overwrite_script_function( + "dot_into_vec", + |_self: Val, rhs: Val| { + let output: Val = UVec2::dot_into_vec(_self, rhs) + .into(); + output + }, + ) + .overwrite_script_function( + "min", + |_self: Val, rhs: Val| { + let output: Val = UVec2::min(_self, rhs).into(); + output + }, + ) + .overwrite_script_function( + "max", + |_self: Val, rhs: Val| { + let output: Val = UVec2::max(_self, rhs).into(); + output + }, + ) + .overwrite_script_function( + "clamp", + | + _self: Val, + min: Val, + max: Val| + { + let output: Val = UVec2::clamp(_self, min, max) + .into(); + output + }, + ) + .overwrite_script_function( + "min_element", + |_self: Val| { + let output: u32 = UVec2::min_element(_self).into(); + output + }, + ) + .overwrite_script_function( + "max_element", + |_self: Val| { + let output: u32 = UVec2::max_element(_self).into(); + output + }, + ) + .overwrite_script_function( + "element_sum", + |_self: Val| { + let output: u32 = UVec2::element_sum(_self).into(); + output + }, + ) + .overwrite_script_function( + "element_product", + |_self: Val| { + let output: u32 = UVec2::element_product(_self).into(); + output + }, + ) + .overwrite_script_function( + "cmpeq", + |_self: Val, rhs: Val| { + let output: Val = UVec2::cmpeq(_self, rhs).into(); + output + }, + ) + .overwrite_script_function( + "cmpne", + |_self: Val, rhs: Val| { + let output: Val = UVec2::cmpne(_self, rhs).into(); + output + }, + ) + .overwrite_script_function( + "cmpge", + |_self: Val, rhs: Val| { + let output: Val = UVec2::cmpge(_self, rhs).into(); + output + }, + ) + .overwrite_script_function( + "cmpgt", + |_self: Val, rhs: Val| { + let output: Val = UVec2::cmpgt(_self, rhs).into(); + output + }, + ) + .overwrite_script_function( + "cmple", + |_self: Val, rhs: Val| { + let output: Val = UVec2::cmple(_self, rhs).into(); + output + }, + ) + .overwrite_script_function( + "cmplt", + |_self: Val, rhs: Val| { + let output: Val = UVec2::cmplt(_self, rhs).into(); + output + }, + ) + .overwrite_script_function( + "length_squared", + |_self: Val| { + let output: u32 = UVec2::length_squared(_self).into(); + output + }, + ) + .overwrite_script_function( + "as_vec2", + |_self: Ref| { + let output: Val = UVec2::as_vec2(_self).into(); + output + }, + ) + .overwrite_script_function( + "as_dvec2", + |_self: Ref| { + let output: Val = UVec2::as_dvec2(_self).into(); + output + }, + ) + .overwrite_script_function( + "as_ivec2", + |_self: Ref| { + let output: Val = UVec2::as_ivec2(_self).into(); + output + }, + ) + .overwrite_script_function( + "as_i64vec2", + |_self: Ref| { + let output: Val = UVec2::as_i64vec2(_self) + .into(); + output + }, + ) + .overwrite_script_function( + "as_u64vec2", + |_self: Ref| { + let output: Val = UVec2::as_u64vec2(_self) + .into(); + output + }, + ) + .overwrite_script_function( + "wrapping_add", + |_self: Val, rhs: Val| { + let output: Val = UVec2::wrapping_add(_self, rhs) + .into(); + output + }, + ) + .overwrite_script_function( + "wrapping_sub", + |_self: Val, rhs: Val| { + let output: Val = UVec2::wrapping_sub(_self, rhs) + .into(); + output + }, + ) + .overwrite_script_function( + "wrapping_mul", + |_self: Val, rhs: Val| { + let output: Val = UVec2::wrapping_mul(_self, rhs) + .into(); + output + }, + ) + .overwrite_script_function( + "wrapping_div", + |_self: Val, rhs: Val| { + let output: Val = UVec2::wrapping_div(_self, rhs) + .into(); + output + }, + ) + .overwrite_script_function( + "saturating_add", + |_self: Val, rhs: Val| { + let output: Val = UVec2::saturating_add( + _self, + rhs, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "saturating_sub", + |_self: Val, rhs: Val| { + let output: Val = UVec2::saturating_sub( + _self, + rhs, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "saturating_mul", + |_self: Val, rhs: Val| { + let output: Val = UVec2::saturating_mul( + _self, + rhs, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "saturating_div", + |_self: Val, rhs: Val| { + let output: Val = UVec2::saturating_div( + _self, + rhs, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "wrapping_add_signed", + |_self: Val, rhs: Val| { + let output: Val = UVec2::wrapping_add_signed( + _self, + rhs, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "saturating_add_signed", + |_self: Val, rhs: Val| { + let output: Val = UVec2::saturating_add_signed( + _self, + rhs, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "rem", + |_self: Val, rhs: Ref| { + let output: Val = UVec2::rem(_self, rhs).into(); + output + }, + ) + .overwrite_script_function( + "mul", + |_self: Val, rhs: Ref| { + let output: Val = UVec2::mul(_self, rhs).into(); + output + }, + ) + .overwrite_script_function( + "mul", + |_self: Val, rhs: u32| { + let output: Val = UVec2::mul(_self, rhs).into(); + output + }, + ) + .overwrite_script_function( + "clone", + |_self: Ref| { + let output: Val = UVec2::clone(_self).into(); + output + }, + ) + .overwrite_script_function( + "sub", + |_self: Val, rhs: Val| { + let output: Val = UVec2::sub(_self, rhs).into(); + output + }, + ) + .overwrite_script_function( + "sub", + |_self: Val, rhs: Ref| { + let output: Val = UVec2::sub(_self, rhs).into(); + output + }, + ) + .overwrite_script_function( + "mul", + |_self: Val, rhs: Val| { + let output: Val = UVec2::mul(_self, rhs).into(); + output + }, + ) + .overwrite_script_function( + "sub", + |_self: Val, rhs: u32| { + let output: Val = UVec2::sub(_self, rhs).into(); + output + }, + ); + NamespaceBuilder::::new(world) + .overwrite_script_function( + "div", + |_self: Val, rhs: u32| { + let output: Val = UVec3::div(_self, rhs).into(); + output + }, + ) + .overwrite_script_function( + "rem", + |_self: Val, rhs: Ref| { + let output: Val = UVec3::rem(_self, rhs).into(); + output + }, + ) + .overwrite_script_function( + "add", + |_self: Val, rhs: Ref| { + let output: Val = UVec3::add(_self, rhs).into(); + output + }, + ) + .overwrite_script_function( + "new", + |x: u32, y: u32, z: u32| { + let output: Val = UVec3::new(x, y, z).into(); + output + }, + ) + .overwrite_script_function( + "splat", + |v: u32| { + let output: Val = UVec3::splat(v).into(); + output + }, + ) + .overwrite_script_function( + "select", + | + mask: Val, + if_true: Val, + if_false: Val| + { + let output: Val = UVec3::select( + mask, + if_true, + if_false, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "from_array", + |a: [u32; 3]| { + let output: Val = UVec3::from_array(a).into(); + output + }, + ) + .overwrite_script_function( + "to_array", + |_self: Ref| { + let output: [u32; 3] = UVec3::to_array(_self).into(); + output + }, + ) + .overwrite_script_function( + "extend", + |_self: Val, w: u32| { + let output: Val = UVec3::extend(_self, w).into(); + output + }, + ) + .overwrite_script_function( + "truncate", + |_self: Val| { + let output: Val = UVec3::truncate(_self).into(); + output + }, + ) + .overwrite_script_function( + "with_x", + |_self: Val, x: u32| { + let output: Val = UVec3::with_x(_self, x).into(); + output + }, + ) + .overwrite_script_function( + "with_y", + |_self: Val, y: u32| { + let output: Val = UVec3::with_y(_self, y).into(); + output + }, + ) + .overwrite_script_function( + "with_z", + |_self: Val, z: u32| { + let output: Val = UVec3::with_z(_self, z).into(); + output + }, + ) + .overwrite_script_function( + "dot", + |_self: Val, rhs: Val| { + let output: u32 = UVec3::dot(_self, rhs).into(); + output + }, + ) + .overwrite_script_function( + "dot_into_vec", + |_self: Val, rhs: Val| { + let output: Val = UVec3::dot_into_vec(_self, rhs) + .into(); + output + }, + ) + .overwrite_script_function( + "cross", + |_self: Val, rhs: Val| { + let output: Val = UVec3::cross(_self, rhs).into(); + output + }, + ) + .overwrite_script_function( + "min", + |_self: Val, rhs: Val| { + let output: Val = UVec3::min(_self, rhs).into(); + output + }, + ) + .overwrite_script_function( + "max", + |_self: Val, rhs: Val| { + let output: Val = UVec3::max(_self, rhs).into(); + output + }, + ) + .overwrite_script_function( + "clamp", + | + _self: Val, + min: Val, + max: Val| + { + let output: Val = UVec3::clamp(_self, min, max) + .into(); + output + }, + ) + .overwrite_script_function( + "min_element", + |_self: Val| { + let output: u32 = UVec3::min_element(_self).into(); + output + }, + ) + .overwrite_script_function( + "max_element", + |_self: Val| { + let output: u32 = UVec3::max_element(_self).into(); + output + }, + ) + .overwrite_script_function( + "element_sum", + |_self: Val| { + let output: u32 = UVec3::element_sum(_self).into(); + output + }, + ) + .overwrite_script_function( + "element_product", + |_self: Val| { + let output: u32 = UVec3::element_product(_self).into(); + output + }, + ) + .overwrite_script_function( + "cmpeq", + |_self: Val, rhs: Val| { + let output: Val = UVec3::cmpeq(_self, rhs).into(); + output + }, + ) + .overwrite_script_function( + "cmpne", + |_self: Val, rhs: Val| { + let output: Val = UVec3::cmpne(_self, rhs).into(); + output + }, + ) + .overwrite_script_function( + "cmpge", + |_self: Val, rhs: Val| { + let output: Val = UVec3::cmpge(_self, rhs).into(); + output + }, + ) + .overwrite_script_function( + "cmpgt", + |_self: Val, rhs: Val| { + let output: Val = UVec3::cmpgt(_self, rhs).into(); + output + }, + ) + .overwrite_script_function( + "cmple", + |_self: Val, rhs: Val| { + let output: Val = UVec3::cmple(_self, rhs).into(); + output + }, + ) + .overwrite_script_function( + "cmplt", + |_self: Val, rhs: Val| { + let output: Val = UVec3::cmplt(_self, rhs).into(); + output + }, + ) + .overwrite_script_function( + "length_squared", + |_self: Val| { + let output: u32 = UVec3::length_squared(_self).into(); + output + }, + ) + .overwrite_script_function( + "as_vec3", + |_self: Ref| { + let output: Val = UVec3::as_vec3(_self).into(); + output + }, + ) + .overwrite_script_function( + "as_vec3a", + |_self: Ref| { + let output: Val = UVec3::as_vec3a(_self).into(); + output + }, + ) + .overwrite_script_function( + "as_dvec3", + |_self: Ref| { + let output: Val = UVec3::as_dvec3(_self).into(); + output + }, + ) + .overwrite_script_function( + "as_ivec3", + |_self: Ref| { + let output: Val = UVec3::as_ivec3(_self).into(); + output + }, + ) + .overwrite_script_function( + "as_i64vec3", + |_self: Ref| { + let output: Val = UVec3::as_i64vec3(_self) + .into(); + output + }, + ) + .overwrite_script_function( + "as_u64vec3", + |_self: Ref| { + let output: Val = UVec3::as_u64vec3(_self) + .into(); + output + }, + ) + .overwrite_script_function( + "wrapping_add", + |_self: Val, rhs: Val| { + let output: Val = UVec3::wrapping_add(_self, rhs) + .into(); + output + }, + ) + .overwrite_script_function( + "wrapping_sub", + |_self: Val, rhs: Val| { + let output: Val = UVec3::wrapping_sub(_self, rhs) + .into(); + output + }, + ) + .overwrite_script_function( + "wrapping_mul", + |_self: Val, rhs: Val| { + let output: Val = UVec3::wrapping_mul(_self, rhs) + .into(); + output + }, + ) + .overwrite_script_function( + "wrapping_div", + |_self: Val, rhs: Val| { + let output: Val = UVec3::wrapping_div(_self, rhs) + .into(); + output + }, + ) + .overwrite_script_function( + "saturating_add", + |_self: Val, rhs: Val| { + let output: Val = UVec3::saturating_add( + _self, + rhs, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "saturating_sub", + |_self: Val, rhs: Val| { + let output: Val = UVec3::saturating_sub( + _self, + rhs, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "saturating_mul", + |_self: Val, rhs: Val| { + let output: Val = UVec3::saturating_mul( + _self, + rhs, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "saturating_div", + |_self: Val, rhs: Val| { + let output: Val = UVec3::saturating_div( + _self, + rhs, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "wrapping_add_signed", + |_self: Val, rhs: Val| { + let output: Val = UVec3::wrapping_add_signed( + _self, + rhs, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "saturating_add_signed", + |_self: Val, rhs: Val| { + let output: Val = UVec3::saturating_add_signed( + _self, + rhs, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "add", + |_self: Val, rhs: Val| { + let output: Val = UVec3::add(_self, rhs).into(); + output + }, + ) + .overwrite_script_function( + "sub", + |_self: Val, rhs: Ref| { + let output: Val = UVec3::sub(_self, rhs).into(); + output + }, + ) + .overwrite_script_function( + "mul", + |_self: Val, rhs: u32| { + let output: Val = UVec3::mul(_self, rhs).into(); + output + }, + ) + .overwrite_script_function( + "sub", + |_self: Val, rhs: u32| { + let output: Val = UVec3::sub(_self, rhs).into(); + output + }, + ) + .overwrite_script_function( + "mul", + |_self: Val, rhs: Val| { + let output: Val = UVec3::mul(_self, rhs).into(); + output + }, + ) + .overwrite_script_function( + "sub", + |_self: Val, rhs: Val| { + let output: Val = UVec3::sub(_self, rhs).into(); + output + }, + ) + .overwrite_script_function( + "rem", + |_self: Val, rhs: u32| { + let output: Val = UVec3::rem(_self, rhs).into(); + output + }, + ) + .overwrite_script_function( + "div", + |_self: Val, rhs: Val| { + let output: Val = UVec3::div(_self, rhs).into(); + output + }, + ) + .overwrite_script_function( + "assert_receiver_is_total_eq", + |_self: Ref| { + let output: () = UVec3::assert_receiver_is_total_eq(_self).into(); + output + }, + ) + .overwrite_script_function( + "add", + |_self: Val, rhs: u32| { + let output: Val = UVec3::add(_self, rhs).into(); + output + }, + ) + .overwrite_script_function( + "mul", + |_self: Val, rhs: Ref| { + let output: Val = UVec3::mul(_self, rhs).into(); + output + }, + ) + .overwrite_script_function( + "clone", + |_self: Ref| { + let output: Val = UVec3::clone(_self).into(); + output + }, + ) + .overwrite_script_function( + "rem", + |_self: Val, rhs: Val| { + let output: Val = UVec3::rem(_self, rhs).into(); + output + }, + ) + .overwrite_script_function( + "eq", + |_self: Ref, other: Ref| { + let output: bool = UVec3::eq(_self, other).into(); + output + }, + ) + .overwrite_script_function( + "div", + |_self: Val, rhs: Ref| { + let output: Val = UVec3::div(_self, rhs).into(); + output + }, + ); + NamespaceBuilder::::new(world) + .overwrite_script_function( + "assert_receiver_is_total_eq", + |_self: Ref| { + let output: () = UVec4::assert_receiver_is_total_eq(_self).into(); + output + }, + ) + .overwrite_script_function( + "mul", + |_self: Val, rhs: Ref| { + let output: Val = UVec4::mul(_self, rhs).into(); + output + }, + ) + .overwrite_script_function( + "add", + |_self: Val, rhs: Val| { + let output: Val = UVec4::add(_self, rhs).into(); + output + }, + ) + .overwrite_script_function( + "new", + |x: u32, y: u32, z: u32, w: u32| { + let output: Val = UVec4::new(x, y, z, w).into(); + output + }, + ) + .overwrite_script_function( + "splat", + |v: u32| { + let output: Val = UVec4::splat(v).into(); + output + }, + ) + .overwrite_script_function( + "select", + | + mask: Val, + if_true: Val, + if_false: Val| + { + let output: Val = UVec4::select( + mask, + if_true, + if_false, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "from_array", + |a: [u32; 4]| { + let output: Val = UVec4::from_array(a).into(); + output + }, + ) + .overwrite_script_function( + "to_array", + |_self: Ref| { + let output: [u32; 4] = UVec4::to_array(_self).into(); + output + }, + ) + .overwrite_script_function( + "truncate", + |_self: Val| { + let output: Val = UVec4::truncate(_self).into(); + output + }, + ) + .overwrite_script_function( + "with_x", + |_self: Val, x: u32| { + let output: Val = UVec4::with_x(_self, x).into(); + output + }, + ) + .overwrite_script_function( + "with_y", + |_self: Val, y: u32| { + let output: Val = UVec4::with_y(_self, y).into(); + output + }, + ) + .overwrite_script_function( + "with_z", + |_self: Val, z: u32| { + let output: Val = UVec4::with_z(_self, z).into(); + output + }, + ) + .overwrite_script_function( + "with_w", + |_self: Val, w: u32| { + let output: Val = UVec4::with_w(_self, w).into(); + output + }, + ) + .overwrite_script_function( + "dot", + |_self: Val, rhs: Val| { + let output: u32 = UVec4::dot(_self, rhs).into(); + output + }, + ) + .overwrite_script_function( + "dot_into_vec", + |_self: Val, rhs: Val| { + let output: Val = UVec4::dot_into_vec(_self, rhs) + .into(); + output + }, + ) + .overwrite_script_function( + "min", + |_self: Val, rhs: Val| { + let output: Val = UVec4::min(_self, rhs).into(); + output + }, + ) + .overwrite_script_function( + "max", + |_self: Val, rhs: Val| { + let output: Val = UVec4::max(_self, rhs).into(); + output + }, + ) + .overwrite_script_function( + "clamp", + | + _self: Val, + min: Val, + max: Val| + { + let output: Val = UVec4::clamp(_self, min, max) + .into(); + output + }, + ) + .overwrite_script_function( + "min_element", + |_self: Val| { + let output: u32 = UVec4::min_element(_self).into(); + output + }, + ) + .overwrite_script_function( + "max_element", + |_self: Val| { + let output: u32 = UVec4::max_element(_self).into(); + output + }, + ) + .overwrite_script_function( + "element_sum", + |_self: Val| { + let output: u32 = UVec4::element_sum(_self).into(); + output + }, + ) + .overwrite_script_function( + "element_product", + |_self: Val| { + let output: u32 = UVec4::element_product(_self).into(); + output + }, + ) + .overwrite_script_function( + "cmpeq", + |_self: Val, rhs: Val| { + let output: Val = UVec4::cmpeq(_self, rhs).into(); + output + }, + ) + .overwrite_script_function( + "cmpne", + |_self: Val, rhs: Val| { + let output: Val = UVec4::cmpne(_self, rhs).into(); + output + }, + ) + .overwrite_script_function( + "cmpge", + |_self: Val, rhs: Val| { + let output: Val = UVec4::cmpge(_self, rhs).into(); + output + }, + ) + .overwrite_script_function( + "cmpgt", + |_self: Val, rhs: Val| { + let output: Val = UVec4::cmpgt(_self, rhs).into(); + output + }, + ) + .overwrite_script_function( + "cmple", + |_self: Val, rhs: Val| { + let output: Val = UVec4::cmple(_self, rhs).into(); + output + }, + ) + .overwrite_script_function( + "cmplt", + |_self: Val, rhs: Val| { + let output: Val = UVec4::cmplt(_self, rhs).into(); + output + }, + ) + .overwrite_script_function( + "length_squared", + |_self: Val| { + let output: u32 = UVec4::length_squared(_self).into(); + output + }, + ) + .overwrite_script_function( + "as_vec4", + |_self: Ref| { + let output: Val = UVec4::as_vec4(_self).into(); + output + }, + ) + .overwrite_script_function( + "as_dvec4", + |_self: Ref| { + let output: Val = UVec4::as_dvec4(_self).into(); + output + }, + ) + .overwrite_script_function( + "as_ivec4", + |_self: Ref| { + let output: Val = UVec4::as_ivec4(_self).into(); + output + }, + ) + .overwrite_script_function( + "as_i64vec4", + |_self: Ref| { + let output: Val = UVec4::as_i64vec4(_self) + .into(); + output + }, + ) + .overwrite_script_function( + "as_u64vec4", + |_self: Ref| { + let output: Val = UVec4::as_u64vec4(_self) + .into(); + output + }, + ) + .overwrite_script_function( + "wrapping_add", + |_self: Val, rhs: Val| { + let output: Val = UVec4::wrapping_add(_self, rhs) + .into(); + output + }, + ) + .overwrite_script_function( + "wrapping_sub", + |_self: Val, rhs: Val| { + let output: Val = UVec4::wrapping_sub(_self, rhs) + .into(); + output + }, + ) + .overwrite_script_function( + "wrapping_mul", + |_self: Val, rhs: Val| { + let output: Val = UVec4::wrapping_mul(_self, rhs) + .into(); + output + }, + ) + .overwrite_script_function( + "wrapping_div", + |_self: Val, rhs: Val| { + let output: Val = UVec4::wrapping_div(_self, rhs) + .into(); + output + }, + ) + .overwrite_script_function( + "saturating_add", + |_self: Val, rhs: Val| { + let output: Val = UVec4::saturating_add( + _self, + rhs, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "saturating_sub", + |_self: Val, rhs: Val| { + let output: Val = UVec4::saturating_sub( + _self, + rhs, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "saturating_mul", + |_self: Val, rhs: Val| { + let output: Val = UVec4::saturating_mul( + _self, + rhs, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "saturating_div", + |_self: Val, rhs: Val| { + let output: Val = UVec4::saturating_div( + _self, + rhs, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "wrapping_add_signed", + |_self: Val, rhs: Val| { + let output: Val = UVec4::wrapping_add_signed( + _self, + rhs, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "saturating_add_signed", + |_self: Val, rhs: Val| { + let output: Val = UVec4::saturating_add_signed( + _self, + rhs, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "clone", + |_self: Ref| { + let output: Val = UVec4::clone(_self).into(); + output + }, + ) + .overwrite_script_function( + "sub", + |_self: Val, rhs: Ref| { + let output: Val = UVec4::sub(_self, rhs).into(); + output + }, + ) + .overwrite_script_function( + "div", + |_self: Val, rhs: Val| { + let output: Val = UVec4::div(_self, rhs).into(); + output + }, + ) + .overwrite_script_function( + "rem", + |_self: Val, rhs: Val| { + let output: Val = UVec4::rem(_self, rhs).into(); + output + }, + ) + .overwrite_script_function( + "mul", + |_self: Val, rhs: u32| { + let output: Val = UVec4::mul(_self, rhs).into(); + output + }, + ) + .overwrite_script_function( + "add", + |_self: Val, rhs: Ref| { + let output: Val = UVec4::add(_self, rhs).into(); + output + }, + ) + .overwrite_script_function( + "sub", + |_self: Val, rhs: Val| { + let output: Val = UVec4::sub(_self, rhs).into(); + output + }, + ) + .overwrite_script_function( + "sub", + |_self: Val, rhs: u32| { + let output: Val = UVec4::sub(_self, rhs).into(); + output + }, + ) + .overwrite_script_function( + "mul", + |_self: Val, rhs: Val| { + let output: Val = UVec4::mul(_self, rhs).into(); + output + }, + ) + .overwrite_script_function( + "rem", + |_self: Val, rhs: Ref| { + let output: Val = UVec4::rem(_self, rhs).into(); + output + }, + ) + .overwrite_script_function( + "div", + |_self: Val, rhs: Ref| { + let output: Val = UVec4::div(_self, rhs).into(); + output + }, + ) + .overwrite_script_function( + "rem", + |_self: Val, rhs: u32| { + let output: Val = UVec4::rem(_self, rhs).into(); + output + }, + ) + .overwrite_script_function( + "div", + |_self: Val, rhs: u32| { + let output: Val = UVec4::div(_self, rhs).into(); + output + }, + ) + .overwrite_script_function( + "eq", + |_self: Ref, other: Ref| { + let output: bool = UVec4::eq(_self, other).into(); + output + }, + ) + .overwrite_script_function( + "add", + |_self: Val, rhs: u32| { + let output: Val = UVec4::add(_self, rhs).into(); + output + }, + ); + NamespaceBuilder::::new(world) + .overwrite_script_function( + "assert_receiver_is_total_eq", + |_self: Ref| { + let output: () = U64Vec2::assert_receiver_is_total_eq(_self).into(); + output + }, + ) + .overwrite_script_function( + "sub", + |_self: Val, rhs: Val| { + let output: Val = U64Vec2::sub(_self, rhs) + .into(); + output + }, + ) + .overwrite_script_function( + "add", + |_self: Val, rhs: u64| { + let output: Val = U64Vec2::add(_self, rhs) + .into(); + output + }, + ) + .overwrite_script_function( + "rem", + |_self: Val, rhs: u64| { + let output: Val = U64Vec2::rem(_self, rhs) + .into(); + output + }, + ) + .overwrite_script_function( + "sub", + |_self: Val, rhs: Ref| { + let output: Val = U64Vec2::sub(_self, rhs) + .into(); + output + }, + ) + .overwrite_script_function( + "div", + |_self: Val, rhs: u64| { + let output: Val = U64Vec2::div(_self, rhs) + .into(); + output + }, + ) + .overwrite_script_function( + "div", + |_self: Val, rhs: Ref| { + let output: Val = U64Vec2::div(_self, rhs) + .into(); + output + }, + ) + .overwrite_script_function( + "div", + |_self: Val, rhs: Val| { + let output: Val = U64Vec2::div(_self, rhs) + .into(); + output + }, + ) + .overwrite_script_function( + "rem", + |_self: Val, rhs: Ref| { + let output: Val = U64Vec2::rem(_self, rhs) + .into(); + output + }, + ) + .overwrite_script_function( + "sub", + |_self: Val, rhs: u64| { + let output: Val = U64Vec2::sub(_self, rhs) + .into(); + output + }, + ) + .overwrite_script_function( + "mul", + |_self: Val, rhs: Ref| { + let output: Val = U64Vec2::mul(_self, rhs) + .into(); + output + }, + ) + .overwrite_script_function( + "eq", + |_self: Ref, other: Ref| { + let output: bool = U64Vec2::eq(_self, other).into(); + output + }, + ) + .overwrite_script_function( + "new", + |x: u64, y: u64| { + let output: Val = U64Vec2::new(x, y).into(); + output + }, + ) + .overwrite_script_function( + "splat", + |v: u64| { + let output: Val = U64Vec2::splat(v).into(); + output + }, + ) + .overwrite_script_function( + "select", + | + mask: Val, + if_true: Val, + if_false: Val| + { + let output: Val = U64Vec2::select( + mask, + if_true, + if_false, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "from_array", + |a: [u64; 2]| { + let output: Val = U64Vec2::from_array(a).into(); + output + }, + ) + .overwrite_script_function( + "to_array", + |_self: Ref| { + let output: [u64; 2] = U64Vec2::to_array(_self).into(); + output + }, + ) + .overwrite_script_function( + "extend", + |_self: Val, z: u64| { + let output: Val = U64Vec2::extend(_self, z) + .into(); + output + }, + ) + .overwrite_script_function( + "with_x", + |_self: Val, x: u64| { + let output: Val = U64Vec2::with_x(_self, x) + .into(); + output + }, + ) + .overwrite_script_function( + "with_y", + |_self: Val, y: u64| { + let output: Val = U64Vec2::with_y(_self, y) + .into(); + output + }, + ) + .overwrite_script_function( + "dot", + |_self: Val, rhs: Val| { + let output: u64 = U64Vec2::dot(_self, rhs).into(); + output + }, + ) + .overwrite_script_function( + "dot_into_vec", + |_self: Val, rhs: Val| { + let output: Val = U64Vec2::dot_into_vec( + _self, + rhs, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "min", + |_self: Val, rhs: Val| { + let output: Val = U64Vec2::min(_self, rhs) + .into(); + output + }, + ) + .overwrite_script_function( + "max", + |_self: Val, rhs: Val| { + let output: Val = U64Vec2::max(_self, rhs) + .into(); + output + }, + ) + .overwrite_script_function( + "clamp", + | + _self: Val, + min: Val, + max: Val| + { + let output: Val = U64Vec2::clamp( + _self, + min, + max, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "min_element", + |_self: Val| { + let output: u64 = U64Vec2::min_element(_self).into(); + output + }, + ) + .overwrite_script_function( + "max_element", + |_self: Val| { + let output: u64 = U64Vec2::max_element(_self).into(); + output + }, + ) + .overwrite_script_function( + "element_sum", + |_self: Val| { + let output: u64 = U64Vec2::element_sum(_self).into(); + output + }, + ) + .overwrite_script_function( + "element_product", + |_self: Val| { + let output: u64 = U64Vec2::element_product(_self).into(); + output + }, + ) + .overwrite_script_function( + "cmpeq", + |_self: Val, rhs: Val| { + let output: Val = U64Vec2::cmpeq(_self, rhs) + .into(); + output + }, + ) + .overwrite_script_function( + "cmpne", + |_self: Val, rhs: Val| { + let output: Val = U64Vec2::cmpne(_self, rhs) + .into(); + output + }, + ) + .overwrite_script_function( + "cmpge", + |_self: Val, rhs: Val| { + let output: Val = U64Vec2::cmpge(_self, rhs) + .into(); + output + }, + ) + .overwrite_script_function( + "cmpgt", + |_self: Val, rhs: Val| { + let output: Val = U64Vec2::cmpgt(_self, rhs) + .into(); + output + }, + ) + .overwrite_script_function( + "cmple", + |_self: Val, rhs: Val| { + let output: Val = U64Vec2::cmple(_self, rhs) + .into(); + output + }, + ) + .overwrite_script_function( + "cmplt", + |_self: Val, rhs: Val| { + let output: Val = U64Vec2::cmplt(_self, rhs) + .into(); + output + }, + ) + .overwrite_script_function( + "length_squared", + |_self: Val| { + let output: u64 = U64Vec2::length_squared(_self).into(); + output + }, + ) + .overwrite_script_function( + "as_vec2", + |_self: Ref| { + let output: Val = U64Vec2::as_vec2(_self).into(); + output + }, + ) + .overwrite_script_function( + "as_dvec2", + |_self: Ref| { + let output: Val = U64Vec2::as_dvec2(_self).into(); + output + }, + ) + .overwrite_script_function( + "as_ivec2", + |_self: Ref| { + let output: Val = U64Vec2::as_ivec2(_self).into(); + output + }, + ) + .overwrite_script_function( + "as_uvec2", + |_self: Ref| { + let output: Val = U64Vec2::as_uvec2(_self).into(); + output + }, + ) + .overwrite_script_function( + "as_i64vec2", + |_self: Ref| { + let output: Val = U64Vec2::as_i64vec2(_self) + .into(); + output + }, + ) + .overwrite_script_function( + "wrapping_add", + |_self: Val, rhs: Val| { + let output: Val = U64Vec2::wrapping_add( + _self, + rhs, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "wrapping_sub", + |_self: Val, rhs: Val| { + let output: Val = U64Vec2::wrapping_sub( + _self, + rhs, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "wrapping_mul", + |_self: Val, rhs: Val| { + let output: Val = U64Vec2::wrapping_mul( + _self, + rhs, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "wrapping_div", + |_self: Val, rhs: Val| { + let output: Val = U64Vec2::wrapping_div( + _self, + rhs, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "saturating_add", + |_self: Val, rhs: Val| { + let output: Val = U64Vec2::saturating_add( + _self, + rhs, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "saturating_sub", + |_self: Val, rhs: Val| { + let output: Val = U64Vec2::saturating_sub( + _self, + rhs, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "saturating_mul", + |_self: Val, rhs: Val| { + let output: Val = U64Vec2::saturating_mul( + _self, + rhs, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "saturating_div", + |_self: Val, rhs: Val| { + let output: Val = U64Vec2::saturating_div( + _self, + rhs, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "wrapping_add_signed", + |_self: Val, rhs: Val| { + let output: Val = U64Vec2::wrapping_add_signed( + _self, + rhs, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "saturating_add_signed", + |_self: Val, rhs: Val| { + let output: Val = U64Vec2::saturating_add_signed( + _self, + rhs, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "mul", + |_self: Val, rhs: u64| { + let output: Val = U64Vec2::mul(_self, rhs) + .into(); + output + }, + ) + .overwrite_script_function( + "clone", + |_self: Ref| { + let output: Val = U64Vec2::clone(_self).into(); + output + }, + ) + .overwrite_script_function( + "mul", + |_self: Val, rhs: Val| { + let output: Val = U64Vec2::mul(_self, rhs) + .into(); + output + }, + ) + .overwrite_script_function( + "add", + |_self: Val, rhs: Val| { + let output: Val = U64Vec2::add(_self, rhs) + .into(); + output + }, + ) + .overwrite_script_function( + "rem", + |_self: Val, rhs: Val| { + let output: Val = U64Vec2::rem(_self, rhs) + .into(); + output + }, + ) + .overwrite_script_function( + "add", + |_self: Val, rhs: Ref| { + let output: Val = U64Vec2::add(_self, rhs) + .into(); + output + }, + ); + NamespaceBuilder::::new(world) + .overwrite_script_function( + "mul", + |_self: Val, rhs: Val| { + let output: Val = U64Vec3::mul(_self, rhs) + .into(); + output + }, + ) + .overwrite_script_function( + "sub", + |_self: Val, rhs: Ref| { + let output: Val = U64Vec3::sub(_self, rhs) + .into(); + output + }, + ) + .overwrite_script_function( + "div", + |_self: Val, rhs: Ref| { + let output: Val = U64Vec3::div(_self, rhs) + .into(); + output + }, + ) + .overwrite_script_function( + "rem", + |_self: Val, rhs: Val| { + let output: Val = U64Vec3::rem(_self, rhs) + .into(); + output + }, + ) + .overwrite_script_function( + "div", + |_self: Val, rhs: Val| { + let output: Val = U64Vec3::div(_self, rhs) + .into(); + output + }, + ) + .overwrite_script_function( + "div", + |_self: Val, rhs: u64| { + let output: Val = U64Vec3::div(_self, rhs) + .into(); + output + }, + ) + .overwrite_script_function( + "mul", + |_self: Val, rhs: u64| { + let output: Val = U64Vec3::mul(_self, rhs) + .into(); + output + }, + ) + .overwrite_script_function( + "mul", + |_self: Val, rhs: Ref| { + let output: Val = U64Vec3::mul(_self, rhs) + .into(); + output + }, + ) + .overwrite_script_function( + "rem", + |_self: Val, rhs: Ref| { + let output: Val = U64Vec3::rem(_self, rhs) + .into(); + output + }, + ) + .overwrite_script_function( + "add", + |_self: Val, rhs: Val| { + let output: Val = U64Vec3::add(_self, rhs) + .into(); + output + }, + ) + .overwrite_script_function( + "add", + |_self: Val, rhs: u64| { + let output: Val = U64Vec3::add(_self, rhs) + .into(); + output + }, + ) + .overwrite_script_function( + "sub", + |_self: Val, rhs: Val| { + let output: Val = U64Vec3::sub(_self, rhs) + .into(); + output + }, + ) + .overwrite_script_function( + "sub", + |_self: Val, rhs: u64| { + let output: Val = U64Vec3::sub(_self, rhs) + .into(); + output + }, + ) + .overwrite_script_function( + "new", + |x: u64, y: u64, z: u64| { + let output: Val = U64Vec3::new(x, y, z).into(); + output + }, + ) + .overwrite_script_function( + "splat", + |v: u64| { + let output: Val = U64Vec3::splat(v).into(); + output + }, + ) + .overwrite_script_function( + "select", + | + mask: Val, + if_true: Val, + if_false: Val| + { + let output: Val = U64Vec3::select( + mask, + if_true, + if_false, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "from_array", + |a: [u64; 3]| { + let output: Val = U64Vec3::from_array(a).into(); + output + }, + ) + .overwrite_script_function( + "to_array", + |_self: Ref| { + let output: [u64; 3] = U64Vec3::to_array(_self).into(); + output + }, + ) + .overwrite_script_function( + "extend", + |_self: Val, w: u64| { + let output: Val = U64Vec3::extend(_self, w) + .into(); + output + }, + ) + .overwrite_script_function( + "truncate", + |_self: Val| { + let output: Val = U64Vec3::truncate(_self) + .into(); + output + }, + ) + .overwrite_script_function( + "with_x", + |_self: Val, x: u64| { + let output: Val = U64Vec3::with_x(_self, x) + .into(); + output + }, + ) + .overwrite_script_function( + "with_y", + |_self: Val, y: u64| { + let output: Val = U64Vec3::with_y(_self, y) + .into(); + output + }, + ) + .overwrite_script_function( + "with_z", + |_self: Val, z: u64| { + let output: Val = U64Vec3::with_z(_self, z) + .into(); + output + }, + ) + .overwrite_script_function( + "dot", + |_self: Val, rhs: Val| { + let output: u64 = U64Vec3::dot(_self, rhs).into(); + output + }, + ) + .overwrite_script_function( + "dot_into_vec", + |_self: Val, rhs: Val| { + let output: Val = U64Vec3::dot_into_vec( + _self, + rhs, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "cross", + |_self: Val, rhs: Val| { + let output: Val = U64Vec3::cross(_self, rhs) + .into(); + output + }, + ) + .overwrite_script_function( + "min", + |_self: Val, rhs: Val| { + let output: Val = U64Vec3::min(_self, rhs) + .into(); + output + }, + ) + .overwrite_script_function( + "max", + |_self: Val, rhs: Val| { + let output: Val = U64Vec3::max(_self, rhs) + .into(); + output + }, + ) + .overwrite_script_function( + "clamp", + | + _self: Val, + min: Val, + max: Val| + { + let output: Val = U64Vec3::clamp( + _self, + min, + max, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "min_element", + |_self: Val| { + let output: u64 = U64Vec3::min_element(_self).into(); + output + }, + ) + .overwrite_script_function( + "max_element", + |_self: Val| { + let output: u64 = U64Vec3::max_element(_self).into(); + output + }, + ) + .overwrite_script_function( + "element_sum", + |_self: Val| { + let output: u64 = U64Vec3::element_sum(_self).into(); + output + }, + ) + .overwrite_script_function( + "element_product", + |_self: Val| { + let output: u64 = U64Vec3::element_product(_self).into(); + output + }, + ) + .overwrite_script_function( + "cmpeq", + |_self: Val, rhs: Val| { + let output: Val = U64Vec3::cmpeq(_self, rhs) + .into(); + output + }, + ) + .overwrite_script_function( + "cmpne", + |_self: Val, rhs: Val| { + let output: Val = U64Vec3::cmpne(_self, rhs) + .into(); + output + }, + ) + .overwrite_script_function( + "cmpge", + |_self: Val, rhs: Val| { + let output: Val = U64Vec3::cmpge(_self, rhs) + .into(); + output + }, + ) + .overwrite_script_function( + "cmpgt", + |_self: Val, rhs: Val| { + let output: Val = U64Vec3::cmpgt(_self, rhs) + .into(); + output + }, + ) + .overwrite_script_function( + "cmple", + |_self: Val, rhs: Val| { + let output: Val = U64Vec3::cmple(_self, rhs) + .into(); + output + }, + ) + .overwrite_script_function( + "cmplt", + |_self: Val, rhs: Val| { + let output: Val = U64Vec3::cmplt(_self, rhs) + .into(); + output + }, + ) + .overwrite_script_function( + "length_squared", + |_self: Val| { + let output: u64 = U64Vec3::length_squared(_self).into(); + output + }, + ) + .overwrite_script_function( + "as_vec3", + |_self: Ref| { + let output: Val = U64Vec3::as_vec3(_self).into(); + output + }, + ) + .overwrite_script_function( + "as_vec3a", + |_self: Ref| { + let output: Val = U64Vec3::as_vec3a(_self).into(); + output + }, + ) + .overwrite_script_function( + "as_dvec3", + |_self: Ref| { + let output: Val = U64Vec3::as_dvec3(_self).into(); + output + }, + ) + .overwrite_script_function( + "as_ivec3", + |_self: Ref| { + let output: Val = U64Vec3::as_ivec3(_self).into(); + output + }, + ) + .overwrite_script_function( + "as_uvec3", + |_self: Ref| { + let output: Val = U64Vec3::as_uvec3(_self).into(); + output + }, + ) + .overwrite_script_function( + "as_i64vec3", + |_self: Ref| { + let output: Val = U64Vec3::as_i64vec3(_self) + .into(); + output + }, + ) + .overwrite_script_function( + "wrapping_add", + |_self: Val, rhs: Val| { + let output: Val = U64Vec3::wrapping_add( + _self, + rhs, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "wrapping_sub", + |_self: Val, rhs: Val| { + let output: Val = U64Vec3::wrapping_sub( + _self, + rhs, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "wrapping_mul", + |_self: Val, rhs: Val| { + let output: Val = U64Vec3::wrapping_mul( + _self, + rhs, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "wrapping_div", + |_self: Val, rhs: Val| { + let output: Val = U64Vec3::wrapping_div( + _self, + rhs, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "saturating_add", + |_self: Val, rhs: Val| { + let output: Val = U64Vec3::saturating_add( + _self, + rhs, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "saturating_sub", + |_self: Val, rhs: Val| { + let output: Val = U64Vec3::saturating_sub( + _self, + rhs, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "saturating_mul", + |_self: Val, rhs: Val| { + let output: Val = U64Vec3::saturating_mul( + _self, + rhs, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "saturating_div", + |_self: Val, rhs: Val| { + let output: Val = U64Vec3::saturating_div( + _self, + rhs, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "wrapping_add_signed", + |_self: Val, rhs: Val| { + let output: Val = U64Vec3::wrapping_add_signed( + _self, + rhs, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "saturating_add_signed", + |_self: Val, rhs: Val| { + let output: Val = U64Vec3::saturating_add_signed( + _self, + rhs, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "rem", + |_self: Val, rhs: u64| { + let output: Val = U64Vec3::rem(_self, rhs) + .into(); + output + }, + ) + .overwrite_script_function( + "add", + |_self: Val, rhs: Ref| { + let output: Val = U64Vec3::add(_self, rhs) + .into(); + output + }, + ) + .overwrite_script_function( + "eq", + |_self: Ref, other: Ref| { + let output: bool = U64Vec3::eq(_self, other).into(); + output + }, + ) + .overwrite_script_function( + "assert_receiver_is_total_eq", + |_self: Ref| { + let output: () = U64Vec3::assert_receiver_is_total_eq(_self).into(); + output + }, + ) + .overwrite_script_function( + "clone", + |_self: Ref| { + let output: Val = U64Vec3::clone(_self).into(); + output + }, + ); + NamespaceBuilder::::new(world) + .overwrite_script_function( + "rem", + |_self: Val, rhs: Val| { + let output: Val = U64Vec4::rem(_self, rhs) + .into(); + output + }, + ) + .overwrite_script_function( + "mul", + |_self: Val, rhs: Ref| { + let output: Val = U64Vec4::mul(_self, rhs) + .into(); + output + }, + ) + .overwrite_script_function( + "sub", + |_self: Val, rhs: Val| { + let output: Val = U64Vec4::sub(_self, rhs) + .into(); + output + }, + ) + .overwrite_script_function( + "rem", + |_self: Val, rhs: Ref| { + let output: Val = U64Vec4::rem(_self, rhs) + .into(); + output + }, + ) + .overwrite_script_function( + "assert_receiver_is_total_eq", + |_self: Ref| { + let output: () = U64Vec4::assert_receiver_is_total_eq(_self).into(); + output + }, + ) + .overwrite_script_function( + "eq", + |_self: Ref, other: Ref| { + let output: bool = U64Vec4::eq(_self, other).into(); + output + }, + ) + .overwrite_script_function( + "clone", + |_self: Ref| { + let output: Val = U64Vec4::clone(_self).into(); + output + }, + ) + .overwrite_script_function( + "div", + |_self: Val, rhs: Val| { + let output: Val = U64Vec4::div(_self, rhs) + .into(); + output + }, + ) + .overwrite_script_function( + "div", + |_self: Val, rhs: u64| { + let output: Val = U64Vec4::div(_self, rhs) + .into(); + output + }, + ) + .overwrite_script_function( + "add", + |_self: Val, rhs: Val| { + let output: Val = U64Vec4::add(_self, rhs) + .into(); + output + }, + ) + .overwrite_script_function( + "mul", + |_self: Val, rhs: Val| { + let output: Val = U64Vec4::mul(_self, rhs) + .into(); + output + }, + ) + .overwrite_script_function( + "rem", + |_self: Val, rhs: u64| { + let output: Val = U64Vec4::rem(_self, rhs) + .into(); + output + }, + ) + .overwrite_script_function( + "mul", + |_self: Val, rhs: u64| { + let output: Val = U64Vec4::mul(_self, rhs) + .into(); + output + }, + ) + .overwrite_script_function( + "add", + |_self: Val, rhs: Ref| { + let output: Val = U64Vec4::add(_self, rhs) + .into(); + output + }, + ) + .overwrite_script_function( + "sub", + |_self: Val, rhs: Ref| { + let output: Val = U64Vec4::sub(_self, rhs) + .into(); + output + }, + ) + .overwrite_script_function( + "div", + |_self: Val, rhs: Ref| { + let output: Val = U64Vec4::div(_self, rhs) + .into(); + output + }, + ) + .overwrite_script_function( + "new", + |x: u64, y: u64, z: u64, w: u64| { + let output: Val = U64Vec4::new(x, y, z, w) + .into(); + output + }, + ) + .overwrite_script_function( + "splat", + |v: u64| { + let output: Val = U64Vec4::splat(v).into(); + output + }, + ) + .overwrite_script_function( + "select", + | + mask: Val, + if_true: Val, + if_false: Val| + { + let output: Val = U64Vec4::select( + mask, + if_true, + if_false, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "from_array", + |a: [u64; 4]| { + let output: Val = U64Vec4::from_array(a).into(); + output + }, + ) + .overwrite_script_function( + "to_array", + |_self: Ref| { + let output: [u64; 4] = U64Vec4::to_array(_self).into(); + output + }, + ) + .overwrite_script_function( + "truncate", + |_self: Val| { + let output: Val = U64Vec4::truncate(_self) + .into(); + output + }, + ) + .overwrite_script_function( + "with_x", + |_self: Val, x: u64| { + let output: Val = U64Vec4::with_x(_self, x) + .into(); + output + }, + ) + .overwrite_script_function( + "with_y", + |_self: Val, y: u64| { + let output: Val = U64Vec4::with_y(_self, y) + .into(); + output + }, + ) + .overwrite_script_function( + "with_z", + |_self: Val, z: u64| { + let output: Val = U64Vec4::with_z(_self, z) + .into(); + output + }, + ) + .overwrite_script_function( + "with_w", + |_self: Val, w: u64| { + let output: Val = U64Vec4::with_w(_self, w) + .into(); + output + }, + ) + .overwrite_script_function( + "dot", + |_self: Val, rhs: Val| { + let output: u64 = U64Vec4::dot(_self, rhs).into(); + output + }, + ) + .overwrite_script_function( + "dot_into_vec", + |_self: Val, rhs: Val| { + let output: Val = U64Vec4::dot_into_vec( + _self, + rhs, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "min", + |_self: Val, rhs: Val| { + let output: Val = U64Vec4::min(_self, rhs) + .into(); + output + }, + ) + .overwrite_script_function( + "max", + |_self: Val, rhs: Val| { + let output: Val = U64Vec4::max(_self, rhs) + .into(); + output + }, + ) + .overwrite_script_function( + "clamp", + | + _self: Val, + min: Val, + max: Val| + { + let output: Val = U64Vec4::clamp( + _self, + min, + max, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "min_element", + |_self: Val| { + let output: u64 = U64Vec4::min_element(_self).into(); + output + }, + ) + .overwrite_script_function( + "max_element", + |_self: Val| { + let output: u64 = U64Vec4::max_element(_self).into(); + output + }, + ) + .overwrite_script_function( + "element_sum", + |_self: Val| { + let output: u64 = U64Vec4::element_sum(_self).into(); + output + }, + ) + .overwrite_script_function( + "element_product", + |_self: Val| { + let output: u64 = U64Vec4::element_product(_self).into(); + output + }, + ) + .overwrite_script_function( + "cmpeq", + |_self: Val, rhs: Val| { + let output: Val = U64Vec4::cmpeq(_self, rhs) + .into(); + output + }, + ) + .overwrite_script_function( + "cmpne", + |_self: Val, rhs: Val| { + let output: Val = U64Vec4::cmpne(_self, rhs) + .into(); + output + }, + ) + .overwrite_script_function( + "cmpge", + |_self: Val, rhs: Val| { + let output: Val = U64Vec4::cmpge(_self, rhs) + .into(); + output + }, + ) + .overwrite_script_function( + "cmpgt", + |_self: Val, rhs: Val| { + let output: Val = U64Vec4::cmpgt(_self, rhs) + .into(); + output + }, + ) + .overwrite_script_function( + "cmple", + |_self: Val, rhs: Val| { + let output: Val = U64Vec4::cmple(_self, rhs) + .into(); + output + }, + ) + .overwrite_script_function( + "cmplt", + |_self: Val, rhs: Val| { + let output: Val = U64Vec4::cmplt(_self, rhs) + .into(); + output + }, + ) + .overwrite_script_function( + "length_squared", + |_self: Val| { + let output: u64 = U64Vec4::length_squared(_self).into(); + output + }, + ) + .overwrite_script_function( + "as_vec4", + |_self: Ref| { + let output: Val = U64Vec4::as_vec4(_self).into(); + output + }, + ) + .overwrite_script_function( + "as_dvec4", + |_self: Ref| { + let output: Val = U64Vec4::as_dvec4(_self).into(); + output + }, + ) + .overwrite_script_function( + "as_ivec4", + |_self: Ref| { + let output: Val = U64Vec4::as_ivec4(_self).into(); + output + }, + ) + .overwrite_script_function( + "as_uvec4", + |_self: Ref| { + let output: Val = U64Vec4::as_uvec4(_self).into(); + output + }, + ) + .overwrite_script_function( + "as_i64vec4", + |_self: Ref| { + let output: Val = U64Vec4::as_i64vec4(_self) + .into(); + output + }, + ) + .overwrite_script_function( + "wrapping_add", + |_self: Val, rhs: Val| { + let output: Val = U64Vec4::wrapping_add( + _self, + rhs, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "wrapping_sub", + |_self: Val, rhs: Val| { + let output: Val = U64Vec4::wrapping_sub( + _self, + rhs, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "wrapping_mul", + |_self: Val, rhs: Val| { + let output: Val = U64Vec4::wrapping_mul( + _self, + rhs, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "wrapping_div", + |_self: Val, rhs: Val| { + let output: Val = U64Vec4::wrapping_div( + _self, + rhs, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "saturating_add", + |_self: Val, rhs: Val| { + let output: Val = U64Vec4::saturating_add( + _self, + rhs, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "saturating_sub", + |_self: Val, rhs: Val| { + let output: Val = U64Vec4::saturating_sub( + _self, + rhs, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "saturating_mul", + |_self: Val, rhs: Val| { + let output: Val = U64Vec4::saturating_mul( + _self, + rhs, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "saturating_div", + |_self: Val, rhs: Val| { + let output: Val = U64Vec4::saturating_div( + _self, + rhs, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "wrapping_add_signed", + |_self: Val, rhs: Val| { + let output: Val = U64Vec4::wrapping_add_signed( + _self, + rhs, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "saturating_add_signed", + |_self: Val, rhs: Val| { + let output: Val = U64Vec4::saturating_add_signed( + _self, + rhs, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "sub", + |_self: Val, rhs: u64| { + let output: Val = U64Vec4::sub(_self, rhs) + .into(); + output + }, + ) + .overwrite_script_function( + "add", + |_self: Val, rhs: u64| { + let output: Val = U64Vec4::add(_self, rhs) + .into(); + output + }, + ); + NamespaceBuilder::::new(world) + .overwrite_script_function( + "mul", + |_self: Val, rhs: Val| { + let output: Val = Vec2::mul(_self, rhs).into(); + output + }, + ) + .overwrite_script_function( + "add", + |_self: Val, rhs: Val| { + let output: Val = Vec2::add(_self, rhs).into(); + output + }, + ) + .overwrite_script_function( + "mul", + |_self: Val, rhs: Ref| { + let output: Val = Vec2::mul(_self, rhs).into(); + output + }, + ) + .overwrite_script_function( + "div", + |_self: Val, rhs: f32| { + let output: Val = Vec2::div(_self, rhs).into(); + output + }, + ) + .overwrite_script_function( + "add", + |_self: Val, rhs: f32| { + let output: Val = Vec2::add(_self, rhs).into(); + output + }, + ) + .overwrite_script_function( + "sub", + |_self: Val, rhs: Val| { + let output: Val = Vec2::sub(_self, rhs).into(); + output + }, + ) + .overwrite_script_function( + "rem", + |_self: Val, rhs: Val| { + let output: Val = Vec2::rem(_self, rhs).into(); + output + }, + ) + .overwrite_script_function( + "new", + |x: f32, y: f32| { + let output: Val = Vec2::new(x, y).into(); + output + }, + ) + .overwrite_script_function( + "splat", + |v: f32| { + let output: Val = Vec2::splat(v).into(); + output + }, + ) + .overwrite_script_function( + "select", + | + mask: Val, + if_true: Val, + if_false: Val| + { + let output: Val = Vec2::select( + mask, + if_true, + if_false, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "from_array", + |a: [f32; 2]| { + let output: Val = Vec2::from_array(a).into(); + output + }, + ) + .overwrite_script_function( + "to_array", + |_self: Ref| { + let output: [f32; 2] = Vec2::to_array(_self).into(); + output + }, + ) + .overwrite_script_function( + "extend", + |_self: Val, z: f32| { + let output: Val = Vec2::extend(_self, z).into(); + output + }, + ) + .overwrite_script_function( + "with_x", + |_self: Val, x: f32| { + let output: Val = Vec2::with_x(_self, x).into(); + output + }, + ) + .overwrite_script_function( + "with_y", + |_self: Val, y: f32| { + let output: Val = Vec2::with_y(_self, y).into(); + output + }, + ) + .overwrite_script_function( + "dot", + |_self: Val, rhs: Val| { + let output: f32 = Vec2::dot(_self, rhs).into(); + output + }, + ) + .overwrite_script_function( + "dot_into_vec", + |_self: Val, rhs: Val| { + let output: Val = Vec2::dot_into_vec(_self, rhs) + .into(); + output + }, + ) + .overwrite_script_function( + "min", + |_self: Val, rhs: Val| { + let output: Val = Vec2::min(_self, rhs).into(); + output + }, + ) + .overwrite_script_function( + "max", + |_self: Val, rhs: Val| { + let output: Val = Vec2::max(_self, rhs).into(); + output + }, + ) + .overwrite_script_function( + "clamp", + | + _self: Val, + min: Val, + max: Val| + { + let output: Val = Vec2::clamp(_self, min, max) + .into(); + output + }, + ) + .overwrite_script_function( + "min_element", + |_self: Val| { + let output: f32 = Vec2::min_element(_self).into(); + output + }, + ) + .overwrite_script_function( + "max_element", + |_self: Val| { + let output: f32 = Vec2::max_element(_self).into(); + output + }, + ) + .overwrite_script_function( + "element_sum", + |_self: Val| { + let output: f32 = Vec2::element_sum(_self).into(); + output + }, + ) + .overwrite_script_function( + "element_product", + |_self: Val| { + let output: f32 = Vec2::element_product(_self).into(); + output + }, + ) + .overwrite_script_function( + "cmpeq", + |_self: Val, rhs: Val| { + let output: Val = Vec2::cmpeq(_self, rhs).into(); + output + }, + ) + .overwrite_script_function( + "cmpne", + |_self: Val, rhs: Val| { + let output: Val = Vec2::cmpne(_self, rhs).into(); + output + }, + ) + .overwrite_script_function( + "cmpge", + |_self: Val, rhs: Val| { + let output: Val = Vec2::cmpge(_self, rhs).into(); + output + }, + ) + .overwrite_script_function( + "cmpgt", + |_self: Val, rhs: Val| { + let output: Val = Vec2::cmpgt(_self, rhs).into(); + output + }, + ) + .overwrite_script_function( + "cmple", + |_self: Val, rhs: Val| { + let output: Val = Vec2::cmple(_self, rhs).into(); + output + }, + ) + .overwrite_script_function( + "cmplt", + |_self: Val, rhs: Val| { + let output: Val = Vec2::cmplt(_self, rhs).into(); + output + }, + ) + .overwrite_script_function( + "abs", + |_self: Val| { + let output: Val = Vec2::abs(_self).into(); + output + }, + ) + .overwrite_script_function( + "signum", + |_self: Val| { + let output: Val = Vec2::signum(_self).into(); + output + }, + ) + .overwrite_script_function( + "copysign", + |_self: Val, rhs: Val| { + let output: Val = Vec2::copysign(_self, rhs) + .into(); + output + }, + ) + .overwrite_script_function( + "is_negative_bitmask", + |_self: Val| { + let output: u32 = Vec2::is_negative_bitmask(_self).into(); + output + }, + ) + .overwrite_script_function( + "is_finite", + |_self: Val| { + let output: bool = Vec2::is_finite(_self).into(); + output + }, + ) + .overwrite_script_function( + "is_finite_mask", + |_self: Val| { + let output: Val = Vec2::is_finite_mask(_self) + .into(); + output + }, + ) + .overwrite_script_function( + "is_nan", + |_self: Val| { + let output: bool = Vec2::is_nan(_self).into(); + output + }, + ) + .overwrite_script_function( + "is_nan_mask", + |_self: Val| { + let output: Val = Vec2::is_nan_mask(_self).into(); + output + }, + ) + .overwrite_script_function( + "length", + |_self: Val| { + let output: f32 = Vec2::length(_self).into(); + output + }, + ) + .overwrite_script_function( + "length_squared", + |_self: Val| { + let output: f32 = Vec2::length_squared(_self).into(); + output + }, + ) + .overwrite_script_function( + "length_recip", + |_self: Val| { + let output: f32 = Vec2::length_recip(_self).into(); + output + }, + ) + .overwrite_script_function( + "distance", + |_self: Val, rhs: Val| { + let output: f32 = Vec2::distance(_self, rhs).into(); + output + }, + ) + .overwrite_script_function( + "distance_squared", + |_self: Val, rhs: Val| { + let output: f32 = Vec2::distance_squared(_self, rhs).into(); + output + }, + ) + .overwrite_script_function( + "div_euclid", + |_self: Val, rhs: Val| { + let output: Val = Vec2::div_euclid(_self, rhs) + .into(); + output + }, + ) + .overwrite_script_function( + "rem_euclid", + |_self: Val, rhs: Val| { + let output: Val = Vec2::rem_euclid(_self, rhs) + .into(); + output + }, + ) + .overwrite_script_function( + "normalize", + |_self: Val| { + let output: Val = Vec2::normalize(_self).into(); + output + }, + ) + .overwrite_script_function( + "normalize_or", + |_self: Val, fallback: Val| { + let output: Val = Vec2::normalize_or( + _self, + fallback, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "normalize_or_zero", + |_self: Val| { + let output: Val = Vec2::normalize_or_zero(_self) + .into(); + output + }, + ) + .overwrite_script_function( + "is_normalized", + |_self: Val| { + let output: bool = Vec2::is_normalized(_self).into(); + output + }, + ) + .overwrite_script_function( + "project_onto", + |_self: Val, rhs: Val| { + let output: Val = Vec2::project_onto(_self, rhs) + .into(); + output + }, + ) + .overwrite_script_function( + "reject_from", + |_self: Val, rhs: Val| { + let output: Val = Vec2::reject_from(_self, rhs) + .into(); + output + }, + ) + .overwrite_script_function( + "project_onto_normalized", + |_self: Val, rhs: Val| { + let output: Val = Vec2::project_onto_normalized( + _self, + rhs, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "reject_from_normalized", + |_self: Val, rhs: Val| { + let output: Val = Vec2::reject_from_normalized( + _self, + rhs, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "round", + |_self: Val| { + let output: Val = Vec2::round(_self).into(); + output + }, + ) + .overwrite_script_function( + "floor", + |_self: Val| { + let output: Val = Vec2::floor(_self).into(); + output + }, + ) + .overwrite_script_function( + "ceil", + |_self: Val| { + let output: Val = Vec2::ceil(_self).into(); + output + }, + ) + .overwrite_script_function( + "trunc", + |_self: Val| { + let output: Val = Vec2::trunc(_self).into(); + output + }, + ) + .overwrite_script_function( + "fract", + |_self: Val| { + let output: Val = Vec2::fract(_self).into(); + output + }, + ) + .overwrite_script_function( + "fract_gl", + |_self: Val| { + let output: Val = Vec2::fract_gl(_self).into(); + output + }, + ) + .overwrite_script_function( + "exp", + |_self: Val| { + let output: Val = Vec2::exp(_self).into(); + output + }, + ) + .overwrite_script_function( + "powf", + |_self: Val, n: f32| { + let output: Val = Vec2::powf(_self, n).into(); + output + }, + ) + .overwrite_script_function( + "recip", + |_self: Val| { + let output: Val = Vec2::recip(_self).into(); + output + }, + ) + .overwrite_script_function( + "lerp", + |_self: Val, rhs: Val, s: f32| { + let output: Val = Vec2::lerp(_self, rhs, s).into(); + output + }, + ) + .overwrite_script_function( + "move_towards", + |_self: Ref, rhs: Val, d: f32| { + let output: Val = Vec2::move_towards(_self, rhs, d) + .into(); + output + }, + ) + .overwrite_script_function( + "midpoint", + |_self: Val, rhs: Val| { + let output: Val = Vec2::midpoint(_self, rhs) + .into(); + output + }, + ) + .overwrite_script_function( + "abs_diff_eq", + | + _self: Val, + rhs: Val, + max_abs_diff: f32| + { + let output: bool = Vec2::abs_diff_eq(_self, rhs, max_abs_diff) + .into(); + output + }, + ) + .overwrite_script_function( + "clamp_length", + |_self: Val, min: f32, max: f32| { + let output: Val = Vec2::clamp_length( + _self, + min, + max, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "clamp_length_max", + |_self: Val, max: f32| { + let output: Val = Vec2::clamp_length_max( + _self, + max, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "clamp_length_min", + |_self: Val, min: f32| { + let output: Val = Vec2::clamp_length_min( + _self, + min, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "mul_add", + | + _self: Val, + a: Val, + b: Val| + { + let output: Val = Vec2::mul_add(_self, a, b) + .into(); + output + }, + ) + .overwrite_script_function( + "reflect", + |_self: Val, normal: Val| { + let output: Val = Vec2::reflect(_self, normal) + .into(); + output + }, + ) + .overwrite_script_function( + "refract", + |_self: Val, normal: Val, eta: f32| { + let output: Val = Vec2::refract(_self, normal, eta) + .into(); + output + }, + ) + .overwrite_script_function( + "from_angle", + |angle: f32| { + let output: Val = Vec2::from_angle(angle).into(); + output + }, + ) + .overwrite_script_function( + "to_angle", + |_self: Val| { + let output: f32 = Vec2::to_angle(_self).into(); + output + }, + ) + .overwrite_script_function( + "angle_between", + |_self: Val, rhs: Val| { + let output: f32 = Vec2::angle_between(_self, rhs).into(); + output + }, + ) + .overwrite_script_function( + "angle_to", + |_self: Val, rhs: Val| { + let output: f32 = Vec2::angle_to(_self, rhs).into(); + output + }, + ) + .overwrite_script_function( + "perp", + |_self: Val| { + let output: Val = Vec2::perp(_self).into(); + output + }, + ) + .overwrite_script_function( + "perp_dot", + |_self: Val, rhs: Val| { + let output: f32 = Vec2::perp_dot(_self, rhs).into(); + output + }, + ) + .overwrite_script_function( + "rotate", + |_self: Val, rhs: Val| { + let output: Val = Vec2::rotate(_self, rhs).into(); + output + }, + ) + .overwrite_script_function( + "rotate_towards", + | + _self: Ref, + rhs: Val, + max_angle: f32| + { + let output: Val = Vec2::rotate_towards( + _self, + rhs, + max_angle, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "as_dvec2", + |_self: Ref| { + let output: Val = Vec2::as_dvec2(_self).into(); + output + }, + ) + .overwrite_script_function( + "as_ivec2", + |_self: Ref| { + let output: Val = Vec2::as_ivec2(_self).into(); + output + }, + ) + .overwrite_script_function( + "as_uvec2", + |_self: Ref| { + let output: Val = Vec2::as_uvec2(_self).into(); + output + }, + ) + .overwrite_script_function( + "as_i64vec2", + |_self: Ref| { + let output: Val = Vec2::as_i64vec2(_self) + .into(); + output + }, + ) + .overwrite_script_function( + "as_u64vec2", + |_self: Ref| { + let output: Val = Vec2::as_u64vec2(_self) + .into(); + output + }, + ) + .overwrite_script_function( + "eq", + |_self: Ref, other: Ref| { + let output: bool = Vec2::eq(_self, other).into(); + output + }, + ) + .overwrite_script_function( + "clone", + |_self: Ref| { + let output: Val = Vec2::clone(_self).into(); + output + }, + ) + .overwrite_script_function( + "sub", + |_self: Val, rhs: Ref| { + let output: Val = Vec2::sub(_self, rhs).into(); + output + }, + ) + .overwrite_script_function( + "rem", + |_self: Val, rhs: Ref| { + let output: Val = Vec2::rem(_self, rhs).into(); + output + }, + ) + .overwrite_script_function( + "rem", + |_self: Val, rhs: f32| { + let output: Val = Vec2::rem(_self, rhs).into(); + output + }, + ) + .overwrite_script_function( + "div", + |_self: Val, rhs: Val| { + let output: Val = Vec2::div(_self, rhs).into(); + output + }, + ) + .overwrite_script_function( + "sub", + |_self: Val, rhs: f32| { + let output: Val = Vec2::sub(_self, rhs).into(); + output + }, + ) + .overwrite_script_function( + "mul", + |_self: Val, rhs: f32| { + let output: Val = Vec2::mul(_self, rhs).into(); + output + }, + ) + .overwrite_script_function( + "neg", + |_self: Val| { + let output: Val = Vec2::neg(_self).into(); + output + }, + ) + .overwrite_script_function( + "add", + |_self: Val, rhs: Ref| { + let output: Val = Vec2::add(_self, rhs).into(); + output + }, + ) + .overwrite_script_function( + "div", + |_self: Val, rhs: Ref| { + let output: Val = Vec2::div(_self, rhs).into(); + output + }, + ); + NamespaceBuilder::::new(world) + .overwrite_script_function( + "rem", + |_self: Val, rhs: Ref| { + let output: Val = Vec3A::rem(_self, rhs).into(); + output + }, + ) + .overwrite_script_function( + "mul", + |_self: Val, rhs: Val| { + let output: Val = Vec3A::mul(_self, rhs).into(); + output + }, + ) + .overwrite_script_function( + "div", + |_self: Val, rhs: Ref| { + let output: Val = Vec3A::div(_self, rhs).into(); + output + }, + ) + .overwrite_script_function( + "div", + |_self: Val, rhs: f32| { + let output: Val = Vec3A::div(_self, rhs).into(); + output + }, + ) + .overwrite_script_function( + "sub", + |_self: Val, rhs: f32| { + let output: Val = Vec3A::sub(_self, rhs).into(); + output + }, + ) + .overwrite_script_function( + "new", + |x: f32, y: f32, z: f32| { + let output: Val = Vec3A::new(x, y, z).into(); + output + }, + ) + .overwrite_script_function( + "splat", + |v: f32| { + let output: Val = Vec3A::splat(v).into(); + output + }, + ) + .overwrite_script_function( + "select", + | + mask: Val, + if_true: Val, + if_false: Val| + { + let output: Val = Vec3A::select( + mask, + if_true, + if_false, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "from_array", + |a: [f32; 3]| { + let output: Val = Vec3A::from_array(a).into(); + output + }, + ) + .overwrite_script_function( + "to_array", + |_self: Ref| { + let output: [f32; 3] = Vec3A::to_array(_self).into(); + output + }, + ) + .overwrite_script_function( + "from_vec4", + |v: Val| { + let output: Val = Vec3A::from_vec4(v).into(); + output + }, + ) + .overwrite_script_function( + "extend", + |_self: Val, w: f32| { + let output: Val = Vec3A::extend(_self, w).into(); + output + }, + ) + .overwrite_script_function( + "truncate", + |_self: Val| { + let output: Val = Vec3A::truncate(_self).into(); + output + }, + ) + .overwrite_script_function( + "with_x", + |_self: Val, x: f32| { + let output: Val = Vec3A::with_x(_self, x).into(); + output + }, + ) + .overwrite_script_function( + "with_y", + |_self: Val, y: f32| { + let output: Val = Vec3A::with_y(_self, y).into(); + output + }, + ) + .overwrite_script_function( + "with_z", + |_self: Val, z: f32| { + let output: Val = Vec3A::with_z(_self, z).into(); + output + }, + ) + .overwrite_script_function( + "dot", + |_self: Val, rhs: Val| { + let output: f32 = Vec3A::dot(_self, rhs).into(); + output + }, + ) + .overwrite_script_function( + "dot_into_vec", + |_self: Val, rhs: Val| { + let output: Val = Vec3A::dot_into_vec(_self, rhs) + .into(); + output + }, + ) + .overwrite_script_function( + "cross", + |_self: Val, rhs: Val| { + let output: Val = Vec3A::cross(_self, rhs).into(); + output + }, + ) + .overwrite_script_function( + "min", + |_self: Val, rhs: Val| { + let output: Val = Vec3A::min(_self, rhs).into(); + output + }, + ) + .overwrite_script_function( + "max", + |_self: Val, rhs: Val| { + let output: Val = Vec3A::max(_self, rhs).into(); + output + }, + ) + .overwrite_script_function( + "clamp", + | + _self: Val, + min: Val, + max: Val| + { + let output: Val = Vec3A::clamp(_self, min, max) + .into(); + output + }, + ) + .overwrite_script_function( + "min_element", + |_self: Val| { + let output: f32 = Vec3A::min_element(_self).into(); + output + }, + ) + .overwrite_script_function( + "max_element", + |_self: Val| { + let output: f32 = Vec3A::max_element(_self).into(); + output + }, + ) + .overwrite_script_function( + "element_sum", + |_self: Val| { + let output: f32 = Vec3A::element_sum(_self).into(); + output + }, + ) + .overwrite_script_function( + "element_product", + |_self: Val| { + let output: f32 = Vec3A::element_product(_self).into(); + output + }, + ) + .overwrite_script_function( + "cmpeq", + |_self: Val, rhs: Val| { + let output: Val = Vec3A::cmpeq(_self, rhs) + .into(); + output + }, + ) + .overwrite_script_function( + "cmpne", + |_self: Val, rhs: Val| { + let output: Val = Vec3A::cmpne(_self, rhs) + .into(); + output + }, + ) + .overwrite_script_function( + "cmpge", + |_self: Val, rhs: Val| { + let output: Val = Vec3A::cmpge(_self, rhs) + .into(); + output + }, + ) + .overwrite_script_function( + "cmpgt", + |_self: Val, rhs: Val| { + let output: Val = Vec3A::cmpgt(_self, rhs) + .into(); + output + }, + ) + .overwrite_script_function( + "cmple", + |_self: Val, rhs: Val| { + let output: Val = Vec3A::cmple(_self, rhs) + .into(); + output + }, + ) + .overwrite_script_function( + "cmplt", + |_self: Val, rhs: Val| { + let output: Val = Vec3A::cmplt(_self, rhs) + .into(); + output + }, + ) + .overwrite_script_function( + "abs", + |_self: Val| { + let output: Val = Vec3A::abs(_self).into(); + output + }, + ) + .overwrite_script_function( + "signum", + |_self: Val| { + let output: Val = Vec3A::signum(_self).into(); + output + }, + ) + .overwrite_script_function( + "copysign", + |_self: Val, rhs: Val| { + let output: Val = Vec3A::copysign(_self, rhs) + .into(); + output + }, + ) + .overwrite_script_function( + "is_negative_bitmask", + |_self: Val| { + let output: u32 = Vec3A::is_negative_bitmask(_self).into(); + output + }, + ) + .overwrite_script_function( + "is_finite", + |_self: Val| { + let output: bool = Vec3A::is_finite(_self).into(); + output + }, + ) + .overwrite_script_function( + "is_finite_mask", + |_self: Val| { + let output: Val = Vec3A::is_finite_mask(_self) + .into(); + output + }, + ) + .overwrite_script_function( + "is_nan", + |_self: Val| { + let output: bool = Vec3A::is_nan(_self).into(); + output + }, + ) + .overwrite_script_function( + "is_nan_mask", + |_self: Val| { + let output: Val = Vec3A::is_nan_mask(_self) + .into(); + output + }, + ) + .overwrite_script_function( + "length", + |_self: Val| { + let output: f32 = Vec3A::length(_self).into(); + output + }, + ) + .overwrite_script_function( + "length_squared", + |_self: Val| { + let output: f32 = Vec3A::length_squared(_self).into(); + output + }, + ) + .overwrite_script_function( + "length_recip", + |_self: Val| { + let output: f32 = Vec3A::length_recip(_self).into(); + output + }, + ) + .overwrite_script_function( + "distance", + |_self: Val, rhs: Val| { + let output: f32 = Vec3A::distance(_self, rhs).into(); + output + }, + ) + .overwrite_script_function( + "distance_squared", + |_self: Val, rhs: Val| { + let output: f32 = Vec3A::distance_squared(_self, rhs).into(); + output + }, + ) + .overwrite_script_function( + "div_euclid", + |_self: Val, rhs: Val| { + let output: Val = Vec3A::div_euclid(_self, rhs) + .into(); + output + }, + ) + .overwrite_script_function( + "rem_euclid", + |_self: Val, rhs: Val| { + let output: Val = Vec3A::rem_euclid(_self, rhs) + .into(); + output + }, + ) + .overwrite_script_function( + "normalize", + |_self: Val| { + let output: Val = Vec3A::normalize(_self).into(); + output + }, + ) + .overwrite_script_function( + "normalize_or", + |_self: Val, fallback: Val| { + let output: Val = Vec3A::normalize_or( + _self, + fallback, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "normalize_or_zero", + |_self: Val| { + let output: Val = Vec3A::normalize_or_zero(_self) + .into(); + output + }, + ) + .overwrite_script_function( + "is_normalized", + |_self: Val| { + let output: bool = Vec3A::is_normalized(_self).into(); + output + }, + ) + .overwrite_script_function( + "project_onto", + |_self: Val, rhs: Val| { + let output: Val = Vec3A::project_onto(_self, rhs) + .into(); + output + }, + ) + .overwrite_script_function( + "reject_from", + |_self: Val, rhs: Val| { + let output: Val = Vec3A::reject_from(_self, rhs) + .into(); + output + }, + ) + .overwrite_script_function( + "project_onto_normalized", + |_self: Val, rhs: Val| { + let output: Val = Vec3A::project_onto_normalized( + _self, + rhs, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "reject_from_normalized", + |_self: Val, rhs: Val| { + let output: Val = Vec3A::reject_from_normalized( + _self, + rhs, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "round", + |_self: Val| { + let output: Val = Vec3A::round(_self).into(); + output + }, + ) + .overwrite_script_function( + "floor", + |_self: Val| { + let output: Val = Vec3A::floor(_self).into(); + output + }, + ) + .overwrite_script_function( + "ceil", + |_self: Val| { + let output: Val = Vec3A::ceil(_self).into(); + output + }, + ) + .overwrite_script_function( + "trunc", + |_self: Val| { + let output: Val = Vec3A::trunc(_self).into(); + output + }, + ) + .overwrite_script_function( + "fract", + |_self: Val| { + let output: Val = Vec3A::fract(_self).into(); + output + }, + ) + .overwrite_script_function( + "fract_gl", + |_self: Val| { + let output: Val = Vec3A::fract_gl(_self).into(); + output + }, + ) + .overwrite_script_function( + "exp", + |_self: Val| { + let output: Val = Vec3A::exp(_self).into(); + output + }, + ) + .overwrite_script_function( + "powf", + |_self: Val, n: f32| { + let output: Val = Vec3A::powf(_self, n).into(); + output + }, + ) + .overwrite_script_function( + "recip", + |_self: Val| { + let output: Val = Vec3A::recip(_self).into(); + output + }, + ) + .overwrite_script_function( + "lerp", + |_self: Val, rhs: Val, s: f32| { + let output: Val = Vec3A::lerp(_self, rhs, s) + .into(); + output + }, + ) + .overwrite_script_function( + "move_towards", + |_self: Ref, rhs: Val, d: f32| { + let output: Val = Vec3A::move_towards( + _self, + rhs, + d, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "midpoint", + |_self: Val, rhs: Val| { + let output: Val = Vec3A::midpoint(_self, rhs) + .into(); + output + }, + ) + .overwrite_script_function( + "abs_diff_eq", + | + _self: Val, + rhs: Val, + max_abs_diff: f32| + { + let output: bool = Vec3A::abs_diff_eq(_self, rhs, max_abs_diff) + .into(); + output + }, + ) + .overwrite_script_function( + "clamp_length", + |_self: Val, min: f32, max: f32| { + let output: Val = Vec3A::clamp_length( + _self, + min, + max, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "clamp_length_max", + |_self: Val, max: f32| { + let output: Val = Vec3A::clamp_length_max( + _self, + max, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "clamp_length_min", + |_self: Val, min: f32| { + let output: Val = Vec3A::clamp_length_min( + _self, + min, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "mul_add", + | + _self: Val, + a: Val, + b: Val| + { + let output: Val = Vec3A::mul_add(_self, a, b) + .into(); + output + }, + ) + .overwrite_script_function( + "reflect", + |_self: Val, normal: Val| { + let output: Val = Vec3A::reflect(_self, normal) + .into(); + output + }, + ) + .overwrite_script_function( + "refract", + | + _self: Val, + normal: Val, + eta: f32| + { + let output: Val = Vec3A::refract( + _self, + normal, + eta, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "angle_between", + |_self: Val, rhs: Val| { + let output: f32 = Vec3A::angle_between(_self, rhs).into(); + output + }, + ) + .overwrite_script_function( + "any_orthogonal_vector", + |_self: Ref| { + let output: Val = Vec3A::any_orthogonal_vector( + _self, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "any_orthonormal_vector", + |_self: Ref| { + let output: Val = Vec3A::any_orthonormal_vector( + _self, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "as_dvec3", + |_self: Ref| { + let output: Val = Vec3A::as_dvec3(_self).into(); + output + }, + ) + .overwrite_script_function( + "as_ivec3", + |_self: Ref| { + let output: Val = Vec3A::as_ivec3(_self).into(); + output + }, + ) + .overwrite_script_function( + "as_uvec3", + |_self: Ref| { + let output: Val = Vec3A::as_uvec3(_self).into(); + output + }, + ) + .overwrite_script_function( + "as_i64vec3", + |_self: Ref| { + let output: Val = Vec3A::as_i64vec3(_self) + .into(); + output + }, + ) + .overwrite_script_function( + "as_u64vec3", + |_self: Ref| { + let output: Val = Vec3A::as_u64vec3(_self) + .into(); + output + }, + ) + .overwrite_script_function( + "neg", + |_self: Val| { + let output: Val = Vec3A::neg(_self).into(); + output + }, + ) + .overwrite_script_function( + "sub", + |_self: Val, rhs: Ref| { + let output: Val = Vec3A::sub(_self, rhs).into(); + output + }, + ) + .overwrite_script_function( + "clone", + |_self: Ref| { + let output: Val = Vec3A::clone(_self).into(); + output + }, + ) + .overwrite_script_function( + "add", + |_self: Val, rhs: Ref| { + let output: Val = Vec3A::add(_self, rhs).into(); + output + }, + ) + .overwrite_script_function( + "add", + |_self: Val, rhs: f32| { + let output: Val = Vec3A::add(_self, rhs).into(); + output + }, + ) + .overwrite_script_function( + "sub", + |_self: Val, rhs: Val| { + let output: Val = Vec3A::sub(_self, rhs).into(); + output + }, + ) + .overwrite_script_function( + "div", + |_self: Val, rhs: Val| { + let output: Val = Vec3A::div(_self, rhs).into(); + output + }, + ) + .overwrite_script_function( + "add", + |_self: Val, rhs: Val| { + let output: Val = Vec3A::add(_self, rhs).into(); + output + }, + ) + .overwrite_script_function( + "eq", + |_self: Ref, rhs: Ref| { + let output: bool = Vec3A::eq(_self, rhs).into(); + output + }, + ) + .overwrite_script_function( + "rem", + |_self: Val, rhs: Val| { + let output: Val = Vec3A::rem(_self, rhs).into(); + output + }, + ) + .overwrite_script_function( + "rem", + |_self: Val, rhs: f32| { + let output: Val = Vec3A::rem(_self, rhs).into(); + output + }, + ) + .overwrite_script_function( + "mul", + |_self: Val, rhs: f32| { + let output: Val = Vec3A::mul(_self, rhs).into(); + output + }, + ) + .overwrite_script_function( + "mul", + |_self: Val, rhs: Ref| { + let output: Val = Vec3A::mul(_self, rhs).into(); + output + }, + ); + NamespaceBuilder::::new(world) + .overwrite_script_function( + "new", + |x: f32, y: f32, z: f32, w: f32| { + let output: Val = Vec4::new(x, y, z, w).into(); + output + }, + ) + .overwrite_script_function( + "splat", + |v: f32| { + let output: Val = Vec4::splat(v).into(); + output + }, + ) + .overwrite_script_function( + "select", + | + mask: Val, + if_true: Val, + if_false: Val| + { + let output: Val = Vec4::select( + mask, + if_true, + if_false, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "from_array", + |a: [f32; 4]| { + let output: Val = Vec4::from_array(a).into(); + output + }, + ) + .overwrite_script_function( + "to_array", + |_self: Ref| { + let output: [f32; 4] = Vec4::to_array(_self).into(); + output + }, + ) + .overwrite_script_function( + "truncate", + |_self: Val| { + let output: Val = Vec4::truncate(_self).into(); + output + }, + ) + .overwrite_script_function( + "with_x", + |_self: Val, x: f32| { + let output: Val = Vec4::with_x(_self, x).into(); + output + }, + ) + .overwrite_script_function( + "with_y", + |_self: Val, y: f32| { + let output: Val = Vec4::with_y(_self, y).into(); + output + }, + ) + .overwrite_script_function( + "with_z", + |_self: Val, z: f32| { + let output: Val = Vec4::with_z(_self, z).into(); + output + }, + ) + .overwrite_script_function( + "with_w", + |_self: Val, w: f32| { + let output: Val = Vec4::with_w(_self, w).into(); + output + }, + ) + .overwrite_script_function( + "dot", + |_self: Val, rhs: Val| { + let output: f32 = Vec4::dot(_self, rhs).into(); + output + }, + ) + .overwrite_script_function( + "dot_into_vec", + |_self: Val, rhs: Val| { + let output: Val = Vec4::dot_into_vec(_self, rhs) + .into(); + output + }, + ) + .overwrite_script_function( + "min", + |_self: Val, rhs: Val| { + let output: Val = Vec4::min(_self, rhs).into(); + output + }, + ) + .overwrite_script_function( + "max", + |_self: Val, rhs: Val| { + let output: Val = Vec4::max(_self, rhs).into(); + output + }, + ) + .overwrite_script_function( + "clamp", + | + _self: Val, + min: Val, + max: Val| + { + let output: Val = Vec4::clamp(_self, min, max) + .into(); + output + }, + ) + .overwrite_script_function( + "min_element", + |_self: Val| { + let output: f32 = Vec4::min_element(_self).into(); + output + }, + ) + .overwrite_script_function( + "max_element", + |_self: Val| { + let output: f32 = Vec4::max_element(_self).into(); + output + }, + ) + .overwrite_script_function( + "element_sum", + |_self: Val| { + let output: f32 = Vec4::element_sum(_self).into(); + output + }, + ) + .overwrite_script_function( + "element_product", + |_self: Val| { + let output: f32 = Vec4::element_product(_self).into(); + output + }, + ) + .overwrite_script_function( + "cmpeq", + |_self: Val, rhs: Val| { + let output: Val = Vec4::cmpeq(_self, rhs).into(); + output + }, + ) + .overwrite_script_function( + "cmpne", + |_self: Val, rhs: Val| { + let output: Val = Vec4::cmpne(_self, rhs).into(); + output + }, + ) + .overwrite_script_function( + "cmpge", + |_self: Val, rhs: Val| { + let output: Val = Vec4::cmpge(_self, rhs).into(); + output + }, + ) + .overwrite_script_function( + "cmpgt", + |_self: Val, rhs: Val| { + let output: Val = Vec4::cmpgt(_self, rhs).into(); + output + }, + ) + .overwrite_script_function( + "cmple", + |_self: Val, rhs: Val| { + let output: Val = Vec4::cmple(_self, rhs).into(); + output + }, + ) + .overwrite_script_function( + "cmplt", + |_self: Val, rhs: Val| { + let output: Val = Vec4::cmplt(_self, rhs).into(); + output + }, + ) + .overwrite_script_function( + "abs", + |_self: Val| { + let output: Val = Vec4::abs(_self).into(); + output + }, + ) + .overwrite_script_function( + "signum", + |_self: Val| { + let output: Val = Vec4::signum(_self).into(); + output + }, + ) + .overwrite_script_function( + "copysign", + |_self: Val, rhs: Val| { + let output: Val = Vec4::copysign(_self, rhs) + .into(); + output + }, + ) + .overwrite_script_function( + "is_negative_bitmask", + |_self: Val| { + let output: u32 = Vec4::is_negative_bitmask(_self).into(); + output + }, + ) + .overwrite_script_function( + "is_finite", + |_self: Val| { + let output: bool = Vec4::is_finite(_self).into(); + output + }, + ) + .overwrite_script_function( + "is_finite_mask", + |_self: Val| { + let output: Val = Vec4::is_finite_mask(_self) + .into(); + output + }, + ) + .overwrite_script_function( + "is_nan", + |_self: Val| { + let output: bool = Vec4::is_nan(_self).into(); + output + }, + ) + .overwrite_script_function( + "is_nan_mask", + |_self: Val| { + let output: Val = Vec4::is_nan_mask(_self) + .into(); + output + }, + ) + .overwrite_script_function( + "length", + |_self: Val| { + let output: f32 = Vec4::length(_self).into(); + output + }, + ) + .overwrite_script_function( + "length_squared", + |_self: Val| { + let output: f32 = Vec4::length_squared(_self).into(); + output + }, + ) + .overwrite_script_function( + "length_recip", + |_self: Val| { + let output: f32 = Vec4::length_recip(_self).into(); + output + }, + ) + .overwrite_script_function( + "distance", + |_self: Val, rhs: Val| { + let output: f32 = Vec4::distance(_self, rhs).into(); + output + }, + ) + .overwrite_script_function( + "distance_squared", + |_self: Val, rhs: Val| { + let output: f32 = Vec4::distance_squared(_self, rhs).into(); + output + }, + ) + .overwrite_script_function( + "div_euclid", + |_self: Val, rhs: Val| { + let output: Val = Vec4::div_euclid(_self, rhs) + .into(); + output + }, + ) + .overwrite_script_function( + "rem_euclid", + |_self: Val, rhs: Val| { + let output: Val = Vec4::rem_euclid(_self, rhs) + .into(); + output + }, + ) + .overwrite_script_function( + "normalize", + |_self: Val| { + let output: Val = Vec4::normalize(_self).into(); + output + }, + ) + .overwrite_script_function( + "normalize_or", + |_self: Val, fallback: Val| { + let output: Val = Vec4::normalize_or( + _self, + fallback, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "normalize_or_zero", + |_self: Val| { + let output: Val = Vec4::normalize_or_zero(_self) + .into(); + output + }, + ) + .overwrite_script_function( + "is_normalized", + |_self: Val| { + let output: bool = Vec4::is_normalized(_self).into(); + output + }, + ) + .overwrite_script_function( + "project_onto", + |_self: Val, rhs: Val| { + let output: Val = Vec4::project_onto(_self, rhs) + .into(); + output + }, + ) + .overwrite_script_function( + "reject_from", + |_self: Val, rhs: Val| { + let output: Val = Vec4::reject_from(_self, rhs) + .into(); + output + }, + ) + .overwrite_script_function( + "project_onto_normalized", + |_self: Val, rhs: Val| { + let output: Val = Vec4::project_onto_normalized( + _self, + rhs, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "reject_from_normalized", + |_self: Val, rhs: Val| { + let output: Val = Vec4::reject_from_normalized( + _self, + rhs, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "round", + |_self: Val| { + let output: Val = Vec4::round(_self).into(); + output + }, + ) + .overwrite_script_function( + "floor", + |_self: Val| { + let output: Val = Vec4::floor(_self).into(); + output + }, + ) + .overwrite_script_function( + "ceil", + |_self: Val| { + let output: Val = Vec4::ceil(_self).into(); + output + }, + ) + .overwrite_script_function( + "trunc", + |_self: Val| { + let output: Val = Vec4::trunc(_self).into(); + output + }, + ) + .overwrite_script_function( + "fract", + |_self: Val| { + let output: Val = Vec4::fract(_self).into(); + output + }, + ) + .overwrite_script_function( + "fract_gl", + |_self: Val| { + let output: Val = Vec4::fract_gl(_self).into(); + output + }, + ) + .overwrite_script_function( + "exp", + |_self: Val| { + let output: Val = Vec4::exp(_self).into(); + output + }, + ) + .overwrite_script_function( + "powf", + |_self: Val, n: f32| { + let output: Val = Vec4::powf(_self, n).into(); + output + }, + ) + .overwrite_script_function( + "recip", + |_self: Val| { + let output: Val = Vec4::recip(_self).into(); + output + }, + ) + .overwrite_script_function( + "lerp", + |_self: Val, rhs: Val, s: f32| { + let output: Val = Vec4::lerp(_self, rhs, s).into(); + output + }, + ) + .overwrite_script_function( + "move_towards", + |_self: Ref, rhs: Val, d: f32| { + let output: Val = Vec4::move_towards(_self, rhs, d) + .into(); + output + }, + ) + .overwrite_script_function( + "midpoint", + |_self: Val, rhs: Val| { + let output: Val = Vec4::midpoint(_self, rhs) + .into(); + output + }, + ) + .overwrite_script_function( + "abs_diff_eq", + | + _self: Val, + rhs: Val, + max_abs_diff: f32| + { + let output: bool = Vec4::abs_diff_eq(_self, rhs, max_abs_diff) + .into(); + output + }, + ) + .overwrite_script_function( + "clamp_length", + |_self: Val, min: f32, max: f32| { + let output: Val = Vec4::clamp_length( + _self, + min, + max, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "clamp_length_max", + |_self: Val, max: f32| { + let output: Val = Vec4::clamp_length_max( + _self, + max, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "clamp_length_min", + |_self: Val, min: f32| { + let output: Val = Vec4::clamp_length_min( + _self, + min, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "mul_add", + | + _self: Val, + a: Val, + b: Val| + { + let output: Val = Vec4::mul_add(_self, a, b) + .into(); + output + }, + ) + .overwrite_script_function( + "reflect", + |_self: Val, normal: Val| { + let output: Val = Vec4::reflect(_self, normal) + .into(); + output + }, + ) + .overwrite_script_function( + "refract", + |_self: Val, normal: Val, eta: f32| { + let output: Val = Vec4::refract(_self, normal, eta) + .into(); + output + }, + ) + .overwrite_script_function( + "as_dvec4", + |_self: Ref| { + let output: Val = Vec4::as_dvec4(_self).into(); + output + }, + ) + .overwrite_script_function( + "as_ivec4", + |_self: Ref| { + let output: Val = Vec4::as_ivec4(_self).into(); + output + }, + ) + .overwrite_script_function( + "as_uvec4", + |_self: Ref| { + let output: Val = Vec4::as_uvec4(_self).into(); + output + }, + ) + .overwrite_script_function( + "as_i64vec4", + |_self: Ref| { + let output: Val = Vec4::as_i64vec4(_self) + .into(); + output + }, + ) + .overwrite_script_function( + "as_u64vec4", + |_self: Ref| { + let output: Val = Vec4::as_u64vec4(_self) + .into(); + output + }, + ) + .overwrite_script_function( + "div", + |_self: Val, rhs: Val| { + let output: Val = Vec4::div(_self, rhs).into(); + output + }, + ) + .overwrite_script_function( + "rem", + |_self: Val, rhs: Val| { + let output: Val = Vec4::rem(_self, rhs).into(); + output + }, + ) + .overwrite_script_function( + "rem", + |_self: Val, rhs: f32| { + let output: Val = Vec4::rem(_self, rhs).into(); + output + }, + ) + .overwrite_script_function( + "add", + |_self: Val, rhs: Ref| { + let output: Val = Vec4::add(_self, rhs).into(); + output + }, + ) + .overwrite_script_function( + "mul", + |_self: Val, rhs: Val| { + let output: Val = Vec4::mul(_self, rhs).into(); + output + }, + ) + .overwrite_script_function( + "add", + |_self: Val, rhs: f32| { + let output: Val = Vec4::add(_self, rhs).into(); + output + }, + ) + .overwrite_script_function( + "sub", + |_self: Val, rhs: Val| { + let output: Val = Vec4::sub(_self, rhs).into(); + output + }, + ) + .overwrite_script_function( + "rem", + |_self: Val, rhs: Ref| { + let output: Val = Vec4::rem(_self, rhs).into(); + output + }, + ) + .overwrite_script_function( + "neg", + |_self: Val| { + let output: Val = Vec4::neg(_self).into(); + output + }, + ) + .overwrite_script_function( + "sub", + |_self: Val, rhs: f32| { + let output: Val = Vec4::sub(_self, rhs).into(); + output + }, + ) + .overwrite_script_function( + "div", + |_self: Val, rhs: f32| { + let output: Val = Vec4::div(_self, rhs).into(); + output + }, + ) + .overwrite_script_function( + "add", + |_self: Val, rhs: Val| { + let output: Val = Vec4::add(_self, rhs).into(); + output + }, + ) + .overwrite_script_function( + "eq", + |_self: Ref, rhs: Ref| { + let output: bool = Vec4::eq(_self, rhs).into(); + output + }, + ) + .overwrite_script_function( + "sub", + |_self: Val, rhs: Ref| { + let output: Val = Vec4::sub(_self, rhs).into(); + output + }, + ) + .overwrite_script_function( + "div", + |_self: Val, rhs: Ref| { + let output: Val = Vec4::div(_self, rhs).into(); + output + }, + ) + .overwrite_script_function( + "clone", + |_self: Ref| { + let output: Val = Vec4::clone(_self).into(); + output + }, + ) + .overwrite_script_function( + "mul", + |_self: Val, rhs: f32| { + let output: Val = Vec4::mul(_self, rhs).into(); + output + }, + ) + .overwrite_script_function( + "mul", + |_self: Val, rhs: Ref| { + let output: Val = Vec4::mul(_self, rhs).into(); + output + }, + ); + NamespaceBuilder::::new(world) + .overwrite_script_function( + "assert_receiver_is_total_eq", + |_self: Ref| { + let output: () = BVec2::assert_receiver_is_total_eq(_self).into(); + output + }, + ) + .overwrite_script_function( + "new", + |x: bool, y: bool| { + let output: Val = BVec2::new(x, y).into(); + output + }, + ) + .overwrite_script_function( + "splat", + |v: bool| { + let output: Val = BVec2::splat(v).into(); + output + }, + ) + .overwrite_script_function( + "from_array", + |a: [bool; 2]| { + let output: Val = BVec2::from_array(a).into(); + output + }, + ) + .overwrite_script_function( + "bitmask", + |_self: Val| { + let output: u32 = BVec2::bitmask(_self).into(); + output + }, + ) + .overwrite_script_function( + "any", + |_self: Val| { + let output: bool = BVec2::any(_self).into(); + output + }, + ) + .overwrite_script_function( + "all", + |_self: Val| { + let output: bool = BVec2::all(_self).into(); + output + }, + ) + .overwrite_script_function( + "test", + |_self: Ref, index: usize| { + let output: bool = BVec2::test(_self, index).into(); + output + }, + ) + .overwrite_script_function( + "set", + |_self: Mut, index: usize, value: bool| { + let output: () = BVec2::set(_self, index, value).into(); + output + }, + ) + .overwrite_script_function( + "clone", + |_self: Ref| { + let output: Val = BVec2::clone(_self).into(); + output + }, + ) + .overwrite_script_function( + "eq", + |_self: Ref, other: Ref| { + let output: bool = BVec2::eq(_self, other).into(); + output + }, + ); + NamespaceBuilder::::new(world) + .overwrite_script_function( + "assert_receiver_is_total_eq", + |_self: Ref| { + let output: () = BVec3::assert_receiver_is_total_eq(_self).into(); + output + }, + ) + .overwrite_script_function( + "new", + |x: bool, y: bool, z: bool| { + let output: Val = BVec3::new(x, y, z).into(); + output + }, + ) + .overwrite_script_function( + "splat", + |v: bool| { + let output: Val = BVec3::splat(v).into(); + output + }, + ) + .overwrite_script_function( + "from_array", + |a: [bool; 3]| { + let output: Val = BVec3::from_array(a).into(); + output + }, + ) + .overwrite_script_function( + "bitmask", + |_self: Val| { + let output: u32 = BVec3::bitmask(_self).into(); + output + }, + ) + .overwrite_script_function( + "any", + |_self: Val| { + let output: bool = BVec3::any(_self).into(); + output + }, + ) + .overwrite_script_function( + "all", + |_self: Val| { + let output: bool = BVec3::all(_self).into(); + output + }, + ) + .overwrite_script_function( + "test", + |_self: Ref, index: usize| { + let output: bool = BVec3::test(_self, index).into(); + output + }, + ) + .overwrite_script_function( + "set", + |_self: Mut, index: usize, value: bool| { + let output: () = BVec3::set(_self, index, value).into(); + output + }, + ) + .overwrite_script_function( + "clone", + |_self: Ref| { + let output: Val = BVec3::clone(_self).into(); + output + }, + ) + .overwrite_script_function( + "eq", + |_self: Ref, other: Ref| { + let output: bool = BVec3::eq(_self, other).into(); + output + }, + ); + NamespaceBuilder::::new(world) + .overwrite_script_function( + "clone", + |_self: Ref| { + let output: Val = BVec4::clone(_self).into(); + output + }, + ) + .overwrite_script_function( + "eq", + |_self: Ref, other: Ref| { + let output: bool = BVec4::eq(_self, other).into(); + output + }, + ) + .overwrite_script_function( + "assert_receiver_is_total_eq", + |_self: Ref| { + let output: () = BVec4::assert_receiver_is_total_eq(_self).into(); + output + }, + ) + .overwrite_script_function( + "new", + |x: bool, y: bool, z: bool, w: bool| { + let output: Val = BVec4::new(x, y, z, w).into(); + output + }, + ) + .overwrite_script_function( + "splat", + |v: bool| { + let output: Val = BVec4::splat(v).into(); + output + }, + ) + .overwrite_script_function( + "from_array", + |a: [bool; 4]| { + let output: Val = BVec4::from_array(a).into(); + output + }, + ) + .overwrite_script_function( + "bitmask", + |_self: Val| { + let output: u32 = BVec4::bitmask(_self).into(); + output + }, + ) + .overwrite_script_function( + "any", + |_self: Val| { + let output: bool = BVec4::any(_self).into(); + output + }, + ) + .overwrite_script_function( + "all", + |_self: Val| { + let output: bool = BVec4::all(_self).into(); + output + }, + ) + .overwrite_script_function( + "test", + |_self: Ref, index: usize| { + let output: bool = BVec4::test(_self, index).into(); + output + }, + ) + .overwrite_script_function( + "set", + |_self: Mut, index: usize, value: bool| { + let output: () = BVec4::set(_self, index, value).into(); + output + }, + ); + NamespaceBuilder::::new(world) + .overwrite_script_function( + "mul", + |_self: Val, rhs: Val| { + let output: Val = DVec2::mul(_self, rhs).into(); + output + }, + ) + .overwrite_script_function( + "rem", + |_self: Val, rhs: f64| { + let output: Val = DVec2::rem(_self, rhs).into(); + output + }, + ) + .overwrite_script_function( + "add", + |_self: Val, rhs: Val| { + let output: Val = DVec2::add(_self, rhs).into(); + output + }, + ) + .overwrite_script_function( + "new", + |x: f64, y: f64| { + let output: Val = DVec2::new(x, y).into(); + output + }, + ) + .overwrite_script_function( + "splat", + |v: f64| { + let output: Val = DVec2::splat(v).into(); + output + }, + ) + .overwrite_script_function( + "select", + | + mask: Val, + if_true: Val, + if_false: Val| + { + let output: Val = DVec2::select( + mask, + if_true, + if_false, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "from_array", + |a: [f64; 2]| { + let output: Val = DVec2::from_array(a).into(); + output + }, + ) + .overwrite_script_function( + "to_array", + |_self: Ref| { + let output: [f64; 2] = DVec2::to_array(_self).into(); + output + }, + ) + .overwrite_script_function( + "extend", + |_self: Val, z: f64| { + let output: Val = DVec2::extend(_self, z).into(); + output + }, + ) + .overwrite_script_function( + "with_x", + |_self: Val, x: f64| { + let output: Val = DVec2::with_x(_self, x).into(); + output + }, + ) + .overwrite_script_function( + "with_y", + |_self: Val, y: f64| { + let output: Val = DVec2::with_y(_self, y).into(); + output + }, + ) + .overwrite_script_function( + "dot", + |_self: Val, rhs: Val| { + let output: f64 = DVec2::dot(_self, rhs).into(); + output + }, + ) + .overwrite_script_function( + "dot_into_vec", + |_self: Val, rhs: Val| { + let output: Val = DVec2::dot_into_vec(_self, rhs) + .into(); + output + }, + ) + .overwrite_script_function( + "min", + |_self: Val, rhs: Val| { + let output: Val = DVec2::min(_self, rhs).into(); + output + }, + ) + .overwrite_script_function( + "max", + |_self: Val, rhs: Val| { + let output: Val = DVec2::max(_self, rhs).into(); + output + }, + ) + .overwrite_script_function( + "clamp", + | + _self: Val, + min: Val, + max: Val| + { + let output: Val = DVec2::clamp(_self, min, max) + .into(); + output + }, + ) + .overwrite_script_function( + "min_element", + |_self: Val| { + let output: f64 = DVec2::min_element(_self).into(); + output + }, + ) + .overwrite_script_function( + "max_element", + |_self: Val| { + let output: f64 = DVec2::max_element(_self).into(); + output + }, + ) + .overwrite_script_function( + "element_sum", + |_self: Val| { + let output: f64 = DVec2::element_sum(_self).into(); + output + }, + ) + .overwrite_script_function( + "element_product", + |_self: Val| { + let output: f64 = DVec2::element_product(_self).into(); + output + }, + ) + .overwrite_script_function( + "cmpeq", + |_self: Val, rhs: Val| { + let output: Val = DVec2::cmpeq(_self, rhs).into(); + output + }, + ) + .overwrite_script_function( + "cmpne", + |_self: Val, rhs: Val| { + let output: Val = DVec2::cmpne(_self, rhs).into(); + output + }, + ) + .overwrite_script_function( + "cmpge", + |_self: Val, rhs: Val| { + let output: Val = DVec2::cmpge(_self, rhs).into(); + output + }, + ) + .overwrite_script_function( + "cmpgt", + |_self: Val, rhs: Val| { + let output: Val = DVec2::cmpgt(_self, rhs).into(); + output + }, + ) + .overwrite_script_function( + "cmple", + |_self: Val, rhs: Val| { + let output: Val = DVec2::cmple(_self, rhs).into(); + output + }, + ) + .overwrite_script_function( + "cmplt", + |_self: Val, rhs: Val| { + let output: Val = DVec2::cmplt(_self, rhs).into(); + output + }, + ) + .overwrite_script_function( + "abs", + |_self: Val| { + let output: Val = DVec2::abs(_self).into(); + output + }, + ) + .overwrite_script_function( + "signum", + |_self: Val| { + let output: Val = DVec2::signum(_self).into(); + output + }, + ) + .overwrite_script_function( + "copysign", + |_self: Val, rhs: Val| { + let output: Val = DVec2::copysign(_self, rhs) + .into(); + output + }, + ) + .overwrite_script_function( + "is_negative_bitmask", + |_self: Val| { + let output: u32 = DVec2::is_negative_bitmask(_self).into(); + output + }, + ) + .overwrite_script_function( + "is_finite", + |_self: Val| { + let output: bool = DVec2::is_finite(_self).into(); + output + }, + ) + .overwrite_script_function( + "is_finite_mask", + |_self: Val| { + let output: Val = DVec2::is_finite_mask(_self) + .into(); + output + }, + ) + .overwrite_script_function( + "is_nan", + |_self: Val| { + let output: bool = DVec2::is_nan(_self).into(); + output + }, + ) + .overwrite_script_function( + "is_nan_mask", + |_self: Val| { + let output: Val = DVec2::is_nan_mask(_self) + .into(); + output + }, + ) + .overwrite_script_function( + "length", + |_self: Val| { + let output: f64 = DVec2::length(_self).into(); + output + }, + ) + .overwrite_script_function( + "length_squared", + |_self: Val| { + let output: f64 = DVec2::length_squared(_self).into(); + output + }, + ) + .overwrite_script_function( + "length_recip", + |_self: Val| { + let output: f64 = DVec2::length_recip(_self).into(); + output + }, + ) + .overwrite_script_function( + "distance", + |_self: Val, rhs: Val| { + let output: f64 = DVec2::distance(_self, rhs).into(); + output + }, + ) + .overwrite_script_function( + "distance_squared", + |_self: Val, rhs: Val| { + let output: f64 = DVec2::distance_squared(_self, rhs).into(); + output + }, + ) + .overwrite_script_function( + "div_euclid", + |_self: Val, rhs: Val| { + let output: Val = DVec2::div_euclid(_self, rhs) + .into(); + output + }, + ) + .overwrite_script_function( + "rem_euclid", + |_self: Val, rhs: Val| { + let output: Val = DVec2::rem_euclid(_self, rhs) + .into(); + output + }, + ) + .overwrite_script_function( + "normalize", + |_self: Val| { + let output: Val = DVec2::normalize(_self).into(); + output + }, + ) + .overwrite_script_function( + "normalize_or", + |_self: Val, fallback: Val| { + let output: Val = DVec2::normalize_or( + _self, + fallback, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "normalize_or_zero", + |_self: Val| { + let output: Val = DVec2::normalize_or_zero(_self) + .into(); + output + }, + ) + .overwrite_script_function( + "is_normalized", + |_self: Val| { + let output: bool = DVec2::is_normalized(_self).into(); + output + }, + ) + .overwrite_script_function( + "project_onto", + |_self: Val, rhs: Val| { + let output: Val = DVec2::project_onto(_self, rhs) + .into(); + output + }, + ) + .overwrite_script_function( + "reject_from", + |_self: Val, rhs: Val| { + let output: Val = DVec2::reject_from(_self, rhs) + .into(); + output + }, + ) + .overwrite_script_function( + "project_onto_normalized", + |_self: Val, rhs: Val| { + let output: Val = DVec2::project_onto_normalized( + _self, + rhs, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "reject_from_normalized", + |_self: Val, rhs: Val| { + let output: Val = DVec2::reject_from_normalized( + _self, + rhs, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "round", + |_self: Val| { + let output: Val = DVec2::round(_self).into(); + output + }, + ) + .overwrite_script_function( + "floor", + |_self: Val| { + let output: Val = DVec2::floor(_self).into(); + output + }, + ) + .overwrite_script_function( + "ceil", + |_self: Val| { + let output: Val = DVec2::ceil(_self).into(); + output + }, + ) + .overwrite_script_function( + "trunc", + |_self: Val| { + let output: Val = DVec2::trunc(_self).into(); + output + }, + ) + .overwrite_script_function( + "fract", + |_self: Val| { + let output: Val = DVec2::fract(_self).into(); + output + }, + ) + .overwrite_script_function( + "fract_gl", + |_self: Val| { + let output: Val = DVec2::fract_gl(_self).into(); + output + }, + ) + .overwrite_script_function( + "exp", + |_self: Val| { + let output: Val = DVec2::exp(_self).into(); + output + }, + ) + .overwrite_script_function( + "powf", + |_self: Val, n: f64| { + let output: Val = DVec2::powf(_self, n).into(); + output + }, + ) + .overwrite_script_function( + "recip", + |_self: Val| { + let output: Val = DVec2::recip(_self).into(); + output + }, + ) + .overwrite_script_function( + "lerp", + |_self: Val, rhs: Val, s: f64| { + let output: Val = DVec2::lerp(_self, rhs, s) + .into(); + output + }, + ) + .overwrite_script_function( + "move_towards", + |_self: Ref, rhs: Val, d: f64| { + let output: Val = DVec2::move_towards( + _self, + rhs, + d, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "midpoint", + |_self: Val, rhs: Val| { + let output: Val = DVec2::midpoint(_self, rhs) + .into(); + output + }, + ) + .overwrite_script_function( + "abs_diff_eq", + | + _self: Val, + rhs: Val, + max_abs_diff: f64| + { + let output: bool = DVec2::abs_diff_eq(_self, rhs, max_abs_diff) + .into(); + output + }, + ) + .overwrite_script_function( + "clamp_length", + |_self: Val, min: f64, max: f64| { + let output: Val = DVec2::clamp_length( + _self, + min, + max, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "clamp_length_max", + |_self: Val, max: f64| { + let output: Val = DVec2::clamp_length_max( + _self, + max, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "clamp_length_min", + |_self: Val, min: f64| { + let output: Val = DVec2::clamp_length_min( + _self, + min, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "mul_add", + | + _self: Val, + a: Val, + b: Val| + { + let output: Val = DVec2::mul_add(_self, a, b) + .into(); + output + }, + ) + .overwrite_script_function( + "reflect", + |_self: Val, normal: Val| { + let output: Val = DVec2::reflect(_self, normal) + .into(); + output + }, + ) + .overwrite_script_function( + "refract", + | + _self: Val, + normal: Val, + eta: f64| + { + let output: Val = DVec2::refract( + _self, + normal, + eta, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "from_angle", + |angle: f64| { + let output: Val = DVec2::from_angle(angle).into(); + output + }, + ) + .overwrite_script_function( + "to_angle", + |_self: Val| { + let output: f64 = DVec2::to_angle(_self).into(); + output + }, + ) + .overwrite_script_function( + "angle_between", + |_self: Val, rhs: Val| { + let output: f64 = DVec2::angle_between(_self, rhs).into(); + output + }, + ) + .overwrite_script_function( + "angle_to", + |_self: Val, rhs: Val| { + let output: f64 = DVec2::angle_to(_self, rhs).into(); + output + }, + ) + .overwrite_script_function( + "perp", + |_self: Val| { + let output: Val = DVec2::perp(_self).into(); + output + }, + ) + .overwrite_script_function( + "perp_dot", + |_self: Val, rhs: Val| { + let output: f64 = DVec2::perp_dot(_self, rhs).into(); + output + }, + ) + .overwrite_script_function( + "rotate", + |_self: Val, rhs: Val| { + let output: Val = DVec2::rotate(_self, rhs) + .into(); + output + }, + ) + .overwrite_script_function( + "rotate_towards", + | + _self: Ref, + rhs: Val, + max_angle: f64| + { + let output: Val = DVec2::rotate_towards( + _self, + rhs, + max_angle, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "as_vec2", + |_self: Ref| { + let output: Val = DVec2::as_vec2(_self).into(); + output + }, + ) + .overwrite_script_function( + "as_ivec2", + |_self: Ref| { + let output: Val = DVec2::as_ivec2(_self).into(); + output + }, + ) + .overwrite_script_function( + "as_uvec2", + |_self: Ref| { + let output: Val = DVec2::as_uvec2(_self).into(); + output + }, + ) + .overwrite_script_function( + "as_i64vec2", + |_self: Ref| { + let output: Val = DVec2::as_i64vec2(_self) + .into(); + output + }, + ) + .overwrite_script_function( + "as_u64vec2", + |_self: Ref| { + let output: Val = DVec2::as_u64vec2(_self) + .into(); + output + }, + ) + .overwrite_script_function( + "div", + |_self: Val, rhs: Val| { + let output: Val = DVec2::div(_self, rhs).into(); + output + }, + ) + .overwrite_script_function( + "div", + |_self: Val, rhs: Ref| { + let output: Val = DVec2::div(_self, rhs).into(); + output + }, + ) + .overwrite_script_function( + "mul", + |_self: Val, rhs: Ref| { + let output: Val = DVec2::mul(_self, rhs).into(); + output + }, + ) + .overwrite_script_function( + "rem", + |_self: Val, rhs: Val| { + let output: Val = DVec2::rem(_self, rhs).into(); + output + }, + ) + .overwrite_script_function( + "sub", + |_self: Val, rhs: f64| { + let output: Val = DVec2::sub(_self, rhs).into(); + output + }, + ) + .overwrite_script_function( + "neg", + |_self: Val| { + let output: Val = DVec2::neg(_self).into(); + output + }, + ) + .overwrite_script_function( + "add", + |_self: Val, rhs: f64| { + let output: Val = DVec2::add(_self, rhs).into(); + output + }, + ) + .overwrite_script_function( + "eq", + |_self: Ref, other: Ref| { + let output: bool = DVec2::eq(_self, other).into(); + output + }, + ) + .overwrite_script_function( + "rem", + |_self: Val, rhs: Ref| { + let output: Val = DVec2::rem(_self, rhs).into(); + output + }, + ) + .overwrite_script_function( + "sub", + |_self: Val, rhs: Val| { + let output: Val = DVec2::sub(_self, rhs).into(); + output + }, + ) + .overwrite_script_function( + "sub", + |_self: Val, rhs: Ref| { + let output: Val = DVec2::sub(_self, rhs).into(); + output + }, + ) + .overwrite_script_function( + "mul", + |_self: Val, rhs: f64| { + let output: Val = DVec2::mul(_self, rhs).into(); + output + }, + ) + .overwrite_script_function( + "add", + |_self: Val, rhs: Ref| { + let output: Val = DVec2::add(_self, rhs).into(); + output + }, + ) + .overwrite_script_function( + "clone", + |_self: Ref| { + let output: Val = DVec2::clone(_self).into(); + output + }, + ) + .overwrite_script_function( + "div", + |_self: Val, rhs: f64| { + let output: Val = DVec2::div(_self, rhs).into(); + output + }, + ); + NamespaceBuilder::::new(world) + .overwrite_script_function( + "div", + |_self: Val, rhs: f64| { + let output: Val = DVec3::div(_self, rhs).into(); + output + }, + ) + .overwrite_script_function( + "sub", + |_self: Val, rhs: f64| { + let output: Val = DVec3::sub(_self, rhs).into(); + output + }, + ) + .overwrite_script_function( + "add", + |_self: Val, rhs: f64| { + let output: Val = DVec3::add(_self, rhs).into(); + output + }, + ) + .overwrite_script_function( + "div", + |_self: Val, rhs: Val| { + let output: Val = DVec3::div(_self, rhs).into(); + output + }, + ) + .overwrite_script_function( + "neg", + |_self: Val| { + let output: Val = DVec3::neg(_self).into(); + output + }, + ) + .overwrite_script_function( + "eq", + |_self: Ref, other: Ref| { + let output: bool = DVec3::eq(_self, other).into(); + output + }, + ) + .overwrite_script_function( + "rem", + |_self: Val, rhs: f64| { + let output: Val = DVec3::rem(_self, rhs).into(); + output + }, + ) + .overwrite_script_function( + "add", + |_self: Val, rhs: Val| { + let output: Val = DVec3::add(_self, rhs).into(); + output + }, + ) + .overwrite_script_function( + "sub", + |_self: Val, rhs: Ref| { + let output: Val = DVec3::sub(_self, rhs).into(); + output + }, + ) + .overwrite_script_function( + "add", + |_self: Val, rhs: Ref| { + let output: Val = DVec3::add(_self, rhs).into(); + output + }, + ) + .overwrite_script_function( + "mul", + |_self: Val, rhs: Val| { + let output: Val = DVec3::mul(_self, rhs).into(); + output + }, + ) + .overwrite_script_function( + "div", + |_self: Val, rhs: Ref| { + let output: Val = DVec3::div(_self, rhs).into(); + output + }, + ) + .overwrite_script_function( + "rem", + |_self: Val, rhs: Ref| { + let output: Val = DVec3::rem(_self, rhs).into(); + output + }, + ) + .overwrite_script_function( + "rem", + |_self: Val, rhs: Val| { + let output: Val = DVec3::rem(_self, rhs).into(); + output + }, + ) + .overwrite_script_function( + "new", + |x: f64, y: f64, z: f64| { + let output: Val = DVec3::new(x, y, z).into(); + output + }, + ) + .overwrite_script_function( + "splat", + |v: f64| { + let output: Val = DVec3::splat(v).into(); + output + }, + ) + .overwrite_script_function( + "select", + | + mask: Val, + if_true: Val, + if_false: Val| + { + let output: Val = DVec3::select( + mask, + if_true, + if_false, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "from_array", + |a: [f64; 3]| { + let output: Val = DVec3::from_array(a).into(); + output + }, + ) + .overwrite_script_function( + "to_array", + |_self: Ref| { + let output: [f64; 3] = DVec3::to_array(_self).into(); + output + }, + ) + .overwrite_script_function( + "extend", + |_self: Val, w: f64| { + let output: Val = DVec3::extend(_self, w).into(); + output + }, + ) + .overwrite_script_function( + "truncate", + |_self: Val| { + let output: Val = DVec3::truncate(_self).into(); + output + }, + ) + .overwrite_script_function( + "with_x", + |_self: Val, x: f64| { + let output: Val = DVec3::with_x(_self, x).into(); + output + }, + ) + .overwrite_script_function( + "with_y", + |_self: Val, y: f64| { + let output: Val = DVec3::with_y(_self, y).into(); + output + }, + ) + .overwrite_script_function( + "with_z", + |_self: Val, z: f64| { + let output: Val = DVec3::with_z(_self, z).into(); + output + }, + ) + .overwrite_script_function( + "dot", + |_self: Val, rhs: Val| { + let output: f64 = DVec3::dot(_self, rhs).into(); + output + }, + ) + .overwrite_script_function( + "dot_into_vec", + |_self: Val, rhs: Val| { + let output: Val = DVec3::dot_into_vec(_self, rhs) + .into(); + output + }, + ) + .overwrite_script_function( + "cross", + |_self: Val, rhs: Val| { + let output: Val = DVec3::cross(_self, rhs).into(); + output + }, + ) + .overwrite_script_function( + "min", + |_self: Val, rhs: Val| { + let output: Val = DVec3::min(_self, rhs).into(); + output + }, + ) + .overwrite_script_function( + "max", + |_self: Val, rhs: Val| { + let output: Val = DVec3::max(_self, rhs).into(); + output + }, + ) + .overwrite_script_function( + "clamp", + | + _self: Val, + min: Val, + max: Val| + { + let output: Val = DVec3::clamp(_self, min, max) + .into(); + output + }, + ) + .overwrite_script_function( + "min_element", + |_self: Val| { + let output: f64 = DVec3::min_element(_self).into(); + output + }, + ) + .overwrite_script_function( + "max_element", + |_self: Val| { + let output: f64 = DVec3::max_element(_self).into(); + output + }, + ) + .overwrite_script_function( + "element_sum", + |_self: Val| { + let output: f64 = DVec3::element_sum(_self).into(); + output + }, + ) + .overwrite_script_function( + "element_product", + |_self: Val| { + let output: f64 = DVec3::element_product(_self).into(); + output + }, + ) + .overwrite_script_function( + "cmpeq", + |_self: Val, rhs: Val| { + let output: Val = DVec3::cmpeq(_self, rhs).into(); + output + }, + ) + .overwrite_script_function( + "cmpne", + |_self: Val, rhs: Val| { + let output: Val = DVec3::cmpne(_self, rhs).into(); + output + }, + ) + .overwrite_script_function( + "cmpge", + |_self: Val, rhs: Val| { + let output: Val = DVec3::cmpge(_self, rhs).into(); + output + }, + ) + .overwrite_script_function( + "cmpgt", + |_self: Val, rhs: Val| { + let output: Val = DVec3::cmpgt(_self, rhs).into(); + output + }, + ) + .overwrite_script_function( + "cmple", + |_self: Val, rhs: Val| { + let output: Val = DVec3::cmple(_self, rhs).into(); + output + }, + ) + .overwrite_script_function( + "cmplt", + |_self: Val, rhs: Val| { + let output: Val = DVec3::cmplt(_self, rhs).into(); + output + }, + ) + .overwrite_script_function( + "abs", + |_self: Val| { + let output: Val = DVec3::abs(_self).into(); + output + }, + ) + .overwrite_script_function( + "signum", + |_self: Val| { + let output: Val = DVec3::signum(_self).into(); + output + }, + ) + .overwrite_script_function( + "copysign", + |_self: Val, rhs: Val| { + let output: Val = DVec3::copysign(_self, rhs) + .into(); + output + }, + ) + .overwrite_script_function( + "is_negative_bitmask", + |_self: Val| { + let output: u32 = DVec3::is_negative_bitmask(_self).into(); + output + }, + ) + .overwrite_script_function( + "is_finite", + |_self: Val| { + let output: bool = DVec3::is_finite(_self).into(); + output + }, + ) + .overwrite_script_function( + "is_finite_mask", + |_self: Val| { + let output: Val = DVec3::is_finite_mask(_self) + .into(); + output + }, + ) + .overwrite_script_function( + "is_nan", + |_self: Val| { + let output: bool = DVec3::is_nan(_self).into(); + output + }, + ) + .overwrite_script_function( + "is_nan_mask", + |_self: Val| { + let output: Val = DVec3::is_nan_mask(_self) + .into(); + output + }, + ) + .overwrite_script_function( + "length", + |_self: Val| { + let output: f64 = DVec3::length(_self).into(); + output + }, + ) + .overwrite_script_function( + "length_squared", + |_self: Val| { + let output: f64 = DVec3::length_squared(_self).into(); + output + }, + ) + .overwrite_script_function( + "length_recip", + |_self: Val| { + let output: f64 = DVec3::length_recip(_self).into(); + output + }, + ) + .overwrite_script_function( + "distance", + |_self: Val, rhs: Val| { + let output: f64 = DVec3::distance(_self, rhs).into(); + output + }, + ) + .overwrite_script_function( + "distance_squared", + |_self: Val, rhs: Val| { + let output: f64 = DVec3::distance_squared(_self, rhs).into(); + output + }, + ) + .overwrite_script_function( + "div_euclid", + |_self: Val, rhs: Val| { + let output: Val = DVec3::div_euclid(_self, rhs) + .into(); + output + }, + ) + .overwrite_script_function( + "rem_euclid", + |_self: Val, rhs: Val| { + let output: Val = DVec3::rem_euclid(_self, rhs) + .into(); + output + }, + ) + .overwrite_script_function( + "normalize", + |_self: Val| { + let output: Val = DVec3::normalize(_self).into(); + output + }, + ) + .overwrite_script_function( + "normalize_or", + |_self: Val, fallback: Val| { + let output: Val = DVec3::normalize_or( + _self, + fallback, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "normalize_or_zero", + |_self: Val| { + let output: Val = DVec3::normalize_or_zero(_self) + .into(); + output + }, + ) + .overwrite_script_function( + "is_normalized", + |_self: Val| { + let output: bool = DVec3::is_normalized(_self).into(); + output + }, + ) + .overwrite_script_function( + "project_onto", + |_self: Val, rhs: Val| { + let output: Val = DVec3::project_onto(_self, rhs) + .into(); + output + }, + ) + .overwrite_script_function( + "reject_from", + |_self: Val, rhs: Val| { + let output: Val = DVec3::reject_from(_self, rhs) + .into(); + output + }, + ) + .overwrite_script_function( + "project_onto_normalized", + |_self: Val, rhs: Val| { + let output: Val = DVec3::project_onto_normalized( + _self, + rhs, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "reject_from_normalized", + |_self: Val, rhs: Val| { + let output: Val = DVec3::reject_from_normalized( + _self, + rhs, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "round", + |_self: Val| { + let output: Val = DVec3::round(_self).into(); + output + }, + ) + .overwrite_script_function( + "floor", + |_self: Val| { + let output: Val = DVec3::floor(_self).into(); + output + }, + ) + .overwrite_script_function( + "ceil", + |_self: Val| { + let output: Val = DVec3::ceil(_self).into(); + output + }, + ) + .overwrite_script_function( + "trunc", + |_self: Val| { + let output: Val = DVec3::trunc(_self).into(); + output + }, + ) + .overwrite_script_function( + "fract", + |_self: Val| { + let output: Val = DVec3::fract(_self).into(); + output + }, + ) + .overwrite_script_function( + "fract_gl", + |_self: Val| { + let output: Val = DVec3::fract_gl(_self).into(); + output + }, + ) + .overwrite_script_function( + "exp", + |_self: Val| { + let output: Val = DVec3::exp(_self).into(); + output + }, + ) + .overwrite_script_function( + "powf", + |_self: Val, n: f64| { + let output: Val = DVec3::powf(_self, n).into(); + output + }, + ) + .overwrite_script_function( + "recip", + |_self: Val| { + let output: Val = DVec3::recip(_self).into(); + output + }, + ) + .overwrite_script_function( + "lerp", + |_self: Val, rhs: Val, s: f64| { + let output: Val = DVec3::lerp(_self, rhs, s) + .into(); + output + }, + ) + .overwrite_script_function( + "move_towards", + |_self: Ref, rhs: Val, d: f64| { + let output: Val = DVec3::move_towards( + _self, + rhs, + d, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "midpoint", + |_self: Val, rhs: Val| { + let output: Val = DVec3::midpoint(_self, rhs) + .into(); + output + }, + ) + .overwrite_script_function( + "abs_diff_eq", + | + _self: Val, + rhs: Val, + max_abs_diff: f64| + { + let output: bool = DVec3::abs_diff_eq(_self, rhs, max_abs_diff) + .into(); + output + }, + ) + .overwrite_script_function( + "clamp_length", + |_self: Val, min: f64, max: f64| { + let output: Val = DVec3::clamp_length( + _self, + min, + max, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "clamp_length_max", + |_self: Val, max: f64| { + let output: Val = DVec3::clamp_length_max( + _self, + max, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "clamp_length_min", + |_self: Val, min: f64| { + let output: Val = DVec3::clamp_length_min( + _self, + min, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "mul_add", + | + _self: Val, + a: Val, + b: Val| + { + let output: Val = DVec3::mul_add(_self, a, b) + .into(); + output + }, + ) + .overwrite_script_function( + "reflect", + |_self: Val, normal: Val| { + let output: Val = DVec3::reflect(_self, normal) + .into(); + output + }, + ) + .overwrite_script_function( + "refract", + | + _self: Val, + normal: Val, + eta: f64| + { + let output: Val = DVec3::refract( + _self, + normal, + eta, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "angle_between", + |_self: Val, rhs: Val| { + let output: f64 = DVec3::angle_between(_self, rhs).into(); + output + }, + ) + .overwrite_script_function( + "any_orthogonal_vector", + |_self: Ref| { + let output: Val = DVec3::any_orthogonal_vector( + _self, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "any_orthonormal_vector", + |_self: Ref| { + let output: Val = DVec3::any_orthonormal_vector( + _self, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "as_vec3", + |_self: Ref| { + let output: Val = DVec3::as_vec3(_self).into(); + output + }, + ) + .overwrite_script_function( + "as_vec3a", + |_self: Ref| { + let output: Val = DVec3::as_vec3a(_self).into(); + output + }, + ) + .overwrite_script_function( + "as_ivec3", + |_self: Ref| { + let output: Val = DVec3::as_ivec3(_self).into(); + output + }, + ) + .overwrite_script_function( + "as_uvec3", + |_self: Ref| { + let output: Val = DVec3::as_uvec3(_self).into(); + output + }, + ) + .overwrite_script_function( + "as_i64vec3", + |_self: Ref| { + let output: Val = DVec3::as_i64vec3(_self) + .into(); + output + }, + ) + .overwrite_script_function( + "as_u64vec3", + |_self: Ref| { + let output: Val = DVec3::as_u64vec3(_self) + .into(); + output + }, + ) + .overwrite_script_function( + "mul", + |_self: Val, rhs: f64| { + let output: Val = DVec3::mul(_self, rhs).into(); + output + }, + ) + .overwrite_script_function( + "clone", + |_self: Ref| { + let output: Val = DVec3::clone(_self).into(); + output + }, + ) + .overwrite_script_function( + "mul", + |_self: Val, rhs: Ref| { + let output: Val = DVec3::mul(_self, rhs).into(); + output + }, + ) + .overwrite_script_function( + "sub", + |_self: Val, rhs: Val| { + let output: Val = DVec3::sub(_self, rhs).into(); + output + }, + ); + NamespaceBuilder::::new(world) + .overwrite_script_function( + "rem", + |_self: Val, rhs: Ref| { + let output: Val = DVec4::rem(_self, rhs).into(); + output + }, + ) + .overwrite_script_function( + "clone", + |_self: Ref| { + let output: Val = DVec4::clone(_self).into(); + output + }, + ) + .overwrite_script_function( + "neg", + |_self: Val| { + let output: Val = DVec4::neg(_self).into(); + output + }, + ) + .overwrite_script_function( + "new", + |x: f64, y: f64, z: f64, w: f64| { + let output: Val = DVec4::new(x, y, z, w).into(); + output + }, + ) + .overwrite_script_function( + "splat", + |v: f64| { + let output: Val = DVec4::splat(v).into(); + output + }, + ) + .overwrite_script_function( + "select", + | + mask: Val, + if_true: Val, + if_false: Val| + { + let output: Val = DVec4::select( + mask, + if_true, + if_false, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "from_array", + |a: [f64; 4]| { + let output: Val = DVec4::from_array(a).into(); + output + }, + ) + .overwrite_script_function( + "to_array", + |_self: Ref| { + let output: [f64; 4] = DVec4::to_array(_self).into(); + output + }, + ) + .overwrite_script_function( + "truncate", + |_self: Val| { + let output: Val = DVec4::truncate(_self).into(); + output + }, + ) + .overwrite_script_function( + "with_x", + |_self: Val, x: f64| { + let output: Val = DVec4::with_x(_self, x).into(); + output + }, + ) + .overwrite_script_function( + "with_y", + |_self: Val, y: f64| { + let output: Val = DVec4::with_y(_self, y).into(); + output + }, + ) + .overwrite_script_function( + "with_z", + |_self: Val, z: f64| { + let output: Val = DVec4::with_z(_self, z).into(); + output + }, + ) + .overwrite_script_function( + "with_w", + |_self: Val, w: f64| { + let output: Val = DVec4::with_w(_self, w).into(); + output + }, + ) + .overwrite_script_function( + "dot", + |_self: Val, rhs: Val| { + let output: f64 = DVec4::dot(_self, rhs).into(); + output + }, + ) + .overwrite_script_function( + "dot_into_vec", + |_self: Val, rhs: Val| { + let output: Val = DVec4::dot_into_vec(_self, rhs) + .into(); + output + }, + ) + .overwrite_script_function( + "min", + |_self: Val, rhs: Val| { + let output: Val = DVec4::min(_self, rhs).into(); + output + }, + ) + .overwrite_script_function( + "max", + |_self: Val, rhs: Val| { + let output: Val = DVec4::max(_self, rhs).into(); + output + }, + ) + .overwrite_script_function( + "clamp", + | + _self: Val, + min: Val, + max: Val| + { + let output: Val = DVec4::clamp(_self, min, max) + .into(); + output + }, + ) + .overwrite_script_function( + "min_element", + |_self: Val| { + let output: f64 = DVec4::min_element(_self).into(); + output + }, + ) + .overwrite_script_function( + "max_element", + |_self: Val| { + let output: f64 = DVec4::max_element(_self).into(); + output + }, + ) + .overwrite_script_function( + "element_sum", + |_self: Val| { + let output: f64 = DVec4::element_sum(_self).into(); + output + }, + ) + .overwrite_script_function( + "element_product", + |_self: Val| { + let output: f64 = DVec4::element_product(_self).into(); + output + }, + ) + .overwrite_script_function( + "cmpeq", + |_self: Val, rhs: Val| { + let output: Val = DVec4::cmpeq(_self, rhs).into(); + output + }, + ) + .overwrite_script_function( + "cmpne", + |_self: Val, rhs: Val| { + let output: Val = DVec4::cmpne(_self, rhs).into(); + output + }, + ) + .overwrite_script_function( + "cmpge", + |_self: Val, rhs: Val| { + let output: Val = DVec4::cmpge(_self, rhs).into(); + output + }, + ) + .overwrite_script_function( + "cmpgt", + |_self: Val, rhs: Val| { + let output: Val = DVec4::cmpgt(_self, rhs).into(); + output + }, + ) + .overwrite_script_function( + "cmple", + |_self: Val, rhs: Val| { + let output: Val = DVec4::cmple(_self, rhs).into(); + output + }, + ) + .overwrite_script_function( + "cmplt", + |_self: Val, rhs: Val| { + let output: Val = DVec4::cmplt(_self, rhs).into(); + output + }, + ) + .overwrite_script_function( + "abs", + |_self: Val| { + let output: Val = DVec4::abs(_self).into(); + output + }, + ) + .overwrite_script_function( + "signum", + |_self: Val| { + let output: Val = DVec4::signum(_self).into(); + output + }, + ) + .overwrite_script_function( + "copysign", + |_self: Val, rhs: Val| { + let output: Val = DVec4::copysign(_self, rhs) + .into(); + output + }, + ) + .overwrite_script_function( + "is_negative_bitmask", + |_self: Val| { + let output: u32 = DVec4::is_negative_bitmask(_self).into(); + output + }, + ) + .overwrite_script_function( + "is_finite", + |_self: Val| { + let output: bool = DVec4::is_finite(_self).into(); + output + }, + ) + .overwrite_script_function( + "is_finite_mask", + |_self: Val| { + let output: Val = DVec4::is_finite_mask(_self) + .into(); + output + }, + ) + .overwrite_script_function( + "is_nan", + |_self: Val| { + let output: bool = DVec4::is_nan(_self).into(); + output + }, + ) + .overwrite_script_function( + "is_nan_mask", + |_self: Val| { + let output: Val = DVec4::is_nan_mask(_self) + .into(); + output + }, + ) + .overwrite_script_function( + "length", + |_self: Val| { + let output: f64 = DVec4::length(_self).into(); + output + }, + ) + .overwrite_script_function( + "length_squared", + |_self: Val| { + let output: f64 = DVec4::length_squared(_self).into(); + output + }, + ) + .overwrite_script_function( + "length_recip", + |_self: Val| { + let output: f64 = DVec4::length_recip(_self).into(); + output + }, + ) + .overwrite_script_function( + "distance", + |_self: Val, rhs: Val| { + let output: f64 = DVec4::distance(_self, rhs).into(); + output + }, + ) + .overwrite_script_function( + "distance_squared", + |_self: Val, rhs: Val| { + let output: f64 = DVec4::distance_squared(_self, rhs).into(); + output + }, + ) + .overwrite_script_function( + "div_euclid", + |_self: Val, rhs: Val| { + let output: Val = DVec4::div_euclid(_self, rhs) + .into(); + output + }, + ) + .overwrite_script_function( + "rem_euclid", + |_self: Val, rhs: Val| { + let output: Val = DVec4::rem_euclid(_self, rhs) + .into(); + output + }, + ) + .overwrite_script_function( + "normalize", + |_self: Val| { + let output: Val = DVec4::normalize(_self).into(); + output + }, + ) + .overwrite_script_function( + "normalize_or", + |_self: Val, fallback: Val| { + let output: Val = DVec4::normalize_or( + _self, + fallback, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "normalize_or_zero", + |_self: Val| { + let output: Val = DVec4::normalize_or_zero(_self) + .into(); + output + }, + ) + .overwrite_script_function( + "is_normalized", + |_self: Val| { + let output: bool = DVec4::is_normalized(_self).into(); + output + }, + ) + .overwrite_script_function( + "project_onto", + |_self: Val, rhs: Val| { + let output: Val = DVec4::project_onto(_self, rhs) + .into(); + output + }, + ) + .overwrite_script_function( + "reject_from", + |_self: Val, rhs: Val| { + let output: Val = DVec4::reject_from(_self, rhs) + .into(); + output + }, + ) + .overwrite_script_function( + "project_onto_normalized", + |_self: Val, rhs: Val| { + let output: Val = DVec4::project_onto_normalized( + _self, + rhs, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "reject_from_normalized", + |_self: Val, rhs: Val| { + let output: Val = DVec4::reject_from_normalized( + _self, + rhs, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "round", + |_self: Val| { + let output: Val = DVec4::round(_self).into(); + output + }, + ) + .overwrite_script_function( + "floor", + |_self: Val| { + let output: Val = DVec4::floor(_self).into(); + output + }, + ) + .overwrite_script_function( + "ceil", + |_self: Val| { + let output: Val = DVec4::ceil(_self).into(); + output + }, + ) + .overwrite_script_function( + "trunc", + |_self: Val| { + let output: Val = DVec4::trunc(_self).into(); + output + }, + ) + .overwrite_script_function( + "fract", + |_self: Val| { + let output: Val = DVec4::fract(_self).into(); + output + }, + ) + .overwrite_script_function( + "fract_gl", + |_self: Val| { + let output: Val = DVec4::fract_gl(_self).into(); + output + }, + ) + .overwrite_script_function( + "exp", + |_self: Val| { + let output: Val = DVec4::exp(_self).into(); + output + }, + ) + .overwrite_script_function( + "powf", + |_self: Val, n: f64| { + let output: Val = DVec4::powf(_self, n).into(); + output + }, + ) + .overwrite_script_function( + "recip", + |_self: Val| { + let output: Val = DVec4::recip(_self).into(); + output + }, + ) + .overwrite_script_function( + "lerp", + |_self: Val, rhs: Val, s: f64| { + let output: Val = DVec4::lerp(_self, rhs, s) + .into(); + output + }, + ) + .overwrite_script_function( + "move_towards", + |_self: Ref, rhs: Val, d: f64| { + let output: Val = DVec4::move_towards( + _self, + rhs, + d, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "midpoint", + |_self: Val, rhs: Val| { + let output: Val = DVec4::midpoint(_self, rhs) + .into(); + output + }, + ) + .overwrite_script_function( + "abs_diff_eq", + | + _self: Val, + rhs: Val, + max_abs_diff: f64| + { + let output: bool = DVec4::abs_diff_eq(_self, rhs, max_abs_diff) + .into(); + output + }, + ) + .overwrite_script_function( + "clamp_length", + |_self: Val, min: f64, max: f64| { + let output: Val = DVec4::clamp_length( + _self, + min, + max, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "clamp_length_max", + |_self: Val, max: f64| { + let output: Val = DVec4::clamp_length_max( + _self, + max, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "clamp_length_min", + |_self: Val, min: f64| { + let output: Val = DVec4::clamp_length_min( + _self, + min, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "mul_add", + | + _self: Val, + a: Val, + b: Val| + { + let output: Val = DVec4::mul_add(_self, a, b) + .into(); + output + }, + ) + .overwrite_script_function( + "reflect", + |_self: Val, normal: Val| { + let output: Val = DVec4::reflect(_self, normal) + .into(); + output + }, + ) + .overwrite_script_function( + "refract", + | + _self: Val, + normal: Val, + eta: f64| + { + let output: Val = DVec4::refract( + _self, + normal, + eta, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "as_vec4", + |_self: Ref| { + let output: Val = DVec4::as_vec4(_self).into(); + output + }, + ) + .overwrite_script_function( + "as_ivec4", + |_self: Ref| { + let output: Val = DVec4::as_ivec4(_self).into(); + output + }, + ) + .overwrite_script_function( + "as_uvec4", + |_self: Ref| { + let output: Val = DVec4::as_uvec4(_self).into(); + output + }, + ) + .overwrite_script_function( + "as_i64vec4", + |_self: Ref| { + let output: Val = DVec4::as_i64vec4(_self) + .into(); + output + }, + ) + .overwrite_script_function( + "as_u64vec4", + |_self: Ref| { + let output: Val = DVec4::as_u64vec4(_self) + .into(); + output + }, + ) + .overwrite_script_function( + "eq", + |_self: Ref, other: Ref| { + let output: bool = DVec4::eq(_self, other).into(); + output + }, + ) + .overwrite_script_function( + "mul", + |_self: Val, rhs: Val| { + let output: Val = DVec4::mul(_self, rhs).into(); + output + }, + ) + .overwrite_script_function( + "div", + |_self: Val, rhs: f64| { + let output: Val = DVec4::div(_self, rhs).into(); + output + }, + ) + .overwrite_script_function( + "add", + |_self: Val, rhs: Ref| { + let output: Val = DVec4::add(_self, rhs).into(); + output + }, + ) + .overwrite_script_function( + "sub", + |_self: Val, rhs: Ref| { + let output: Val = DVec4::sub(_self, rhs).into(); + output + }, + ) + .overwrite_script_function( + "mul", + |_self: Val, rhs: Ref| { + let output: Val = DVec4::mul(_self, rhs).into(); + output + }, + ) + .overwrite_script_function( + "sub", + |_self: Val, rhs: f64| { + let output: Val = DVec4::sub(_self, rhs).into(); + output + }, + ) + .overwrite_script_function( + "div", + |_self: Val, rhs: Val| { + let output: Val = DVec4::div(_self, rhs).into(); + output + }, + ) + .overwrite_script_function( + "sub", + |_self: Val, rhs: Val| { + let output: Val = DVec4::sub(_self, rhs).into(); + output + }, + ) + .overwrite_script_function( + "rem", + |_self: Val, rhs: f64| { + let output: Val = DVec4::rem(_self, rhs).into(); + output + }, + ) + .overwrite_script_function( + "add", + |_self: Val, rhs: f64| { + let output: Val = DVec4::add(_self, rhs).into(); + output + }, + ) + .overwrite_script_function( + "add", + |_self: Val, rhs: Val| { + let output: Val = DVec4::add(_self, rhs).into(); + output + }, + ) + .overwrite_script_function( + "rem", + |_self: Val, rhs: Val| { + let output: Val = DVec4::rem(_self, rhs).into(); + output + }, + ) + .overwrite_script_function( + "div", + |_self: Val, rhs: Ref| { + let output: Val = DVec4::div(_self, rhs).into(); + output + }, + ) + .overwrite_script_function( + "mul", + |_self: Val, rhs: f64| { + let output: Val = DVec4::mul(_self, rhs).into(); + output + }, + ); + NamespaceBuilder::::new(world) + .overwrite_script_function( + "div", + |_self: Val, rhs: f32| { + let output: Val = Mat2::div(_self, rhs).into(); + output + }, + ) + .overwrite_script_function( + "eq", + |_self: Ref, rhs: Ref| { + let output: bool = Mat2::eq(_self, rhs).into(); + output + }, + ) + .overwrite_script_function( + "neg", + |_self: Val| { + let output: Val = Mat2::neg(_self).into(); + output + }, + ) + .overwrite_script_function( + "clone", + |_self: Ref| { + let output: Val = Mat2::clone(_self).into(); + output + }, + ) + .overwrite_script_function( + "from_cols", + |x_axis: Val, y_axis: Val| { + let output: Val = Mat2::from_cols(x_axis, y_axis) + .into(); + output + }, + ) + .overwrite_script_function( + "to_cols_array", + |_self: Ref| { + let output: [f32; 4] = Mat2::to_cols_array(_self).into(); + output + }, + ) + .overwrite_script_function( + "to_cols_array_2d", + |_self: Ref| { + let output: [[f32; 2]; 2] = Mat2::to_cols_array_2d(_self).into(); + output + }, + ) + .overwrite_script_function( + "from_diagonal", + |diagonal: Val| { + let output: Val = Mat2::from_diagonal(diagonal) + .into(); + output + }, + ) + .overwrite_script_function( + "from_scale_angle", + |scale: Val, angle: f32| { + let output: Val = Mat2::from_scale_angle( + scale, + angle, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "from_angle", + |angle: f32| { + let output: Val = Mat2::from_angle(angle).into(); + output + }, + ) + .overwrite_script_function( + "from_mat3", + |m: Val| { + let output: Val = Mat2::from_mat3(m).into(); + output + }, + ) + .overwrite_script_function( + "from_mat3_minor", + |m: Val, i: usize, j: usize| { + let output: Val = Mat2::from_mat3_minor(m, i, j) + .into(); + output + }, + ) + .overwrite_script_function( + "from_mat3a", + |m: Val| { + let output: Val = Mat2::from_mat3a(m).into(); + output + }, + ) + .overwrite_script_function( + "from_mat3a_minor", + |m: Val, i: usize, j: usize| { + let output: Val = Mat2::from_mat3a_minor(m, i, j) + .into(); + output + }, + ) + .overwrite_script_function( + "col", + |_self: Ref, index: usize| { + let output: Val = Mat2::col(_self, index).into(); + output + }, + ) + .overwrite_script_function( + "row", + |_self: Ref, index: usize| { + let output: Val = Mat2::row(_self, index).into(); + output + }, + ) + .overwrite_script_function( + "is_finite", + |_self: Ref| { + let output: bool = Mat2::is_finite(_self).into(); + output + }, + ) + .overwrite_script_function( + "is_nan", + |_self: Ref| { + let output: bool = Mat2::is_nan(_self).into(); + output + }, + ) + .overwrite_script_function( + "transpose", + |_self: Ref| { + let output: Val = Mat2::transpose(_self).into(); + output + }, + ) + .overwrite_script_function( + "determinant", + |_self: Ref| { + let output: f32 = Mat2::determinant(_self).into(); + output + }, + ) + .overwrite_script_function( + "inverse", + |_self: Ref| { + let output: Val = Mat2::inverse(_self).into(); + output + }, + ) + .overwrite_script_function( + "mul_vec2", + |_self: Ref, rhs: Val| { + let output: Val = Mat2::mul_vec2(_self, rhs) + .into(); + output + }, + ) + .overwrite_script_function( + "mul_mat2", + |_self: Ref, rhs: Ref| { + let output: Val = Mat2::mul_mat2(_self, rhs) + .into(); + output + }, + ) + .overwrite_script_function( + "add_mat2", + |_self: Ref, rhs: Ref| { + let output: Val = Mat2::add_mat2(_self, rhs) + .into(); + output + }, + ) + .overwrite_script_function( + "sub_mat2", + |_self: Ref, rhs: Ref| { + let output: Val = Mat2::sub_mat2(_self, rhs) + .into(); + output + }, + ) + .overwrite_script_function( + "mul_scalar", + |_self: Ref, rhs: f32| { + let output: Val = Mat2::mul_scalar(_self, rhs) + .into(); + output + }, + ) + .overwrite_script_function( + "div_scalar", + |_self: Ref, rhs: f32| { + let output: Val = Mat2::div_scalar(_self, rhs) + .into(); + output + }, + ) + .overwrite_script_function( + "abs_diff_eq", + | + _self: Ref, + rhs: Val, + max_abs_diff: f32| + { + let output: bool = Mat2::abs_diff_eq(_self, rhs, max_abs_diff) + .into(); + output + }, + ) + .overwrite_script_function( + "abs", + |_self: Ref| { + let output: Val = Mat2::abs(_self).into(); + output + }, + ) + .overwrite_script_function( + "as_dmat2", + |_self: Ref| { + let output: Val = Mat2::as_dmat2(_self).into(); + output + }, + ) + .overwrite_script_function( + "sub", + |_self: Val, rhs: Val| { + let output: Val = Mat2::sub(_self, rhs).into(); + output + }, + ) + .overwrite_script_function( + "mul", + |_self: Val, rhs: Val| { + let output: Val = Mat2::mul(_self, rhs).into(); + output + }, + ) + .overwrite_script_function( + "mul", + |_self: Val, rhs: Val| { + let output: Val = Mat2::mul(_self, rhs).into(); + output + }, + ) + .overwrite_script_function( + "mul", + |_self: Val, rhs: f32| { + let output: Val = Mat2::mul(_self, rhs).into(); + output + }, + ) + .overwrite_script_function( + "add", + |_self: Val, rhs: Val| { + let output: Val = Mat2::add(_self, rhs).into(); + output + }, + ); + NamespaceBuilder::::new(world) + .overwrite_script_function( + "mul", + |_self: Val, rhs: Val| { + let output: Val = Mat3::mul(_self, rhs).into(); + output + }, + ) + .overwrite_script_function( + "mul", + |_self: Val, rhs: Val| { + let output: Val = Mat3::mul(_self, rhs).into(); + output + }, + ) + .overwrite_script_function( + "mul", + |_self: Val, rhs: Val| { + let output: Val = Mat3::mul(_self, rhs).into(); + output + }, + ) + .overwrite_script_function( + "mul", + |_self: Val, rhs: Val| { + let output: Val = Mat3::mul(_self, rhs).into(); + output + }, + ) + .overwrite_script_function( + "neg", + |_self: Val| { + let output: Val = Mat3::neg(_self).into(); + output + }, + ) + .overwrite_script_function( + "add", + |_self: Val, rhs: Val| { + let output: Val = Mat3::add(_self, rhs).into(); + output + }, + ) + .overwrite_script_function( + "clone", + |_self: Ref| { + let output: Val = Mat3::clone(_self).into(); + output + }, + ) + .overwrite_script_function( + "from_cols", + | + x_axis: Val, + y_axis: Val, + z_axis: Val| + { + let output: Val = Mat3::from_cols( + x_axis, + y_axis, + z_axis, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "to_cols_array", + |_self: Ref| { + let output: [f32; 9] = Mat3::to_cols_array(_self).into(); + output + }, + ) + .overwrite_script_function( + "to_cols_array_2d", + |_self: Ref| { + let output: [[f32; 3]; 3] = Mat3::to_cols_array_2d(_self).into(); + output + }, + ) + .overwrite_script_function( + "from_diagonal", + |diagonal: Val| { + let output: Val = Mat3::from_diagonal(diagonal) + .into(); + output + }, + ) + .overwrite_script_function( + "from_mat4", + |m: Val| { + let output: Val = Mat3::from_mat4(m).into(); + output + }, + ) + .overwrite_script_function( + "from_mat4_minor", + |m: Val, i: usize, j: usize| { + let output: Val = Mat3::from_mat4_minor(m, i, j) + .into(); + output + }, + ) + .overwrite_script_function( + "from_quat", + |rotation: Val| { + let output: Val = Mat3::from_quat(rotation).into(); + output + }, + ) + .overwrite_script_function( + "from_axis_angle", + |axis: Val, angle: f32| { + let output: Val = Mat3::from_axis_angle( + axis, + angle, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "from_euler", + |order: Val, a: f32, b: f32, c: f32| { + let output: Val = Mat3::from_euler(order, a, b, c) + .into(); + output + }, + ) + .overwrite_script_function( + "to_euler", + |_self: Ref, order: Val| { + let output: (f32, f32, f32) = Mat3::to_euler(_self, order).into(); + output + }, + ) + .overwrite_script_function( + "from_rotation_x", + |angle: f32| { + let output: Val = Mat3::from_rotation_x(angle) + .into(); + output + }, + ) + .overwrite_script_function( + "from_rotation_y", + |angle: f32| { + let output: Val = Mat3::from_rotation_y(angle) + .into(); + output + }, + ) + .overwrite_script_function( + "from_rotation_z", + |angle: f32| { + let output: Val = Mat3::from_rotation_z(angle) + .into(); + output + }, + ) + .overwrite_script_function( + "from_translation", + |translation: Val| { + let output: Val = Mat3::from_translation( + translation, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "from_angle", + |angle: f32| { + let output: Val = Mat3::from_angle(angle).into(); + output + }, + ) + .overwrite_script_function( + "from_scale_angle_translation", + | + scale: Val, + angle: f32, + translation: Val| + { + let output: Val = Mat3::from_scale_angle_translation( + scale, + angle, + translation, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "from_scale", + |scale: Val| { + let output: Val = Mat3::from_scale(scale).into(); + output + }, + ) + .overwrite_script_function( + "from_mat2", + |m: Val| { + let output: Val = Mat3::from_mat2(m).into(); + output + }, + ) + .overwrite_script_function( + "col", + |_self: Ref, index: usize| { + let output: Val = Mat3::col(_self, index).into(); + output + }, + ) + .overwrite_script_function( + "row", + |_self: Ref, index: usize| { + let output: Val = Mat3::row(_self, index).into(); + output + }, + ) + .overwrite_script_function( + "is_finite", + |_self: Ref| { + let output: bool = Mat3::is_finite(_self).into(); + output + }, + ) + .overwrite_script_function( + "is_nan", + |_self: Ref| { + let output: bool = Mat3::is_nan(_self).into(); + output + }, + ) + .overwrite_script_function( + "transpose", + |_self: Ref| { + let output: Val = Mat3::transpose(_self).into(); + output + }, + ) + .overwrite_script_function( + "determinant", + |_self: Ref| { + let output: f32 = Mat3::determinant(_self).into(); + output + }, + ) + .overwrite_script_function( + "inverse", + |_self: Ref| { + let output: Val = Mat3::inverse(_self).into(); + output + }, + ) + .overwrite_script_function( + "transform_point2", + |_self: Ref, rhs: Val| { + let output: Val = Mat3::transform_point2( + _self, + rhs, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "transform_vector2", + |_self: Ref, rhs: Val| { + let output: Val = Mat3::transform_vector2( + _self, + rhs, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "mul_vec3", + |_self: Ref, rhs: Val| { + let output: Val = Mat3::mul_vec3(_self, rhs) + .into(); + output + }, + ) + .overwrite_script_function( + "mul_vec3a", + |_self: Ref, rhs: Val| { + let output: Val = Mat3::mul_vec3a(_self, rhs) + .into(); + output + }, + ) + .overwrite_script_function( + "mul_mat3", + |_self: Ref, rhs: Ref| { + let output: Val = Mat3::mul_mat3(_self, rhs) + .into(); + output + }, + ) + .overwrite_script_function( + "add_mat3", + |_self: Ref, rhs: Ref| { + let output: Val = Mat3::add_mat3(_self, rhs) + .into(); + output + }, + ) + .overwrite_script_function( + "sub_mat3", + |_self: Ref, rhs: Ref| { + let output: Val = Mat3::sub_mat3(_self, rhs) + .into(); + output + }, + ) + .overwrite_script_function( + "mul_scalar", + |_self: Ref, rhs: f32| { + let output: Val = Mat3::mul_scalar(_self, rhs) + .into(); + output + }, + ) + .overwrite_script_function( + "div_scalar", + |_self: Ref, rhs: f32| { + let output: Val = Mat3::div_scalar(_self, rhs) + .into(); + output + }, + ) + .overwrite_script_function( + "abs_diff_eq", + | + _self: Ref, + rhs: Val, + max_abs_diff: f32| + { + let output: bool = Mat3::abs_diff_eq(_self, rhs, max_abs_diff) + .into(); + output + }, + ) + .overwrite_script_function( + "abs", + |_self: Ref| { + let output: Val = Mat3::abs(_self).into(); + output + }, + ) + .overwrite_script_function( + "as_dmat3", + |_self: Ref| { + let output: Val = Mat3::as_dmat3(_self).into(); + output + }, + ) + .overwrite_script_function( + "mul", + |_self: Val, rhs: f32| { + let output: Val = Mat3::mul(_self, rhs).into(); + output + }, + ) + .overwrite_script_function( + "eq", + |_self: Ref, rhs: Ref| { + let output: bool = Mat3::eq(_self, rhs).into(); + output + }, + ) + .overwrite_script_function( + "div", + |_self: Val, rhs: f32| { + let output: Val = Mat3::div(_self, rhs).into(); + output + }, + ) + .overwrite_script_function( + "sub", + |_self: Val, rhs: Val| { + let output: Val = Mat3::sub(_self, rhs).into(); + output + }, + ); + NamespaceBuilder::::new(world) + .overwrite_script_function( + "mul", + |_self: Val, rhs: Val| { + let output: Val = Mat3A::mul(_self, rhs).into(); + output + }, + ) + .overwrite_script_function( + "clone", + |_self: Ref| { + let output: Val = Mat3A::clone(_self).into(); + output + }, + ) + .overwrite_script_function( + "mul", + |_self: Val, rhs: Val| { + let output: Val = Mat3A::mul(_self, rhs).into(); + output + }, + ) + .overwrite_script_function( + "neg", + |_self: Val| { + let output: Val = Mat3A::neg(_self).into(); + output + }, + ) + .overwrite_script_function( + "add", + |_self: Val, rhs: Val| { + let output: Val = Mat3A::add(_self, rhs).into(); + output + }, + ) + .overwrite_script_function( + "mul", + |_self: Val, rhs: Val| { + let output: Val = Mat3A::mul(_self, rhs).into(); + output + }, + ) + .overwrite_script_function( + "eq", + |_self: Ref, rhs: Ref| { + let output: bool = Mat3A::eq(_self, rhs).into(); + output + }, + ) + .overwrite_script_function( + "mul", + |_self: Val, rhs: f32| { + let output: Val = Mat3A::mul(_self, rhs).into(); + output + }, + ) + .overwrite_script_function( + "div", + |_self: Val, rhs: f32| { + let output: Val = Mat3A::div(_self, rhs).into(); + output + }, + ) + .overwrite_script_function( + "mul", + |_self: Val, rhs: Val| { + let output: Val = Mat3A::mul(_self, rhs).into(); + output + }, + ) + .overwrite_script_function( + "sub", + |_self: Val, rhs: Val| { + let output: Val = Mat3A::sub(_self, rhs).into(); + output + }, + ) + .overwrite_script_function( + "from_cols", + | + x_axis: Val, + y_axis: Val, + z_axis: Val| + { + let output: Val = Mat3A::from_cols( + x_axis, + y_axis, + z_axis, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "to_cols_array", + |_self: Ref| { + let output: [f32; 9] = Mat3A::to_cols_array(_self).into(); + output + }, + ) + .overwrite_script_function( + "to_cols_array_2d", + |_self: Ref| { + let output: [[f32; 3]; 3] = Mat3A::to_cols_array_2d(_self).into(); + output + }, + ) + .overwrite_script_function( + "from_diagonal", + |diagonal: Val| { + let output: Val = Mat3A::from_diagonal(diagonal) + .into(); + output + }, + ) + .overwrite_script_function( + "from_mat4", + |m: Val| { + let output: Val = Mat3A::from_mat4(m).into(); + output + }, + ) + .overwrite_script_function( + "from_mat4_minor", + |m: Val, i: usize, j: usize| { + let output: Val = Mat3A::from_mat4_minor(m, i, j) + .into(); + output + }, + ) + .overwrite_script_function( + "from_quat", + |rotation: Val| { + let output: Val = Mat3A::from_quat(rotation) + .into(); + output + }, + ) + .overwrite_script_function( + "from_axis_angle", + |axis: Val, angle: f32| { + let output: Val = Mat3A::from_axis_angle( + axis, + angle, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "from_euler", + |order: Val, a: f32, b: f32, c: f32| { + let output: Val = Mat3A::from_euler( + order, + a, + b, + c, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "to_euler", + |_self: Ref, order: Val| { + let output: (f32, f32, f32) = Mat3A::to_euler(_self, order).into(); + output + }, + ) + .overwrite_script_function( + "from_rotation_x", + |angle: f32| { + let output: Val = Mat3A::from_rotation_x(angle) + .into(); + output + }, + ) + .overwrite_script_function( + "from_rotation_y", + |angle: f32| { + let output: Val = Mat3A::from_rotation_y(angle) + .into(); + output + }, + ) + .overwrite_script_function( + "from_rotation_z", + |angle: f32| { + let output: Val = Mat3A::from_rotation_z(angle) + .into(); + output + }, + ) + .overwrite_script_function( + "from_translation", + |translation: Val| { + let output: Val = Mat3A::from_translation( + translation, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "from_angle", + |angle: f32| { + let output: Val = Mat3A::from_angle(angle).into(); + output + }, + ) + .overwrite_script_function( + "from_scale_angle_translation", + | + scale: Val, + angle: f32, + translation: Val| + { + let output: Val = Mat3A::from_scale_angle_translation( + scale, + angle, + translation, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "from_scale", + |scale: Val| { + let output: Val = Mat3A::from_scale(scale).into(); + output + }, + ) + .overwrite_script_function( + "from_mat2", + |m: Val| { + let output: Val = Mat3A::from_mat2(m).into(); + output + }, + ) + .overwrite_script_function( + "col", + |_self: Ref, index: usize| { + let output: Val = Mat3A::col(_self, index).into(); + output + }, + ) + .overwrite_script_function( + "row", + |_self: Ref, index: usize| { + let output: Val = Mat3A::row(_self, index).into(); + output + }, + ) + .overwrite_script_function( + "is_finite", + |_self: Ref| { + let output: bool = Mat3A::is_finite(_self).into(); + output + }, + ) + .overwrite_script_function( + "is_nan", + |_self: Ref| { + let output: bool = Mat3A::is_nan(_self).into(); + output + }, + ) + .overwrite_script_function( + "transpose", + |_self: Ref| { + let output: Val = Mat3A::transpose(_self).into(); + output + }, + ) + .overwrite_script_function( + "determinant", + |_self: Ref| { + let output: f32 = Mat3A::determinant(_self).into(); + output + }, + ) + .overwrite_script_function( + "inverse", + |_self: Ref| { + let output: Val = Mat3A::inverse(_self).into(); + output + }, + ) + .overwrite_script_function( + "transform_point2", + |_self: Ref, rhs: Val| { + let output: Val = Mat3A::transform_point2( + _self, + rhs, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "transform_vector2", + |_self: Ref, rhs: Val| { + let output: Val = Mat3A::transform_vector2( + _self, + rhs, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "mul_vec3", + |_self: Ref, rhs: Val| { + let output: Val = Mat3A::mul_vec3(_self, rhs) + .into(); + output + }, + ) + .overwrite_script_function( + "mul_vec3a", + |_self: Ref, rhs: Val| { + let output: Val = Mat3A::mul_vec3a(_self, rhs) + .into(); + output + }, + ) + .overwrite_script_function( + "mul_mat3", + |_self: Ref, rhs: Ref| { + let output: Val = Mat3A::mul_mat3(_self, rhs) + .into(); + output + }, + ) + .overwrite_script_function( + "add_mat3", + |_self: Ref, rhs: Ref| { + let output: Val = Mat3A::add_mat3(_self, rhs) + .into(); + output + }, + ) + .overwrite_script_function( + "sub_mat3", + |_self: Ref, rhs: Ref| { + let output: Val = Mat3A::sub_mat3(_self, rhs) + .into(); + output + }, + ) + .overwrite_script_function( + "mul_scalar", + |_self: Ref, rhs: f32| { + let output: Val = Mat3A::mul_scalar(_self, rhs) + .into(); + output + }, + ) + .overwrite_script_function( + "div_scalar", + |_self: Ref, rhs: f32| { + let output: Val = Mat3A::div_scalar(_self, rhs) + .into(); + output + }, + ) + .overwrite_script_function( + "abs_diff_eq", + | + _self: Ref, + rhs: Val, + max_abs_diff: f32| + { + let output: bool = Mat3A::abs_diff_eq(_self, rhs, max_abs_diff) + .into(); + output + }, + ) + .overwrite_script_function( + "abs", + |_self: Ref| { + let output: Val = Mat3A::abs(_self).into(); + output + }, + ) + .overwrite_script_function( + "as_dmat3", + |_self: Ref| { + let output: Val = Mat3A::as_dmat3(_self).into(); + output + }, + ); + NamespaceBuilder::::new(world) + .overwrite_script_function( + "neg", + |_self: Val| { + let output: Val = Mat4::neg(_self).into(); + output + }, + ) + .overwrite_script_function( + "clone", + |_self: Ref| { + let output: Val = Mat4::clone(_self).into(); + output + }, + ) + .overwrite_script_function( + "mul", + |_self: Val, rhs: Val| { + let output: Val = Mat4::mul(_self, rhs).into(); + output + }, + ) + .overwrite_script_function( + "mul", + |_self: Val, rhs: Val| { + let output: Val = Mat4::mul(_self, rhs).into(); + output + }, + ) + .overwrite_script_function( + "add", + |_self: Val, rhs: Val| { + let output: Val = Mat4::add(_self, rhs).into(); + output + }, + ) + .overwrite_script_function( + "mul", + |_self: Val, rhs: f32| { + let output: Val = Mat4::mul(_self, rhs).into(); + output + }, + ) + .overwrite_script_function( + "eq", + |_self: Ref, rhs: Ref| { + let output: bool = Mat4::eq(_self, rhs).into(); + output + }, + ) + .overwrite_script_function( + "sub", + |_self: Val, rhs: Val| { + let output: Val = Mat4::sub(_self, rhs).into(); + output + }, + ) + .overwrite_script_function( + "div", + |_self: Val, rhs: f32| { + let output: Val = Mat4::div(_self, rhs).into(); + output + }, + ) + .overwrite_script_function( + "from_cols", + | + x_axis: Val, + y_axis: Val, + z_axis: Val, + w_axis: Val| + { + let output: Val = Mat4::from_cols( + x_axis, + y_axis, + z_axis, + w_axis, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "to_cols_array", + |_self: Ref| { + let output: [f32; 16] = Mat4::to_cols_array(_self).into(); + output + }, + ) + .overwrite_script_function( + "to_cols_array_2d", + |_self: Ref| { + let output: [[f32; 4]; 4] = Mat4::to_cols_array_2d(_self).into(); + output + }, + ) + .overwrite_script_function( + "from_diagonal", + |diagonal: Val| { + let output: Val = Mat4::from_diagonal(diagonal) + .into(); + output + }, + ) + .overwrite_script_function( + "from_scale_rotation_translation", + | + scale: Val, + rotation: Val, + translation: Val| + { + let output: Val = Mat4::from_scale_rotation_translation( + scale, + rotation, + translation, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "from_rotation_translation", + |rotation: Val, translation: Val| { + let output: Val = Mat4::from_rotation_translation( + rotation, + translation, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "from_quat", + |rotation: Val| { + let output: Val = Mat4::from_quat(rotation).into(); + output + }, + ) + .overwrite_script_function( + "from_mat3", + |m: Val| { + let output: Val = Mat4::from_mat3(m).into(); + output + }, + ) + .overwrite_script_function( + "from_mat3a", + |m: Val| { + let output: Val = Mat4::from_mat3a(m).into(); + output + }, + ) + .overwrite_script_function( + "from_translation", + |translation: Val| { + let output: Val = Mat4::from_translation( + translation, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "from_axis_angle", + |axis: Val, angle: f32| { + let output: Val = Mat4::from_axis_angle( + axis, + angle, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "from_euler", + |order: Val, a: f32, b: f32, c: f32| { + let output: Val = Mat4::from_euler(order, a, b, c) + .into(); + output + }, + ) + .overwrite_script_function( + "to_euler", + |_self: Ref, order: Val| { + let output: (f32, f32, f32) = Mat4::to_euler(_self, order).into(); + output + }, + ) + .overwrite_script_function( + "from_rotation_x", + |angle: f32| { + let output: Val = Mat4::from_rotation_x(angle) + .into(); + output + }, + ) + .overwrite_script_function( + "from_rotation_y", + |angle: f32| { + let output: Val = Mat4::from_rotation_y(angle) + .into(); + output + }, + ) + .overwrite_script_function( + "from_rotation_z", + |angle: f32| { + let output: Val = Mat4::from_rotation_z(angle) + .into(); + output + }, + ) + .overwrite_script_function( + "from_scale", + |scale: Val| { + let output: Val = Mat4::from_scale(scale).into(); + output + }, + ) + .overwrite_script_function( + "col", + |_self: Ref, index: usize| { + let output: Val = Mat4::col(_self, index).into(); + output + }, + ) + .overwrite_script_function( + "row", + |_self: Ref, index: usize| { + let output: Val = Mat4::row(_self, index).into(); + output + }, + ) + .overwrite_script_function( + "is_finite", + |_self: Ref| { + let output: bool = Mat4::is_finite(_self).into(); + output + }, + ) + .overwrite_script_function( + "is_nan", + |_self: Ref| { + let output: bool = Mat4::is_nan(_self).into(); + output + }, + ) + .overwrite_script_function( + "transpose", + |_self: Ref| { + let output: Val = Mat4::transpose(_self).into(); + output + }, + ) + .overwrite_script_function( + "determinant", + |_self: Ref| { + let output: f32 = Mat4::determinant(_self).into(); + output + }, + ) + .overwrite_script_function( + "inverse", + |_self: Ref| { + let output: Val = Mat4::inverse(_self).into(); + output + }, + ) + .overwrite_script_function( + "look_to_lh", + | + eye: Val, + dir: Val, + up: Val| + { + let output: Val = Mat4::look_to_lh(eye, dir, up) + .into(); + output + }, + ) + .overwrite_script_function( + "look_to_rh", + | + eye: Val, + dir: Val, + up: Val| + { + let output: Val = Mat4::look_to_rh(eye, dir, up) + .into(); + output + }, + ) + .overwrite_script_function( + "look_at_lh", + | + eye: Val, + center: Val, + up: Val| + { + let output: Val = Mat4::look_at_lh(eye, center, up) + .into(); + output + }, + ) + .overwrite_script_function( + "look_at_rh", + | + eye: Val, + center: Val, + up: Val| + { + let output: Val = Mat4::look_at_rh(eye, center, up) + .into(); + output + }, + ) + .overwrite_script_function( + "perspective_rh_gl", + |fov_y_radians: f32, aspect_ratio: f32, z_near: f32, z_far: f32| { + let output: Val = Mat4::perspective_rh_gl( + fov_y_radians, + aspect_ratio, + z_near, + z_far, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "perspective_lh", + |fov_y_radians: f32, aspect_ratio: f32, z_near: f32, z_far: f32| { + let output: Val = Mat4::perspective_lh( + fov_y_radians, + aspect_ratio, + z_near, + z_far, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "perspective_rh", + |fov_y_radians: f32, aspect_ratio: f32, z_near: f32, z_far: f32| { + let output: Val = Mat4::perspective_rh( + fov_y_radians, + aspect_ratio, + z_near, + z_far, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "perspective_infinite_lh", + |fov_y_radians: f32, aspect_ratio: f32, z_near: f32| { + let output: Val = Mat4::perspective_infinite_lh( + fov_y_radians, + aspect_ratio, + z_near, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "perspective_infinite_reverse_lh", + |fov_y_radians: f32, aspect_ratio: f32, z_near: f32| { + let output: Val = Mat4::perspective_infinite_reverse_lh( + fov_y_radians, + aspect_ratio, + z_near, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "perspective_infinite_rh", + |fov_y_radians: f32, aspect_ratio: f32, z_near: f32| { + let output: Val = Mat4::perspective_infinite_rh( + fov_y_radians, + aspect_ratio, + z_near, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "perspective_infinite_reverse_rh", + |fov_y_radians: f32, aspect_ratio: f32, z_near: f32| { + let output: Val = Mat4::perspective_infinite_reverse_rh( + fov_y_radians, + aspect_ratio, + z_near, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "orthographic_rh_gl", + |left: f32, right: f32, bottom: f32, top: f32, near: f32, far: f32| { + let output: Val = Mat4::orthographic_rh_gl( + left, + right, + bottom, + top, + near, + far, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "orthographic_lh", + |left: f32, right: f32, bottom: f32, top: f32, near: f32, far: f32| { + let output: Val = Mat4::orthographic_lh( + left, + right, + bottom, + top, + near, + far, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "orthographic_rh", + |left: f32, right: f32, bottom: f32, top: f32, near: f32, far: f32| { + let output: Val = Mat4::orthographic_rh( + left, + right, + bottom, + top, + near, + far, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "project_point3", + |_self: Ref, rhs: Val| { + let output: Val = Mat4::project_point3(_self, rhs) + .into(); + output + }, + ) + .overwrite_script_function( + "transform_point3", + |_self: Ref, rhs: Val| { + let output: Val = Mat4::transform_point3( + _self, + rhs, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "transform_vector3", + |_self: Ref, rhs: Val| { + let output: Val = Mat4::transform_vector3( + _self, + rhs, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "project_point3a", + |_self: Ref, rhs: Val| { + let output: Val = Mat4::project_point3a( + _self, + rhs, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "transform_point3a", + |_self: Ref, rhs: Val| { + let output: Val = Mat4::transform_point3a( + _self, + rhs, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "transform_vector3a", + |_self: Ref, rhs: Val| { + let output: Val = Mat4::transform_vector3a( + _self, + rhs, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "mul_vec4", + |_self: Ref, rhs: Val| { + let output: Val = Mat4::mul_vec4(_self, rhs) + .into(); + output + }, + ) + .overwrite_script_function( + "mul_mat4", + |_self: Ref, rhs: Ref| { + let output: Val = Mat4::mul_mat4(_self, rhs) + .into(); + output + }, + ) + .overwrite_script_function( + "add_mat4", + |_self: Ref, rhs: Ref| { + let output: Val = Mat4::add_mat4(_self, rhs) + .into(); + output + }, + ) + .overwrite_script_function( + "sub_mat4", + |_self: Ref, rhs: Ref| { + let output: Val = Mat4::sub_mat4(_self, rhs) + .into(); + output + }, + ) + .overwrite_script_function( + "mul_scalar", + |_self: Ref, rhs: f32| { + let output: Val = Mat4::mul_scalar(_self, rhs) + .into(); + output + }, + ) + .overwrite_script_function( + "div_scalar", + |_self: Ref, rhs: f32| { + let output: Val = Mat4::div_scalar(_self, rhs) + .into(); + output + }, + ) + .overwrite_script_function( + "abs_diff_eq", + | + _self: Ref, + rhs: Val, + max_abs_diff: f32| + { + let output: bool = Mat4::abs_diff_eq(_self, rhs, max_abs_diff) + .into(); + output + }, + ) + .overwrite_script_function( + "abs", + |_self: Ref| { + let output: Val = Mat4::abs(_self).into(); + output + }, + ) + .overwrite_script_function( + "as_dmat4", + |_self: Ref| { + let output: Val = Mat4::as_dmat4(_self).into(); + output + }, + ) + .overwrite_script_function( + "mul", + |_self: Val, rhs: Val| { + let output: Val = Mat4::mul(_self, rhs).into(); + output + }, + ); + NamespaceBuilder::::new(world) + .overwrite_script_function( + "eq", + |_self: Ref, rhs: Ref| { + let output: bool = DMat2::eq(_self, rhs).into(); + output + }, + ) + .overwrite_script_function( + "clone", + |_self: Ref| { + let output: Val = DMat2::clone(_self).into(); + output + }, + ) + .overwrite_script_function( + "add", + |_self: Val, rhs: Val| { + let output: Val = DMat2::add(_self, rhs).into(); + output + }, + ) + .overwrite_script_function( + "sub", + |_self: Val, rhs: Val| { + let output: Val = DMat2::sub(_self, rhs).into(); + output + }, + ) + .overwrite_script_function( + "mul", + |_self: Val, rhs: Val| { + let output: Val = DMat2::mul(_self, rhs).into(); + output + }, + ) + .overwrite_script_function( + "neg", + |_self: Val| { + let output: Val = DMat2::neg(_self).into(); + output + }, + ) + .overwrite_script_function( + "mul", + |_self: Val, rhs: Val| { + let output: Val = DMat2::mul(_self, rhs).into(); + output + }, + ) + .overwrite_script_function( + "from_cols", + |x_axis: Val, y_axis: Val| { + let output: Val = DMat2::from_cols(x_axis, y_axis) + .into(); + output + }, + ) + .overwrite_script_function( + "to_cols_array", + |_self: Ref| { + let output: [f64; 4] = DMat2::to_cols_array(_self).into(); + output + }, + ) + .overwrite_script_function( + "to_cols_array_2d", + |_self: Ref| { + let output: [[f64; 2]; 2] = DMat2::to_cols_array_2d(_self).into(); + output + }, + ) + .overwrite_script_function( + "from_diagonal", + |diagonal: Val| { + let output: Val = DMat2::from_diagonal(diagonal) + .into(); + output + }, + ) + .overwrite_script_function( + "from_scale_angle", + |scale: Val, angle: f64| { + let output: Val = DMat2::from_scale_angle( + scale, + angle, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "from_angle", + |angle: f64| { + let output: Val = DMat2::from_angle(angle).into(); + output + }, + ) + .overwrite_script_function( + "from_mat3", + |m: Val| { + let output: Val = DMat2::from_mat3(m).into(); + output + }, + ) + .overwrite_script_function( + "from_mat3_minor", + |m: Val, i: usize, j: usize| { + let output: Val = DMat2::from_mat3_minor(m, i, j) + .into(); + output + }, + ) + .overwrite_script_function( + "col", + |_self: Ref, index: usize| { + let output: Val = DMat2::col(_self, index).into(); + output + }, + ) + .overwrite_script_function( + "row", + |_self: Ref, index: usize| { + let output: Val = DMat2::row(_self, index).into(); + output + }, + ) + .overwrite_script_function( + "is_finite", + |_self: Ref| { + let output: bool = DMat2::is_finite(_self).into(); + output + }, + ) + .overwrite_script_function( + "is_nan", + |_self: Ref| { + let output: bool = DMat2::is_nan(_self).into(); + output + }, + ) + .overwrite_script_function( + "transpose", + |_self: Ref| { + let output: Val = DMat2::transpose(_self).into(); + output + }, + ) + .overwrite_script_function( + "determinant", + |_self: Ref| { + let output: f64 = DMat2::determinant(_self).into(); + output + }, + ) + .overwrite_script_function( + "inverse", + |_self: Ref| { + let output: Val = DMat2::inverse(_self).into(); + output + }, + ) + .overwrite_script_function( + "mul_vec2", + |_self: Ref, rhs: Val| { + let output: Val = DMat2::mul_vec2(_self, rhs) + .into(); + output + }, + ) + .overwrite_script_function( + "mul_mat2", + |_self: Ref, rhs: Ref| { + let output: Val = DMat2::mul_mat2(_self, rhs) + .into(); + output + }, + ) + .overwrite_script_function( + "add_mat2", + |_self: Ref, rhs: Ref| { + let output: Val = DMat2::add_mat2(_self, rhs) + .into(); + output + }, + ) + .overwrite_script_function( + "sub_mat2", + |_self: Ref, rhs: Ref| { + let output: Val = DMat2::sub_mat2(_self, rhs) + .into(); + output + }, + ) + .overwrite_script_function( + "mul_scalar", + |_self: Ref, rhs: f64| { + let output: Val = DMat2::mul_scalar(_self, rhs) + .into(); + output + }, + ) + .overwrite_script_function( + "div_scalar", + |_self: Ref, rhs: f64| { + let output: Val = DMat2::div_scalar(_self, rhs) + .into(); + output + }, + ) + .overwrite_script_function( + "abs_diff_eq", + | + _self: Ref, + rhs: Val, + max_abs_diff: f64| + { + let output: bool = DMat2::abs_diff_eq(_self, rhs, max_abs_diff) + .into(); + output + }, + ) + .overwrite_script_function( + "abs", + |_self: Ref| { + let output: Val = DMat2::abs(_self).into(); + output + }, + ) + .overwrite_script_function( + "as_mat2", + |_self: Ref| { + let output: Val = DMat2::as_mat2(_self).into(); + output + }, + ) + .overwrite_script_function( + "mul", + |_self: Val, rhs: f64| { + let output: Val = DMat2::mul(_self, rhs).into(); + output + }, + ) + .overwrite_script_function( + "div", + |_self: Val, rhs: f64| { + let output: Val = DMat2::div(_self, rhs).into(); + output + }, + ); + NamespaceBuilder::::new(world) + .overwrite_script_function( + "mul", + |_self: Val, rhs: Val| { + let output: Val = DMat3::mul(_self, rhs).into(); + output + }, + ) + .overwrite_script_function( + "mul", + |_self: Val, rhs: Val| { + let output: Val = DMat3::mul(_self, rhs).into(); + output + }, + ) + .overwrite_script_function( + "add", + |_self: Val, rhs: Val| { + let output: Val = DMat3::add(_self, rhs).into(); + output + }, + ) + .overwrite_script_function( + "from_cols", + | + x_axis: Val, + y_axis: Val, + z_axis: Val| + { + let output: Val = DMat3::from_cols( + x_axis, + y_axis, + z_axis, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "to_cols_array", + |_self: Ref| { + let output: [f64; 9] = DMat3::to_cols_array(_self).into(); + output + }, + ) + .overwrite_script_function( + "to_cols_array_2d", + |_self: Ref| { + let output: [[f64; 3]; 3] = DMat3::to_cols_array_2d(_self).into(); + output + }, + ) + .overwrite_script_function( + "from_diagonal", + |diagonal: Val| { + let output: Val = DMat3::from_diagonal(diagonal) + .into(); + output + }, + ) + .overwrite_script_function( + "from_mat4", + |m: Val| { + let output: Val = DMat3::from_mat4(m).into(); + output + }, + ) + .overwrite_script_function( + "from_mat4_minor", + |m: Val, i: usize, j: usize| { + let output: Val = DMat3::from_mat4_minor(m, i, j) + .into(); + output + }, + ) + .overwrite_script_function( + "from_quat", + |rotation: Val| { + let output: Val = DMat3::from_quat(rotation) + .into(); + output + }, + ) + .overwrite_script_function( + "from_axis_angle", + |axis: Val, angle: f64| { + let output: Val = DMat3::from_axis_angle( + axis, + angle, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "from_euler", + |order: Val, a: f64, b: f64, c: f64| { + let output: Val = DMat3::from_euler( + order, + a, + b, + c, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "to_euler", + |_self: Ref, order: Val| { + let output: (f64, f64, f64) = DMat3::to_euler(_self, order).into(); + output + }, + ) + .overwrite_script_function( + "from_rotation_x", + |angle: f64| { + let output: Val = DMat3::from_rotation_x(angle) + .into(); + output + }, + ) + .overwrite_script_function( + "from_rotation_y", + |angle: f64| { + let output: Val = DMat3::from_rotation_y(angle) + .into(); + output + }, + ) + .overwrite_script_function( + "from_rotation_z", + |angle: f64| { + let output: Val = DMat3::from_rotation_z(angle) + .into(); + output + }, + ) + .overwrite_script_function( + "from_translation", + |translation: Val| { + let output: Val = DMat3::from_translation( + translation, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "from_angle", + |angle: f64| { + let output: Val = DMat3::from_angle(angle).into(); + output + }, + ) + .overwrite_script_function( + "from_scale_angle_translation", + | + scale: Val, + angle: f64, + translation: Val| + { + let output: Val = DMat3::from_scale_angle_translation( + scale, + angle, + translation, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "from_scale", + |scale: Val| { + let output: Val = DMat3::from_scale(scale).into(); + output + }, + ) + .overwrite_script_function( + "from_mat2", + |m: Val| { + let output: Val = DMat3::from_mat2(m).into(); + output + }, + ) + .overwrite_script_function( + "col", + |_self: Ref, index: usize| { + let output: Val = DMat3::col(_self, index).into(); + output + }, + ) + .overwrite_script_function( + "row", + |_self: Ref, index: usize| { + let output: Val = DMat3::row(_self, index).into(); + output + }, + ) + .overwrite_script_function( + "is_finite", + |_self: Ref| { + let output: bool = DMat3::is_finite(_self).into(); + output + }, + ) + .overwrite_script_function( + "is_nan", + |_self: Ref| { + let output: bool = DMat3::is_nan(_self).into(); + output + }, + ) + .overwrite_script_function( + "transpose", + |_self: Ref| { + let output: Val = DMat3::transpose(_self).into(); + output + }, + ) + .overwrite_script_function( + "determinant", + |_self: Ref| { + let output: f64 = DMat3::determinant(_self).into(); + output + }, + ) + .overwrite_script_function( + "inverse", + |_self: Ref| { + let output: Val = DMat3::inverse(_self).into(); + output + }, + ) + .overwrite_script_function( + "transform_point2", + |_self: Ref, rhs: Val| { + let output: Val = DMat3::transform_point2( + _self, + rhs, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "transform_vector2", + |_self: Ref, rhs: Val| { + let output: Val = DMat3::transform_vector2( + _self, + rhs, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "mul_vec3", + |_self: Ref, rhs: Val| { + let output: Val = DMat3::mul_vec3(_self, rhs) + .into(); + output + }, + ) + .overwrite_script_function( + "mul_mat3", + |_self: Ref, rhs: Ref| { + let output: Val = DMat3::mul_mat3(_self, rhs) + .into(); + output + }, + ) + .overwrite_script_function( + "add_mat3", + |_self: Ref, rhs: Ref| { + let output: Val = DMat3::add_mat3(_self, rhs) + .into(); + output + }, + ) + .overwrite_script_function( + "sub_mat3", + |_self: Ref, rhs: Ref| { + let output: Val = DMat3::sub_mat3(_self, rhs) + .into(); + output + }, + ) + .overwrite_script_function( + "mul_scalar", + |_self: Ref, rhs: f64| { + let output: Val = DMat3::mul_scalar(_self, rhs) + .into(); + output + }, + ) + .overwrite_script_function( + "div_scalar", + |_self: Ref, rhs: f64| { + let output: Val = DMat3::div_scalar(_self, rhs) + .into(); + output + }, + ) + .overwrite_script_function( + "abs_diff_eq", + | + _self: Ref, + rhs: Val, + max_abs_diff: f64| + { + let output: bool = DMat3::abs_diff_eq(_self, rhs, max_abs_diff) + .into(); + output + }, + ) + .overwrite_script_function( + "abs", + |_self: Ref| { + let output: Val = DMat3::abs(_self).into(); + output + }, + ) + .overwrite_script_function( + "as_mat3", + |_self: Ref| { + let output: Val = DMat3::as_mat3(_self).into(); + output + }, + ) + .overwrite_script_function( + "eq", + |_self: Ref, rhs: Ref| { + let output: bool = DMat3::eq(_self, rhs).into(); + output + }, + ) + .overwrite_script_function( + "clone", + |_self: Ref| { + let output: Val = DMat3::clone(_self).into(); + output + }, + ) + .overwrite_script_function( + "mul", + |_self: Val, rhs: f64| { + let output: Val = DMat3::mul(_self, rhs).into(); + output + }, + ) + .overwrite_script_function( + "neg", + |_self: Val| { + let output: Val = DMat3::neg(_self).into(); + output + }, + ) + .overwrite_script_function( + "sub", + |_self: Val, rhs: Val| { + let output: Val = DMat3::sub(_self, rhs).into(); + output + }, + ) + .overwrite_script_function( + "mul", + |_self: Val, rhs: Val| { + let output: Val = DMat3::mul(_self, rhs).into(); + output + }, + ) + .overwrite_script_function( + "div", + |_self: Val, rhs: f64| { + let output: Val = DMat3::div(_self, rhs).into(); + output + }, + ); + NamespaceBuilder::::new(world) + .overwrite_script_function( + "mul", + |_self: Val, rhs: Val| { + let output: Val = DMat4::mul(_self, rhs).into(); + output + }, + ) + .overwrite_script_function( + "mul", + |_self: Val, rhs: Val| { + let output: Val = DMat4::mul(_self, rhs).into(); + output + }, + ) + .overwrite_script_function( + "from_cols", + | + x_axis: Val, + y_axis: Val, + z_axis: Val, + w_axis: Val| + { + let output: Val = DMat4::from_cols( + x_axis, + y_axis, + z_axis, + w_axis, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "to_cols_array", + |_self: Ref| { + let output: [f64; 16] = DMat4::to_cols_array(_self).into(); + output + }, + ) + .overwrite_script_function( + "to_cols_array_2d", + |_self: Ref| { + let output: [[f64; 4]; 4] = DMat4::to_cols_array_2d(_self).into(); + output + }, + ) + .overwrite_script_function( + "from_diagonal", + |diagonal: Val| { + let output: Val = DMat4::from_diagonal(diagonal) + .into(); + output + }, + ) + .overwrite_script_function( + "from_scale_rotation_translation", + | + scale: Val, + rotation: Val, + translation: Val| + { + let output: Val = DMat4::from_scale_rotation_translation( + scale, + rotation, + translation, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "from_rotation_translation", + |rotation: Val, translation: Val| { + let output: Val = DMat4::from_rotation_translation( + rotation, + translation, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "from_quat", + |rotation: Val| { + let output: Val = DMat4::from_quat(rotation) + .into(); + output + }, + ) + .overwrite_script_function( + "from_mat3", + |m: Val| { + let output: Val = DMat4::from_mat3(m).into(); + output + }, + ) + .overwrite_script_function( + "from_translation", + |translation: Val| { + let output: Val = DMat4::from_translation( + translation, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "from_axis_angle", + |axis: Val, angle: f64| { + let output: Val = DMat4::from_axis_angle( + axis, + angle, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "from_euler", + |order: Val, a: f64, b: f64, c: f64| { + let output: Val = DMat4::from_euler( + order, + a, + b, + c, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "to_euler", + |_self: Ref, order: Val| { + let output: (f64, f64, f64) = DMat4::to_euler(_self, order).into(); + output + }, + ) + .overwrite_script_function( + "from_rotation_x", + |angle: f64| { + let output: Val = DMat4::from_rotation_x(angle) + .into(); + output + }, + ) + .overwrite_script_function( + "from_rotation_y", + |angle: f64| { + let output: Val = DMat4::from_rotation_y(angle) + .into(); + output + }, + ) + .overwrite_script_function( + "from_rotation_z", + |angle: f64| { + let output: Val = DMat4::from_rotation_z(angle) + .into(); + output + }, + ) + .overwrite_script_function( + "from_scale", + |scale: Val| { + let output: Val = DMat4::from_scale(scale).into(); + output + }, + ) + .overwrite_script_function( + "col", + |_self: Ref, index: usize| { + let output: Val = DMat4::col(_self, index).into(); + output + }, + ) + .overwrite_script_function( + "row", + |_self: Ref, index: usize| { + let output: Val = DMat4::row(_self, index).into(); + output + }, + ) + .overwrite_script_function( + "is_finite", + |_self: Ref| { + let output: bool = DMat4::is_finite(_self).into(); + output + }, + ) + .overwrite_script_function( + "is_nan", + |_self: Ref| { + let output: bool = DMat4::is_nan(_self).into(); + output + }, + ) + .overwrite_script_function( + "transpose", + |_self: Ref| { + let output: Val = DMat4::transpose(_self).into(); + output + }, + ) + .overwrite_script_function( + "determinant", + |_self: Ref| { + let output: f64 = DMat4::determinant(_self).into(); + output + }, + ) + .overwrite_script_function( + "inverse", + |_self: Ref| { + let output: Val = DMat4::inverse(_self).into(); + output + }, + ) + .overwrite_script_function( + "look_to_lh", + | + eye: Val, + dir: Val, + up: Val| + { + let output: Val = DMat4::look_to_lh(eye, dir, up) + .into(); + output + }, + ) + .overwrite_script_function( + "look_to_rh", + | + eye: Val, + dir: Val, + up: Val| + { + let output: Val = DMat4::look_to_rh(eye, dir, up) + .into(); + output + }, + ) + .overwrite_script_function( + "look_at_lh", + | + eye: Val, + center: Val, + up: Val| + { + let output: Val = DMat4::look_at_lh( + eye, + center, + up, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "look_at_rh", + | + eye: Val, + center: Val, + up: Val| + { + let output: Val = DMat4::look_at_rh( + eye, + center, + up, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "perspective_rh_gl", + |fov_y_radians: f64, aspect_ratio: f64, z_near: f64, z_far: f64| { + let output: Val = DMat4::perspective_rh_gl( + fov_y_radians, + aspect_ratio, + z_near, + z_far, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "perspective_lh", + |fov_y_radians: f64, aspect_ratio: f64, z_near: f64, z_far: f64| { + let output: Val = DMat4::perspective_lh( + fov_y_radians, + aspect_ratio, + z_near, + z_far, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "perspective_rh", + |fov_y_radians: f64, aspect_ratio: f64, z_near: f64, z_far: f64| { + let output: Val = DMat4::perspective_rh( + fov_y_radians, + aspect_ratio, + z_near, + z_far, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "perspective_infinite_lh", + |fov_y_radians: f64, aspect_ratio: f64, z_near: f64| { + let output: Val = DMat4::perspective_infinite_lh( + fov_y_radians, + aspect_ratio, + z_near, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "perspective_infinite_reverse_lh", + |fov_y_radians: f64, aspect_ratio: f64, z_near: f64| { + let output: Val = DMat4::perspective_infinite_reverse_lh( + fov_y_radians, + aspect_ratio, + z_near, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "perspective_infinite_rh", + |fov_y_radians: f64, aspect_ratio: f64, z_near: f64| { + let output: Val = DMat4::perspective_infinite_rh( + fov_y_radians, + aspect_ratio, + z_near, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "perspective_infinite_reverse_rh", + |fov_y_radians: f64, aspect_ratio: f64, z_near: f64| { + let output: Val = DMat4::perspective_infinite_reverse_rh( + fov_y_radians, + aspect_ratio, + z_near, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "orthographic_rh_gl", + |left: f64, right: f64, bottom: f64, top: f64, near: f64, far: f64| { + let output: Val = DMat4::orthographic_rh_gl( + left, + right, + bottom, + top, + near, + far, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "orthographic_lh", + |left: f64, right: f64, bottom: f64, top: f64, near: f64, far: f64| { + let output: Val = DMat4::orthographic_lh( + left, + right, + bottom, + top, + near, + far, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "orthographic_rh", + |left: f64, right: f64, bottom: f64, top: f64, near: f64, far: f64| { + let output: Val = DMat4::orthographic_rh( + left, + right, + bottom, + top, + near, + far, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "project_point3", + |_self: Ref, rhs: Val| { + let output: Val = DMat4::project_point3( + _self, + rhs, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "transform_point3", + |_self: Ref, rhs: Val| { + let output: Val = DMat4::transform_point3( + _self, + rhs, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "transform_vector3", + |_self: Ref, rhs: Val| { + let output: Val = DMat4::transform_vector3( + _self, + rhs, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "mul_vec4", + |_self: Ref, rhs: Val| { + let output: Val = DMat4::mul_vec4(_self, rhs) + .into(); + output + }, + ) + .overwrite_script_function( + "mul_mat4", + |_self: Ref, rhs: Ref| { + let output: Val = DMat4::mul_mat4(_self, rhs) + .into(); + output + }, + ) + .overwrite_script_function( + "add_mat4", + |_self: Ref, rhs: Ref| { + let output: Val = DMat4::add_mat4(_self, rhs) + .into(); + output + }, + ) + .overwrite_script_function( + "sub_mat4", + |_self: Ref, rhs: Ref| { + let output: Val = DMat4::sub_mat4(_self, rhs) + .into(); + output + }, + ) + .overwrite_script_function( + "mul_scalar", + |_self: Ref, rhs: f64| { + let output: Val = DMat4::mul_scalar(_self, rhs) + .into(); + output + }, + ) + .overwrite_script_function( + "div_scalar", + |_self: Ref, rhs: f64| { + let output: Val = DMat4::div_scalar(_self, rhs) + .into(); + output + }, + ) + .overwrite_script_function( + "abs_diff_eq", + | + _self: Ref, + rhs: Val, + max_abs_diff: f64| + { + let output: bool = DMat4::abs_diff_eq(_self, rhs, max_abs_diff) + .into(); + output + }, + ) + .overwrite_script_function( + "abs", + |_self: Ref| { + let output: Val = DMat4::abs(_self).into(); + output + }, + ) + .overwrite_script_function( + "as_mat4", + |_self: Ref| { + let output: Val = DMat4::as_mat4(_self).into(); + output + }, + ) + .overwrite_script_function( + "neg", + |_self: Val| { + let output: Val = DMat4::neg(_self).into(); + output + }, + ) + .overwrite_script_function( + "clone", + |_self: Ref| { + let output: Val = DMat4::clone(_self).into(); + output + }, + ) + .overwrite_script_function( + "sub", + |_self: Val, rhs: Val| { + let output: Val = DMat4::sub(_self, rhs).into(); + output + }, + ) + .overwrite_script_function( + "mul", + |_self: Val, rhs: f64| { + let output: Val = DMat4::mul(_self, rhs).into(); + output + }, + ) + .overwrite_script_function( + "eq", + |_self: Ref, rhs: Ref| { + let output: bool = DMat4::eq(_self, rhs).into(); + output + }, + ) + .overwrite_script_function( + "add", + |_self: Val, rhs: Val| { + let output: Val = DMat4::add(_self, rhs).into(); + output + }, + ) + .overwrite_script_function( + "div", + |_self: Val, rhs: f64| { + let output: Val = DMat4::div(_self, rhs).into(); + output + }, + ) + .overwrite_script_function( + "mul", + |_self: Val, rhs: Val| { + let output: Val = DMat4::mul(_self, rhs).into(); + output + }, + ); + NamespaceBuilder::::new(world) + .overwrite_script_function( + "mul", + |_self: Val, rhs: Val| { + let output: Val = Affine2::mul(_self, rhs).into(); + output + }, + ) + .overwrite_script_function( + "mul", + |_self: Val, rhs: Val| { + let output: Val = Affine2::mul(_self, rhs) + .into(); + output + }, + ) + .overwrite_script_function( + "clone", + |_self: Ref| { + let output: Val = Affine2::clone(_self).into(); + output + }, + ) + .overwrite_script_function( + "from_cols", + | + x_axis: Val, + y_axis: Val, + z_axis: Val| + { + let output: Val = Affine2::from_cols( + x_axis, + y_axis, + z_axis, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "to_cols_array", + |_self: Ref| { + let output: [f32; 6] = Affine2::to_cols_array(_self).into(); + output + }, + ) + .overwrite_script_function( + "to_cols_array_2d", + |_self: Ref| { + let output: [[f32; 2]; 3] = Affine2::to_cols_array_2d(_self).into(); + output + }, + ) + .overwrite_script_function( + "from_scale", + |scale: Val| { + let output: Val = Affine2::from_scale(scale) + .into(); + output + }, + ) + .overwrite_script_function( + "from_angle", + |angle: f32| { + let output: Val = Affine2::from_angle(angle) + .into(); + output + }, + ) + .overwrite_script_function( + "from_translation", + |translation: Val| { + let output: Val = Affine2::from_translation( + translation, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "from_mat2", + |matrix2: Val| { + let output: Val = Affine2::from_mat2(matrix2) + .into(); + output + }, + ) + .overwrite_script_function( + "from_mat2_translation", + |matrix2: Val, translation: Val| { + let output: Val = Affine2::from_mat2_translation( + matrix2, + translation, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "from_scale_angle_translation", + | + scale: Val, + angle: f32, + translation: Val| + { + let output: Val = Affine2::from_scale_angle_translation( + scale, + angle, + translation, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "from_angle_translation", + |angle: f32, translation: Val| { + let output: Val = Affine2::from_angle_translation( + angle, + translation, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "from_mat3", + |m: Val| { + let output: Val = Affine2::from_mat3(m).into(); + output + }, + ) + .overwrite_script_function( + "from_mat3a", + |m: Val| { + let output: Val = Affine2::from_mat3a(m).into(); + output + }, + ) + .overwrite_script_function( + "transform_point2", + |_self: Ref, rhs: Val| { + let output: Val = Affine2::transform_point2( + _self, + rhs, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "transform_vector2", + |_self: Ref, rhs: Val| { + let output: Val = Affine2::transform_vector2( + _self, + rhs, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "is_finite", + |_self: Ref| { + let output: bool = Affine2::is_finite(_self).into(); + output + }, + ) + .overwrite_script_function( + "is_nan", + |_self: Ref| { + let output: bool = Affine2::is_nan(_self).into(); + output + }, + ) + .overwrite_script_function( + "abs_diff_eq", + | + _self: Ref, + rhs: Val, + max_abs_diff: f32| + { + let output: bool = Affine2::abs_diff_eq(_self, rhs, max_abs_diff) + .into(); + output + }, + ) + .overwrite_script_function( + "inverse", + |_self: Ref| { + let output: Val = Affine2::inverse(_self) + .into(); + output + }, + ) + .overwrite_script_function( + "eq", + |_self: Ref, rhs: Ref| { + let output: bool = Affine2::eq(_self, rhs).into(); + output + }, + ) + .overwrite_script_function( + "mul", + |_self: Val, rhs: Val| { + let output: Val = Affine2::mul(_self, rhs).into(); + output + }, + ); + NamespaceBuilder::::new(world) + .overwrite_script_function( + "eq", + |_self: Ref, rhs: Ref| { + let output: bool = Affine3A::eq(_self, rhs).into(); + output + }, + ) + .overwrite_script_function( + "clone", + |_self: Ref| { + let output: Val = Affine3A::clone(_self) + .into(); + output + }, + ) + .overwrite_script_function( + "from_cols", + | + x_axis: Val, + y_axis: Val, + z_axis: Val, + w_axis: Val| + { + let output: Val = Affine3A::from_cols( + x_axis, + y_axis, + z_axis, + w_axis, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "to_cols_array", + |_self: Ref| { + let output: [f32; 12] = Affine3A::to_cols_array(_self).into(); + output + }, + ) + .overwrite_script_function( + "to_cols_array_2d", + |_self: Ref| { + let output: [[f32; 3]; 4] = Affine3A::to_cols_array_2d(_self).into(); + output + }, + ) + .overwrite_script_function( + "from_scale", + |scale: Val| { + let output: Val = Affine3A::from_scale(scale) + .into(); + output + }, + ) + .overwrite_script_function( + "from_quat", + |rotation: Val| { + let output: Val = Affine3A::from_quat(rotation) + .into(); + output + }, + ) + .overwrite_script_function( + "from_axis_angle", + |axis: Val, angle: f32| { + let output: Val = Affine3A::from_axis_angle( + axis, + angle, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "from_rotation_x", + |angle: f32| { + let output: Val = Affine3A::from_rotation_x( + angle, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "from_rotation_y", + |angle: f32| { + let output: Val = Affine3A::from_rotation_y( + angle, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "from_rotation_z", + |angle: f32| { + let output: Val = Affine3A::from_rotation_z( + angle, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "from_translation", + |translation: Val| { + let output: Val = Affine3A::from_translation( + translation, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "from_mat3", + |mat3: Val| { + let output: Val = Affine3A::from_mat3(mat3) + .into(); + output + }, + ) + .overwrite_script_function( + "from_mat3_translation", + |mat3: Val, translation: Val| { + let output: Val = Affine3A::from_mat3_translation( + mat3, + translation, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "from_scale_rotation_translation", + | + scale: Val, + rotation: Val, + translation: Val| + { + let output: Val = Affine3A::from_scale_rotation_translation( + scale, + rotation, + translation, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "from_rotation_translation", + |rotation: Val, translation: Val| { + let output: Val = Affine3A::from_rotation_translation( + rotation, + translation, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "from_mat4", + |m: Val| { + let output: Val = Affine3A::from_mat4(m) + .into(); + output + }, + ) + .overwrite_script_function( + "look_to_lh", + | + eye: Val, + dir: Val, + up: Val| + { + let output: Val = Affine3A::look_to_lh( + eye, + dir, + up, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "look_to_rh", + | + eye: Val, + dir: Val, + up: Val| + { + let output: Val = Affine3A::look_to_rh( + eye, + dir, + up, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "look_at_lh", + | + eye: Val, + center: Val, + up: Val| + { + let output: Val = Affine3A::look_at_lh( + eye, + center, + up, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "look_at_rh", + | + eye: Val, + center: Val, + up: Val| + { + let output: Val = Affine3A::look_at_rh( + eye, + center, + up, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "transform_point3", + |_self: Ref, rhs: Val| { + let output: Val = Affine3A::transform_point3( + _self, + rhs, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "transform_vector3", + |_self: Ref, rhs: Val| { + let output: Val = Affine3A::transform_vector3( + _self, + rhs, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "transform_point3a", + |_self: Ref, rhs: Val| { + let output: Val = Affine3A::transform_point3a( + _self, + rhs, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "transform_vector3a", + |_self: Ref, rhs: Val| { + let output: Val = Affine3A::transform_vector3a( + _self, + rhs, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "is_finite", + |_self: Ref| { + let output: bool = Affine3A::is_finite(_self).into(); + output + }, + ) + .overwrite_script_function( + "is_nan", + |_self: Ref| { + let output: bool = Affine3A::is_nan(_self).into(); + output + }, + ) + .overwrite_script_function( + "abs_diff_eq", + | + _self: Ref, + rhs: Val, + max_abs_diff: f32| + { + let output: bool = Affine3A::abs_diff_eq(_self, rhs, max_abs_diff) + .into(); + output + }, + ) + .overwrite_script_function( + "inverse", + |_self: Ref| { + let output: Val = Affine3A::inverse(_self) + .into(); + output + }, + ) + .overwrite_script_function( + "mul", + |_self: Val, rhs: Val| { + let output: Val = Affine3A::mul(_self, rhs) + .into(); + output + }, + ) + .overwrite_script_function( + "mul", + |_self: Val, rhs: Val| { + let output: Val = Affine3A::mul(_self, rhs).into(); + output + }, + ); + NamespaceBuilder::::new(world) + .overwrite_script_function( + "eq", + |_self: Ref, rhs: Ref| { + let output: bool = DAffine2::eq(_self, rhs).into(); + output + }, + ) + .overwrite_script_function( + "from_cols", + | + x_axis: Val, + y_axis: Val, + z_axis: Val| + { + let output: Val = DAffine2::from_cols( + x_axis, + y_axis, + z_axis, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "to_cols_array", + |_self: Ref| { + let output: [f64; 6] = DAffine2::to_cols_array(_self).into(); + output + }, + ) + .overwrite_script_function( + "to_cols_array_2d", + |_self: Ref| { + let output: [[f64; 2]; 3] = DAffine2::to_cols_array_2d(_self).into(); + output + }, + ) + .overwrite_script_function( + "from_scale", + |scale: Val| { + let output: Val = DAffine2::from_scale(scale) + .into(); + output + }, + ) + .overwrite_script_function( + "from_angle", + |angle: f64| { + let output: Val = DAffine2::from_angle(angle) + .into(); + output + }, + ) + .overwrite_script_function( + "from_translation", + |translation: Val| { + let output: Val = DAffine2::from_translation( + translation, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "from_mat2", + |matrix2: Val| { + let output: Val = DAffine2::from_mat2(matrix2) + .into(); + output + }, + ) + .overwrite_script_function( + "from_mat2_translation", + |matrix2: Val, translation: Val| { + let output: Val = DAffine2::from_mat2_translation( + matrix2, + translation, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "from_scale_angle_translation", + | + scale: Val, + angle: f64, + translation: Val| + { + let output: Val = DAffine2::from_scale_angle_translation( + scale, + angle, + translation, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "from_angle_translation", + |angle: f64, translation: Val| { + let output: Val = DAffine2::from_angle_translation( + angle, + translation, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "from_mat3", + |m: Val| { + let output: Val = DAffine2::from_mat3(m) + .into(); + output + }, + ) + .overwrite_script_function( + "transform_point2", + |_self: Ref, rhs: Val| { + let output: Val = DAffine2::transform_point2( + _self, + rhs, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "transform_vector2", + |_self: Ref, rhs: Val| { + let output: Val = DAffine2::transform_vector2( + _self, + rhs, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "is_finite", + |_self: Ref| { + let output: bool = DAffine2::is_finite(_self).into(); + output + }, + ) + .overwrite_script_function( + "is_nan", + |_self: Ref| { + let output: bool = DAffine2::is_nan(_self).into(); + output + }, + ) + .overwrite_script_function( + "abs_diff_eq", + | + _self: Ref, + rhs: Val, + max_abs_diff: f64| + { + let output: bool = DAffine2::abs_diff_eq(_self, rhs, max_abs_diff) + .into(); + output + }, + ) + .overwrite_script_function( + "inverse", + |_self: Ref| { + let output: Val = DAffine2::inverse(_self) + .into(); + output + }, + ) + .overwrite_script_function( + "mul", + |_self: Val, rhs: Val| { + let output: Val = DAffine2::mul(_self, rhs) + .into(); + output + }, + ) + .overwrite_script_function( + "mul", + |_self: Val, rhs: Val| { + let output: Val = DAffine2::mul(_self, rhs) + .into(); + output + }, + ) + .overwrite_script_function( + "clone", + |_self: Ref| { + let output: Val = DAffine2::clone(_self) + .into(); + output + }, + ); + NamespaceBuilder::::new(world) + .overwrite_script_function( + "from_cols", + | + x_axis: Val, + y_axis: Val, + z_axis: Val, + w_axis: Val| + { + let output: Val = DAffine3::from_cols( + x_axis, + y_axis, + z_axis, + w_axis, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "to_cols_array", + |_self: Ref| { + let output: [f64; 12] = DAffine3::to_cols_array(_self).into(); + output + }, + ) + .overwrite_script_function( + "to_cols_array_2d", + |_self: Ref| { + let output: [[f64; 3]; 4] = DAffine3::to_cols_array_2d(_self).into(); + output + }, + ) + .overwrite_script_function( + "from_scale", + |scale: Val| { + let output: Val = DAffine3::from_scale(scale) + .into(); + output + }, + ) + .overwrite_script_function( + "from_quat", + |rotation: Val| { + let output: Val = DAffine3::from_quat(rotation) + .into(); + output + }, + ) + .overwrite_script_function( + "from_axis_angle", + |axis: Val, angle: f64| { + let output: Val = DAffine3::from_axis_angle( + axis, + angle, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "from_rotation_x", + |angle: f64| { + let output: Val = DAffine3::from_rotation_x( + angle, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "from_rotation_y", + |angle: f64| { + let output: Val = DAffine3::from_rotation_y( + angle, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "from_rotation_z", + |angle: f64| { + let output: Val = DAffine3::from_rotation_z( + angle, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "from_translation", + |translation: Val| { + let output: Val = DAffine3::from_translation( + translation, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "from_mat3", + |mat3: Val| { + let output: Val = DAffine3::from_mat3(mat3) + .into(); + output + }, + ) + .overwrite_script_function( + "from_mat3_translation", + |mat3: Val, translation: Val| { + let output: Val = DAffine3::from_mat3_translation( + mat3, + translation, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "from_scale_rotation_translation", + | + scale: Val, + rotation: Val, + translation: Val| + { + let output: Val = DAffine3::from_scale_rotation_translation( + scale, + rotation, + translation, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "from_rotation_translation", + |rotation: Val, translation: Val| { + let output: Val = DAffine3::from_rotation_translation( + rotation, + translation, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "from_mat4", + |m: Val| { + let output: Val = DAffine3::from_mat4(m) + .into(); + output + }, + ) + .overwrite_script_function( + "look_to_lh", + | + eye: Val, + dir: Val, + up: Val| + { + let output: Val = DAffine3::look_to_lh( + eye, + dir, + up, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "look_to_rh", + | + eye: Val, + dir: Val, + up: Val| + { + let output: Val = DAffine3::look_to_rh( + eye, + dir, + up, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "look_at_lh", + | + eye: Val, + center: Val, + up: Val| + { + let output: Val = DAffine3::look_at_lh( + eye, + center, + up, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "look_at_rh", + | + eye: Val, + center: Val, + up: Val| + { + let output: Val = DAffine3::look_at_rh( + eye, + center, + up, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "transform_point3", + |_self: Ref, rhs: Val| { + let output: Val = DAffine3::transform_point3( + _self, + rhs, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "transform_vector3", + |_self: Ref, rhs: Val| { + let output: Val = DAffine3::transform_vector3( + _self, + rhs, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "is_finite", + |_self: Ref| { + let output: bool = DAffine3::is_finite(_self).into(); + output + }, + ) + .overwrite_script_function( + "is_nan", + |_self: Ref| { + let output: bool = DAffine3::is_nan(_self).into(); + output + }, + ) + .overwrite_script_function( + "abs_diff_eq", + | + _self: Ref, + rhs: Val, + max_abs_diff: f64| + { + let output: bool = DAffine3::abs_diff_eq(_self, rhs, max_abs_diff) + .into(); + output + }, + ) + .overwrite_script_function( + "inverse", + |_self: Ref| { + let output: Val = DAffine3::inverse(_self) + .into(); + output + }, + ) + .overwrite_script_function( + "eq", + |_self: Ref, rhs: Ref| { + let output: bool = DAffine3::eq(_self, rhs).into(); + output + }, + ) + .overwrite_script_function( + "mul", + |_self: Val, rhs: Val| { + let output: Val = DAffine3::mul(_self, rhs) + .into(); + output + }, + ) + .overwrite_script_function( + "mul", + |_self: Val, rhs: Val| { + let output: Val = DAffine3::mul(_self, rhs) + .into(); + output + }, + ) + .overwrite_script_function( + "clone", + |_self: Ref| { + let output: Val = DAffine3::clone(_self) + .into(); + output + }, + ); + NamespaceBuilder::::new(world) + .overwrite_script_function( + "eq", + |_self: Ref, rhs: Ref| { + let output: bool = DQuat::eq(_self, rhs).into(); + output + }, + ) + .overwrite_script_function( + "div", + |_self: Val, rhs: f64| { + let output: Val = DQuat::div(_self, rhs).into(); + output + }, + ) + .overwrite_script_function( + "from_xyzw", + |x: f64, y: f64, z: f64, w: f64| { + let output: Val = DQuat::from_xyzw(x, y, z, w) + .into(); + output + }, + ) + .overwrite_script_function( + "from_array", + |a: [f64; 4]| { + let output: Val = DQuat::from_array(a).into(); + output + }, + ) + .overwrite_script_function( + "from_vec4", + |v: Val| { + let output: Val = DQuat::from_vec4(v).into(); + output + }, + ) + .overwrite_script_function( + "from_axis_angle", + |axis: Val, angle: f64| { + let output: Val = DQuat::from_axis_angle( + axis, + angle, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "from_scaled_axis", + |v: Val| { + let output: Val = DQuat::from_scaled_axis(v) + .into(); + output + }, + ) + .overwrite_script_function( + "from_rotation_x", + |angle: f64| { + let output: Val = DQuat::from_rotation_x(angle) + .into(); + output + }, + ) + .overwrite_script_function( + "from_rotation_y", + |angle: f64| { + let output: Val = DQuat::from_rotation_y(angle) + .into(); + output + }, + ) + .overwrite_script_function( + "from_rotation_z", + |angle: f64| { + let output: Val = DQuat::from_rotation_z(angle) + .into(); + output + }, + ) + .overwrite_script_function( + "from_euler", + |euler: Val, a: f64, b: f64, c: f64| { + let output: Val = DQuat::from_euler( + euler, + a, + b, + c, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "from_mat3", + |mat: Ref| { + let output: Val = DQuat::from_mat3(mat).into(); + output + }, + ) + .overwrite_script_function( + "from_mat4", + |mat: Ref| { + let output: Val = DQuat::from_mat4(mat).into(); + output + }, + ) + .overwrite_script_function( + "from_rotation_arc", + |from: Val, to: Val| { + let output: Val = DQuat::from_rotation_arc( + from, + to, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "from_rotation_arc_colinear", + |from: Val, to: Val| { + let output: Val = DQuat::from_rotation_arc_colinear( + from, + to, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "from_rotation_arc_2d", + |from: Val, to: Val| { + let output: Val = DQuat::from_rotation_arc_2d( + from, + to, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "to_scaled_axis", + |_self: Val| { + let output: Val = DQuat::to_scaled_axis(_self) + .into(); + output + }, + ) + .overwrite_script_function( + "to_euler", + |_self: Val, order: Val| { + let output: (f64, f64, f64) = DQuat::to_euler(_self, order).into(); + output + }, + ) + .overwrite_script_function( + "to_array", + |_self: Ref| { + let output: [f64; 4] = DQuat::to_array(_self).into(); + output + }, + ) + .overwrite_script_function( + "xyz", + |_self: Val| { + let output: Val = DQuat::xyz(_self).into(); + output + }, + ) + .overwrite_script_function( + "conjugate", + |_self: Val| { + let output: Val = DQuat::conjugate(_self).into(); + output + }, + ) + .overwrite_script_function( + "inverse", + |_self: Val| { + let output: Val = DQuat::inverse(_self).into(); + output + }, + ) + .overwrite_script_function( + "dot", + |_self: Val, rhs: Val| { + let output: f64 = DQuat::dot(_self, rhs).into(); + output + }, + ) + .overwrite_script_function( + "length", + |_self: Val| { + let output: f64 = DQuat::length(_self).into(); + output + }, + ) + .overwrite_script_function( + "length_squared", + |_self: Val| { + let output: f64 = DQuat::length_squared(_self).into(); + output + }, + ) + .overwrite_script_function( + "length_recip", + |_self: Val| { + let output: f64 = DQuat::length_recip(_self).into(); + output + }, + ) + .overwrite_script_function( + "normalize", + |_self: Val| { + let output: Val = DQuat::normalize(_self).into(); + output + }, + ) + .overwrite_script_function( + "is_finite", + |_self: Val| { + let output: bool = DQuat::is_finite(_self).into(); + output + }, + ) + .overwrite_script_function( + "is_nan", + |_self: Val| { + let output: bool = DQuat::is_nan(_self).into(); + output + }, + ) + .overwrite_script_function( + "is_normalized", + |_self: Val| { + let output: bool = DQuat::is_normalized(_self).into(); + output + }, + ) + .overwrite_script_function( + "is_near_identity", + |_self: Val| { + let output: bool = DQuat::is_near_identity(_self).into(); + output + }, + ) + .overwrite_script_function( + "angle_between", + |_self: Val, rhs: Val| { + let output: f64 = DQuat::angle_between(_self, rhs).into(); + output + }, + ) + .overwrite_script_function( + "rotate_towards", + | + _self: Ref, + rhs: Val, + max_angle: f64| + { + let output: Val = DQuat::rotate_towards( + _self, + rhs, + max_angle, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "abs_diff_eq", + | + _self: Val, + rhs: Val, + max_abs_diff: f64| + { + let output: bool = DQuat::abs_diff_eq(_self, rhs, max_abs_diff) + .into(); + output + }, + ) + .overwrite_script_function( + "lerp", + |_self: Val, end: Val, s: f64| { + let output: Val = DQuat::lerp(_self, end, s) + .into(); + output + }, + ) + .overwrite_script_function( + "slerp", + |_self: Val, end: Val, s: f64| { + let output: Val = DQuat::slerp(_self, end, s) + .into(); + output + }, + ) + .overwrite_script_function( + "mul_vec3", + |_self: Val, rhs: Val| { + let output: Val = DQuat::mul_vec3(_self, rhs) + .into(); + output + }, + ) + .overwrite_script_function( + "mul_quat", + |_self: Val, rhs: Val| { + let output: Val = DQuat::mul_quat(_self, rhs) + .into(); + output + }, + ) + .overwrite_script_function( + "from_affine3", + |a: Ref| { + let output: Val = DQuat::from_affine3(a).into(); + output + }, + ) + .overwrite_script_function( + "as_quat", + |_self: Val| { + let output: Val = DQuat::as_quat(_self).into(); + output + }, + ) + .overwrite_script_function( + "mul", + |_self: Val, rhs: Val| { + let output: Val = DQuat::mul(_self, rhs).into(); + output + }, + ) + .overwrite_script_function( + "mul", + |_self: Val, rhs: Val| { + let output: Val = DQuat::mul(_self, rhs).into(); + output + }, + ) + .overwrite_script_function( + "clone", + |_self: Ref| { + let output: Val = DQuat::clone(_self).into(); + output + }, + ) + .overwrite_script_function( + "sub", + |_self: Val, rhs: Val| { + let output: Val = DQuat::sub(_self, rhs).into(); + output + }, + ) + .overwrite_script_function( + "mul", + |_self: Val, rhs: f64| { + let output: Val = DQuat::mul(_self, rhs).into(); + output + }, + ) + .overwrite_script_function( + "neg", + |_self: Val| { + let output: Val = DQuat::neg(_self).into(); + output + }, + ) + .overwrite_script_function( + "add", + |_self: Val, rhs: Val| { + let output: Val = DQuat::add(_self, rhs).into(); + output + }, + ); + NamespaceBuilder::::new(world) + .overwrite_script_function( + "clone", + |_self: Ref| { + let output: Val = EulerRot::clone(_self) + .into(); + output + }, + ) + .overwrite_script_function( + "eq", + |_self: Ref, other: Ref| { + let output: bool = EulerRot::eq(_self, other).into(); + output + }, + ) + .overwrite_script_function( + "assert_receiver_is_total_eq", + |_self: Ref| { + let output: () = EulerRot::assert_receiver_is_total_eq(_self).into(); + output + }, + ); + NamespaceBuilder::::new(world) + .overwrite_script_function( + "new", + |x: bool, y: bool, z: bool| { + let output: Val = BVec3A::new(x, y, z).into(); + output + }, + ) + .overwrite_script_function( + "splat", + |v: bool| { + let output: Val = BVec3A::splat(v).into(); + output + }, + ) + .overwrite_script_function( + "from_array", + |a: [bool; 3]| { + let output: Val = BVec3A::from_array(a).into(); + output + }, + ) + .overwrite_script_function( + "bitmask", + |_self: Val| { + let output: u32 = BVec3A::bitmask(_self).into(); + output + }, + ) + .overwrite_script_function( + "any", + |_self: Val| { + let output: bool = BVec3A::any(_self).into(); + output + }, + ) + .overwrite_script_function( + "all", + |_self: Val| { + let output: bool = BVec3A::all(_self).into(); + output + }, + ) + .overwrite_script_function( + "test", + |_self: Ref, index: usize| { + let output: bool = BVec3A::test(_self, index).into(); + output + }, + ) + .overwrite_script_function( + "set", + |_self: Mut, index: usize, value: bool| { + let output: () = BVec3A::set(_self, index, value).into(); + output + }, + ) + .overwrite_script_function( + "clone", + |_self: Ref| { + let output: Val = BVec3A::clone(_self).into(); + output + }, + ) + .overwrite_script_function( + "eq", + |_self: Ref, rhs: Ref| { + let output: bool = BVec3A::eq(_self, rhs).into(); + output + }, + ); + NamespaceBuilder::::new(world) + .overwrite_script_function( + "new", + |x: bool, y: bool, z: bool, w: bool| { + let output: Val = BVec4A::new(x, y, z, w).into(); + output + }, + ) + .overwrite_script_function( + "splat", + |v: bool| { + let output: Val = BVec4A::splat(v).into(); + output + }, + ) + .overwrite_script_function( + "from_array", + |a: [bool; 4]| { + let output: Val = BVec4A::from_array(a).into(); + output + }, + ) + .overwrite_script_function( + "bitmask", + |_self: Val| { + let output: u32 = BVec4A::bitmask(_self).into(); + output + }, + ) + .overwrite_script_function( + "any", + |_self: Val| { + let output: bool = BVec4A::any(_self).into(); + output + }, + ) + .overwrite_script_function( + "all", + |_self: Val| { + let output: bool = BVec4A::all(_self).into(); + output + }, + ) + .overwrite_script_function( + "test", + |_self: Ref, index: usize| { + let output: bool = BVec4A::test(_self, index).into(); + output + }, + ) + .overwrite_script_function( + "set", + |_self: Mut, index: usize, value: bool| { + let output: () = BVec4A::set(_self, index, value).into(); + output + }, + ) + .overwrite_script_function( + "eq", + |_self: Ref, rhs: Ref| { + let output: bool = BVec4A::eq(_self, rhs).into(); + output + }, + ) + .overwrite_script_function( + "clone", + |_self: Ref| { + let output: Val = BVec4A::clone(_self).into(); + output + }, + ); + NamespaceBuilder::::new(world) + .overwrite_script_function( + "clone", + |_self: Ref| { + let output: Val = SmolStr::clone(_self).into(); + output + }, + ) + .overwrite_script_function( + "eq", + |_self: Ref, other: Ref| { + let output: bool = SmolStr::eq(_self, other).into(); + output + }, + ) + .overwrite_script_function( + "to_string", + |_self: Ref| { + let output: std::string::String = SmolStr::to_string(_self).into(); + output + }, + ) + .overwrite_script_function( + "len", + |_self: Ref| { + let output: usize = SmolStr::len(_self).into(); + output + }, + ) + .overwrite_script_function( + "is_empty", + |_self: Ref| { + let output: bool = SmolStr::is_empty(_self).into(); + output + }, + ) + .overwrite_script_function( + "is_heap_allocated", + |_self: Ref| { + let output: bool = SmolStr::is_heap_allocated(_self).into(); + output + }, + ); + NamespaceBuilder::::new(world) + .overwrite_script_function( + "get_version_num", + |_self: Ref| { + let output: usize = Uuid::get_version_num(_self).into(); + output + }, + ) + .overwrite_script_function( + "as_u128", + |_self: Ref| { + let output: u128 = Uuid::as_u128(_self).into(); + output + }, + ) + .overwrite_script_function( + "to_u128_le", + |_self: Ref| { + let output: u128 = Uuid::to_u128_le(_self).into(); + output + }, + ) + .overwrite_script_function( + "as_u64_pair", + |_self: Ref| { + let output: (u64, u64) = Uuid::as_u64_pair(_self).into(); + output + }, + ) + .overwrite_script_function( + "into_bytes", + |_self: Val| { + let output: [u8; 16] = Uuid::into_bytes(_self).into(); + output + }, + ) + .overwrite_script_function( + "to_bytes_le", + |_self: Ref| { + let output: [u8; 16] = Uuid::to_bytes_le(_self).into(); + output + }, + ) + .overwrite_script_function( + "is_nil", + |_self: Ref| { + let output: bool = Uuid::is_nil(_self).into(); + output + }, + ) + .overwrite_script_function( + "is_max", + |_self: Ref| { + let output: bool = Uuid::is_max(_self).into(); + output + }, + ) + .overwrite_script_function( + "encode_buffer", + || { + let output: [u8; 45] = Uuid::encode_buffer().into(); + output + }, + ) + .overwrite_script_function( + "get_node_id", + |_self: Ref| { + let output: bevy::reflect::erased_serde::__private::serde::__private::Option< + [u8; 6], + > = Uuid::get_node_id(_self).into(); + output + }, + ) + .overwrite_script_function( + "assert_receiver_is_total_eq", + |_self: Ref| { + let output: () = Uuid::assert_receiver_is_total_eq(_self).into(); + output + }, + ) + .overwrite_script_function( + "nil", + || { + let output: Val = Uuid::nil().into(); + output + }, + ) + .overwrite_script_function( + "max", + || { + let output: Val = Uuid::max().into(); + output + }, + ) + .overwrite_script_function( + "from_u128", + |v: u128| { + let output: Val = Uuid::from_u128(v).into(); + output + }, + ) + .overwrite_script_function( + "from_u128_le", + |v: u128| { + let output: Val = Uuid::from_u128_le(v).into(); + output + }, + ) + .overwrite_script_function( + "from_u64_pair", + |high_bits: u64, low_bits: u64| { + let output: Val = Uuid::from_u64_pair( + high_bits, + low_bits, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "from_bytes", + |bytes: [u8; 16]| { + let output: Val = Uuid::from_bytes(bytes).into(); + output + }, + ) + .overwrite_script_function( + "from_bytes_le", + |b: [u8; 16]| { + let output: Val = Uuid::from_bytes_le(b).into(); + output + }, + ) + .overwrite_script_function( + "eq", + |_self: Ref, other: Ref| { + let output: bool = Uuid::eq(_self, other).into(); + output + }, + ) + .overwrite_script_function( + "clone", + |_self: Ref| { + let output: Val = Uuid::clone(_self).into(); + output + }, + ) + .overwrite_script_function( + "new_v4", + || { + let output: Val = Uuid::new_v4().into(); + output + }, + ); + } +} diff --git a/crates/bevy_mod_scripting_functions/src/bevy/bevy_time.rs b/crates/bevy_mod_scripting_functions/src/bevy/bevy_time.rs new file mode 100644 index 0000000000..b310c16014 --- /dev/null +++ b/crates/bevy_mod_scripting_functions/src/bevy/bevy_time.rs @@ -0,0 +1,285 @@ +// @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 super::bevy_ecs::*; +use super::bevy_reflect::*; +use bevy_mod_scripting_core::{ + AddContextInitializer, StoreDocumentation, bindings::ReflectReference, +}; +use bevy_mod_scripting_functions::RegisterScriptFunction; +use crate::*; +pub struct BevyTimeScriptingPlugin; +impl bevy::app::Plugin for BevyTimeScriptingPlugin { + fn build(&self, app: &mut bevy::prelude::App) { + let mut world = app.world_mut(); + NamespaceBuilder::::new(world) + .overwrite_script_function( + "clone", + |_self: Ref| { + let output: Val = Fixed::clone(_self) + .into(); + output + }, + ); + NamespaceBuilder::::new(world) + .overwrite_script_function( + "clone", + |_self: Ref| { + let output: Val = Real::clone(_self) + .into(); + output + }, + ); + NamespaceBuilder::::new(world) + .overwrite_script_function( + "clone", + |_self: Ref| { + let output: Val = Timer::clone(_self) + .into(); + output + }, + ) + .overwrite_script_function( + "assert_receiver_is_total_eq", + |_self: Ref| { + let output: () = Timer::assert_receiver_is_total_eq(_self).into(); + output + }, + ) + .overwrite_script_function( + "from_seconds", + |duration: f32, mode: Val| { + let output: Val = Timer::from_seconds( + duration, + mode, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "finished", + |_self: Ref| { + let output: bool = Timer::finished(_self).into(); + output + }, + ) + .overwrite_script_function( + "just_finished", + |_self: Ref| { + let output: bool = Timer::just_finished(_self).into(); + output + }, + ) + .overwrite_script_function( + "elapsed_secs", + |_self: Ref| { + let output: f32 = Timer::elapsed_secs(_self).into(); + output + }, + ) + .overwrite_script_function( + "elapsed_secs_f64", + |_self: Ref| { + let output: f64 = Timer::elapsed_secs_f64(_self).into(); + output + }, + ) + .overwrite_script_function( + "mode", + |_self: Ref| { + let output: Val = Timer::mode(_self) + .into(); + output + }, + ) + .overwrite_script_function( + "set_mode", + | + _self: Mut, + mode: Val| + { + let output: () = Timer::set_mode(_self, mode).into(); + output + }, + ) + .overwrite_script_function( + "pause", + |_self: Mut| { + let output: () = Timer::pause(_self).into(); + output + }, + ) + .overwrite_script_function( + "unpause", + |_self: Mut| { + let output: () = Timer::unpause(_self).into(); + output + }, + ) + .overwrite_script_function( + "paused", + |_self: Ref| { + let output: bool = Timer::paused(_self).into(); + output + }, + ) + .overwrite_script_function( + "reset", + |_self: Mut| { + let output: () = Timer::reset(_self).into(); + output + }, + ) + .overwrite_script_function( + "fraction", + |_self: Ref| { + let output: f32 = Timer::fraction(_self).into(); + output + }, + ) + .overwrite_script_function( + "fraction_remaining", + |_self: Ref| { + let output: f32 = Timer::fraction_remaining(_self).into(); + output + }, + ) + .overwrite_script_function( + "remaining_secs", + |_self: Ref| { + let output: f32 = Timer::remaining_secs(_self).into(); + output + }, + ) + .overwrite_script_function( + "times_finished_this_tick", + |_self: Ref| { + let output: u32 = Timer::times_finished_this_tick(_self).into(); + output + }, + ) + .overwrite_script_function( + "eq", + | + _self: Ref, + other: Ref| + { + let output: bool = Timer::eq(_self, other).into(); + output + }, + ); + NamespaceBuilder::::new(world) + .overwrite_script_function( + "eq", + | + _self: Ref, + other: Ref| + { + let output: bool = TimerMode::eq(_self, other).into(); + output + }, + ) + .overwrite_script_function( + "clone", + |_self: Ref| { + let output: Val = TimerMode::clone( + _self, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "assert_receiver_is_total_eq", + |_self: Ref| { + let output: () = TimerMode::assert_receiver_is_total_eq(_self) + .into(); + output + }, + ); + NamespaceBuilder::::new(world) + .overwrite_script_function( + "clone", + |_self: Ref| { + let output: Val = Virtual::clone(_self) + .into(); + output + }, + ); + NamespaceBuilder::::new(world) + .overwrite_script_function( + "new", + || { + let output: Val = Stopwatch::new().into(); + output + }, + ) + .overwrite_script_function( + "elapsed_secs", + |_self: Ref| { + let output: f32 = Stopwatch::elapsed_secs(_self).into(); + output + }, + ) + .overwrite_script_function( + "elapsed_secs_f64", + |_self: Ref| { + let output: f64 = Stopwatch::elapsed_secs_f64(_self).into(); + output + }, + ) + .overwrite_script_function( + "pause", + |_self: Mut| { + let output: () = Stopwatch::pause(_self).into(); + output + }, + ) + .overwrite_script_function( + "unpause", + |_self: Mut| { + let output: () = Stopwatch::unpause(_self).into(); + output + }, + ) + .overwrite_script_function( + "is_paused", + |_self: Ref| { + let output: bool = Stopwatch::is_paused(_self).into(); + output + }, + ) + .overwrite_script_function( + "reset", + |_self: Mut| { + let output: () = Stopwatch::reset(_self).into(); + output + }, + ) + .overwrite_script_function( + "assert_receiver_is_total_eq", + |_self: Ref| { + let output: () = Stopwatch::assert_receiver_is_total_eq(_self) + .into(); + output + }, + ) + .overwrite_script_function( + "clone", + |_self: Ref| { + let output: Val = Stopwatch::clone(_self) + .into(); + output + }, + ) + .overwrite_script_function( + "eq", + |_self: Ref, other: Ref| { + let output: bool = Stopwatch::eq(_self, other).into(); + output + }, + ); + } +} diff --git a/crates/bevy_mod_scripting_functions/src/bevy/bevy_transform.rs b/crates/bevy_mod_scripting_functions/src/bevy/bevy_transform.rs new file mode 100644 index 0000000000..32fa0c402c --- /dev/null +++ b/crates/bevy_mod_scripting_functions/src/bevy/bevy_transform.rs @@ -0,0 +1,243 @@ +// @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 super::bevy_ecs::*; +use super::bevy_reflect::*; +use super::bevy_core::*; +use super::bevy_math::*; +use super::bevy_hierarchy::*; +use bevy_mod_scripting_core::{ + AddContextInitializer, StoreDocumentation, bindings::ReflectReference, +}; +use bevy_mod_scripting_functions::RegisterScriptFunction; +use crate::*; +pub struct BevyTransformScriptingPlugin; +impl bevy::app::Plugin for BevyTransformScriptingPlugin { + fn build(&self, app: &mut bevy::prelude::App) { + let mut world = app.world_mut(); + NamespaceBuilder::::new(world) + .overwrite_script_function( + "clone", + |_self: Ref| { + let output: Val = GlobalTransform::clone( + _self, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "mul", + | + _self: Val, + global_transform: Val| + { + let output: Val = GlobalTransform::mul( + _self, + global_transform, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "mul", + | + _self: Val, + transform: Val| + { + let output: Val = GlobalTransform::mul( + _self, + transform, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "eq", + | + _self: Ref, + other: Ref| + { + let output: bool = GlobalTransform::eq(_self, other).into(); + output + }, + ) + .overwrite_script_function( + "from_xyz", + |x: f32, y: f32, z: f32| { + let output: Val = GlobalTransform::from_xyz( + x, + y, + z, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "compute_transform", + |_self: Ref| { + let output: Val = GlobalTransform::compute_transform( + _self, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "reparented_to", + | + _self: Ref, + parent: Ref| + { + let output: Val = GlobalTransform::reparented_to( + _self, + parent, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "mul_transform", + | + _self: Ref, + transform: Val| + { + let output: Val = GlobalTransform::mul_transform( + _self, + transform, + ) + .into(); + output + }, + ); + NamespaceBuilder::::new(world) + .overwrite_script_function( + "from_xyz", + |x: f32, y: f32, z: f32| { + let output: Val = Transform::from_xyz( + x, + y, + z, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "rotate_x", + |_self: Mut, angle: f32| { + let output: () = Transform::rotate_x(_self, angle).into(); + output + }, + ) + .overwrite_script_function( + "rotate_y", + |_self: Mut, angle: f32| { + let output: () = Transform::rotate_y(_self, angle).into(); + output + }, + ) + .overwrite_script_function( + "rotate_z", + |_self: Mut, angle: f32| { + let output: () = Transform::rotate_z(_self, angle).into(); + output + }, + ) + .overwrite_script_function( + "rotate_local_x", + |_self: Mut, angle: f32| { + let output: () = Transform::rotate_local_x(_self, angle).into(); + output + }, + ) + .overwrite_script_function( + "rotate_local_y", + |_self: Mut, angle: f32| { + let output: () = Transform::rotate_local_y(_self, angle).into(); + output + }, + ) + .overwrite_script_function( + "rotate_local_z", + |_self: Mut, angle: f32| { + let output: () = Transform::rotate_local_z(_self, angle).into(); + output + }, + ) + .overwrite_script_function( + "mul_transform", + | + _self: Ref, + transform: Val| + { + let output: Val = Transform::mul_transform( + _self, + transform, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "is_finite", + |_self: Ref| { + let output: bool = Transform::is_finite(_self).into(); + output + }, + ) + .overwrite_script_function( + "eq", + | + _self: Ref, + other: Ref| + { + let output: bool = Transform::eq(_self, other).into(); + output + }, + ) + .overwrite_script_function( + "mul", + | + _self: Val, + transform: Val| + { + let output: Val = Transform::mul( + _self, + transform, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "mul", + | + _self: Val, + global_transform: Val| + { + let output: Val = Transform::mul( + _self, + global_transform, + ) + .into(); + output + }, + ) + .overwrite_script_function( + "clone", + |_self: Ref| { + let output: Val = Transform::clone( + _self, + ) + .into(); + output + }, + ); + } +} diff --git a/crates/bevy_mod_scripting_functions/src/bevy/mod.rs b/crates/bevy_mod_scripting_functions/src/bevy/mod.rs new file mode 100644 index 0000000000..94eef83506 --- /dev/null +++ b/crates/bevy_mod_scripting_functions/src/bevy/mod.rs @@ -0,0 +1,25 @@ +// @generated by cargo bevy-api-gen collect, modify the templates not this file +#![allow(clippy::all)] +#![allow(unused, deprecated, dead_code)] +#![cfg_attr(rustfmt, rustfmt_skip)] +pub mod bevy_reflect; +pub mod bevy_math; +pub mod bevy_input; +pub mod bevy_transform; +pub mod bevy_core; +pub mod bevy_hierarchy; +pub mod bevy_ecs; +pub mod bevy_time; +pub struct LuaBevyScriptingPlugin; +impl bevy::app::Plugin for LuaBevyScriptingPlugin { + fn build(&self, app: &mut bevy::prelude::App) { + bevy_reflect::BevyReflectScriptingPlugin.build(app); + bevy_math::BevyMathScriptingPlugin.build(app); + bevy_input::BevyInputScriptingPlugin.build(app); + bevy_transform::BevyTransformScriptingPlugin.build(app); + bevy_core::BevyCoreScriptingPlugin.build(app); + bevy_hierarchy::BevyHierarchyScriptingPlugin.build(app); + bevy_ecs::BevyEcsScriptingPlugin.build(app); + bevy_time::BevyTimeScriptingPlugin.build(app); + } +}